@esri/calcite-components 1.0.0-next.424 → 1.0.0-next.425

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.
@@ -24,14 +24,6 @@ const Tab = class {
24
24
  this.active = false;
25
25
  /** @internal Parent tabs component scale value */
26
26
  this.scale = "m";
27
- //--------------------------------------------------------------------------
28
- //
29
- // Private State/Props
30
- //
31
- //--------------------------------------------------------------------------
32
- /**
33
- * @internal
34
- */
35
27
  this.guid = `calcite-tab-title-${guid.guid()}`;
36
28
  }
37
29
  //--------------------------------------------------------------------------
@@ -43,12 +35,15 @@ const Tab = class {
43
35
  const id = this.el.id || this.guid;
44
36
  return (index.h(index.Host, { "aria-expanded": this.active.toString(), "aria-labelledby": this.labeledBy, id: id, role: "tabpanel" }, index.h("section", null, index.h("slot", null))));
45
37
  }
38
+ connectedCallback() {
39
+ this.parentTabsEl = this.el.closest("calcite-tabs");
40
+ }
46
41
  componentDidLoad() {
47
42
  this.calciteTabRegister.emit();
48
43
  }
49
44
  componentWillRender() {
50
45
  var _a;
51
- this.scale = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.scale;
46
+ this.scale = (_a = this.parentTabsEl) === null || _a === void 0 ? void 0 : _a.scale;
52
47
  }
