@scania/tegel 1.37.0 → 1.37.1-dropdown-prevent-internal-reset-beta.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/tds-breadcrumbs.cjs.entry.js +1 -6
- package/dist/cjs/tds-button.cjs.entry.js +3 -8
- package/dist/cjs/tds-checkbox.cjs.entry.js +2 -7
- package/dist/cjs/tds-chip.cjs.entry.js +1 -6
- package/dist/cjs/tds-datetime.cjs.entry.js +3 -8
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +8 -19
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +3 -10
- package/dist/cjs/tds-header-hamburger.cjs.entry.js +1 -6
- package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -7
- package/dist/cjs/tds-table-body-row.cjs.entry.js +1 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +5 -10
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -8
- package/dist/cjs/tds-toggle.cjs.entry.js +4 -7
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -6
- package/dist/collection/components/button/button.js +3 -8
- package/dist/collection/components/checkbox/checkbox.js +2 -7
- package/dist/collection/components/chip/chip.js +1 -6
- package/dist/collection/components/datetime/datetime.js +3 -8
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +1 -6
- package/dist/collection/components/dropdown/dropdown.js +7 -13
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +3 -10
- package/dist/collection/components/header/header-hamburger/header-hamburger.js +1 -6
- package/dist/collection/components/header/header-launcher/header-launcher.js +2 -7
- package/dist/collection/components/table/table-body-row/table-body-row.css +4 -0
- package/dist/collection/components/text-field/text-field.js +5 -10
- package/dist/collection/components/textarea/textarea.js +3 -8
- package/dist/collection/components/toggle/toggle.js +4 -7
- package/dist/components/{p-23aab3b9.js → p-44f5b5e1.js} +2 -7
- package/dist/components/{p-ffbaebb1.js → p-c0066f2a.js} +7 -13
- package/dist/components/{p-19edd11a.js → p-d64878cb.js} +2 -7
- package/dist/components/tds-breadcrumbs.js +1 -6
- package/dist/components/tds-button.js +3 -8
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-chip.js +1 -6
- package/dist/components/tds-datetime.js +3 -8
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-header-dropdown.js +3 -10
- package/dist/components/tds-header-hamburger.js +1 -6
- package/dist/components/tds-header-launcher.js +2 -7
- package/dist/components/tds-table-body-row.js +2 -2
- package/dist/components/tds-table-footer.js +3 -3
- package/dist/components/tds-table-header.js +1 -1
- package/dist/components/tds-text-field.js +5 -10
- package/dist/components/tds-textarea.js +3 -8
- package/dist/components/tds-toggle.js +4 -7
- package/dist/esm/tds-breadcrumbs.entry.js +1 -6
- package/dist/esm/tds-button.entry.js +3 -8
- package/dist/esm/tds-checkbox.entry.js +2 -7
- package/dist/esm/tds-chip.entry.js +1 -6
- package/dist/esm/tds-datetime.entry.js +3 -8
- package/dist/esm/tds-dropdown_2.entry.js +8 -19
- package/dist/esm/tds-header-dropdown.entry.js +3 -10
- package/dist/esm/tds-header-hamburger.entry.js +1 -6
- package/dist/esm/tds-header-launcher.entry.js +2 -7
- package/dist/esm/tds-table-body-row.entry.js +1 -1
- package/dist/esm/tds-text-field.entry.js +5 -10
- package/dist/esm/tds-textarea.entry.js +3 -8
- package/dist/esm/tds-toggle.entry.js +4 -7
- package/dist/tegel/p-1b471db7.entry.js +1 -0
- package/dist/tegel/p-2fcd8108.entry.js +1 -0
- package/dist/tegel/p-3022d31d.entry.js +1 -0
- package/dist/tegel/p-303acf88.entry.js +1 -0
- package/dist/tegel/p-3ebe93ff.entry.js +1 -0
- package/dist/tegel/p-8c2695af.entry.js +1 -0
- package/dist/tegel/p-9b0c886e.entry.js +1 -0
- package/dist/tegel/p-a6238890.entry.js +1 -0
- package/dist/tegel/p-a74cb560.entry.js +1 -0
- package/dist/tegel/p-a98767ea.entry.js +1 -0
- package/dist/tegel/p-cd5103e3.entry.js +1 -0
- package/dist/tegel/{p-614cc097.entry.js → p-d0f09796.entry.js} +1 -1
- package/dist/tegel/p-f9c17612.entry.js +1 -0
- package/dist/tegel/tegel.css +3 -3
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +0 -1
- package/dist/types/components/button/button.d.ts +0 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -1
- package/dist/types/components/chip/chip.d.ts +0 -1
- package/dist/types/components/datetime/datetime.d.ts +0 -1
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +0 -1
- package/dist/types/components/dropdown/dropdown.d.ts +0 -1
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +0 -1
- package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +0 -1
- package/dist/types/components/header/header-launcher/header-launcher.d.ts +0 -1
- package/dist/types/components/text-field/text-field.d.ts +0 -1
- package/dist/types/components/textarea/textarea.d.ts +0 -1
- package/dist/types/components/toggle/toggle.d.ts +0 -1
- package/package.json +1 -1
- package/dist/tegel/p-23ea1922.entry.js +0 -1
- package/dist/tegel/p-2c56421f.entry.js +0 -1
- package/dist/tegel/p-5020a688.entry.js +0 -1
- package/dist/tegel/p-569d5de4.entry.js +0 -1
- package/dist/tegel/p-618d6b4f.entry.js +0 -1
- package/dist/tegel/p-83831252.entry.js +0 -1
- package/dist/tegel/p-9fe97da7.entry.js +0 -1
- package/dist/tegel/p-ab103d0c.entry.js +0 -1
- package/dist/tegel/p-b58194f9.entry.js +0 -1
- package/dist/tegel/p-e00c0c30.entry.js +0 -1
- package/dist/tegel/p-f68530b3.entry.js +0 -1
- package/dist/tegel/p-f9374451.entry.js +0 -1
|
@@ -14,14 +14,9 @@ const TdsHeaderHamburger$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderHam
|
|
|
14
14
|
this.__attachShadow();
|
|
15
15
|
this.tdsAriaLabel = undefined;
|
|
16
16
|
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
if (!this.tdsAriaLabel) {
|
|
19
|
-
console.warn('Tegel Header Hamburger component: missing tdsAriaLabel prop');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
17
|
render() {
|
|
23
18
|
const inheritedButtonProps = Object.assign({}, inheritAriaAttributes(this.host));
|
|
24
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'e89db0f35bac2766a531be705b37c1d02e315431' }, h("tds-header-item", { key: '2aba0027ff9ce0516722d9785df5f61cd69aa02e' }, h("button", Object.assign({ key: 'f3b03d5b8a13285972edc9c645effc91c3ec92ad' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: '6177dfc5ec0fed7902ecea6bab75b6031099c9c3', class: "icon", name: "burger", size: "20px" })))));
|
|
25
20
|
}
|
|
26
21
|
get host() { return this; }
|
|
27
22
|
static get style() { return TdsHeaderHamburgerStyle0; }
|
|
@@ -51,11 +51,6 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
connectedCallback() {
|
|
55
|
-
if (!this.tdsAriaLabel) {
|
|
56
|
-
console.warn('Tegel Header Launcher component: missing tdsAriaLabel prop');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
54
|
render() {
|
|
60
55
|
this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes(this.host, ['role']));
|
|
61
56
|
const buttonAttributes = Object.assign(Object.assign({}, this.ariaAttributes), { 'aria-expanded': `${this.open}`, 'aria-controls': `launcher-${this.uuid}`, 'class': 'button', 'active': this.open, 'onClick': () => {
|
|
@@ -63,11 +58,11 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
63
58
|
}, 'ref': (el) => {
|
|
64
59
|
this.buttonEl = el;
|
|
65
60
|
} });
|
|
66
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: 'b62aac321e36b12d139d51c3421a1a9540079c22' }, h("div", { key: '4bb1d8e74ec245d9899870fccd990935488dcf7b', class: {
|
|
67
62
|
'wrapper': true,
|
|
68
63
|
'state-open': this.open,
|
|
69
64
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
70
|
-
} }, h("tds-header-launcher-button", Object.assign({ key: '
|
|
65
|
+
} }, h("tds-header-launcher-button", Object.assign({ key: 'c3b90d64efd2878ffc2b0332538c2877f2b48fec' }, buttonAttributes, { "tds-aria-label": this.tdsAriaLabel })), this.buttonEl && (h("tds-popover-canvas", { key: 'dd41f1e0573ceed07f519813bec503001d02377b', id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
71
66
|
{
|
|
72
67
|
name: 'flip',
|
|
73
68
|
options: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-44f5b5e1.js';
|
|
3
3
|
|
|
4
|
-
const tableBodyRowCss = ":host(.tds-table__row){box-sizing:border-box;display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host(.tds-table__row) *{box-sizing:border-box}:host(.tds-table__row) .tds-table__body-cell--checkbox{min-width:48px;width:48px;padding:0}:host(.tds-table__row:hover){background-color:var(--tds-table-body-row-background-hover)}:host(.tds-table__row--selected){background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row--selected:hover){background-color:var(--tds-table-body-row-background-selected-hover)}:host(.tds-table__row--hidden){display:none}:host(.tds-table__row--expended){width:100%;background-color:pink}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host(.tds-table__compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__body-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table__row--clickable){cursor:pointer}:host(.tds-table__row--clickable:focus-visible){outline:var(--focus-outline, 2px solid blue)}";
|
|
4
|
+
const tableBodyRowCss = ":host(.tds-table__row){box-sizing:border-box;display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host(.tds-table__row) *{box-sizing:border-box}:host(.tds-table__row) .tds-table__body-cell--checkbox{min-width:48px;width:48px;padding:0}:host(.tds-table__row:hover){border-bottom:1px solid var(--tds-table-divider-hover)}:host(.tds-table__row:hover){background-color:var(--tds-table-body-row-background-hover)}:host(.tds-table__row--selected){background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row--selected:hover){background-color:var(--tds-table-body-row-background-selected-hover)}:host(.tds-table__row--hidden){display:none}:host(.tds-table__row--expended){width:100%;background-color:pink}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host(.tds-table__compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__body-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table__row--clickable){cursor:pointer}:host(.tds-table__row--clickable:focus-visible){outline:var(--focus-outline, 2px solid blue)}";
|
|
5
5
|
const TdsTableBodyRowStyle0 = tableBodyRowCss;
|
|
6
6
|
|
|
7
7
|
const relevantTableProps = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
|
-
import { d as defineCustomElement$5 } from './p-
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-
|
|
2
|
+
import { d as defineCustomElement$5 } from './p-44f5b5e1.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-c0066f2a.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-d64878cb.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-b390ece5.js';
|
|
6
6
|
|
|
7
7
|
const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:var(--tds-spacing-element-48)}:host *{box-sizing:border-box}:host .tds-table__footer-row{background-color:var(--tds-table-footer-background);color:var(--tds-table-color)}:host .tds-table__footer-cell{padding:0 var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-48);display:flex;align-items:center;justify-content:space-between}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector{display:flex;align-items:center}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page{display:flex;align-items:center;margin-right:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page p,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page p{margin-right:var(--tds-spacing-element-8)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-table-footer-page-selector-input-background);color:var(--tds-table-color);width:74px;height:30px;border:none;border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;margin-right:var(--tds-spacing-element-4);padding-left:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:hover{background-color:var(--tds-table-footer-page-selector-input-background-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:disabled{color:var(--tds-table-footer-page-selector-input-color-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input--shake{animation:tds-shake-animation 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-text{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:1px 8px 0 0}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:var(--tds-spacing-element-32);width:var(--tds-spacing-element-32);border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;color:var(--tds-table-footer-page-selector-icon)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:hover{background-color:var(--tds-table-footer-btn-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled{cursor:default;color:var(--tds-table-footer-page-selector-icon-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled:hover{background-color:transparent}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn-svg{height:var(--tds-spacing-element-20);width:var(--tds-spacing-element-20);fill:var(--tds-table-color)}:host(.tds-table--compact){height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{height:var(--tds-spacing-element-24)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{height:28px;width:28px}:host(.footer__horizontal-scroll){display:inline-table;position:absolute;margin-top:10px}@keyframes tds-shake-animation{10%,90%{transform:translate3d(-1px, 0, 0)}20%,80%{transform:translate3d(2px, 0, 0)}30%,50%,70%{transform:translate3d(-4px, 0, 0)}40%,60%{transform:translate3d(4px, 0, 0)}}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-44f5b5e1.js';
|
|
3
3
|
|
|
4
4
|
const tableHeaderCss = ":host{box-sizing:border-box;display:table-header-group}:host *{box-sizing:border-box}:host .tds-table__header-cell--checkbox{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-divider);height:48px;box-sizing:border-box;overflow:hidden;transition:background-color 200ms ease;min-width:unset;width:48px;padding:0;border-top-left-radius:4px}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host .tds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:48px;cursor:pointer}:host .tds-table__expand-control-container .tds-table__expand-input{display:none}:host .tds-table__expand-control-container .tds-expandable-row-icon{height:20px;width:20px;transition:transform 200ms ease;transform:rotate(0)}:host .tds-table__expand-control-container .tds-expandable-row-icon--opened{transform:rotate(180deg)}:host ::slotted(tds-header-cell:hover){background-color:var(--tds-table-header-background-hover)}:host(.tds-table--compact) .tds-table__header-cell--checkbox{height:32px}:host(.tds-table--compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__header-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table--toolbar-available) .tds-table__header-cell--checkbox{border-top-left-radius:0}";
|
|
5
5
|
const TdsTableHeaderStyle0 = tableHeaderCss;
|
|
@@ -76,16 +76,11 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
76
76
|
this.textInput.focus();
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
connectedCallback() {
|
|
80
|
-
if (!this.tdsAriaLabel) {
|
|
81
|
-
console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
79
|
render() {
|
|
85
80
|
var _a;
|
|
86
81
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
87
82
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
88
|
-
return (h("div", { key: '
|
|
83
|
+
return (h("div", { key: 'b9fa2b03ce2a0b196dc6083614420d6f83675e3d', class: {
|
|
89
84
|
'form-text-field': true,
|
|
90
85
|
'form-text-field-nomin': this.noMinWidth,
|
|
91
86
|
'text-field-focus': this.focusInput && !this.disabled,
|
|
@@ -103,12 +98,12 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
103
98
|
'form-text-field-sm': this.size === 'sm',
|
|
104
99
|
'form-text-field-error': this.state === 'error',
|
|
105
100
|
'form-text-field-success': this.state === 'success',
|
|
106
|
-
} }, this.labelPosition === 'outside' && (h("div", { key: '
|
|
101
|
+
} }, this.labelPosition === 'outside' && (h("div", { key: '7110b867aba9a9ba62b796f67caeccf22a4a8060', class: "text-field-label-outside" }, h("label", { key: '6b0b6c7d17bb236f1203dfaf793ba0a3bc2d8efb', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '5603d3e78b290a78d7c482a0dac7e1f0efb9af7f', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '9accb59dffa061d7947d4392310cb1717a395363', class: {
|
|
107
102
|
'text-field-slot-wrap-prefix': true,
|
|
108
103
|
'text-field-error': this.state === 'error',
|
|
109
104
|
'text-field-success': this.state === 'success',
|
|
110
105
|
'text-field-default': this.state === 'default',
|
|
111
|
-
} }, h("slot", { key: '
|
|
106
|
+
} }, h("slot", { key: '739e089cdb9798dc108b68c4858c90bf75e18958', name: "prefix" }))), h("div", { key: 'e4229be4e4bf421319184e798b98afcbaa361413', class: "text-field-input-container" }, h("input", { key: 'f462b4c0d49e4e070090f6a14df52af66b87648d', ref: (inputEl) => {
|
|
112
107
|
this.textInput = inputEl;
|
|
113
108
|
}, class: {
|
|
114
109
|
'text-field-input': true,
|
|
@@ -123,13 +118,13 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
123
118
|
if (!this.readOnly) {
|
|
124
119
|
this.handleBlur(event);
|
|
125
120
|
}
|
|
126
|
-
}, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '
|
|
121
|
+
}, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ac16cff7856d65503fa30f7eb23d2936377e72d4', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'b70453ec36ca62f584b26b0e6dc4b3f0cde2ff54', class: {
|
|
127
122
|
'text-field-slot-wrap-suffix': true,
|
|
128
123
|
'text-field-error': this.state === 'error',
|
|
129
124
|
'text-field-success': this.state === 'success',
|
|
130
125
|
'text-field-default': this.state === 'default',
|
|
131
126
|
'tds-u-display-none': this.readOnly,
|
|
132
|
-
} }, h("slot", { key: '
|
|
127
|
+
} }, h("slot", { key: '7e50b20d90a68f9af583b8f2ade5c742e2d52351', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '72e2cf4f2872d247ac6f28e935e8185aafef6dec', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '171bdde8535c6bbd08eec60d87d9aa5bae1f98bd', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '05e7e8898ee3fcf81fb011aa2141092e8b749e37', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '0c16d399b376d9aebed2aabf759cb7319c5745cf', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '280eed9185c8cffa29e3cf62425f1f1f377f3abc', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'ddf07e469173a574a848cd2ff816bcc535940340', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b5b06dba13fb8911828153341b631facfc016c88', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'a4c41817f19b32e575423d5bbe19c28a38031e6e', class: {
|
|
133
128
|
'text-field-textcounter-divider': true,
|
|
134
129
|
'text-field-textcounter-disabled': this.disabled,
|
|
135
130
|
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
|
|
@@ -71,14 +71,9 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
|
|
|
71
71
|
}
|
|
72
72
|
return modeVariant;
|
|
73
73
|
}
|
|
74
|
-
connectedCallback() {
|
|
75
|
-
if (!this.tdsAriaLabel && !this.label) {
|
|
76
|
-
console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
74
|
render() {
|
|
80
75
|
var _a;
|
|
81
|
-
return (h("div", { key: '
|
|
76
|
+
return (h("div", { key: '873fc5866c777549e56d115e7bce64a62fdd5c0c', class: {
|
|
82
77
|
'textarea-container': true,
|
|
83
78
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
84
79
|
'textarea-focus': this.focusInput,
|
|
@@ -88,7 +83,7 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
|
|
|
88
83
|
'textarea-data': this.value !== '',
|
|
89
84
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
90
85
|
'no-min-width': this.noMinWidth,
|
|
91
|
-
} }, this.labelPosition !== 'no-label' && (h("label", { key: '
|
|
86
|
+
} }, this.labelPosition !== 'no-label' && (h("label", { key: '09f5df4efb39b7e3eb71d8567adc5cffd374ad66', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '57bd6d6e2e7a1919d668625a675e4a20421af965', class: "textarea-wrapper" }, h("textarea", { key: '69955de378170f86c7a942d5f8101aa2ff9440f4', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
|
|
92
87
|
this.textEl = inputEl;
|
|
93
88
|
}, disabled: this.disabled, readonly: !this.disabled && this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autofocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
|
|
94
89
|
if (!this.readOnly) {
|
|
@@ -98,7 +93,7 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
|
|
|
98
93
|
if (!this.readOnly) {
|
|
99
94
|
this.handleBlur(event);
|
|
100
95
|
}
|
|
101
|
-
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: '
|
|
96
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: '0fded8e72f3f6d8e6f53cb57df94f480df17ce53', class: "textarea-resizer-icon" }, h("svg", { key: '6b41ae06bbedfa5ba88991bc6856f80ca8a4b6f8', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'c4f731e7483bade2d0dbd545302afc278039a122', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '94bc8eed69418751ad240087201827a0ef0185b4', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '231983d3994030724a06358f37dd0e53f91d78d4', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '9e7f16d10939227a5c8c87f00ddd653a58c094ad', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: '67222f0c93979caf49881c591cd99eb4c97ebdc1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: 'cbde13084b090f7eea4bd80da47373ec941e1981', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '5895277b2e07f4c8f2990f624eb0797dffd0b1f0', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '97afedbb5aaf02461a38f39643298b6c2650c52f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
102
97
|
}
|
|
103
98
|
static get style() { return TdsTextareaStyle0; }
|
|
104
99
|
}, [2, "tds-textarea", {
|
|
@@ -42,16 +42,13 @@ const TdsToggle$1 = /*@__PURE__*/ proxyCustomElement(class TdsToggle extends H {
|
|
|
42
42
|
componentWillLoad() {
|
|
43
43
|
this.labelSlot = this.host.querySelector("[slot='label']");
|
|
44
44
|
}
|
|
45
|
-
connectedCallback() {
|
|
46
|
-
if (!this.tdsAriaLabel) {
|
|
47
|
-
console.warn('Tegel Toggle component: tdsAriaLabel prop is missing');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
45
|
render() {
|
|
51
|
-
return (h("div", { key: '
|
|
46
|
+
return (h("div", { key: '68e34abfad735ed96e35e0f7966670e226dcbc82', class: "tds-toggle" }, this.headline && (h("div", { key: '3784ca8234261dd269d0f641a5f2515abae0ece4', class: {
|
|
52
47
|
'toggle-headline': true,
|
|
53
48
|
'disabled': this.disabled,
|
|
54
|
-
} }, this.headline)), h("input", { key: '
|
|
49
|
+
} }, this.headline)), h("input", { key: '675a0c941bce13fc053411b8faf7fe583cbf3245', ref: (inputEl) => {
|
|
50
|
+
this.inputElement = inputEl;
|
|
51
|
+
}, "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '2c73df3e48968f3c95de4b4e14817abf57423f98', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'd1f660a5f25b8bd2ffef2e6cf9574d429cb4ca8a', name: "label" })))));
|
|
55
52
|
}
|
|
56
53
|
get host() { return this; }
|
|
57
54
|
static get style() { return TdsToggleStyle0; }
|
|
@@ -8,15 +8,10 @@ const TdsBreadcrumbs = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.tdsAriaLabel = undefined;
|
|
10
10
|
}
|
|
11
|
-
connectedCallback() {
|
|
12
|
-
if (!this.tdsAriaLabel) {
|
|
13
|
-
console.warn('Tegel Breadcrumbs component: missing tdsAriaLabel prop');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
11
|
render() {
|
|
17
12
|
var _a;
|
|
18
13
|
(_a = this.host.children[this.host.children.length - 1]) === null || _a === void 0 ? void 0 : _a.classList.add('last');
|
|
19
|
-
return (h("nav", { key: '
|
|
14
|
+
return (h("nav", { key: 'd79f99fbdf47a75d66376c7900a1ba2ccfad0ef2', "aria-label": this.tdsAriaLabel }, h("div", { key: 'c06fa49904e230b1fcbaa8eeba1e2d6059f4eccd', role: "list", class: "tds-breadcrumb" }, h("slot", { key: 'fd44b69cd45ffaed95c865988832fa56c545125c' }))));
|
|
20
15
|
}
|
|
21
16
|
get host() { return getElement(this); }
|
|
22
17
|
};
|
|
@@ -20,11 +20,6 @@ const TdsButton = class {
|
|
|
20
20
|
this.value = undefined;
|
|
21
21
|
this.onlyIcon = false;
|
|
22
22
|
}
|
|
23
|
-
connectedCallback() {
|
|
24
|
-
if (this.onlyIcon && !this.tdsAriaLabel) {
|
|
25
|
-
console.warn('Tegel button component: please specify the tdsAriaLabel prop when you have the onlyIcon attribute set to true');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
23
|
handleKeyDown(event) {
|
|
29
24
|
if (event.key === 'Enter' && !this.disabled) {
|
|
30
25
|
this.host.querySelector('button').classList.add('active');
|
|
@@ -41,11 +36,11 @@ const TdsButton = class {
|
|
|
41
36
|
if (!this.text && !hasLabelSlot) {
|
|
42
37
|
this.onlyIcon = true;
|
|
43
38
|
}
|
|
44
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '7358240d76e1b7a6df238b2a1e5f1702f9cd33d7', class: {
|
|
45
40
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
46
41
|
disabled: Boolean(this.disabled),
|
|
47
42
|
fullbleed: Boolean(this.fullbleed),
|
|
48
|
-
}, disabled: this.disabled }, h("button", Object.assign({ key: '
|
|
43
|
+
}, disabled: this.disabled }, h("button", Object.assign({ key: '971f814b0b832e9b161c77812fb7668ed34312ab', type: this.type, name: this.name ? this.name : undefined, value: this.value ? this.value : undefined, disabled: this.disabled, class: {
|
|
49
44
|
'primary': this.variant === 'primary',
|
|
50
45
|
'secondary': this.variant === 'secondary',
|
|
51
46
|
'ghost': this.variant === 'ghost',
|
|
@@ -59,7 +54,7 @@ const TdsButton = class {
|
|
|
59
54
|
'icon': hasIconSlot,
|
|
60
55
|
'only-icon': this.onlyIcon,
|
|
61
56
|
[`animation-${this.animation}`]: this.animation !== 'none',
|
|
62
|
-
} }, (this.onlyIcon && this.tdsAriaLabel && { 'aria-label': this.tdsAriaLabel })), this.text, hasLabelSlot && !this.onlyIcon && h("slot", { key: '
|
|
57
|
+
} }, (this.onlyIcon && this.tdsAriaLabel && { 'aria-label': this.tdsAriaLabel })), this.text, hasLabelSlot && !this.onlyIcon && h("slot", { key: '2dc9400b032af40765d7ba1add85c09249dea64b', name: "label" }), hasIconSlot && h("slot", { key: '01af3eeaa00abc5dc824f4fa4633b2460fb4fe46', name: "icon" }))));
|
|
63
58
|
}
|
|
64
59
|
get host() { return getElement(this); }
|
|
65
60
|
};
|
|
@@ -63,17 +63,12 @@ const TdsCheckbox = class {
|
|
|
63
63
|
this.indeterminate = false;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
connectedCallback() {
|
|
67
|
-
if (!this.tdsAriaLabel) {
|
|
68
|
-
console.warn('Tegel Checkbox component: tdsAriaLabel prop is missing');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
66
|
render() {
|
|
72
|
-
return (h("div", { key: '
|
|
67
|
+
return (h("div", { key: '87d4e8620e183b5fb8a885dca8081424c7497b21', class: "tds-checkbox" }, h("input", { key: 'fa5d4c8e9a33a7a88d1348f6eb66b474e94c0ad1',
|
|
73
68
|
// eslint-disable-next-line no-return-assign
|
|
74
69
|
ref: (inputElement) => (this.inputElement = inputElement), indeterminate: this.indeterminate, "aria-checked": this.checked, "aria-required": this.required, "aria-label": this.tdsAriaLabel, "aria-describedby": this.tdsAriaDescribedby, required: this.required, type: "checkbox", name: this.name, value: this.value, id: this.checkboxId, checked: this.checked, disabled: this.disabled, onFocus: (event) => this.handleFocus(event), onBlur: (event) => this.handleBlur(event), onChange: () => {
|
|
75
70
|
this.handleChange();
|
|
76
|
-
} }), h("label", { key: '
|
|
71
|
+
} }), h("label", { key: '82545f01ad68fae4d613b58d82a770a0c1bce79e', htmlFor: this.checkboxId }, h("slot", { key: '99892e112b596a7f8517427cc42f75e90140c315', name: "label" }))));
|
|
77
72
|
}
|
|
78
73
|
get host() { return getElement(this); }
|
|
79
74
|
static get watchers() { return {
|
|
@@ -71,11 +71,6 @@ const TdsChip = class {
|
|
|
71
71
|
}
|
|
72
72
|
return Object.assign(Object.assign({}, commonAttributes), { onClick: () => this.handleClick() });
|
|
73
73
|
}
|
|
74
|
-
connectedCallback() {
|
|
75
|
-
if (!this.tdsAriaLabel) {
|
|
76
|
-
console.warn('Tegel Chip component: tdsAriaLabel prop is missing');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
74
|
render() {
|
|
80
75
|
const inputAttributes = this.renderInputAttributes();
|
|
81
76
|
const hasPrefixSlot = hasSlot('prefix', this.host);
|
|
@@ -89,7 +84,7 @@ const TdsChip = class {
|
|
|
89
84
|
'suffix': hasSuffixSlot,
|
|
90
85
|
'disabled': this.disabled,
|
|
91
86
|
};
|
|
92
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '4a498e81dbdd096e01d502a1bc378bfa9f7ea61d' }, h("div", { key: '441e76b25ec9fb91485f3394e6df08fa2ac0363f', class: "component" }, h("div", { key: '88658da3bae225792261b6b3b7796c514d76e665', class: chipClasses }, h("input", Object.assign({ key: '1e495bd583136ba481b7f11891f008c8584b0b38', type: this.type, id: this.chipId, "aria-checked": this.type === 'button' ? undefined : String(this.checked), role: this.type, "aria-label": this.tdsAriaLabel }, inputAttributes)), h("label", { key: 'ffaff7dd33befe64eb69fc6f786efd38eb654628', onClick: (event) => event.stopPropagation(), htmlFor: this.chipId }, hasPrefixSlot && h("slot", { key: '95a6bf9c4d337a9d9caaf66b598615af657045c3', name: "prefix" }), hasLabelSlot && h("slot", { key: '2e732390348814bbeea2bb0c4c5fa0b9206a6578', name: "label" }), hasSuffixSlot && h("slot", { key: '716254ff0b5995b2d2a99dcd2aaa2f94613255d0', name: "suffix" }))))));
|
|
93
88
|
}
|
|
94
89
|
get host() { return getElement(this); }
|
|
95
90
|
};
|
|
@@ -112,11 +112,6 @@ const TdsDatetime = class {
|
|
|
112
112
|
}
|
|
113
113
|
this.value = value;
|
|
114
114
|
}
|
|
115
|
-
connectedCallback() {
|
|
116
|
-
if (!this.tdsAriaLabel && !this.label) {
|
|
117
|
-
console.warn('Tegel Datetime component: provide the label or tdsAriaLabel prop for improved accessibility');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
115
|
render() {
|
|
121
116
|
let className = ' tds-datetime-input';
|
|
122
117
|
if (this.size === 'md') {
|
|
@@ -137,7 +132,7 @@ const TdsDatetime = class {
|
|
|
137
132
|
'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
|
|
138
133
|
};
|
|
139
134
|
const iphone = navigator.userAgent.toLowerCase().includes('iphone');
|
|
140
|
-
return (h("div", { key: '
|
|
135
|
+
return (h("div", { key: 'f397a4fc034fb7cd4dcb8ed7b0cbf2ab2e51177a', class: classNames, onKeyDown: (e) => {
|
|
141
136
|
if (e.key === 'Enter') {
|
|
142
137
|
const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
|
|
143
138
|
if (browserIsChrome) {
|
|
@@ -145,9 +140,9 @@ const TdsDatetime = class {
|
|
|
145
140
|
this.textInput.showPicker();
|
|
146
141
|
}
|
|
147
142
|
}
|
|
148
|
-
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '
|
|
143
|
+
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: 'e5dd50563ed2d464983016bc608d81b77c379add', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'b2c01f96bb7d8fa7279ac27048328204cc249547', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: 'e7002fc416e62d2c93c337aee1869aa817997df9', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: '3fdf8d55b15f5a00d4fb0755d5774fee93f100b9', ref: (inputEl) => {
|
|
149
144
|
this.textInput = inputEl;
|
|
150
|
-
}, class: className, type: this.type, disabled: this.disabled, value: this.value, min: this.min, max: this.max, autofocus: this.autofocus, name: this.name, id: this.name, onInput: (e) => this.handleInput(e), onBlur: (e) => this.handleBlur(e), onChange: (e) => this.handleChange(e), "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label }), this.labelPosition === 'inside' && this.size !== 'sm' && this.label && (h("label", { key: '
|
|
145
|
+
}, class: className, type: this.type, disabled: this.disabled, value: this.value, min: this.min, max: this.max, autofocus: this.autofocus, name: this.name, id: this.name, onInput: (e) => this.handleInput(e), onBlur: (e) => this.handleBlur(e), onChange: (e) => this.handleChange(e), "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label }), this.labelPosition === 'inside' && this.size !== 'sm' && this.label && (h("label", { key: '48d096356ad9f547bacbf407af12c4411d5dd45f', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: '0ea83c4003923ffed9b11ef22131000bb696a80f', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '6ab6fde60c3d8ce0ad212c0d248c597a23cc6ce7', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '4c304db3c9e6159a7827b6a83c6f81d04cbf0d19', class: "datetime-icon icon-time" }, h("tds-icon", { key: '2a91a579dc5307d35ffbd47aa67616e2e692dd1c', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: '80dec676d32fd856e7a7dcee7b7e6acbb8b66827', class: "tds-datetime-bar" })), this.helper && (h("div", { key: 'ff276d3c174c88c14081d7a5da689c278844422a', class: "tds-datetime-helper" }, h("div", { key: '9401ca569dd8c23e1bcbdccb39d9f8134fc027db', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: 'dada47e75f30dac9b132477ffd73720d0e1a7530', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
|
|
151
146
|
}
|
|
152
147
|
};
|
|
153
148
|
TdsDatetime.style = TdsDatetimeStyle0;
|
|
@@ -196,12 +196,11 @@ const TdsDropdown = class {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
this.handleFilterReset = () => {
|
|
199
|
-
|
|
199
|
+
// Only clear the input text and filter, don't reset the selected option
|
|
200
200
|
this.inputElement.value = '';
|
|
201
201
|
this.handleFilter({ target: { value: '' } });
|
|
202
202
|
this.inputElement.focus();
|
|
203
|
-
//
|
|
204
|
-
this.internalValue = '';
|
|
203
|
+
// Don't clear internalValue or call reset() - preserve the selected option
|
|
205
204
|
};
|
|
206
205
|
this.handleFocus = (event) => {
|
|
207
206
|
this.open = true;
|
|
@@ -516,11 +515,6 @@ const TdsDropdown = class {
|
|
|
516
515
|
form.removeEventListener('reset', this.resetInput);
|
|
517
516
|
}
|
|
518
517
|
}
|
|
519
|
-
connectedCallback() {
|
|
520
|
-
if (!this.tdsAriaLabel) {
|
|
521
|
-
console.warn('Tegel Dropdown component: tdsAriaLabel prop is missing');
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
518
|
updateDropdownListInertState() {
|
|
525
519
|
if (this.dropdownList) {
|
|
526
520
|
if (this.open) {
|
|
@@ -536,9 +530,9 @@ const TdsDropdown = class {
|
|
|
536
530
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
537
531
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
|
|
538
532
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
|
|
539
|
-
return (h(Host, { key: '
|
|
533
|
+
return (h(Host, { key: 'c3d90008af3a9376540a5058b64349ec3235acb0', class: {
|
|
540
534
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
541
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
535
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'fc60cdf4d107cf74d07d0df1582dc8bc14020b08', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '0cddc37f241453e5c8d80292b50865c8274fc70c', class: {
|
|
542
536
|
'dropdown-select': true,
|
|
543
537
|
[this.size]: true,
|
|
544
538
|
'disabled': this.disabled,
|
|
@@ -588,7 +582,7 @@ const TdsDropdown = class {
|
|
|
588
582
|
label-inside-as-placeholder
|
|
589
583
|
${this.size}
|
|
590
584
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
591
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.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: '
|
|
585
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.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: '107220cfc03a19eb3735b2f33b1af145b4f51094', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
592
586
|
this.dropdownList = element;
|
|
593
587
|
}, class: {
|
|
594
588
|
'dropdown-list': true,
|
|
@@ -599,11 +593,11 @@ const TdsDropdown = class {
|
|
|
599
593
|
'closed': !this.open,
|
|
600
594
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
601
595
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
602
|
-
} }, h("slot", { key: '
|
|
596
|
+
} }, h("slot", { key: 'fb2baca104f77a24fed845719131d1d7b73e8226', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'e34ef314336b3537e2735d832367ee364ec0102c', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '2c28f6d1178f58f2526fc6e56a734b29eed17a49', id: helperId, class: {
|
|
603
597
|
helper: true,
|
|
604
598
|
error: this.error,
|
|
605
599
|
disabled: this.disabled,
|
|
606
|
-
} }, this.error && h("tds-icon", { key: '
|
|
600
|
+
} }, this.error && h("tds-icon", { key: '23234ccade4136e2240f87edf5adf36d1fc32b8a', name: "error", size: "16px" }), this.helper))));
|
|
607
601
|
}
|
|
608
602
|
get host() { return getElement(this); }
|
|
609
603
|
static get watchers() { return {
|
|
@@ -698,13 +692,8 @@ const TdsDropdownOption = class {
|
|
|
698
692
|
componentWillLoad() {
|
|
699
693
|
this.internalValue = convertToString(this.value);
|
|
700
694
|
}
|
|
701
|
-
connectedCallback() {
|
|
702
|
-
if (!this.tdsAriaLabel && !this.multiselect) {
|
|
703
|
-
console.warn('Tegel Dropdown option component: tdsAriaLabel prop is missing');
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
695
|
render() {
|
|
707
|
-
return (h(Host, { key: '
|
|
696
|
+
return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
|
|
708
697
|
${this.size}
|
|
709
698
|
${this.selected ? 'selected' : ''}
|
|
710
699
|
${this.disabled ? 'disabled' : ''}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-51d04e39.js';
|
|
2
2
|
import { g as generateUniqueId } from './generateUniqueId-7934d315.js';
|
|
3
|
-
import { h as hasSlot } from './hasSlot-d52114d0.js';
|
|
4
3
|
|
|
5
4
|
const headerDropdownCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height: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:var(--tds-scrollbar-track-color)}: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:rotate(180deg)}:host .state-open .button{position:relative;z-index:901}";
|
|
6
5
|
const TdsHeaderDropdownStyle0 = headerDropdownCss;
|
|
@@ -47,20 +46,14 @@ const TdsHeaderDropdown = class {
|
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
connectedCallback() {
|
|
51
|
-
const hasLabelSlot = hasSlot('label', this.host);
|
|
52
|
-
if (!this.tdsAriaLabel && !hasLabelSlot) {
|
|
53
|
-
console.warn('Tegel Header Dropdown component: use label slot or specify tdsAriaLabel prop');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
49
|
render() {
|
|
57
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'd3f0a943b953783f2fc1c6345563a5adf0ded1dd' }, h("div", { key: 'c7028ceb31b9409d76d3663cd92a1fb3fa68fd7e', class: {
|
|
58
51
|
'state-open': this.open,
|
|
59
|
-
} }, h("tds-header-item", { key: '
|
|
52
|
+
} }, h("tds-header-item", { key: 'f1d5fe99ee0b62316dd0b48c9b5bb04439fb9b12', class: "button", active: this.open, selected: this.selected }, h("button", { key: '0e1437b558782c96e984287bfc0b9f301090bdb0', ref: (el) => {
|
|
60
53
|
this.buttonEl = el;
|
|
61
54
|
}, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
|
|
62
55
|
this.toggleDropdown();
|
|
63
|
-
}, "aria-label": this.tdsAriaLabel }, h("slot", { key: '
|
|
56
|
+
}, "aria-label": this.tdsAriaLabel }, h("slot", { key: 'fc63cfe2414eb2c60fe85e481a3af49af3ce9653', name: "icon" }), this.label, h("slot", { key: 'f302406472c7be0223fa17b76cc2674cb3e148b7', name: "label" }), !this.noDropdownIcon && (h("tds-icon", { key: '32c53b88ffeed4a78f9efc77b5976afe190c86c6', class: "dropdown-icon", name: "chevron_down", size: "16px", svgTitle: "Dropdown icon" })))), this.buttonEl && (h("tds-popover-canvas", { key: '86ed4a3140d80521792b2953bc4acdef9476c3f6', id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
64
57
|
{
|
|
65
58
|
name: 'flip',
|
|
66
59
|
options: {
|
|
@@ -10,14 +10,9 @@ const TdsHeaderHamburger = class {
|
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.tdsAriaLabel = undefined;
|
|
12
12
|
}
|
|
13
|
-
connectedCallback() {
|
|
14
|
-
if (!this.tdsAriaLabel) {
|
|
15
|
-
console.warn('Tegel Header Hamburger component: missing tdsAriaLabel prop');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
13
|
render() {
|
|
19
14
|
const inheritedButtonProps = Object.assign({}, inheritAriaAttributes(this.host));
|
|
20
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'e89db0f35bac2766a531be705b37c1d02e315431' }, h("tds-header-item", { key: '2aba0027ff9ce0516722d9785df5f61cd69aa02e' }, h("button", Object.assign({ key: 'f3b03d5b8a13285972edc9c645effc91c3ec92ad' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: '6177dfc5ec0fed7902ecea6bab75b6031099c9c3', class: "icon", name: "burger", size: "20px" })))));
|
|
21
16
|
}
|
|
22
17
|
get host() { return getElement(this); }
|
|
23
18
|
};
|
|
@@ -44,11 +44,6 @@ const TdsHeaderLauncher = class {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
connectedCallback() {
|
|
48
|
-
if (!this.tdsAriaLabel) {
|
|
49
|
-
console.warn('Tegel Header Launcher component: missing tdsAriaLabel prop');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
47
|
render() {
|
|
53
48
|
this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes(this.host, ['role']));
|
|
54
49
|
const buttonAttributes = Object.assign(Object.assign({}, this.ariaAttributes), { 'aria-expanded': `${this.open}`, 'aria-controls': `launcher-${this.uuid}`, 'class': 'button', 'active': this.open, 'onClick': () => {
|
|
@@ -56,11 +51,11 @@ const TdsHeaderLauncher = class {
|
|
|
56
51
|
}, 'ref': (el) => {
|
|
57
52
|
this.buttonEl = el;
|
|
58
53
|
} });
|
|
59
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'b62aac321e36b12d139d51c3421a1a9540079c22' }, h("div", { key: '4bb1d8e74ec245d9899870fccd990935488dcf7b', class: {
|
|
60
55
|
'wrapper': true,
|
|
61
56
|
'state-open': this.open,
|
|
62
57
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
63
|
-
} }, h("tds-header-launcher-button", Object.assign({ key: '
|
|
58
|
+
} }, h("tds-header-launcher-button", Object.assign({ key: 'c3b90d64efd2878ffc2b0332538c2877f2b48fec' }, buttonAttributes, { "tds-aria-label": this.tdsAriaLabel })), this.buttonEl && (h("tds-popover-canvas", { key: 'dd41f1e0573ceed07f519813bec503001d02377b', id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
64
59
|
{
|
|
65
60
|
name: 'flip',
|
|
66
61
|
options: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-51d04e39.js';
|
|
2
2
|
|
|
3
|
-
const tableBodyRowCss = ":host(.tds-table__row){box-sizing:border-box;display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host(.tds-table__row) *{box-sizing:border-box}:host(.tds-table__row) .tds-table__body-cell--checkbox{min-width:48px;width:48px;padding:0}:host(.tds-table__row:hover){background-color:var(--tds-table-body-row-background-hover)}:host(.tds-table__row--selected){background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row--selected:hover){background-color:var(--tds-table-body-row-background-selected-hover)}:host(.tds-table__row--hidden){display:none}:host(.tds-table__row--expended){width:100%;background-color:pink}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host(.tds-table__compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__body-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table__row--clickable){cursor:pointer}:host(.tds-table__row--clickable:focus-visible){outline:var(--focus-outline, 2px solid blue)}";
|
|
3
|
+
const tableBodyRowCss = ":host(.tds-table__row){box-sizing:border-box;display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host(.tds-table__row) *{box-sizing:border-box}:host(.tds-table__row) .tds-table__body-cell--checkbox{min-width:48px;width:48px;padding:0}:host(.tds-table__row:hover){border-bottom:1px solid var(--tds-table-divider-hover)}:host(.tds-table__row:hover){background-color:var(--tds-table-body-row-background-hover)}:host(.tds-table__row--selected){background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row--selected:hover){background-color:var(--tds-table-body-row-background-selected-hover)}:host(.tds-table__row--hidden){display:none}:host(.tds-table__row--expended){width:100%;background-color:pink}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host(.tds-table__compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__body-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table__row--clickable){cursor:pointer}:host(.tds-table__row--clickable:focus-visible){outline:var(--focus-outline, 2px solid blue)}";
|
|
4
4
|
const TdsTableBodyRowStyle0 = tableBodyRowCss;
|
|
5
5
|
|
|
6
6
|
const relevantTableProps = [
|