@scania/tegel 1.36.0-beta-tag-component.0 → 1.36.0-remove-aria-warnings-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/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 +6 -16
- 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-text-field.cjs.entry.js +6 -11
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -8
- package/dist/cjs/tds-toast.cjs.entry.js +3 -3
- package/dist/cjs/tds-toggle.cjs.entry.js +4 -7
- package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
- 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 +5 -10
- 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/text-field/text-field.css +5 -32
- package/dist/collection/components/text-field/text-field.js +5 -10
- package/dist/collection/components/textarea/textarea.js +3 -8
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.js +4 -7
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/components/{p-23aab3b9.js → p-44f5b5e1.js} +2 -7
- package/dist/components/{p-9cee9d7f.js → p-619a49f4.js} +2 -2
- package/dist/components/{p-ffbaebb1.js → p-94bfc9f4.js} +5 -10
- 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 +1 -1
- 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 +7 -12
- package/dist/components/tds-textarea.js +4 -9
- package/dist/components/tds-toast.js +3 -3
- package/dist/components/tds-toggle.js +4 -7
- package/dist/components/tds-tooltip.js +1 -1
- 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 +6 -16
- 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-text-field.entry.js +6 -11
- package/dist/esm/tds-textarea.entry.js +3 -8
- package/dist/esm/tds-toast.entry.js +3 -3
- package/dist/esm/tds-toggle.entry.js +4 -7
- package/dist/esm/tds-tooltip.entry.js +2 -2
- package/dist/tegel/p-00c4fa7f.entry.js +1 -0
- package/dist/tegel/p-1b471db7.entry.js +1 -0
- package/dist/tegel/p-2a8c194d.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-397c8969.entry.js +1 -0
- package/dist/tegel/p-3ebe93ff.entry.js +1 -0
- package/dist/tegel/p-60dbfb58.entry.js +1 -0
- package/dist/tegel/{p-67b4b2cf.entry.js → p-753dbc4d.entry.js} +1 -1
- package/dist/tegel/p-8c2695af.entry.js +1 -0
- package/dist/tegel/p-9b0c886e.entry.js +1 -0
- package/dist/tegel/p-d85104a7.entry.js +1 -0
- package/dist/tegel/{p-4274d329.entry.js → p-f29a11e0.entry.js} +1 -1
- package/dist/tegel/p-f9c17612.entry.js +1 -0
- package/dist/tegel/tegel.css +1 -1
- 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-3656ec98.entry.js +0 -1
- package/dist/tegel/p-5020a688.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-b8a33966.entry.js +0 -1
- package/dist/tegel/p-cf1413f0.entry.js +0 -1
- package/dist/tegel/p-fe8a4544.entry.js +0 -1
|
@@ -12,15 +12,10 @@ const TdsBreadcrumbs = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.tdsAriaLabel = undefined;
|
|
14
14
|
}
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
if (!this.tdsAriaLabel) {
|
|
17
|
-
console.warn('Tegel Breadcrumbs component: missing tdsAriaLabel prop');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
15
|
render() {
|
|
21
16
|
var _a;
|
|
22
17
|
(_a = this.host.children[this.host.children.length - 1]) === null || _a === void 0 ? void 0 : _a.classList.add('last');
|
|
23
|
-
return (index.h("nav", { key: '
|
|
18
|
+
return (index.h("nav", { key: 'd79f99fbdf47a75d66376c7900a1ba2ccfad0ef2', "aria-label": this.tdsAriaLabel }, index.h("div", { key: 'c06fa49904e230b1fcbaa8eeba1e2d6059f4eccd', role: "list", class: "tds-breadcrumb" }, index.h("slot", { key: 'fd44b69cd45ffaed95c865988832fa56c545125c' }))));
|
|
24
19
|
}
|
|
25
20
|
get host() { return index.getElement(this); }
|
|
26
21
|
};
|
|
@@ -24,11 +24,6 @@ const TdsButton = class {
|
|
|
24
24
|
this.value = undefined;
|
|
25
25
|
this.onlyIcon = false;
|
|
26
26
|
}
|
|
27
|
-
connectedCallback() {
|
|
28
|
-
if (this.onlyIcon && !this.tdsAriaLabel) {
|
|
29
|
-
console.warn('Tegel button component: please specify the tdsAriaLabel prop when you have the onlyIcon attribute set to true');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
27
|
handleKeyDown(event) {
|
|
33
28
|
if (event.key === 'Enter' && !this.disabled) {
|
|
34
29
|
this.host.querySelector('button').classList.add('active');
|
|
@@ -45,11 +40,11 @@ const TdsButton = class {
|
|
|
45
40
|
if (!this.text && !hasLabelSlot) {
|
|
46
41
|
this.onlyIcon = true;
|
|
47
42
|
}
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
43
|
+
return (index.h(index.Host, { key: '7358240d76e1b7a6df238b2a1e5f1702f9cd33d7', class: {
|
|
49
44
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
50
45
|
disabled: Boolean(this.disabled),
|
|
51
46
|
fullbleed: Boolean(this.fullbleed),
|
|
52
|
-
}, disabled: this.disabled }, index.h("button", Object.assign({ key: '
|
|
47
|
+
}, disabled: this.disabled }, index.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: {
|
|
53
48
|
'primary': this.variant === 'primary',
|
|
54
49
|
'secondary': this.variant === 'secondary',
|
|
55
50
|
'ghost': this.variant === 'ghost',
|
|
@@ -63,7 +58,7 @@ const TdsButton = class {
|
|
|
63
58
|
'icon': hasIconSlot,
|
|
64
59
|
'only-icon': this.onlyIcon,
|
|
65
60
|
[`animation-${this.animation}`]: this.animation !== 'none',
|
|
66
|
-
} }, (this.onlyIcon && this.tdsAriaLabel && { 'aria-label': this.tdsAriaLabel })), this.text, hasLabelSlot && !this.onlyIcon && index.h("slot", { key: '
|
|
61
|
+
} }, (this.onlyIcon && this.tdsAriaLabel && { 'aria-label': this.tdsAriaLabel })), this.text, hasLabelSlot && !this.onlyIcon && index.h("slot", { key: '2dc9400b032af40765d7ba1add85c09249dea64b', name: "label" }), hasIconSlot && index.h("slot", { key: '01af3eeaa00abc5dc824f4fa4633b2460fb4fe46', name: "icon" }))));
|
|
67
62
|
}
|
|
68
63
|
get host() { return index.getElement(this); }
|
|
69
64
|
};
|
|
@@ -67,17 +67,12 @@ const TdsCheckbox = class {
|
|
|
67
67
|
this.indeterminate = false;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
connectedCallback() {
|
|
71
|
-
if (!this.tdsAriaLabel) {
|
|
72
|
-
console.warn('Tegel Checkbox component: tdsAriaLabel prop is missing');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
70
|
render() {
|
|
76
|
-
return (index.h("div", { key: '
|
|
71
|
+
return (index.h("div", { key: '87d4e8620e183b5fb8a885dca8081424c7497b21', class: "tds-checkbox" }, index.h("input", { key: 'fa5d4c8e9a33a7a88d1348f6eb66b474e94c0ad1',
|
|
77
72
|
// eslint-disable-next-line no-return-assign
|
|
78
73
|
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: () => {
|
|
79
74
|
this.handleChange();
|
|
80
|
-
} }), index.h("label", { key: '
|
|
75
|
+
} }), index.h("label", { key: '82545f01ad68fae4d613b58d82a770a0c1bce79e', htmlFor: this.checkboxId }, index.h("slot", { key: '99892e112b596a7f8517427cc42f75e90140c315', name: "label" }))));
|
|
81
76
|
}
|
|
82
77
|
get host() { return index.getElement(this); }
|
|
83
78
|
static get watchers() { return {
|
|
@@ -75,11 +75,6 @@ const TdsChip = class {
|
|
|
75
75
|
}
|
|
76
76
|
return Object.assign(Object.assign({}, commonAttributes), { onClick: () => this.handleClick() });
|
|
77
77
|
}
|
|
78
|
-
connectedCallback() {
|
|
79
|
-
if (!this.tdsAriaLabel) {
|
|
80
|
-
console.warn('Tegel Chip component: tdsAriaLabel prop is missing');
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
78
|
render() {
|
|
84
79
|
const inputAttributes = this.renderInputAttributes();
|
|
85
80
|
const hasPrefixSlot = hasSlot.hasSlot('prefix', this.host);
|
|
@@ -93,7 +88,7 @@ const TdsChip = class {
|
|
|
93
88
|
'suffix': hasSuffixSlot,
|
|
94
89
|
'disabled': this.disabled,
|
|
95
90
|
};
|
|
96
|
-
return (index.h(index.Host, { key: '
|
|
91
|
+
return (index.h(index.Host, { key: '4a498e81dbdd096e01d502a1bc378bfa9f7ea61d' }, index.h("div", { key: '441e76b25ec9fb91485f3394e6df08fa2ac0363f', class: "component" }, index.h("div", { key: '88658da3bae225792261b6b3b7796c514d76e665', class: chipClasses }, index.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)), index.h("label", { key: 'ffaff7dd33befe64eb69fc6f786efd38eb654628', onClick: (event) => event.stopPropagation(), htmlFor: this.chipId }, hasPrefixSlot && index.h("slot", { key: '95a6bf9c4d337a9d9caaf66b598615af657045c3', name: "prefix" }), hasLabelSlot && index.h("slot", { key: '2e732390348814bbeea2bb0c4c5fa0b9206a6578', name: "label" }), hasSuffixSlot && index.h("slot", { key: '716254ff0b5995b2d2a99dcd2aaa2f94613255d0', name: "suffix" }))))));
|
|
97
92
|
}
|
|
98
93
|
get host() { return index.getElement(this); }
|
|
99
94
|
};
|
|
@@ -116,11 +116,6 @@ const TdsDatetime = class {
|
|
|
116
116
|
}
|
|
117
117
|
this.value = value;
|
|
118
118
|
}
|
|
119
|
-
connectedCallback() {
|
|
120
|
-
if (!this.tdsAriaLabel && !this.label) {
|
|
121
|
-
console.warn('Tegel Datetime component: provide the label or tdsAriaLabel prop for improved accessibility');
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
119
|
render() {
|
|
125
120
|
let className = ' tds-datetime-input';
|
|
126
121
|
if (this.size === 'md') {
|
|
@@ -141,7 +136,7 @@ const TdsDatetime = class {
|
|
|
141
136
|
'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
|
|
142
137
|
};
|
|
143
138
|
const iphone = navigator.userAgent.toLowerCase().includes('iphone');
|
|
144
|
-
return (index.h("div", { key: '
|
|
139
|
+
return (index.h("div", { key: 'f397a4fc034fb7cd4dcb8ed7b0cbf2ab2e51177a', class: classNames, onKeyDown: (e) => {
|
|
145
140
|
if (e.key === 'Enter') {
|
|
146
141
|
const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
|
|
147
142
|
if (browserIsChrome) {
|
|
@@ -149,9 +144,9 @@ const TdsDatetime = class {
|
|
|
149
144
|
this.textInput.showPicker();
|
|
150
145
|
}
|
|
151
146
|
}
|
|
152
|
-
} }, this.labelPosition === 'outside' && this.label && (index.h("label", { key: '
|
|
147
|
+
} }, this.labelPosition === 'outside' && this.label && (index.h("label", { key: 'e5dd50563ed2d464983016bc608d81b77c379add', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), index.h("div", { key: 'b2c01f96bb7d8fa7279ac27048328204cc249547', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, index.h("div", { key: 'e7002fc416e62d2c93c337aee1869aa817997df9', class: `tds-datetime-input-container type-${this.type}` }, index.h("input", { key: '3fdf8d55b15f5a00d4fb0755d5774fee93f100b9', ref: (inputEl) => {
|
|
153
148
|
this.textInput = inputEl;
|
|
154
|
-
}, 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 && (index.h("label", { key: '
|
|
149
|
+
}, 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 && (index.h("label", { key: '48d096356ad9f547bacbf407af12c4411d5dd45f', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), index.h("div", { key: '0ea83c4003923ffed9b11ef22131000bb696a80f', class: "datetime-icon icon-datetime-local" }, index.h("tds-icon", { key: '6ab6fde60c3d8ce0ad212c0d248c597a23cc6ce7', size: "20px", name: "calendar", svgTitle: "Calendar" })), index.h("div", { key: '4c304db3c9e6159a7827b6a83c6f81d04cbf0d19', class: "datetime-icon icon-time" }, index.h("tds-icon", { key: '2a91a579dc5307d35ffbd47aa67616e2e692dd1c', size: "20px", name: "clock", svgTitle: "Clock" }))), index.h("div", { key: '80dec676d32fd856e7a7dcee7b7e6acbb8b66827', class: "tds-datetime-bar" })), this.helper && (index.h("div", { key: 'ff276d3c174c88c14081d7a5da689c278844422a', class: "tds-datetime-helper" }, index.h("div", { key: '9401ca569dd8c23e1bcbdccb39d9f8134fc027db', class: "tds-helper" }, this.state === 'error' && index.h("tds-icon", { key: 'dada47e75f30dac9b132477ffd73720d0e1a7530', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
|
|
155
150
|
}
|
|
156
151
|
};
|
|
157
152
|
TdsDatetime.style = TdsDatetimeStyle0;
|
|
@@ -520,11 +520,6 @@ const TdsDropdown = class {
|
|
|
520
520
|
form.removeEventListener('reset', this.resetInput);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
connectedCallback() {
|
|
524
|
-
if (!this.tdsAriaLabel) {
|
|
525
|
-
console.warn('Tegel Dropdown component: tdsAriaLabel prop is missing');
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
523
|
updateDropdownListInertState() {
|
|
529
524
|
if (this.dropdownList) {
|
|
530
525
|
if (this.open) {
|
|
@@ -540,9 +535,9 @@ const TdsDropdown = class {
|
|
|
540
535
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
541
536
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId.generateUniqueId()}` : undefined;
|
|
542
537
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId.generateUniqueId()}` : undefined;
|
|
543
|
-
return (index.h(index.Host, { key: '
|
|
538
|
+
return (index.h(index.Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
|
|
544
539
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
545
|
-
} }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '
|
|
540
|
+
} }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), index.h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
|
|
546
541
|
'dropdown-select': true,
|
|
547
542
|
[this.size]: true,
|
|
548
543
|
'disabled': this.disabled,
|
|
@@ -592,7 +587,7 @@ const TdsDropdown = class {
|
|
|
592
587
|
label-inside-as-placeholder
|
|
593
588
|
${this.size}
|
|
594
589
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
595
|
-
` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), index.h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), index.h("div", { key: '
|
|
590
|
+
` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), index.h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), index.h("div", { key: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
596
591
|
this.dropdownList = element;
|
|
597
592
|
}, class: {
|
|
598
593
|
'dropdown-list': true,
|
|
@@ -603,11 +598,11 @@ const TdsDropdown = class {
|
|
|
603
598
|
'closed': !this.open,
|
|
604
599
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
605
600
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
606
|
-
} }, index.h("slot", { key: '
|
|
601
|
+
} }, index.h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (index.h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (index.h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
|
|
607
602
|
helper: true,
|
|
608
603
|
error: this.error,
|
|
609
604
|
disabled: this.disabled,
|
|
610
|
-
} }, this.error && index.h("tds-icon", { key: '
|
|
605
|
+
} }, this.error && index.h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
|
|
611
606
|
}
|
|
612
607
|
get host() { return index.getElement(this); }
|
|
613
608
|
static get watchers() { return {
|
|
@@ -702,13 +697,8 @@ const TdsDropdownOption = class {
|
|
|
702
697
|
componentWillLoad() {
|
|
703
698
|
this.internalValue = convertToString(this.value);
|
|
704
699
|
}
|
|
705
|
-
connectedCallback() {
|
|
706
|
-
if (!this.tdsAriaLabel && !this.multiselect) {
|
|
707
|
-
console.warn('Tegel Dropdown option component: tdsAriaLabel prop is missing');
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
700
|
render() {
|
|
711
|
-
return (index.h(index.Host, { key: '
|
|
701
|
+
return (index.h(index.Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, index.h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
|
|
712
702
|
${this.size}
|
|
713
703
|
${this.selected ? 'selected' : ''}
|
|
714
704
|
${this.disabled ? 'disabled' : ''}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ca8040ad.js');
|
|
6
6
|
const generateUniqueId = require('./generateUniqueId-e3fc9863.js');
|
|
7
|
-
const hasSlot = require('./hasSlot-1c90e9ba.js');
|
|
8
7
|
|
|
9
8
|
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}";
|
|
10
9
|
const TdsHeaderDropdownStyle0 = headerDropdownCss;
|
|
@@ -51,20 +50,14 @@ const TdsHeaderDropdown = class {
|
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
connectedCallback() {
|
|
55
|
-
const hasLabelSlot = hasSlot.hasSlot('label', this.host);
|
|
56
|
-
if (!this.tdsAriaLabel && !hasLabelSlot) {
|
|
57
|
-
console.warn('Tegel Header Dropdown component: use label slot or specify tdsAriaLabel prop');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
53
|
render() {
|
|
61
|
-
return (index.h(index.Host, { key: '
|
|
54
|
+
return (index.h(index.Host, { key: 'd3f0a943b953783f2fc1c6345563a5adf0ded1dd' }, index.h("div", { key: 'c7028ceb31b9409d76d3663cd92a1fb3fa68fd7e', class: {
|
|
62
55
|
'state-open': this.open,
|
|
63
|
-
} }, index.h("tds-header-item", { key: '
|
|
56
|
+
} }, index.h("tds-header-item", { key: 'f1d5fe99ee0b62316dd0b48c9b5bb04439fb9b12', class: "button", active: this.open, selected: this.selected }, index.h("button", { key: '0e1437b558782c96e984287bfc0b9f301090bdb0', ref: (el) => {
|
|
64
57
|
this.buttonEl = el;
|
|
65
58
|
}, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
|
|
66
59
|
this.toggleDropdown();
|
|
67
|
-
}, "aria-label": this.tdsAriaLabel }, index.h("slot", { key: '
|
|
60
|
+
}, "aria-label": this.tdsAriaLabel }, index.h("slot", { key: 'fc63cfe2414eb2c60fe85e481a3af49af3ce9653', name: "icon" }), this.label, index.h("slot", { key: 'f302406472c7be0223fa17b76cc2674cb3e148b7', name: "label" }), !this.noDropdownIcon && (index.h("tds-icon", { key: '32c53b88ffeed4a78f9efc77b5976afe190c86c6', class: "dropdown-icon", name: "chevron_down", size: "16px", svgTitle: "Dropdown icon" })))), this.buttonEl && (index.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: [
|
|
68
61
|
{
|
|
69
62
|
name: 'flip',
|
|
70
63
|
options: {
|
|
@@ -14,14 +14,9 @@ const TdsHeaderHamburger = class {
|
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
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.inheritAriaAttributes(this.host));
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
19
|
+
return (index.h(index.Host, { key: 'e89db0f35bac2766a531be705b37c1d02e315431' }, index.h("tds-header-item", { key: '2aba0027ff9ce0516722d9785df5f61cd69aa02e' }, index.h("button", Object.assign({ key: 'f3b03d5b8a13285972edc9c645effc91c3ec92ad' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), index.h("tds-icon", { key: '6177dfc5ec0fed7902ecea6bab75b6031099c9c3', class: "icon", name: "burger", size: "20px" })))));
|
|
25
20
|
}
|
|
26
21
|
get host() { return index.getElement(this); }
|
|
27
22
|
};
|
|
@@ -48,11 +48,6 @@ const TdsHeaderLauncher = class {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
connectedCallback() {
|
|
52
|
-
if (!this.tdsAriaLabel) {
|
|
53
|
-
console.warn('Tegel Header Launcher component: missing tdsAriaLabel prop');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
51
|
render() {
|
|
57
52
|
this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes.inheritAriaAttributes(this.host, ['role']));
|
|
58
53
|
const buttonAttributes = Object.assign(Object.assign({}, this.ariaAttributes), { 'aria-expanded': `${this.open}`, 'aria-controls': `launcher-${this.uuid}`, 'class': 'button', 'active': this.open, 'onClick': () => {
|
|
@@ -60,11 +55,11 @@ const TdsHeaderLauncher = class {
|
|
|
60
55
|
}, 'ref': (el) => {
|
|
61
56
|
this.buttonEl = el;
|
|
62
57
|
} });
|
|
63
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: 'b62aac321e36b12d139d51c3421a1a9540079c22' }, index.h("div", { key: '4bb1d8e74ec245d9899870fccd990935488dcf7b', class: {
|
|
64
59
|
'wrapper': true,
|
|
65
60
|
'state-open': this.open,
|
|
66
61
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
67
|
-
} }, index.h("tds-header-launcher-button", Object.assign({ key: '
|
|
62
|
+
} }, index.h("tds-header-launcher-button", Object.assign({ key: 'c3b90d64efd2878ffc2b0332538c2877f2b48fec' }, buttonAttributes, { "tds-aria-label": this.tdsAriaLabel })), this.buttonEl && (index.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: [
|
|
68
63
|
{
|
|
69
64
|
name: 'flip',
|
|
70
65
|
options: {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-ca8040ad.js');
|
|
|
6
6
|
const hasSlot = require('./hasSlot-1c90e9ba.js');
|
|
7
7
|
const generateUniqueId = require('./generateUniqueId-e3fc9863.js');
|
|
8
8
|
|
|
9
|
-
const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-lg.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-md.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-sm.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-bar.sc-tds-text-field{position:absolute;width:100%}.text-field-bar.sc-tds-text-field::before,.text-field-bar.sc-tds-text-field::after{content:\"\";height:2px;top:54px;width:0;position:absolute;background:var(--tds-text-field-bar);transition:0.35s ease all}.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:46px}.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:40px}.text-field-bar.sc-tds-text-field::before{left:50%}.text-field-bar.sc-tds-text-field::after{right:50%}.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{width:50%}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{cursor:not-allowed;border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly.sc-tds-text-field .tds-tooltip.sc-tds-text-field{min-width:150px}.form-text-field-readonly.sc-tds-text-field{user-select:auto;caret-color:transparent;cursor:default}.form-text-field-readonly.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-readonly)}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{background-color:transparent}.form-text-field-readonly.sc-tds-text-field:has(.text-field-icon__readonly) .text-field-input.sc-tds-text-field{padding-right:54px}.form-text-field-success.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-bar.sc-tds-text-field::before,.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-bar.sc-tds-text-field::after{background:var(--tds-text-field-bar-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-textcounter.text-field-textcounter-divider-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider-disabled)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
|
|
9
|
+
const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-lg.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-md.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-sm.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);border-top:1px solid transparent;transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-container.sc-tds-text-field:focus-within{border:2px solid var(--tds-focus-outline-color);margin:0 -2px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{cursor:not-allowed;border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly.sc-tds-text-field .tds-tooltip.sc-tds-text-field{min-width:150px}.form-text-field-readonly.sc-tds-text-field{user-select:auto;caret-color:transparent;cursor:default}.form-text-field-readonly.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-readonly)}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{background-color:transparent}.form-text-field-readonly.sc-tds-text-field:has(.text-field-icon__readonly) .text-field-input.sc-tds-text-field{padding-right:54px}.form-text-field-success.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-textcounter.text-field-textcounter-divider-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider-disabled)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
|
|
10
10
|
const TdsTextFieldStyle0 = textFieldCss;
|
|
11
11
|
|
|
12
12
|
const TdsTextField = class {
|
|
@@ -76,16 +76,11 @@ const TdsTextField = class {
|
|
|
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.hasSlot('prefix', this.host);
|
|
87
82
|
const usesSuffixSlot = hasSlot.hasSlot('suffix', this.host);
|
|
88
|
-
return (index.h("div", { key: '
|
|
83
|
+
return (index.h("div", { key: 'ada8e30b1f05bc2c4752ca7ddcf8edbe3b1df136', 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 = class {
|
|
|
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' && (index.h("div", { key: '
|
|
101
|
+
} }, this.labelPosition === 'outside' && (index.h("div", { key: '9038e6d82e1b5010e81df9abface6b776ea04e4e', class: "text-field-label-outside" }, index.h("label", { key: '29d4bce96da92d2aecf88b7cd856e99add21b0a6', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), index.h("div", { key: '81f5071052a7e9f7a71c2d60a6dfb762a0f29681', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (index.h("div", { key: '2bc0d2889ba0fb42c543842d2432f63228ecacc8', 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
|
-
} }, index.h("slot", { key: '
|
|
106
|
+
} }, index.h("slot", { key: 'cbc322cc43bf3346bfcab9b310813d3dd2d73b7d', name: "prefix" }))), index.h("div", { key: '1ba419f4a6f95e84b8f682f223191d9011cb9c4e', class: "text-field-input-container" }, index.h("input", { key: 'ef83eabcb17d78a85bfd9ca00540eba78257fdf9', ref: (inputEl) => {
|
|
112
107
|
this.textInput = inputEl;
|
|
113
108
|
}, class: {
|
|
114
109
|
'text-field-input': true,
|
|
@@ -123,13 +118,13 @@ const TdsTextField = class {
|
|
|
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' && (index.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' && (index.h("label", { key: 'bc3a496bc79a8f2e8513d94ab6f9067981d6e8a3', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (index.h("div", { key: '9542af93fba75517d3eed06ee019792f3bd7bcd5', 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
|
-
} }, index.h("slot", { key: '
|
|
127
|
+
} }, index.h("slot", { key: '9efe2a289ab639c41fb3af433242a31ccb95d368', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (index.h("span", { key: '4d778d8f53d1618e982fbdda56c5f2bf497c06bf', class: "text-field-icon__readonly" }, index.h("tds-tooltip", { key: '163b9b22ab728ae0d8d39ac6452e425adcfa199e', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), index.h("tds-icon", { key: '78a29003ed1289c8ace7e8155424b9305f245731', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), index.h("div", { key: '9d31daacf361e8a74a68b7dc715b25ed3a98a4ec', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (index.h("div", { key: '3b75706cacf0a33fab58a40f6421964ef4fd0fa9', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (index.h("div", { key: 'b42fe66103602cfa60c827c4422e1404f9754593', class: "text-field-helper-error-state" }, !this.readOnly && index.h("tds-icon", { key: '02c70a8414dab6df3ceb33e49d987762d1252bd6', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (index.h("span", { key: 'f11a2cdedce075323778749b5c15909262e13465', 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 = class {
|
|
|
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 (index.h("div", { key: '
|
|
76
|
+
return (index.h("div", { key: '97f8921f584d489b3d20bfa13663e14fa274f6fc', 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 = class {
|
|
|
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' && (index.h("label", { key: '
|
|
86
|
+
} }, this.labelPosition !== 'no-label' && (index.h("label", { key: '36c593b01265179d1c24f4b093de657f0768b919', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), index.h("div", { key: '645e79d49d4f7ce0ad3666f4c3fd7cf77dc8f740', class: "textarea-wrapper" }, index.h("textarea", { key: 'e313a3a22a5f7dd9f93f6a929fa980a1ff26607c', 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 = class {
|
|
|
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}` }), index.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}` }), index.h("span", { key: 'f1883b43a9e912d3aa004819d195fc64bf3eec79', class: "textarea-resizer-icon" }, index.h("svg", { key: '8ea84dccc84a89ec8c2feed3483507d2ede3a538', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '9d8b5c64f41124d72d9765e159b54f73313c950f', "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 && (index.h("span", { key: '14d472bc161e9291aa7085f51a9f06ece85df439', class: "textarea-icon__readonly" }, index.h("tds-tooltip", { key: '64f66dd796f92b17278786870943f96251517584', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), index.h("tds-icon", { key: '7e1ddf8da7906d18de88aa9ed122745f274dbfcd', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), index.h("span", { key: 'edbc0e01e0a1d6f11ef5c31c6109553c4540a80c', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (index.h("tds-icon", { key: 'be919e136de6b2e0f961a907a039e1c0312f5531', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (index.h("div", { key: '2ce5bfcf7795ce7e20e5aac4bf734ec8275777d8', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, index.h("span", { key: 'a4d545a1d3bdd32911acf50e34f046e1647d6230', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
102
97
|
}
|
|
103
98
|
};
|
|
104
99
|
TdsTextarea.style = TdsTextareaStyle0;
|
|
@@ -70,12 +70,12 @@ const TdsToast = class {
|
|
|
70
70
|
const usesHeaderSlot = hasSlot.hasSlot('header', this.host);
|
|
71
71
|
const usesSubheaderSlot = hasSlot.hasSlot('subheader', this.host);
|
|
72
72
|
const usesActionsSlot = hasSlot.hasSlot('actions', this.host);
|
|
73
|
-
return (index.h(index.Host, { key: '
|
|
73
|
+
return (index.h(index.Host, { key: '5179f5f1c0df37cb20125aa22205bfad790fe857', "aria-live": this.tdsAriaLive, toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
74
74
|
hide: this.hidden,
|
|
75
75
|
show: !this.hidden,
|
|
76
|
-
} }, index.h("div", { key: '
|
|
76
|
+
} }, index.h("div", { key: '3a3e3882b2e0654f76a58aec370f43da8c7c21dd', class: `
|
|
77
77
|
wrapper
|
|
78
|
-
${this.variant}` }, index.h("tds-icon", { key: '
|
|
78
|
+
${this.variant}` }, index.h("tds-icon", { key: '5dfc4ff20554c99e8710eae46c6dc9a9a3169d82', name: this.getIconName(), size: "20px", svgTitle: this.getIconName() }), index.h("div", { key: '0ec7a8fa7ddcdff67583704decee8c05b3190510', class: `content` }, index.h("div", { key: '726cc71493dbfc93ac1c91834de9db95224e804e', class: "header-subheader" }, this.header && index.h("div", { key: '94e51caca733571d71192ed2fe647321e96358cf', class: "header" }, this.header), usesHeaderSlot && index.h("slot", { key: 'b1d5f8b568ca5ecf6bbbfc0c1536642d3c37938f', name: "header" }), this.subheader && index.h("div", { key: '3841fc4844b7044e9684c52f3f9d8f1bdfb2c61e', class: "subheader" }, this.subheader), usesSubheaderSlot && index.h("slot", { key: 'c55ede771ff6844b485e4dfe624a826d7b89715c', name: "subheader" })), usesActionsSlot && (index.h("div", { key: 'de5e83dd5b10ac06da5769502fb8ad070897b09e', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, index.h("slot", { key: '0404621dc0039ba3bf57077bd385a818742fe31d', name: "actions" })))), this.closable && (index.h("button", { key: 'ecb92b70a07a5da800d6489278d1b2554bcec4b9', id: "my-button", "aria-label": this.tdsCloseAriaLabel, onClick: this.handleClose, class: "close" }, index.h("tds-icon", { key: '58c94b2dadbd897d718396c77199c8ebe7368d4c', name: "cross", size: "20px", svgTitle: "cross" }))))));
|
|
79
79
|
}
|
|
80
80
|
get host() { return index.getElement(this); }
|
|
81
81
|
};
|
|
@@ -45,16 +45,13 @@ const TdsToggle = class {
|
|
|
45
45
|
componentWillLoad() {
|
|
46
46
|
this.labelSlot = this.host.querySelector("[slot='label']");
|
|
47
47
|
}
|
|
48
|
-
connectedCallback() {
|
|
49
|
-
if (!this.tdsAriaLabel) {
|
|
50
|
-
console.warn('Tegel Toggle component: tdsAriaLabel prop is missing');
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
48
|
render() {
|
|
54
|
-
return (index.h("div", { key: '
|
|
49
|
+
return (index.h("div", { key: '829f5720f610e60fe9c3d335f419e9290f6efaa6', class: "tds-toggle" }, this.headline && (index.h("div", { key: '4e2ae1cdd691c5692ef2612cb6683000bb8898ce', class: {
|
|
55
50
|
'toggle-headline': true,
|
|
56
51
|
'disabled': this.disabled,
|
|
57
|
-
} }, this.headline)), index.h("input", { key: '
|
|
52
|
+
} }, this.headline)), index.h("input", { key: '32816cb95820b151058f4c020b8d0f0e46708fd2', ref: (inputEl) => {
|
|
53
|
+
this.inputElement = inputEl;
|
|
54
|
+
}, "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 && (index.h("label", { key: 'd61d1c1c16aa7918f34dac371a6d03bd767c4b8a', class: { disabled: this.disabled }, htmlFor: this.toggleId }, index.h("slot", { key: '121e4f6f4b2a1f0f6e215026f6b3a79487ee7fdb', name: "label" })))));
|
|
58
55
|
}
|
|
59
56
|
get host() { return index.getElement(this); }
|
|
60
57
|
};
|
|
@@ -64,7 +64,7 @@ const TdsTooltip = class {
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
var _a;
|
|
67
|
-
return (index.h(index.Host, { key: '
|
|
67
|
+
return (index.h(index.Host, { key: 'fe51d1a3f6d2c7a5cba9a5c055bb4b73a00c306f', role: "tooltip", "aria-describedby": this.tdsAriaDescribedby, "aria-label": this.text }, index.h("tds-popover-core", Object.assign({ key: 'b1e56f9794dd1f24a1714819821a6b112780f4c6' }, this.inheritedAttributes, { class: {
|
|
68
68
|
'tds-tooltip': true,
|
|
69
69
|
[`tds-tooltip-${this.border}`]: true,
|
|
70
70
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
@@ -77,7 +77,7 @@ const TdsTooltip = class {
|
|
|
77
77
|
// @ts-ignore
|
|
78
78
|
onInternalTdsClose: () => {
|
|
79
79
|
this.show = false;
|
|
80
|
-
}, defaultShow: this.defaultShow }), this.text, index.h("slot", { key: '
|
|
80
|
+
}, defaultShow: this.defaultShow }), this.text, index.h("slot", { key: '33b70ea659c570413c4755efadb49c4db2705144' }))));
|
|
81
81
|
}
|
|
82
82
|
get host() { return index.getElement(this); }
|
|
83
83
|
};
|
|
@@ -6,15 +6,10 @@ export class TdsBreadcrumbs {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.tdsAriaLabel = undefined;
|
|
8
8
|
}
|
|
9
|
-
connectedCallback() {
|
|
10
|
-
if (!this.tdsAriaLabel) {
|
|
11
|
-
console.warn('Tegel Breadcrumbs component: missing tdsAriaLabel prop');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
9
|
render() {
|
|
15
10
|
var _a;
|
|
16
11
|
(_a = this.host.children[this.host.children.length - 1]) === null || _a === void 0 ? void 0 : _a.classList.add('last');
|
|
17
|
-
return (h("nav", { key: '
|
|
12
|
+
return (h("nav", { key: 'd79f99fbdf47a75d66376c7900a1ba2ccfad0ef2', "aria-label": this.tdsAriaLabel }, h("div", { key: 'c06fa49904e230b1fcbaa8eeba1e2d6059f4eccd', role: "list", class: "tds-breadcrumb" }, h("slot", { key: 'fd44b69cd45ffaed95c865988832fa56c545125c' }))));
|
|
18
13
|
}
|
|
19
14
|
static get is() { return "tds-breadcrumbs"; }
|
|
20
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,11 +19,6 @@ export class TdsButton {
|
|
|
19
19
|
this.value = undefined;
|
|
20
20
|
this.onlyIcon = false;
|
|
21
21
|
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
if (this.onlyIcon && !this.tdsAriaLabel) {
|
|
24
|
-
console.warn('Tegel button component: please specify the tdsAriaLabel prop when you have the onlyIcon attribute set to true');
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
22
|
handleKeyDown(event) {
|
|
28
23
|
if (event.key === 'Enter' && !this.disabled) {
|
|
29
24
|
this.host.querySelector('button').classList.add('active');
|
|
@@ -40,11 +35,11 @@ export class TdsButton {
|
|
|
40
35
|
if (!this.text && !hasLabelSlot) {
|
|
41
36
|
this.onlyIcon = true;
|
|
42
37
|
}
|
|
43
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '7358240d76e1b7a6df238b2a1e5f1702f9cd33d7', class: {
|
|
44
39
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
45
40
|
disabled: Boolean(this.disabled),
|
|
46
41
|
fullbleed: Boolean(this.fullbleed),
|
|
47
|
-
}, disabled: this.disabled }, h("button", Object.assign({ key: '
|
|
42
|
+
}, 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: {
|
|
48
43
|
'primary': this.variant === 'primary',
|
|
49
44
|
'secondary': this.variant === 'secondary',
|
|
50
45
|
'ghost': this.variant === 'ghost',
|
|
@@ -58,7 +53,7 @@ export class TdsButton {
|
|
|
58
53
|
'icon': hasIconSlot,
|
|
59
54
|
'only-icon': this.onlyIcon,
|
|
60
55
|
[`animation-${this.animation}`]: this.animation !== 'none',
|
|
61
|
-
} }, (this.onlyIcon && this.tdsAriaLabel && { 'aria-label': this.tdsAriaLabel })), this.text, hasLabelSlot && !this.onlyIcon && h("slot", { key: '
|
|
56
|
+
} }, (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" }))));
|
|
62
57
|
}
|
|
63
58
|
static get is() { return "tds-button"; }
|
|
64
59
|
static get encapsulation() { return "scoped"; }
|