@scania/tegel 1.32.0-debugging-link-potential-breaking-change-beta.0 → 1.32.0-navigation.missing.stories.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +2 -8
- package/dist/cjs/tds-datetime.cjs.entry.js +3 -10
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +9 -30
- package/dist/cjs/tds-link.cjs.entry.js +2 -3
- package/dist/cjs/tds-radio-button.cjs.entry.js +1 -7
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -10
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -8
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +2 -25
- package/dist/collection/components/datetime/datetime.js +3 -27
- package/dist/collection/components/dropdown/dropdown.js +9 -30
- package/dist/collection/components/link/link.js +2 -3
- package/dist/collection/components/radio-button/radio-button.js +1 -28
- package/dist/collection/components/textarea/textarea.js +3 -31
- package/dist/collection/components/toggle/toggle.js +2 -25
- package/dist/components/{p-728ada7e.js → p-1ef7423a.js} +3 -10
- package/dist/components/{p-7ad1bc2c.js → p-7ee8b262.js} +1 -1
- package/dist/components/{p-0f58e26f.js → p-adbf32b9.js} +9 -30
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-datetime.js +4 -12
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-link.js +2 -3
- package/dist/components/tds-radio-button.js +2 -9
- 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-textarea.js +4 -12
- package/dist/components/tds-toggle.js +3 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +2 -8
- package/dist/esm/tds-datetime.entry.js +3 -10
- package/dist/esm/tds-dropdown_2.entry.js +9 -30
- package/dist/esm/tds-link.entry.js +2 -3
- package/dist/esm/tds-radio-button.entry.js +1 -7
- package/dist/esm/tds-textarea.entry.js +3 -10
- package/dist/esm/tds-toggle.entry.js +2 -8
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-212e1fff.entry.js +1 -0
- package/dist/tegel/p-503cea9d.entry.js +1 -0
- package/dist/tegel/p-5bb01a99.entry.js +1 -0
- package/dist/tegel/p-ae0fed95.entry.js +1 -0
- package/dist/tegel/p-b994e7ac.entry.js +1 -0
- package/dist/tegel/p-cbe217bf.entry.js +1 -0
- package/dist/tegel/p-d6d8cb7f.entry.js +1 -0
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -2
- package/dist/types/components/datetime/datetime.d.ts +0 -2
- package/dist/types/components/radio-button/radio-button.d.ts +0 -3
- package/dist/types/components/textarea/textarea.d.ts +0 -2
- package/dist/types/components/toggle/toggle.d.ts +0 -3
- package/dist/types/components.d.ts +0 -20
- package/package.json +1 -1
- package/dist/collection/utils/accessibility.js +0 -30
- package/dist/tegel/p-31c657c0.entry.js +0 -1
- package/dist/tegel/p-b58194f9.entry.js +0 -1
- package/dist/tegel/p-d9040b7f.entry.js +0 -1
- package/dist/tegel/p-e83b5572.entry.js +0 -1
- package/dist/tegel/p-eb532e35.entry.js +0 -1
- package/dist/tegel/p-f71c3fca.entry.js +0 -1
- package/dist/tegel/p-f72577c8.entry.js +0 -1
- package/dist/types/utils/accessibility.d.ts +0 -14
|
@@ -34,12 +34,6 @@ export class TdsCheckbox {
|
|
|
34
34
|
checked: this.checked,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
/** Method to programmatically focus the checkbox element */
|
|
38
|
-
async focusElement() {
|
|
39
|
-
if (this.inputElement) {
|
|
40
|
-
this.inputElement.focus();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
37
|
handleIndeterminateState() {
|
|
44
38
|
this.inputElement.indeterminate = this.indeterminate;
|
|
45
39
|
}
|
|
@@ -64,11 +58,11 @@ export class TdsCheckbox {
|
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
60
|
render() {
|
|
67
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: '8f5104073f1be9323bc0125feab7515759ac7679', class: "tds-checkbox" }, h("input", { key: '8536a1eaefb5b7bdf258a4ddca67660becc797a5',
|
|
68
62
|
// eslint-disable-next-line no-return-assign
|
|
69
63
|
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: () => {
|
|
70
64
|
this.handleChange();
|
|
71
|
-
} }), h("label", { key: '
|
|
65
|
+
} }), h("label", { key: 'e6e065ce109371607c5412ab38ece22d3ac1d626', htmlFor: this.checkboxId }, h("slot", { key: '4698f97ac58203e3f478321da53cc364157ded78', name: "label" }))));
|
|
72
66
|
}
|
|
73
67
|
static get is() { return "tds-checkbox"; }
|
|
74
68
|
static get encapsulation() { return "scoped"; }
|
|
@@ -320,23 +314,6 @@ export class TdsCheckbox {
|
|
|
320
314
|
"text": "Toggles the checked value of the component.",
|
|
321
315
|
"tags": []
|
|
322
316
|
}
|
|
323
|
-
},
|
|
324
|
-
"focusElement": {
|
|
325
|
-
"complexType": {
|
|
326
|
-
"signature": "() => Promise<void>",
|
|
327
|
-
"parameters": [],
|
|
328
|
-
"references": {
|
|
329
|
-
"Promise": {
|
|
330
|
-
"location": "global",
|
|
331
|
-
"id": "global::Promise"
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
"return": "Promise<void>"
|
|
335
|
-
},
|
|
336
|
-
"docs": {
|
|
337
|
-
"text": "Method to programmatically focus the checkbox element",
|
|
338
|
-
"tags": []
|
|
339
|
-
}
|
|
340
317
|
}
|
|
341
318
|
};
|
|
342
319
|
}
|
|
@@ -56,13 +56,6 @@ export class TdsDatetime {
|
|
|
56
56
|
async setValue(newValue) {
|
|
57
57
|
this.value = newValue;
|
|
58
58
|
}
|
|
59
|
-
/** Method to programmatically focus the datetime element */
|
|
60
|
-
async focusElement() {
|
|
61
|
-
if (this.textInput) {
|
|
62
|
-
this.textInput.focus();
|
|
63
|
-
this.focusInput = true;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
59
|
componentWillLoad() {
|
|
67
60
|
if (this.defaultValue !== 'none') {
|
|
68
61
|
this.value = this.getDefaultValue();
|
|
@@ -128,7 +121,7 @@ export class TdsDatetime {
|
|
|
128
121
|
'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
|
|
129
122
|
};
|
|
130
123
|
const iphone = navigator.userAgent.toLowerCase().includes('iphone');
|
|
131
|
-
return (h("div", { key: '
|
|
124
|
+
return (h("div", { key: '1a55db8de53a69917a0f498ce4e9877136b21766', class: classNames, onKeyDown: (e) => {
|
|
132
125
|
if (e.key === 'Enter') {
|
|
133
126
|
const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
|
|
134
127
|
if (browserIsChrome) {
|
|
@@ -136,9 +129,9 @@ export class TdsDatetime {
|
|
|
136
129
|
this.textInput.showPicker();
|
|
137
130
|
}
|
|
138
131
|
}
|
|
139
|
-
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '
|
|
132
|
+
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '83a178f48b465978da70749d5a0a6b06c7a46423', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'd3b8cbc704aee3863a428f6bbc9b89a8894241df', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: 'b398e66d353aeb568024686b591dcf5d9d2288e6', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: '1d31da2daaa048b46fe9a3023f4342e0daa4cfde', ref: (inputEl) => {
|
|
140
133
|
this.textInput = inputEl;
|
|
141
|
-
}, 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: '
|
|
134
|
+
}, 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: 'f16d4c77abdc6b1cabb03b8e4beba58704796648', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: '168c3c719094c8b39dcc4fa16b4d13b588b9429b', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '6e0794302a5e1792b198c7d1208aa8e59bfb3d5c', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '1a954f5386c136d2cdb88408c9729a68adcd5e58', class: "datetime-icon icon-time" }, h("tds-icon", { key: '67b56f956fc439a71870fdd3ede387d007a69f08', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: 'c1373d3f3413cdba67911cfc1884f201a326df97', class: "tds-datetime-bar" })), this.helper && (h("div", { key: 'c3d22a5de88ba11154b227ad0d8930cc0768bc99', class: "tds-datetime-helper" }, h("div", { key: '0c5123613944fc44184ab7d489712982b70c183e', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: 'a351a589cacb618dbf890e247e98efe14970062b', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
|
|
142
135
|
}
|
|
143
136
|
static get is() { return "tds-datetime"; }
|
|
144
137
|
static get encapsulation() { return "scoped"; }
|
|
@@ -562,23 +555,6 @@ export class TdsDatetime {
|
|
|
562
555
|
"text": "Method that sets the value of the datetime element",
|
|
563
556
|
"tags": []
|
|
564
557
|
}
|
|
565
|
-
},
|
|
566
|
-
"focusElement": {
|
|
567
|
-
"complexType": {
|
|
568
|
-
"signature": "() => Promise<void>",
|
|
569
|
-
"parameters": [],
|
|
570
|
-
"references": {
|
|
571
|
-
"Promise": {
|
|
572
|
-
"location": "global",
|
|
573
|
-
"id": "global::Promise"
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
"return": "Promise<void>"
|
|
577
|
-
},
|
|
578
|
-
"docs": {
|
|
579
|
-
"text": "Method to programmatically focus the datetime element",
|
|
580
|
-
"tags": []
|
|
581
|
-
}
|
|
582
558
|
}
|
|
583
559
|
};
|
|
584
560
|
}
|
|
@@ -72,15 +72,7 @@ export class TdsDropdown {
|
|
|
72
72
|
if (!this.disabled) {
|
|
73
73
|
this.open = !this.open;
|
|
74
74
|
if (this.open) {
|
|
75
|
-
|
|
76
|
-
this.focusInputElement();
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
const button = this.host.shadowRoot.querySelector('button');
|
|
80
|
-
if (button) {
|
|
81
|
-
button.focus();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
75
|
+
this.focusInputElement();
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
78
|
};
|
|
@@ -126,13 +118,11 @@ export class TdsDropdown {
|
|
|
126
118
|
this.handleFocus = (event) => {
|
|
127
119
|
this.open = true;
|
|
128
120
|
this.filterFocus = true;
|
|
129
|
-
if (this.multiselect
|
|
121
|
+
if (this.multiselect) {
|
|
130
122
|
this.inputElement.value = '';
|
|
131
123
|
}
|
|
132
124
|
this.tdsFocus.emit(event);
|
|
133
|
-
|
|
134
|
-
this.handleFilter({ target: { value: '' } });
|
|
135
|
-
}
|
|
125
|
+
this.handleFilter({ target: { value: '' } });
|
|
136
126
|
};
|
|
137
127
|
this.handleBlur = (event) => {
|
|
138
128
|
this.tdsBlur.emit(event);
|
|
@@ -287,18 +277,7 @@ export class TdsDropdown {
|
|
|
287
277
|
}
|
|
288
278
|
/** Method that forces focus on the input element. */
|
|
289
279
|
async focusElement() {
|
|
290
|
-
|
|
291
|
-
// For filter mode, focus the input element
|
|
292
|
-
this.focusInputElement();
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
// For non-filter mode, focus the button element
|
|
296
|
-
const button = this.host.shadowRoot.querySelector('button');
|
|
297
|
-
if (button) {
|
|
298
|
-
button.focus();
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
// Always trigger the focus event to open the dropdown
|
|
280
|
+
this.focusInputElement();
|
|
302
281
|
this.handleFocus({});
|
|
303
282
|
}
|
|
304
283
|
/** Method for setting the value of the Dropdown.
|
|
@@ -451,9 +430,9 @@ export class TdsDropdown {
|
|
|
451
430
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
452
431
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
|
|
453
432
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
|
|
454
|
-
return (h(Host, { key: '
|
|
433
|
+
return (h(Host, { key: '5c5314d4994b1ca9c09729df6c9b30d9fb6b33d3', class: {
|
|
455
434
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
456
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
435
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '25133dd0a665315edfad6f93a846db0ac82cc16f', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '3d2a17d8f7bcf7f8aaa8d2ea5397044396b691e1', class: {
|
|
457
436
|
'dropdown-select': true,
|
|
458
437
|
[this.size]: true,
|
|
459
438
|
'disabled': this.disabled,
|
|
@@ -503,7 +482,7 @@ export class TdsDropdown {
|
|
|
503
482
|
label-inside-as-placeholder
|
|
504
483
|
${this.size}
|
|
505
484
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
506
|
-
` }, 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: '
|
|
485
|
+
` }, 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: '4e4a3036983d9f2c53119884f32482a14b16bbff', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-hidden": this.open ? 'false' : 'true', inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
507
486
|
this.dropdownList = element;
|
|
508
487
|
}, class: {
|
|
509
488
|
'dropdown-list': true,
|
|
@@ -514,11 +493,11 @@ export class TdsDropdown {
|
|
|
514
493
|
'closed': !this.open,
|
|
515
494
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
516
495
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
517
|
-
} }, h("slot", { key: '
|
|
496
|
+
} }, h("slot", { key: 'ad34d1c72b7490505aee226e3e1478e68084309d', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '619071043ec5be2a17b24c9706aa20490f4c4339', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '4165cfc63988816e39a86a304acacd627aa24567', id: helperId, class: {
|
|
518
497
|
helper: true,
|
|
519
498
|
error: this.error,
|
|
520
499
|
disabled: this.disabled,
|
|
521
|
-
} }, this.error && h("tds-icon", { key: '
|
|
500
|
+
} }, this.error && h("tds-icon", { key: '90eea26d0166a4acaa066211fa996e2b74ccd575', name: "error", size: "16px" }), this.helper))));
|
|
522
501
|
}
|
|
523
502
|
static get is() { return "tds-dropdown"; }
|
|
524
503
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,7 +9,6 @@ export class TdsLink {
|
|
|
9
9
|
this.standalone = false;
|
|
10
10
|
}
|
|
11
11
|
connectedCallback() {
|
|
12
|
-
this.host.children[0].classList.add('tds-link-component');
|
|
13
12
|
const links = this.host.querySelectorAll('a');
|
|
14
13
|
if (links.length > 1) {
|
|
15
14
|
console.warn('tds-link is only intended to wrap one <a> tag');
|
|
@@ -27,11 +26,11 @@ export class TdsLink {
|
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
render() {
|
|
30
|
-
return (h("span", { key: '
|
|
29
|
+
return (h("span", { key: '7f0f25738cc23b6f1cb77be9dd80ea14b9b399bc', class: {
|
|
31
30
|
'disabled': this.disabled,
|
|
32
31
|
'no-underline': !this.underline,
|
|
33
32
|
'standalone': this.standalone,
|
|
34
|
-
} }, h("slot", { key: '
|
|
33
|
+
} }, h("slot", { key: '73203886b4064a43a2b3ede33ce650f280ebe9c5' })));
|
|
35
34
|
}
|
|
36
35
|
static get is() { return "tds-link"; }
|
|
37
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,14 +20,8 @@ export class TdsRadioButton {
|
|
|
20
20
|
this.tdsAriaLabel = undefined;
|
|
21
21
|
this.tdsTabIndex = undefined;
|
|
22
22
|
}
|
|
23
|
-
/** Method to programmatically focus the radio button element */
|
|
24
|
-
async focusElement() {
|
|
25
|
-
if (this.inputElement) {
|
|
26
|
-
this.inputElement.focus();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
23
|
render() {
|
|
30
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: 'ca977bcef62ce81be1c0387bc1db7a5bb669f164', class: "tds-radio-button" }, h("input", { key: '939027d597b396cfdab2b47a11465b6e46040036', "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: 'f40293c0fcce1dac843087b71b5e34bdd8e911fa', htmlFor: this.radioId }, h("slot", { key: '4190d41d4e90cd4125c4f997f46cefa44682dae7', name: "label" }))));
|
|
31
25
|
}
|
|
32
26
|
static get is() { return "tds-radio-button"; }
|
|
33
27
|
static get encapsulation() { return "scoped"; }
|
|
@@ -203,26 +197,5 @@ export class TdsRadioButton {
|
|
|
203
197
|
}
|
|
204
198
|
}];
|
|
205
199
|
}
|
|
206
|
-
static get methods() {
|
|
207
|
-
return {
|
|
208
|
-
"focusElement": {
|
|
209
|
-
"complexType": {
|
|
210
|
-
"signature": "() => Promise<void>",
|
|
211
|
-
"parameters": [],
|
|
212
|
-
"references": {
|
|
213
|
-
"Promise": {
|
|
214
|
-
"location": "global",
|
|
215
|
-
"id": "global::Promise"
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
"return": "Promise<void>"
|
|
219
|
-
},
|
|
220
|
-
"docs": {
|
|
221
|
-
"text": "Method to programmatically focus the radio button element",
|
|
222
|
-
"tags": []
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
200
|
static get elementRef() { return "host"; }
|
|
228
201
|
}
|
|
@@ -42,13 +42,6 @@ export class TdsTextarea {
|
|
|
42
42
|
this.focusInput = true;
|
|
43
43
|
this.tdsFocus.emit(event);
|
|
44
44
|
}
|
|
45
|
-
/** Method to programmatically focus the textarea element */
|
|
46
|
-
async focusElement() {
|
|
47
|
-
if (this.textEl) {
|
|
48
|
-
this.textEl.focus();
|
|
49
|
-
this.focusInput = true;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
45
|
setModeVariant(modeVariant) {
|
|
53
46
|
if (this.readOnly && modeVariant === 'primary') {
|
|
54
47
|
return 'secondary';
|
|
@@ -65,7 +58,7 @@ export class TdsTextarea {
|
|
|
65
58
|
}
|
|
66
59
|
render() {
|
|
67
60
|
var _a;
|
|
68
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: '1d9b2b46f64dfd4b65af35b266544c0164373c06', class: {
|
|
69
62
|
'textarea-container': true,
|
|
70
63
|
'textarea-label-inside': this.labelPosition === 'inside',
|
|
71
64
|
'textarea-focus': this.focusInput,
|
|
@@ -75,7 +68,7 @@ export class TdsTextarea {
|
|
|
75
68
|
'textarea-data': this.value !== '',
|
|
76
69
|
[`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
|
|
77
70
|
'no-min-width': this.noMinWidth,
|
|
78
|
-
} }, this.labelPosition !== 'no-label' && (h("label", { key: '
|
|
71
|
+
} }, this.labelPosition !== 'no-label' && (h("label", { key: '971f3f72566f19851a28617e5c8a7889eb0acea8', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: 'c3d6ed6c8f842d7561aa254c54eee44f48ce4d63', class: "textarea-wrapper" }, h("textarea", { key: 'a9381e6a8546c7f318b171549352964e31fd305b', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
|
|
79
72
|
this.textEl = inputEl;
|
|
80
73
|
}, 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) => {
|
|
81
74
|
if (!this.readOnly) {
|
|
@@ -85,7 +78,7 @@ export class TdsTextarea {
|
|
|
85
78
|
if (!this.readOnly) {
|
|
86
79
|
this.handleBlur(event);
|
|
87
80
|
}
|
|
88
|
-
}, 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: '
|
|
81
|
+
}, 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: '7252559ca80fb56ca1098d7c90c1519c3a77b402', class: "textarea-resizer-icon" }, h("svg", { key: '4402cced255cb35600747461cf2c4f2d42f7cca9', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '4387fb4738c677135fccd467856595908ba31632', "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: 'dd0ec749e9e82f43c95d452fb79357b826ab5451', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '9606d2c2aa9f4916893dc0c25f0d076df308853a', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '28812e6359ab9747156d2c75094bd26bdee32edf', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'e17f24de9e69ff4a0a91dc2acaa1933edff86228', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: '7b2968586c351df3a6ced7da57ac53b256f4ac45', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: 'ab34044bd4e96d1e98df40e7b6517bc2fcaa6140', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'b515878f1e8427b79c242bfe3a13df505d6c7304', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
89
82
|
}
|
|
90
83
|
static get is() { return "tds-textarea"; }
|
|
91
84
|
static get encapsulation() { return "scoped"; }
|
|
@@ -487,25 +480,4 @@ export class TdsTextarea {
|
|
|
487
480
|
}
|
|
488
481
|
}];
|
|
489
482
|
}
|
|
490
|
-
static get methods() {
|
|
491
|
-
return {
|
|
492
|
-
"focusElement": {
|
|
493
|
-
"complexType": {
|
|
494
|
-
"signature": "() => Promise<void>",
|
|
495
|
-
"parameters": [],
|
|
496
|
-
"references": {
|
|
497
|
-
"Promise": {
|
|
498
|
-
"location": "global",
|
|
499
|
-
"id": "global::Promise"
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
"return": "Promise<void>"
|
|
503
|
-
},
|
|
504
|
-
"docs": {
|
|
505
|
-
"text": "Method to programmatically focus the textarea element",
|
|
506
|
-
"tags": []
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
483
|
}
|
|
@@ -29,12 +29,6 @@ export class TdsToggle {
|
|
|
29
29
|
checked: this.checked,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
/** Method to programmatically focus the toggle element */
|
|
33
|
-
async focusElement() {
|
|
34
|
-
if (this.inputElement) {
|
|
35
|
-
this.inputElement.focus();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
32
|
componentWillLoad() {
|
|
39
33
|
this.labelSlot = this.host.querySelector("[slot='label']");
|
|
40
34
|
}
|
|
@@ -44,10 +38,10 @@ export class TdsToggle {
|
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
40
|
render() {
|
|
47
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: '01d3faf866451cf2e09694d614b1cca9defa1f69', class: "tds-toggle" }, this.headline && (h("div", { key: '2809bf2c3653c20ca6b93280b3391255b2285d8c', class: {
|
|
48
42
|
'toggle-headline': true,
|
|
49
43
|
'disabled': this.disabled,
|
|
50
|
-
} }, this.headline)), h("input", { key: '
|
|
44
|
+
} }, this.headline)), h("input", { key: '52ab62b4d4c506ca74533ffafc68247accae612b', "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: '73f43d7134ff9a9ecded6b8b153b1590014e2a80', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'efe7c2a3f76f9990a00b1156d66b78c0e26e6411', name: "label" })))));
|
|
51
45
|
}
|
|
52
46
|
static get is() { return "tds-toggle"; }
|
|
53
47
|
static get encapsulation() { return "scoped"; }
|
|
@@ -242,23 +236,6 @@ export class TdsToggle {
|
|
|
242
236
|
"text": "Toggles the Toggle.",
|
|
243
237
|
"tags": []
|
|
244
238
|
}
|
|
245
|
-
},
|
|
246
|
-
"focusElement": {
|
|
247
|
-
"complexType": {
|
|
248
|
-
"signature": "() => Promise<void>",
|
|
249
|
-
"parameters": [],
|
|
250
|
-
"references": {
|
|
251
|
-
"Promise": {
|
|
252
|
-
"location": "global",
|
|
253
|
-
"id": "global::Promise"
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
"return": "Promise<void>"
|
|
257
|
-
},
|
|
258
|
-
"docs": {
|
|
259
|
-
"text": "Method to programmatically focus the toggle element",
|
|
260
|
-
"tags": []
|
|
261
|
-
}
|
|
262
239
|
}
|
|
263
240
|
};
|
|
264
241
|
}
|
|
@@ -40,12 +40,6 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
|
|
|
40
40
|
checked: this.checked,
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
/** Method to programmatically focus the checkbox element */
|
|
44
|
-
async focusElement() {
|
|
45
|
-
if (this.inputElement) {
|
|
46
|
-
this.inputElement.focus();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
43
|
handleIndeterminateState() {
|
|
50
44
|
this.inputElement.indeterminate = this.indeterminate;
|
|
51
45
|
}
|
|
@@ -70,11 +64,11 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
|
|
|
70
64
|
}
|
|
71
65
|
}
|
|
72
66
|
render() {
|
|
73
|
-
return (h("div", { key: '
|
|
67
|
+
return (h("div", { key: '8f5104073f1be9323bc0125feab7515759ac7679', class: "tds-checkbox" }, h("input", { key: '8536a1eaefb5b7bdf258a4ddca67660becc797a5',
|
|
74
68
|
// eslint-disable-next-line no-return-assign
|
|
75
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: () => {
|
|
76
70
|
this.handleChange();
|
|
77
|
-
} }), h("label", { key: '
|
|
71
|
+
} }), h("label", { key: 'e6e065ce109371607c5412ab38ece22d3ac1d626', htmlFor: this.checkboxId }, h("slot", { key: '4698f97ac58203e3f478321da53cc364157ded78', name: "label" }))));
|
|
78
72
|
}
|
|
79
73
|
get host() { return this; }
|
|
80
74
|
static get watchers() { return {
|
|
@@ -91,8 +85,7 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
|
|
|
91
85
|
"value": [1],
|
|
92
86
|
"tdsAriaLabel": [1, "tds-aria-label"],
|
|
93
87
|
"tdsAriaDescribedby": [1, "tds-aria-describedby"],
|
|
94
|
-
"toggleCheckbox": [64]
|
|
95
|
-
"focusElement": [64]
|
|
88
|
+
"toggleCheckbox": [64]
|
|
96
89
|
}, [[4, "reset", "handleFormReset"]], {
|
|
97
90
|
"indeterminate": ["handleIndeterminateState"]
|
|
98
91
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { c as convertToString } from './p-a1181b1f.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-1ef7423a.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './p-c715ab56.js';
|
|
5
5
|
|
|
6
6
|
const dropdownOptionCss = ":host{box-sizing:border-box;display:block;background-color:var(--tds-dropdown-option-background)}:host *{box-sizing:border-box}:host .dropdown-option{color:var(--tds-dropdown-option-color);border-bottom:1px solid var(--tds-dropdown-option-border);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);overflow-wrap:anywhere;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-option.selected{background-color:var(--tds-dropdown-option-background-selected)}:host .dropdown-option.disabled{color:var(--tds-dropdown-option-color-disabled)}:host .dropdown-option button:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .dropdown-option button{all:unset;width:100%}:host .dropdown-option button.lg{padding:19px 0 20px}:host .dropdown-option button.md{padding:15px 0 16px}:host .dropdown-option button.sm{padding:11px 0 12px}:host .dropdown-option button.xs{padding:7px 0 8px}:host .dropdown-option button .single-select{display:flex;align-items:center;justify-content:space-between;padding:0 16px}:host .dropdown-option .multiselect{width:100%;height:100%}:host .dropdown-option .multiselect tds-checkbox{display:flex;height:100%;width:100%}:host .dropdown-option .multiselect tds-checkbox.lg{padding:15px 16px 16px}:host .dropdown-option .multiselect tds-checkbox.md{padding:11px 16px 12px}:host .dropdown-option .multiselect tds-checkbox.sm{padding:7px 16px 8px}:host .dropdown-option .multiselect tds-checkbox.xs{padding:7px 16px 8px}:host .dropdown-option:hover{background-color:var(--tds-dropdown-option-background-hover);cursor:pointer}:host .dropdown-option:hover.disabled{background-color:var(--tds-dropdown-option-background);cursor:not-allowed}:host([hidden]){display:none}";
|
|
@@ -136,15 +136,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
136
136
|
if (!this.disabled) {
|
|
137
137
|
this.open = !this.open;
|
|
138
138
|
if (this.open) {
|
|
139
|
-
|
|
140
|
-
this.focusInputElement();
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
const button = this.host.shadowRoot.querySelector('button');
|
|
144
|
-
if (button) {
|
|
145
|
-
button.focus();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
139
|
+
this.focusInputElement();
|
|
148
140
|
}
|
|
149
141
|
}
|
|
150
142
|
};
|
|
@@ -190,13 +182,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
190
182
|
this.handleFocus = (event) => {
|
|
191
183
|
this.open = true;
|
|
192
184
|
this.filterFocus = true;
|
|
193
|
-
if (this.multiselect
|
|
185
|
+
if (this.multiselect) {
|
|
194
186
|
this.inputElement.value = '';
|
|
195
187
|
}
|
|
196
188
|
this.tdsFocus.emit(event);
|
|
197
|
-
|
|
198
|
-
this.handleFilter({ target: { value: '' } });
|
|
199
|
-
}
|
|
189
|
+
this.handleFilter({ target: { value: '' } });
|
|
200
190
|
};
|
|
201
191
|
this.handleBlur = (event) => {
|
|
202
192
|
this.tdsBlur.emit(event);
|
|
@@ -351,18 +341,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
351
341
|
}
|
|
352
342
|
/** Method that forces focus on the input element. */
|
|
353
343
|
async focusElement() {
|
|
354
|
-
|
|
355
|
-
// For filter mode, focus the input element
|
|
356
|
-
this.focusInputElement();
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
// For non-filter mode, focus the button element
|
|
360
|
-
const button = this.host.shadowRoot.querySelector('button');
|
|
361
|
-
if (button) {
|
|
362
|
-
button.focus();
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
// Always trigger the focus event to open the dropdown
|
|
344
|
+
this.focusInputElement();
|
|
366
345
|
this.handleFocus({});
|
|
367
346
|
}
|
|
368
347
|
/** Method for setting the value of the Dropdown.
|
|
@@ -515,9 +494,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
515
494
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
516
495
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
|
|
517
496
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
|
|
518
|
-
return (h(Host, { key: '
|
|
497
|
+
return (h(Host, { key: '5c5314d4994b1ca9c09729df6c9b30d9fb6b33d3', class: {
|
|
519
498
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
520
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
499
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '25133dd0a665315edfad6f93a846db0ac82cc16f', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '3d2a17d8f7bcf7f8aaa8d2ea5397044396b691e1', class: {
|
|
521
500
|
'dropdown-select': true,
|
|
522
501
|
[this.size]: true,
|
|
523
502
|
'disabled': this.disabled,
|
|
@@ -567,7 +546,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
567
546
|
label-inside-as-placeholder
|
|
568
547
|
${this.size}
|
|
569
548
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
570
|
-
` }, 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: '
|
|
549
|
+
` }, 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: '4e4a3036983d9f2c53119884f32482a14b16bbff', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-hidden": this.open ? 'false' : 'true', inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
571
550
|
this.dropdownList = element;
|
|
572
551
|
}, class: {
|
|
573
552
|
'dropdown-list': true,
|
|
@@ -578,11 +557,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
578
557
|
'closed': !this.open,
|
|
579
558
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
580
559
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
581
|
-
} }, h("slot", { key: '
|
|
560
|
+
} }, h("slot", { key: 'ad34d1c72b7490505aee226e3e1478e68084309d', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '619071043ec5be2a17b24c9706aa20490f4c4339', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '4165cfc63988816e39a86a304acacd627aa24567', id: helperId, class: {
|
|
582
561
|
helper: true,
|
|
583
562
|
error: this.error,
|
|
584
563
|
disabled: this.disabled,
|
|
585
|
-
} }, this.error && h("tds-icon", { key: '
|
|
564
|
+
} }, this.error && h("tds-icon", { key: '90eea26d0166a4acaa066211fa996e2b74ccd575', name: "error", size: "16px" }), this.helper))));
|
|
586
565
|
}
|
|
587
566
|
get host() { return this; }
|
|
588
567
|
static get watchers() { return {
|
|
@@ -67,13 +67,6 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
67
67
|
async setValue(newValue) {
|
|
68
68
|
this.value = newValue;
|
|
69
69
|
}
|
|
70
|
-
/** Method to programmatically focus the datetime element */
|
|
71
|
-
async focusElement() {
|
|
72
|
-
if (this.textInput) {
|
|
73
|
-
this.textInput.focus();
|
|
74
|
-
this.focusInput = true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
70
|
componentWillLoad() {
|
|
78
71
|
if (this.defaultValue !== 'none') {
|
|
79
72
|
this.value = this.getDefaultValue();
|
|
@@ -139,7 +132,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
139
132
|
'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
|
|
140
133
|
};
|
|
141
134
|
const iphone = navigator.userAgent.toLowerCase().includes('iphone');
|
|
142
|
-
return (h("div", { key: '
|
|
135
|
+
return (h("div", { key: '1a55db8de53a69917a0f498ce4e9877136b21766', class: classNames, onKeyDown: (e) => {
|
|
143
136
|
if (e.key === 'Enter') {
|
|
144
137
|
const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
|
|
145
138
|
if (browserIsChrome) {
|
|
@@ -147,9 +140,9 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
147
140
|
this.textInput.showPicker();
|
|
148
141
|
}
|
|
149
142
|
}
|
|
150
|
-
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '
|
|
143
|
+
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '83a178f48b465978da70749d5a0a6b06c7a46423', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'd3b8cbc704aee3863a428f6bbc9b89a8894241df', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: 'b398e66d353aeb568024686b591dcf5d9d2288e6', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: '1d31da2daaa048b46fe9a3023f4342e0daa4cfde', ref: (inputEl) => {
|
|
151
144
|
this.textInput = inputEl;
|
|
152
|
-
}, 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: 'f16d4c77abdc6b1cabb03b8e4beba58704796648', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: '168c3c719094c8b39dcc4fa16b4d13b588b9429b', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '6e0794302a5e1792b198c7d1208aa8e59bfb3d5c', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '1a954f5386c136d2cdb88408c9729a68adcd5e58', class: "datetime-icon icon-time" }, h("tds-icon", { key: '67b56f956fc439a71870fdd3ede387d007a69f08', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: 'c1373d3f3413cdba67911cfc1884f201a326df97', class: "tds-datetime-bar" })), this.helper && (h("div", { key: 'c3d22a5de88ba11154b227ad0d8930cc0768bc99', class: "tds-datetime-helper" }, h("div", { key: '0c5123613944fc44184ab7d489712982b70c183e', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: 'a351a589cacb618dbf890e247e98efe14970062b', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
|
|
153
146
|
}
|
|
154
147
|
static get style() { return TdsDatetimeStyle0; }
|
|
155
148
|
}, [2, "tds-datetime", {
|
|
@@ -171,8 +164,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
171
164
|
"tdsAriaLabel": [1, "tds-aria-label"],
|
|
172
165
|
"focusInput": [32],
|
|
173
166
|
"reset": [64],
|
|
174
|
-
"setValue": [64]
|
|
175
|
-
"focusElement": [64]
|
|
167
|
+
"setValue": [64]
|
|
176
168
|
}, [[0, "focusin", "handleFocusIn"], [0, "focusout", "handleFocusOut"]]]);
|
|
177
169
|
function defineCustomElement$1() {
|
|
178
170
|
if (typeof customElements === "undefined") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-7ee8b262.js';
|
|
2
2
|
|
|
3
3
|
const TdsDropdownOption = TdsDropdownOption$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|