@scania/tegel 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +10 -3
- package/dist/cjs/tds-chip.cjs.entry.js +7 -2
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +71 -42
- package/dist/cjs/tds-folder-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +4 -2
- package/dist/cjs/tds-icon.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +4 -2
- package/dist/cjs/tds-link.cjs.entry.js +17 -3
- package/dist/cjs/tds-message.cjs.entry.js +15 -3
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +21 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +6 -4
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +13 -7
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/tds-toast.cjs.entry.js +4 -4
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
- package/dist/cjs/tds-tooltip.cjs.entry.js +14 -4
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/banner/banner.css +1 -1
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +44 -3
- package/dist/collection/components/chip/chip.js +24 -2
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +2 -2
- package/dist/collection/components/dropdown/dropdown.js +86 -40
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/iconsArray.js +96 -1
- package/dist/collection/components/link/link.js +17 -3
- package/dist/collection/components/message/message.css +44 -26
- package/dist/collection/components/message/message.js +49 -2
- package/dist/collection/components/popover-core/tds-popover-core.css +530 -53
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +21 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +40 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +21 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +40 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +21 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +42 -4
- package/dist/collection/components/text-field/text-field.js +31 -8
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/toast/toast.css +1 -1
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +40 -4
- package/dist/collection/utils/axeHelpers.js +1 -1
- package/dist/components/{p-c65351ab.js → p-14ab9663.js} +12 -3
- package/dist/components/{p-2a43e410.js → p-2d93a742.js} +5 -5
- package/dist/components/p-4487c541.js +65 -0
- package/dist/components/{p-29d19dc8.js → p-53e4cdcf.js} +1 -1
- package/dist/components/{p-a64dc22e.js → p-663b8e51.js} +72 -42
- package/dist/components/{p-4c1e3344.js → p-83db8b35.js} +1 -1
- package/dist/components/p-90dbeab3.js +2052 -0
- package/dist/components/{p-b1d21573.js → p-a1181b1f.js} +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-banner.js +2 -2
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-chip.js +9 -3
- package/dist/components/tds-datetime.js +1 -1
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tab.js +21 -2
- package/dist/components/tds-folder-tabs.js +7 -3
- package/dist/components/tds-footer-group.js +1 -1
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +3 -3
- package/dist/components/tds-header-hamburger.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher.js +4 -4
- package/dist/components/tds-icon.js +1 -1
- package/dist/components/tds-inline-tab.js +21 -2
- package/dist/components/tds-inline-tabs.js +7 -3
- package/dist/components/tds-link.js +17 -3
- package/dist/components/tds-message.js +19 -5
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-navigation-tab.js +21 -2
- package/dist/components/tds-navigation-tabs.js +9 -5
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +1 -1
- package/dist/components/tds-side-menu-close-button.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-slider.js +1 -1
- package/dist/components/tds-step.js +1 -1
- package/dist/components/tds-table-body-input-wrapper.js +1 -1
- package/dist/components/tds-table-body-row.js +1 -1
- package/dist/components/tds-table-footer.js +4 -4
- package/dist/components/tds-table-header-input-wrapper.js +1 -1
- package/dist/components/tds-table-header.js +1 -1
- package/dist/components/tds-table-toolbar.js +1 -1
- package/dist/components/tds-text-field.js +15 -8
- package/dist/components/tds-textarea.js +4 -4
- package/dist/components/tds-toast.js +5 -5
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +18 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +10 -3
- package/dist/esm/tds-chip.entry.js +7 -2
- package/dist/esm/tds-dropdown_2.entry.js +71 -42
- package/dist/esm/tds-folder-tab.entry.js +22 -3
- package/dist/esm/tds-folder-tabs.entry.js +4 -2
- package/dist/esm/tds-icon.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +22 -3
- package/dist/esm/tds-inline-tabs.entry.js +4 -2
- package/dist/esm/tds-link.entry.js +17 -3
- package/dist/esm/tds-message.entry.js +15 -3
- package/dist/esm/tds-navigation-tab.entry.js +22 -3
- package/dist/esm/tds-navigation-tabs.entry.js +6 -4
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-text-field.entry.js +13 -7
- package/dist/esm/tds-textarea.entry.js +3 -3
- package/dist/esm/tds-toast.entry.js +4 -4
- package/dist/esm/tds-toggle.entry.js +2 -2
- package/dist/esm/tds-tooltip.entry.js +14 -4
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-0f2c9507.entry.js +1 -0
- package/dist/tegel/p-22c592eb.entry.js +1 -0
- package/dist/tegel/p-2af57972.entry.js +1 -0
- package/dist/tegel/{p-be1d1345.entry.js → p-4465f687.entry.js} +1 -1
- package/dist/tegel/p-668b7662.entry.js +1 -0
- package/dist/tegel/{p-4e298888.entry.js → p-66f394a2.entry.js} +1 -1
- package/dist/tegel/{p-b35e7208.entry.js → p-727f873f.entry.js} +1 -1
- package/dist/tegel/p-746e2927.entry.js +1 -0
- package/dist/tegel/p-754a4921.entry.js +1 -0
- package/dist/tegel/{p-46205cfb.entry.js → p-769d0503.entry.js} +1 -1
- package/dist/tegel/p-97f10223.entry.js +1 -0
- package/dist/tegel/p-a21250b8.entry.js +1 -0
- package/dist/tegel/p-aadb2553.entry.js +1 -0
- package/dist/tegel/p-b08886e3.entry.js +1 -0
- package/dist/tegel/p-b114ec3d.entry.js +1 -0
- package/dist/tegel/p-c3607f10.entry.js +1 -0
- package/dist/tegel/p-ddda64eb.entry.js +1 -0
- package/dist/tegel/p-eaa279dd.entry.js +1 -0
- package/dist/tegel/p-ee960089.entry.js +1 -0
- package/dist/tegel/tegel.css +13 -3
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -0
- package/dist/types/components/chip/chip.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/message/message.d.ts +5 -0
- package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +2 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +4 -0
- package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +2 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +4 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +2 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +4 -0
- package/dist/types/components/text-field/text-field.d.ts +4 -1
- package/dist/types/components/tooltip/tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +114 -2
- package/dist/types/types/Icons.d.ts +1 -1
- package/dist/types/utils/axeHelpers.d.ts +1 -2
- package/package.json +1 -1
- package/dist/components/p-4764a1d5.js +0 -2052
- package/dist/components/p-a2b7bdef.js +0 -65
- package/dist/tegel/p-065d6f83.entry.js +0 -1
- package/dist/tegel/p-0c1e632d.entry.js +0 -1
- package/dist/tegel/p-168122a7.entry.js +0 -1
- package/dist/tegel/p-19eb4ae1.entry.js +0 -1
- package/dist/tegel/p-4e33cbda.entry.js +0 -1
- package/dist/tegel/p-4ee344e5.entry.js +0 -1
- package/dist/tegel/p-64c80f14.entry.js +0 -1
- package/dist/tegel/p-72fd0083.entry.js +0 -1
- package/dist/tegel/p-93a4bd11.entry.js +0 -1
- package/dist/tegel/p-9e0b31a1.entry.js +0 -1
- package/dist/tegel/p-a0fc0cc2.entry.js +0 -1
- package/dist/tegel/p-b6526302.entry.js +0 -1
- package/dist/tegel/p-cca85da0.entry.js +0 -1
- package/dist/tegel/p-d0abf078.entry.js +0 -1
- package/dist/tegel/p-dcbc35af.entry.js +0 -1
|
@@ -9,14 +9,28 @@ export class TdsLink {
|
|
|
9
9
|
this.standalone = false;
|
|
10
10
|
}
|
|
11
11
|
connectedCallback() {
|
|
12
|
-
this.host.
|
|
12
|
+
const links = this.host.querySelectorAll('a');
|
|
13
|
+
if (links.length > 1) {
|
|
14
|
+
console.warn('tds-link is only intended to wrap one <a> tag');
|
|
15
|
+
}
|
|
16
|
+
const link = links[0];
|
|
17
|
+
if (link) {
|
|
18
|
+
if (this.disabled) {
|
|
19
|
+
link.setAttribute('tabindex', '-1');
|
|
20
|
+
link.setAttribute('aria-disabled', 'true');
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
link.removeAttribute('tabindex');
|
|
24
|
+
link.removeAttribute('aria-disabled');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
13
27
|
}
|
|
14
28
|
render() {
|
|
15
|
-
return (h("span", { key: '
|
|
29
|
+
return (h("span", { key: '1183de952c2fd6cb1193e9e0dec419f37bf07dee', class: {
|
|
16
30
|
'disabled': this.disabled,
|
|
17
31
|
'no-underline': !this.underline,
|
|
18
32
|
'standalone': this.standalone,
|
|
19
|
-
} }, h("slot", { key: '
|
|
33
|
+
} }, h("slot", { key: 'e019a83d2335cd0a7d682e79a6bf0148452c3e71' })));
|
|
20
34
|
}
|
|
21
35
|
static get is() { return "tds-link"; }
|
|
22
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/* Typography Usage mixins */
|
|
2
|
+
/* Centralized map of typography types */
|
|
3
|
+
/* Utility mixin */
|
|
4
|
+
:host {
|
|
5
|
+
/* Default values */
|
|
6
|
+
--tds-message-background: var(--background-elevation-layer-03);
|
|
7
|
+
/* Variant values */
|
|
8
|
+
}
|
|
9
|
+
:host .tds-mode-variant-primary {
|
|
10
|
+
--tds-message-background: var(--background-elevation-layer-03);
|
|
11
|
+
}
|
|
12
|
+
:host .tds-mode-variant-secondary {
|
|
13
|
+
--tds-message-background: var(--background-elevation-layer-02);
|
|
14
|
+
}
|
|
1
15
|
:host .wrapper {
|
|
2
16
|
display: flex;
|
|
3
17
|
padding: 16px;
|
|
@@ -5,43 +19,45 @@
|
|
|
5
19
|
border-radius: 4px;
|
|
6
20
|
}
|
|
7
21
|
:host .wrapper.information {
|
|
8
|
-
border-left: 4px solid var(--
|
|
22
|
+
border-left: 4px solid var(--system-info-default);
|
|
9
23
|
}
|
|
10
24
|
:host .wrapper.information tds-icon {
|
|
11
|
-
color: var(--
|
|
25
|
+
color: var(--system-info-default);
|
|
12
26
|
}
|
|
13
27
|
:host .wrapper.success {
|
|
14
|
-
border-left: 4px solid var(--
|
|
28
|
+
border-left: 4px solid var(--system-success-default);
|
|
15
29
|
}
|
|
16
30
|
:host .wrapper.success tds-icon {
|
|
17
|
-
color: var(--
|
|
31
|
+
color: var(--system-success-default);
|
|
18
32
|
}
|
|
19
33
|
:host .wrapper.error {
|
|
20
|
-
background-color: var(--
|
|
21
|
-
border-left: 4px solid var(--
|
|
34
|
+
background-color: var(--system-danger-subtle);
|
|
35
|
+
border-left: 4px solid var(--system-danger-default);
|
|
22
36
|
}
|
|
23
37
|
:host .wrapper.error tds-icon {
|
|
24
|
-
color: var(--
|
|
38
|
+
color: var(--system-danger-default);
|
|
25
39
|
}
|
|
26
40
|
:host .wrapper.warning {
|
|
27
|
-
border-left: 4px solid var(--
|
|
41
|
+
border-left: 4px solid var(--system-warning-default);
|
|
28
42
|
}
|
|
29
43
|
:host .wrapper.warning tds-icon {
|
|
30
|
-
color: var(--
|
|
44
|
+
color: var(--system-warning-default);
|
|
31
45
|
}
|
|
32
46
|
:host .wrapper.minimal {
|
|
33
47
|
border: none;
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
48
|
padding: 0;
|
|
37
49
|
background-color: transparent;
|
|
38
50
|
}
|
|
39
51
|
:host .wrapper.minimal .header {
|
|
40
|
-
font: var(--
|
|
41
|
-
|
|
52
|
+
font-family: var(--detail-02-font-family);
|
|
53
|
+
font-size: var(--detail-02-font-size);
|
|
54
|
+
line-height: var(--detail-02-line-height);
|
|
55
|
+
font-weight: var(--detail-02-font-weight);
|
|
56
|
+
letter-spacing: var(--detail-02-letter-spacing);
|
|
57
|
+
text-transform: var(--detail-02-text-transform);
|
|
42
58
|
}
|
|
43
59
|
:host .wrapper.minimal.error .header {
|
|
44
|
-
color: var(--
|
|
60
|
+
color: var(--system-danger-default);
|
|
45
61
|
}
|
|
46
62
|
:host tds-icon {
|
|
47
63
|
padding-right: 16px;
|
|
@@ -50,21 +66,23 @@
|
|
|
50
66
|
display: flex;
|
|
51
67
|
flex-direction: column;
|
|
52
68
|
gap: 4px;
|
|
53
|
-
color: var(--
|
|
69
|
+
color: var(--foreground-text-strong);
|
|
54
70
|
padding: 2px 0;
|
|
55
71
|
}
|
|
56
72
|
:host .content .header {
|
|
57
|
-
font: var(--
|
|
58
|
-
|
|
73
|
+
font-family: var(--headline-07-font-family);
|
|
74
|
+
font-size: var(--headline-07-font-size);
|
|
75
|
+
line-height: var(--headline-07-line-height);
|
|
76
|
+
font-weight: var(--headline-07-font-weight);
|
|
77
|
+
letter-spacing: var(--headline-07-letter-spacing);
|
|
78
|
+
text-transform: var(--headline-07-text-transform);
|
|
59
79
|
}
|
|
60
80
|
:host .content .extended-message {
|
|
61
|
-
color: var(--
|
|
62
|
-
font: var(--
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
:host .tds-mode-variant-secondary {
|
|
69
|
-
--tds-message-background: var(--tds-message-background-secondary);
|
|
81
|
+
color: var(--foreground-text-strong);
|
|
82
|
+
font-family: var(--detail-02-font-family);
|
|
83
|
+
font-size: var(--detail-02-font-size);
|
|
84
|
+
line-height: var(--detail-02-line-height);
|
|
85
|
+
font-weight: var(--detail-02-font-weight);
|
|
86
|
+
letter-spacing: var(--detail-02-letter-spacing);
|
|
87
|
+
text-transform: var(--detail-02-text-transform);
|
|
70
88
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import generateUniqueId from "../../utils/generateUniqueId";
|
|
2
3
|
/**
|
|
3
4
|
* @slot <default> - <b>Unnamed slot.</b> For the extended message. Not visible on minimal messages.
|
|
4
5
|
*/
|
|
@@ -23,14 +24,25 @@ export class TdsMessage {
|
|
|
23
24
|
this.variant = 'information';
|
|
24
25
|
this.noIcon = false;
|
|
25
26
|
this.minimal = false;
|
|
27
|
+
this.tdsAlertDialog = 'dialog';
|
|
28
|
+
this.tdsAriaLabel = undefined;
|
|
29
|
+
}
|
|
30
|
+
getAriaLabel() {
|
|
31
|
+
if (this.header) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const variantLabel = `${this.variant} message`;
|
|
35
|
+
return this.tdsAriaLabel || variantLabel;
|
|
26
36
|
}
|
|
27
37
|
render() {
|
|
28
|
-
|
|
38
|
+
const headerId = this.header ? `tds-message-header-${generateUniqueId()}` : undefined;
|
|
39
|
+
const contentId = !this.minimal ? `tds-message-content-${generateUniqueId()}` : undefined;
|
|
40
|
+
return (h(Host, { key: 'b28d7e5de5b3cb612e78f83650fa5c0621107dda', role: this.tdsAlertDialog, "aria-labelledby": headerId, "aria-describedby": contentId, "aria-label": this.getAriaLabel() }, h("div", { key: 'a3d7470a99af752df3516009d39f7e1c4bbed096', class: {
|
|
29
41
|
wrapper: true,
|
|
30
42
|
[this.variant]: true,
|
|
31
43
|
minimal: this.minimal,
|
|
32
44
|
[`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null,
|
|
33
|
-
} }, !this.noIcon && h("tds-icon", { key: '
|
|
45
|
+
} }, !this.noIcon && (h("tds-icon", { key: '5ce066cccec225e2707e660f73396f24197d024d', "aria-label": `${this.variant}`, svgTitle: `${this.variant}`, name: this.getIconName(), size: "20px" })), h("div", { key: 'ec0101d39dd0354b163219b732fd9dfa9cd66e60', class: `content` }, this.header && (h("div", { key: '434be3923b805cc8bd77d232a8cdbf847f9793c8', class: "header", id: headerId }, this.header)), !this.minimal && (h("div", { key: '14f5ead963e55d7e3bad6abc69e97ba9f994316f', class: "extended-message", id: contentId }, h("slot", { key: '37c61ef3a396e37a7cb130951d44af9454163699' })))))));
|
|
34
46
|
}
|
|
35
47
|
static get is() { return "tds-message"; }
|
|
36
48
|
static get encapsulation() { return "shadow"; }
|
|
@@ -134,6 +146,41 @@ export class TdsMessage {
|
|
|
134
146
|
"attribute": "minimal",
|
|
135
147
|
"reflect": false,
|
|
136
148
|
"defaultValue": "false"
|
|
149
|
+
},
|
|
150
|
+
"tdsAlertDialog": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "'alertdialog' | 'dialog'",
|
|
155
|
+
"resolved": "\"alertdialog\" | \"dialog\"",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Role of the message component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages."
|
|
163
|
+
},
|
|
164
|
+
"attribute": "tds-alert-dialog",
|
|
165
|
+
"reflect": false,
|
|
166
|
+
"defaultValue": "'dialog'"
|
|
167
|
+
},
|
|
168
|
+
"tdsAriaLabel": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "string",
|
|
173
|
+
"resolved": "string",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": "Provides an accessible name for the message component when no header is present. This ensures proper screen reader support for dialog/alertdialog roles."
|
|
181
|
+
},
|
|
182
|
+
"attribute": "tds-aria-label",
|
|
183
|
+
"reflect": false
|
|
137
184
|
}
|
|
138
185
|
};
|
|
139
186
|
}
|