@scania/tegel 1.32.0-navigation.missing.stories.0 → 1.32.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-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tds-badge.cjs.entry.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +1 -1
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/tds-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +9 -3
- package/dist/cjs/tds-chip.cjs.entry.js +1 -1
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +10 -3
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +32 -11
- package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-group.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-message.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-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-radio-button.cjs.entry.js +8 -2
- package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tds-step.cjs.entry.js +2 -2
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-textarea.cjs.entry.js +10 -3
- package/dist/cjs/tds-toast.cjs.entry.js +1 -1
- package/dist/cjs/tds-toggle.cjs.entry.js +9 -3
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +2 -1
- package/dist/collection/components/accordion/accordion.css +2 -1
- package/dist/collection/components/badge/badge.css +1 -1
- package/dist/collection/components/banner/banner.css +2 -1
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +2 -1
- package/dist/collection/components/button/button.css +60 -57
- package/dist/collection/components/checkbox/checkbox.css +5 -5
- package/dist/collection/components/checkbox/checkbox.js +25 -2
- package/dist/collection/components/chip/chip.css +4 -3
- package/dist/collection/components/datetime/datetime.js +27 -3
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.css +2 -1
- package/dist/collection/components/dropdown/dropdown.css +2 -2
- package/dist/collection/components/dropdown/dropdown.js +30 -9
- package/dist/collection/components/footer/footer-group/footer-group.css +3 -3
- package/dist/collection/components/footer/footer-item/footer-item.css +6 -4
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +2 -1
- package/dist/collection/components/header/header-item/header-item.css +2 -1
- package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.css +2 -1
- package/dist/collection/components/message/message.css +12 -1
- package/dist/collection/components/modal/modal.css +2 -1
- package/dist/collection/components/popover-core/tds-popover-core.css +568 -513
- package/dist/collection/components/radio-button/radio-button.css +4 -7
- package/dist/collection/components/radio-button/radio-button.js +28 -1
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +2 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +2 -1
- package/dist/collection/components/spinner/spinner.css +3 -3
- package/dist/collection/components/stepper/step/step.css +19 -27
- package/dist/collection/components/stepper/step/step.js +1 -1
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css +2 -1
- package/dist/collection/components/table/table-footer/table-footer.css +2 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +2 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +2 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +2 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -1
- package/dist/collection/components/textarea/textarea.js +31 -3
- package/dist/collection/components/toast/toast.css +10 -12
- package/dist/collection/components/toggle/toggle.css +18 -3
- package/dist/collection/components/toggle/toggle.js +25 -2
- package/dist/collection/utils/accessibility.js +30 -0
- package/dist/collection/utils/axeHelpers.js +11 -2
- package/dist/components/{p-ece91cb9.js → p-037c48f6.js} +1 -1
- package/dist/components/p-1492c7fc.js +2098 -0
- package/dist/components/{p-6732b15a.js → p-1c6e7dc9.js} +1 -1
- package/dist/components/{p-1ef7423a.js → p-58b92113.js} +11 -4
- package/dist/components/{p-adbf32b9.js → p-5fad6216.js} +31 -10
- package/dist/components/{p-6cdccb27.js → p-76dc921a.js} +1 -1
- package/dist/components/{p-7ee8b262.js → p-9d6af0e6.js} +2 -2
- package/dist/components/{p-69109003.js → p-aa5d2ee4.js} +1 -1
- package/dist/components/{p-84a20410.js → p-c46ecd24.js} +1 -1
- package/dist/components/{p-516d8085.js → p-e38cc897.js} +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-accordion.js +1 -1
- package/dist/components/tds-badge.js +1 -1
- package/dist/components/tds-banner.js +1 -1
- package/dist/components/tds-breadcrumb.js +1 -1
- package/dist/components/tds-button.js +1 -1
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-chip.js +1 -1
- package/dist/components/tds-datetime.js +12 -4
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tab.js +1 -1
- package/dist/components/tds-folder-tabs.js +1 -1
- package/dist/components/tds-footer-group.js +1 -1
- package/dist/components/tds-footer-item.js +1 -1
- package/dist/components/tds-header-brand-symbol.js +1 -1
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown-list-item.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-item.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher-grid-item.js +1 -1
- package/dist/components/tds-header-launcher-list-item.js +1 -1
- package/dist/components/tds-header-launcher.js +4 -4
- package/dist/components/tds-inline-tabs.js +1 -1
- package/dist/components/tds-message.js +1 -1
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-navigation-tabs.js +1 -1
- 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-radio-button.js +10 -3
- package/dist/components/tds-side-menu-collapse-button.js +1 -1
- package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-side-menu-item.js +1 -1
- package/dist/components/tds-spinner.js +1 -1
- package/dist/components/tds-step.js +2 -2
- package/dist/components/tds-table-body-row-expandable.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.js +1 -1
- package/dist/components/tds-textarea.js +14 -6
- package/dist/components/tds-toast.js +1 -1
- package/dist/components/tds-toggle.js +11 -4
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-accordion-item.entry.js +1 -1
- package/dist/esm/tds-accordion.entry.js +1 -1
- package/dist/esm/tds-badge.entry.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-breadcrumb.entry.js +1 -1
- package/dist/esm/tds-button.entry.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +9 -3
- package/dist/esm/tds-chip.entry.js +1 -1
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +10 -3
- package/dist/esm/tds-dropdown_2.entry.js +32 -11
- package/dist/esm/tds-folder-tab.entry.js +1 -1
- package/dist/esm/tds-folder-tabs.entry.js +1 -1
- package/dist/esm/tds-footer-group.entry.js +1 -1
- package/dist/esm/tds-footer-item.entry.js +1 -1
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-header-launcher-grid-item.entry.js +1 -1
- package/dist/esm/tds-inline-tabs.entry.js +1 -1
- package/dist/esm/tds-message.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-core.entry.js +1 -1
- package/dist/esm/tds-radio-button.entry.js +8 -2
- package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-spinner.entry.js +1 -1
- package/dist/esm/tds-step.entry.js +2 -2
- package/dist/esm/tds-table-body-row-expandable.entry.js +1 -1
- package/dist/esm/tds-table-footer.entry.js +1 -1
- package/dist/esm/tds-textarea.entry.js +10 -3
- package/dist/esm/tds-toast.entry.js +1 -1
- package/dist/esm/tds-toggle.entry.js +9 -3
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/{p-6cdbdb4e.entry.js → p-08cee6a4.entry.js} +1 -1
- package/dist/tegel/{p-1336fb6c.entry.js → p-120b5875.entry.js} +1 -1
- package/dist/tegel/{p-3e4707fb.entry.js → p-2e5d2bec.entry.js} +1 -1
- package/dist/tegel/{p-dfe24bb1.entry.js → p-32540392.entry.js} +1 -1
- package/dist/tegel/p-326f0bf4.entry.js +1 -0
- package/dist/tegel/{p-1120575b.entry.js → p-364c08ec.entry.js} +1 -1
- package/dist/tegel/{p-d4891ce6.entry.js → p-4d60aa49.entry.js} +1 -1
- package/dist/tegel/p-50ca8e71.entry.js +1 -0
- package/dist/tegel/p-5dd2aac8.entry.js +1 -0
- package/dist/tegel/{p-64be21db.entry.js → p-5df726fb.entry.js} +1 -1
- package/dist/tegel/{p-78823da3.entry.js → p-6d752168.entry.js} +1 -1
- package/dist/tegel/p-6d89dcbe.entry.js +1 -0
- package/dist/tegel/{p-9899e52e.entry.js → p-7013249b.entry.js} +1 -1
- package/dist/tegel/p-731f7599.entry.js +1 -0
- package/dist/tegel/p-84de314b.entry.js +1 -0
- package/dist/tegel/{p-e102ca15.entry.js → p-87219f00.entry.js} +1 -1
- package/dist/tegel/p-8bf0f99f.entry.js +1 -0
- package/dist/tegel/p-9396e9ab.entry.js +1 -0
- package/dist/tegel/{p-c5e50096.entry.js → p-97de52aa.entry.js} +1 -1
- package/dist/tegel/{p-2e1d2b49.entry.js → p-9ebfde2f.entry.js} +1 -1
- package/dist/tegel/{p-2b8e97e1.entry.js → p-a495c4bc.entry.js} +1 -1
- package/dist/tegel/p-b58194f9.entry.js +1 -0
- package/dist/tegel/{p-d14500a1.entry.js → p-c0778293.entry.js} +1 -1
- package/dist/tegel/p-c6beca5e.entry.js +1 -0
- package/dist/tegel/p-caa00547.entry.js +1 -0
- package/dist/tegel/p-d9040b7f.entry.js +1 -0
- package/dist/tegel/{p-10dfd194.entry.js → p-d99df3e7.entry.js} +1 -1
- package/dist/tegel/{p-3c51a017.entry.js → p-da60d17b.entry.js} +1 -1
- package/dist/tegel/p-e3c2b6b4.entry.js +1 -0
- package/dist/tegel/p-f4283f93.entry.js +1 -0
- package/dist/tegel/p-f76d8ab9.entry.js +1 -0
- package/dist/tegel/{p-46b66490.entry.js → p-fc679bf3.entry.js} +1 -1
- package/dist/tegel/{p-4bd0d41c.entry.js → p-fdc5c832.entry.js} +1 -1
- package/dist/tegel/tegel.css +6 -6
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +2 -0
- package/dist/types/components/datetime/datetime.d.ts +2 -0
- package/dist/types/components/radio-button/radio-button.d.ts +3 -0
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/toggle/toggle.d.ts +3 -0
- package/dist/types/components.d.ts +20 -0
- package/dist/types/utils/accessibility.d.ts +14 -0
- package/package.json +1 -1
- package/dist/components/p-96e83134.js +0 -2098
- package/dist/tegel/p-1297d40e.entry.js +0 -1
- package/dist/tegel/p-1978cb0d.entry.js +0 -1
- package/dist/tegel/p-212e1fff.entry.js +0 -1
- package/dist/tegel/p-503cea9d.entry.js +0 -1
- package/dist/tegel/p-5bb01a99.entry.js +0 -1
- package/dist/tegel/p-90a97cc2.entry.js +0 -1
- package/dist/tegel/p-a9253c3a.entry.js +0 -1
- package/dist/tegel/p-ae0fed95.entry.js +0 -1
- package/dist/tegel/p-b152840e.entry.js +0 -1
- package/dist/tegel/p-b58c7bed.entry.js +0 -1
- package/dist/tegel/p-b7848493.entry.js +0 -1
- package/dist/tegel/p-bbeb4e1b.entry.js +0 -1
- package/dist/tegel/p-cbe217bf.entry.js +0 -1
- package/dist/tegel/p-d6d8cb7f.entry.js +0 -1
- package/dist/tegel/p-dbe02139.entry.js +0 -1
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
box-sizing: border-box;
|
|
35
35
|
}
|
|
36
36
|
.tds-radio-button .tds-form-input[type=radio]::before {
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
39
|
-
left:
|
|
40
|
-
top:
|
|
37
|
+
width: 22px;
|
|
38
|
+
height: 22px;
|
|
39
|
+
left: 1px;
|
|
40
|
+
top: 1px;
|
|
41
41
|
}
|
|
42
42
|
.tds-radio-button .tds-form-input[type=radio]::after {
|
|
43
43
|
border: 1px solid var(--tds-radio-button-interaction-01);
|
|
@@ -49,11 +49,9 @@
|
|
|
49
49
|
}
|
|
50
50
|
.tds-radio-button .tds-form-input[type=radio]:hover::before {
|
|
51
51
|
background-color: var(--tds-radio-button-background-hover);
|
|
52
|
-
opacity: 0.12;
|
|
53
52
|
}
|
|
54
53
|
.tds-radio-button .tds-form-input[type=radio]:focus::before {
|
|
55
54
|
background-color: var(--tds-radio-button-background-focus);
|
|
56
|
-
opacity: 0.24;
|
|
57
55
|
animation: rb-focus 0.4s cubic-bezier(0.65, 0.05, 0.38, 0.95) forwards;
|
|
58
56
|
}
|
|
59
57
|
.tds-radio-button .tds-form-input[type=radio]:disabled, .tds-radio-button .tds-form-input[type=radio].disabled {
|
|
@@ -96,6 +94,5 @@
|
|
|
96
94
|
}
|
|
97
95
|
100% {
|
|
98
96
|
transform: scale(1);
|
|
99
|
-
opacity: 0.24;
|
|
100
97
|
}
|
|
101
98
|
}
|
|
@@ -20,8 +20,14 @@ export class TdsRadioButton {
|
|
|
20
20
|
this.tdsAriaLabel = undefined;
|
|
21
21
|
this.tdsTabIndex = undefined;
|
|
22
22
|
}
|
|
23
|
+
/** Method to programmatically focus the radio button element */
|
|
24
|
+
async focusElement() {
|
|
25
|
+
if (this.inputElement) {
|
|
26
|
+
this.inputElement.focus();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
23
29
|
render() {
|
|
24
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: '6f44a40cb5ccf890bdee47d36f47a79d5f8b603c', class: "tds-radio-button" }, h("input", { key: '1da8f9df168c631a634172385c3471a5c6bb03aa', ref: (inputEl) => (this.inputElement = inputEl), "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: '0acf59236ffd3ee0136f2bdef9db8a36afe666ff', htmlFor: this.radioId }, h("slot", { key: 'add4ebdebbb4d5e15126a876c0c0940734b7b068', name: "label" }))));
|
|
25
31
|
}
|
|
26
32
|
static get is() { return "tds-radio-button"; }
|
|
27
33
|
static get encapsulation() { return "scoped"; }
|
|
@@ -197,5 +203,26 @@ export class TdsRadioButton {
|
|
|
197
203
|
}
|
|
198
204
|
}];
|
|
199
205
|
}
|
|
206
|
+
static get methods() {
|
|
207
|
+
return {
|
|
208
|
+
"focusElement": {
|
|
209
|
+
"complexType": {
|
|
210
|
+
"signature": "() => Promise<void>",
|
|
211
|
+
"parameters": [],
|
|
212
|
+
"references": {
|
|
213
|
+
"Promise": {
|
|
214
|
+
"location": "global",
|
|
215
|
+
"id": "global::Promise"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"return": "Promise<void>"
|
|
219
|
+
},
|
|
220
|
+
"docs": {
|
|
221
|
+
"text": "Method to programmatically focus the radio button element",
|
|
222
|
+
"tags": []
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
200
227
|
static get elementRef() { return "host"; }
|
|
201
228
|
}
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
}
|
|
37
37
|
:host .component ::slotted(a:focus-visible) {
|
|
38
38
|
outline: 2px solid var(--tds-blue-400);
|
|
39
|
-
|
|
39
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
40
|
+
outline-offset: 1px;
|
|
40
41
|
}
|
|
41
42
|
:host .component.component-selected ::slotted(a),
|
|
42
43
|
:host .component.component-selected ::slotted(button) {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
:host .component ::slotted(a:focus-visible),
|
|
28
28
|
:host .component ::slotted(button:focus-visible) {
|
|
29
29
|
outline: 2px solid var(--tds-blue-400);
|
|
30
|
-
|
|
30
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
31
|
+
outline-offset: 1px;
|
|
31
32
|
}
|
|
32
33
|
:host .component:hover ::slotted(a),
|
|
33
34
|
:host .component:hover ::slotted(button) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* Component variables aka overrides */
|
|
2
2
|
:root {
|
|
3
|
-
--spinner-background-inverted:
|
|
3
|
+
--spinner-background-inverted: var(--tds-white);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
:root,
|
|
7
7
|
.scania,
|
|
8
8
|
.scania .tds-mode-light {
|
|
9
|
-
--spinner-background:
|
|
9
|
+
--spinner-background: var(--tds-blue-400);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.scania .tds-mode-dark {
|
|
13
|
-
--spinner-background:
|
|
13
|
+
--spinner-background: var(--tds-blue-400);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.traton,
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
:host [role=listitem].lg.vertical::after {
|
|
31
31
|
content: " ";
|
|
32
32
|
position: absolute;
|
|
33
|
-
background-color: var(--tds-stepper-
|
|
34
|
-
opacity: 0.16;
|
|
33
|
+
background-color: var(--tds-stepper-divider-line);
|
|
35
34
|
height: 36px;
|
|
36
35
|
width: 1px;
|
|
37
36
|
top: 40px;
|
|
@@ -40,8 +39,7 @@
|
|
|
40
39
|
:host [role=listitem].lg.horizontal::after {
|
|
41
40
|
content: " ";
|
|
42
41
|
position: absolute;
|
|
43
|
-
background-color: var(--tds-stepper-
|
|
44
|
-
opacity: 0.16;
|
|
42
|
+
background-color: var(--tds-stepper-divider-line);
|
|
45
43
|
height: 1px;
|
|
46
44
|
left: calc(50% + 24px);
|
|
47
45
|
right: 0;
|
|
@@ -50,8 +48,7 @@
|
|
|
50
48
|
:host [role=listitem].lg.horizontal::before {
|
|
51
49
|
content: " ";
|
|
52
50
|
position: absolute;
|
|
53
|
-
background-color: var(--tds-stepper-
|
|
54
|
-
opacity: 0.16;
|
|
51
|
+
background-color: var(--tds-stepper-divider-line);
|
|
55
52
|
height: 1px;
|
|
56
53
|
right: calc(50% + 24px);
|
|
57
54
|
left: 0;
|
|
@@ -60,8 +57,7 @@
|
|
|
60
57
|
:host [role=listitem].lg.horizontal.text-aside:not(.hide-labels)::after {
|
|
61
58
|
content: " ";
|
|
62
59
|
position: absolute;
|
|
63
|
-
background-color: var(--tds-stepper-
|
|
64
|
-
opacity: 0.16;
|
|
60
|
+
background-color: var(--tds-stepper-divider-line);
|
|
65
61
|
height: 1px;
|
|
66
62
|
top: 16px;
|
|
67
63
|
width: 10px;
|
|
@@ -71,8 +67,7 @@
|
|
|
71
67
|
:host [role=listitem].lg.horizontal.text-aside:not(.hide-labels)::before {
|
|
72
68
|
content: " ";
|
|
73
69
|
position: absolute;
|
|
74
|
-
background-color: var(--tds-stepper-
|
|
75
|
-
opacity: 0.16;
|
|
70
|
+
background-color: var(--tds-stepper-divider-line);
|
|
76
71
|
height: 1px;
|
|
77
72
|
top: 16px;
|
|
78
73
|
width: 10px;
|
|
@@ -100,8 +95,7 @@
|
|
|
100
95
|
:host [role=listitem].sm.vertical::after {
|
|
101
96
|
content: " ";
|
|
102
97
|
position: absolute;
|
|
103
|
-
background-color: var(--tds-stepper-
|
|
104
|
-
opacity: 0.16;
|
|
98
|
+
background-color: var(--tds-stepper-divider-line);
|
|
105
99
|
height: 20px;
|
|
106
100
|
width: 1px;
|
|
107
101
|
top: 34px;
|
|
@@ -110,8 +104,7 @@
|
|
|
110
104
|
:host [role=listitem].sm.vertical::before {
|
|
111
105
|
content: " ";
|
|
112
106
|
position: absolute;
|
|
113
|
-
background-color: var(--tds-stepper-
|
|
114
|
-
opacity: 0.16;
|
|
107
|
+
background-color: var(--tds-stepper-divider-line);
|
|
115
108
|
height: 20px;
|
|
116
109
|
width: 1px;
|
|
117
110
|
top: 34px;
|
|
@@ -120,8 +113,7 @@
|
|
|
120
113
|
:host [role=listitem].sm.horizontal::after {
|
|
121
114
|
content: " ";
|
|
122
115
|
position: absolute;
|
|
123
|
-
background-color: var(--tds-stepper-
|
|
124
|
-
opacity: 0.16;
|
|
116
|
+
background-color: var(--tds-stepper-divider-line);
|
|
125
117
|
height: 1px;
|
|
126
118
|
left: calc(50% + 16px + 8px);
|
|
127
119
|
right: 0;
|
|
@@ -130,8 +122,7 @@
|
|
|
130
122
|
:host [role=listitem].sm.horizontal::before {
|
|
131
123
|
content: " ";
|
|
132
124
|
position: absolute;
|
|
133
|
-
background-color: var(--tds-stepper-
|
|
134
|
-
opacity: 0.16;
|
|
125
|
+
background-color: var(--tds-stepper-divider-line);
|
|
135
126
|
height: 1px;
|
|
136
127
|
left: 0;
|
|
137
128
|
right: calc(50% + 24px);
|
|
@@ -140,8 +131,7 @@
|
|
|
140
131
|
:host [role=listitem].sm.horizontal.text-aside:not(.hide-labels)::after {
|
|
141
132
|
content: " ";
|
|
142
133
|
position: absolute;
|
|
143
|
-
background-color: var(--tds-stepper-
|
|
144
|
-
opacity: 0.16;
|
|
134
|
+
background-color: var(--tds-stepper-divider-line);
|
|
145
135
|
height: 1px;
|
|
146
136
|
top: 13px;
|
|
147
137
|
width: 10px;
|
|
@@ -151,8 +141,7 @@
|
|
|
151
141
|
:host [role=listitem].sm.horizontal.text-aside:not(.hide-labels)::before {
|
|
152
142
|
content: " ";
|
|
153
143
|
position: absolute;
|
|
154
|
-
background-color: var(--tds-stepper-
|
|
155
|
-
opacity: 0.16;
|
|
144
|
+
background-color: var(--tds-stepper-divider-line);
|
|
156
145
|
height: 1px;
|
|
157
146
|
top: 13px;
|
|
158
147
|
width: 10px;
|
|
@@ -166,19 +155,22 @@
|
|
|
166
155
|
position: relative;
|
|
167
156
|
}
|
|
168
157
|
:host [role=listitem] .content-container.error {
|
|
169
|
-
border-color: var(--tds-
|
|
170
|
-
color: var(--tds-
|
|
158
|
+
border-color: var(--tds-stepper-icon-step-border-color-warning);
|
|
159
|
+
color: var(--tds-stepper-icon-step-border-color-warning);
|
|
171
160
|
}
|
|
172
161
|
:host [role=listitem] .content-container.success {
|
|
173
|
-
background-color: var(--tds-
|
|
174
|
-
border-color: var(--tds-
|
|
162
|
+
background-color: var(--tds-stepper-icon-step-border-color-success);
|
|
163
|
+
border-color: var(--tds-stepper-icon-step-border-color-success);
|
|
175
164
|
color: var(--tds-white);
|
|
176
165
|
}
|
|
166
|
+
:host [role=listitem] .content-container.current {
|
|
167
|
+
background-color: var(--tds-stepper-background);
|
|
168
|
+
color: var(--tds-stepper-color);
|
|
169
|
+
}
|
|
177
170
|
:host [role=listitem] .content-container.upcoming {
|
|
178
171
|
background-color: transparent;
|
|
179
172
|
border-color: var(--tds-stepper-label-border-color-upcoming);
|
|
180
173
|
color: var(--tds-stepper-label-text-color-upcoming);
|
|
181
|
-
opacity: var(--tds-stepper-label-text-opacity-upcoming);
|
|
182
174
|
}
|
|
183
175
|
:host [role=listitem] .label {
|
|
184
176
|
text-align: center;
|
|
@@ -40,7 +40,7 @@ export class TdsStep {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h(Host, { key: 'f049d976121a1179979026cd3087ad459183de06' }, h("div", { key: '
|
|
43
|
+
return (h(Host, { key: 'f049d976121a1179979026cd3087ad459183de06' }, h("div", { key: '1f961578e8e54ffc9e0d0c2966c86e3e32f8ddd8', role: "listitem", "aria-disabled": this.state === 'upcoming' ? 'true' : 'false', "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: 'f83033e0a0761227d911ac77cac9c64c31fe4c11', 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", { "aria-hidden": "true", class: "index-container" }, this.index))), !this.hideLabels && (h("div", { key: '83c92f388cfebe37e0fb94c81d14adc391fbbbfa', "aria-hidden": "true", class: `label ${this.size} ${this.state}` }, h("slot", { key: '1c6381a25f8af42afe54c0c8eaff4090bf14ee80', name: "label" }))))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "tds-step"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css
CHANGED
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
:host .tds-table__expand-control-container .tds-table__expand-input:focus {
|
|
42
42
|
outline: 2px solid var(--tds-blue-400);
|
|
43
|
-
|
|
43
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
44
|
+
outline-offset: 1px;
|
|
44
45
|
}
|
|
45
46
|
:host .tds-table__expand-control-container .tds-expendable-row-icon {
|
|
46
47
|
height: 16px;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
opacity: 0;
|
|
62
62
|
transform-origin: center;
|
|
63
63
|
transition: opacity 200ms ease-in, transform 200ms ease;
|
|
64
|
-
|
|
64
|
+
color: var(--tds-table-color);
|
|
65
65
|
}
|
|
66
66
|
:host(.tds-table__header-cell--sortable) .tds-table__header-button:hover .tds-table__header-button-icon {
|
|
67
67
|
opacity: 1;
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
}
|
|
26
26
|
:host ::slotted(*:focus-visible) {
|
|
27
27
|
outline: 2px solid var(--tds-blue-400);
|
|
28
|
-
|
|
28
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
29
|
+
outline-offset: 1px;
|
|
29
30
|
}
|
|
30
31
|
:host div:not(.selected) {
|
|
31
32
|
background-color: var(--tds-folder-tab-background);
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
:host .scroll-right-button:focus,
|
|
57
57
|
:host .scroll-left-button:focus {
|
|
58
58
|
outline: 2px solid var(--tds-blue-400);
|
|
59
|
-
|
|
59
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
60
|
+
outline-offset: 1px;
|
|
60
61
|
}
|
|
61
62
|
:host .scroll-right-button svg,
|
|
62
63
|
:host .scroll-left-button svg {
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
:host .scroll-right-button:focus,
|
|
69
69
|
:host .scroll-left-button:focus {
|
|
70
70
|
outline: 2px solid var(--tds-blue-400);
|
|
71
|
-
|
|
71
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
72
|
+
outline-offset: 1px;
|
|
72
73
|
}
|
|
73
74
|
:host .scroll-right-button svg,
|
|
74
75
|
:host .scroll-left-button svg {
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
:host .scroll-right-button:focus,
|
|
69
69
|
:host .scroll-left-button:focus {
|
|
70
70
|
outline: 2px solid var(--tds-blue-400);
|
|
71
|
-
|
|
71
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
72
|
+
outline-offset: 1px;
|
|
72
73
|
}
|
|
73
74
|
:host .scroll-right-button svg,
|
|
74
75
|
:host .scroll-left-button svg {
|
|
@@ -42,6 +42,13 @@ export class TdsTextarea {
|
|
|
42
42
|
this.focusInput = true;
|
|
43
43
|
this.tdsFocus.emit(event);
|
|
44
44
|
}
|
|
45
|
+
/** Method to programmatically focus the textarea element */
|
|
46
|
+
async focusElement() {
|
|
47
|
+
if (this.textEl) {
|
|
48
|
+
this.textEl.focus();
|
|
49
|
+
this.focusInput = true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
45
52
|
setModeVariant(modeVariant) {
|
|
46
53
|
if (this.readOnly && modeVariant === 'primary') {
|
|
47
54
|
return 'secondary';
|
|
@@ -58,7 +65,7 @@ export class TdsTextarea {
|
|
|
58
65
|
}
|
|
59
66
|
render() {
|
|
60
67
|
var _a;
|
|
61
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: '06fd8ce87614410858a7d9253fac73a6f1cf20ec', class: {
|
|
62
69
|
'textarea-container': true,
|
|
63
70
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
64
71
|
'textarea-focus': this.focusInput,
|
|
@@ -68,7 +75,7 @@ export class TdsTextarea {
|
|
|
68
75
|
'textarea-data': this.value !== '',
|
|
69
76
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
70
77
|
'no-min-width': this.noMinWidth,
|
|
71
|
-
} }, this.labelPosition !== 'no-label' && (h("label", { key: '
|
|
78
|
+
} }, this.labelPosition !== 'no-label' && (h("label", { key: '1a02a333e4164b39fd223c68cc3d27d7c53487fb', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '6d45e8c8427770accc82c7ad9e10fbed016437a4', class: "textarea-wrapper" }, h("textarea", { key: '614c30a5b5077060b1568744cf0800580e746819', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
|
|
72
79
|
this.textEl = inputEl;
|
|
73
80
|
}, 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) => {
|
|
74
81
|
if (!this.readOnly) {
|
|
@@ -78,7 +85,7 @@ export class TdsTextarea {
|
|
|
78
85
|
if (!this.readOnly) {
|
|
79
86
|
this.handleBlur(event);
|
|
80
87
|
}
|
|
81
|
-
}, 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-${this.uuid}` }), h("span", { key: '
|
|
88
|
+
}, 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-${this.uuid}` }), h("span", { key: 'e0574ae32d1ce9c69156dc2aa52d8d1881b6ff9b', class: "textarea-resizer-icon" }, h("svg", { key: '23e79729cc099b7e4f07192c05aa4a304b91788a', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '54891720aa51af768f467be5bd8a72fc7adc8d47', "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: '72e3586f1be99460ced66d640392b4596e5b8c2f', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '9f84391a75b5ae428c71d3b713a9d281c4475a09', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '55e195bb50d8b707ec3a403c8c62cad74d738919', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'ff2043a19ebb129178ecfd36126b0d23eacde4d1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: '84b0991ef5ddab7f960ba75db22c65762b0b5d20', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '963b3a3bdafeabec6ad2bd3663c07ed0d4a5b3fd', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '8496a0ae44721cdcd9443e09ff6a709b6d3c704f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
82
89
|
}
|
|
83
90
|
static get is() { return "tds-textarea"; }
|
|
84
91
|
static get encapsulation() { return "scoped"; }
|
|
@@ -480,4 +487,25 @@ export class TdsTextarea {
|
|
|
480
487
|
}
|
|
481
488
|
}];
|
|
482
489
|
}
|
|
490
|
+
static get methods() {
|
|
491
|
+
return {
|
|
492
|
+
"focusElement": {
|
|
493
|
+
"complexType": {
|
|
494
|
+
"signature": "() => Promise<void>",
|
|
495
|
+
"parameters": [],
|
|
496
|
+
"references": {
|
|
497
|
+
"Promise": {
|
|
498
|
+
"location": "global",
|
|
499
|
+
"id": "global::Promise"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"return": "Promise<void>"
|
|
503
|
+
},
|
|
504
|
+
"docs": {
|
|
505
|
+
"text": "Method to programmatically focus the textarea element",
|
|
506
|
+
"tags": []
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
483
511
|
}
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
border-radius: 4px;
|
|
14
14
|
}
|
|
15
15
|
:host .wrapper.information {
|
|
16
|
-
border-left: 4px solid var(--tds-
|
|
16
|
+
border-left: 4px solid var(--tds-toast-icon-color-info);
|
|
17
17
|
}
|
|
18
18
|
:host .wrapper.information tds-icon {
|
|
19
|
-
color: var(--tds-
|
|
19
|
+
color: var(--tds-toast-icon-color-info);
|
|
20
20
|
}
|
|
21
21
|
:host .wrapper.success {
|
|
22
|
-
border-left: 4px solid var(--tds-
|
|
22
|
+
border-left: 4px solid var(--tds-toast-icon-color-success);
|
|
23
23
|
}
|
|
24
24
|
:host .wrapper.success tds-icon {
|
|
25
|
-
color: var(--tds-
|
|
25
|
+
color: var(--tds-toast-icon-color-success);
|
|
26
26
|
}
|
|
27
27
|
:host .wrapper.error {
|
|
28
|
-
border-left: 4px solid var(--tds-
|
|
28
|
+
border-left: 4px solid var(--tds-toast-icon-color-error);
|
|
29
29
|
}
|
|
30
30
|
:host .wrapper.error tds-icon {
|
|
31
|
-
color: var(--tds-
|
|
31
|
+
color: var(--tds-toast-icon-color-error);
|
|
32
32
|
}
|
|
33
33
|
:host .wrapper.warning {
|
|
34
|
-
border-left: 4px solid var(--tds-warning);
|
|
34
|
+
border-left: 4px solid var(--tds-toast-icon-color-warning);
|
|
35
35
|
}
|
|
36
36
|
:host .wrapper.warning tds-icon {
|
|
37
|
-
color: var(--tds-warning);
|
|
37
|
+
color: var(--tds-toast-icon-color-warning);
|
|
38
38
|
}
|
|
39
39
|
:host .wrapper button.close {
|
|
40
40
|
height: 20px;
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
}
|
|
52
52
|
:host .wrapper button.close:focus {
|
|
53
53
|
outline: 2px solid var(--tds-blue-400);
|
|
54
|
-
|
|
54
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
55
|
+
outline-offset: 1px;
|
|
55
56
|
}
|
|
56
57
|
:host .wrapper button.close tds-icon {
|
|
57
58
|
color: var(--tds-toast-dissmiss-color);
|
|
@@ -94,9 +95,6 @@
|
|
|
94
95
|
:host .content .toast-bottom {
|
|
95
96
|
padding-top: 12px;
|
|
96
97
|
}
|
|
97
|
-
:host slot[name=actions]::slotted(*) {
|
|
98
|
-
color: var(--tds-toast-link-color);
|
|
99
|
-
}
|
|
100
98
|
:host .tds-mode-variant-primary {
|
|
101
99
|
--tds-toast-background: var(--tds-toast-background-primary);
|
|
102
100
|
}
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
border-radius: 16px;
|
|
35
35
|
background-color: var(--tds-toggle-off-slider);
|
|
36
36
|
left: 0;
|
|
37
|
+
border: 1px solid transparent;
|
|
37
38
|
}
|
|
38
39
|
.tds-toggle input[type=checkbox]::after {
|
|
39
40
|
width: 16px;
|
|
@@ -43,16 +44,30 @@
|
|
|
43
44
|
left: 4px;
|
|
44
45
|
top: 4px;
|
|
45
46
|
}
|
|
46
|
-
.tds-toggle input[type=checkbox]:focus
|
|
47
|
+
.tds-toggle input[type=checkbox]:focus {
|
|
47
48
|
outline: none;
|
|
49
|
+
outline: 2px solid var(--tds-toggle-border-outline);
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
outline-offset: 0;
|
|
48
52
|
}
|
|
49
|
-
.tds-toggle input[type=checkbox]:focus::before
|
|
53
|
+
.tds-toggle input[type=checkbox]:focus::before {
|
|
50
54
|
background-color: var(--tds-toggle-off-slider-focus);
|
|
51
55
|
border: 1px solid var(--tds-toggle-off-border-focus);
|
|
52
56
|
}
|
|
57
|
+
.tds-toggle input[type=checkbox]:hover::before {
|
|
58
|
+
background-color: var(--tds-toggle-off-slider-hover);
|
|
59
|
+
border: 1px solid var(--tds-toggle-off-border-focus);
|
|
60
|
+
}
|
|
53
61
|
.tds-toggle input[type=checkbox]:checked::before {
|
|
54
62
|
background-color: var(--tds-toggle-on-slider);
|
|
55
|
-
|
|
63
|
+
}
|
|
64
|
+
.tds-toggle input[type=checkbox]:checked:focus::before {
|
|
65
|
+
background-color: var(--tds-toggle-on-slider-focus);
|
|
66
|
+
border: 1px solid var(--tds-toggle-off-border-focus);
|
|
67
|
+
}
|
|
68
|
+
.tds-toggle input[type=checkbox]:checked:hover::before {
|
|
69
|
+
background-color: var(--tds-toggle-on-slider-hover);
|
|
70
|
+
border: 1px solid var(--tds-toggle-off-border-focus);
|
|
56
71
|
}
|
|
57
72
|
.tds-toggle input[type=checkbox]:checked::after {
|
|
58
73
|
left: 24px;
|
|
@@ -29,6 +29,12 @@ export class TdsToggle {
|
|
|
29
29
|
checked: this.checked,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
/** Method to programmatically focus the toggle element */
|
|
33
|
+
async focusElement() {
|
|
34
|
+
if (this.inputElement) {
|
|
35
|
+
this.inputElement.focus();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
32
38
|
componentWillLoad() {
|
|
33
39
|
this.labelSlot = this.host.querySelector("[slot='label']");
|
|
34
40
|
}
|
|
@@ -38,10 +44,10 @@ export class TdsToggle {
|
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
render() {
|
|
41
|
-
return (h("div", { key: '
|
|
47
|
+
return (h("div", { key: '212a541d06f0cc534855ac872cfb386dc1b2d4ff', class: "tds-toggle" }, this.headline && (h("div", { key: '076c51461d4898d2bfa3c86fadd94ac2ad63c7a8', class: {
|
|
42
48
|
'toggle-headline': true,
|
|
43
49
|
'disabled': this.disabled,
|
|
44
|
-
} }, this.headline)), h("input", { key: '
|
|
50
|
+
} }, this.headline)), h("input", { key: 'e0e849d7b05b77612fc949894cac8befa5b89370', ref: (inputEl) => (this.inputElement = inputEl), "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: '4d1dcc70f896695657ca7ca68fd832ee4d13417a', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: '800ea4ee2760efee8cdfe1ac3aee4b3a6f95f199', name: "label" })))));
|
|
45
51
|
}
|
|
46
52
|
static get is() { return "tds-toggle"; }
|
|
47
53
|
static get encapsulation() { return "scoped"; }
|
|
@@ -236,6 +242,23 @@ export class TdsToggle {
|
|
|
236
242
|
"text": "Toggles the Toggle.",
|
|
237
243
|
"tags": []
|
|
238
244
|
}
|
|
245
|
+
},
|
|
246
|
+
"focusElement": {
|
|
247
|
+
"complexType": {
|
|
248
|
+
"signature": "() => Promise<void>",
|
|
249
|
+
"parameters": [],
|
|
250
|
+
"references": {
|
|
251
|
+
"Promise": {
|
|
252
|
+
"location": "global",
|
|
253
|
+
"id": "global::Promise"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"return": "Promise<void>"
|
|
257
|
+
},
|
|
258
|
+
"docs": {
|
|
259
|
+
"text": "Method to programmatically focus the toggle element",
|
|
260
|
+
"tags": []
|
|
261
|
+
}
|
|
239
262
|
}
|
|
240
263
|
};
|
|
241
264
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes HTML content to make it more accessible for screen readers by:
|
|
3
|
+
* 1. Removing HTML tags while preserving their text content
|
|
4
|
+
* 2. Converting HTML entities to their text equivalents
|
|
5
|
+
* 3. Normalizing whitespace
|
|
6
|
+
*
|
|
7
|
+
* @param htmlContent - The HTML content to be processed for screen readers
|
|
8
|
+
* @returns Clean, readable text suitable for screen readers
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Input: "<p>Hello <b>World</b> & Universe!</p>"
|
|
12
|
+
* // Output: "Hello World and Universe!"
|
|
13
|
+
*/
|
|
14
|
+
export const processHtmlForScreenReader = (htmlContent) => {
|
|
15
|
+
if (!htmlContent)
|
|
16
|
+
return '';
|
|
17
|
+
return (htmlContent
|
|
18
|
+
// Remove HTML tags
|
|
19
|
+
.replace(/<[^>]*>/g, ' ')
|
|
20
|
+
// Replace common HTML entities with their text equivalents
|
|
21
|
+
.replace(/ /g, ' ')
|
|
22
|
+
.replace(/&/g, 'and')
|
|
23
|
+
.replace(/</g, 'less than')
|
|
24
|
+
.replace(/>/g, 'greater than')
|
|
25
|
+
.replace(/"/g, '"')
|
|
26
|
+
.replace(/'/g, "'")
|
|
27
|
+
// Normalize whitespace
|
|
28
|
+
.replace(/\s+/g, ' ')
|
|
29
|
+
.trim());
|
|
30
|
+
};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import AxeBuilder from "@axe-core/playwright";
|
|
2
|
-
const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region'
|
|
3
|
-
|
|
2
|
+
const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region'];
|
|
3
|
+
const rules = [
|
|
4
|
+
'best-practice',
|
|
5
|
+
'wcag2a',
|
|
6
|
+
'wcag2aa',
|
|
7
|
+
// 'wcag2aaa', // includes color-contrast-enhanced rule
|
|
8
|
+
'wcag21a',
|
|
9
|
+
'wcag21aa',
|
|
10
|
+
'wcag22aa',
|
|
11
|
+
];
|
|
12
|
+
export const tegelAnalyze = async (page) => new AxeBuilder({ page }).disableRules(disabledRules).withTags(rules).analyze();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
|
|
4
|
-
import { d as defineCustomElement$2 } from './p-
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-76dc921a.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './p-c715ab56.js';
|
|
6
6
|
|
|
7
7
|
const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
|