q2-tecton-elements 1.25.2 → 1.26.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 (124) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/q2-badge_2.cjs.entry.js +21 -21
  3. package/dist/cjs/q2-btn_2.cjs.entry.js +4 -4
  4. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  5. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-checkbox.cjs.entry.js +4 -4
  8. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-radio-group.cjs.entry.js +8 -6
  13. package/dist/cjs/q2-radio.cjs.entry.js +4 -4
  14. package/dist/cjs/q2-select.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-tab-container.cjs.entry.js +14 -2
  16. package/dist/cjs/q2-tab-pane.cjs.entry.js +6 -1
  17. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  18. package/dist/cjs/q2-tooltip.cjs.entry.js +17 -2
  19. package/dist/cjs/tecton-tab-pane.cjs.entry.js +5 -0
  20. package/dist/collection/collection-manifest.json +2 -2
  21. package/dist/collection/components/q2-btn/index.js +52 -43
  22. package/dist/collection/components/q2-calendar/index.js +48 -39
  23. package/dist/collection/components/q2-carousel/index.js +21 -18
  24. package/dist/collection/components/q2-checkbox/index.js +42 -36
  25. package/dist/collection/components/q2-checkbox-group/index.js +1 -1
  26. package/dist/collection/components/q2-dropdown/index.js +25 -22
  27. package/dist/collection/components/q2-dropdown-item/index.js +11 -8
  28. package/dist/collection/components/q2-editable-field/index.js +32 -24
  29. package/dist/collection/components/q2-input/index.js +71 -49
  30. package/dist/collection/components/q2-loading/index.js +18 -15
  31. package/dist/collection/components/q2-pill/styles.css +1 -1
  32. package/dist/collection/components/q2-radio/index.js +24 -21
  33. package/dist/collection/components/q2-radio/styles.css +6 -6
  34. package/dist/collection/components/q2-radio-group/index.js +14 -9
  35. package/dist/collection/components/q2-select/index.js +21 -18
  36. package/dist/collection/components/q2-tab-container/index.js +18 -6
  37. package/dist/collection/components/q2-tab-pane/index.js +55 -0
  38. package/dist/collection/components/q2-tooltip/index.js +42 -3
  39. package/dist/collection/components/tecton-tab-pane/index.js +55 -0
  40. package/dist/components/index5.js +7 -7
  41. package/dist/components/index6.js +4 -4
  42. package/dist/components/index8.js +22 -22
  43. package/dist/components/index9.js +3 -3
  44. package/dist/components/q2-calendar.js +6 -6
  45. package/dist/components/q2-carousel.js +2 -2
  46. package/dist/components/q2-checkbox-group.js +1 -1
  47. package/dist/components/q2-checkbox.js +7 -7
  48. package/dist/components/q2-dropdown.js +4 -4
  49. package/dist/components/q2-editable-field.js +4 -4
  50. package/dist/components/q2-pill.js +1 -1
  51. package/dist/components/q2-radio-group.js +10 -8
  52. package/dist/components/q2-radio.js +7 -7
  53. package/dist/components/q2-select.js +2 -2
  54. package/dist/components/q2-tab-container.js +14 -2
  55. package/dist/components/q2-tab-pane.js +8 -1
  56. package/dist/components/q2-tooltip.js +19 -3
  57. package/dist/components/tecton-tab-pane.js +7 -0
  58. package/dist/docs.json +427 -40
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/q2-badge_2.entry.js +21 -21
  61. package/dist/esm/q2-btn_2.entry.js +4 -4
  62. package/dist/esm/q2-calendar.entry.js +2 -2
  63. package/dist/esm/q2-carousel.entry.js +1 -1
  64. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  65. package/dist/esm/q2-checkbox.entry.js +4 -4
  66. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  67. package/dist/esm/q2-dropdown.entry.js +1 -1
  68. package/dist/esm/q2-editable-field.entry.js +1 -1
  69. package/dist/esm/q2-pill.entry.js +1 -1
  70. package/dist/esm/q2-radio-group.entry.js +8 -6
  71. package/dist/esm/q2-radio.entry.js +4 -4
  72. package/dist/esm/q2-select.entry.js +1 -1
  73. package/dist/esm/q2-tab-container.entry.js +14 -2
  74. package/dist/esm/q2-tab-pane.entry.js +6 -1
  75. package/dist/esm/q2-tecton-elements.js +1 -1
  76. package/dist/esm/q2-tooltip.entry.js +17 -2
  77. package/dist/esm/tecton-tab-pane.entry.js +5 -0
  78. package/dist/q2-tecton-elements/p-09639e95.entry.js +1 -0
  79. package/dist/q2-tecton-elements/p-0b82891e.entry.js +1 -0
  80. package/dist/q2-tecton-elements/{p-73c12774.entry.js → p-0cbad3bc.entry.js} +1 -1
  81. package/dist/q2-tecton-elements/p-159d94cc.entry.js +1 -0
  82. package/dist/q2-tecton-elements/p-18808c27.entry.js +1 -0
  83. package/dist/q2-tecton-elements/{p-0a394c3b.entry.js → p-4734a577.entry.js} +1 -1
  84. package/dist/q2-tecton-elements/{p-fa8cb091.entry.js → p-55d192b3.entry.js} +1 -1
  85. package/dist/q2-tecton-elements/p-5878b8bd.entry.js +1 -0
  86. package/dist/q2-tecton-elements/{p-d4909df7.entry.js → p-74ac19cd.entry.js} +1 -1
  87. package/dist/q2-tecton-elements/{p-f0a716dd.entry.js → p-87cecc80.entry.js} +1 -1
  88. package/dist/q2-tecton-elements/p-8d703466.entry.js +1 -0
  89. package/dist/q2-tecton-elements/{p-3fe98171.entry.js → p-a411f2f3.entry.js} +1 -1
  90. package/dist/q2-tecton-elements/{p-30069b63.entry.js → p-a7679912.entry.js} +1 -1
  91. package/dist/q2-tecton-elements/p-b8420bfe.entry.js +1 -0
  92. package/dist/q2-tecton-elements/{p-406f8ca9.entry.js → p-bc8a507b.entry.js} +1 -1
  93. package/dist/q2-tecton-elements/{p-f83d2df5.entry.js → p-bfaff58b.entry.js} +1 -1
  94. package/dist/q2-tecton-elements/p-e43d437d.entry.js +1 -0
  95. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  96. package/dist/test/helpers.js +11 -0
  97. package/dist/types/components/q2-btn/index.d.ts +6 -3
  98. package/dist/types/components/q2-calendar/index.d.ts +5 -2
  99. package/dist/types/components/q2-carousel/index.d.ts +2 -1
  100. package/dist/types/components/q2-checkbox/index.d.ts +6 -4
  101. package/dist/types/components/q2-checkbox-group/index.d.ts +1 -1
  102. package/dist/types/components/q2-dropdown/index.d.ts +3 -2
  103. package/dist/types/components/q2-dropdown-item/index.d.ts +2 -1
  104. package/dist/types/components/q2-editable-field/index.d.ts +5 -3
  105. package/dist/types/components/q2-input/index.d.ts +31 -7
  106. package/dist/types/components/q2-loading/index.d.ts +4 -3
  107. package/dist/types/components/q2-radio/index.d.ts +3 -2
  108. package/dist/types/components/q2-radio-group/index.d.ts +3 -2
  109. package/dist/types/components/q2-select/index.d.ts +2 -1
  110. package/dist/types/components/q2-tab-container/index.d.ts +5 -2
  111. package/dist/types/components/q2-tab-pane/index.d.ts +3 -0
  112. package/dist/types/components/q2-tooltip/index.d.ts +4 -1
  113. package/dist/types/components/tecton-tab-pane/index.d.ts +3 -0
  114. package/dist/types/components.d.ts +140 -24
  115. package/dist/types/workspace/workspace/{tecton-production_release_1.25.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -1
  116. package/package.json +3 -3
  117. package/dist/q2-tecton-elements/p-18d9cea8.entry.js +0 -1
  118. package/dist/q2-tecton-elements/p-2313e9a9.entry.js +0 -1
  119. package/dist/q2-tecton-elements/p-2b9c1815.entry.js +0 -1
  120. package/dist/q2-tecton-elements/p-471e5d58.entry.js +0 -1
  121. package/dist/q2-tecton-elements/p-a6bfe392.entry.js +0 -1
  122. package/dist/q2-tecton-elements/p-c01d0332.entry.js +0 -1
  123. package/dist/q2-tecton-elements/p-df91e954.entry.js +0 -1
  124. package/dist/q2-tecton-elements/p-e8e113c2.entry.js +0 -1
@@ -17,8 +17,8 @@ export class Q2Loading {
17
17
  this.modifiers = undefined;
18
18
  this.counts = undefined;
19
19
  this.label = undefined;
20
- this.ariaLabel = undefined;
21
20
  this.inline = undefined;
21
+ this.ariaLabel = undefined;
22
22
  }
23
23
  get loader() {
24
24
  const loaderMap = {
@@ -81,8 +81,8 @@ export class Q2Loading {
81
81
  "type": "string",
82
82
  "mutable": false,
83
83
  "complexType": {
84
- "original": "string",
85
- "resolved": "string",
84
+ "original": "'spinner' | 'skeleton'",
85
+ "resolved": "\"skeleton\" | \"spinner\"",
86
86
  "references": {}
87
87
  },
88
88
  "required": false,
@@ -162,12 +162,12 @@ export class Q2Loading {
162
162
  "attribute": "label",
163
163
  "reflect": true
164
164
  },
165
- "ariaLabel": {
166
- "type": "string",
165
+ "inline": {
166
+ "type": "boolean",
167
167
  "mutable": false,
168
168
  "complexType": {
169
- "original": "string",
170
- "resolved": "string",
169
+ "original": "boolean",
170
+ "resolved": "boolean",
171
171
  "references": {}
172
172
  },
173
173
  "required": false,
@@ -176,24 +176,27 @@ export class Q2Loading {
176
176
  "tags": [],
177
177
  "text": ""
178
178
  },
179
- "attribute": "aria-label",
179
+ "attribute": "inline",
180
180
  "reflect": true
181
181
  },
182
- "inline": {
183
- "type": "boolean",
184
- "mutable": false,
182
+ "ariaLabel": {
183
+ "type": "string",
184
+ "mutable": true,
185
185
  "complexType": {
186
- "original": "boolean",
187
- "resolved": "boolean",
186
+ "original": "string",
187
+ "resolved": "string",
188
188
  "references": {}
189
189
  },
190
190
  "required": false,
191
191
  "optional": false,
192
192
  "docs": {
193
- "tags": [],
193
+ "tags": [{
194
+ "name": "deprecated",
195
+ "text": undefined
196
+ }],
194
197
  "text": ""
195
198
  },
196
- "attribute": "inline",
199
+ "attribute": "aria-label",
197
200
  "reflect": true
198
201
  }
199
202
  };
@@ -156,7 +156,7 @@ q2-popover,
156
156
  .btn-primary {
157
157
  background: var(--comp-btn-background);
158
158
  border-width: var(--comp-pill-btn-border-width);
159
- border-color: var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-gray-9, #999999)));
159
+ border-color: var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));
160
160
  padding-inline: var(--comp-btn-padding);
161
161
  padding-right: calc(var(--comp-btn-padding) + var(--comp-close-size));
162
162
  font-size: var(--tct-pill-btn-font-size, var(--t-pill-btn-font-size, var(--app-font-size, 14px)));
@@ -2,7 +2,7 @@ import { h } from '@stencil/core';
2
2
  import { createGuid, handleAriaLabel, loc, overrideFocus } from 'src/utils';
3
3
  export class Q2Radio {
4
4
  constructor() {
5
- this.id = `radio-${createGuid()}`;
5
+ this._id = `radio-${createGuid()}`;
6
6
  this.isLoaded = false;
7
7
  this.inputChange = (event) => {
8
8
  event.stopPropagation();
@@ -20,10 +20,10 @@ export class Q2Radio {
20
20
  this.disabled = false;
21
21
  this.checked = false;
22
22
  this.name = undefined;
23
- this.ariaLabel = undefined;
24
23
  this.groupDisabled = false;
25
24
  this.groupReadonly = false;
26
25
  this.groupTileLayout = false;
26
+ this.ariaLabel = undefined;
27
27
  }
28
28
  ////////// LIFECYCLE HOOKS ////////
29
29
  componentWillLoad() {
@@ -57,7 +57,7 @@ export class Q2Radio {
57
57
  }
58
58
  }
59
59
  render() {
60
- return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { ref: el => (this.inputField = el), class: "sr", id: this.id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { htmlFor: this.id, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" }, h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", null))))));
60
+ return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { htmlFor: this._id, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" }, h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", null))))));
61
61
  }
