@scania/tegel 1.26.0 → 1.27.0-toast-aria-live.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/index-ca8040ad.js +4 -4
- 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-modal.cjs.entry.js +74 -2
- 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 +21 -9
- package/dist/cjs/tds-toast.cjs.entry.js +11 -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/modal/modal.js +103 -3
- package/dist/collection/components/popover-core/tds-popover-core.css +596 -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.css +11 -6
- package/dist/collection/components/textarea/textarea.js +38 -8
- package/dist/collection/components/toast/toast.css +1 -1
- package/dist/collection/components/toast/toast.js +45 -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-17338bcb.js +115 -0
- 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-60ff84f2.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-b1d21573.js → p-a1181b1f.js} +1 -1
- package/dist/components/p-e71e3b2e.js +2052 -0
- 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 +78 -4
- 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 +36 -11
- package/dist/components/tds-toast.js +14 -5
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +1 -102
- package/dist/esm/index-51d04e39.js +4 -4
- 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-modal.entry.js +74 -2
- 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 +21 -9
- package/dist/esm/tds-toast.entry.js +11 -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-125a6b06.entry.js +1 -0
- package/dist/tegel/p-28517288.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-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-843413ba.entry.js +1 -0
- 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-ad9a2141.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/modal/modal.d.ts +6 -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/textarea/textarea.d.ts +7 -4
- package/dist/types/components/toast/toast.d.ts +5 -0
- package/dist/types/components/tooltip/tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +146 -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-4e298888.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-b35e7208.entry.js +0 -1
- package/dist/tegel/p-b6526302.entry.js +0 -1
- package/dist/tegel/p-b686f1ad.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
|
}
|
|
@@ -179,8 +179,13 @@
|
|
|
179
179
|
color: var(--tds-textarea-helper-error);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
.textarea-disabled {
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
}
|
|
182
185
|
.textarea-disabled .textarea-input {
|
|
183
186
|
border-bottom-color: transparent;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
user-select: none;
|
|
184
189
|
}
|
|
185
190
|
.textarea-disabled .textarea-label {
|
|
186
191
|
color: var(--tds-textarea-disabled-label);
|
|
@@ -219,13 +224,13 @@
|
|
|
219
224
|
.textarea-readonly .textarea-icon__readonly {
|
|
220
225
|
display: block;
|
|
221
226
|
}
|
|
222
|
-
.textarea-readonly .textarea-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
.textarea-readonly .textfield-input {
|
|
226
|
-
padding-right: 54px;
|
|
227
|
-
background-color: transparent;
|
|
227
|
+
.textarea-readonly .textarea-input {
|
|
228
|
+
border: 1px solid var(--tds-textarea-border-bottom-read-only-color);
|
|
228
229
|
}
|
|
229
230
|
.textarea-readonly .textfield-container {
|
|
230
231
|
background-color: transparent;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.textarea-readonly:has(.textarea-icon__readonly) .textarea-input {
|
|
235
|
+
padding-right: 54px;
|
|
231
236
|
}
|
|
@@ -11,6 +11,7 @@ export class TdsTextarea {
|
|
|
11
11
|
this.value = '';
|
|
12
12
|
this.disabled = false;
|
|
13
13
|
this.readOnly = false;
|
|
14
|
+
this.hideReadOnlyIcon = false;
|
|
14
15
|
this.state = 'default';
|
|
15
16
|
this.maxLength = undefined;
|
|
16
17
|
this.modeVariant = null;
|
|
@@ -27,8 +28,10 @@ export class TdsTextarea {
|
|
|
27
28
|
}
|
|
28
29
|
// Data input event in value prop
|
|
29
30
|
handleInput(event) {
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
if (event.target instanceof HTMLInputElement) {
|
|
32
|
+
this.value = event.target.value;
|
|
33
|
+
this.tdsInput.emit(event);
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
/* Set the input as focus when clicking the whole textarea with suffix/prefix */
|
|
34
37
|
handleFocus(event) {
|
|
@@ -36,21 +39,30 @@ export class TdsTextarea {
|
|
|
36
39
|
this.focusInput = true;
|
|
37
40
|
this.tdsFocus.emit(event);
|
|
38
41
|
}
|
|
42
|
+
setModeVariant(modeVariant) {
|
|
43
|
+
if (this.readOnly && modeVariant === 'primary') {
|
|
44
|
+
return 'secondary';
|
|
45
|
+
}
|
|
46
|
+
if (this.readOnly && modeVariant === 'secondary') {
|
|
47
|
+
return 'primary';
|
|
48
|
+
}
|
|
49
|
+
return modeVariant;
|
|
50
|
+
}
|
|
39
51
|
render() {
|
|
40
52
|
var _a;
|
|
41
|
-
return (h("div", { key: '
|
|
53
|
+
return (h("div", { key: 'd302999a8062b0b33a9caf35843f7673c2a7dbe5', class: {
|
|
42
54
|
'textarea-container': true,
|
|
43
55
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
44
56
|
'textarea-focus': this.focusInput,
|
|
45
57
|
'textarea-disabled': this.disabled,
|
|
46
|
-
'textarea-readonly': this.readOnly,
|
|
47
|
-
[`tds-mode-variant-${this.modeVariant}`]:
|
|
58
|
+
'textarea-readonly': !this.disabled && this.readOnly,
|
|
59
|
+
[`tds-mode-variant-${this.setModeVariant(this.modeVariant)}`]: true,
|
|
48
60
|
'textarea-data': this.value !== '',
|
|
49
61
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
50
62
|
'no-min-width': this.noMinWidth,
|
|
51
|
-
} }, this.labelPosition !== 'no-label' && h("span", { key: '
|
|
63
|
+
} }, this.labelPosition !== 'no-label' && h("span", { key: 'c88679ff2c209f8d9e67f4a6954181acb2cd2c3f', class: 'textarea-label' }, this.label), h("div", { key: '7750aecde5b145d032a1c19d6037bab7de95012d', class: "textarea-wrapper" }, h("textarea", { key: '6477bc17ae9823a17d00489c0f7401df65161552', class: 'textarea-input', ref: (inputEl) => {
|
|
52
64
|
this.textEl = inputEl;
|
|
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) => {
|
|
65
|
+
}, disabled: this.disabled, readonly: !this.disabled && 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
66
|
if (!this.readOnly) {
|
|
55
67
|
this.handleFocus(event);
|
|
56
68
|
}
|
|
@@ -58,7 +70,7 @@ export class TdsTextarea {
|
|
|
58
70
|
if (!this.readOnly) {
|
|
59
71
|
this.handleBlur(event);
|
|
60
72
|
}
|
|
61
|
-
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '
|
|
73
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: 'abe2829484359e0c2ceac243f3fecd8584574091', class: "textarea-resizer-icon" }, h("svg", { key: '03c6b48ee0892108e72234531b619cc3f4795713', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '5622e03d58b6d1ce550709fc5b874860660938a5', "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" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '7b4535432e2f8a83d896893ca63823ac57797bdd', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: 'b7a0fda48597a2e1821a2f1fbf126e8d40bdcc3b', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'a8a29025a599d62f34fa443ec046903e86e9aa3b', id: "readonly-tooltip", name: "edit_inactive" })))), h("span", { key: 'af2692509fe625ac0266ed1e93de69b6b42c889c', class: 'textarea-helper' }, this.state === 'error' && !this.readOnly && h("tds-icon", { key: 'a5e26118214f35e650a15a66334369e02a614c3f', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '4a71559023db5c584dbfc39595cdfd07e8a1dafc', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'f74611ecfb8082ce9d030546e7debdf4c9e98738', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
62
74
|
}
|
|
63
75
|
static get is() { return "tds-textarea"; }
|
|
64
76
|
static get encapsulation() { return "scoped"; }
|
|
@@ -251,6 +263,24 @@ export class TdsTextarea {
|
|
|
251
263
|
"reflect": false,
|
|
252
264
|
"defaultValue": "false"
|
|
253
265
|
},
|
|
266
|
+
"hideReadOnlyIcon": {
|
|
267
|
+
"type": "boolean",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "boolean",
|
|
271
|
+
"resolved": "boolean",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": "Hide the readonly icon"
|
|
279
|
+
},
|
|
280
|
+
"attribute": "hide-read-only-icon",
|
|
281
|
+
"reflect": false,
|
|
282
|
+
"defaultValue": "false"
|
|
283
|
+
},
|
|
254
284
|
"state": {
|
|
255
285
|
"type": "string",
|
|
256
286
|
"mutable": false,
|