@db-ux/wc-core-components 4.6.1 → 4.7.0-tabs-34782eb

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 (168) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/agent/Tabs.md +30 -30
  3. package/dist/cjs/db-accordion-item.cjs.entry.js +2 -2
  4. package/dist/cjs/db-accordion.cjs.entry.js +1 -1
  5. package/dist/cjs/db-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/db-brand.cjs.entry.js +1 -1
  7. package/dist/cjs/db-button.cjs.entry.js +1 -1
  8. package/dist/cjs/db-card.cjs.entry.js +2 -2
  9. package/dist/cjs/db-checkbox.cjs.entry.js +2 -2
  10. package/dist/cjs/db-custom-button.cjs.entry.js +2 -2
  11. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +9 -9
  12. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +2 -2
  13. package/dist/cjs/db-custom-select.cjs.entry.js +5 -5
  14. package/dist/cjs/db-divider.cjs.entry.js +1 -1
  15. package/dist/cjs/db-drawer.cjs.entry.js +3 -3
  16. package/dist/cjs/db-header.cjs.entry.js +2 -2
  17. package/dist/cjs/db-icon.cjs.entry.js +1 -1
  18. package/dist/cjs/db-infotext.cjs.entry.js +1 -1
  19. package/dist/cjs/db-link.cjs.entry.js +1 -1
  20. package/dist/cjs/db-navigation-item.cjs.entry.js +1 -1
  21. package/dist/cjs/db-navigation.cjs.entry.js +2 -2
  22. package/dist/cjs/db-notification.cjs.entry.js +2 -2
  23. package/dist/cjs/db-page.cjs.entry.js +2 -2
  24. package/dist/cjs/db-popover.cjs.entry.js +2 -2
  25. package/dist/cjs/db-radio.cjs.entry.js +1 -1
  26. package/dist/cjs/db-section.cjs.entry.js +2 -2
  27. package/dist/cjs/db-select.cjs.entry.js +2 -2
  28. package/dist/cjs/db-stack.cjs.entry.js +2 -2
  29. package/dist/cjs/db-switch.cjs.entry.js +2 -2
  30. package/dist/cjs/db-tab-item_3.cjs.entry.js +133 -67
  31. package/dist/cjs/db-tabs.cjs.entry.js +373 -123
  32. package/dist/cjs/db-textarea.cjs.entry.js +2 -2
  33. package/dist/cjs/db-tooltip.cjs.entry.js +3 -4
  34. package/dist/cjs/db-ux.cjs.js +1 -1
  35. package/dist/cjs/index.cjs.js +2 -2
  36. package/dist/cjs/loader.cjs.js +1 -1
  37. package/dist/collection/components/accordion/accordion.js +1 -1
  38. package/dist/collection/components/accordion-item/accordion-item.js +2 -2
  39. package/dist/collection/components/badge/badge.js +1 -1
  40. package/dist/collection/components/brand/brand.js +1 -1
  41. package/dist/collection/components/button/button.js +1 -1
  42. package/dist/collection/components/card/card.js +2 -2
  43. package/dist/collection/components/checkbox/checkbox.js +2 -2
  44. package/dist/collection/components/custom-button/custom-button.js +2 -2
  45. package/dist/collection/components/custom-select/custom-select.js +5 -5
  46. package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +2 -2
  47. package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +2 -2
  48. package/dist/collection/components/custom-select-list/custom-select-list.js +2 -2
  49. package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +1 -1
  50. package/dist/collection/components/divider/divider.js +1 -1
  51. package/dist/collection/components/drawer/drawer.js +3 -3
  52. package/dist/collection/components/header/header.js +2 -2
  53. package/dist/collection/components/icon/icon.js +1 -1
  54. package/dist/collection/components/infotext/infotext.js +1 -1
  55. package/dist/collection/components/input/input.js +2 -2
  56. package/dist/collection/components/link/link.js +1 -1
  57. package/dist/collection/components/navigation/navigation.js +2 -2
  58. package/dist/collection/components/navigation-item/navigation-item.js +1 -1
  59. package/dist/collection/components/notification/notification.js +2 -2
  60. package/dist/collection/components/page/page.js +2 -2
  61. package/dist/collection/components/popover/popover.js +2 -2
  62. package/dist/collection/components/radio/radio.js +1 -1
  63. package/dist/collection/components/section/section.js +2 -2
  64. package/dist/collection/components/select/select.js +2 -2
  65. package/dist/collection/components/stack/stack.js +2 -2
  66. package/dist/collection/components/switch/switch.js +2 -2
  67. package/dist/collection/components/tab-item/tab-item.js +198 -129
  68. package/dist/collection/components/tab-list/tab-list.js +74 -12
  69. package/dist/collection/components/tab-panel/tab-panel.js +80 -2
  70. package/dist/collection/components/tabs/tabs.js +504 -167
  71. package/dist/collection/components/tag/tag.js +2 -2
  72. package/dist/collection/components/textarea/textarea.js +2 -2
  73. package/dist/collection/components/tooltip/tooltip.js +3 -4
  74. package/dist/collection/shared/model.js +1 -1
  75. package/dist/custom-elements.json +4021 -3053
  76. package/dist/db-ux/db-ux.esm.js +1 -1
  77. package/dist/db-ux/index.esm.js +1 -1
  78. package/dist/db-ux/{p-2355324e.entry.js → p-01c278b9.entry.js} +1 -1
  79. package/dist/db-ux/{p-5f5eb78d.entry.js → p-071ae423.entry.js} +1 -1
  80. package/dist/db-ux/{p-abb0885d.entry.js → p-07c7ecc9.entry.js} +1 -1
  81. package/dist/db-ux/p-10869bfa.entry.js +1 -0
  82. package/dist/db-ux/p-1427bb15.entry.js +1 -0
  83. package/dist/db-ux/{p-70823b80.entry.js → p-328faf6b.entry.js} +1 -1
  84. package/dist/db-ux/p-397bc590.entry.js +1 -0
  85. package/dist/db-ux/{p-d85b1c15.entry.js → p-43a9623f.entry.js} +1 -1
  86. package/dist/db-ux/{p-67d59d5b.entry.js → p-44a0407b.entry.js} +1 -1
  87. package/dist/db-ux/{p-12a2c502.entry.js → p-61784f7a.entry.js} +1 -1
  88. package/dist/db-ux/p-68835a75.entry.js +1 -0
  89. package/dist/db-ux/p-68a995df.entry.js +1 -0
  90. package/dist/db-ux/{p-a65d0d23.entry.js → p-6c26b0ba.entry.js} +1 -1
  91. package/dist/db-ux/p-6e898a58.entry.js +1 -0
  92. package/dist/db-ux/{p-761c9ddf.entry.js → p-70e6d32f.entry.js} +1 -1
  93. package/dist/db-ux/p-71868bb5.entry.js +1 -0
  94. package/dist/db-ux/{p-bed8d029.entry.js → p-74a45768.entry.js} +1 -1
  95. package/dist/db-ux/{p-ba8464d2.entry.js → p-9a895c18.entry.js} +1 -1
  96. package/dist/db-ux/p-9b4d0c18.entry.js +1 -0
  97. package/dist/db-ux/{p-0e0c3c72.entry.js → p-9b518eb4.entry.js} +1 -1
  98. package/dist/db-ux/p-a927fe88.entry.js +1 -0
  99. package/dist/db-ux/p-a93ca690.entry.js +1 -0
  100. package/dist/db-ux/{p-212bde1e.entry.js → p-b06fe221.entry.js} +1 -1
  101. package/dist/db-ux/{p-13157b54.entry.js → p-b7087f0b.entry.js} +1 -1
  102. package/dist/db-ux/{p-d8b38722.entry.js → p-d93b9d58.entry.js} +1 -1
  103. package/dist/db-ux/p-d97c0787.entry.js +1 -0
  104. package/dist/db-ux/{p-c76089f6.entry.js → p-ee43015b.entry.js} +1 -1
  105. package/dist/db-ux/p-efde1b6e.entry.js +1 -0
  106. package/dist/db-ux/{p-5cb74480.entry.js → p-f08b14d9.entry.js} +1 -1
  107. package/dist/db-ux/p-f92cbbae.entry.js +1 -0
  108. package/dist/db-ux/{p-980a6afe.entry.js → p-ffe614c8.entry.js} +1 -1
  109. package/dist/esm/db-accordion-item.entry.js +2 -2
  110. package/dist/esm/db-accordion.entry.js +1 -1
  111. package/dist/esm/db-badge.entry.js +1 -1
  112. package/dist/esm/db-brand.entry.js +1 -1
  113. package/dist/esm/db-button.entry.js +1 -1
  114. package/dist/esm/db-card.entry.js +2 -2
  115. package/dist/esm/db-checkbox.entry.js +2 -2
  116. package/dist/esm/db-custom-button.entry.js +2 -2
  117. package/dist/esm/db-custom-select-dropdown_5.entry.js +9 -9
  118. package/dist/esm/db-custom-select-form-field.entry.js +2 -2
  119. package/dist/esm/db-custom-select.entry.js +5 -5
  120. package/dist/esm/db-divider.entry.js +1 -1
  121. package/dist/esm/db-drawer.entry.js +3 -3
  122. package/dist/esm/db-header.entry.js +2 -2
  123. package/dist/esm/db-icon.entry.js +1 -1
  124. package/dist/esm/db-infotext.entry.js +1 -1
  125. package/dist/esm/db-link.entry.js +1 -1
  126. package/dist/esm/db-navigation-item.entry.js +1 -1
  127. package/dist/esm/db-navigation.entry.js +2 -2
  128. package/dist/esm/db-notification.entry.js +2 -2
  129. package/dist/esm/db-page.entry.js +2 -2
  130. package/dist/esm/db-popover.entry.js +2 -2
  131. package/dist/esm/db-radio.entry.js +1 -1
  132. package/dist/esm/db-section.entry.js +2 -2
  133. package/dist/esm/db-select.entry.js +2 -2
  134. package/dist/esm/db-stack.entry.js +2 -2
  135. package/dist/esm/db-switch.entry.js +2 -2
  136. package/dist/esm/db-tab-item_3.entry.js +134 -68
  137. package/dist/esm/db-tabs.entry.js +373 -123
  138. package/dist/esm/db-textarea.entry.js +2 -2
  139. package/dist/esm/db-tooltip.entry.js +4 -5
  140. package/dist/esm/db-ux.js +1 -1
  141. package/dist/esm/index.js +2 -2
  142. package/dist/esm/loader.js +1 -1
  143. package/dist/types/components/tab-item/model.d.ts +28 -11
  144. package/dist/types/components/tab-item/tab-item.d.ts +22 -20
  145. package/dist/types/components/tab-list/model.d.ts +15 -5
  146. package/dist/types/components/tab-list/tab-list.d.ts +4 -1
  147. package/dist/types/components/tab-panel/model.d.ts +13 -3
  148. package/dist/types/components/tab-panel/tab-panel.d.ts +3 -0
  149. package/dist/types/components/tabs/model.d.ts +51 -17
  150. package/dist/types/components/tabs/tabs.d.ts +35 -16
  151. package/dist/types/components.d.ts +80 -30
  152. package/dist/types/shared/model.d.ts +5 -5
  153. package/dist/vscode.html-custom-data.json +153 -59
  154. package/dist/web-types.json +297 -135
  155. package/package.json +3 -3
  156. package/dist/db-ux/p-202323c2.entry.js +0 -1
  157. package/dist/db-ux/p-21068628.entry.js +0 -1
  158. package/dist/db-ux/p-377987d0.entry.js +0 -1
  159. package/dist/db-ux/p-3d5d49ff.entry.js +0 -1
  160. package/dist/db-ux/p-452a8b6b.entry.js +0 -1
  161. package/dist/db-ux/p-4de2c697.entry.js +0 -1
  162. package/dist/db-ux/p-605013f0.entry.js +0 -1
  163. package/dist/db-ux/p-6f9e146e.entry.js +0 -1
  164. package/dist/db-ux/p-7fa91164.entry.js +0 -1
  165. package/dist/db-ux/p-8e84712d.entry.js +0 -1
  166. package/dist/db-ux/p-a9efbb0b.entry.js +0 -1
  167. package/dist/db-ux/p-bd66d144.entry.js +0 -1
  168. package/dist/db-ux/p-dd08f6e4.entry.js +0 -1
