@scania/tegel 1.8.0 → 1.8.2
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-body-cell.cjs.entry.js +15 -4
- package/dist/cjs/tds-dropdown.cjs.entry.js +40 -26
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +11 -5
- package/dist/cjs/tds-header-launcher.cjs.entry.js +5 -9
- package/dist/cjs/tds-header.cjs.entry.js +1 -1
- package/dist/cjs/tds-modal.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-core.cjs.entry.js +15 -5
- package/dist/cjs/tds-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu.cjs.entry.js +1 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/banner/banner.css +0 -32
- package/dist/collection/components/dropdown/dropdown.css +32 -5
- package/dist/collection/components/dropdown/dropdown.js +39 -25
- package/dist/collection/components/header/header-dropdown/header-dropdown.css +31 -4
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +10 -4
- package/dist/collection/components/header/header-launcher/header-launcher.css +31 -4
- package/dist/collection/components/header/header-launcher/header-launcher.js +4 -8
- package/dist/collection/components/header/header.css +11 -0
- package/dist/collection/components/modal/modal.css +0 -23
- package/dist/collection/components/popover-core/popover-core.js +22 -6
- package/dist/collection/components/radio-button/radio-button.css +0 -24
- package/dist/collection/components/side-menu/side-menu.css +31 -4
- package/dist/collection/components/table/table-body-cell/table-body-cell.css +0 -4
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +14 -3
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/tooltip/tooltip.css +0 -11
- package/dist/components/popover-core.js +16 -6
- package/dist/components/tds-banner.js +1 -1
- package/dist/components/tds-body-cell.js +15 -4
- package/dist/components/tds-dropdown.js +40 -26
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +11 -5
- package/dist/components/tds-header-launcher.js +5 -9
- package/dist/components/tds-header.js +1 -1
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-radio-button.js +1 -1
- package/dist/components/tds-side-menu.js +1 -1
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-body-cell.entry.js +15 -4
- package/dist/esm/tds-dropdown.entry.js +40 -26
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown.entry.js +11 -5
- package/dist/esm/tds-header-launcher.entry.js +5 -9
- package/dist/esm/tds-header.entry.js +1 -1
- package/dist/esm/tds-modal.entry.js +1 -1
- package/dist/esm/tds-popover-core.entry.js +15 -5
- package/dist/esm/tds-radio-button.entry.js +1 -1
- package/dist/esm/tds-side-menu.entry.js +1 -1
- package/dist/esm/tds-tooltip.entry.js +1 -1
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-18387cf5.entry.js +1 -0
- package/dist/tegel/p-1fcf69c3.entry.js +1 -0
- package/dist/tegel/p-21b555ec.entry.js +1 -0
- package/dist/tegel/p-3e675690.entry.js +1 -0
- package/dist/tegel/p-8b13327b.entry.js +1 -0
- package/dist/tegel/p-9697550b.entry.js +1 -0
- package/dist/tegel/p-9806d3d3.entry.js +1 -0
- package/dist/tegel/p-afa72e58.entry.js +1 -0
- package/dist/tegel/p-d362d26c.entry.js +1 -0
- package/dist/tegel/{p-052901a5.entry.js → p-dd082e5f.entry.js} +1 -1
- package/dist/tegel/{p-6c23bc53.entry.js → p-e36e82c5.entry.js} +1 -1
- package/dist/tegel/p-f8482e1e.entry.js +1 -0
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +2 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +1 -0
- package/dist/types/components/popover-core/popover-core.d.ts +4 -2
- package/package.json +1 -1
- package/dist/tegel/p-2ffae2d1.entry.js +0 -1
- package/dist/tegel/p-450eabc1.entry.js +0 -1
- package/dist/tegel/p-50b0f2ff.entry.js +0 -1
- package/dist/tegel/p-540a83e5.entry.js +0 -1
- package/dist/tegel/p-669f7646.entry.js +0 -1
- package/dist/tegel/p-7076c719.entry.js +0 -1
- package/dist/tegel/p-7a8d7b95.entry.js +0 -1
- package/dist/tegel/p-af6d2907.entry.js +0 -1
- package/dist/tegel/p-cc16393b.entry.js +0 -1
- package/dist/tegel/p-ebbe0131.entry.js +0 -1
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
.tds-mode-light {
|
|
3
|
-
--tds-radio-button-color: var(--tds-grey-958);
|
|
4
|
-
--tds-radio-button-interaction-01: var(--tds-blue-800);
|
|
5
|
-
--tds-radio-button-interaction-02: var(--tds-white);
|
|
6
|
-
--tds-radio-button-background-hover: var(--tds-blue-800);
|
|
7
|
-
--tds-radio-button-background-focus: var(--tds-blue-800);
|
|
8
|
-
--tds-radio-button-disabled: var(--tds-grey-600);
|
|
9
|
-
--tds-radio-button-border-color-disabled-after: var(--tds-grey-500);
|
|
10
|
-
--tds-radio-button-color-disabled-after: var(--tds-grey-700);
|
|
11
|
-
--tds-radio-button-color-disabled-before: var(--tds-grey-700);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tds-mode-dark {
|
|
15
|
-
--tds-radio-button-color: var(--tds-white);
|
|
16
|
-
--tds-radio-button-interaction-01: var(--tds-white);
|
|
17
|
-
--tds-radio-button-interaction-02: var(--tds-grey-958);
|
|
18
|
-
--tds-radio-button-background-hover: var(--tds-white);
|
|
19
|
-
--tds-radio-button-background-focus: var(--tds-white);
|
|
20
|
-
--tds-radio-button-disabled: var(--tds-grey-600);
|
|
21
|
-
--tds-radio-button-border-color-disabled-after: var(--tds-grey-700);
|
|
22
|
-
--tds-radio-button-color-disabled-after: var(--tds-grey-700);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
1
|
.tds-radio-button {
|
|
26
2
|
box-sizing: border-box;
|
|
27
3
|
display: flex;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Contains spacing variables for the layout
|
|
3
3
|
*/
|
|
4
|
+
:host {
|
|
5
|
+
--tds-scrollbar-width-standard: thin;
|
|
6
|
+
--tds-scrollbar-width: 10px;
|
|
7
|
+
--tds-scrollbar-thumb-border-width: 3px;
|
|
8
|
+
--tds-scrollbar-thumb-border-hover-width: 2px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
body {
|
|
12
|
+
scrollbar-width: thin;
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
/** The breakpoint at which the layout changes from fixed size to full-width. */
|
|
5
16
|
:host {
|
|
6
17
|
pointer-events: none;
|
|
@@ -109,14 +120,30 @@ aside .tds-side-menu-wrapper {
|
|
|
109
120
|
background-color: var(--tds-sidebar-side-menu-background-cover);
|
|
110
121
|
overflow-y: auto;
|
|
111
122
|
}
|
|
123
|
+
aside .tds-side-menu-wrapper:hover::-webkit-scrollbar-thumb {
|
|
124
|
+
border: var(--tds-scrollbar-thumb-border-hover-width) solid transparent;
|
|
125
|
+
background: var(--tds-scrollbar-hover-thumb-color);
|
|
126
|
+
background-clip: padding-box;
|
|
127
|
+
}
|
|
112
128
|
aside .tds-side-menu-wrapper::-webkit-scrollbar {
|
|
113
|
-
width:
|
|
114
|
-
|
|
129
|
+
width: var(--tds-scrollbar-width);
|
|
130
|
+
}
|
|
131
|
+
aside .tds-side-menu-wrapper::-webkit-scrollbar-track {
|
|
132
|
+
background: transparent;
|
|
115
133
|
}
|
|
116
134
|
aside .tds-side-menu-wrapper::-webkit-scrollbar-thumb {
|
|
117
|
-
|
|
135
|
+
border-radius: 40px;
|
|
136
|
+
background: var(--tds-scrollbar-thumb-color);
|
|
137
|
+
border: var(--tds-scrollbar-thumb-border-width) solid transparent;
|
|
138
|
+
background-clip: padding-box;
|
|
118
139
|
}
|
|
119
|
-
aside .tds-side-menu-wrapper
|
|
140
|
+
aside .tds-side-menu-wrapper::-webkit-scrollbar-button {
|
|
120
141
|
height: 0;
|
|
121
142
|
width: 0;
|
|
143
|
+
}
|
|
144
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
145
|
+
aside .tds-side-menu-wrapper {
|
|
146
|
+
scrollbar-color: var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);
|
|
147
|
+
scrollbar-width: var(--tds-scrollbar-width-standard);
|
|
148
|
+
}
|
|
122
149
|
}
|
|
@@ -69,14 +69,25 @@ export class TdsTableBodyCell {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
|
|
72
|
+
let paddingStyle = 'var(--tds-spacing-element-16)'; // Default padding
|
|
73
|
+
if (this.disablePadding) {
|
|
74
|
+
paddingStyle = '0';
|
|
75
|
+
}
|
|
76
|
+
else if (this.compactDesign) {
|
|
77
|
+
paddingStyle = 'var(--tds-spacing-element-8) var(--tds-spacing-element-16)';
|
|
78
|
+
}
|
|
79
|
+
const dynamicStyles = {
|
|
80
|
+
textAlign: this.textAlignState,
|
|
81
|
+
// Conditionally set padding style
|
|
82
|
+
padding: paddingStyle,
|
|
83
|
+
};
|
|
84
|
+
return (h(Host, { key: '56fe770734dd720139eb614489283e2ec81cc596', class: {
|
|
73
85
|
'tds-table__body-cell': true,
|
|
74
86
|
'tds-table__body-cell--hover': this.activeSorting,
|
|
75
87
|
'tds-table__compact': this.compactDesign,
|
|
76
88
|
'tds-table--divider': this.verticalDividers,
|
|
77
89
|
'tds-table--no-min-width': this.noMinWidth,
|
|
78
|
-
|
|
79
|
-
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '41cfdbf142362f1dd298ed9f4c622775d543b64b' })));
|
|
90
|
+
}, style: dynamicStyles }, this.cellValue, h("slot", { key: '490a5caabb4a2ae94769875edb0743b474716e42' })));
|
|
80
91
|
}
|
|
81
92
|
static get is() { return "tds-body-cell"; }
|
|
82
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
.tds-mode-light {
|
|
3
|
-
--tds-tooltip-background: var(--tds-grey-800);
|
|
4
|
-
--tds-tooltip-color: var(--tds-white);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.tds-mode-dark {
|
|
8
|
-
--tds-tooltip-background: var(--tds-grey-200);
|
|
9
|
-
--tds-tooltip-color: var(--tds-grey-958);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
.tds-tooltip {
|
|
13
2
|
box-sizing: border-box;
|
|
14
3
|
font: var(--tds-detail-05);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as generateUniqueId } from './generateUniqueId.js';
|
|
2
3
|
|
|
3
4
|
var top = 'top';
|
|
4
5
|
var bottom = 'bottom';
|
|
@@ -1795,8 +1796,9 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1795
1796
|
constructor() {
|
|
1796
1797
|
super();
|
|
1797
1798
|
this.__registerHost();
|
|
1798
|
-
this.
|
|
1799
|
-
this.
|
|
1799
|
+
this.internalTdsShow = createEvent(this, "internalTdsShow", 4);
|
|
1800
|
+
this.internalTdsClose = createEvent(this, "internalTdsClose", 0);
|
|
1801
|
+
this.uuid = generateUniqueId();
|
|
1800
1802
|
this.setIsShown = function setIsShown(isShown) {
|
|
1801
1803
|
if (typeof isShown === 'function') {
|
|
1802
1804
|
this.isShown = isShown(this.isShown);
|
|
@@ -1805,10 +1807,10 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1805
1807
|
this.isShown = isShown;
|
|
1806
1808
|
}
|
|
1807
1809
|
if (this.isShown) {
|
|
1808
|
-
this.
|
|
1810
|
+
this.internalTdsShow.emit();
|
|
1809
1811
|
}
|
|
1810
1812
|
else {
|
|
1811
|
-
this.
|
|
1813
|
+
this.internalTdsClose.emit();
|
|
1812
1814
|
}
|
|
1813
1815
|
}.bind(this);
|
|
1814
1816
|
this.onClickTarget = function onClickTarget(event) {
|
|
@@ -1846,6 +1848,14 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1846
1848
|
}
|
|
1847
1849
|
}
|
|
1848
1850
|
}
|
|
1851
|
+
onTdsShow(event) {
|
|
1852
|
+
if (this.show === null) {
|
|
1853
|
+
const target = event.target;
|
|
1854
|
+
if (target.id !== `tds-popover-core-${this.uuid}`) {
|
|
1855
|
+
this.setIsShown(false);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1849
1859
|
/* To enable initial loading of a component if user controls show prop*/
|
|
1850
1860
|
componentWillLoad() {
|
|
1851
1861
|
this.setIsShown(this.show);
|
|
@@ -1940,7 +1950,7 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1940
1950
|
if (this.autoHide) {
|
|
1941
1951
|
hostStyle = { display: this.isShown ? 'block' : 'none' };
|
|
1942
1952
|
}
|
|
1943
|
-
return (h(Host, { key: '
|
|
1953
|
+
return (h(Host, { key: '0d42974eadfea68c642b5d4a6e1206f2d41d79ea', style: hostStyle, id: `tds-popover-core-${this.uuid}` }, h("slot", { key: '7f44ef8ccc3b4e8028cc1c612fb9102bfa84ff39' })));
|
|
1944
1954
|
}
|
|
1945
1955
|
get host() { return this; }
|
|
1946
1956
|
static get watchers() { return {
|
|
@@ -1962,7 +1972,7 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1962
1972
|
"popperInstance": [32],
|
|
1963
1973
|
"target": [32],
|
|
1964
1974
|
"isShown": [32]
|
|
1965
|
-
}, [[8, "click", "onAnyClick"]], {
|
|
1975
|
+
}, [[8, "click", "onAnyClick"], [8, "internalTdsShow", "onTdsShow"]], {
|
|
1966
1976
|
"show": ["onShowChange"],
|
|
1967
1977
|
"referenceEl": ["onReferenceElChanged"],
|
|
1968
1978
|
"trigger": ["onTriggerChanged"]
|
|
@@ -3,7 +3,7 @@ import { g as generateUniqueId } from './generateUniqueId.js';
|
|
|
3
3
|
import { h as hasSlot } from './hasSlot.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
5
|
|
|
6
|
-
const bannerCss = ":
|
|
6
|
+
const bannerCss = ":host(.hide){display:none;visibility:hidden}:host(.error){background-color:var(--tds-banner-background-error)}:host(.information){background-color:var(--tds-banner-background-info)}:host{display:flex;background-color:var(--tds-banner-background-default);z-index:400}:host .banner-icon{padding-left:20px;padding-top:14px;padding-right:12px;color:var(--tds-banner-prefix-default-color)}:host .banner-icon.error{color:var(--tds-banner-prefix-error-color)}:host .banner-icon.information{color:var(--tds-banner-prefix-info-color)}:host .content{color:var(--tds-banner-text-color);display:flex;flex-direction:column;flex-grow:1;padding:16px 0}:host .content.no-icon{padding-left:16px}:host .header-subheader{display:flex;flex-direction:column;gap:4px}:host .header,:host slot[name=header]{font:var(--tds-headline-06);letter-spacing:var(--tds-headline-06-ls)}:host .subheader,:host slot[name=subheader]{display:block;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host slot[name=actions]::slotted(*){display:block;width:fit-content;margin-top:16px}:host .banner-close{color:var(--tds-banner-x-color)}:host .banner-close button{padding-right:16px;padding-top:14px;background-color:transparent;border:none;color:var(--tds-banner-x-color)}:host .banner-close button:hover{cursor:pointer}:host .banner-close button:focus-visible{outline:none}:host .banner-close button:focus-visible tds-icon{outline:2px solid var(--tds-blue-400);outline-offset:-2px}";
|
|
7
7
|
const TdsBannerStyle0 = bannerCss;
|
|
8
8
|
|
|
9
9
|
const TdsBanner$1 = /*@__PURE__*/ proxyCustomElement(class TdsBanner extends HTMLElement {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const tableBodyCellCss = ":host(.tds-table__body-cell){box-sizing:border-box;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:table-cell;box-sizing:border-box;color:var(--tds-table-color);padding:var(--tds-spacing-element-16);min-width:192px;vertical-align:top;background-color:transparent;transition:background-color 200ms ease}:host(.tds-table__body-cell) *{box-sizing:border-box}:host(.tds-table__body-cell--
|
|
3
|
+
const tableBodyCellCss = ":host(.tds-table__body-cell){box-sizing:border-box;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:table-cell;box-sizing:border-box;color:var(--tds-table-color);padding:var(--tds-spacing-element-16);min-width:192px;vertical-align:top;background-color:transparent;transition:background-color 200ms ease}:host(.tds-table__body-cell) *{box-sizing:border-box}:host(.tds-table__body-cell--hover){background-color:var(--tds-table-body-cell-background-hover)}:host(.tds-table__compact){padding:var(--tds-spacing-element-8) var(--tds-spacing-element-16)}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}";
|
|
4
4
|
const TdsBodyCellStyle0 = tableBodyCellCss;
|
|
5
5
|
|
|
6
6
|
const relevantTableProps = [
|
|
@@ -73,14 +73,25 @@ const TdsTableBodyCell = /*@__PURE__*/ proxyCustomElement(class TdsTableBodyCell
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
|
|
76
|
+
let paddingStyle = 'var(--tds-spacing-element-16)'; // Default padding
|
|
77
|
+
if (this.disablePadding) {
|
|
78
|
+
paddingStyle = '0';
|
|
79
|
+
}
|
|
80
|
+
else if (this.compactDesign) {
|
|
81
|
+
paddingStyle = 'var(--tds-spacing-element-8) var(--tds-spacing-element-16)';
|
|
82
|
+
}
|
|
83
|
+
const dynamicStyles = {
|
|
84
|
+
textAlign: this.textAlignState,
|
|
85
|
+
// Conditionally set padding style
|
|
86
|
+
padding: paddingStyle,
|
|
87
|
+
};
|
|
88
|
+
return (h(Host, { key: '56fe770734dd720139eb614489283e2ec81cc596', class: {
|
|
77
89
|
'tds-table__body-cell': true,
|
|
78
90
|
'tds-table__body-cell--hover': this.activeSorting,
|
|
79
91
|
'tds-table__compact': this.compactDesign,
|
|
80
92
|
'tds-table--divider': this.verticalDividers,
|
|
81
93
|
'tds-table--no-min-width': this.noMinWidth,
|
|
82
|
-
|
|
83
|
-
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '41cfdbf142362f1dd298ed9f4c622775d543b64b' })));
|
|
94
|
+
}, style: dynamicStyles }, this.cellValue, h("slot", { key: '490a5caabb4a2ae94769875edb0743b474716e42' })));
|
|
84
95
|
}
|
|
85
96
|
get host() { return this; }
|
|
86
97
|
static get style() { return TdsBodyCellStyle0; }
|
|
@@ -59,7 +59,7 @@ const appendHiddenInput = (element, name, value, disabled, additionalAttributes)
|
|
|
59
59
|
input.value = value || '';
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
const dropdownCss = "@charset \"UTF-8\";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:4px 4px 0 0}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:
|
|
62
|
+
const dropdownCss = "@charset \"UTF-8\";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:4px 4px 0 0}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;transition:transform 0.2s ease-in-out;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;border-radius:0 0 4px 4px;overflow-y:auto}:host .dropdown-list:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .dropdown-list::-webkit-scrollbar-track{background:transparent}:host .dropdown-list::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .dropdown-list{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;border-radius:4px 4px 0 0}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);visibility:hidden}:host .dropdown-list.open{transform:scaleY(1)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform 0.2s ease-in-out}:host tds-icon.open{transform:rotateZ(180deg)}";
|
|
63
63
|
const TdsDropdownStyle0 = dropdownCss;
|
|
64
64
|
|
|
65
65
|
const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends HTMLElement {
|
|
@@ -72,29 +72,41 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
72
72
|
this.tdsBlur = createEvent(this, "tdsBlur", 6);
|
|
73
73
|
this.tdsInput = createEvent(this, "tdsInput", 6);
|
|
74
74
|
this.setDefaultOption = () => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
// Ensure this.host.children is not empty
|
|
76
|
+
if (this.host.children.length === 0) {
|
|
77
|
+
console.warn('TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.');
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (this.defaultValue) {
|
|
81
|
+
const children = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
|
|
82
|
+
let matched = false;
|
|
83
|
+
children.forEach((element) => {
|
|
84
|
+
if (this.multiselect) {
|
|
85
|
+
this.defaultValue.split(',').forEach((value) => {
|
|
86
|
+
if (value === element.value) {
|
|
87
|
+
element.setSelected(true);
|
|
88
|
+
this.value = this.value ? [...this.value, element.value] : [element.value];
|
|
89
|
+
matched = true;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
90
92
|
}
|
|
91
93
|
else {
|
|
92
|
-
element.
|
|
94
|
+
if (this.defaultValue === element.value) {
|
|
95
|
+
element.setSelected(true);
|
|
96
|
+
this.value = [element.value];
|
|
97
|
+
matched = true;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
element.setSelected(false);
|
|
101
|
+
}
|
|
93
102
|
}
|
|
103
|
+
this.setValueAttribute();
|
|
104
|
+
return element;
|
|
105
|
+
});
|
|
106
|
+
if (!matched) {
|
|
107
|
+
console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`);
|
|
94
108
|
}
|
|
95
|
-
|
|
96
|
-
return element;
|
|
97
|
-
});
|
|
109
|
+
}
|
|
98
110
|
};
|
|
99
111
|
/* Returns a list of all children that are tds-dropdown-option elements */
|
|
100
112
|
this.getChildren = () => {
|
|
@@ -364,9 +376,11 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
364
376
|
}
|
|
365
377
|
}
|
|
366
378
|
componentWillLoad() {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
379
|
+
this.setDefaultOption();
|
|
380
|
+
}
|
|
381
|
+
/** Method to handle slot changes */
|
|
382
|
+
handleSlotChange() {
|
|
383
|
+
this.setDefaultOption();
|
|
370
384
|
}
|
|
371
385
|
/** Method to check if we should normalize text */
|
|
372
386
|
normalizeString(text) {
|
|
@@ -399,7 +413,7 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
399
413
|
render() {
|
|
400
414
|
var _a, _b, _c, _d;
|
|
401
415
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
402
|
-
return (h(Host, { key: '
|
|
416
|
+
return (h(Host, { key: '451edf7c5eaa096500d8d989bd9cddc60a5fd5d8', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'c7e3d77ba79b6e135aa960bc8e56c2d41ae3ec2e', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
403
417
|
filter: true,
|
|
404
418
|
focus: this.filterFocus,
|
|
405
419
|
disabled: this.disabled,
|
|
@@ -442,11 +456,11 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
442
456
|
label-inside-as-placeholder
|
|
443
457
|
${this.size}
|
|
444
458
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
445
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '
|
|
459
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'cd63a354addfbcbfb2bb355b1e053b93dd9d3864', ref: (element) => (this.dropdownList = element), class: `dropdown-list
|
|
446
460
|
${this.size}
|
|
447
461
|
${this.open ? 'open' : 'closed'}
|
|
448
462
|
${this.getOpenDirection()}
|
|
449
|
-
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: '
|
|
463
|
+
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: '9a4feeed475bde225d19e01f17e4eadc292c6f41', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { name: "error", size: "16px" }), this.helper))));
|
|
450
464
|
}
|
|
451
465
|
get host() { return this; }
|
|
452
466
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const tableHeaderCellCss = ":host(.tds-table__header-cell){box-sizing:border-box;font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-header-background-hover);padding:0;height:48px;min-width:192px;box-sizing:border-box;vertical-align:middle;overflow:hidden;transition:background-color 200ms ease}:host(.tds-table__header-cell) *{box-sizing:border-box}:host(.tds-table__header-cell) .tds-table__header-text{padding:
|
|
3
|
+
const tableHeaderCellCss = ":host(.tds-table__header-cell){box-sizing:border-box;font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-header-background-hover);padding:0;height:48px;min-width:192px;box-sizing:border-box;vertical-align:middle;overflow:hidden;transition:background-color 200ms ease}:host(.tds-table__header-cell) *{box-sizing:border-box}:host(.tds-table__header-cell) .tds-table__header-text{padding:8px 16px;margin:0}:host(.tds-table__header-cell--sortable) .tds-table__header-button{display:flex;align-items:center;gap:8px;justify-content:start;flex-direction:row;width:100%;height:100%;padding:0 16px;background-color:transparent;border:none;cursor:pointer;transition:background-color 200ms ease}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus{outline:2px solid var(--tds-table-header-btn-focus);outline-offset:-2px}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-text{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);text-align:left;color:var(--tds-table-header-btn-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-icon{flex:0 0 16px;height:16px;width:16px;opacity:0;transform-origin:center;transition:opacity 200ms ease-in, transform 200ms ease;fill:var(--tds-table-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button:hover .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button{background-color:var(--tds-table-header-btn-background)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button:hover{background-color:var(--tds-table-header-btn-background-hover)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon--rotate{transform:rotate(180deg)}:host(.tds-table--compact){height:33px}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}:host(.tds-table__header-cell:first-of-type){border-top-left-radius:4px}:host(.tds-table__header-cell:last-of-type){border-top-right-radius:4px}:host(.tds-table--extra-column:first-of-type){border-top-left-radius:0}:host(.tds-table--toolbar-available){border-radius:0}:host(.tds-table--extra-column.tds-table--toolbar-available){border-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:first-of-type){border-top-left-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:last-of-type){border-top-right-radius:0}";
|
|
4
4
|
const TdsHeaderCellStyle0 = tableHeaderCellCss;
|
|
5
5
|
|
|
6
6
|
const relevantTableProps = [
|
|
@@ -6,7 +6,7 @@ import { d as defineCustomElement$4 } from './icon.js';
|
|
|
6
6
|
import { d as defineCustomElement$3 } from './popover-canvas.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './popover-core.js';
|
|
8
8
|
|
|
9
|
-
const headerDropdownCss = ":host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu::-webkit-scrollbar{width:
|
|
9
|
+
const headerDropdownCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .menu::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .menu::-webkit-scrollbar-track{background:transparent}:host .menu::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .menu::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .menu{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:901}";
|
|
10
10
|
const TdsHeaderDropdownStyle0 = headerDropdownCss;
|
|
11
11
|
|
|
12
12
|
const TdsHeaderDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDropdown extends HTMLElement {
|
|
@@ -15,6 +15,12 @@ const TdsHeaderDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDrop
|
|
|
15
15
|
this.__registerHost();
|
|
16
16
|
this.__attachShadow();
|
|
17
17
|
this.uuid = generateUniqueId();
|
|
18
|
+
this.handleSlottedItemClick = (event) => {
|
|
19
|
+
const eventSource = event.target.tagName.toLowerCase();
|
|
20
|
+
if (['a', 'button'].includes(eventSource)) {
|
|
21
|
+
this.open = false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
18
24
|
this.label = undefined;
|
|
19
25
|
this.noDropdownIcon = false;
|
|
20
26
|
this.selected = false;
|
|
@@ -32,20 +38,20 @@ const TdsHeaderDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDrop
|
|
|
32
38
|
this.open = !this.open;
|
|
33
39
|
}
|
|
34
40
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'd72add7a12c105e83c0300dc4c6727775dfe10e5' }, h("div", { key: 'b323560bd8b13b6643eafca2ad9deb9bea53689e', class: {
|
|
36
42
|
'state-open': this.open,
|
|
37
|
-
} }, h("tds-header-item", { key: '
|
|
43
|
+
} }, h("tds-header-item", { key: '48af537f7b05f31fcbcb0c0aae311d2ccd69819d', class: "button", active: this.open, selected: this.selected }, h("button", { key: '324b1965706b0a3413c9e8ddcc37345c387519cc', ref: (el) => {
|
|
38
44
|
this.buttonEl = el;
|
|
39
45
|
}, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
|
|
40
46
|
this.toggleDropdown();
|
|
41
|
-
} }, h("slot", { key: '
|
|
47
|
+
} }, h("slot", { key: '56a3064075c135677f59e58c4be831c66230a7c2', name: "icon" }), this.label, h("slot", { key: '729e1901342405daf3655dac940310e64e6683f0', name: "label" }), !this.noDropdownIcon && (h("tds-icon", { class: "dropdown-icon", name: "chevron_down", size: "16px" })))), this.buttonEl && (h("tds-popover-canvas", { id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
42
48
|
{
|
|
43
49
|
name: 'flip',
|
|
44
50
|
options: {
|
|
45
51
|
fallbackPlacements: [],
|
|
46
52
|
},
|
|
47
53
|
},
|
|
48
|
-
] }, this.open ? h("slot", null) : null)))));
|
|
54
|
+
] }, this.open ? (h("span", { onClick: (e) => this.handleSlottedItemClick(e), onKeyDown: (e) => e.key === 'Enter' && this.handleSlottedItemClick(e) }, h("slot", null))) : null)))));
|
|
49
55
|
}
|
|
50
56
|
get host() { return this; }
|
|
51
57
|
static get style() { return TdsHeaderDropdownStyle0; }
|
|
@@ -8,7 +8,7 @@ import { d as defineCustomElement$4 } from './icon.js';
|
|
|
8
8
|
import { d as defineCustomElement$3 } from './popover-canvas.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './popover-core.js';
|
|
10
10
|
|
|
11
|
-
const headerLauncherCss = ":host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu::-webkit-scrollbar{width:
|
|
11
|
+
const headerLauncherCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .wrapper .menu::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .wrapper .menu::-webkit-scrollbar-track{background:transparent}:host .wrapper .menu::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .wrapper .menu::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .wrapper .menu{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}@media all and (max-width: 384px){:host .wrapper .menu{width:100vw}}:host .wrapper.state-list-type-menu .menu{height:calc(100vh - var(--tds-header-height))}:host .wrapper.state-open .button{position:relative;z-index:901}";
|
|
12
12
|
const TdsHeaderLauncherStyle0 = headerLauncherCss;
|
|
13
13
|
|
|
14
14
|
const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLauncher extends HTMLElement {
|
|
@@ -29,12 +29,8 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
componentDidLoad() {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const hasListTypeMenu = slottedElements.some((element) => element.tagName.toLowerCase() === 'tds-header-launcher-list');
|
|
35
|
-
if (hasListTypeMenu) {
|
|
36
|
-
this.hasListTypeMenu = true;
|
|
37
|
-
}
|
|
32
|
+
const hasListTypeMenu = !!this.host.querySelector('tds-header-launcher-list');
|
|
33
|
+
this.hasListTypeMenu = hasListTypeMenu;
|
|
38
34
|
}
|
|
39
35
|
toggleLauncher() {
|
|
40
36
|
this.open = !this.open;
|
|
@@ -46,11 +42,11 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
46
42
|
}, 'ref': (el) => {
|
|
47
43
|
this.buttonEl = el;
|
|
48
44
|
} });
|
|
49
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '337abddb77f5d7b2ce7c1a8bcfe2dd5e60cc934c' }, h("div", { key: '3652f71bd52be2fcbae7bfde3dab0b0c1c0c5d56', class: {
|
|
50
46
|
'wrapper': true,
|
|
51
47
|
'state-open': this.open,
|
|
52
48
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
53
|
-
} }, h("tds-header-launcher-button", Object.assign({ key: '
|
|
49
|
+
} }, h("tds-header-launcher-button", Object.assign({ key: 'ffae6f54b57dcc0c44fae751f9da1025512b8f4b' }, buttonAttributes)), this.buttonEl && (h("tds-popover-canvas", { id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
54
50
|
{
|
|
55
51
|
name: 'flip',
|
|
56
52
|
options: {
|
|
@@ -16,7 +16,7 @@ const updateListChildrenRoles = (targetNode) => {
|
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const headerCss = "html,:root{--tds-nav-dropdown-menu-box:0 3px 3px rgb(0 0 0 / 15%), 0 -1px 1px rgb(0 0 0 / 1%);--tds-nav-dropdown-item-border-radius:0 0 4px 4px;--tds-font-family-headline:\"Scania Sans Headline\", arial, helvetica, sans-serif}tds-header{display:block;height:var(--tds-header-height);background-color:var(--tds-header-background);width:100%;z-index:300}nav{box-sizing:border-box;background-color:var(--tds-header-background);width:100%;display:block}nav *{box-sizing:border-box}nav .tds-header-component-list{height:var(--tds-header-height);all:unset;display:flex;justify-content:start;align-items:center}nav tds-header-dropdown,nav tds-header-item{display:none}nav .tds-header-middle-spacer{all:unset;display:block;flex-grow:1;height:var(--tds-header-height);border-right:1px solid var(--tds-header--basic-element-border)}@media screen and (min-width: 992px){nav tds-header-dropdown,nav tds-header-item{display:block}}nav tds-header-item:nth-child(3),nav tds-header-dropdown:nth-child(3){border-left:1px solid var(--tds-header--basic-element-border)}";
|
|
19
|
+
const headerCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}html,:root{--tds-nav-dropdown-menu-box:0 3px 3px rgb(0 0 0 / 15%), 0 -1px 1px rgb(0 0 0 / 1%);--tds-nav-dropdown-item-border-radius:0 0 4px 4px;--tds-font-family-headline:\"Scania Sans Headline\", arial, helvetica, sans-serif}tds-header{display:block;height:var(--tds-header-height);background-color:var(--tds-header-background);width:100%;z-index:300}nav{box-sizing:border-box;background-color:var(--tds-header-background);width:100%;display:block}nav *{box-sizing:border-box}nav .tds-header-component-list{height:var(--tds-header-height);all:unset;display:flex;justify-content:start;align-items:center}nav tds-header-dropdown,nav tds-header-item{display:none}nav .tds-header-middle-spacer{all:unset;display:block;flex-grow:1;height:var(--tds-header-height);border-right:1px solid var(--tds-header--basic-element-border)}@media screen and (min-width: 992px){nav tds-header-dropdown,nav tds-header-item{display:block}}nav tds-header-item:nth-child(3),nav tds-header-dropdown:nth-child(3){border-left:1px solid var(--tds-header--basic-element-border)}";
|
|
20
20
|
const TdsHeaderStyle0 = headerCss;
|
|
21
21
|
|
|
22
22
|
const TdsHeader$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeader extends HTMLElement {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { h as hasSlot } from './hasSlot.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
4
|
|
|
5
|
-
const modalCss = "
|
|
5
|
+
const modalCss = ".tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;max-height:85vh;overflow-y:auto;pointer-events:auto;}.tds-modal *{box-sizing:border-box}.tds-modal::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-track{background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500);border-radius:0 1em 1em 0}.tds-modal__actions-sticky{overflow:hidden;display:flex;flex-direction:column}.tds-modal__actions-sticky .body{font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{bottom:-1px;left:0;right:0;background-color:var(--tds-modal-background);padding:var(--tds-spacing-element-24) var(--tds-spacing-element-16) var(--tds-spacing-element-16);display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--tds-modal-background);display:flex;gap:16px;padding:24px 16px 16px}@media (min-width: 320px){.tds-modal-xs{width:100%}.tds-modal-sm{width:100%}.tds-modal-md{width:100%}.tds-modal-lg{width:100%}}@media (min-width: 672px){.tds-modal-xs{width:50%}.tds-modal-sm{width:62.5%}.tds-modal-md{width:75%}.tds-modal-lg{width:100%}}@media (min-width: 1056px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:43.75%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1312px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1584px){.tds-modal-xs{width:25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:50%}.tds-modal-lg{width:75%}}@media (max-width: 320px){.tds-modal-md,.tds-modal-lg,.tds-modal-sm{height:100%}.tds-modal-md slot[name=actions]::slotted(*),.tds-modal-lg slot[name=actions]::slotted(*),.tds-modal-sm slot[name=actions]::slotted(*){display:flex}}.header{display:flex;padding:var(--tds-spacing-element-16);position:sticky;top:0;background-color:var(--tds-modal-background);z-index:1}.header,slot[name=header]::slotted(*){color:var(--tds-modal-text);font:var(--tds-headline-05) !important;letter-spacing:var(--tds-headline-05-ls) !important;margin:0;flex:1}.body{color:var(--tds-modal-text);font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);overflow-y:visible;padding:0 var(--tds-spacing-element-16) var(--tds-spacing-element-16);}.body::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-track{background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500)}.tds-modal-backdrop{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--tds-modal-backdrop);pointer-events:auto}.tds-modal-backdrop *{box-sizing:border-box}button.tds-modal-close{margin:0 0 auto auto;background-color:transparent;border:0;padding:0;appearance:unset}.tds-modal-close{display:inline-block;height:auto;color:var(--tds-modal-icon);cursor:pointer}.tds-modal-close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}@media (min-width: 320px){.tds-modal-close{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn{display:inline-block;height:auto;background-repeat:no-repeat;cursor:pointer}@media (min-width: 320px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn svg{fill:var(--tds-modal-icon)}.tds-modal-overflow{overflow:hidden}:host{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;padding:0 16px;z-index:700;pointer-events:none}:host *{box-sizing:border-box}:host .tds-modal-close{border:none;background-color:transparent}:host .tds-modal-close-btn{border:none;background-color:transparent}@media (max-width: 320px){:host{padding:0}}:host.show{display:flex}:host.hide{display:none}:host(.show){display:flex}:host(.hide){display:none}";
|
|
6
6
|
const TdsModalStyle0 = modalCss;
|
|
7
7
|
|
|
8
8
|
const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { g as generateUniqueId } from './generateUniqueId.js';
|
|
3
3
|
|
|
4
|
-
const radioButtonCss = ".
|
|
4
|
+
const radioButtonCss = ".tds-radio-button.sc-tds-radio-button{box-sizing:border-box;display:flex;align-items:center;margin-left:-4px;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-radio-button-color)}.tds-radio-button.sc-tds-radio-button *.sc-tds-radio-button{box-sizing:border-box}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button{appearance:none;outline:none;margin:0;border:0;width:24px;height:24px;border-radius:50%;position:relative;cursor:pointer;flex-shrink:0;align-self:flex-start}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button+label.sc-tds-radio-button{padding:var(--tds-spacing-element-4) 0 var(--tds-spacing-element-4) var(--tds-spacing-element-4);cursor:pointer}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button::before,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button::after{content:\"\";position:absolute;border-radius:50%;box-sizing:border-box}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button::before{width:24px;height:24px;left:0;top:0}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button::after{border:1px solid var(--tds-radio-button-interaction-01);background-color:var(--tds-radio-button-interaction-02);width:16px;height:16px;left:4px;top:4px}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:hover::before{background-color:var(--tds-radio-button-background-hover);opacity:0.12}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:focus::before{background-color:var(--tds-radio-button-background-focus);opacity:0.24;animation:rb-focus 0.4s cubic-bezier(0.65, 0.05, 0.38, 0.95) forwards}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:disabled,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].disabled.sc-tds-radio-button{cursor:not-allowed}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:disabled::after,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].disabled.sc-tds-radio-button::after{border-color:var(--tds-radio-button-border-color-disabled-after);background-color:var(--tds-radio-button-interaction-02)}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:disabled+label.sc-tds-radio-button,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].disabled.sc-tds-radio-button+label.sc-tds-radio-button{color:var(--tds-radio-button-disabled);cursor:not-allowed}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:disabled:hover::before,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].disabled.sc-tds-radio-button:hover::before{display:none;opacity:1}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked::after{border:4px solid var(--tds-radio-button-interaction-01)}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked:disabled:hover::before,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked:disabled::before,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked.disabled:hover::before,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked.disabled::before{display:block;width:16px;height:16px;left:4px;top:4px;border:1px solid var(--tds-radio-button-color-disabled-before);box-sizing:content-box}.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked:disabled::after,.tds-radio-button.sc-tds-radio-button .tds-form-input[type=radio].sc-tds-radio-button:checked.disabled::after{border:4px solid var(--tds-radio-button-interaction-02);background-color:var(--tds-radio-button-color-disabled-after);left:5px;top:5px}@keyframes rb-focus{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:0.24}}";
|
|
5
5
|
const TdsRadioButtonStyle0 = radioButtonCss;
|
|
6
6
|
|
|
7
7
|
const TdsRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class TdsRadioButton extends HTMLElement {
|