q2-tecton-elements 1.26.0 → 1.27.0

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 (188) hide show
  1. package/dist/cjs/{index-d62f5a7e.js → index-ffd19146.js} +2 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  4. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/q2-badge_2.cjs.entry.js +4 -4
  6. package/dist/cjs/q2-btn_2.cjs.entry.js +7 -5
  7. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  8. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
  15. package/dist/cjs/q2-checkbox.cjs.entry.js +3 -3
  16. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-optgroup_2.cjs.entry.js +2 -2
  24. package/dist/cjs/q2-option-list_2.cjs.entry.js +66 -25
  25. package/dist/cjs/q2-pagination.cjs.entry.js +18 -16
  26. package/dist/cjs/q2-pill.cjs.entry.js +82 -14
  27. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-section.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-select.cjs.entry.js +24 -19
  31. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-tag.cjs.entry.js +11 -4
  36. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  37. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  39. package/dist/collection/components/q2-avatar/styles.css +22 -14
  40. package/dist/collection/components/q2-btn/index.js +22 -3
  41. package/dist/collection/components/q2-btn/styles.css +26 -11
  42. package/dist/collection/components/q2-calendar/index.js +1 -1
  43. package/dist/collection/components/q2-calendar/styles.css +7 -1
  44. package/dist/collection/components/q2-carousel-pane/index.js +15 -6
  45. package/dist/collection/components/q2-checkbox/index.js +6 -3
  46. package/dist/collection/components/q2-checkbox/styles.css +1 -0
  47. package/dist/collection/components/q2-checkbox-group/index.js +5 -4
  48. package/dist/collection/components/q2-dropdown/index.js +1 -1
  49. package/dist/collection/components/q2-input/index.js +6 -6
  50. package/dist/collection/components/q2-input/styles.css +4 -0
  51. package/dist/collection/components/q2-message/index.js +1 -1
  52. package/dist/collection/components/q2-option/index.js +21 -9
  53. package/dist/collection/components/q2-option-list/index.js +55 -14
  54. package/dist/collection/components/q2-pagination/index.js +16 -14
  55. package/dist/collection/components/q2-pagination/styles.css +5 -0
  56. package/dist/collection/components/q2-pill/index.js +84 -14
  57. package/dist/collection/components/q2-popover/index.js +10 -10
  58. package/dist/collection/components/q2-radio/index.js +20 -8
  59. package/dist/collection/components/q2-radio/styles.css +2 -0
  60. package/dist/collection/components/q2-select/index.js +40 -17
  61. package/dist/collection/components/q2-select/styles.css +41 -3
  62. package/dist/collection/components/q2-stepper/index.js +5 -2
  63. package/dist/collection/components/q2-stepper-pane/index.js +5 -2
  64. package/dist/collection/components/q2-tab-pane/index.js +20 -8
  65. package/dist/collection/components/q2-tag/index.js +10 -3
  66. package/dist/collection/utils/index.js +1 -1
  67. package/dist/components/index10.js +1 -1
  68. package/dist/components/index12.js +1 -1
  69. package/dist/components/index13.js +55 -14
  70. package/dist/components/index14.js +10 -10
  71. package/dist/components/index15.js +2 -2
  72. package/dist/components/index3.js +1 -1
  73. package/dist/components/index5.js +7 -4
  74. package/dist/components/index8.js +4 -4
  75. package/dist/components/q2-calendar.js +2 -2
  76. package/dist/components/q2-checkbox-group.js +5 -4
  77. package/dist/components/q2-checkbox.js +2 -2
  78. package/dist/components/q2-dropdown.js +1 -1
  79. package/dist/components/q2-pagination.js +18 -16
  80. package/dist/components/q2-pill.js +82 -14
  81. package/dist/components/q2-radio.js +1 -1
  82. package/dist/components/q2-select.js +25 -19
  83. package/dist/components/q2-tag.js +10 -3
  84. package/dist/docs.json +145 -46
  85. package/dist/esm/{index-5040cd84.js → index-a0cc60e3.js} +2 -2
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/esm/q2-action-sheet.entry.js +1 -1
  88. package/dist/esm/q2-avatar.entry.js +1 -1
  89. package/dist/esm/q2-badge_2.entry.js +4 -4
  90. package/dist/esm/q2-btn_2.entry.js +7 -5
  91. package/dist/esm/q2-calendar.entry.js +3 -3
  92. package/dist/esm/q2-card.entry.js +1 -1
  93. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  94. package/dist/esm/q2-carousel.entry.js +1 -1
  95. package/dist/esm/q2-chart-area.entry.js +1 -1
  96. package/dist/esm/q2-chart-bar.entry.js +1 -1
  97. package/dist/esm/q2-chart-donut.entry.js +1 -1
  98. package/dist/esm/q2-checkbox-group.entry.js +6 -5
  99. package/dist/esm/q2-checkbox.entry.js +3 -3
  100. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  101. package/dist/esm/q2-dropdown.entry.js +2 -2
  102. package/dist/esm/q2-editable-field.entry.js +1 -1
  103. package/dist/esm/q2-icon.entry.js +1 -1
  104. package/dist/esm/q2-loc.entry.js +1 -1
  105. package/dist/esm/q2-message.entry.js +2 -2
  106. package/dist/esm/q2-month-picker.entry.js +1 -1
  107. package/dist/esm/q2-optgroup_2.entry.js +2 -2
  108. package/dist/esm/q2-option-list_2.entry.js +66 -25
  109. package/dist/esm/q2-pagination.entry.js +18 -16
  110. package/dist/esm/q2-pill.entry.js +82 -14
  111. package/dist/esm/q2-radio-group.entry.js +1 -1
  112. package/dist/esm/q2-radio.entry.js +2 -2
  113. package/dist/esm/q2-section.entry.js +1 -1
  114. package/dist/esm/q2-select.entry.js +24 -19
  115. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  116. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  117. package/dist/esm/q2-stepper.entry.js +1 -1
  118. package/dist/esm/q2-tab-container.entry.js +1 -1
  119. package/dist/esm/q2-tag.entry.js +11 -4
  120. package/dist/esm/q2-tecton-elements.js +1 -1
  121. package/dist/esm/q2-textarea.entry.js +1 -1
  122. package/dist/esm/q2-tooltip.entry.js +1 -1
  123. package/dist/q2-tecton-elements/p-04b9a7ee.entry.js +1 -0
  124. package/dist/q2-tecton-elements/{p-c506314d.entry.js → p-05bdc0aa.entry.js} +1 -1
  125. package/dist/q2-tecton-elements/{p-f5c9ef75.entry.js → p-0b8943da.entry.js} +1 -1
  126. package/dist/q2-tecton-elements/{p-ece7a1ca.entry.js → p-12e65423.entry.js} +1 -1
  127. package/dist/q2-tecton-elements/{p-f3096cce.entry.js → p-1d28c600.entry.js} +1 -1
  128. package/dist/q2-tecton-elements/{p-839ef27d.js → p-2453cd92.js} +1 -1
  129. package/dist/q2-tecton-elements/{p-a1f91d8c.entry.js → p-256e5161.entry.js} +1 -1
  130. package/dist/q2-tecton-elements/{p-5878b8bd.entry.js → p-25ea01d3.entry.js} +1 -1
  131. package/dist/q2-tecton-elements/p-2b8a8981.entry.js +1 -0
  132. package/dist/q2-tecton-elements/p-396fd275.entry.js +1 -0
  133. package/dist/q2-tecton-elements/p-3dca7465.entry.js +1 -0
  134. package/dist/q2-tecton-elements/p-414ca427.entry.js +1 -0
  135. package/dist/q2-tecton-elements/p-521c9085.entry.js +1 -0
  136. package/dist/q2-tecton-elements/{p-bfaff58b.entry.js → p-5a670d93.entry.js} +1 -1
  137. package/dist/q2-tecton-elements/p-72374b8e.entry.js +1 -0
  138. package/dist/q2-tecton-elements/p-8545c3cb.entry.js +1 -0
  139. package/dist/q2-tecton-elements/p-85e780b2.entry.js +1 -0
  140. package/dist/q2-tecton-elements/{p-18808c27.entry.js → p-869e899c.entry.js} +1 -1
  141. package/dist/q2-tecton-elements/p-8e652d59.entry.js +1 -0
  142. package/dist/q2-tecton-elements/{p-74ac19cd.entry.js → p-9292bd80.entry.js} +1 -1
  143. package/dist/q2-tecton-elements/{p-fbe8b4c0.entry.js → p-9367dc29.entry.js} +1 -1
  144. package/dist/q2-tecton-elements/{p-bc8a507b.entry.js → p-949fa312.entry.js} +1 -1
  145. package/dist/q2-tecton-elements/{p-a8258fb1.entry.js → p-a298cbfb.entry.js} +1 -1
  146. package/dist/q2-tecton-elements/p-aae8b9fc.entry.js +1 -0
  147. package/dist/q2-tecton-elements/{p-bea1fda1.entry.js → p-ac6dd5b1.entry.js} +1 -1
  148. package/dist/q2-tecton-elements/{p-8b5639a1.entry.js → p-bafb5e70.entry.js} +1 -1
  149. package/dist/q2-tecton-elements/{p-a411f2f3.entry.js → p-be0d3bfe.entry.js} +1 -1
  150. package/dist/q2-tecton-elements/{p-a7679912.entry.js → p-ce67d77a.entry.js} +1 -1
  151. package/dist/q2-tecton-elements/{p-1cc42a02.entry.js → p-d06d752f.entry.js} +1 -1
  152. package/dist/q2-tecton-elements/{p-7b124d8c.entry.js → p-d69cb7d1.entry.js} +1 -1
  153. package/dist/q2-tecton-elements/{p-bda877fe.entry.js → p-edcf49fd.entry.js} +1 -1
  154. package/dist/q2-tecton-elements/{p-8954cc63.entry.js → p-ef657f8f.entry.js} +1 -1
  155. package/dist/q2-tecton-elements/{p-0cbad3bc.entry.js → p-f3e4bb52.entry.js} +1 -1
  156. package/dist/q2-tecton-elements/{p-7d35c1a1.entry.js → p-fb768d19.entry.js} +1 -1
  157. package/dist/q2-tecton-elements/{p-87cecc80.entry.js → p-fcad1609.entry.js} +1 -1
  158. package/dist/q2-tecton-elements/{p-7eca74d4.entry.js → p-fe3625ad.entry.js} +1 -1
  159. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  160. package/dist/test/helpers.js +1 -1
  161. package/dist/types/components/q2-btn/index.d.ts +2 -0
  162. package/dist/types/components/q2-carousel-pane/index.d.ts +12 -0
  163. package/dist/types/components/q2-checkbox/index.d.ts +4 -0
  164. package/dist/types/components/q2-checkbox-group/index.d.ts +1 -1
  165. package/dist/types/components/q2-input/index.d.ts +1 -1
  166. package/dist/types/components/q2-option/index.d.ts +16 -0
  167. package/dist/types/components/q2-option-list/index.d.ts +6 -0
  168. package/dist/types/components/q2-pagination/index.d.ts +1 -1
  169. package/dist/types/components/q2-pill/index.d.ts +6 -2
  170. package/dist/types/components/q2-radio/index.d.ts +16 -0
  171. package/dist/types/components/q2-select/index.d.ts +3 -2
  172. package/dist/types/components/q2-stepper/index.d.ts +4 -0
  173. package/dist/types/components/q2-stepper-pane/index.d.ts +4 -0
  174. package/dist/types/components/q2-tab-pane/index.d.ts +16 -0
  175. package/dist/types/components/q2-tag/index.d.ts +1 -1
  176. package/dist/types/components.d.ts +148 -0
  177. package/package.json +3 -3
  178. package/dist/q2-tecton-elements/p-09639e95.entry.js +0 -1
  179. package/dist/q2-tecton-elements/p-0b82891e.entry.js +0 -1
  180. package/dist/q2-tecton-elements/p-224d3c31.entry.js +0 -1
  181. package/dist/q2-tecton-elements/p-4734a577.entry.js +0 -1
  182. package/dist/q2-tecton-elements/p-55d192b3.entry.js +0 -1
  183. package/dist/q2-tecton-elements/p-721d0aee.entry.js +0 -1
  184. package/dist/q2-tecton-elements/p-73643653.entry.js +0 -1
  185. package/dist/q2-tecton-elements/p-8d703466.entry.js +0 -1
  186. package/dist/q2-tecton-elements/p-aafb9537.entry.js +0 -1
  187. package/dist/q2-tecton-elements/p-b8420bfe.entry.js +0 -1
  188. package/dist/q2-tecton-elements/p-e4aa271e.entry.js +0 -1
