@scania/tegel 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +10 -3
- package/dist/cjs/tds-chip.cjs.entry.js +7 -2
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +71 -42
- package/dist/cjs/tds-folder-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +4 -2
- package/dist/cjs/tds-icon.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +4 -2
- package/dist/cjs/tds-link.cjs.entry.js +17 -3
- package/dist/cjs/tds-message.cjs.entry.js +15 -3
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +6 -4
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +13 -7
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/tds-toast.cjs.entry.js +4 -4
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
- package/dist/cjs/tds-tooltip.cjs.entry.js +14 -4
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/banner/banner.css +1 -1
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +44 -3
- package/dist/collection/components/chip/chip.js +24 -2
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +2 -2
- package/dist/collection/components/dropdown/dropdown.js +86 -40
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/iconsArray.js +96 -1
- package/dist/collection/components/link/link.js +17 -3
- package/dist/collection/components/message/message.css +44 -26
- package/dist/collection/components/message/message.js +49 -2
- package/dist/collection/components/popover-core/tds-popover-core.css +530 -53
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +21 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +40 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +21 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +40 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +21 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +42 -4
- package/dist/collection/components/text-field/text-field.js +31 -8
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/toast/toast.css +1 -1
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +40 -4
- package/dist/collection/utils/axeHelpers.js +1 -1
- package/dist/components/{p-c65351ab.js → p-14ab9663.js} +12 -3
- package/dist/components/{p-2a43e410.js → p-2d93a742.js} +5 -5
- package/dist/components/p-4487c541.js +65 -0
- package/dist/components/{p-29d19dc8.js → p-53e4cdcf.js} +1 -1
- package/dist/components/{p-a64dc22e.js → p-663b8e51.js} +72 -42
- package/dist/components/{p-4c1e3344.js → p-83db8b35.js} +1 -1
- package/dist/components/p-90dbeab3.js +2052 -0
- package/dist/components/{p-b1d21573.js → p-a1181b1f.js} +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-banner.js +2 -2
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-chip.js +9 -3
- package/dist/components/tds-datetime.js +1 -1
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tab.js +21 -2
- package/dist/components/tds-folder-tabs.js +7 -3
- package/dist/components/tds-footer-group.js +1 -1
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +3 -3
- package/dist/components/tds-header-hamburger.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher.js +4 -4
- package/dist/components/tds-icon.js +1 -1
- package/dist/components/tds-inline-tab.js +21 -2
- package/dist/components/tds-inline-tabs.js +7 -3
- package/dist/components/tds-link.js +17 -3
- package/dist/components/tds-message.js +19 -5
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-navigation-tab.js +21 -2
- package/dist/components/tds-navigation-tabs.js +9 -5
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +1 -1
- package/dist/components/tds-side-menu-close-button.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-slider.js +1 -1
- package/dist/components/tds-step.js +1 -1
- package/dist/components/tds-table-body-input-wrapper.js +1 -1
- package/dist/components/tds-table-body-row.js +1 -1
- package/dist/components/tds-table-footer.js +4 -4
- package/dist/components/tds-table-header-input-wrapper.js +1 -1
- package/dist/components/tds-table-header.js +1 -1
- package/dist/components/tds-table-toolbar.js +1 -1
- package/dist/components/tds-text-field.js +15 -8
- package/dist/components/tds-textarea.js +4 -4
- package/dist/components/tds-toast.js +5 -5
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +18 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +10 -3
- package/dist/esm/tds-chip.entry.js +7 -2
- package/dist/esm/tds-dropdown_2.entry.js +71 -42
- package/dist/esm/tds-folder-tab.entry.js +22 -3
- package/dist/esm/tds-folder-tabs.entry.js +4 -2
- package/dist/esm/tds-icon.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +22 -3
- package/dist/esm/tds-inline-tabs.entry.js +4 -2
- package/dist/esm/tds-link.entry.js +17 -3
- package/dist/esm/tds-message.entry.js +15 -3
- package/dist/esm/tds-navigation-tab.entry.js +22 -3
- package/dist/esm/tds-navigation-tabs.entry.js +6 -4
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-text-field.entry.js +13 -7
- package/dist/esm/tds-textarea.entry.js +3 -3
- package/dist/esm/tds-toast.entry.js +4 -4
- package/dist/esm/tds-toggle.entry.js +2 -2
- package/dist/esm/tds-tooltip.entry.js +14 -4
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-0f2c9507.entry.js +1 -0
- package/dist/tegel/p-22c592eb.entry.js +1 -0
- package/dist/tegel/p-2af57972.entry.js +1 -0
- package/dist/tegel/{p-be1d1345.entry.js → p-4465f687.entry.js} +1 -1
- package/dist/tegel/p-668b7662.entry.js +1 -0
- package/dist/tegel/{p-4e298888.entry.js → p-66f394a2.entry.js} +1 -1
- package/dist/tegel/{p-b35e7208.entry.js → p-727f873f.entry.js} +1 -1
- package/dist/tegel/p-746e2927.entry.js +1 -0
- package/dist/tegel/p-754a4921.entry.js +1 -0
- package/dist/tegel/{p-46205cfb.entry.js → p-769d0503.entry.js} +1 -1
- package/dist/tegel/p-97f10223.entry.js +1 -0
- package/dist/tegel/p-a21250b8.entry.js +1 -0
- package/dist/tegel/p-aadb2553.entry.js +1 -0
- package/dist/tegel/p-b08886e3.entry.js +1 -0
- package/dist/tegel/p-b114ec3d.entry.js +1 -0
- package/dist/tegel/p-c3607f10.entry.js +1 -0
- package/dist/tegel/p-ddda64eb.entry.js +1 -0
- package/dist/tegel/p-eaa279dd.entry.js +1 -0
- package/dist/tegel/p-ee960089.entry.js +1 -0
- package/dist/tegel/tegel.css +13 -3
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -0
- package/dist/types/components/chip/chip.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/message/message.d.ts +5 -0
- package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +2 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +4 -0
- package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +2 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +4 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +2 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +4 -0
- package/dist/types/components/text-field/text-field.d.ts +4 -1
- package/dist/types/components/tooltip/tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +114 -2
- package/dist/types/types/Icons.d.ts +1 -1
- package/dist/types/utils/axeHelpers.d.ts +1 -2
- package/package.json +1 -1
- package/dist/components/p-4764a1d5.js +0 -2052
- package/dist/components/p-a2b7bdef.js +0 -65
- package/dist/tegel/p-065d6f83.entry.js +0 -1
- package/dist/tegel/p-0c1e632d.entry.js +0 -1
- package/dist/tegel/p-168122a7.entry.js +0 -1
- package/dist/tegel/p-19eb4ae1.entry.js +0 -1
- package/dist/tegel/p-4e33cbda.entry.js +0 -1
- package/dist/tegel/p-4ee344e5.entry.js +0 -1
- package/dist/tegel/p-64c80f14.entry.js +0 -1
- package/dist/tegel/p-72fd0083.entry.js +0 -1
- package/dist/tegel/p-93a4bd11.entry.js +0 -1
- package/dist/tegel/p-9e0b31a1.entry.js +0 -1
- package/dist/tegel/p-a0fc0cc2.entry.js +0 -1
- package/dist/tegel/p-b6526302.entry.js +0 -1
- package/dist/tegel/p-cca85da0.entry.js +0 -1
- package/dist/tegel/p-d0abf078.entry.js +0 -1
- package/dist/tegel/p-dcbc35af.entry.js +0 -1
|
@@ -16,11 +16,29 @@ export class TdsFolderTab {
|
|
|
16
16
|
async setSelected(selected) {
|
|
17
17
|
this.selected = selected;
|
|
18
18
|
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
const elements = this.host.querySelectorAll('button, a');
|
|
21
|
+
for (let index = 0; index < elements.length; index++) {
|
|
22
|
+
const element = elements[index];
|
|
23
|
+
if (!element.getAttribute('aria-controls')) {
|
|
24
|
+
console.warn('Tegel folder-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
|
|
25
|
+
}
|
|
26
|
+
if (element.getAttribute('role') !== 'tab') {
|
|
27
|
+
console.warn('Tegel folder-tab component: Interactive elements should have attribute role="tab"');
|
|
28
|
+
}
|
|
29
|
+
if (this.disabled) {
|
|
30
|
+
element.setAttribute('aria-disabled', 'true');
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
element.removeAttribute('aria-disabled');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
19
37
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '9290c4ab2f7d051bba9fec4dad9a7d07790ed5b7', "aria-selected": this.selected }, h("div", { key: '36225101c510f2d77282fd600c4ee00085791109', class: {
|
|
21
39
|
selected: this.selected,
|
|
22
40
|
disabled: this.disabled,
|
|
23
|
-
}, style: { width: `${this.tabWidth}px` } }, h("slot", { key: '
|
|
41
|
+
}, style: { width: `${this.tabWidth}px` } }, h("slot", { key: '05954c498b9fbd6a2a1231d84bf2657a0616db36' }))));
|
|
24
42
|
}
|
|
25
43
|
static get is() { return "tds-folder-tab"; }
|
|
26
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -114,4 +132,5 @@ export class TdsFolderTab {
|
|
|
114
132
|
}
|
|
115
133
|
};
|
|
116
134
|
}
|
|
135
|
+
static get elementRef() { return "host"; }
|
|
117
136
|
}
|
|
@@ -60,6 +60,8 @@ export class TdsFolderTabs {
|
|
|
60
60
|
this.modeVariant = null;
|
|
61
61
|
this.defaultSelectedIndex = 0;
|
|
62
62
|
this.selectedIndex = undefined;
|
|
63
|
+
this.tdsScrollLeftAriaLabel = 'Scroll left';
|
|
64
|
+
this.tdsScrollRightAriaLabel = 'Scroll right';
|
|
63
65
|
this.buttonWidth = 0;
|
|
64
66
|
this.showLeftScroll = false;
|
|
65
67
|
this.showRightScroll = false;
|
|
@@ -160,9 +162,9 @@ export class TdsFolderTabs {
|
|
|
160
162
|
this.removeEventListenerFromTabs();
|
|
161
163
|
}
|
|
162
164
|
render() {
|
|
163
|
-
return (h(Host, { key: '
|
|
165
|
+
return (h(Host, { key: '54a3cceed49387a8f0dbe74eecb96ae284882ff9', role: "tablist", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '170e5256bde8efdce412bbab1a674b23159d02d1', class: "wrapper", ref: (el) => {
|
|
164
166
|
this.navWrapperElement = el;
|
|
165
|
-
} }, h("button", { key: '
|
|
167
|
+
} }, h("button", { key: '1c74ef8c81361bfa6ff5d227c145a3371fb2f66f', "aria-label": this.tdsScrollLeftAriaLabel, class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("tds-icon", { key: '94ddd85d4107c89487db727f13a9c443fd160fc6', name: "chevron_left", size: "20px" })), h("slot", { key: '63978c3c62482bc0a251377756630f555f10dfef', onSlotchange: () => this.handleSlotChange() }), h("button", { key: 'aeb86fbdb365e62df37b72daa0b53f51486834a9', "aria-label": this.tdsScrollRightAriaLabel, class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("tds-icon", { key: '2cc4d301a4490d6b8d8f2373fc2450c93922a814', name: "chevron_right", size: "20px" })))));
|
|
166
168
|
}
|
|
167
169
|
static get is() { return "tds-folder-tabs"; }
|
|
168
170
|
static get encapsulation() { return "shadow"; }
|
|
@@ -230,6 +232,42 @@ export class TdsFolderTabs {
|
|
|
230
232
|
},
|
|
231
233
|
"attribute": "selected-index",
|
|
232
234
|
"reflect": true
|
|
235
|
+
},
|
|
236
|
+
"tdsScrollLeftAriaLabel": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"mutable": false,
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "string",
|
|
241
|
+
"resolved": "string",
|
|
242
|
+
"references": {}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": false,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": "Defines aria-label on left scroll button"
|
|
249
|
+
},
|
|
250
|
+
"attribute": "tds-scroll-left-aria-label",
|
|
251
|
+
"reflect": false,
|
|
252
|
+
"defaultValue": "'Scroll left'"
|
|
253
|
+
},
|
|
254
|
+
"tdsScrollRightAriaLabel": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "string",
|
|
259
|
+
"resolved": "string",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": false,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": "Defines aria-label on right scroll button"
|
|
267
|
+
},
|
|
268
|
+
"attribute": "tds-scroll-right-aria-label",
|
|
269
|
+
"reflect": false,
|
|
270
|
+
"defaultValue": "'Scroll right'"
|
|
233
271
|
}
|
|
234
272
|
};
|
|
235
273
|
}
|
|
@@ -11,12 +11,30 @@ export class TdsInlineTab {
|
|
|
11
11
|
async setSelected(selected) {
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
const elements = this.host.querySelectorAll('button, a');
|
|
16
|
+
for (let index = 0; index < elements.length; index++) {
|
|
17
|
+
const element = elements[index];
|
|
18
|
+
if (!element.getAttribute('aria-controls')) {
|
|
19
|
+
console.warn('Tegel inline-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
|
|
20
|
+
}
|
|
21
|
+
if (element.getAttribute('role') !== 'tab') {
|
|
22
|
+
console.warn('Tegel inline-tab component: Interactive elements should have attribute role="tab"');
|
|
23
|
+
}
|
|
24
|
+
if (this.disabled) {
|
|
25
|
+
element.setAttribute('aria-disabled', 'true');
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
element.removeAttribute('aria-disabled');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
14
32
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '4c9f91014f30c1e7db52778dc4cf8800aa62050d', "aria-selected": this.selected }, h("div", { key: '860cfdd9338915275262875fc79588b58bebf447', class: {
|
|
16
34
|
'inline-tab-item': true,
|
|
17
35
|
'selected': this.selected,
|
|
18
36
|
'disabled': this.disabled,
|
|
19
|
-
} }, h("slot", { key: '
|
|
37
|
+
} }, h("slot", { key: 'eeccc1bdc172fab4d7ad96143b01f17982266f4d' }))));
|
|
20
38
|
}
|
|
21
39
|
static get is() { return "tds-inline-tab"; }
|
|
22
40
|
static get encapsulation() { return "shadow"; }
|
|
@@ -85,4 +103,5 @@ export class TdsInlineTab {
|
|
|
85
103
|
}
|
|
86
104
|
};
|
|
87
105
|
}
|
|
106
|
+
static get elementRef() { return "host"; }
|
|
88
107
|
}
|
|
@@ -60,6 +60,8 @@ export class TdsInlineTabs {
|
|
|
60
60
|
this.modeVariant = 'primary';
|
|
61
61
|
this.defaultSelectedIndex = 0;
|
|
62
62
|
this.selectedIndex = undefined;
|
|
63
|
+
this.tdsScrollLeftAriaLabel = 'Scroll left';
|
|
64
|
+
this.tdsScrollRightAriaLabel = 'Scroll right';
|
|
63
65
|
this.leftPadding = 32;
|
|
64
66
|
this.showLeftScroll = false;
|
|
65
67
|
this.showRightScroll = false;
|
|
@@ -167,9 +169,9 @@ export class TdsInlineTabs {
|
|
|
167
169
|
this.removeEventListenerFromTabs();
|
|
168
170
|
}
|
|
169
171
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
172
|
+
return (h(Host, { key: '47fd4d494254749aa276d4f046ded68fe472b062', role: "tablist", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: 'f5c42677bafef38db784c517714ac8a4e0149862', class: "wrapper", ref: (el) => {
|
|
171
173
|
this.navWrapperElement = el;
|
|
172
|
-
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '
|
|
174
|
+
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '5955dc1657efcfec14393987f6ebfaea4c90615d', "aria-label": this.tdsScrollLeftAriaLabel, class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '3c3c7d93197f40b0cbb67d20cd5c32b827a29430', name: "chevron_left", size: "20px" })), h("slot", { key: '335ec61f80defb892c229901165809487950dc03', onSlotchange: () => this.handleSlotChange() }), h("button", { key: 'cc22a000e41efa472638da3c480b5cf1094aaec2', "aria-label": this.tdsScrollRightAriaLabel, class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '9ca29d2d1cb3df19993723a2eb0716d36c0f20ea', name: "chevron_right", size: "20px" })))));
|
|
173
175
|
}
|
|
174
176
|
static get is() { return "tds-inline-tabs"; }
|
|
175
177
|
static get encapsulation() { return "shadow"; }
|
|
@@ -238,6 +240,42 @@ export class TdsInlineTabs {
|
|
|
238
240
|
"attribute": "selected-index",
|
|
239
241
|
"reflect": true
|
|
240
242
|
},
|
|
243
|
+
"tdsScrollLeftAriaLabel": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"mutable": false,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "string",
|
|
248
|
+
"resolved": "string",
|
|
249
|
+
"references": {}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [],
|
|
255
|
+
"text": "Defines aria-label on left scroll button"
|
|
256
|
+
},
|
|
257
|
+
"attribute": "tds-scroll-left-aria-label",
|
|
258
|
+
"reflect": false,
|
|
259
|
+
"defaultValue": "'Scroll left'"
|
|
260
|
+
},
|
|
261
|
+
"tdsScrollRightAriaLabel": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "string",
|
|
266
|
+
"resolved": "string",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "Defines aria-label on right scroll button"
|
|
274
|
+
},
|
|
275
|
+
"attribute": "tds-scroll-right-aria-label",
|
|
276
|
+
"reflect": false,
|
|
277
|
+
"defaultValue": "'Scroll right'"
|
|
278
|
+
},
|
|
241
279
|
"leftPadding": {
|
|
242
280
|
"type": "number",
|
|
243
281
|
"mutable": false,
|
|
@@ -11,9 +11,27 @@ export class TdsNavigationTab {
|
|
|
11
11
|
async setSelected(selected) {
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
const elements = this.host.querySelectorAll('button, a');
|
|
16
|
+
for (let index = 0; index < elements.length; index++) {
|
|
17
|
+
const element = elements[index];
|
|
18
|
+
if (!element.getAttribute('aria-controls')) {
|
|
19
|
+
console.warn('Tegel navigation-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
|
|
20
|
+
}
|
|
21
|
+
if (element.getAttribute('role') !== 'tab') {
|
|
22
|
+
console.warn('Tegel navigation-tab component: Interactive elements should have attribute role="tab"');
|
|
23
|
+
}
|
|
24
|
+
if (this.disabled) {
|
|
25
|
+
element.setAttribute('aria-disabled', 'true');
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
element.removeAttribute('aria-disabled');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
14
32
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
-
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: '
|
|
33
|
+
return (h(Host, { key: '51152bf313a84cb937e7f49e87cc8dcd74ab0612' }, h("div", { key: '5d55db68f75e042dafe40da1b9e84d74f1cd8849', class: `navigation-tab-item ${this.selected ? 'selected' : ''}
|
|
34
|
+
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: '174108daa16d6fa68c04244af1843771a4df91f5' }))));
|
|
17
35
|
}
|
|
18
36
|
static get is() { return "tds-navigation-tab"; }
|
|
19
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,4 +100,5 @@ export class TdsNavigationTab {
|
|
|
82
100
|
}
|
|
83
101
|
};
|
|
84
102
|
}
|
|
103
|
+
static get elementRef() { return "host"; }
|
|
85
104
|
}
|
|
@@ -61,6 +61,8 @@ export class TdsNavigationTabs {
|
|
|
61
61
|
this.defaultSelectedIndex = 0;
|
|
62
62
|
this.selectedIndex = undefined;
|
|
63
63
|
this.leftPadding = 32;
|
|
64
|
+
this.tdsScrollLeftAriaLabel = 'Scroll left';
|
|
65
|
+
this.tdsScrollRightAriaLabel = 'Scroll right';
|
|
64
66
|
this.showLeftScroll = false;
|
|
65
67
|
this.showRightScroll = false;
|
|
66
68
|
}
|
|
@@ -167,15 +169,15 @@ export class TdsNavigationTabs {
|
|
|
167
169
|
this.removeEventListenerFromTabs();
|
|
168
170
|
}
|
|
169
171
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
172
|
+
return (h(Host, { key: '809fe9d34b03949edae1708b6dea7f0406afee80', role: "tablist", class: { [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null } }, h("div", { key: '866605f8695441d7817c07895bdffd5e3e7ba5ac', class: "wrapper", ref: (el) => {
|
|
171
173
|
this.navWrapperElement = el;
|
|
172
|
-
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '
|
|
174
|
+
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '2d394ecb940cee024174932676c2a6c22622c853', "aria-label": this.tdsScrollLeftAriaLabel, class: {
|
|
173
175
|
'scroll-left-button': true,
|
|
174
176
|
'show': this.showLeftScroll,
|
|
175
|
-
}, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '
|
|
177
|
+
}, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '09386162127467a545e00f44130352afb9cfed03', name: "chevron_left", size: "20px" })), h("slot", { key: '3b3cd70ed645318d0661a3acbee3d2bc748314cf', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '1afb2dc9b261626db800593548d7e023e14cd39b', "aria-label": this.tdsScrollRightAriaLabel, class: {
|
|
176
178
|
'scroll-right-button': true,
|
|
177
179
|
'show': this.showRightScroll,
|
|
178
|
-
}, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '
|
|
180
|
+
}, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '451a8ddc680799fd86e390d8aeab5c22c73f31ee', name: "chevron_right", size: "20px" })))));
|
|
179
181
|
}
|
|
180
182
|
static get is() { return "tds-navigation-tabs"; }
|
|
181
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -261,6 +263,42 @@ export class TdsNavigationTabs {
|
|
|
261
263
|
"attribute": "left-padding",
|
|
262
264
|
"reflect": true,
|
|
263
265
|
"defaultValue": "32"
|
|
266
|
+
},
|
|
267
|
+
"tdsScrollLeftAriaLabel": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"mutable": false,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "string",
|
|
272
|
+
"resolved": "string",
|
|
273
|
+
"references": {}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": false,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": "Defines aria-label on left scroll button"
|
|
280
|
+
},
|
|
281
|
+
"attribute": "tds-scroll-left-aria-label",
|
|
282
|
+
"reflect": false,
|
|
283
|
+
"defaultValue": "'Scroll left'"
|
|
284
|
+
},
|
|
285
|
+
"tdsScrollRightAriaLabel": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "string",
|
|
290
|
+
"resolved": "string",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "Defines aria-label on right scroll button"
|
|
298
|
+
},
|
|
299
|
+
"attribute": "tds-scroll-right-aria-label",
|
|
300
|
+
"reflect": false,
|
|
301
|
+
"defaultValue": "'Scroll right'"
|
|
264
302
|
}
|
|
265
303
|
};
|
|
266
304
|
}
|
|
@@ -23,6 +23,7 @@ export class TdsTextField {
|
|
|
23
23
|
this.state = 'default';
|
|
24
24
|
this.maxLength = undefined;
|
|
25
25
|
this.autofocus = false;
|
|
26
|
+
this.tdsAriaLabel = undefined;
|
|
26
27
|
this.focusInput = undefined;
|
|
27
28
|
}
|
|
28
29
|
handleChange(event) {
|
|
@@ -50,11 +51,16 @@ export class TdsTextField {
|
|
|
50
51
|
this.textInput.focus();
|
|
51
52
|
}
|
|
52
53
|
}
|
|
54
|
+
connectedCallback() {
|
|
55
|
+
if (!this.tdsAriaLabel) {
|
|
56
|
+
console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
53
59
|
render() {
|
|
54
60
|
var _a;
|
|
55
61
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
56
62
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
57
|
-
return (h("div", { key: '
|
|
63
|
+
return (h("div", { key: '188cc7065d3cb6006adf01a9679a97012d0047df', class: {
|
|
58
64
|
'form-text-field': true,
|
|
59
65
|
'form-text-field-nomin': this.noMinWidth,
|
|
60
66
|
'text-field-focus': this.focusInput && !this.disabled,
|
|
@@ -68,12 +74,12 @@ export class TdsTextField {
|
|
|
68
74
|
'form-text-field-sm': this.size === 'sm',
|
|
69
75
|
'form-text-field-error': this.state === 'error',
|
|
70
76
|
'form-text-field-success': this.state === 'success',
|
|
71
|
-
} }, this.labelPosition === 'outside' && (h("div", { key: '
|
|
77
|
+
} }, this.labelPosition === 'outside' && (h("div", { key: 'd99cf396da1740b4c3fa5899ef3167d3638d001b', class: "text-field-label-outside" }, h("label", { key: '90a5ec0a376d2793b5f8b87ed4df0ac86c356009', htmlFor: "text-field-input-element" }, this.label))), h("div", { key: '42046ef3f5a9c38658a9d5176f86f4002657138c', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '17ae517366c69e1cad33babcc134c011c4c483e7', class: {
|
|
72
78
|
'text-field-slot-wrap-prefix': true,
|
|
73
79
|
'text-field-error': this.state === 'error',
|
|
74
80
|
'text-field-success': this.state === 'success',
|
|
75
81
|
'text-field-default': this.state === 'default',
|
|
76
|
-
} }, h("slot", { key: '
|
|
82
|
+
} }, h("slot", { key: '9aa4690419f3b688eb13c9ca78ed4dec5c513308', name: "prefix" }))), h("div", { key: '2ad1645844bf5b70383e85712a2d98de15cb5166', class: "text-field-input-container" }, h("input", { key: 'f5c1468ce392cf9e4211ce9fc8bc774a5da19afd', ref: (inputEl) => {
|
|
77
83
|
this.textInput = inputEl;
|
|
78
84
|
}, class: {
|
|
79
85
|
'text-field-input': true,
|
|
@@ -88,19 +94,19 @@ export class TdsTextField {
|
|
|
88
94
|
if (!this.readOnly) {
|
|
89
95
|
this.handleBlur(event);
|
|
90
96
|
}
|
|
91
|
-
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '
|
|
97
|
+
}, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": "text-field-helper-element", "aria-readonly": this.readOnly, id: "text-field-input-element" }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'f1c3225621de7a83bfb123b8f4a3a8d9a3493e21', class: "text-field-label-inside", htmlFor: "text-field-input-element" }, this.label))), h("div", { key: '2bacfcf84ac1f6495cc5185275f39ef1f1e4476e', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: '2b46f703349e0873f9e777227acf45e0c6c55d8c', class: {
|
|
92
98
|
'text-field-slot-wrap-suffix': true,
|
|
93
99
|
'text-field-error': this.state === 'error',
|
|
94
100
|
'text-field-success': this.state === 'success',
|
|
95
101
|
'text-field-default': this.state === 'default',
|
|
96
102
|
'tds-u-display-none': this.readOnly,
|
|
97
|
-
} }, h("slot", { key: '
|
|
103
|
+
} }, h("slot", { key: 'ec96e0dd2fbe5ffbd1c0e72f1f2d460d7e3c415f', name: "suffix" }))), h("span", { key: 'cd04304e0d56b0d8fb073cb09d8badfb0058ea5b', class: "text-field-icon__readonly" }, h("tds-icon", { key: '2ab8f0964e53b0a47ccb59aefa80e2ca4a80cd84', name: "edit_inactive", size: "20px" })), h("span", { key: 'f2c3b266b25986fd2d3ad1ff9e300eb846c2a246', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '4f277fc3ed71efb3ba66068e8322e03d472ed2f5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '10eb1e5c33c36a7277e4f1f12f4af1e4cac45718', class: "text-field-helper", id: "text-field-helper-element" }, this.state === 'error' && (h("div", { key: 'fa1460b9ed4bd737319e3a780c54f4440e7fff7e', class: "text-field-helper-error-state" }, h("tds-icon", { key: '639aed75bf25c37d5db04c48b3d854e279cab80d', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { key: '66d348fea3906735bcfe6d63e951af1366a901f0', class: {
|
|
98
104
|
'text-field-textcounter': true,
|
|
99
105
|
'text-field-textcounter-disabled': this.disabled,
|
|
100
|
-
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '
|
|
106
|
+
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '744acd41ca6d968ee5dab7bd50ca52f5704b21dc', class: {
|
|
101
107
|
'text-field-textcounter-divider': true,
|
|
102
108
|
'text-field-textcounter-disabled': this.disabled,
|
|
103
|
-
} }, ' ', "/", ' '), this.maxLength))))));
|
|
109
|
+
} }, ' ', "/", ' '), this.maxLength)))))));
|
|
104
110
|
}
|
|
105
111
|
static get is() { return "tds-text-field"; }
|
|
106
112
|
static get encapsulation() { return "scoped"; }
|
|
@@ -287,7 +293,7 @@ export class TdsTextField {
|
|
|
287
293
|
"optional": false,
|
|
288
294
|
"docs": {
|
|
289
295
|
"tags": [],
|
|
290
|
-
"text": "Set input in readonly state
|
|
296
|
+
"text": "Set input in readonly state"
|
|
291
297
|
},
|
|
292
298
|
"attribute": "read-only",
|
|
293
299
|
"reflect": false,
|
|
@@ -417,6 +423,23 @@ export class TdsTextField {
|
|
|
417
423
|
"attribute": "autofocus",
|
|
418
424
|
"reflect": false,
|
|
419
425
|
"defaultValue": "false"
|
|
426
|
+
},
|
|
427
|
+
"tdsAriaLabel": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"mutable": false,
|
|
430
|
+
"complexType": {
|
|
431
|
+
"original": "string",
|
|
432
|
+
"resolved": "string",
|
|
433
|
+
"references": {}
|
|
434
|
+
},
|
|
435
|
+
"required": false,
|
|
436
|
+
"optional": false,
|
|
437
|
+
"docs": {
|
|
438
|
+
"tags": [],
|
|
439
|
+
"text": "Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true."
|
|
440
|
+
},
|
|
441
|
+
"attribute": "tds-aria-label",
|
|
442
|
+
"reflect": false
|
|
420
443
|
}
|
|
421
444
|
};
|
|
422
445
|
}
|
|
@@ -38,7 +38,7 @@ export class TdsTextarea {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
var _a;
|
|
41
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: 'ad924c149590d14fe1f35a57b430186c743d715c', class: {
|
|
42
42
|
'textarea-container': true,
|
|
43
43
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
44
44
|
'textarea-focus': this.focusInput,
|
|
@@ -48,7 +48,7 @@ export class TdsTextarea {
|
|
|
48
48
|
'textarea-data': this.value !== '',
|
|
49
49
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
50
50
|
'no-min-width': this.noMinWidth,
|
|
51
|
-
} }, this.labelPosition !== 'no-label' && h("span", { key: '
|
|
51
|
+
} }, this.labelPosition !== 'no-label' && h("span", { key: '4c2759ed5e3ba6bae9f1175628d0e5b21110f2f6', class: 'textarea-label' }, this.label), h("div", { key: '7b9987a019997bf13af684cb6fd822af2a4e327f', class: "textarea-wrapper" }, h("textarea", { key: '8589c0e3e0faf00f48c1ec35926b354b0734bb2a', class: 'textarea-input', ref: (inputEl) => {
|
|
52
52
|
this.textEl = inputEl;
|
|
53
53
|
}, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autofocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
|
|
54
54
|
if (!this.readOnly) {
|
|
@@ -58,7 +58,7 @@ export class TdsTextarea {
|
|
|
58
58
|
if (!this.readOnly) {
|
|
59
59
|
this.handleBlur(event);
|
|
60
60
|
}
|
|
61
|
-
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '
|
|
61
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '26e66224d7a3981de049870774d62f8f09cc1b4a', class: "textarea-resizer-icon" }, h("svg", { key: '7922eb0ec64601f7e97279badca76ca40e2ab2f4', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '486d91034b0c17328eee9677054b94b5b795b4d0', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), h("span", { key: '68beff246389edc7970aab014dd84747eecf91fa', class: "textarea-icon__readonly" }, h("tds-icon", { key: '50f46d667cef9b5c6bcf54af14a8b5acc690932c', name: "edit_inactive" })), h("span", { key: '7e02c5f24fccfedbcbcb3863593ea6400828dcb7', class: "textarea-icon__readonly-label" }, "This field is non-editable")), h("span", { key: '426207b0db106f44fc9075b9a0de765b43cae519', class: 'textarea-helper' }, this.state === 'error' && h("tds-icon", { key: '3cb35ce4804432f5cc46eb90c779cbd2076f07c5', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '78130caa7cdc0c419b47539cd455adb2a5a33f10', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'a52c798f87eb16c79bbd2605956aff48336e4169', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "tds-textarea"; }
|
|
64
64
|
static get encapsulation() { return "scoped"; }
|
|
@@ -58,12 +58,12 @@ export class TdsToast {
|
|
|
58
58
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
59
59
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
60
60
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
61
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '0fbdb9e7e9495399272925957c3930bfa7c6d8aa', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
62
62
|
hide: this.hidden,
|
|
63
63
|
show: !this.hidden,
|
|
64
|
-
} }, h("div", { key: '
|
|
64
|
+
} }, h("div", { key: '91d24fc7670e387748e995d649c11e627d119289', class: `
|
|
65
65
|
wrapper
|
|
66
|
-
${this.variant}` }, h("tds-icon", { key: '
|
|
66
|
+
${this.variant}` }, h("tds-icon", { key: '9e671027166b02eb4297c512a7c9d8e981edad83', name: this.getIconName(), size: "20px" }), h("div", { key: '5700c75533f321a86feb06e7354fadc8f79b04ee', class: `content` }, h("div", { key: 'af17cd657ea83a7c4c82da3818405cd02da73b32', class: "header-subheader" }, this.header && h("div", { key: '0c300bd28b2ea677a673b6904a49d0cf7f4dd08c', class: "header" }, this.header), usesHeaderSlot && h("slot", { key: 'c3389bd852aafc9bcc71e2c0742b5b8e13d55e19', name: "header" }), this.subheader && h("div", { key: '8fd6596be6134ad42569bd1081391093e1d3288a', class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { key: 'ddd4b0cfbd2500a0dcd87a9ceda819297e699341', name: "subheader" })), usesActionsSlot && (h("div", { key: '9417c00cf6e9ee091ee09a82543d290de9641347', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { key: 'a773f53a0f481c0a925e744d259e8b2704c00768', name: "actions" })))), this.closable && (h("button", { key: '3ae5d113a9eefec9127cf2000bc50ab6c4788be7', onClick: this.handleClose, class: "close" }, h("tds-icon", { key: '747c8c570819b2af5041ca7f1b369ec587e121d6', name: "cross", size: "20px" }))))));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "tds-toast"; }
|
|
69
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,10 +38,10 @@ export class TdsToggle {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: '99809ab8c95f98930769fde49bb128c866fb4288', class: "tds-toggle" }, this.headline && (h("div", { key: '679f7488d0d0ec41e8c1c31234ffcc02fb7c811f', class: {
|
|
42
42
|
'toggle-headline': true,
|
|
43
43
|
'disabled': this.disabled,
|
|
44
|
-
} }, this.headline)), h("input", { key: '
|
|
44
|
+
} }, this.headline)), h("input", { key: 'f08284dc8c171da0694a3b86c6ffb206861080cd', "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: 'f5d7e6e3ac11cbc7b2eac4fcb2cebcd6f015c2bc', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: '686d693e4ec91573fe9c40eba7a67e7933f37dde', name: "label" })))));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "tds-toggle"; }
|
|
47
47
|
static get encapsulation() { return "scoped"; }
|
|
@@ -40,6 +40,12 @@ export class TdsTooltip {
|
|
|
40
40
|
this.placement = 'bottom';
|
|
41
41
|
this.offsetSkidding = 0;
|
|
42
42
|
this.offsetDistance = 8;
|
|
43
|
+
this.tdsAriaDescribedby = undefined;
|
|
44
|
+
}
|
|
45
|
+
handleKeyDown(event) {
|
|
46
|
+
if (event.key === 'Escape' && this.show) {
|
|
47
|
+
this.show = false;
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
50
|
componentWillLoad() {
|
|
45
51
|
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
@@ -52,16 +58,20 @@ export class TdsTooltip {
|
|
|
52
58
|
}
|
|
53
59
|
render() {
|
|
54
60
|
var _a;
|
|
55
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '366a9ef9c61be66f0bd4559df61959e66df7ccde', role: "tooltip", "aria-describedby": this.tdsAriaDescribedby, "aria-label": this.text }, h("tds-popover-core", Object.assign({ key: 'a3e941deb73b41565f82bfcd972e88f3b3a9a4cc' }, this.inheritedAttributes, { class: {
|
|
56
62
|
'tds-tooltip': true,
|
|
57
63
|
[`tds-tooltip-${this.border}`]: true,
|
|
58
64
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
59
65
|
'tds-tooltip-show': this.show,
|
|
60
|
-
}, selector: this.selector, referenceEl: this.referenceEl, trigger: this.determineTrigger(), modifiers: this.popperjsExtraModifiers, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, show: this.show, placement: this.placement, autoHide: false,
|
|
66
|
+
}, selector: this.selector, referenceEl: this.referenceEl, trigger: this.determineTrigger(), modifiers: this.popperjsExtraModifiers, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, show: this.show, placement: this.placement, autoHide: false,
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
onInternalTdsShow: () => {
|
|
61
69
|
this.show = true;
|
|
62
|
-
},
|
|
70
|
+
},
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
onInternalTdsClose: () => {
|
|
63
73
|
this.show = false;
|
|
64
|
-
}, defaultShow: this.defaultShow }), this.text, h("slot", { key: '
|
|
74
|
+
}, defaultShow: this.defaultShow }), this.text, h("slot", { key: '33b71eda3f8d5e3c5f711edac7ed7974b09843a8' }))));
|
|
65
75
|
}
|
|
66
76
|
static get is() { return "tds-tooltip"; }
|
|
67
77
|
static get encapsulation() { return "scoped"; }
|
|
@@ -263,8 +273,34 @@ export class TdsTooltip {
|
|
|
263
273
|
"attribute": "offset-distance",
|
|
264
274
|
"reflect": false,
|
|
265
275
|
"defaultValue": "8"
|
|
276
|
+
},
|
|
277
|
+
"tdsAriaDescribedby": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "string",
|
|
282
|
+
"resolved": "string",
|
|
283
|
+
"references": {}
|
|
284
|
+
},
|
|
285
|
+
"required": false,
|
|
286
|
+
"optional": false,
|
|
287
|
+
"docs": {
|
|
288
|
+
"tags": [],
|
|
289
|
+
"text": "Sets the aria-describedby attribute"
|
|
290
|
+
},
|
|
291
|
+
"attribute": "tds-aria-describedby",
|
|
292
|
+
"reflect": false
|
|
266
293
|
}
|
|
267
294
|
};
|
|
268
295
|
}
|
|
269
296
|
static get elementRef() { return "host"; }
|
|
297
|
+
static get listeners() {
|
|
298
|
+
return [{
|
|
299
|
+
"name": "keydown",
|
|
300
|
+
"method": "handleKeyDown",
|
|
301
|
+
"target": "window",
|
|
302
|
+
"capture": false,
|
|
303
|
+
"passive": false
|
|
304
|
+
}];
|
|
305
|
+
}
|
|
270
306
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import AxeBuilder from "@axe-core/playwright";
|
|
2
|
-
const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region'];
|
|
2
|
+
const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region', 'color-contrast'];
|
|
3
3
|
export const tegelAnalyze = async (page) => new AxeBuilder({ page }).disableRules(disabledRules).analyze();
|