@esri/calcite-components 1.0.0-next.424 → 1.0.0-next.427
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.
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/{p-8e0dd0af.system.entry.js → p-0217c41b.system.entry.js} +1 -1
- package/dist/calcite/p-62afcb36.system.js +1 -1
- package/dist/calcite/p-7b238036.entry.js +5 -0
- package/dist/calcite/{p-895d22f3.entry.js → p-851b6fa4.entry.js} +1 -1
- package/dist/calcite/p-b96b7c58.entry.js +5 -0
- package/dist/calcite/p-cedd48fe.system.entry.js +5 -0
- package/dist/calcite/p-f51353e8.system.entry.js +5 -0
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +19 -14
- package/dist/cjs/calcite-modal.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tab_4.cjs.entry.js +31 -32
- package/dist/collection/components/combobox/combobox.js +18 -13
- package/dist/collection/components/combobox-item/combobox-item.css +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/tab/tab.js +10 -12
- package/dist/collection/components/tab-nav/tab-nav.js +8 -5
- package/dist/collection/components/tab-title/tab-title.js +13 -12
- package/dist/collection/components/tabs/tabs.js +0 -3
- package/dist/components/calcite-combobox-item.js +1 -1
- package/dist/components/calcite-combobox.js +18 -13
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/tab-nav.js +8 -5
- package/dist/components/tab-title.js +13 -12
- package/dist/components/tab.js +10 -12
- package/dist/components/tabs.js +0 -3
- package/dist/custom-elements/index.js +51 -47
- package/dist/esm/calcite-combobox_3.entry.js +19 -14
- package/dist/esm/calcite-modal.entry.js +1 -1
- package/dist/esm/calcite-tab_4.entry.js +31 -32
- package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
- package/dist/esm-es5/calcite-modal.entry.js +1 -1
- package/dist/esm-es5/calcite-tab_4.entry.js +1 -1
- package/dist/extras/docs-json.json +1 -1
- package/dist/types/components/combobox/combobox.d.ts +1 -1
- package/dist/types/components/tab/tab.d.ts +4 -5
- package/dist/types/components/tab-nav/tab-nav.d.ts +15 -19
- package/dist/types/components/tab-title/tab-title.d.ts +9 -18
- package/dist/types/components/tabs/tabs.d.ts +1 -4
- package/hydrate/index.js +51 -47
- package/package.json +1 -1
- package/dist/calcite/p-1aeca42a.system.entry.js +0 -5
- package/dist/calcite/p-3915705c.entry.js +0 -5
- package/dist/calcite/p-867f7b7a.system.entry.js +0 -5
- package/dist/calcite/p-9e61d89d.entry.js +0 -5
|
@@ -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.
|
|
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
|
|
68
|
-
//
|
|
69
|
-
if (
|
|
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
|
-
|
|
168
|
-
this.layout =
|
|
169
|
-
this.position =
|
|
170
|
-
this.scale =
|
|
171
|
-
this.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
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
|
@@ -100,8 +100,9 @@ export class Combobox {
|
|
|
100
100
|
this.addCustomChip(this.text, true);
|
|
101
101
|
event.preventDefault();
|
|
102
102
|
}
|
|
103
|
-
else {
|
|
103
|
+
else if (this.active) {
|
|
104
104
|
this.active = false;
|
|
105
|
+
event.preventDefault();
|
|
105
106
|
}
|
|
106
107
|
break;
|
|
107
108
|
case "ArrowLeft":
|
|
@@ -120,11 +121,20 @@ export class Combobox {
|
|
|
120
121
|
this.active = true;
|
|
121
122
|
this.shiftActiveItemIndex(1);
|
|
122
123
|
break;
|
|
124
|
+
case " ":
|
|
125
|
+
if (!this.textInput.value) {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
this.active = true;
|
|
128
|
+
this.shiftActiveItemIndex(1);
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
123
131
|
case "Home":
|
|
132
|
+
event.preventDefault();
|
|
124
133
|
this.active = true;
|
|
125
134
|
this.updateActiveItemIndex(0);
|
|
126
135
|
break;
|
|
127
136
|
case "End":
|
|
137
|
+
event.preventDefault();
|
|
128
138
|
this.active = true;
|
|
129
139
|
this.updateActiveItemIndex(this.visibleItems.length - 1);
|
|
130
140
|
break;
|
|
@@ -151,11 +161,6 @@ export class Combobox {
|
|
|
151
161
|
this.removeLastChip();
|
|
152
162
|
}
|
|
153
163
|
break;
|
|
154
|
-
default:
|
|
155
|
-
if (!this.active) {
|
|
156
|
-
this.setFocus();
|
|
157
|
-
}
|
|
158
|
-
break;
|
|
159
164
|
}
|
|
160
165
|
};
|
|
161
166
|
this.toggleCloseEnd = () => {
|
|
@@ -189,10 +194,11 @@ export class Combobox {
|
|
|
189
194
|
}
|
|
190
195
|
this.calciteComboboxChipDismiss.emit(event.detail);
|
|
191
196
|
};
|
|
192
|
-
this.
|
|
197
|
+
this.clickHandler = (event) => {
|
|
193
198
|
if (event.composedPath().some((node) => node.tagName === "CALCITE-CHIP")) {
|
|
194
199
|
return;
|
|
195
200
|
}
|
|
201
|
+
this.active = !this.active;
|
|
196
202
|
this.setFocus();
|
|
197
203
|
};
|
|
198
204
|
this.setInactiveIfNotContained = (event) => {
|
|
@@ -200,7 +206,7 @@ export class Combobox {
|
|
|
200
206
|
if (!this.active || composedPath.includes(this.el) || composedPath.includes(this.referenceEl)) {
|
|
201
207
|
return;
|
|
202
208
|
}
|
|
203
|
-
if (this.allowCustomValues && this.text) {
|
|
209
|
+
if (this.allowCustomValues && this.text.trim().length) {
|
|
204
210
|
this.addCustomChip(this.text);
|
|
205
211
|
}
|
|
206
212
|
if (this.selectionMode === "single") {
|
|
@@ -282,7 +288,6 @@ export class Combobox {
|
|
|
282
288
|
};
|
|
283
289
|
this.comboboxFocusHandler = () => {
|
|
284
290
|
var _a;
|
|
285
|
-
this.active = true;
|
|
286
291
|
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
287
292
|
};
|
|
288
293
|
this.comboboxBlurHandler = (event) => {
|
|
@@ -355,7 +360,6 @@ export class Combobox {
|
|
|
355
360
|
/** Sets focus on the component. */
|
|
356
361
|
async setFocus() {
|
|
357
362
|
var _a;
|
|
358
|
-
this.active = true;
|
|
359
363
|
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
360
364
|
this.activeChipIndex = -1;
|
|
361
365
|
this.activeItemIndex = -1;
|
|
@@ -695,7 +699,7 @@ export class Combobox {
|
|
|
695
699
|
showLabel && (h("span", { class: {
|
|
696
700
|
label: true,
|
|
697
701
|
"label--spaced": needsIcon
|
|
698
|
-
}, key: "label"
|
|
702
|
+
}, key: "label" }, selectedItem.textLabel)),
|
|
699
703
|
h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-label": getLabelText(this), class: {
|
|
700
704
|
input: true,
|
|
701
705
|
"input--single": true,
|
|
@@ -726,8 +730,9 @@ export class Combobox {
|
|
|
726
730
|
needsIcon && (h("span", { class: "icon-start" }, (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon) && (h("calcite-icon", { class: "selected-icon", icon: selectedItem.icon, scale: "s" })))));
|
|
727
731
|
}
|
|
728
732
|
renderIconEnd() {
|
|
733
|
+
const { active } = this;
|
|
729
734
|
return (h("span", { class: "icon-end" },
|
|
730
|
-
h("calcite-icon", { icon: "chevron-down", scale: "s" })));
|
|
735
|
+
h("calcite-icon", { icon: active ? "chevron-up" : "chevron-down", scale: "s" })));
|
|
731
736
|
}
|
|
732
737
|
render() {
|
|
733
738
|
const { active, guid, label } = this;
|
|
@@ -737,7 +742,7 @@ export class Combobox {
|
|
|
737
742
|
wrapper: true,
|
|
738
743
|
"wrapper--single": single || !this.selectedItems.length,
|
|
739
744
|
"wrapper--active": active
|
|
740
|
-
}, onClick: this.
|
|
745
|
+
}, onClick: this.clickHandler, ref: this.setReferenceEl, role: "combobox" },
|
|
741
746
|
h("div", { class: "grid-input" },
|
|
742
747
|
this.renderIconStart(),
|
|
743
748
|
!single && this.renderChips(),
|
|
@@ -86,7 +86,7 @@ export class Modal {
|
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
this.focusFirstElement = () => {
|
|
89
|
-
focusElement(this.closeButtonEl);
|
|
89
|
+
focusElement(this.disableCloseButton ? getFocusableElements(this.el)[0] : this.closeButtonEl);
|
|
90
90
|
};
|
|
91
91
|
this.focusLastElement = () => {
|
|
92
92
|
const focusableElements = getFocusableElements(this.el).filter((el) => !el.getAttribute("data-focus-fence"));
|
|
@@ -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.
|
|
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
|
|
62
|
-
//
|
|
63
|
-
if (
|
|
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
|
-
|
|
67
|
-
this.layout =
|
|
68
|
-
this.position =
|
|
69
|
-
this.scale =
|
|
70
|
-
this.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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
|
@@ -23,7 +23,7 @@ const CSS = {
|
|
|
23
23
|
textContainer: "text-container"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const comboboxItemCss = "@charset \"UTF-8\";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:\"•\"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}";
|
|
26
|
+
const comboboxItemCss = "@charset \"UTF-8\";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0px;outline:2px solid transparent;outline-offset:2px}.label{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;min-width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:\"•\"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}";
|
|
27
27
|
|
|
28
28
|
const ComboboxItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
29
29
|
constructor() {
|
|
@@ -249,8 +249,9 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
249
249
|
this.addCustomChip(this.text, true);
|
|
250
250
|
event.preventDefault();
|
|
251
251
|
}
|
|
252
|
-
else {
|
|
252
|
+
else if (this.active) {
|
|
253
253
|
this.active = false;
|
|
254
|
+
event.preventDefault();
|
|
254
255
|
}
|
|
255
256
|
break;
|
|
256
257
|
case "ArrowLeft":
|
|
@@ -269,11 +270,20 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
269
270
|
this.active = true;
|
|
270
271
|
this.shiftActiveItemIndex(1);
|
|
271
272
|
break;
|
|
273
|
+
case " ":
|
|
274
|
+
if (!this.textInput.value) {
|
|
275
|
+
event.preventDefault();
|
|
276
|
+
this.active = true;
|
|
277
|
+
this.shiftActiveItemIndex(1);
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
272
280
|
case "Home":
|
|
281
|
+
event.preventDefault();
|
|
273
282
|
this.active = true;
|
|
274
283
|
this.updateActiveItemIndex(0);
|
|
275
284
|
break;
|
|
276
285
|
case "End":
|
|
286
|
+
event.preventDefault();
|
|
277
287
|
this.active = true;
|
|
278
288
|
this.updateActiveItemIndex(this.visibleItems.length - 1);
|
|
279
289
|
break;
|
|
@@ -300,11 +310,6 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
300
310
|
this.removeLastChip();
|
|
301
311
|
}
|
|
302
312
|
break;
|
|
303
|
-
default:
|
|
304
|
-
if (!this.active) {
|
|
305
|
-
this.setFocus();
|
|
306
|
-
}
|
|
307
|
-
break;
|
|
308
313
|
}
|
|
309
314
|
};
|
|
310
315
|
this.toggleCloseEnd = () => {
|
|
@@ -338,10 +343,11 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
338
343
|
}
|
|
339
344
|
this.calciteComboboxChipDismiss.emit(event.detail);
|
|
340
345
|
};
|
|
341
|
-
this.
|
|
346
|
+
this.clickHandler = (event) => {
|
|
342
347
|
if (event.composedPath().some((node) => node.tagName === "CALCITE-CHIP")) {
|
|
343
348
|
return;
|
|
344
349
|
}
|
|
350
|
+
this.active = !this.active;
|
|
345
351
|
this.setFocus();
|
|
346
352
|
};
|
|
347
353
|
this.setInactiveIfNotContained = (event) => {
|
|
@@ -349,7 +355,7 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
349
355
|
if (!this.active || composedPath.includes(this.el) || composedPath.includes(this.referenceEl)) {
|
|
350
356
|
return;
|
|
351
357
|
}
|
|
352
|
-
if (this.allowCustomValues && this.text) {
|
|
358
|
+
if (this.allowCustomValues && this.text.trim().length) {
|
|
353
359
|
this.addCustomChip(this.text);
|
|
354
360
|
}
|
|
355
361
|
if (this.selectionMode === "single") {
|
|
@@ -431,7 +437,6 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
431
437
|
};
|
|
432
438
|
this.comboboxFocusHandler = () => {
|
|
433
439
|
var _a;
|
|
434
|
-
this.active = true;
|
|
435
440
|
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
436
441
|
};
|
|
437
442
|
this.comboboxBlurHandler = (event) => {
|
|
@@ -504,7 +509,6 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
504
509
|
/** Sets focus on the component. */
|
|
505
510
|
async setFocus() {
|
|
506
511
|
var _a;
|
|
507
|
-
this.active = true;
|
|
508
512
|
(_a = this.textInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
509
513
|
this.activeChipIndex = -1;
|
|
510
514
|
this.activeItemIndex = -1;
|
|
@@ -843,7 +847,7 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
843
847
|
} }, showLabel && (h("span", { class: {
|
|
844
848
|
label: true,
|
|
845
849
|
"label--spaced": needsIcon
|
|
846
|
-
}, key: "label"
|
|
850
|
+
}, key: "label" }, selectedItem.textLabel)), h("input", { "aria-activedescendant": this.activeDescendant, "aria-autocomplete": "list", "aria-controls": `${listboxUidPrefix}${guid}`, "aria-label": getLabelText(this), class: {
|
|
847
851
|
input: true,
|
|
848
852
|
"input--single": true,
|
|
849
853
|
"input--transparent": this.activeChipIndex > -1,
|
|
@@ -870,7 +874,8 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
870
874
|
needsIcon && (h("span", { class: "icon-start" }, (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon) && (h("calcite-icon", { class: "selected-icon", icon: selectedItem.icon, scale: "s" })))));
|
|
871
875
|
}
|
|
872
876
|
renderIconEnd() {
|
|
873
|
-
|
|
877
|
+
const { active } = this;
|
|
878
|
+
return (h("span", { class: "icon-end" }, h("calcite-icon", { icon: active ? "chevron-up" : "chevron-down", scale: "s" })));
|
|
874
879
|
}
|
|
875
880
|
render() {
|
|
876
881
|
const { active, guid, label } = this;
|
|
@@ -879,7 +884,7 @@ const Combobox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
879
884
|
wrapper: true,
|
|
880
885
|
"wrapper--single": single || !this.selectedItems.length,
|
|
881
886
|
"wrapper--active": active
|
|
882
|
-
}, onClick: this.
|
|
887
|
+
}, onClick: this.clickHandler, ref: this.setReferenceEl, role: "combobox" }, h("div", { class: "grid-input" }, this.renderIconStart(), !single && this.renderChips(), h("label", { class: "screen-readers-only", htmlFor: `${inputUidPrefix}${guid}`, id: `${labelUidPrefix}${guid}` }, label), this.renderInput()), this.renderIconEnd()), h("ul", { "aria-labelledby": `${labelUidPrefix}${guid}`, "aria-multiselectable": "true", class: "screen-readers-only", id: `${listboxUidPrefix}${guid}`, role: "listbox", tabIndex: -1 }, this.renderListBoxOptions()), this.renderPopperContainer(), h(HiddenFormInputSlot, { component: this })));
|
|
883
888
|
}
|
|
884
889
|
get el() { return this; }
|
|
885
890
|
static get watchers() { return {
|
|
@@ -215,7 +215,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
217
|
this.focusFirstElement = () => {
|
|
218
|
-
focusElement(this.closeButtonEl);
|
|
218
|
+
focusElement(this.disableCloseButton ? getFocusableElements(this.el)[0] : this.closeButtonEl);
|
|
219
219
|
};
|
|
220
220
|
this.focusLastElement = () => {
|
|
221
221
|
const focusableElements = getFocusableElements(this.el).filter((el) => !el.getAttribute("data-focus-fence"));
|
|
@@ -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
|
-
|
|
71
|
-
this.layout =
|
|
72
|
-
this.position =
|
|
73
|
-
this.scale =
|
|
74
|
-
this.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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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() {
|