@@ -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 = () => {
@@ -63,14 +61,14 @@ export class Q2Select {
63
61
  this.optionList.handleExternalKeydown(event);
64
62
  };
65
63
  this.visibilityToggleKeyDown = (event) => {
66
- const keysForOptionListToHandle = ['ArrowDown', 'ArrowUp'];
67
- const keysThatTriggerClick = ['Enter', ' '];
68
64
  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'));
65
+ const isShiftTab = key === 'Tab' && event.shiftKey;
66
+ const isRadioControlKey = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(key);
67
+ if (isRadioControlKey)
68
+ event.stopPropagation();
69
+ if (isShiftTab) {
70
+ event.stopPropagation();
71
+ this.optionList.setDefaultActiveElement();
74
72
  }
75
73
  };
76
74
  this.inputClickHandler = async (event) => {
@@ -125,6 +123,7 @@ export class Q2Select {
125
123
  this.disabled = false;
126
124
  this.readonly = false;
127
125
  this.invalid = undefined;
126
+ this.listLabel = loc('tecton.element.select.listLabel');
128
127
  this.errors = undefined;
129
128
  this.multiple = false;
130
129
  this.minRows = 3;
@@ -348,7 +347,7 @@ export class Q2Select {
348
347
  this.change.emit({ value: multiple ? undefined : '', selectedOptions: multiple ? [] : undefined });
349
348
  }
350
349
  calculateMultiSelectSelectedDisplay() {
351
- var _a;
350
+ var _a, _b, _c;
352
351
  const { firstSelectedOptionElement, firstSelectedValue, multilineOptions } = this;
353
352
  if (!firstSelectedValue)
354
353
  return '';
@@ -358,11 +357,15 @@ export class Q2Select {
358
357
  return this.searchText;
359
358
  if (multilineOptions)
360
359
  return '';
361
- return (_a = firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.value) !== null && _a !== void 0 ? _a : firstSelectedValue;
360
+ return ((_c = (_b = (_a = firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.value) !== null && _c !== void 0 ? _c : firstSelectedValue);
362
361
  }
363
362
  calculateSingleSelectSelectedDisplay() {
363
+ var _a;
364
364
  const { firstSelectedOptionElement } = this;
365
- return ((firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.display) && loc(firstSelectedOptionElement.display)) || this.value || '';
365
+ return (((firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.display) && loc(firstSelectedOptionElement.display)) ||
366
+ ((_a = firstSelectedOptionElement === null || firstSelectedOptionElement === void 0 ? void 0 : firstSelectedOptionElement.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
367
+ this.value ||
368
+ '');
366
369
  }
367
370
  openDropdownWithoutActiveElement() {
368
371
  if (this.readonly || this.disabled)
@@ -454,16 +457,18 @@ export class Q2Select {
454
457
  this.errors.length > 0 &&
455
458
  this.errors.map(error => loc(error))) ||
456
459
  (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()));
460
+ [], 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: 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()));
458
461
  }
459
462
  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))));
463
+ 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), 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
464
  }