62
62
  static get is() { return "q2-radio"; }
63
63
  static get encapsulation() { return "shadow"; }
@@ -92,7 +92,7 @@ export class Q2Radio {
92
92
  },
93
93
  "hideLabel": {
94
94
  "type": "boolean",
95
- "mutable": false,
95
+ "mutable": true,
96
96
  "complexType": {
97
97
  "original": "boolean",
98
98
  "resolved": "boolean",
@@ -177,23 +177,6 @@ export class Q2Radio {
177
177
  "attribute": "name",
178
178
  "reflect": true
179
179
  },
180
- "ariaLabel": {
181
- "type": "string",
182
- "mutable": true,
183
- "complexType": {
184
- "original": "string",
185
- "resolved": "string",
186
- "references": {}
187
- },
188
- "required": false,
189
- "optional": false,
190
- "docs": {
191
- "tags": [],
192
- "text": ""
193
- },
194
- "attribute": "aria-label",
195
- "reflect": true
196
- },
197
180
  "groupDisabled": {
198
181
  "type": "boolean",
199
182
  "mutable": false,
@@ -247,6 +230,26 @@ export class Q2Radio {
247
230
  "attribute": "group-tile-layout",
248
231
  "reflect": false,
249
232
  "defaultValue": "false"
233
+ },
234
+ "ariaLabel": {
235
+ "type": "string",
236
+ "mutable": true,
237
+ "complexType": {
238
+ "original": "string",
239
+ "resolved": "string",
240
+ "references": {}
241
+ },
242
+ "required": false,
243
+ "optional": false,
244
+ "docs": {
245
+ "tags": [{
246
+ "name": "deprecated",
247
+ "text": undefined
248
+ }],
249
+ "text": ""
250
+ },
251
+ "attribute": "aria-label",
252
+ "reflect": true
250
253
  }
251
254
  };
252
255
  }
@@ -91,7 +91,7 @@ button {
91
91
  }
92
92
  .radio-container circle:nth-child(1) {
93
93
  stroke-width: 2;
94
- stroke: var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));
94
+ stroke: var(--tct-radio-stroke-color, var(--t-a11y-gray-color-AA, #949494));
95
95
  }
96
96
  .radio-container input:focus + label svg {
97
97
  box-shadow: var(--const-double-focus-ring);
@@ -101,7 +101,7 @@ button {
101
101
  }
102
102
  .radio-container input:checked + label circle:nth-child(1) {
103
103
  background-color: var(--tct-radio-checked-bg, transparent);
104
- stroke: var(--tct-radio-checked-stroke-color, var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));
104
+ stroke: var(--tct-radio-checked-stroke-color, var(--tct-radio-stroke-color, var(--t-a11y-gray-color-AA, #949494)));
105
105
  }
106
106
  .radio-container input:checked + label .label-content {
107
107
  font-weight: var(--tct-checkbox-selected-font-weight, 600);
@@ -119,7 +119,7 @@ button {
119
119
  .radio-tile label[for] {
120
120
  align-items: center;
121
121
  border-radius: 3px;
122
- border: 2px solid var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));
122
+ border: 2px solid var(--tct-radio-stroke-color, var(--t-a11y-gray-color-AA, #949494));
123
123
  cursor: pointer;
124
124
  display: block;
125
125
  padding: 10px;
@@ -129,16 +129,16 @@ button {
129
129
  white-space: nowrap;
130
130
  }
131
131
  .radio-tile input:focus + label, .radio-tile input:focus:checked + label {
132
- border-color: #0079c1;
132
+ border-color: var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)));
133
133
  box-shadow: var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);
134
134
  }
135
135
  .radio-tile input:checked + label {
136
- border-color: var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e));
136
+ border-color: var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)));
137
137
  box-shadow: inset 0 0 0 2px #ffffff;