@@ -6,130 +6,321 @@ import { h, Fragment, } from "@stencil/core";
6
6
  */
7
7
  export class DBTabs {
8
8
  constructor() {
9
- this._name = "";
9
+ this.tabItemAlignment = "start";
10
+ this.tabItemWidth = "auto";
11
+ this.scrollStartLabel = "Scroll start";
12
+ this.scrollEndLabel = "Scroll end";
13
+ this._generatedId = "tabs-" + uuid();
14
+ this._generatedName = uuid();
15
+ this.activeTabIndex = 0;
10
16
  this.initialized = false;
11
- this.showScrollLeft = false;
12
- this.showScrollRight = false;
13
- this.scrollContainer = null;
14
- this._resizeObserver = undefined;
17
+ this.showScrollStart = false;
18
+ this.showScrollEnd = false;
19
+ this._resizeObserver = null;
20
+ this._observer = null;
21
+ this._pendingRafId = null;
22
+ this._scrollListener = null;
23
+ this._cachedTabs = [];
15
24
  }
16
- convertTabs() {
25
+ _id() {
26
+ return this.id || this._generatedId;
27
+ }
28
+ _name() {
29
+ return "tabs-" + (this.name || this._generatedName);
30
+ }
31
+ getTabId(index) {
32
+ return `${this._name()}-tab-${index}`;
33
+ }
34
+ getPanelId(index) {
35
+ return `${this._name()}-tab-panel-${index}`;
36
+ }
37
+ activateTab(index) {
38
+ var _a, _b, _c;
39
+ // Prevent activating a disabled tab
40
+ if (this._ref) {
41
+ const tabList = this._ref.querySelector('[role="tablist"]');
42
+ if (tabList) {
43
+ const tabs = Array.from(tabList.querySelectorAll('[role="tab"]'));
44
+ const tab = tabs[index];
45
+ if ((tab === null || tab === void 0 ? void 0 : tab.disabled) || (tab === null || tab === void 0 ? void 0 : tab.getAttribute("aria-disabled")) === "true") {
46
+ return;
47
+ }
48
+ }
49
+ }
50
+ if (this.activeTabIndex !== index) {
51
+ this.activeTabIndex = index;
52
+ if (this.indexChange) {
53
+ this.indexChange.emit(index);
54
+ }
55
+ // Emit value of the newly active tab item if value props are set
56
+ if (this.valueChange) {
57
+ const tabList = (_a = this._ref) === null || _a === void 0 ? void 0 : _a.querySelector('[role="tablist"]');
58
+ const tabs = tabList
59
+ ? Array.from(tabList.querySelectorAll('[role="tab"]'))
60
+ : [];
61
+ const value = (_c = (_b = tabs[index]) === null || _b === void 0 ? void 0 : _b.dataset) === null || _c === void 0 ? void 0 : _c["value"];
62
+ this.valueChange.emit(value);
63
+ }
64
+ this.initTabs(index);
65
+ }
66
+ }
67
+ handleClick(event) {
68
+ var _a;
69
+ // In props-mode (props.tabs), tab activation is handled via onClick on each DBTabItem directly.
70
+ // In slot-mode (!props.tabs), clicks bubble up and are handled here via DOM traversal.
71
+ if (this.tabs) {
72
+ return;
73
+ }
74
+ const target = event.target;
75
+ const button = target.closest('[role="tab"]');
76
+ if (!button || !this._ref)
77
+ return;
78
+ const tabList = (_a = this._ref) === null || _a === void 0 ? void 0 : _a.querySelector('[role="tablist"]');
79
+ if (!tabList)
80
+ return;
81
+ const buttons = Array.from(tabList.querySelectorAll('[role="tab"]'));
82
+ const index = buttons.indexOf(button);
83
+ if (index !== -1) {
84
+ event.preventDefault();
85
+ this.activateTab(index);
86
+ }
87
+ }
88
+ handleKeyDown(event) {
89
+ var _a;
90
+ if (!this._ref)
91
+ return;
92
+ const key = event.key;
93
+ const navigationKeys = [
94
+ "ArrowRight",
95
+ "ArrowDown",
96
+ "ArrowLeft",
97
+ "ArrowUp",
98
+ "Home",
99
+ "End",
100
+ "Enter",
101
+ " ",
102
+ ];
103
+ if (!navigationKeys.includes(key)) {
104
+ return;
105
+ }
106
+ const tabList = this._ref.querySelector('[role="tablist"]');
107
+ if (!tabList)
108
+ return;
109
+ const buttons = Array.from(tabList.querySelectorAll('[role="tab"]'));
110
+ // find currently focused element within the buttons list
111
+ let currentIndex = -1;
112
+ if (typeof document !== "undefined") {
113
+ // Traverse Shadow DOM boundaries to find the truly focused element.
114
+ // document.activeElement only returns the shadow host when focus is inside a Shadow DOM,
115
+ // so we must walk through each shadowRoot to reach the actual focused element.
116
+ let activeEl = document.activeElement;
117
+ while ((_a = activeEl === null || activeEl === void 0 ? void 0 : activeEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) {
118
+ activeEl = activeEl.shadowRoot.activeElement;
119
+ }
120
+ if (activeEl) {
121
+ const focusedButton = activeEl.closest('[role="tab"]');
122
+ if (focusedButton) {
123
+ currentIndex = buttons.indexOf(focusedButton);
124
+ }
125
+ }
126
+ }
127
+ if (currentIndex === -1) {
128
+ currentIndex = this.activeTabIndex;
129
+ }
130
+ if (buttons.length > 0) {
131
+ // handle activation (enter / space) -> change panel
132
+ if (key === "Enter" || key === " ") {
133
+ event.preventDefault();
134
+ this.activateTab(currentIndex);
135
+ return;
136
+ }
137
+ // handle navigation (arrows) -> moves focus
138
+ let nextIndex;
139
+ const length = buttons.length;
140
+ if (key === "ArrowRight" || key === "ArrowDown") {
141
+ nextIndex = (currentIndex + 1) % length;
142
+ }
143
+ else if (key === "ArrowLeft" || key === "ArrowUp") {
144
+ nextIndex = (currentIndex - 1 + length) % length;
145
+ }
146
+ else if (key === "Home") {
147
+ nextIndex = 0;
148
+ }
149
+ else if (key === "End") {
150
+ nextIndex = length - 1;
151
+ }
152
+ if (nextIndex !== undefined) {
153
+ event.preventDefault();
154
+ // Skip disabled tabs when navigating with arrow keys
155
+ const isForward = key === "ArrowRight" || key === "ArrowDown";
156
+ const maxAttempts = length;
157
+ for (let i = 0; i < maxAttempts; i++) {
158
+ const candidate = buttons[nextIndex];
159
+ if (!(candidate === null || candidate === void 0 ? void 0 : candidate.disabled) &&
160
+ (candidate === null || candidate === void 0 ? void 0 : candidate.getAttribute("aria-disabled")) !== "true") {
161
+ break;
162
+ }
163
+ if (isForward) {
164
+ nextIndex = (nextIndex + 1) % length;
165
+ }
166
+ else {
167
+ nextIndex = (nextIndex - 1 + length) % length;
168
+ }
169
+ }
170
+ // do not activateTab here for manual activation, just move the focus
171
+ const nextButton = buttons[nextIndex];
172
+ if (nextButton &&
173
+ !nextButton.disabled &&
174
+ nextButton.getAttribute("aria-disabled") !== "true") {
175
+ nextButton.focus();
176
+ }
177
+ }
178
+ }
179
+ }
180
+ isIndexActive(index) {
181
+ return this.activeTabIndex === Number(index);
182
+ }
183
+ getTabItemTabIndex(index) {
184
+ const i = Number(index);
185
+ // only the active tab should be reachable via Tab key
186
+ return this.activeTabIndex === i || (this.activeTabIndex === -1 && i === 0)
187
+ ? 0
188
+ : -1;
189
+ }
190
+ _updateCachedTabs() {
17
191
  try {
18
192
  if (typeof this.tabs === "string") {
19
- return JSON.parse(this.tabs);
193
+ this._cachedTabs = JSON.parse(this.tabs);
194
+ }
195
+ else if (this.tabs) {
196
+ this._cachedTabs = this.tabs;
197
+ }
198
+ else {
199
+ this._cachedTabs = [];
20
200
  }
21
- return this.tabs;
22
201
  }
23
202
  catch (error) {
24
203
  console.error(error);
204
+ this._cachedTabs = [];
25
205
  }
26
- return [];
206
+ }
207
+ _getScrollContainer() {
208
+ var _a, _b;
209
+ return (_b = (_a = this._ref) === null || _a === void 0 ? void 0 : _a.querySelector('[role="tablist"]')) !== null && _b !== void 0 ? _b : null;
210
+ }
211
+ _isRtl() {
212
+ const container = this._getScrollContainer();
213
+ return (!!container &&
214
+ typeof getComputedStyle !== "undefined" &&
215
+ getComputedStyle(container).direction === "rtl");
27
216
  }
28
217
  evaluateScrollButtons(tList) {
29
218
  const needsScroll = tList.scrollWidth > tList.clientWidth;
30
- this.showScrollLeft = needsScroll && tList.scrollLeft > 1;
31
- this.showScrollRight =
32
- needsScroll && tList.scrollLeft < tList.scrollWidth - tList.clientWidth;
219
+ if (!needsScroll) {
220
+ this.showScrollStart = false;
221
+ this.showScrollEnd = false;
222
+ return;
223
+ }
224
+ const scrollPos = Math.abs(tList.scrollLeft);
225
+ const maxScroll = tList.scrollWidth - tList.clientWidth;
226
+ const tolerance = 2;
227
+ // scrollPos=0 means "at inline-start" in both LTR and RTL
228
+ this.showScrollStart = scrollPos > tolerance;
229
+ this.showScrollEnd = scrollPos < maxScroll - tolerance;
33
230
  }
34
- scroll(left) {
35
- var _a;
36
- let step = Number(this.arrowScrollDistance) || 100;
37
- if (left) {
231
+ scroll(toStart) {
232
+ const container = this._getScrollContainer();
233
+ if (!container) {
234
+ return;
235
+ }
236
+ let step = Number(this.arrowScrollDistance) || 120;
237
+ const isLeft = !!toStart;
238
+ const isRtl = this._isRtl();
239
+ // Map logical direction (start/end) to physical direction.
240
+ // In LTR: toStart=true → scroll left (negative), toEnd → scroll right (positive).
241
+ // In RTL: directions are inverted physically.
242
+ if (isLeft !== isRtl) {
38
243
  step *= -1;
39
244
  }
40
- (_a = this.scrollContainer) === null || _a === void 0 ? void 0 : _a.scrollBy({
41
- top: 0,
245
+ container.scrollBy({
42
246
  left: step,
43
247
  behavior: "smooth",
44
248
  });
45
249
  }
46
250
  initTabList() {
251
+ var _a, _b;
47
252
  if (this._ref) {
48
- const tabList = this._ref.querySelector(".db-tab-list");
49
- if (tabList) {
50
- const container = tabList.querySelector('[role="tablist"]');
51
- if (container) {
52
- container.setAttribute("aria-orientation", this.orientation || "horizontal");
53
- if (this.behavior === "arrows") {
54
- this.scrollContainer = container;
55
- this.evaluateScrollButtons(container);
56
- container.addEventListener("scroll", () => {
253
+ const container = this._ref.querySelector('[role="tablist"]');
254
+ if (container) {
255
+ if (!container.getAttribute("aria-orientation")) {
256
+ container.setAttribute("aria-orientation", (_a = this.orientation) !== null && _a !== void 0 ? _a : "horizontal");
257
+ }
258
+ if (this.behavior === "arrows") {
259
+ this.evaluateScrollButtons(container);
260
+ const _listener = this._scrollListener;
261
+ if (_listener && container) {
262
+ container.removeEventListener("scroll", _listener.fn);
263
+ this._scrollListener = null;
264
+ }
265
+ const onScroll = () => this.evaluateScrollButtons(container);
266
+ this._scrollListener = {
267
+ fn: onScroll,
268
+ };
269
+ container.addEventListener("scroll", onScroll);
270
+ if (!this._resizeObserver) {
271
+ const observer = new ResizeObserver(() => {
57
272
  this.evaluateScrollButtons(container);
58
273
  });
59
- // Use ResizeObserver to re-evaluate scroll buttons because it provides more accurate, container-specific resize detection than global window resize events.
60
- if (!this._resizeObserver) {
61
- const observer = new ResizeObserver(() => {
62
- this.evaluateScrollButtons(container);
63
- });
64
- observer.observe(container);
65
- this._resizeObserver = observer;
66
- }
274
+ observer.observe(container);
275
+ this._resizeObserver = observer;
67
276
  }
68
277
  }
278
+ if (this.name && !container.getAttribute("aria-label")) {
279
+ container.setAttribute("aria-label", (_b = this.name) !== null && _b !== void 0 ? _b : "");
280
+ }
69
281
  }
70
282
  }
71
283
  }
72
- initTabs(init) {
284
+ initTabs(activeIndex) {
285
+ var _a, _b;
286
+ const currentIndex = activeIndex !== undefined ? activeIndex : this.activeTabIndex;
73
287
  if (this._ref) {
74
- const tabItems = Array.from(this._ref.getElementsByClassName("db-tab-item"));
75
- const tabPanels = Array.from(this._ref.querySelectorAll(":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)"));
76
- for (const tabItem of tabItems) {
77
- const index = tabItems.indexOf(tabItem);
78
- const label = tabItem.querySelector("label");
79
- const input = tabItem.querySelector("input");
80
- if (input && label) {
81
- if (!input.id) {
82
- const tabId = `${this._name}-tab-${index}`;
83
- label.setAttribute("for", tabId);
84
- input.id = tabId;
85
- input.setAttribute("name", this._name);
86
- if (tabPanels.length > index) {
87
- input.setAttribute("aria-controls", `${this._name}-tab-panel-${index}`);
88
- }
89
- }
90
- if (init) {
91
- // Auto select
92
- const autoSelect = !this.initialSelectedMode || this.initialSelectedMode === "auto";
93
- const shouldAutoSelect = (this.initialSelectedIndex == null && index === 0) ||
94
- Number(this.initialSelectedIndex) === index;
95
- if (autoSelect && shouldAutoSelect) {
96
- input.click();
97
- }
98
- }
288
+ const tabListEl = this._ref.querySelector('[role="tablist"]');
289
+ const panels = Array.from((_b = (_a = this._ref) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[role="tabpanel"]')) !== null && _b !== void 0 ? _b : []).filter((panel) => panel.closest(".db-tabs") === this._ref);
290
+ if (!tabListEl)
291
+ return;
292
+ const buttons = Array.from(tabListEl.querySelectorAll('[role="tab"]'));
293
+ buttons.forEach((button, index) => {
294
+ const isSelected = currentIndex === index;
295
+ const panel = panels[index];
296
+ const tabId = button.id || this.getTabId(index);
297
+ const panelId = (panel === null || panel === void 0 ? void 0 : panel.id) || this.getPanelId(index);
298
+ if (!button.id) {
299
+ button.id = tabId;
99
300
  }
100
- }
101
- for (const panel of tabPanels) {
102
- if (panel.id)
103
- continue;
104
- const index = tabPanels.indexOf(panel);
105
- panel.id = `${this._name}-tab-panel-${index}`;
106
- panel.setAttribute("aria-labelledby", `${this._name}-tab-${index}`);
107
- }
108
- }
109
- }
110
- handleChange(event) {
111
- var _a;
112
- event.stopPropagation();
113
- if (event.target) {
114
- const target = event.target;
115
- const parent = target.parentElement;
116
- if (parent &&
117
- parent.parentElement &&
118
- ((_a = parent.parentElement) === null || _a === void 0 ? void 0 : _a.nodeName) === "LI") {
119
- const tabItem = parent.parentElement.parentElement;
120
- if (tabItem) {
121
- const list = tabItem.parentElement;
122
- if (list) {
123
- const tabIndex = Array.from(list.children).indexOf(tabItem);
124
- if (this.indexChange) {
125
- this.indexChange.emit(tabIndex);
126
- }
127
- if (this.tabSelect) {
128
- this.tabSelect.emit(event);
129
- }
301
+ if (!button.getAttribute("aria-controls")) {
302
+ button.setAttribute("aria-controls", panelId);
303
+ }
304
+ button.dispatchEvent(new CustomEvent("aria-selected-changed", {
305
+ detail: {
306
+ selected: isSelected,
307
+ tabIndex: currentIndex === index || (currentIndex === -1 && index === 0)
308
+ ? 0
309
+ : -1,
310
+ },
311
+ }));
312
+ if (panel) {
313
+ if (!panel.id) {
314
+ panel.id = panelId;
130
315
  }
316
+ if (!panel.getAttribute("aria-label") &&
317
+ !panel.getAttribute("aria-labelledby")) {
318
+ panel.setAttribute("aria-labelledby", tabId);
319
+ }
320
+ // toggle visibility
321
+ panel.hidden = !isSelected;
131
322
  }
132
- }
323
+ });
133
324
  }
134
325
  }
135
326
  /**
@@ -169,51 +360,162 @@ export class DBTabs {
169
360
  }
170
361
  }
171
362
  watch0Fn() {
172
- if (this._ref && this.initialized) {
173
- this.initTabList();
174
- this.initTabs(true);
175
- const tabList = this._ref.querySelector(".db-tab-list");
176
- if (tabList) {
177
- const observer = new MutationObserver((mutations) => {
178
- mutations.forEach((mutation) => {
179
- if (mutation.removedNodes.length || mutation.addedNodes.length) {
180
- this.initTabList();
181
- this.initTabs();
182
- }
183
- });
184
- });
185
- observer.observe(tabList, {
186
- childList: true,
187
- subtree: true,
188
- });
189
- }
190
- this.initialized = false;
191
- }
363
+ this._updateCachedTabs();
192
364
  }
193
365
  watch0() {
194
366
  this.watch0Fn();
195
367
  }
368
+ watch1Fn() {
369
+ if (this.activeIndex !== undefined) {
370
+ const newIndex = Number(this.activeIndex);
371
+ if (!isNaN(newIndex) && newIndex !== this.activeTabIndex) {
372
+ this.activateTab(newIndex);
373
+ }
374
+ }
375
+ }
376
+ watch1() {
377
+ this.watch1Fn();
378
+ }
196
379
  componentDidLoad() {
197
380
  this.enableAttributePassing(this._ref, "db-tabs");
198
- this._name = `tabs-${this.name || uuid()}`;
381
+ // 1. Calculate final start index synchronously to avoid race conditions
382
+ let startIndex = 0;
383
+ if (this.initialSelectedIndex !== undefined) {
384
+ const parsedIndex = Number(this.initialSelectedIndex);
385
+ startIndex = isNaN(parsedIndex) ? 0 : parsedIndex;
386
+ }
387
+ else if (this.initialSelectedMode === "manually") {
388
+ startIndex = -1;
389
+ }
390
+ // 2. Support deep linking: URL hash takes precedence over initial index
391
+ if (typeof window !== "undefined" && window.location.hash) {
392
+ const hashId = window.location.hash.substring(1);
393
+ const name = this.name ? "tabs-" + this.name : this._name();
394
+ const prefix = `${name}-tab-`;
395
+ if (hashId.startsWith(prefix)) {
396
+ const indexStr = hashId.replace(prefix, "");
397
+ const index = parseInt(indexStr, 10);
398
+ if (!isNaN(index)) {
399
+ startIndex = index;
400
+ }
401
+ }
402
+ }
403
+ // 3. Set initial state synchronously
404
+ this.activeTabIndex = startIndex;
199
405
  this.initialized = true;
406
+ this._updateCachedTabs();
407
+ // 4. Trigger single initial DOM update after paint
408
+ if (typeof window !== "undefined") {
409
+ requestAnimationFrame(() => {
410
+ this.initTabList();
411
+ this.initTabs(startIndex);
412
+ });
413
+ }
414
+ if (this._ref) {
415
+ const tabListEl = this._ref.querySelector('[role="tablist"]');
416
+ if (tabListEl) {
417
+ const observer = new MutationObserver(() => {
418
+ const rafId = this._pendingRafId;
419
+ if (rafId !== null)
420
+ cancelAnimationFrame(rafId);
421
+ this._pendingRafId = requestAnimationFrame(() => {
422
+ this._pendingRafId = null;
423
+ this.initTabList();
424
+ this.initTabs(this.activeTabIndex);
425
+ });
426
+ });
427
+ // Observe only the tablist (not panel content) to avoid unnecessary
428
+ // re-evaluations when user content inside panels changes.
429
+ // childList only – attribute changes (set by initTabs) are not observed, preventing infinite loops.
430
+ observer.observe(tabListEl, {
431
+ childList: true,
432
+ subtree: true,
433
+ });
434
+ this._observer = observer;
435
+ }
436
+ }
200
437
  this.watch0Fn();
438
+ this.watch1Fn();
201
439
  }
202
440
  disconnectedCallback() {
203
- var _a;
441
+ var _a, _b;
442
+ const rafId = this._pendingRafId;
443
+ if (rafId !== null) {
444
+ cancelAnimationFrame(rafId);
445
+ this._pendingRafId = null;
446
+ }
447
+ const _listener = this._scrollListener;
448
+ const _container = this._getScrollContainer();
449
+ if (_listener && _container) {
450
+ _container.removeEventListener("scroll", _listener.fn);
451
+ }
204
452
  (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
205
- this._resizeObserver = undefined;
453
+ this._resizeObserver = null;
454
+ (_b = this._observer) === null || _b === void 0 ? void 0 : _b.disconnect();
455
+ this._observer = null;
206
456
  }
207
457
  render() {
208
- var _a, _b, _c, _d, _e, _f;
209
- return (h("div", { key: '20d8d662866ff60717de87ad4deb98a3b647672a', class: cls("db-tabs", this.className), ref: (el) => {
458
+ var _a, _b, _c, _d, _e;
459
+ return (h("div", { key: '8d9608e7d9255b3bc138ee4c50f1fdfb0b09ba72', class: cls("db-tabs", this.className), ref: (el) => {
210
460
  this._ref = el;
211
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-alignment": (_c = this.alignment) !== null && _c !== void 0 ? _c : "start", "data-width": (_d = this.width) !== null && _d !== void 0 ? _d : "auto", onInput: (event) => this.handleChange(event), onChange: (event) => this.handleChange(event) }, this.showScrollLeft ? (h("db-button", { class: "tabs-scroll-left", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, "Scroll left")) : null, this.tabs ? (h(Fragment, null, h("db-tab-list", null, (_e = this.convertTabs()) === null || _e === void 0 ? void 0 : _e.map((tab, index) => (h("db-tab-item", { key: this.name + "tab-item" + index, active: tab.active, label: tab.label, iconTrailing: tab.iconTrailing, icon: tab.icon, noText: tab.noText })))), (_f = this.convertTabs()) === null || _f === void 0 ? void 0 :
212
- _f.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: 'f9803a647f9a01adc0b20eb6bdb999f38c3602af' })));
461
+ }, id: (_c = (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : this._id(), "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-tab-item-alignment": this.tabItemAlignment, "data-tab-item-width": this.tabItemWidth, onClick: (event) => this.handleClick(event), onKeyDown: (event) => this.handleKeyDown(event) }, this.showScrollStart ? (h("db-button", { class: "tabs-scroll-start", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, this.scrollStartLabel)) : null, this.tabs ? (h(Fragment, null, h("db-tab-list", { orientation: this.orientation, ariaLabel: this.name }, (_d = this._cachedTabs) === null || _d === void 0 ? void 0 : _d.map((tab, index) => (h("db-tab-item", { key: this.name + "tab-item" + index, id: this.getTabId(index), ariaControls: this.getPanelId(index), active: this.isIndexActive(index), tabIndex: this.getTabItemTabIndex(index), label: tab.label, iconTrailing: tab.iconTrailing, icon: tab.icon, noText: tab.noText, onClick: () => this.activateTab(index) })))), (_e = this._cachedTabs) === null || _e === void 0 ? void 0 :
462
+ _e.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, id: this.getPanelId(index), ariaLabelledby: this.getTabId(index), content: tab.content, hidden: !this.isIndexActive(index) }, tab.children))))) : null, !this.tabs ? h("slot", null) : null, this.showScrollEnd ? (h("db-button", { class: "tabs-scroll-end", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll(false) }, this.scrollEndLabel)) : null));
213
463
  }
214
464
  static get is() { return "db-tabs"; }
215
465
  static get properties() {
216
466
  return {
467
+ "initialSelectedIndex": {
468
+ "type": "any",
469
+ "mutable": false,
470
+ "complexType": {
471
+ "original": "DBTabsProps[\"initialSelectedIndex\"]",
472
+ "resolved": "number | string",
473
+ "references": {
474
+ "DBTabsProps": {
475
+ "location": "import",
476
+ "path": "./model",
477
+ "id": "src/components/tabs/model.ts::DBTabsProps",
478
+ "referenceLocation": "DBTabsProps"
479
+ }
480
+ }
481
+ },
482
+ "required": false,
483
+ "optional": false,
484
+ "docs": {
485
+ "tags": [],
486
+ "text": ""
487
+ },
488
+ "getter": false,
489
+ "setter": false,
490
+ "reflect": false,
491
+ "attribute": "initial-selected-index"
492
+ },
493
+ "initialSelectedMode": {
494
+ "type": "string",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "DBTabsProps[\"initialSelectedMode\"]",
498
+ "resolved": "\"auto\" | \"manually\"",
499
+ "references": {
500
+ "DBTabsProps": {
501
+ "location": "import",
502
+ "path": "./model",
503
+ "id": "src/components/tabs/model.ts::DBTabsProps",
504
+ "referenceLocation": "DBTabsProps"
505
+ }
506
+ }
507
+ },
508
+ "required": false,
509
+ "optional": false,
510
+ "docs": {
511
+ "tags": [],
512
+ "text": ""
513
+ },
514
+ "getter": false,
515
+ "setter": false,
516
+ "reflect": false,
517
+ "attribute": "initial-selected-mode"
518
+ },
217
519
  "name": {
218
520
  "type": "string",
219
521
  "mutable": false,
@@ -266,11 +568,11 @@ export class DBTabs {
266
568
  "reflect": false,
267
569
  "attribute": "tabs"
268
570
  },
269
- "arrowScrollDistance": {
571
+ "activeIndex": {
270
572
  "type": "any",
271
573
  "mutable": false,
272
574
  "complexType": {
273
- "original": "DBTabsProps[\"arrowScrollDistance\"]",
575
+ "original": "DBTabsProps[\"activeIndex\"]",
274
576
  "resolved": "number | string",
275
577
  "references": {
276
578
  "DBTabsProps": {
@@ -290,14 +592,14 @@ export class DBTabs {
290
592
  "getter": false,
291
593
  "setter": false,
292
594
  "reflect": false,
293
- "attribute": "arrow-scroll-distance"
595
+ "attribute": "active-index"
294
596
  },
295
- "orientation": {
597
+ "id": {
296
598
  "type": "string",
297
599
  "mutable": false,
298
600
  "complexType": {
299
- "original": "DBTabsProps[\"orientation\"]",
300
- "resolved": "\"horizontal\" | \"vertical\"",
601
+ "original": "DBTabsProps[\"id\"]",
602
+ "resolved": "string",
301
603
  "references": {
302
604
  "DBTabsProps": {
303
605
  "location": "import",
@@ -316,14 +618,14 @@ export class DBTabs {
316
618
  "getter": false,
317
619
  "setter": false,
318
620
  "reflect": false,
319
- "attribute": "orientation"
621
+ "attribute": "id"
320
622
  },
321
- "behavior": {
322
- "type": "string",
623
+ "arrowScrollDistance": {
624
+ "type": "any",
323
625
  "mutable": false,
324
626
  "complexType": {
325
- "original": "DBTabsProps[\"behavior\"]",
326
- "resolved": "\"arrows\" | \"scrollbar\"",
627
+ "original": "DBTabsProps[\"arrowScrollDistance\"]",
628
+ "resolved": "number | string",
327
629
  "references": {
328
630
  "DBTabsProps": {
329
631
  "location": "import",
@@ -342,14 +644,14 @@ export class DBTabs {
342
644
  "getter": false,
343
645
  "setter": false,
344
646
  "reflect": false,
345
- "attribute": "behavior"
647
+ "attribute": "arrow-scroll-distance"
346
648
  },
347
- "initialSelectedMode": {
649
+ "orientation": {
348
650
  "type": "string",
349
651
  "mutable": false,
350
652
  "complexType": {
351
- "original": "DBTabsProps[\"initialSelectedMode\"]",
352
- "resolved": "\"auto\" | \"manually\"",
653
+ "original": "DBTabsProps[\"orientation\"]",
654
+ "resolved": "\"horizontal\" | \"vertical\"",
353
655
  "references": {
354
656
  "DBTabsProps": {
355
657
  "location": "import",
@@ -368,14 +670,14 @@ export class DBTabs {
368
670
  "getter": false,
369
671
  "setter": false,
370
672
  "reflect": false,
371
- "attribute": "initial-selected-mode"
673
+ "attribute": "orientation"
372
674
  },
373
- "initialSelectedIndex": {
374
- "type": "any",
675
+ "behavior": {
676
+ "type": "string",
375
677
  "mutable": false,
376
678
  "complexType": {
377
- "original": "DBTabsProps[\"initialSelectedIndex\"]",
378
- "resolved": "number | string",
679
+ "original": "DBTabsProps[\"behavior\"]",
680
+ "resolved": "\"arrows\" | \"scrollbar\"",
379
681
  "references": {
380
682
  "DBTabsProps": {
381
683
  "location": "import",
@@ -394,13 +696,37 @@ export class DBTabs {
394
696
  "getter": false,
395
697
  "setter": false,
396
698
  "reflect": false,
397
- "attribute": "initial-selected-index"
699
+ "attribute": "behavior"
398
700
  },
399
- "id": {
701
+ "propOverrides": {
702
+ "type": "unknown",
703
+ "mutable": false,
704
+ "complexType": {
705
+ "original": "DBTabsProps[\"propOverrides\"]",
706
+ "resolved": "{ id?: string; }",
707
+ "references": {
708
+ "DBTabsProps": {
709
+ "location": "import",
710
+ "path": "./model",
711
+ "id": "src/components/tabs/model.ts::DBTabsProps",
712
+ "referenceLocation": "DBTabsProps"
713
+ }
714
+ }
715
+ },
716
+ "required": false,
717
+ "optional": false,
718
+ "docs": {
719
+ "tags": [],
720
+ "text": ""
721
+ },
722
+ "getter": false,
723
+ "setter": false
724
+ },
725
+ "className": {
400
726
  "type": "string",
401
727
  "mutable": false,
402
728
  "complexType": {
403
- "original": "DBTabsProps[\"id\"]",
729
+ "original": "DBTabsProps[\"className\"]",
404
730
  "resolved": "string",
405
731
  "references": {
406
732
  "DBTabsProps": {
@@ -420,14 +746,14 @@ export class DBTabs {
420
746
  "getter": false,
421
747
  "setter": false,
422
748
  "reflect": false,
423
- "attribute": "id"
749
+ "attribute": "classname"
424
750
  },
425
- "propOverrides": {
426
- "type": "unknown",
751
+ "tabItemAlignment": {
752
+ "type": "string",
427
753
  "mutable": false,
428
754
  "complexType": {
429
- "original": "DBTabsProps[\"propOverrides\"]",
430
- "resolved": "{ id?: string; }",
755
+ "original": "DBTabsProps[\"tabItemAlignment\"]",
756
+ "resolved": "string",
431
757
  "references": {
432
758
  "DBTabsProps": {
433
759
  "location": "import",
@@ -444,13 +770,16 @@ export class DBTabs {
444
770
  "text": ""
445
771
  },
446
772
  "getter": false,
447
- "setter": false
773
+ "setter": false,
774
+ "reflect": false,
775
+ "attribute": "tab-item-alignment",
776
+ "defaultValue": "\"start\""
448
777
  },
449
- "className": {
778
+ "tabItemWidth": {
450
779
  "type": "string",
451
780
  "mutable": false,
452
781
  "complexType": {
453
- "original": "DBTabsProps[\"className\"]",
782
+ "original": "DBTabsProps[\"tabItemWidth\"]",
454
783
  "resolved": "string",
455
784
  "references": {
456
785
  "DBTabsProps": {
@@ -470,13 +799,14 @@ export class DBTabs {
470
799
  "getter": false,
471
800
  "setter": false,
472
801
  "reflect": false,
473
- "attribute": "classname"
802
+ "attribute": "tab-item-width",
803
+ "defaultValue": "\"auto\""
474
804
  },
475
- "alignment": {
805
+ "scrollStartLabel": {
476
806
  "type": "string",
477
807
  "mutable": false,
478
808
  "complexType": {
479
- "original": "DBTabsProps[\"alignment\"]",
809
+ "original": "DBTabsProps[\"scrollStartLabel\"]",
480
810
  "resolved": "string",
481
811
  "references": {
482
812
  "DBTabsProps": {
@@ -496,13 +826,14 @@ export class DBTabs {
496
826
  "getter": false,
497
827
  "setter": false,
498
828
  "reflect": false,
499
- "attribute": "alignment"
829
+ "attribute": "scroll-start-label",
830
+ "defaultValue": "\"Scroll start\""
500
831
  },
501
- "width": {
832
+ "scrollEndLabel": {
502
833
  "type": "string",
503
834
  "mutable": false,
504
835
  "complexType": {
505
- "original": "DBTabsProps[\"width\"]",
836
+ "original": "DBTabsProps[\"scrollEndLabel\"]",
506
837
  "resolved": "string",
507
838
  "references": {
508
839
  "DBTabsProps": {
@@ -522,18 +853,24 @@ export class DBTabs {
522
853
  "getter": false,
523
854
  "setter": false,
524
855
  "reflect": false,
525
- "attribute": "width"
856
+ "attribute": "scroll-end-label",
857
+ "defaultValue": "\"Scroll end\""
526
858
  }
527
859
  };
528
860
  }
529
861
  static get states() {
530
862
  return {
531
- "_name": {},
863
+ "_generatedId": {},
864
+ "_generatedName": {},
865
+ "activeTabIndex": {},
532
866
  "initialized": {},
533
- "showScrollLeft": {},
534
- "showScrollRight": {},
535
- "scrollContainer": {},
536
- "_resizeObserver": {}
867
+ "showScrollStart": {},
868
+ "showScrollEnd": {},
869
+ "_resizeObserver": {},
870
+ "_observer": {},
871
+ "_pendingRafId": {},
872
+ "_scrollListener": {},
873
+ "_cachedTabs": {}
537
874
  };
538
875
  }
539
876
  static get events() {
@@ -553,8 +890,8 @@ export class DBTabs {
553
890
  "references": {}
554
891
  }
555
892
  }, {
556
- "method": "tabSelect",
557
- "name": "tabSelect",
893
+ "method": "valueChange",
894
+ "name": "valueChange",
558
895
  "bubbles": true,
559
896
  "cancelable": true,
560
897
  "composed": true,
@@ -571,11 +908,11 @@ export class DBTabs {
571
908
  }
572
909
  static get watchers() {
573
910
  return [{
574
- "propName": "_ref",
911
+ "propName": "tabs",
575
912
  "methodName": "watch0"
576
913
  }, {
577
- "propName": "initialized",
578
- "methodName": "watch0"
914
+ "propName": "activeIndex",
915
+ "methodName": "watch1"
579
916
  }];
580
917
  }
581
918
  }