462
465
  visibilityToggle() {
463
466
  var _a, _b;
464
467
  const selectedOptionsCount = (_b = (_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
465
468
  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]))));
469
+ 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', [
470
+ selectedOptionsCount,
471
+ ]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
467
472
  }
468
473
  static get is() { return "q2-select"; }
469
474
  static get encapsulation() { return "shadow"; }
@@ -599,6 +604,24 @@ export class Q2Select {
599
604
  "attribute": "invalid",
600
605
  "reflect": true
601
606
  },
607
+ "listLabel": {
608
+ "type": "string",
609
+ "mutable": false,
610
+ "complexType": {
611
+ "original": "string",
612
+ "resolved": "string",
613
+ "references": {}
614
+ },
615
+ "required": false,
616
+ "optional": false,
617
+ "docs": {
618
+ "tags": [],
619
+ "text": ""
620
+ },
621
+ "attribute": "list-label",
622
+ "reflect": false,
623
+ "defaultValue": "loc('tecton.element.select.listLabel')"
624
+ },
602
625
  "errors": {
603
626
  "type": "unknown",
604
627
  "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
  }
@@ -236,8 +236,11 @@ export class Q2Stepper {
236
236
  "required": false,
237
237
  "optional": false,
238
238
  "docs": {
239
- "tags": [],
240
- "text": ""
239
+ "tags": [{
240
+ "name": "private",
241
+ "text": undefined
242
+ }],
243
+ "text": "Used to determine the number of steps in the stepper."
241
244
  },
242
245
  "attribute": "step-count",
243
246
  "reflect": false
@@ -107,8 +107,11 @@ export class Q2StepperPane {
107
107
  "required": false,
108
108
  "optional": false,
109
109
  "docs": {
110
- "tags": [],
111
- "text": ""
110
+ "tags": [{
111
+ "name": "private",
112
+ "text": undefined
113
+ }],
114
+ "text": "Used by q2-stepper and q2-stepper-vertical to determine which pane is active"
112
115
  },
113
116
  "attribute": "is-active",
114
117
  "reflect": true
@@ -77,8 +77,11 @@ export class Q2TabPane {
77
77
  "required": false,
78
78
  "optional": false,
79
79
  "docs": {
80
- "tags": [],
81
- "text": ""
80
+ "tags": [{
81
+ "name": "private",
82
+ "text": undefined
83
+ }],
84
+ "text": "Used by q2-tab-container to apply a name to all options in the group"
82
85
  },
83
86
  "attribute": "name",
84
87
  "reflect": true
@@ -94,8 +97,11 @@ export class Q2TabPane {
94
97
  "required": false,
95
98
  "optional": false,
96
99
  "docs": {
97
- "tags": [],
98
- "text": ""
100
+ "tags": [{
101
+ "name": "private",
102
+ "text": undefined
103
+ }],
104
+ "text": "Used by q2-tab-container to indicate the option is selected"
99
105
  },
100
106
  "attribute": "selected",
101
107
  "reflect": true
@@ -189,8 +195,11 @@ export class Q2TabPane {
189
195
  "required": false,
190
196
  "optional": false,
191
197
  "docs": {
192
- "tags": [],
193
- "text": ""
198
+ "tags": [{
199
+ "name": "private",
200
+ "text": undefined
201
+ }],
202
+ "text": "Used by q2-tab-container to indicate the pane's index"
194
203
  },
195
204
  "attribute": "index",
196
205
  "reflect": false
@@ -206,8 +215,11 @@ export class Q2TabPane {
206
215
  "required": false,
207
216
  "optional": false,
208
217
  "docs": {
209
- "tags": [],
210
- "text": ""
218
+ "tags": [{
219
+ "name": "private",
220
+ "text": undefined
221
+ }],
222
+ "text": "Used by q2-tab-container to apply a unique id to each tab pane"
211
223
  },
212
224
  "attribute": "guid",
213
225
  "reflect": false
@@ -15,7 +15,10 @@ export class Q2Tag {
15
15
  const target = event.target;
16
16
  if (target.localName === 'click-elsewhere') {
17
17
  event.stopPropagation();
18
- this.popoverElement.open = false;
18
+ const { popoverElement } = this;
19
+ if (!popoverElement)
20
+ return;
21
+ popoverElement.open = false;
19
22
  }
20
23
  };
21
24
  this.handleChange = event => {
@@ -27,6 +30,7 @@ export class Q2Tag {
27
30
  };
28
31
  this.handleClick = async (event) => {
29
32
  event.stopPropagation();
33
+ this.popoverElement.controlElement = this.dropdownBtn;
30
34
  if (shouldShowActionSheet(this)) {
31
35
  const { value } = await showActionSheetList(this, event);
32
36
  this.click.emit({ value });
@@ -36,7 +40,11 @@ export class Q2Tag {
36
40
  }
37
41
  };
38
42
  this.handleKeydown = async (event) => {
43
+ const isTabMetaOrCtrl = event.metaKey || event.ctrlKey || event.key === 'Tab';
44
+ if (isTabMetaOrCtrl)
45
+ return;
39
46
  event.preventDefault();
47
+ this.popoverElement.controlElement = this.dropdownBtn;
40
48
  if (shouldShowActionSheet(this, event)) {
41
49
  const { value } = await showActionSheetList(this, event);
42
50
  this.click.emit({ value });
@@ -45,7 +53,7 @@ export class Q2Tag {
45
53
  this.optionList.handleExternalKeydown(event);
46
54
  }
47
55
  };
48
- this.handleButtonFocusout = (event) => {
56
+ this.handleButtonFocusout = async (event) => {
49
57
  var _a;
50
58
  const relatedTarget = event.relatedTarget;
51
59
  if ((_a = (relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.tagName) === 'Q2-OPTION') !== null && _a !== void 0 ? _a : false)
@@ -91,7 +99,6 @@ export class Q2Tag {
91
99
  if (open)
92
100
  return;
93
101
  this.optionList.setActiveElement(null);
94
- this.dropdownBtn.focus();
95
102
  }
96
103
  /// DOM ///
97
104
  render() {
@@ -104,7 +104,7 @@ export function handleAriaLabel(target) {
104
104
  }
105
105
  export function messagesDOM(target) {
106
106
  const type = target.hasError ? 'danger' : 'info';
107
- return (h("div", { class: "messages-container" }, h("q2-message", { appearance: "minimal", description: true, type: type }, h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", null, loc(message))))))));
107
+ return (h("div", { class: "messages-container" }, h("q2-message", { appearance: "minimal", description: true, type: type, "test-id": "message" }, h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", { "test-id": "messageListItem" }, loc(message))))))));
108
108
  }
109
109
  export function setMessageHeight(target) {
110
110
  const messageContainer = target.hostElement.shadowRoot.querySelector('.messages-container');
@@ -39,7 +39,7 @@ const Q2Message = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
39
39
  const addAriaHiddenForAriaLive = isFirefox && this.presentToggle;
40
40
  const addDivForAriaLive = !isFirefox && this.presentToggle;
41
41
  const { description } = this;
42
- return (h("div", { tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description ? undefined : 'all' }, this.appearance === 'standard' ? generateIcon(this.type) : '', addDivForAriaLive && h("div", { class: "sr" }), h("div", { class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", null))));
42
+ return (h("div", { tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? generateIcon(this.type) : '', addDivForAriaLive && h("div", { class: "sr" }), h("div", { class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", null))));
43
43
  }
44
44
  get hostElement() { return this; }
45
45
  static get style() { return stylesCss; }
@@ -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 {
@@ -12,6 +12,56 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
12
12
  this.popoverState = createEvent(this, "popoverState", 7);
13
13
  this.ready = createEvent(this, "ready", 3);
14
14
  this.scheduledAfterRender = [];
15
+ this.keyStore = {
16
+ queue: [],
17
+ lastPressedAt: new Date(),
18
+ };
19
+ this.searchAndFocus = (keyValue, shouldSelect) => {
20
+ // pseudo search in non-searchable select
21
+ const reorder = () => {
22
+ this.pivotIndex = this.pivotIndex === undefined ? 0 : (this.activeIndex || 0) + 1;
23
+ const list = this.allOptions.map((element, index) => ({ element, index }));
24
+ return [...list.slice(this.pivotIndex), ...list.slice(0, this.pivotIndex)];
25
+ };
26
+ const buildQueue = () => {
27
+ const now = new Date();
28
+ if (now.getTime() - this.keyStore.lastPressedAt.getTime() > 1000) {
29
+ // empty stored keys if delay > 1s
30
+ this.keyStore.queue.length = 0;
31
+ }
32
+ if (this.keyStore.queue.length !== 1 || this.keyStore.queue[0] !== keyValue) {
33
+ this.keyStore.queue.push(keyValue);
34
+ }
35
+ this.keyStore.lastPressedAt = now;
36
+ };
37
+ const searchIndex = (list) => {
38
+ const keyStr = this.keyStore.queue.join('');
39
+ return list.find(v => {
40
+ return (!v.element.disabled &&
41
+ v.element.display &&
42
+ (v.element.display.match(new RegExp(`^${keyStr}`, 'i')) ||
43
+ v.element.display.replace(/\s/g, '').match(new RegExp(`^${keyStr}`, 'i'))));
44
+ });
45
+ };
46
+ const setFocus = ({ index }) => {
47
+ if (this.multiple) {
48
+ // multiple: should open to make sure that which options are selected
49
+ this.openDropdownWithActiveElement(index);
50
+ }
51
+ else {
52
+ this.activeIndex = index;
53
+ if (shouldSelect)
54
+ this.selectOption(this.allOptions[index]);
55
+ else
56
+ this.setActiveElement(index);
57
+ }
58
+ };
59
+ buildQueue();
60
+ const matched = searchIndex(reorder());
61
+ if (matched) {
62
+ setFocus(matched);
63
+ }
64
+ };
15
65
  /// Event Handlers ///
16
66
  /* tslint:disable:cyclomatic-complexity */
17
67
  this.externalKeydownHandler = (event) => {
@@ -101,7 +151,7 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
101
151
  let newOption;
102
152
  switch (key) {
103
153
  case ' ':
104
- if (this.searchString) {
154
+ if (this.searchString && !this.multiple) {
105
155
  if (customSearch)
106
156
  break;
107
157
  this.searchOptions(key, false);
@@ -171,6 +221,8 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
171
221
  case 'Tab':
172
222
  if (shiftKey)
173
223
  break;
224
+ if (this.multiple && this.role === 'listbox')
225
+ break;
174
226
  newOption = allOptions.find(element => element.active);
175
227
  if (!newOption || newOption.disabled)
176
228
  return;
@@ -417,19 +469,8 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
417
469
  }, 2000);
418
470
  }
419
471
  searchOptions(key, shouldSelect) {
420
- this.resetTimer();
421
- let searchString = this.searchString ? `${this.searchString}${key}` : key;
422
- searchString = searchString.replace(/[^\w\s]/gi, '');
423
- this.searchString = searchString;
424
- const searchRegEx = new RegExp(`^${searchString}`, 'i');
425
- const { allOptions } = this;
426
- const foundIndex = allOptions.findIndex(option => option.value === searchString || option.textContent.trim().match(searchRegEx));
427
- if (foundIndex === -1)
428
- return;
429
- if (shouldSelect)
430
- this.selectOption(this.allOptions[foundIndex]);
431
- else
432
- this.setActiveElement(foundIndex);
472
+ this.searchString = key;
473
+ this.searchAndFocus(key, shouldSelect);
433
474
  }
434
475
  /// Watchers ///
435
476
  showSelectedUpdated(showSelected) {
@@ -58,6 +58,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
58
58
  if (this.open)
59
59
  return;
60
60
  this.currentDirection = undefined;
61
+ this.containerElement.style.removeProperty('display');
61
62
  this.containerElement.style.removeProperty('--comp-pop-max-height');
62
63
  }, { once: true });
63
64
  this.show = false;
@@ -91,9 +92,8 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
91
92
  const { containerElement, contentElement, direction, controlElement, currentDirection } = this;
92
93
  if (containerElement)
93
94
  containerElement.style.maxHeight = null;
94
- // If direction defined, use it
95
- if (direction)
96
- return this.setDirectionAndShow(direction);
95
+ // If the direction is already set then use it, otherwise use the current direction
96
+ const currentOrStatedDirection = direction !== null && direction !== void 0 ? direction : currentDirection;
97
97
  // Set the container to block so we can get the height
98
98
  containerElement.style.setProperty('display', 'block');
99
99
  await waitForNextPaint();
@@ -112,13 +112,13 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
112
112
  const canShowFullSizeAbove = contentHeight <= topOffset;
113
113
  let determinedDirection;
114
114
  // Show the full-size popover below or above if it will fit
115
- if (currentDirection === 'down' && canShowFullSizeBelow)
115
+ if (currentOrStatedDirection === 'down' && canShowFullSizeBelow)
116
116
  return this.setDirectionAndShow('down');
117
- else if (currentDirection === 'up' && canShowFullSizeAbove)
117
+ else if (currentOrStatedDirection === 'up' && canShowFullSizeAbove)
118
118
  return this.setDirectionAndShow('up');
119
- else if (currentDirection === undefined && canShowFullSizeBelow)
119
+ else if (currentOrStatedDirection === undefined && canShowFullSizeBelow)
120
120
  determinedDirection = 'down';
121
- else if (currentDirection === undefined && canShowFullSizeAbove)
121
+ else if (currentOrStatedDirection === undefined && canShowFullSizeAbove)
122
122
  determinedDirection = 'up';
123
123
  if (determinedDirection)
124
124
  return this.setDirectionAndShow(determinedDirection);
@@ -127,11 +127,11 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
127
127
  const displayBuffer = 5;
128
128
  const canShowMinHeightBelow = bottomOffset >= minHeight + displayBuffer;
129
129
  let maxHeight;
130
- if (currentDirection === 'down') {
130
+ if (currentOrStatedDirection === 'down') {
131
131
  maxHeight = Math.max(bottomOffset - displayBuffer, minHeight);
132
132
  determinedDirection = 'down';
133
133
  }
134
- else if (currentDirection === 'up') {
134
+ else if (currentOrStatedDirection === 'up') {
135
135
  maxHeight = Math.max(topOffset - displayBuffer, minHeight);
136
136
  determinedDirection = 'up';
137
137
  }
@@ -157,7 +157,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
157
157
  const containerClasses = ['container', this.currentDirection];
158
158
  if (this.show)
159
159
  containerClasses.push('show');
160
- return (h("div", { ref: el => (this.containerElement = el), class: containerClasses.join(' '), role: "menu" }, h("div", { ref: el => (this.contentElement = el), class: "content" }, h("slot", null))));
160
+ return (h("div", { ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { ref: el => (this.contentElement = el), class: "content" }, h("slot", null))));
161
161
  }
162
162
  get hostElement() { return this; }
163
163
  static get watchers() { return {
@@ -543,8 +543,8 @@ function handleAriaLabel(target) {
543
543
  function messagesDOM(target) {
544
544
  const type = target.hasError ? 'danger' : 'info';
545
545
  return (h("div", { class: "messages-container" },
546
- h("q2-message", { appearance: "minimal", description: true, type: type },
547
- h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", null, loc(message))))))));
546
+ h("q2-message", { appearance: "minimal", description: true, type: type, "test-id": "message" },
547
+ h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", { "test-id": "messageListItem" }, loc(message))))))));
548
548
  }
549
549
  function setMessageHeight(target) {
550
550
  const messageContainer = target.hostElement.shadowRoot.querySelector('.messages-container');
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { i as icons, d as defineCustomElement$1 } from './index7.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}.avatar-img{object-fit:cover;height:var(--tct-avatar-img-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-img-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-img-br, 50%);background-color:unset}.avatar-img-default{object-fit:cover;height:var(--tct-avatar-img-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-img-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-img-br, 50%);background-color:var(--tct-avatar-bg, #9e9e9e)}.avatar-initials{height:var(--tct-avatar-height, 44px);width:var(--tct-avatar-width, 44px);background-color:var(--tct-avatar-bg, var(--t-gray-8, #9e9e9e));border-radius:var(--tct-avatar-br, 50%)}.size-1{--tct-avatar-font-size:var(--tct-avatar-size-1, 60px)}.size-2{--tct-avatar-font-size:var(--tct-avatar-size-2, 50px)}.size-3{--tct-avatar-font-size:var(--tct-avatar-size-3, 40px)}.size-4{--tct-avatar-font-size:var(--tct-avatar-size-4, 30px)}text{fill:var(--tct-avatar-color, #ffffff);font-weight:var(--tct-avatar-font-weight, 200);font-size:var(--tct-avatar-font-size, 40px)}.fallback{height:var(--tct-avatar-fallback-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-fallback-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-fallback-br, var(--tct-avatar-img-br, 50%));background-color:var(--tct-avatar-fallback-bg, var(--tct-avatar-bg, #9e9e9e));display:flex;align-items:center;justify-content:center}q2-icon{--t-icon-size:var(--tct-avatar-fallback-icon-size, 65%);--t-icon-fill:var(--tct-avatar-fallback-fill, transparent);--t-icon-stroke-primary:var(--tct-avatar-fallback-stroke-primary, currentcolor);--t-icon-stroke-secondary:var(--tct-avatar-fallback-stroke-secondary, currentcolor);color:var(--tct-avatar-fallback-color, var(--tct-avatar-color, var(--t-base, #ffffff)));width:var(--t-icon-size);height:var(--t-icon-size)}";
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}.avatar-img{object-fit:cover;height:var(--tct-avatar-img-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-img-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-img-border-radius, --tct-avatar-img-br, --tct-avatar-border-radius, 50%);background-color:unset}.avatar-img-default{object-fit:cover;height:var(--tct-avatar-img-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-img-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-img-border-radius, var(--tct-avatar-img-br, var(--tct-avatar-border-radius, 50%)));background:var(--tct-avatar-background, var(--tct-avatar-bg, #9e9e9e))}.avatar-initials{height:var(--tct-avatar-height, 44px);width:var(--tct-avatar-width, 44px);background:var(--tct-avatar-background, var(--tct-avatar-bg, var(--t-gray-8, #9e9e9e)));border-radius:var(--tct-avatar-br, 50%)}.size-1{--tct-avatar-font-size:var(--tct-avatar-size-1, 60px)}.size-2{--tct-avatar-font-size:var(--tct-avatar-size-2, 50px)}.size-3{--tct-avatar-font-size:var(--tct-avatar-size-3, 40px)}.size-4{--tct-avatar-font-size:var(--tct-avatar-size-4, 30px)}text{fill:var(--tct-avatar-text-color, var(--tct-avatar-color, #ffffff));font-weight:var(--tct-avatar-font-weight, 200);font-size:var(--tct-avatar-font-size, 40px)}.fallback{height:var(--tct-avatar-fallback-height, var(--tct-avatar-height, 44px));width:var(--tct-avatar-fallback-width, var(--tct-avatar-width, 44px));border-radius:var(--tct-avatar-fallback-border-radius, var(--tct-avatar-fallback-br, var(--tct-avatar-img-border-radius, var(--tct-avatar-img-br, 50%))));background:var(--tct-avatar-fallback-background, var(--tct-avatar-fallback-bg, var(--tct-avatar-background, var(--tct-avatar-bg, #9e9e9e))));display:flex;align-items:center;justify-content:center}q2-icon{--t-icon-size:var-list(--tct-avatar-icon-size, --tct-avatar-fallback-icon-size, 65%);--t-icon-fill:var-list(--tct-avatar-icon-fill, --tct-avatar-fallback-fill, transparent);--t-icon-stroke-primary:var-list(\n --tct-avatar-icon-stroke-primary,\n --tct-avatar-fallback-stroke-primary,\n currentcolor\n );--t-icon-stroke-secondary:var-list(\n --tct-avatar-icon-stroke-secondary,\n --tct-avatar-fallback-stroke-secondary,\n currentcolor\n );color:var(--tct-avatar-icon-color, var(--tct-avatar-fallback-color, var(--tct-avatar-color, var(--t-base, #ffffff))));width:var(--tct-avatar-icon-size, var(--t-icon-size));height:var(--tct-avatar-icon-size, var(--t-icon-size))}";
5
5
 
6
6
  const Q2Avatar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {