@scania/tegel 1.27.0 → 1.28.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-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 +75 -3
- 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 +27 -9
- package/dist/cjs/tds-toast.cjs.entry.js +10 -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/modal/modal.js +103 -3
- 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 +123 -66
- 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.css +11 -6
- package/dist/collection/components/textarea/textarea.js +61 -8
- 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 +2 -2
- package/dist/components/{p-2d93a742.js → p-1c606f82.js} +1 -1
- package/dist/components/p-252f3d4d.js +2098 -0
- package/dist/components/p-3dcfe1f4.js +115 -0
- package/dist/components/{p-53e4cdcf.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 +79 -5
- 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 +43 -11
- package/dist/components/tds-toast.js +13 -4
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +1 -113
- package/dist/esm/index-51d04e39.js +4 -4
- 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 +75 -3
- 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 +27 -9
- package/dist/esm/tds-toast.entry.js +10 -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-033d991e.entry.js +1 -0
- 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-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-ceab8f75.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 +4 -4
- 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/modal/modal.d.ts +6 -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 +10 -4
- package/dist/types/components/toast/toast.d.ts +5 -0
- package/dist/types/components.d.ts +130 -0
- package/package.json +1 -1
- package/dist/components/p-90dbeab3.js +0 -2052
- package/dist/tegel/p-035e58e6.entry.js +0 -1
- package/dist/tegel/p-22c592eb.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-66f394a2.entry.js +0 -1
- package/dist/tegel/p-727f873f.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-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-b686f1ad.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.ariaLabel = '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: '25173326e603e33e1ecf1d3277a2eaae4a62b064' }, h("div", { key: 'ba9a309a916b8ae5ccfb3dfe51a6192eb4b86565', role: "list", "aria-label": this.ariaLabel, class: `${this.orientation} text-position-${this.labelPosition} ${this.size}` }, h("slot", { key: '3fdbd771ab23620fec9d062228aefd2d289358ed' }))));
|
|
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
|
+
"ariaLabel": {
|
|
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": "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,
|
|
@@ -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
|
}
|