53
48
  disconnectedCallback() {
54
49
  var _a;
@@ -63,10 +58,13 @@ const Tab = class {
63
58
  //
64
59
  //--------------------------------------------------------------------------
65
60
  tabChangeHandler(event) {
61
+ const targetTabsEl = event
62
+ .composedPath()
63
+ .find((el) => el.tagName === "CALCITE-TABS");
66
64
  // to allow `<calcite-tabs>` to be nested we need to make sure this
67
- // `calciteTabChange` event was actually fired from a title that is a
68
- // child of the `<calcite-tabs>` that is the a parent of this tab.
69
- if (!event.composedPath().includes(this.el.closest("calcite-tabs"))) {
65
+ // `calciteTabChange` event was actually fired from a within the same
66
+ // `<calcite-tabs>` that is the a parent of this tab.
67
+ if (targetTabsEl !== this.parentTabsEl) {
70
68
  return;
71
69
  }
72
70
  if (this.tab) {
@@ -153,6 +151,9 @@ const TabNav = class {
153
151
  // Lifecycle
154
152
  //
155
153
  //--------------------------------------------------------------------------
154
+ connectedCallback() {
155
+ this.parentTabsEl = this.el.closest("calcite-tabs");
156
+ }
156
157
  componentWillLoad() {
157
158
  const storageKey = `calcite-tab-nav-${this.storageId}`;
158
159
  if (localStorage && this.storageId && localStorage.getItem(storageKey)) {
@@ -164,11 +165,11 @@ const TabNav = class {
164
165
  }
165
166
  }
166
167
  componentWillRender() {
167
- var _a, _b, _c, _d;
168
- this.layout = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.layout;
169
- this.position = (_b = this.el.closest("calcite-tabs")) === null || _b === void 0 ? void 0 : _b.position;
170
- this.scale = (_c = this.el.closest("calcite-tabs")) === null || _c === void 0 ? void 0 : _c.scale;
171
- this.bordered = (_d = this.el.closest("calcite-tabs")) === null || _d === void 0 ? void 0 : _d.bordered;
168
+ const { parentTabsEl } = this;
169
+ this.layout = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.layout;
170
+ this.position = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.position;
171
+ this.scale = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.scale;
172
+ this.bordered = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.bordered;
172
173
  // fix issue with active tab-title not lining up with blue indicator
173
174
  if (this.selectedTabEl) {
174
175
  this.updateOffsetPosition();
@@ -309,9 +310,6 @@ const TabTitle = class {
309
310
  this.mutationObserver = observers.createObserver("mutation", () => this.updateHasText());
310
311
  /** determine if there is slotted text for styling purposes */
311
312
  this.hasText = false;
312
- /**
313
- * @internal
314
- */
315
313
  this.guid = `calcite-tab-title-${guid.guid()}`;
316
314
  }
317
315
  activeTabChanged() {
@@ -380,15 +378,19 @@ const TabTitle = class {
380
378
  //
381
379
  //--------------------------------------------------------------------------
382
380
  tabChangeHandler(event) {
383
- if (event.composedPath().includes(this.parentTabNavEl)) {
384
- if (this.tab) {
385
- this.active = this.tab === event.detail.tab;
386
- }
387
- else {
388
- this.getTabIndex().then((index) => {
389
- this.active = index === event.detail.tab;
390
- });
391
- }
381
+ const targetTabsEl = event
382
+ .composedPath()
383
+ .find((el) => el.tagName === "CALCITE-TABS");
384
+ if (targetTabsEl !== this.parentTabsEl) {
385
+ return;
386
+ }
387
+ if (this.tab) {
388
+ this.active = this.tab === event.detail.tab;
389
+ }
390
+ else {
391
+ this.getTabIndex().then((index) => {
392
+ this.active = index === event.detail.tab;
393
+ });
392
394
  }
393
395
  }
394
396
  onClick() {
@@ -504,14 +506,12 @@ const Tabs = class {
504
506
  //
505
507
  //--------------------------------------------------------------------------
506
508
  /**
507
- * @internal
508
509
  *
509
510
  * Stores an array of ids of `<calcite-tab-titles>`s to match up ARIA
510
511
  * attributes.
511
512
  */
512
513
  this.titles = [];
513
514
  /**
514
- * @internal
515
515
  *
516
516
  * Stores an array of ids of `<calcite-tab>`s to match up ARIA attributes.
517
517
  */
@@ -573,7 +573,6 @@ const Tabs = class {
573
573
  //
574
574
  //--------------------------------------------------------------------------
575
575
  /**
576
- * @internal
577
576
  *
578
577
  * Matches up elements from the internal `tabs` and `titles` to automatically
579
578
  * update the ARIA attributes and link `<calcite-tab>` and
@@ -16,14 +16,6 @@ export class Tab {
16
16
  this.active = false;
17
17
  /** @internal Parent tabs component scale value */
18
18
  this.scale = "m";
19
- //--------------------------------------------------------------------------
20
- //
21
- // Private State/Props
22
- //
23
- //--------------------------------------------------------------------------
24
- /**
25
- * @internal
26
- */
27
19
  this.guid = `calcite-tab-title-${guid()}`;
28
20
  }
29
21
  //--------------------------------------------------------------------------
@@ -37,12 +29,15 @@ export class Tab {
37
29
  h("section", null,
38
30
  h("slot", null))));
39
31
  }
32
+ connectedCallback() {
33
+ this.parentTabsEl = this.el.closest("calcite-tabs");
34
+ }
40
35
  componentDidLoad() {
41
36
  this.calciteTabRegister.emit();
42
37
  }
43
38
  componentWillRender() {
44
39
  var _a;
45
- this.scale = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.scale;
40
+ this.scale = (_a = this.parentTabsEl) === null || _a === void 0 ? void 0 : _a.scale;
46
41
  }
47
42
  disconnectedCallback() {
48
43
  var _a;
@@ -57,10 +52,13 @@ export class Tab {
57
52
  //
58
53
  //--------------------------------------------------------------------------
59
54
  tabChangeHandler(event) {
55
+ const targetTabsEl = event
56
+ .composedPath()
57
+ .find((el) => el.tagName === "CALCITE-TABS");
60
58
  // to allow `<calcite-tabs>` to be nested we need to make sure this
61
- // `calciteTabChange` event was actually fired from a title that is a
62
- // child of the `<calcite-tabs>` that is the a parent of this tab.
63
- if (!event.composedPath().includes(this.el.closest("calcite-tabs"))) {
59
+ // `calciteTabChange` event was actually fired from a within the same
60
+ // `<calcite-tabs>` that is the a parent of this tab.
61
+ if (targetTabsEl !== this.parentTabsEl) {
64
62
  return;
65
63
  }
66
64
  if (this.tab) {
@@ -52,6 +52,9 @@ export class TabNav {
52
52
  // Lifecycle
53
53
  //
54
54
  //--------------------------------------------------------------------------
55
+ connectedCallback() {
56
+ this.parentTabsEl = this.el.closest("calcite-tabs");
57
+ }
55
58
  componentWillLoad() {
56
59
  const storageKey = `calcite-tab-nav-${this.storageId}`;
57
60
  if (localStorage && this.storageId && localStorage.getItem(storageKey)) {
@@ -63,11 +66,11 @@ export class TabNav {
63
66
  }
64
67
  }
65
68
  componentWillRender() {
66
- var _a, _b, _c, _d;
67
- this.layout = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.layout;
68
- this.position = (_b = this.el.closest("calcite-tabs")) === null || _b === void 0 ? void 0 : _b.position;
69
- this.scale = (_c = this.el.closest("calcite-tabs")) === null || _c === void 0 ? void 0 : _c.scale;
70
- this.bordered = (_d = this.el.closest("calcite-tabs")) === null || _d === void 0 ? void 0 : _d.bordered;
69
+ const { parentTabsEl } = this;
70
+ this.layout = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.layout;
71
+ this.position = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.position;
72
+ this.scale = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.scale;
73
+ this.bordered = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.bordered;
71
74
  // fix issue with active tab-title not lining up with blue indicator
72
75
  if (this.selectedTabEl) {
73
76
  this.updateOffsetPosition();
@@ -32,9 +32,6 @@ export class TabTitle {
32
32
  this.mutationObserver = createObserver("mutation", () => this.updateHasText());
33
33
  /** determine if there is slotted text for styling purposes */
34
34
  this.hasText = false;
35
- /**
36
- * @internal
37
- */
38
35
  this.guid = `calcite-tab-title-${guid()}`;
39
36
  }
40
37
  activeTabChanged() {
@@ -107,15 +104,19 @@ export class TabTitle {
107
104
  //
108
105
  //--------------------------------------------------------------------------
109
106
  tabChangeHandler(event) {
110
- if (event.composedPath().includes(this.parentTabNavEl)) {
111
- if (this.tab) {
112
- this.active = this.tab === event.detail.tab;
113
- }
114
- else {
115
- this.getTabIndex().then((index) => {
116
- this.active = index === event.detail.tab;
117
- });
118
- }
107
+ const targetTabsEl = event
108
+ .composedPath()
109
+ .find((el) => el.tagName === "CALCITE-TABS");
110
+ if (targetTabsEl !== this.parentTabsEl) {
111
+ return;
112
+ }
113
+ if (this.tab) {
114
+ this.active = this.tab === event.detail.tab;
115
+ }
116
+ else {
117
+ this.getTabIndex().then((index) => {
118
+ this.active = index === event.detail.tab;
119
+ });
119
120
  }
120
121
  }
121
122
  onClick() {
@@ -42,14 +42,12 @@ export class Tabs {
42
42
  //
43
43
  //--------------------------------------------------------------------------
44
44
  /**
45
- * @internal
46
45
  *
47
46
  * Stores an array of ids of `<calcite-tab-titles>`s to match up ARIA
48
47
  * attributes.
49
48
  */
50
49
  this.titles = [];
51
50
  /**
52
- * @internal
53
51
  *
54
52
  * Stores an array of ids of `<calcite-tab>`s to match up ARIA attributes.
55
53
  */
@@ -114,7 +112,6 @@ export class Tabs {
114
112
  //
115
113
  //--------------------------------------------------------------------------
116
114
  /**
117
- * @internal
118
115
  *
119
116
  * Matches up elements from the internal `tabs` and `titles` to automatically
120
117
  * update the ARIA attributes and link `<calcite-tab>` and
@@ -56,6 +56,9 @@ const TabNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
56
56
  // Lifecycle
57
57
  //
58
58
  //--------------------------------------------------------------------------
59
+ connectedCallback() {
60
+ this.parentTabsEl = this.el.closest("calcite-tabs");
61
+ }
59
62
  componentWillLoad() {
60
63
  const storageKey = `calcite-tab-nav-${this.storageId}`;
61
64
  if (localStorage && this.storageId && localStorage.getItem(storageKey)) {
@@ -67,11 +70,11 @@ const TabNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
67
70
  }
68
71
  }
69
72
  componentWillRender() {
70
- var _a, _b, _c, _d;
71
- this.layout = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.layout;
72
- this.position = (_b = this.el.closest("calcite-tabs")) === null || _b === void 0 ? void 0 : _b.position;
73
- this.scale = (_c = this.el.closest("calcite-tabs")) === null || _c === void 0 ? void 0 : _c.scale;
74
- this.bordered = (_d = this.el.closest("calcite-tabs")) === null || _d === void 0 ? void 0 : _d.bordered;
73
+ const { parentTabsEl } = this;
74
+ this.layout = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.layout;
75
+ this.position = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.position;
76
+ this.scale = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.scale;
77
+ this.bordered = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.bordered;
75
78
  // fix issue with active tab-title not lining up with blue indicator
76
79
  if (this.selectedTabEl) {
77
80
  this.updateOffsetPosition();
@@ -40,9 +40,6 @@ const TabTitle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
40
40
  this.mutationObserver = createObserver("mutation", () => this.updateHasText());
41
41
  /** determine if there is slotted text for styling purposes */
42
42
  this.hasText = false;
43
- /**
44
- * @internal
45
- */
46
43
  this.guid = `calcite-tab-title-${guid()}`;
47
44
  }
48
45
  activeTabChanged() {
@@ -111,15 +108,19 @@ const TabTitle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
111
108
  //
112
109
  //--------------------------------------------------------------------------
113
110
  tabChangeHandler(event) {
114
- if (event.composedPath().includes(this.parentTabNavEl)) {
115
- if (this.tab) {
116
- this.active = this.tab === event.detail.tab;
117
- }
118
- else {
119
- this.getTabIndex().then((index) => {
120
- this.active = index === event.detail.tab;
121
- });
122
- }
111
+ const targetTabsEl = event
112
+ .composedPath()
113
+ .find((el) => el.tagName === "CALCITE-TABS");
114
+ if (targetTabsEl !== this.parentTabsEl) {
115
+ return;
116
+ }
117
+ if (this.tab) {
118
+ this.active = this.tab === event.detail.tab;
119
+ }
120
+ else {
121
+ this.getTabIndex().then((index) => {
122
+ this.active = index === event.detail.tab;
123
+ });
123
124
  }
124
125
  }
125
126
  onClick() {
@@ -20,14 +20,6 @@ const Tab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
20
20
  this.active = false;
21
21
  /** @internal Parent tabs component scale value */
22
22
  this.scale = "m";
23
- //--------------------------------------------------------------------------
24
- //
25
- // Private State/Props
26
- //
27
- //--------------------------------------------------------------------------
28
- /**
29
- * @internal
30
- */
31
23
  this.guid = `calcite-tab-title-${guid()}`;
32
24
  }
33
25
  //--------------------------------------------------------------------------
@@ -39,12 +31,15 @@ const Tab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
39
31
  const id = this.el.id || this.guid;
40
32
  return (h(Host, { "aria-expanded": this.active.toString(), "aria-labelledby": this.labeledBy, id: id, role: "tabpanel" }, h("section", null, h("slot", null))));
41
33
  }
34
+ connectedCallback() {
35
+ this.parentTabsEl = this.el.closest("calcite-tabs");
36
+ }
42
37
  componentDidLoad() {
43
38
  this.calciteTabRegister.emit();
44
39
  }
45
40
  componentWillRender() {
46
41
  var _a;
47
- this.scale = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.scale;
42
+ this.scale = (_a = this.parentTabsEl) === null || _a === void 0 ? void 0 : _a.scale;
48
43
  }
49
44
  disconnectedCallback() {
50
45
  var _a;
@@ -59,10 +54,13 @@ const Tab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
59
54
  //
60
55
  //--------------------------------------------------------------------------
61
56
  tabChangeHandler(event) {
57
+ const targetTabsEl = event
58
+ .composedPath()
59
+ .find((el) => el.tagName === "CALCITE-TABS");
62
60
  // to allow `<calcite-tabs>` to be nested we need to make sure this
63
- // `calciteTabChange` event was actually fired from a title that is a
64
- // child of the `<calcite-tabs>` that is the a parent of this tab.
65
- if (!event.composedPath().includes(this.el.closest("calcite-tabs"))) {
61
+ // `calciteTabChange` event was actually fired from a within the same
62
+ // `<calcite-tabs>` that is the a parent of this tab.
63
+ if (targetTabsEl !== this.parentTabsEl) {
66
64
  return;
67
65
  }
68
66
  if (this.tab) {
@@ -47,14 +47,12 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
47
47
  //
48
48
  //--------------------------------------------------------------------------
49
49
  /**
50
- * @internal
51
50
  *
52
51
  * Stores an array of ids of `<calcite-tab-titles>`s to match up ARIA
53
52
  * attributes.
54
53
  */
55
54
  this.titles = [];
56
55
  /**
57
- * @internal
58
56
  *
59
57
  * Stores an array of ids of `<calcite-tab>`s to match up ARIA attributes.
60
58
  */
@@ -116,7 +114,6 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
116
114
  //
117
115
  //--------------------------------------------------------------------------
118
116
  /**
119
- * @internal
120
117
  *
121
118
  * Matches up elements from the internal `tabs` and `titles` to automatically
122
119
  * update the ARIA attributes and link `<calcite-tab>` and
@@ -22974,14 +22974,6 @@ const Tab = class extends HTMLElement$1 {
22974
22974
  this.active = false;
22975
22975
  /** @internal Parent tabs component scale value */
22976
22976
  this.scale = "m";
22977
- //--------------------------------------------------------------------------
22978
- //
22979
- // Private State/Props
22980
- //
22981
- //--------------------------------------------------------------------------
22982
- /**
22983
- * @internal
22984
- */
22985
22977
  this.guid = `calcite-tab-title-${guid()}`;
22986
22978
  }
22987
22979
  //--------------------------------------------------------------------------
@@ -22993,12 +22985,15 @@ const Tab = class extends HTMLElement$1 {
22993
22985
  const id = this.el.id || this.guid;
22994
22986
  return (h(Host, { "aria-expanded": this.active.toString(), "aria-labelledby": this.labeledBy, id: id, role: "tabpanel" }, h("section", null, h("slot", null))));
22995
22987
  }
22988
+ connectedCallback() {
22989
+ this.parentTabsEl = this.el.closest("calcite-tabs");
22990
+ }
22996
22991
  componentDidLoad() {
22997
22992
  this.calciteTabRegister.emit();
22998
22993
  }
22999
22994
  componentWillRender() {
23000
22995
  var _a;
23001
- this.scale = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.scale;
22996
+ this.scale = (_a = this.parentTabsEl) === null || _a === void 0 ? void 0 : _a.scale;
23002
22997
  }
23003
22998
  disconnectedCallback() {
23004
22999
  var _a;
@@ -23013,10 +23008,13 @@ const Tab = class extends HTMLElement$1 {
23013
23008
  //
23014
23009
  //--------------------------------------------------------------------------
23015
23010
  tabChangeHandler(event) {
23011
+ const targetTabsEl = event
23012
+ .composedPath()
23013
+ .find((el) => el.tagName === "CALCITE-TABS");
23016
23014
  // to allow `<calcite-tabs>` to be nested we need to make sure this
23017
- // `calciteTabChange` event was actually fired from a title that is a
23018
- // child of the `<calcite-tabs>` that is the a parent of this tab.
23019
- if (!event.composedPath().includes(this.el.closest("calcite-tabs"))) {
23015
+ // `calciteTabChange` event was actually fired from a within the same
23016
+ // `<calcite-tabs>` that is the a parent of this tab.
23017
+ if (targetTabsEl !== this.parentTabsEl) {
23020
23018
  return;
23021
23019
  }
23022
23020
  if (this.tab) {
@@ -23105,6 +23103,9 @@ const TabNav = class extends HTMLElement$1 {
23105
23103
  // Lifecycle
23106
23104
  //
23107
23105
  //--------------------------------------------------------------------------
23106
+ connectedCallback() {
23107
+ this.parentTabsEl = this.el.closest("calcite-tabs");
23108
+ }
23108
23109
  componentWillLoad() {
23109
23110
  const storageKey = `calcite-tab-nav-${this.storageId}`;
23110
23111
  if (localStorage && this.storageId && localStorage.getItem(storageKey)) {
@@ -23116,11 +23117,11 @@ const TabNav = class extends HTMLElement$1 {
23116
23117
  }
23117
23118
  }
23118
23119
  componentWillRender() {
23119
- var _a, _b, _c, _d;
23120
- this.layout = (_a = this.el.closest("calcite-tabs")) === null || _a === void 0 ? void 0 : _a.layout;
23121
- this.position = (_b = this.el.closest("calcite-tabs")) === null || _b === void 0 ? void 0 : _b.position;
23122
- this.scale = (_c = this.el.closest("calcite-tabs")) === null || _c === void 0 ? void 0 : _c.scale;
23123
- this.bordered = (_d = this.el.closest("calcite-tabs")) === null || _d === void 0 ? void 0 : _d.bordered;
23120
+ const { parentTabsEl } = this;
23121
+ this.layout = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.layout;
23122
+ this.position = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.position;
23123
+ this.scale = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.scale;
23124
+ this.bordered = parentTabsEl === null || parentTabsEl === void 0 ? void 0 : parentTabsEl.bordered;
23124
23125
  // fix issue with active tab-title not lining up with blue indicator
23125
23126
  if (this.selectedTabEl) {
23126
23127
  this.updateOffsetPosition();
@@ -23263,9 +23264,6 @@ const TabTitle = class extends HTMLElement$1 {
23263
23264
  this.mutationObserver = createObserver("mutation", () => this.updateHasText());
23264
23265
  /** determine if there is slotted text for styling purposes */
23265
23266
  this.hasText = false;
23266
- /**
23267
- * @internal
23268
- */
23269
23267
  this.guid = `calcite-tab-title-${guid()}`;
23270
23268
  }
23271
23269
  activeTabChanged() {
@@ -23334,15 +23332,19 @@ const TabTitle = class extends HTMLElement$1 {
23334
23332
  //
23335
23333
  //--------------------------------------------------------------------------
23336
23334
  tabChangeHandler(event) {
23337
- if (event.composedPath().includes(this.parentTabNavEl)) {
23338
- if (this.tab) {
23339
- this.active = this.tab === event.detail.tab;
23340
- }
23341
- else {
23342
- this.getTabIndex().then((index) => {
23343
- this.active = index === event.detail.tab;
23344
- });
23345
- }
23335
+ const targetTabsEl = event
23336
+ .composedPath()
23337
+ .find((el) => el.tagName === "CALCITE-TABS");
23338
+ if (targetTabsEl !== this.parentTabsEl) {
23339
+ return;
23340
+ }
23341
+ if (this.tab) {
23342
+ this.active = this.tab === event.detail.tab;
23343
+ }
23344
+ else {
23345
+ this.getTabIndex().then((index) => {
23346
+ this.active = index === event.detail.tab;
23347
+ });
23346
23348
  }
23347
23349
  }
23348
23350
  onClick() {
@@ -23460,14 +23462,12 @@ const Tabs = class extends HTMLElement$1 {
23460
23462
  //
23461
23463
  //--------------------------------------------------------------------------
23462
23464
  /**
23463
- * @internal
23464
23465
  *
23465
23466
  * Stores an array of ids of `<calcite-tab-titles>`s to match up ARIA
23466
23467
  * attributes.
23467
23468
  */
23468
23469
  this.titles = [];
23469
23470
  /**
23470
- * @internal
23471
23471
  *
23472
23472
  * Stores an array of ids of `<calcite-tab>`s to match up ARIA attributes.
23473
23473
  */
@@ -23529,7 +23529,6 @@ const Tabs = class extends HTMLElement$1 {
23529
23529
  //
23530
23530
  //--------------------------------------------------------------------------
23531
23531
  /**
23532
- * @internal
23533
23532
  *
23534
23533
  * Matches up elements from the internal `tabs` and `titles` to automatically
23535
23534
  * update the ARIA attributes and link `<calcite-tab>` and