138
138
  }
139
139
  .radio-tile input:checked + label:after {
140
140
  border-bottom-width: 3px;
141
- border-bottom: 5px solid #0079c1;
141
+ border-bottom: 5px solid var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)));
142
142
  border-left-width: 5px;
143
143
  border-left: 8px solid transparent;
144
144
  border-right-width: 5px;
@@ -2,7 +2,7 @@ import { h, Fragment, } from '@stencil/core';
2
2
  import { createGuid, isEventFromElement, loc, overrideFocus } from 'src/utils';
3
3
  export class Q2RadioGroup {
4
4
  constructor() {
5
- this.id = `radio-group-${createGuid()}`;
5
+ this._id = `radio-group-${createGuid()}`;
6
6
  this.onMutationObserved = () => {
7
7
  this.valueUpdated(this.value);
8
8
  this.nameUpdated();
@@ -33,8 +33,7 @@ export class Q2RadioGroup {
33
33
  /////// LIFECYCLE HOOK ///////
34
34
  componentWillLoad() {
35
35
  this.onMutationObserved();
36
- if (this.tilelayout)
37
- this.tileLayout = this.tilelayout;
36
+ this.handleDeprecatedTilelayout(this.tilelayout);
38
37
  }
39
38
  componentDidLoad() {
40
39
  const observer = new MutationObserver(this.onMutationObserved);
@@ -50,7 +49,7 @@ export class Q2RadioGroup {
50
49
  }
51
50
  nameUpdated() {
52
51
  this.radioElements.forEach(radio => {
53
- radio.name = this.name || this.id;
52
+ radio.name = this.name || this._id;
54
53
  });
55
54
  }
56
55
  disabledUpdated() {
@@ -62,8 +61,11 @@ export class Q2RadioGroup {
62
61
  const readonly = this.readonly;
63
62
  this.radioElements.forEach(radio => (radio.groupReadonly = readonly));
64
63
  }
65
- tilelayoutUpdated(tilelayout) {
64
+ handleDeprecatedTilelayout(tilelayout) {
65
+ if (typeof tilelayout !== 'boolean')
66
+ return;
66
67
  this.tileLayout = tilelayout;
68
+ this.tilelayout = undefined;
67
69
  }
68
70
  tileLayoutUpdated(tileLayout) {
69
71
  this.radioElements.forEach(radio => {
@@ -254,7 +256,7 @@ export class Q2RadioGroup {
254
256
  },
255
257
  "tileLayout": {
256
258
  "type": "boolean",
257
- "mutable": false,
259
+ "mutable": true,
258
260
  "complexType": {
259
261
  "original": "boolean",
260
262
  "resolved": "boolean",
@@ -307,7 +309,7 @@ export class Q2RadioGroup {
307
309
  },
308
310
  "tilelayout": {
309
311
  "type": "boolean",
310
- "mutable": false,
312
+ "mutable": true,
311
313
  "complexType": {
312
314
  "original": "boolean",
313
315
  "resolved": "boolean",
@@ -316,7 +318,10 @@ export class Q2RadioGroup {
316
318
  "required": false,
317
319
  "optional": false,
318
320
  "docs": {
319
- "tags": [],
321
+ "tags": [{
322
+ "name": "deprecated",
323
+ "text": undefined
324
+ }],
320
325
  "text": ""
321
326
  },
322
327
  "attribute": "tilelayout",
@@ -358,7 +363,7 @@ export class Q2RadioGroup {
358
363
  "methodName": "readonlyUpdated"
359
364
  }, {
360
365
  "propName": "tilelayout",
361
- "methodName": "tilelayoutUpdated"
366
+ "methodName": "handleDeprecatedTilelayout"
362
367
  }, {
363
368
  "propName": "tileLayout",
364
369
  "methodName": "tileLayoutUpdated"
@@ -121,7 +121,6 @@ export class Q2Select {
121
121
  this.label = undefined;
122
122
  this.hideLabel = undefined;
123
123
  this.value = undefined;
124
- this.ariaLabel = undefined;
125
124
  this.selectedOptions = [];
126
125
  this.disabled = false;
127
126
  this.readonly = false;
@@ -135,6 +134,7 @@ export class Q2Select {
135
134
  this.optional = false;
136
135
  this.placeholder = undefined;
137
136
  this.hoist = !!((_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.useActionSheets);
137
+ this.ariaLabel = undefined;
138
138
  this.open = false;
139
139
  this.showSelected = false;
140
140
  this.searchText = '';
@@ -530,23 +530,6 @@ export class Q2Select {
530
530
  "attribute": "value",
531
531
  "reflect": false
532
532
  },
533
- "ariaLabel": {
534
- "type": "string",
535
- "mutable": true,
536
- "complexType": {
537
- "original": "string",
538
- "resolved": "string",
539
- "references": {}
540
- },
541
- "required": false,
542
- "optional": false,
543
- "docs": {
544
- "tags": [],
545
- "text": ""
546
- },
547
- "attribute": "aria-label",
548
- "reflect": true
549
- },
550
533
  "selectedOptions": {
551
534
  "type": "unknown",
552
535
  "mutable": true,
@@ -772,6 +755,26 @@ export class Q2Select {
772
755
  "attribute": "hoist",
773
756
  "reflect": false,
774
757
  "defaultValue": "!!window.Tecton?.useActionSheets"
758
+ },
759
+ "ariaLabel": {
760
+ "type": "string",
761
+ "mutable": true,
762
+ "complexType": {
763
+ "original": "string",
764
+ "resolved": "string",
765
+ "references": {}
766
+ },
767
+ "required": false,
768
+ "optional": false,
769
+ "docs": {
770
+ "tags": [{
771
+ "name": "deprecated",
772
+ "text": undefined
773
+ }],
774
+ "text": ""
775
+ },
776
+ "attribute": "aria-label",
777
+ "reflect": true
775
778
  }
776
779
  };
777
780
  }
@@ -19,11 +19,13 @@ export class Q2TabContainer {
19
19
  });
20
20
  };
21
21
  this.setTabs = () => {
22
- this.tabs = this.tabPanes.map(({ label, value, badgeCount, badgeDescription }) => ({
22
+ this.tabs = this.tabPanes.map(({ label, value, badgeCount, badgeDescription, badgeTheme, badgeStatus }) => ({
23
23
  label: (label && loc(label)) || '',
24
24
  value,
25
25
  badgeCount,
26
26
  badgeDescription,
27
+ badgeTheme,
28
+ badgeStatus,
27
29
  }));
28
30
  };
29
31
  this.onTabClick = (event) => {
@@ -214,7 +216,17 @@ export class Q2TabContainer {
214
216
  return (h("li", { role: "presentation" }, h("button", { id: `tab-${this.guid}-${index}`, "data-value": value, "test-id": "tabLink", tabIndex: isSelected ? 0 : -1, role: "tab", "aria-selected": isSelected ? 'true' : 'false', "aria-controls": `tab-pane-${this.guid}-${index}`, onClick: this.onTabClick, onKeyDown: this.onTabKeyDown }, tab.badgeCount === undefined ? label : this.generateTabWithBadge(tab, isSelected))));
215
217
  }
216
218
  generateTabWithBadge(tab, isSelected) {
217
- return (h("div", { class: "tab-pane-badge", "aria-label": `${tab.label}, ${tab.badgeCount} ${tab.badgeDescription || loc('tecton.element.tab.pane.new')}` }, tab.label, h("q2-badge", { value: tab.badgeCount, theme: isSelected ? 'primary' : undefined })));
219
+ let theme;
220
+ if (!tab.badgeStatus && isSelected)
221
+ theme = tab.badgeTheme || 'primary';
222
+ let description;
223
+ if (tab.badgeDescription)
224
+ description = loc(tab.badgeDescription);
225
+ else if (tab.badgeStatus)
226
+ description = loc(`tecton.element.tab.pane.${tab.badgeStatus}`, [tab.badgeCount]);
227
+ else
228
+ description = loc('tecton.element.tab.pane.new');
229
+ return (h("div", { class: "tab-pane-badge", "aria-label": `${tab.label}, ${tab.badgeCount} ${description}` }, tab.label, h("q2-badge", { value: tab.badgeCount, theme: theme, status: tab.badgeStatus })));
218
230
  }
219
231
  static get is() { return "q2-tab-container"; }
220
232
  static get encapsulation() { return "shadow"; }
@@ -251,8 +263,8 @@ export class Q2TabContainer {
251
263
  "type": "string",
252
264
  "mutable": false,
253
265
  "complexType": {
254
- "original": "string",
255
- "resolved": "string",
266
+ "original": "'main' | 'section'",
267
+ "resolved": "\"main\" | \"section\"",
256
268
  "references": {}
257
269
  },
258
270
  "required": false,
@@ -285,8 +297,8 @@ export class Q2TabContainer {
285
297
  "type": "string",
286
298
  "mutable": false,
287
299
  "complexType": {
288
- "original": "string",
289
- "resolved": "string",
300
+ "original": "'alt' | undefined",
301
+ "resolved": "\"alt\"",
290
302
  "references": {}
291
303
  },
292
304
  "required": false,
@@ -7,6 +7,8 @@ export class Q2TabPane {
7
7
  this.selected = undefined;
8
8
  this.badgeCount = undefined;
9
9
  this.badgeDescription = undefined;
10
+ this.badgeTheme = undefined;
11
+ this.badgeStatus = undefined;
10
12
  this.index = undefined;
11
13
  this.guid = undefined;
12
14
  }
@@ -132,6 +134,50 @@ export class Q2TabPane {
132
134
  "attribute": "badge-description",
133
135
  "reflect": true
134
136
  },
137
+ "badgeTheme": {
138
+ "type": "string",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "Q2Badge['theme']",
142
+ "resolved": "\"primary\" | \"secondary\" | \"tertiary\"",
143
+ "references": {
144
+ "Q2Badge": {
145
+ "location": "import",
146
+ "path": "../q2-badge"
147
+ }
148
+ }
149
+ },
150
+ "required": false,
151
+ "optional": false,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "attribute": "badge-theme",
157
+ "reflect": true
158
+ },
159
+ "badgeStatus": {
160
+ "type": "string",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "Q2Badge['status']",
164
+ "resolved": "\"alert\" | \"info\" | \"success\" | \"warning\"",
165
+ "references": {
166
+ "Q2Badge": {
167
+ "location": "import",
168
+ "path": "../q2-badge"
169
+ }
170
+ }
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": ""
177
+ },
178
+ "attribute": "badge-status",
179
+ "reflect": true
180
+ },
135
181
  "index": {
136
182
  "type": "number",
137
183
  "mutable": false,
@@ -190,6 +236,15 @@ export class Q2TabPane {
190
236
  return [{
191
237
  "propName": "badgeCount",
192
238
  "methodName": "badgeObserver"
239
+ }, {
240
+ "propName": "badgeDescription",
241
+ "methodName": "badgeObserver"
242
+ }, {
243
+ "propName": "badgeTheme",
244
+ "methodName": "badgeObserver"
245
+ }, {
246
+ "propName": "badgeStatus",
247
+ "methodName": "badgeObserver"
193
248
  }];
194
249
  }
195
250
  }
@@ -1,4 +1,5 @@
1
1
  import { h, Fragment } from '@stencil/core';
2
+ import { isEventFromElement, overrideFocus } from 'src/utils';
2
3
  export class Q2Tooltip {
3
4
  constructor() {
4
5
  this.animationEndCount = 0;
@@ -7,9 +8,14 @@ export class Q2Tooltip {
7
8
  this.multiline = undefined;
8
9
  this.persistent = undefined;
9
10
  this.immediate = undefined;
11
+ this.focusable = false;
10
12
  this.position = 'n';
11
13
  this.focusClass = undefined;
12
14
  }
15
+ /// LifeCycle Hooks ///
16
+ componentDidLoad() {
17
+ overrideFocus(this.hostElement);
18
+ }
13
19
  /// Getters ///
14
20
  get shouldBeVisible() {
15
21
  if (this.persistent)
@@ -58,21 +64,30 @@ export class Q2Tooltip {
58
64
  break;
59
65
  }
60
66
  }
61
- focusHandler() {
67
+ focusCaptureHandler() {
62
68
  this.checkFocusClass();
63
69
  }
70
+ focusHandler(event) {
71
+ if (!isEventFromElement(event, this.hostElement))
72
+ return;
73
+ if (!this.focusable)
74
+ return;
75
+ this.tooltipElement.focus();
76
+ }
64
77
  focusOutHandler() {
65
78
  if (this.shouldBeVisible)
66
79
  return;
67
80
  if (this.focusClass === 'has-generic-focus')
68
81
  this.focusClass = 'has-generic-focus-out';
82
+ else
83
+ this.focusClass = null;
69
84
  }
70
85
  render() {
71
86
  const { focusClass } = this;
72
87
  const classes = ['tooltip'];
73
88
  if (focusClass)
74
89
  classes.push(focusClass);
75
- return this.label ? (h(Fragment, null, h("div", { ref: el => (this.tooltipElement = el), class: classes.join(' '), "aria-label": this.label, onAnimationEnd: () => this.animationEndHandler(), role: "tooltip" }, h("slot", null)))) : (h("slot", null));
90
+ return this.label ? (h(Fragment, null, h("div", { tabindex: this.focusable ? 0 : undefined, ref: el => (this.tooltipElement = el), class: classes.join(' '), "aria-label": this.label, onAnimationEnd: () => this.animationEndHandler(), role: "tooltip", "test-id": "tooltipContainer" }, h("slot", null)))) : (h("slot", null));
76
91
  }
77
92
  static get is() { return "q2-tooltip"; }
78
93
  static get encapsulation() { return "shadow"; }
@@ -173,6 +188,24 @@ export class Q2Tooltip {
173
188
  "attribute": "immediate",
174
189
  "reflect": true
175
190
  },
191
+ "focusable": {
192
+ "type": "boolean",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "boolean",
196
+ "resolved": "boolean",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": ""
204
+ },
205
+ "attribute": "focusable",
206
+ "reflect": true,
207
+ "defaultValue": "false"
208
+ },
176
209
  "position": {
177
210
  "type": "string",
178
211
  "mutable": false,
@@ -208,10 +241,16 @@ export class Q2Tooltip {
208
241
  "passive": false
209
242
  }, {
210
243
  "name": "focus",
211
- "method": "focusHandler",
244
+ "method": "focusCaptureHandler",
212
245
  "target": undefined,
213
246
  "capture": true,
214
247
  "passive": false
248
+ }, {
249
+ "name": "focus",
250
+ "method": "focusHandler",
251
+ "target": undefined,
252
+ "capture": false,
253
+ "passive": false
215
254
  }, {
216
255
  "name": "focusout",
217
256
  "method": "focusOutHandler",
@@ -19,6 +19,8 @@ export class TectonTabPane {
19
19
  this.minHeight = undefined;
20
20
  this.badgeCount = undefined;
21
21
  this.badgeDescription = undefined;
22
+ this.badgeTheme = undefined;
23
+ this.badgeStatus = undefined;
22
24
  this.authPayload = undefined;
23
25
  this.showForm = undefined;
24
26
  this._showForm = undefined;
@@ -278,6 +280,50 @@ export class TectonTabPane {
278
280
  "attribute": "badge-description",
279
281
  "reflect": true
280
282
  },
283
+ "badgeTheme": {
284
+ "type": "string",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "Q2Badge['theme']",
288
+ "resolved": "\"primary\" | \"secondary\" | \"tertiary\"",
289
+ "references": {
290
+ "Q2Badge": {
291
+ "location": "import",
292
+ "path": "../q2-badge"
293
+ }
294
+ }
295
+ },
296
+ "required": false,
297
+ "optional": false,
298
+ "docs": {
299
+ "tags": [],
300
+ "text": ""
301
+ },
302
+ "attribute": "badge-theme",
303
+ "reflect": true
304
+ },
305
+ "badgeStatus": {
306
+ "type": "string",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "Q2Badge['status']",
310
+ "resolved": "\"alert\" | \"info\" | \"success\" | \"warning\"",
311
+ "references": {
312
+ "Q2Badge": {
313
+ "location": "import",
314
+ "path": "../q2-badge"
315
+ }
316
+ }
317
+ },
318
+ "required": false,
319
+ "optional": false,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": ""
323
+ },
324
+ "attribute": "badge-status",
325
+ "reflect": true
326
+ },
281
327
  "authPayload": {
282
328
  "type": "unknown",
283
329
  "mutable": false,
@@ -340,6 +386,15 @@ export class TectonTabPane {
340
386
  return [{
341
387
  "propName": "badgeCount",
342
388
  "methodName": "badgeObserver"
389
+ }, {
390
+ "propName": "badgeDescription",
391
+ "methodName": "badgeObserver"
392
+ }, {
393
+ "propName": "badgeTheme",
394
+ "methodName": "badgeObserver"
395
+ }, {
396
+ "propName": "badgeStatus",
397
+ "methodName": "badgeObserver"
343
398
  }, {
344
399
  "propName": "selected",
345
400
  "methodName": "selectedObserver"