@scania/tegel 1.27.0-toast-aria-live.0 → 1.27.1
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-dropdown_2.cjs.entry.js +8 -8
- package/dist/cjs/tds-footer-group.cjs.entry.js +27 -5
- package/dist/cjs/tds-footer-item.cjs.entry.js +2 -2
- package/dist/cjs/tds-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +6 -2
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +26 -3
- package/dist/cjs/tds-header-hamburger.cjs.entry.js +7 -1
- package/dist/cjs/tds-header-launcher-button.cjs.entry.js +2 -1
- package/dist/cjs/tds-header-launcher.cjs.entry.js +23 -2
- package/dist/cjs/tds-icon.cjs.entry.js +3 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-modal.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +3 -2
- package/dist/cjs/tds-popover-core.cjs.entry.js +55 -11
- package/dist/cjs/tds-popover-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/tds-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/tds-radio-button.cjs.entry.js +3 -1
- package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tds-step.cjs.entry.js +2 -1
- package/dist/cjs/tds-stepper.cjs.entry.js +2 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +31 -16
- package/dist/cjs/tds-textarea.cjs.entry.js +9 -3
- package/dist/cjs/tds-toast.cjs.entry.js +3 -3
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
- package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +8 -8
- package/dist/collection/components/footer/footer-group/footer-group.css +23 -21
- package/dist/collection/components/footer/footer-group/footer-group.js +55 -5
- package/dist/collection/components/footer/footer-item/footer-item.css +17 -17
- package/dist/collection/components/footer/footer-item/footer-item.js +2 -2
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.css +1 -1
- package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +6 -2
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +49 -3
- package/dist/collection/components/header/header-hamburger/header-hamburger.js +30 -1
- package/dist/collection/components/header/header-launcher/header-launcher.js +50 -2
- package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +19 -1
- package/dist/collection/components/icon/icon.js +21 -2
- package/dist/collection/components/modal/modal.css +48 -43
- package/dist/collection/components/popover-canvas/popover-canvas.js +21 -2
- package/dist/collection/components/popover-core/popover-core.js +63 -10
- package/dist/collection/components/popover-core/tds-popover-core.css +31 -40
- package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.js +2 -2
- package/dist/collection/components/popover-menu/popover-menu.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +37 -1
- package/dist/collection/components/spinner/spinner.css +62 -39
- package/dist/collection/components/stepper/step/step.js +19 -1
- package/dist/collection/components/stepper/stepper.js +20 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +0 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -3
- package/dist/collection/components/text-field/text-field.css +21 -9
- package/dist/collection/components/text-field/text-field.js +48 -15
- package/dist/collection/components/textarea/textarea.js +26 -3
- 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 +2 -2
- package/dist/components/{p-2d93a742.js → p-1c606f82.js} +1 -1
- package/dist/components/{p-e71e3b2e.js → p-252f3d4d.js} +59 -13
- package/dist/components/{p-17338bcb.js → p-3dcfe1f4.js} +3 -3
- package/dist/components/{p-60ff84f2.js → p-789bb453.js} +5 -3
- package/dist/components/{p-4487c541.js → p-92fb75a7.js} +4 -2
- package/dist/components/{p-663b8e51.js → p-c0b84c59.js} +9 -9
- package/dist/components/{p-83db8b35.js → p-f8a36676.js} +5 -3
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-banner.js +1 -1
- 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-tabs.js +1 -1
- package/dist/components/tds-footer-group.js +32 -8
- package/dist/components/tds-footer-item.js +3 -3
- package/dist/components/tds-footer.js +1 -1
- package/dist/components/tds-header-brand-symbol.js +6 -2
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +31 -7
- package/dist/components/tds-header-hamburger.js +11 -3
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher.js +29 -7
- package/dist/components/tds-icon.js +1 -1
- package/dist/components/tds-inline-tabs.js +2 -2
- package/dist/components/tds-message.js +1 -1
- package/dist/components/tds-modal.js +2 -2
- package/dist/components/tds-navigation-tabs.js +2 -2
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu-item.js +2 -2
- package/dist/components/tds-popover-menu.js +2 -2
- package/dist/components/tds-radio-button.js +6 -2
- 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-spinner.js +1 -1
- package/dist/components/tds-step.js +4 -2
- package/dist/components/tds-stepper.js +4 -2
- package/dist/components/tds-table-body-input-wrapper.js +1 -1
- package/dist/components/tds-table-footer.js +3 -3
- package/dist/components/tds-table-header-input-wrapper.js +1 -1
- package/dist/components/tds-table-toolbar.js +1 -1
- package/dist/components/tds-text-field.js +33 -17
- package/dist/components/tds-textarea.js +13 -6
- package/dist/components/tds-toast.js +4 -4
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +8 -8
- package/dist/esm/tds-footer-group.entry.js +27 -5
- package/dist/esm/tds-footer-item.entry.js +3 -3
- package/dist/esm/tds-footer.entry.js +1 -1
- package/dist/esm/tds-header-brand-symbol.entry.js +6 -2
- package/dist/esm/tds-header-dropdown.entry.js +26 -3
- package/dist/esm/tds-header-hamburger.entry.js +7 -1
- package/dist/esm/tds-header-launcher-button.entry.js +2 -1
- package/dist/esm/tds-header-launcher.entry.js +23 -2
- package/dist/esm/tds-icon.entry.js +3 -2
- package/dist/esm/tds-inline-tabs.entry.js +1 -1
- package/dist/esm/tds-modal.entry.js +1 -1
- package/dist/esm/tds-navigation-tabs.entry.js +1 -1
- package/dist/esm/tds-popover-canvas.entry.js +3 -2
- package/dist/esm/tds-popover-core.entry.js +55 -11
- package/dist/esm/tds-popover-menu-item.entry.js +2 -2
- package/dist/esm/tds-popover-menu.entry.js +1 -1
- package/dist/esm/tds-radio-button.entry.js +3 -1
- package/dist/esm/tds-spinner.entry.js +1 -1
- package/dist/esm/tds-step.entry.js +2 -1
- package/dist/esm/tds-stepper.entry.js +2 -1
- package/dist/esm/tds-text-field.entry.js +31 -16
- package/dist/esm/tds-textarea.entry.js +9 -3
- package/dist/esm/tds-toast.entry.js +3 -3
- package/dist/esm/tds-toggle.entry.js +2 -2
- package/dist/esm/tds-tooltip.entry.js +2 -2
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/{p-ad9a2141.entry.js → p-033d991e.entry.js} +1 -1
- package/dist/tegel/p-24db6b5b.entry.js +1 -0
- package/dist/tegel/p-27a4a7d0.entry.js +1 -0
- package/dist/tegel/p-28cf7204.entry.js +1 -0
- package/dist/tegel/p-302fea99.entry.js +1 -0
- package/dist/tegel/p-31bc440c.entry.js +1 -0
- package/dist/tegel/p-3e9ca19a.entry.js +1 -0
- package/dist/tegel/p-44ac6a20.entry.js +1 -0
- package/dist/tegel/{p-769d0503.entry.js → p-46205cfb.entry.js} +1 -1
- package/dist/tegel/p-54a20280.entry.js +1 -0
- package/dist/tegel/p-5a3ff0d3.entry.js +1 -0
- package/dist/tegel/p-660176d6.entry.js +1 -0
- package/dist/tegel/p-68e10acc.entry.js +1 -0
- package/dist/tegel/{p-eaa279dd.entry.js → p-81111221.entry.js} +1 -1
- package/dist/tegel/{p-668b7662.entry.js → p-8d7bf652.entry.js} +1 -1
- package/dist/tegel/p-b58f68f0.entry.js +1 -0
- package/dist/tegel/{p-5ba254ee.entry.js → p-c10be10e.entry.js} +1 -1
- package/dist/tegel/p-c71acb02.entry.js +1 -0
- package/dist/tegel/p-e1abd593.entry.js +1 -0
- package/dist/tegel/p-e3c3bdac.entry.js +1 -0
- package/dist/tegel/p-e46744bc.entry.js +1 -0
- package/dist/tegel/p-ea9e7345.entry.js +1 -0
- package/dist/tegel/{p-97f10223.entry.js → p-eec22b6b.entry.js} +1 -1
- package/dist/tegel/p-f034fc0c.entry.js +1 -0
- package/dist/tegel/p-fa342278.entry.js +1 -0
- package/dist/tegel/{p-b9f81e53.entry.js → p-fc6196c4.entry.js} +1 -1
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/footer/footer-group/footer-group.d.ts +7 -0
- package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +1 -1
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +4 -0
- package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +3 -0
- package/dist/types/components/header/header-launcher/header-launcher.d.ts +4 -0
- package/dist/types/components/header/header-launcher-button/header-launcher-button.d.ts +2 -0
- package/dist/types/components/icon/icon.d.ts +2 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
- package/dist/types/components/popover-core/popover-core.d.ts +4 -0
- package/dist/types/components/radio-button/radio-button.d.ts +4 -0
- package/dist/types/components/stepper/step/step.d.ts +1 -0
- package/dist/types/components/stepper/stepper.d.ts +2 -0
- package/dist/types/components/text-field/text-field.d.ts +6 -4
- package/dist/types/components/textarea/textarea.d.ts +3 -0
- package/dist/types/components.d.ts +98 -0
- package/package.json +1 -1
- package/dist/tegel/p-035e58e6.entry.js +0 -1
- package/dist/tegel/p-125a6b06.entry.js +0 -1
- package/dist/tegel/p-28517288.entry.js +0 -1
- package/dist/tegel/p-288a09ef.entry.js +0 -1
- package/dist/tegel/p-4f5f152a.entry.js +0 -1
- package/dist/tegel/p-542d7b3e.entry.js +0 -1
- package/dist/tegel/p-5a7110b8.entry.js +0 -1
- package/dist/tegel/p-5db5c8f4.entry.js +0 -1
- package/dist/tegel/p-654785d2.entry.js +0 -1
- package/dist/tegel/p-746e2927.entry.js +0 -1
- package/dist/tegel/p-754a4921.entry.js +0 -1
- package/dist/tegel/p-843413ba.entry.js +0 -1
- package/dist/tegel/p-aef6b130.entry.js +0 -1
- package/dist/tegel/p-b114ec3d.entry.js +0 -1
- package/dist/tegel/p-b39ffad4.entry.js +0 -1
- package/dist/tegel/p-c56be8d1.entry.js +0 -1
- package/dist/tegel/p-dfbbaefd.entry.js +0 -1
- package/dist/tegel/p-ea3e071f.entry.js +0 -1
- package/dist/tegel/p-ee7f07ae.entry.js +0 -1
|
@@ -17,9 +17,11 @@ export class TdsRadioButton {
|
|
|
17
17
|
this.checked = false;
|
|
18
18
|
this.required = false;
|
|
19
19
|
this.disabled = false;
|
|
20
|
+
this.tdsAriaLabel = undefined;
|
|
21
|
+
this.tdsTabIndex = undefined;
|
|
20
22
|
}
|
|
21
23
|
render() {
|
|
22
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: '4fbbd82a09e16551774b0b81eefa4f8e54ea3650', class: "tds-radio-button" }, h("input", { key: 'c7da40a753c5c7116810918e6349076bd9fdbb53', "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: '869ccd92f5b77a5475d409ae6b2f6d20df37c72d', htmlFor: this.radioId }, h("slot", { key: 'bdeabd6fe808498a0b2b08edb4a7ec33e6953ffe', name: "label" }))));
|
|
23
25
|
}
|
|
24
26
|
static get is() { return "tds-radio-button"; }
|
|
25
27
|
static get encapsulation() { return "scoped"; }
|
|
@@ -140,6 +142,40 @@ export class TdsRadioButton {
|
|
|
140
142
|
"attribute": "disabled",
|
|
141
143
|
"reflect": false,
|
|
142
144
|
"defaultValue": "false"
|
|
145
|
+
},
|
|
146
|
+
"tdsAriaLabel": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "string",
|
|
151
|
+
"resolved": "string",
|
|
152
|
+
"references": {}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Provides an accessible name for the component"
|
|
159
|
+
},
|
|
160
|
+
"attribute": "tds-aria-label",
|
|
161
|
+
"reflect": false
|
|
162
|
+
},
|
|
163
|
+
"tdsTabIndex": {
|
|
164
|
+
"type": "number",
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "number",
|
|
168
|
+
"resolved": "number",
|
|
169
|
+
"references": {}
|
|
170
|
+
},
|
|
171
|
+
"required": false,
|
|
172
|
+
"optional": false,
|
|
173
|
+
"docs": {
|
|
174
|
+
"tags": [],
|
|
175
|
+
"text": "Provides a tabindex used when radio buttons are grouped"
|
|
176
|
+
},
|
|
177
|
+
"attribute": "tds-tab-index",
|
|
178
|
+
"reflect": false
|
|
143
179
|
}
|
|
144
180
|
};
|
|
145
181
|
}
|
|
@@ -1,18 +1,41 @@
|
|
|
1
|
+
/* Component variables aka overrides */
|
|
1
2
|
:root {
|
|
2
|
-
--
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
--
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
--
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
--spinner-background-inverted: rgba(255, 255, 255, 1);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:root,
|
|
7
|
+
.scania,
|
|
8
|
+
.scania .tds-mode-light {
|
|
9
|
+
--spinner-background: rgba(43, 112, 211, 1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.scania .tds-mode-dark {
|
|
13
|
+
--spinner-background: rgba(74, 137, 243, 1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.traton,
|
|
17
|
+
.traton .tds-mode-light {
|
|
18
|
+
--spinner-background: rgba(0, 72, 82, 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.traton .tds-mode-dark {
|
|
22
|
+
--spinner-background: rgba(194, 191, 182, 1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Component variables */
|
|
26
|
+
:root {
|
|
27
|
+
--spinner-speed: 1.8s;
|
|
28
|
+
--spinner-speed-lg: 2s;
|
|
29
|
+
--spinner-radius-xs: 8px;
|
|
30
|
+
--spinner-radius-sm: 12px;
|
|
31
|
+
--spinner-radius-md: 26px;
|
|
32
|
+
--spinner-radius-lg: 42px;
|
|
33
|
+
--spinner-radius: var(--spinner-radius-lg);
|
|
34
|
+
--spinner-stroke-width-xs: 3px;
|
|
35
|
+
--spinner-stroke-width-sm: 4px;
|
|
36
|
+
--spinner-stroke-width-md: 6px;
|
|
37
|
+
--spinner-stroke-width-lg: 8px;
|
|
38
|
+
--spinner-stroke-width: var(--spinner-stroke-width-lg);
|
|
16
39
|
--PI: 3.14159265358979;
|
|
17
40
|
}
|
|
18
41
|
|
|
@@ -25,53 +48,53 @@
|
|
|
25
48
|
}
|
|
26
49
|
|
|
27
50
|
.tds-spinner-svg {
|
|
28
|
-
width: calc(var(--
|
|
29
|
-
height: calc(var(--
|
|
51
|
+
width: calc(var(--spinner-radius) * 2);
|
|
52
|
+
height: calc(var(--spinner-radius) * 2);
|
|
30
53
|
transform: scale(-1, 1) rotate(-90deg);
|
|
31
54
|
}
|
|
32
55
|
.tds-spinner-svg-xs {
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
56
|
+
--spinner-radius: var(--spinner-radius-xs);
|
|
57
|
+
--spinner-stroke-width: var(--spinner-stroke-width-xs);
|
|
58
|
+
--spinner-animation-speed: var(--spinner-speed);
|
|
36
59
|
}
|
|
37
60
|
.tds-spinner-svg-sm {
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
61
|
+
--spinner-radius: var(--spinner-radius-sm);
|
|
62
|
+
--spinner-stroke-width: var(--spinner-stroke-width-sm);
|
|
63
|
+
--spinner-animation-speed: var(--spinner-speed);
|
|
41
64
|
}
|
|
42
65
|
.tds-spinner-svg-md {
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
--
|
|
66
|
+
--spinner-radius: var(--spinner-radius-md);
|
|
67
|
+
--spinner-stroke-width: var(--spinner-stroke-width-md);
|
|
68
|
+
--spinner-animation-speed: var(--spinner-speed);
|
|
46
69
|
}
|
|
47
70
|
.tds-spinner-svg-lg {
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--
|
|
71
|
+
--spinner-radius: var(--spinner-radius-lg);
|
|
72
|
+
--spinner-stroke-width: var(--spinner-stroke-width-lg);
|
|
73
|
+
--spinner-animation-speed: var(--spinner-speed-lg);
|
|
51
74
|
}
|
|
52
75
|
|
|
53
76
|
.tds-spinner-circle {
|
|
54
|
-
cx: var(--
|
|
55
|
-
cy: var(--
|
|
56
|
-
r: calc(var(--
|
|
77
|
+
cx: var(--spinner-radius);
|
|
78
|
+
cy: var(--spinner-radius);
|
|
79
|
+
r: calc(var(--spinner-radius) - var(--spinner-stroke-width) / 2);
|
|
57
80
|
fill: none;
|
|
58
|
-
--
|
|
59
|
-
stroke-dasharray: var(--
|
|
60
|
-
stroke-width: var(--
|
|
61
|
-
animation: dash var(--
|
|
81
|
+
--spinner-stroke-dash: calc((2 * var(--PI)) * var(--spinner-radius));
|
|
82
|
+
stroke-dasharray: var(--spinner-stroke-dash);
|
|
83
|
+
stroke-width: var(--spinner-stroke-width);
|
|
84
|
+
animation: dash var(--spinner-animation-speed) cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
|
|
62
85
|
}
|
|
63
86
|
.tds-spinner-circle-standard {
|
|
64
|
-
stroke: var(--
|
|
87
|
+
stroke: var(--spinner-background);
|
|
65
88
|
}
|
|
66
89
|
.tds-spinner-circle-inverted {
|
|
67
|
-
stroke: var(--
|
|
90
|
+
stroke: var(--spinner-background-inverted);
|
|
68
91
|
}
|
|
69
92
|
|
|
70
93
|
@keyframes dash {
|
|
71
94
|
from {
|
|
72
|
-
stroke-dashoffset: calc(-1 * var(--
|
|
95
|
+
stroke-dashoffset: calc(-1 * var(--spinner-stroke-dash));
|
|
73
96
|
}
|
|
74
97
|
to {
|
|
75
|
-
stroke-dashoffset: var(--
|
|
98
|
+
stroke-dashoffset: var(--spinner-stroke-dash);
|
|
76
99
|
}
|
|
77
100
|
}
|
|
@@ -12,6 +12,7 @@ export class TdsStep {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
this.index = undefined;
|
|
14
14
|
this.state = 'upcoming';
|
|
15
|
+
this.tdsAriaCurrent = undefined;
|
|
15
16
|
this.hideLabels = undefined;
|
|
16
17
|
this.size = undefined;
|
|
17
18
|
this.orientation = undefined;
|
|
@@ -39,7 +40,7 @@ export class TdsStep {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
render() {
|
|
42
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '52d3dba71d4c2168b01ded26bcee31f8f80ffa16' }, h("div", { key: 'da5bc2ef45609d027885a03a3d34e21ee1eed015', role: "listitem", "aria-current": this.tdsAriaCurrent, tabIndex: -1, "aria-label": `Step ${this.index}: ${this.state}`, class: `${this.size} ${this.orientation} text-${this.labelPosition} ${this.hideLabels ? 'hide-labels' : ''}` }, h("span", { key: 'a0f65e54f04848d7440c7427ac42e820c51ae609', class: `${this.state} content-container` }, this.state === 'success' || this.state === 'error' ? (h("tds-icon", { "aria-hidden": "true", svgTitle: `tds-step-icon-${this.stepperId}`, class: 'tds-step-icon', name: this.state === 'success' ? 'tick' : 'warning', size: this.size === 'lg' ? '20px' : '16px' })) : (h("span", { class: "index-container" }, this.index))), !this.hideLabels && (h("div", { key: '51011c20479712a9caa7719975032482c2191977', "aria-hidden": "true", class: `label ${this.size} ${this.state}` }, h("slot", { key: '5556c301e1119a09e0e8c63ac46af11d88f98c23', name: "label" }))))));
|
|
43
44
|
}
|
|
44
45
|
static get is() { return "tds-step"; }
|
|
45
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -89,6 +90,23 @@ export class TdsStep {
|
|
|
89
90
|
"attribute": "state",
|
|
90
91
|
"reflect": false,
|
|
91
92
|
"defaultValue": "'upcoming'"
|
|
93
|
+
},
|
|
94
|
+
"tdsAriaCurrent": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "string",
|
|
99
|
+
"resolved": "string",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": ""
|
|
107
|
+
},
|
|
108
|
+
"attribute": "tds-aria-current",
|
|
109
|
+
"reflect": false
|
|
92
110
|
}
|
|
93
111
|
};
|
|
94
112
|
}
|
|
@@ -10,6 +10,7 @@ export class TdsStepper {
|
|
|
10
10
|
this.size = 'lg';
|
|
11
11
|
this.hideLabels = false;
|
|
12
12
|
this.stepperId = generateUniqueId();
|
|
13
|
+
this.tdsAriaLabel = 'Progress steps';
|
|
13
14
|
}
|
|
14
15
|
componentWillLoad() {
|
|
15
16
|
if (this.orientation === 'vertical') {
|
|
@@ -45,7 +46,7 @@ export class TdsStepper {
|
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '1e8a8233006dd3245e647140974b2284d3d00f1b' }, h("div", { key: '7641e3e3fd3b0a36427b62b6074ff4a281d7bb28', role: "list", "aria-label": this.tdsAriaLabel, class: `${this.orientation} text-position-${this.labelPosition} ${this.size}` }, h("slot", { key: '49f5ede099a422b04a5950269a2fa94816280ee1' }))));
|
|
49
50
|
}
|
|
50
51
|
static get is() { return "tds-stepper"; }
|
|
51
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,6 +151,24 @@ export class TdsStepper {
|
|
|
150
151
|
"attribute": "stepper-id",
|
|
151
152
|
"reflect": false,
|
|
152
153
|
"defaultValue": "generateUniqueId()"
|
|
154
|
+
},
|
|
155
|
+
"tdsAriaLabel": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"mutable": false,
|
|
158
|
+
"complexType": {
|
|
159
|
+
"original": "string",
|
|
160
|
+
"resolved": "string",
|
|
161
|
+
"references": {}
|
|
162
|
+
},
|
|
163
|
+
"required": false,
|
|
164
|
+
"optional": false,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Label for the stepper component, for screen reader users"
|
|
168
|
+
},
|
|
169
|
+
"attribute": "tds-aria-label",
|
|
170
|
+
"reflect": false,
|
|
171
|
+
"defaultValue": "'Progress steps'"
|
|
153
172
|
}
|
|
154
173
|
};
|
|
155
174
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: flex;
|
|
4
|
-
background-color: var(--tds-
|
|
4
|
+
background-color: var(--tds-navigation-tabs-background);
|
|
5
5
|
position: relative;
|
|
6
6
|
}
|
|
7
7
|
:host * {
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
:host::after {
|
|
11
11
|
content: " ";
|
|
12
12
|
display: block;
|
|
13
|
-
border-bottom: 1px solid var(--tds-
|
|
14
|
-
opacity: var(--tds-inline-tabs-horizontal-divider-opacity);
|
|
13
|
+
border-bottom: 1px solid var(--tds-navigation-tabs-horizontal-divider-background);
|
|
15
14
|
left: 0;
|
|
16
15
|
right: 0;
|
|
17
16
|
bottom: 0;
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
color: var(--tds-text-field-placeholder);
|
|
18
18
|
}
|
|
19
19
|
.text-field-input-lg:disabled {
|
|
20
|
-
|
|
20
|
+
user-select: none;
|
|
21
|
+
pointer-events: none;
|
|
21
22
|
background-color: var(--tds-text-field-background-disabled);
|
|
22
23
|
color: var(--tds-text-field-color-disabled);
|
|
23
24
|
}
|
|
@@ -47,7 +48,8 @@
|
|
|
47
48
|
color: var(--tds-text-field-placeholder);
|
|
48
49
|
}
|
|
49
50
|
.text-field-input-md:disabled {
|
|
50
|
-
|
|
51
|
+
user-select: none;
|
|
52
|
+
pointer-events: none;
|
|
51
53
|
background-color: var(--tds-text-field-background-disabled);
|
|
52
54
|
color: var(--tds-text-field-color-disabled);
|
|
53
55
|
}
|
|
@@ -77,7 +79,8 @@
|
|
|
77
79
|
color: var(--tds-text-field-placeholder);
|
|
78
80
|
}
|
|
79
81
|
.text-field-input-sm:disabled {
|
|
80
|
-
|
|
82
|
+
user-select: none;
|
|
83
|
+
pointer-events: none;
|
|
81
84
|
background-color: var(--tds-text-field-background-disabled);
|
|
82
85
|
color: var(--tds-text-field-color-disabled);
|
|
83
86
|
}
|
|
@@ -257,6 +260,7 @@
|
|
|
257
260
|
}
|
|
258
261
|
|
|
259
262
|
.form-text-field-disabled .text-field-container {
|
|
263
|
+
cursor: not-allowed;
|
|
260
264
|
border-bottom-color: transparent;
|
|
261
265
|
}
|
|
262
266
|
.form-text-field-disabled .text-field-slot-wrap-prefix > *,
|
|
@@ -292,7 +296,12 @@
|
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
.form-text-field-readonly {
|
|
295
|
-
|
|
299
|
+
user-select: auto; /* Allow text selection */
|
|
300
|
+
caret-color: transparent; /* Hide blinking cursor */
|
|
301
|
+
cursor: default;
|
|
302
|
+
}
|
|
303
|
+
.form-text-field-readonly .text-field-container {
|
|
304
|
+
border-bottom-color: var(--tds-text-field-border-bottom-readonly);
|
|
296
305
|
}
|
|
297
306
|
.form-text-field-readonly .text-field-icon__readonly {
|
|
298
307
|
display: block;
|
|
@@ -301,21 +310,24 @@
|
|
|
301
310
|
display: block;
|
|
302
311
|
}
|
|
303
312
|
.form-text-field-readonly .text-field-input {
|
|
304
|
-
padding-right: 54px;
|
|
305
313
|
background-color: transparent;
|
|
306
314
|
}
|
|
307
315
|
|
|
308
|
-
.form-text-field-
|
|
316
|
+
.form-text-field-readonly:has(.text-field-icon__readonly) .text-field-input {
|
|
317
|
+
padding-right: 54px;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.form-text-field-success:not(.form-text-field-readonly) .text-field-container {
|
|
309
321
|
border-bottom-color: var(--tds-text-field-border-bottom-success);
|
|
310
322
|
}
|
|
311
323
|
|
|
312
|
-
.form-text-field-error .text-field-helper {
|
|
324
|
+
.form-text-field-error:not(.form-text-field-readonly) .text-field-helper {
|
|
313
325
|
color: var(--tds-text-field-helper-error);
|
|
314
326
|
}
|
|
315
|
-
.form-text-field-error .text-field-container {
|
|
327
|
+
.form-text-field-error:not(.form-text-field-readonly) .text-field-container {
|
|
316
328
|
border-bottom-color: var(--tds-text-field-border-bottom-error);
|
|
317
329
|
}
|
|
318
|
-
.form-text-field-error .text-field-bar::before, .form-text-field-error .text-field-bar::after {
|
|
330
|
+
.form-text-field-error:not(.form-text-field-readonly) .text-field-bar::before, .form-text-field-error:not(.form-text-field-readonly) .text-field-bar::after {
|
|
319
331
|
background: var(--tds-text-field-bar-error);
|
|
320
332
|
}
|
|
321
333
|
|
|
@@ -16,6 +16,7 @@ export class TdsTextField {
|
|
|
16
16
|
this.value = '';
|
|
17
17
|
this.disabled = false;
|
|
18
18
|
this.readOnly = false;
|
|
19
|
+
this.hideReadOnlyIcon = false;
|
|
19
20
|
this.size = 'lg';
|
|
20
21
|
this.modeVariant = null;
|
|
21
22
|
this.noMinWidth = false;
|
|
@@ -24,14 +25,27 @@ export class TdsTextField {
|
|
|
24
25
|
this.maxLength = undefined;
|
|
25
26
|
this.autofocus = false;
|
|
26
27
|
this.tdsAriaLabel = undefined;
|
|
27
|
-
this.focusInput =
|
|
28
|
+
this.focusInput = false;
|
|
28
29
|
}
|
|
29
30
|
handleChange(event) {
|
|
30
31
|
this.tdsChange.emit(event);
|
|
31
32
|
}
|
|
32
33
|
// Data input event in value prop
|
|
33
34
|
handleInput(event) {
|
|
34
|
-
|
|
35
|
+
const inputEl = event.target;
|
|
36
|
+
let { value } = inputEl;
|
|
37
|
+
// Custom handling of number inputs when min/max are set
|
|
38
|
+
if (this.type === 'number') {
|
|
39
|
+
const numericValue = Number(value);
|
|
40
|
+
if (this.min !== undefined && numericValue < Number(this.min)) {
|
|
41
|
+
value = String(this.min);
|
|
42
|
+
}
|
|
43
|
+
if (this.max !== undefined && numericValue > Number(this.max)) {
|
|
44
|
+
value = String(this.max);
|
|
45
|
+
}
|
|
46
|
+
inputEl.value = value;
|
|
47
|
+
}
|
|
48
|
+
this.value = value;
|
|
35
49
|
this.tdsInput.emit(event);
|
|
36
50
|
}
|
|
37
51
|
/** Set the input as focus when clicking the whole Text Field with suffix/prefix */
|
|
@@ -60,33 +74,37 @@ export class TdsTextField {
|
|
|
60
74
|
var _a;
|
|
61
75
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
62
76
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
63
|
-
return (h("div", { key: '
|
|
77
|
+
return (h("div", { key: 'b15e2650ad5cb65cad16240834a569d89c787de6', class: {
|
|
64
78
|
'form-text-field': true,
|
|
65
79
|
'form-text-field-nomin': this.noMinWidth,
|
|
66
80
|
'text-field-focus': this.focusInput && !this.disabled,
|
|
67
81
|
'text-field-data': this.value !== '' && this.value !== null,
|
|
68
82
|
'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
|
|
69
83
|
'form-text-field-disabled': this.disabled,
|
|
70
|
-
'form-text-field-readonly': this.readOnly,
|
|
71
|
-
'tds-mode-variant-primary': this.
|
|
72
|
-
|
|
84
|
+
'form-text-field-readonly': this.disabled ? false : this.readOnly,
|
|
85
|
+
'tds-mode-variant-primary': this.readOnly
|
|
86
|
+
? this.modeVariant === 'secondary'
|
|
87
|
+
: this.modeVariant === 'primary',
|
|
88
|
+
'tds-mode-variant-secondary': this.readOnly
|
|
89
|
+
? this.modeVariant === 'primary'
|
|
90
|
+
: this.modeVariant === 'secondary',
|
|
73
91
|
'form-text-field-md': this.size === 'md',
|
|
74
92
|
'form-text-field-sm': this.size === 'sm',
|
|
75
93
|
'form-text-field-error': this.state === 'error',
|
|
76
94
|
'form-text-field-success': this.state === 'success',
|
|
77
|
-
} }, this.labelPosition === 'outside' && (h("div", { key: '
|
|
95
|
+
} }, this.labelPosition === 'outside' && (h("div", { key: 'a8d058d6e063cabf93cf859883b306bfeeb18319', class: "text-field-label-outside" }, h("label", { key: '6ee037a99fb88c38e1bbd967e74f609fcf4670dc', htmlFor: "text-field-input-element" }, this.label))), h("div", { key: 'e7e50a86f774f9d693a43690d75d381b3556124f', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '5f42f91a49235c9911f366920790942147eabefd', class: {
|
|
78
96
|
'text-field-slot-wrap-prefix': true,
|
|
79
97
|
'text-field-error': this.state === 'error',
|
|
80
98
|
'text-field-success': this.state === 'success',
|
|
81
99
|
'text-field-default': this.state === 'default',
|
|
82
|
-
} }, h("slot", { key: '
|
|
100
|
+
} }, h("slot", { key: 'a6093bd26cde5c76a1362b260aa44e6b4bf1aed5', name: "prefix" }))), h("div", { key: 'ae0ab4730cdede21de1accab8ed74440ec7084ae', class: "text-field-input-container" }, h("input", { key: '4a96bf3b95969d3a7c6e00487d36d3b0fbc720cc', ref: (inputEl) => {
|
|
83
101
|
this.textInput = inputEl;
|
|
84
102
|
}, class: {
|
|
85
103
|
'text-field-input': true,
|
|
86
104
|
'text-field-input-sm': this.size === 'sm',
|
|
87
105
|
'text-field-input-md': this.size === 'md',
|
|
88
106
|
'text-field-input-lg': this.size === 'lg',
|
|
89
|
-
}, type: this.type, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
|
|
107
|
+
}, type: this.type, disabled: this.disabled, readonly: this.disabled ? false : this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
|
|
90
108
|
if (!this.readOnly) {
|
|
91
109
|
this.handleFocus(event);
|
|
92
110
|
}
|
|
@@ -94,19 +112,16 @@ export class TdsTextField {
|
|
|
94
112
|
if (!this.readOnly) {
|
|
95
113
|
this.handleBlur(event);
|
|
96
114
|
}
|
|
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: '
|
|
115
|
+
}, "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: 'e9501e5e9af625a6efaca69b6d880a6063d9e1e3', class: "text-field-label-inside", htmlFor: "text-field-input-element" }, this.label))), h("div", { key: 'fed042784d9f96ffb658aaa7f83562fc4b696662', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: 'c66e08a4c15b09a3e340ffc1f249b49dae370a9f', class: {
|
|
98
116
|
'text-field-slot-wrap-suffix': true,
|
|
99
117
|
'text-field-error': this.state === 'error',
|
|
100
118
|
'text-field-success': this.state === 'success',
|
|
101
119
|
'text-field-default': this.state === 'default',
|
|
102
120
|
'tds-u-display-none': this.readOnly,
|
|
103
|
-
} }, h("slot", { key: '
|
|
104
|
-
'text-field-textcounter': true,
|
|
105
|
-
'text-field-textcounter-disabled': this.disabled,
|
|
106
|
-
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '744acd41ca6d968ee5dab7bd50ca52f5704b21dc', class: {
|
|
121
|
+
} }, h("slot", { key: '7caa1d97bcf8af6dc39976889a610027085421c9', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '62bc9b373fb3e02b18041dde126e59354e727b2b', class: "text-field-icon__readonly" }, h("tds-icon", { key: '8064a973aae69b47661defa941de2e7fb6167b57', name: "edit_inactive", size: "20px" }))), h("span", { key: '71a2bd9077e2fa03458b41fd8ab5733998f33bbe', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: 'f7110fc6ebff413d08feb61c8bf8bfd3aef3490c', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '3776b5499bda3e3027ee537de571ded883e319af', class: "text-field-helper" }, this.state === 'error' && (h("div", { key: 'f887f43d1007b20d237217bf56813680ed671495', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'ce50aeaa79974e0312307fab6a5b6d49bdfb501d', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '2bb64d74bee0003c2b68262852995573203703be', class: {
|
|
107
122
|
'text-field-textcounter-divider': true,
|
|
108
123
|
'text-field-textcounter-disabled': this.disabled,
|
|
109
|
-
} },
|
|
124
|
+
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
|
|
110
125
|
}
|
|
111
126
|
static get is() { return "tds-text-field"; }
|
|
112
127
|
static get encapsulation() { return "scoped"; }
|
|
@@ -299,6 +314,24 @@ export class TdsTextField {
|
|
|
299
314
|
"reflect": false,
|
|
300
315
|
"defaultValue": "false"
|
|
301
316
|
},
|
|
317
|
+
"hideReadOnlyIcon": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "boolean",
|
|
322
|
+
"resolved": "boolean",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": false,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": "Hides the read-only icon in the Text Field. Requires Read Only to be enabled."
|
|
330
|
+
},
|
|
331
|
+
"attribute": "hide-read-only-icon",
|
|
332
|
+
"reflect": false,
|
|
333
|
+
"defaultValue": "false"
|
|
334
|
+
},
|
|
302
335
|
"size": {
|
|
303
336
|
"type": "string",
|
|
304
337
|
"mutable": false,
|
|
@@ -17,6 +17,7 @@ export class TdsTextarea {
|
|
|
17
17
|
this.modeVariant = null;
|
|
18
18
|
this.autofocus = false;
|
|
19
19
|
this.noMinWidth = false;
|
|
20
|
+
this.tdsAriaLabel = undefined;
|
|
20
21
|
this.focusInput = undefined;
|
|
21
22
|
}
|
|
22
23
|
handleChange(event) {
|
|
@@ -48,9 +49,14 @@ export class TdsTextarea {
|
|
|
48
49
|
}
|
|
49
50
|
return modeVariant;
|
|
50
51
|
}
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
if (!this.tdsAriaLabel && !this.label) {
|
|
54
|
+
console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
51
57
|
render() {
|
|
52
58
|
var _a;
|
|
53
|
-
return (h("div", { key: '
|
|
59
|
+
return (h("div", { key: 'b50538b818f0e82cca94db22f91a8ee73e009ca7', class: {
|
|
54
60
|
'textarea-container': true,
|
|
55
61
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
56
62
|
'textarea-focus': this.focusInput,
|
|
@@ -60,7 +66,7 @@ export class TdsTextarea {
|
|
|
60
66
|
'textarea-data': this.value !== '',
|
|
61
67
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
62
68
|
'no-min-width': this.noMinWidth,
|
|
63
|
-
} }, this.labelPosition !== 'no-label' && h("
|
|
69
|
+
} }, this.labelPosition !== 'no-label' && (h("label", { key: 'f96e68827795a3402d4261ffab997e5c9292fd20', htmlFor: "textarea-element", class: 'textarea-label' }, this.label)), h("div", { key: '0ed06e68cc15d78d4afead9404e89040229edb6e', class: "textarea-wrapper" }, h("textarea", { key: 'a15b5762cc8288e0b0e9631707055091062d0e95', id: "textarea-element", class: 'textarea-input', ref: (inputEl) => {
|
|
64
70
|
this.textEl = inputEl;
|
|
65
71
|
}, 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) => {
|
|
66
72
|
if (!this.readOnly) {
|
|
@@ -70,7 +76,7 @@ export class TdsTextarea {
|
|
|
70
76
|
if (!this.readOnly) {
|
|
71
77
|
this.handleBlur(event);
|
|
72
78
|
}
|
|
73
|
-
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '
|
|
79
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": "textarea-helper-element" }), h("span", { key: '904e38bce9b98c8ea06428c26083bc3d7476b845', class: "textarea-resizer-icon" }, h("svg", { key: '59e3404d79da1dfad42788e5f6e90e47752d603e', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '8e91b396a4337c0c56b0e8131d96aae5595506d9', "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: '4c4629c89b4b2545a8482a0cd6c59b7c57888aa8', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: 'cae2de2a71c2891067303188f54d7c1b186886ff', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'a09a265f4684d2356886a23cdef4a570d8323c04', id: "readonly-tooltip", name: "edit_inactive" })))), h("span", { key: '5862f0cb512faf37724629642c6560bdde90e47e', class: 'textarea-helper', "aria-live": "assertive", id: "textarea-helper-element" }, this.state === 'error' && !this.readOnly && h("tds-icon", { key: 'cc0202e6e28daf0664fb3446fd4118e453e89cff', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '6e1c683c4036b8aa9924ca69d4dda6b2b3a5fd8a', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '2eb15f11eb7b8abe3741bc9d4dde13ba2fa02d8a', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
74
80
|
}
|
|
75
81
|
static get is() { return "tds-textarea"; }
|
|
76
82
|
static get encapsulation() { return "scoped"; }
|
|
@@ -369,6 +375,23 @@ export class TdsTextarea {
|
|
|
369
375
|
"attribute": "no-min-width",
|
|
370
376
|
"reflect": false,
|
|
371
377
|
"defaultValue": "false"
|
|
378
|
+
},
|
|
379
|
+
"tdsAriaLabel": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"mutable": false,
|
|
382
|
+
"complexType": {
|
|
383
|
+
"original": "string",
|
|
384
|
+
"resolved": "string",
|
|
385
|
+
"references": {}
|
|
386
|
+
},
|
|
387
|
+
"required": false,
|
|
388
|
+
"optional": false,
|
|
389
|
+
"docs": {
|
|
390
|
+
"tags": [],
|
|
391
|
+
"text": "Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true."
|
|
392
|
+
},
|
|
393
|
+
"attribute": "tds-aria-label",
|
|
394
|
+
"reflect": false
|
|
372
395
|
}
|
|
373
396
|
};
|
|
374
397
|
}
|
|
@@ -65,12 +65,12 @@ export class TdsToast {
|
|
|
65
65
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
66
66
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
67
67
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '57126c13e4498e7862026978aab347dbe7e24d63', "aria-live": this.tdsAriaLive, toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
69
69
|
hide: this.hidden,
|
|
70
70
|
show: !this.hidden,
|
|
71
|
-
} }, h("div", { key: '
|
|
71
|
+
} }, h("div", { key: '099c769d8f2e54b76eada969978e641b3f5c18ea', class: `
|
|
72
72
|
wrapper
|
|
73
|
-
${this.variant}` }, h("tds-icon", { key: '
|
|
73
|
+
${this.variant}` }, h("tds-icon", { key: '60fe4a91c42741be76f882fd82daa4ae3f5de545', name: this.getIconName(), size: "20px" }), h("div", { key: '5c5f4221726b14a38a6fb440a7f15570bb17b3cf', class: `content` }, h("div", { key: '2b53199e99ab3417160af38d81301a61e66eaef0', class: "header-subheader" }, this.header && h("div", { key: 'c98f680755ba45a8661ca46f6064c696ee61b6bb', class: "header" }, this.header), usesHeaderSlot && h("slot", { key: '5420edf38e156a811187eb6f5838bd8611818673', name: "header" }), this.subheader && h("div", { key: '9dc6d054f0f2ee3d179f25a8e75134d73ab426e2', class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { key: '726eec99d5f05bea48b5a30bf7e91a71099960f8', name: "subheader" })), usesActionsSlot && (h("div", { key: '1cb83584cdb4cc8e3d383ebdf5d470135f7573ab', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { key: '0950f174a2e62ffbec229ef24e4a999a318798cd', name: "actions" })))), this.closable && (h("button", { key: 'ee90c96c48a11e38f17acd8cb66a1619bd770e83', id: "my-button", "aria-label": this.tdsCloseAriaLabel, onClick: this.handleClose, class: "close" }, h("tds-icon", { key: '632aefc906f17bd0993c832f9c4c5a1ec8db1ccc', name: "cross", size: "20px" }))))));
|
|
74
74
|
}
|
|
75
75
|
static get is() { return "tds-toast"; }
|
|
76
76
|
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: '8f8a77827f524c049aa004d15372a78e7fad41e2', class: "tds-toggle" }, this.headline && (h("div", { key: '8e254412e80362807046a893fc3f7c42a0c376ba', class: {
|
|
42
42
|
'toggle-headline': true,
|
|
43
43
|
'disabled': this.disabled,
|
|
44
|
-
} }, this.headline)), h("input", { key: '
|
|
44
|
+
} }, this.headline)), h("input", { key: '47ed1307b67b61b1594006449fb1b4ccf6d031b8', "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: '75964d686710d6b4f8bbe365cc51c8aab3234d26', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'aeeaed1f37a160ce792df3f5115c75eaa0fd2c0a', name: "label" })))));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "tds-toggle"; }
|
|
47
47
|
static get encapsulation() { return "scoped"; }
|