@scania/tegel 1.31.1-textarea-reactive-value-beta.1 → 1.32.0-accessibility-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tds-badge.cjs.entry.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +1 -1
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/tds-button.cjs.entry.js +6 -4
- package/dist/cjs/tds-checkbox.cjs.entry.js +9 -3
- package/dist/cjs/tds-chip.cjs.entry.js +1 -1
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +10 -3
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +32 -11
- package/dist/cjs/tds-folder-tab.cjs.entry.js +3 -3
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +3 -3
- package/dist/cjs/tds-footer-group.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +3 -3
- package/dist/cjs/tds-message.cjs.entry.js +1 -1
- package/dist/cjs/tds-modal.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-radio-button.cjs.entry.js +8 -2
- package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tds-step.cjs.entry.js +2 -2
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/tds-text-field.cjs.entry.js +5 -5
- package/dist/cjs/tds-textarea.cjs.entry.js +10 -3
- package/dist/cjs/tds-toast.cjs.entry.js +4 -4
- package/dist/cjs/tds-toggle.cjs.entry.js +9 -3
- package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +2 -1
- package/dist/collection/components/accordion/accordion.css +2 -1
- package/dist/collection/components/badge/badge.css +1 -1
- package/dist/collection/components/banner/banner.css +2 -1
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +2 -1
- package/dist/collection/components/button/button.css +60 -57
- package/dist/collection/components/button/button.js +39 -3
- package/dist/collection/components/checkbox/checkbox.css +5 -5
- package/dist/collection/components/checkbox/checkbox.js +25 -2
- package/dist/collection/components/chip/chip.css +4 -3
- package/dist/collection/components/datetime/datetime.js +27 -3
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.css +2 -1
- package/dist/collection/components/dropdown/dropdown.css +2 -2
- package/dist/collection/components/dropdown/dropdown.js +30 -9
- package/dist/collection/components/footer/footer-group/footer-group.css +3 -3
- package/dist/collection/components/footer/footer-item/footer-item.css +6 -4
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +2 -1
- package/dist/collection/components/header/header-item/header-item.css +2 -1
- package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.css +2 -1
- package/dist/collection/components/message/message.css +12 -1
- package/dist/collection/components/modal/modal.css +2 -1
- package/dist/collection/components/popover-core/tds-popover-core.css +550 -495
- package/dist/collection/components/radio-button/radio-button.css +4 -7
- package/dist/collection/components/radio-button/radio-button.js +28 -1
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +2 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +2 -1
- package/dist/collection/components/slider/slider-stories-setup.js +233 -0
- package/dist/collection/components/spinner/spinner.css +3 -3
- package/dist/collection/components/stepper/step/step.css +19 -27
- package/dist/collection/components/stepper/step/step.js +1 -1
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css +2 -1
- package/dist/collection/components/table/table-footer/table-footer.css +2 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-toolbar/table-toolbar.css +6 -1
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +3 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +2 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +2 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +2 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +4 -4
- package/dist/collection/components/text-field/text-field.js +5 -5
- package/dist/collection/components/textarea/textarea.js +31 -3
- package/dist/collection/components/toast/toast.css +10 -12
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.css +18 -3
- package/dist/collection/components/toggle/toggle.js +25 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/stories/formatHtmlPreview.js +10 -0
- package/dist/collection/utils/accessibility.js +30 -0
- package/dist/collection/utils/axeHelpers.js +11 -2
- package/dist/components/{p-ece91cb9.js → p-037c48f6.js} +1 -1
- package/dist/components/{p-6732b15a.js → p-1c6e7dc9.js} +1 -1
- package/dist/components/p-31327d07.js +2098 -0
- package/dist/components/{p-1ef7423a.js → p-58b92113.js} +11 -4
- package/dist/components/{p-adbf32b9.js → p-5fad6216.js} +31 -10
- package/dist/components/{p-6cdccb27.js → p-76dc921a.js} +1 -1
- package/dist/components/{p-7ee8b262.js → p-9d6af0e6.js} +2 -2
- package/dist/components/{p-516d8085.js → p-a6d4fbb4.js} +1 -1
- package/dist/components/{p-84a20410.js → p-c46ecd24.js} +1 -1
- package/dist/components/{p-4420365f.js → p-ebafe83d.js} +3 -3
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-accordion.js +1 -1
- package/dist/components/tds-badge.js +1 -1
- package/dist/components/tds-banner.js +1 -1
- package/dist/components/tds-breadcrumb.js +1 -1
- package/dist/components/tds-button.js +8 -4
- package/dist/components/tds-checkbox.js +1 -1
- package/dist/components/tds-chip.js +1 -1
- package/dist/components/tds-datetime.js +12 -4
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tab.js +3 -3
- package/dist/components/tds-folder-tabs.js +3 -3
- package/dist/components/tds-footer-group.js +1 -1
- package/dist/components/tds-footer-item.js +1 -1
- package/dist/components/tds-header-brand-symbol.js +1 -1
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown-list-item.js +1 -1
- package/dist/components/tds-header-dropdown.js +3 -3
- package/dist/components/tds-header-hamburger.js +1 -1
- package/dist/components/tds-header-item.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher-grid-item.js +1 -1
- package/dist/components/tds-header-launcher-list-item.js +1 -1
- package/dist/components/tds-header-launcher.js +4 -4
- package/dist/components/tds-inline-tab.js +2 -2
- package/dist/components/tds-inline-tabs.js +3 -3
- package/dist/components/tds-message.js +1 -1
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-navigation-tab.js +2 -2
- package/dist/components/tds-navigation-tabs.js +5 -5
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +1 -1
- package/dist/components/tds-radio-button.js +10 -3
- package/dist/components/tds-side-menu-collapse-button.js +1 -1
- package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-side-menu-item.js +1 -1
- package/dist/components/tds-spinner.js +1 -1
- package/dist/components/tds-step.js +2 -2
- package/dist/components/tds-table-body-row-expandable.js +1 -1
- package/dist/components/tds-table-body-row.js +1 -1
- package/dist/components/tds-table-footer.js +4 -4
- package/dist/components/tds-table-header.js +1 -1
- package/dist/components/tds-table-toolbar.js +3 -3
- package/dist/components/tds-text-field.js +5 -5
- package/dist/components/tds-textarea.js +14 -6
- package/dist/components/tds-toast.js +4 -4
- package/dist/components/tds-toggle.js +11 -4
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-accordion-item.entry.js +1 -1
- package/dist/esm/tds-accordion.entry.js +1 -1
- package/dist/esm/tds-badge.entry.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-breadcrumb.entry.js +1 -1
- package/dist/esm/tds-button.entry.js +6 -4
- package/dist/esm/tds-checkbox.entry.js +9 -3
- package/dist/esm/tds-chip.entry.js +1 -1
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +10 -3
- package/dist/esm/tds-dropdown_2.entry.js +32 -11
- package/dist/esm/tds-folder-tab.entry.js +3 -3
- package/dist/esm/tds-folder-tabs.entry.js +3 -3
- package/dist/esm/tds-footer-group.entry.js +1 -1
- package/dist/esm/tds-footer-item.entry.js +1 -1
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-header-launcher-grid-item.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +2 -2
- package/dist/esm/tds-inline-tabs.entry.js +3 -3
- package/dist/esm/tds-message.entry.js +1 -1
- package/dist/esm/tds-modal.entry.js +1 -1
- package/dist/esm/tds-navigation-tab.entry.js +2 -2
- package/dist/esm/tds-navigation-tabs.entry.js +5 -5
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-radio-button.entry.js +8 -2
- package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-spinner.entry.js +1 -1
- package/dist/esm/tds-step.entry.js +2 -2
- package/dist/esm/tds-table-body-row-expandable.entry.js +1 -1
- package/dist/esm/tds-table-footer.entry.js +1 -1
- package/dist/esm/tds-table-toolbar.entry.js +3 -3
- package/dist/esm/tds-text-field.entry.js +5 -5
- package/dist/esm/tds-textarea.entry.js +10 -3
- package/dist/esm/tds-toast.entry.js +4 -4
- package/dist/esm/tds-toggle.entry.js +9 -3
- package/dist/esm/tds-tooltip.entry.js +2 -2
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/{p-6cdbdb4e.entry.js → p-08cee6a4.entry.js} +1 -1
- package/dist/tegel/{p-a1262f8f.entry.js → p-106e048d.entry.js} +1 -1
- package/dist/tegel/{p-1336fb6c.entry.js → p-120b5875.entry.js} +1 -1
- package/dist/tegel/{p-3e4707fb.entry.js → p-2e5d2bec.entry.js} +1 -1
- package/dist/tegel/{p-dfe24bb1.entry.js → p-32540392.entry.js} +1 -1
- package/dist/tegel/p-326f0bf4.entry.js +1 -0
- package/dist/tegel/{p-1120575b.entry.js → p-364c08ec.entry.js} +1 -1
- package/dist/tegel/p-3a92d554.entry.js +1 -0
- package/dist/tegel/{p-d4891ce6.entry.js → p-4d60aa49.entry.js} +1 -1
- package/dist/tegel/p-50ca8e71.entry.js +1 -0
- package/dist/tegel/{p-1116da44.entry.js → p-52adc30c.entry.js} +1 -1
- package/dist/tegel/p-5dd2aac8.entry.js +1 -0
- package/dist/tegel/{p-87ba6285.entry.js → p-5df726fb.entry.js} +1 -1
- package/dist/tegel/{p-d29a777f.entry.js → p-67b4b2cf.entry.js} +1 -1
- package/dist/tegel/{p-9d8bb017.entry.js → p-6d752168.entry.js} +1 -1
- package/dist/tegel/p-6d89dcbe.entry.js +1 -0
- package/dist/tegel/{p-9899e52e.entry.js → p-7013249b.entry.js} +1 -1
- package/dist/tegel/p-731f7599.entry.js +1 -0
- package/dist/tegel/{p-e7a452a8.entry.js → p-76faaf70.entry.js} +1 -1
- package/dist/tegel/p-84de314b.entry.js +1 -0
- package/dist/tegel/{p-e102ca15.entry.js → p-87219f00.entry.js} +1 -1
- package/dist/tegel/p-8bf0f99f.entry.js +1 -0
- package/dist/tegel/{p-c5e50096.entry.js → p-97de52aa.entry.js} +1 -1
- package/dist/tegel/{p-2e1d2b49.entry.js → p-9ebfde2f.entry.js} +1 -1
- package/dist/tegel/{p-2b8e97e1.entry.js → p-a495c4bc.entry.js} +1 -1
- package/dist/tegel/p-b58194f9.entry.js +1 -0
- package/dist/tegel/{p-d14500a1.entry.js → p-c0778293.entry.js} +1 -1
- package/dist/tegel/p-c6beca5e.entry.js +1 -0
- package/dist/tegel/p-caa00547.entry.js +1 -0
- package/dist/tegel/p-d9040b7f.entry.js +1 -0
- package/dist/tegel/p-d99df3e7.entry.js +1 -0
- package/dist/tegel/{p-3c51a017.entry.js → p-da60d17b.entry.js} +1 -1
- package/dist/tegel/p-e3c2b6b4.entry.js +1 -0
- package/dist/tegel/p-eb5a8659.entry.js +1 -0
- package/dist/tegel/p-f4283f93.entry.js +1 -0
- package/dist/tegel/p-f76d8ab9.entry.js +1 -0
- package/dist/tegel/{p-2774f177.entry.js → p-fc679bf3.entry.js} +1 -1
- package/dist/tegel/{p-4bd0d41c.entry.js → p-fdc5c832.entry.js} +1 -1
- package/dist/tegel/tegel.css +6 -6
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +2 -0
- package/dist/types/components/datetime/datetime.d.ts +2 -0
- package/dist/types/components/radio-button/radio-button.d.ts +3 -0
- package/dist/types/components/slider/slider-stories-setup.d.ts +232 -0
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +1 -0
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/toggle/toggle.d.ts +3 -0
- package/dist/types/components.d.ts +36 -0
- package/dist/types/global.d.ts +1 -0
- package/dist/types/stories/formatHtmlPreview.d.ts +2 -0
- package/dist/types/utils/accessibility.d.ts +14 -0
- package/package.json +30 -35
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/components/p-96e83134.js +0 -2098
- package/dist/tegel/p-0ca95c76.entry.js +0 -1
- package/dist/tegel/p-1978cb0d.entry.js +0 -1
- package/dist/tegel/p-2286d4c3.entry.js +0 -1
- package/dist/tegel/p-30c88c69.entry.js +0 -1
- package/dist/tegel/p-503cea9d.entry.js +0 -1
- package/dist/tegel/p-554644a9.entry.js +0 -1
- package/dist/tegel/p-5ade1970.entry.js +0 -1
- package/dist/tegel/p-5bb01a99.entry.js +0 -1
- package/dist/tegel/p-90a97cc2.entry.js +0 -1
- package/dist/tegel/p-a9253c3a.entry.js +0 -1
- package/dist/tegel/p-ae0fed95.entry.js +0 -1
- package/dist/tegel/p-b152840e.entry.js +0 -1
- package/dist/tegel/p-b58c7bed.entry.js +0 -1
- package/dist/tegel/p-b7848493.entry.js +0 -1
- package/dist/tegel/p-b9603974.entry.js +0 -1
- package/dist/tegel/p-bbeb4e1b.entry.js +0 -1
- package/dist/tegel/p-d6d8cb7f.entry.js +0 -1
|
@@ -56,6 +56,13 @@ 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
|
+
}
|
|
59
66
|
componentWillLoad() {
|
|
60
67
|
if (this.defaultValue !== 'none') {
|
|
61
68
|
this.value = this.getDefaultValue();
|
|
@@ -121,7 +128,7 @@ export class TdsDatetime {
|
|
|
121
128
|
'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
|
|
122
129
|
};
|
|
123
130
|
const iphone = navigator.userAgent.toLowerCase().includes('iphone');
|
|
124
|
-
return (h("div", { key: '
|
|
131
|
+
return (h("div", { key: '28c414fb800bb7e1411feb93b03b4ec4732e60fb', class: classNames, onKeyDown: (e) => {
|
|
125
132
|
if (e.key === 'Enter') {
|
|
126
133
|
const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
|
|
127
134
|
if (browserIsChrome) {
|
|
@@ -129,9 +136,9 @@ export class TdsDatetime {
|
|
|
129
136
|
this.textInput.showPicker();
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
|
-
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '
|
|
139
|
+
} }, this.labelPosition === 'outside' && this.label && (h("label", { key: '8498489db26eeffef963d57dd8aaaa27903e3e98', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'e62f09d543d12a3d9578bee5249171c85c7e3f03', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: '0d083993b8f447918d0110ba78f18586d5afac1c', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: 'cdec8e9e1c8f355858031f34799fac7dd8d03c4b', ref: (inputEl) => {
|
|
133
140
|
this.textInput = inputEl;
|
|
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: '
|
|
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: 'f5ab00bd2a3dca4a46981da7e54ff6dcacfb6529', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: 'ce7799142c01703e7d3add1bc3d0fb474dec25e3', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '189b60ff034d2e0bc49e9461fc9970846a7e10a2', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '192c46c706e8d8ca8613e832df2f77e981b64e2a', class: "datetime-icon icon-time" }, h("tds-icon", { key: 'e0cb4c98ccd40cb6d5b82d313aa48da8e4564b57', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: '5a677ae45553060d459e1002741c0bed7ae1cefa', class: "tds-datetime-bar" })), this.helper && (h("div", { key: '0b132b2f580c3dffcfceff2ba8b4c2315ca8cd50', class: "tds-datetime-helper" }, h("div", { key: 'b17e1f96757072c8092e4cbe6e66b45b209a16ae', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: '8afde58643e719da112bad1dcdc47f363c85490c', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
|
|
135
142
|
}
|
|
136
143
|
static get is() { return "tds-datetime"; }
|
|
137
144
|
static get encapsulation() { return "scoped"; }
|
|
@@ -555,6 +562,23 @@ export class TdsDatetime {
|
|
|
555
562
|
"text": "Method that sets the value of the datetime element",
|
|
556
563
|
"tags": []
|
|
557
564
|
}
|
|
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
|
+
}
|
|
558
582
|
}
|
|
559
583
|
};
|
|
560
584
|
}
|
|
@@ -223,7 +223,7 @@ body {
|
|
|
223
223
|
border-bottom-color: var(--tds-dropdown-border-bottom);
|
|
224
224
|
}
|
|
225
225
|
:host .dropdown-select button.error {
|
|
226
|
-
border-bottom-color: var(--tds-
|
|
226
|
+
border-bottom-color: var(--tds-dropdown-error);
|
|
227
227
|
}
|
|
228
228
|
:host .dropdown-select button.error:focus {
|
|
229
229
|
border-bottom-color: transparent;
|
|
@@ -313,7 +313,7 @@ body {
|
|
|
313
313
|
gap: 8px;
|
|
314
314
|
}
|
|
315
315
|
:host .helper.error {
|
|
316
|
-
color: var(--tds-
|
|
316
|
+
color: var(--tds-dropdown-error);
|
|
317
317
|
}
|
|
318
318
|
:host .helper.disabled {
|
|
319
319
|
color: var(--tds-dropdown-disabled-color);
|
|
@@ -72,7 +72,15 @@ export class TdsDropdown {
|
|
|
72
72
|
if (!this.disabled) {
|
|
73
73
|
this.open = !this.open;
|
|
74
74
|
if (this.open) {
|
|
75
|
-
this.
|
|
75
|
+
if (this.filter) {
|
|
76
|
+
this.focusInputElement();
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const button = this.host.shadowRoot.querySelector('button');
|
|
80
|
+
if (button) {
|
|
81
|
+
button.focus();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
76
84
|
}
|
|
77
85
|
}
|
|
78
86
|
};
|
|
@@ -118,11 +126,13 @@ export class TdsDropdown {
|
|
|
118
126
|
this.handleFocus = (event) => {
|
|
119
127
|
this.open = true;
|
|
120
128
|
this.filterFocus = true;
|
|
121
|
-
if (this.multiselect) {
|
|
129
|
+
if (this.multiselect && this.inputElement) {
|
|
122
130
|
this.inputElement.value = '';
|
|
123
131
|
}
|
|
124
132
|
this.tdsFocus.emit(event);
|
|
125
|
-
this.
|
|
133
|
+
if (this.filter) {
|
|
134
|
+
this.handleFilter({ target: { value: '' } });
|
|
135
|
+
}
|
|
126
136
|
};
|
|
127
137
|
this.handleBlur = (event) => {
|
|
128
138
|
this.tdsBlur.emit(event);
|
|
@@ -277,7 +287,18 @@ export class TdsDropdown {
|
|
|
277
287
|
}
|
|
278
288
|
/** Method that forces focus on the input element. */
|
|
279
289
|
async focusElement() {
|
|
280
|
-
this.
|
|
290
|
+
if (this.filter) {
|
|
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
|
|
281
302
|
this.handleFocus({});
|
|
282
303
|
}
|
|
283
304
|
/** Method for setting the value of the Dropdown.
|
|
@@ -430,9 +451,9 @@ export class TdsDropdown {
|
|
|
430
451
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
431
452
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
|
|
432
453
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
|
|
433
|
-
return (h(Host, { key: '
|
|
454
|
+
return (h(Host, { key: 'aed0a485fc4634cdba2599fa9792fb6289a7459c', class: {
|
|
434
455
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
435
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
456
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '39d11ac06547b133540f037a0c09ddc40b972cb5', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '8ab624d380289699887b660d30512b2e892f71c0', class: {
|
|
436
457
|
'dropdown-select': true,
|
|
437
458
|
[this.size]: true,
|
|
438
459
|
'disabled': this.disabled,
|
|
@@ -482,7 +503,7 @@ export class TdsDropdown {
|
|
|
482
503
|
label-inside-as-placeholder
|
|
483
504
|
${this.size}
|
|
484
505
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
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: '
|
|
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: '989c425c5a608444533e33ad83313aa56569c225', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-hidden": this.open ? 'false' : 'true', inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
486
507
|
this.dropdownList = element;
|
|
487
508
|
}, class: {
|
|
488
509
|
'dropdown-list': true,
|
|
@@ -493,11 +514,11 @@ export class TdsDropdown {
|
|
|
493
514
|
'closed': !this.open,
|
|
494
515
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
495
516
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
496
|
-
} }, h("slot", { key: '
|
|
517
|
+
} }, h("slot", { key: '6e54bbb0eacf27cfdbf3b393f2c9e690adb394e8', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '4bdaf935cd213f63e7a8665b5d6f69ee0589d7b9', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '112c76fa88eef7798b9b0d435ae03e62880a9ff8', id: helperId, class: {
|
|
497
518
|
helper: true,
|
|
498
519
|
error: this.error,
|
|
499
520
|
disabled: this.disabled,
|
|
500
|
-
} }, this.error && h("tds-icon", { key: '
|
|
521
|
+
} }, this.error && h("tds-icon", { key: '055e681faca85a461b07619c42fa0eb48a6ec028', name: "error", size: "16px" }), this.helper))));
|
|
501
522
|
}
|
|
502
523
|
static get is() { return "tds-dropdown"; }
|
|
503
524
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
:host .footer-top-title {
|
|
5
5
|
font: var(--tds-headline-07);
|
|
6
6
|
letter-spacing: var(--tds-headline-07-ls);
|
|
7
|
-
|
|
8
|
-
color: var(--tds-footer-top-links);
|
|
7
|
+
color: var(--tds-footer-top-links-header);
|
|
9
8
|
padding-bottom: 8px;
|
|
10
9
|
}
|
|
11
10
|
:host .footer-top-title *,
|
|
@@ -42,7 +41,8 @@
|
|
|
42
41
|
}
|
|
43
42
|
:host button.footer-top-title-button:focus-visible {
|
|
44
43
|
outline: 2px solid var(--tds-blue-400);
|
|
45
|
-
|
|
44
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
45
|
+
outline-offset: 1px;
|
|
46
46
|
}
|
|
47
47
|
:host button.footer-top-title-button tds-icon {
|
|
48
48
|
transition: transform 0.2s ease-in-out;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
font: var(--tds-headline-07);
|
|
4
4
|
letter-spacing: var(--tds-headline-07-ls);
|
|
5
5
|
color: var(--tds-footer-main-links);
|
|
6
|
-
opacity: var(--tds-footer-main-links-opacity);
|
|
7
6
|
text-decoration: none;
|
|
8
7
|
}
|
|
9
8
|
:host([role=listitem]) div ::slotted(a:focus-visible),
|
|
10
9
|
:host([role=listitem]) div ::slotted(button:focus-visible) {
|
|
11
10
|
outline: 2px solid var(--tds-blue-400);
|
|
12
|
-
|
|
11
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
12
|
+
outline-offset: 1px;
|
|
13
13
|
}
|
|
14
14
|
:host([role=listitem]) div ::slotted(a:hover),
|
|
15
15
|
:host([role=listitem]) div ::slotted(button:hover) {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
:host([role=listitem]) div.top-part-child ::slotted(a:focus-visible),
|
|
25
25
|
:host([role=listitem]) div.top-part-child ::slotted(button:focus-visible) {
|
|
26
26
|
outline: 2px solid var(--tds-blue-400);
|
|
27
|
-
|
|
27
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
28
|
+
outline-offset: 1px;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
@media all and (max-width: 992px) {
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
:host([role=listitem]) div.top-part-child ::slotted(a:focus-visible),
|
|
47
48
|
:host([role=listitem]) div.top-part-child ::slotted(button:focus-visible) {
|
|
48
49
|
outline: 2px solid var(--tds-blue-400);
|
|
49
|
-
|
|
50
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
51
|
+
outline-offset: 1px;
|
|
50
52
|
}
|
|
51
53
|
}
|
package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
}
|
|
29
29
|
:host .component ::slotted(a:focus-visible) {
|
|
30
30
|
outline: 2px solid var(--tds-blue-400);
|
|
31
|
-
|
|
31
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
32
|
+
outline-offset: 1px;
|
|
32
33
|
}
|
|
33
34
|
:host .component-selected {
|
|
34
35
|
background-color: var(--tds-nav-item-background-selected);
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
:host ::slotted(button:focus-visible),
|
|
24
24
|
:host ::slotted(a:focus-visible) {
|
|
25
25
|
outline: 2px solid var(--tds-blue-400);
|
|
26
|
-
|
|
26
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
27
|
+
outline-offset: 1px;
|
|
27
28
|
}
|
|
28
29
|
:host .component-active ::slotted(button),
|
|
29
30
|
:host .component-active ::slotted(a) {
|
|
@@ -4,13 +4,22 @@
|
|
|
4
4
|
:host {
|
|
5
5
|
/* Default values */
|
|
6
6
|
--tds-message-background: var(--background-elevation-layer-03);
|
|
7
|
+
--tds-message-background-error: var(--system-danger-subtle-03);
|
|
8
|
+
--tds-message-background-warning: var(--background-elevation-layer-03);
|
|
9
|
+
--tds-message-background-success: var(--background-elevation-layer-03);
|
|
7
10
|
/* Variant values */
|
|
8
11
|
}
|
|
9
12
|
:host .tds-mode-variant-primary {
|
|
10
13
|
--tds-message-background: var(--background-elevation-layer-03);
|
|
14
|
+
--tds-message-background-error: var(--system-danger-subtle-03);
|
|
15
|
+
--tds-message-background-warning: var(--background-elevation-layer-03);
|
|
16
|
+
--tds-message-background-success: var(--background-elevation-layer-03);
|
|
11
17
|
}
|
|
12
18
|
:host .tds-mode-variant-secondary {
|
|
13
19
|
--tds-message-background: var(--background-elevation-layer-02);
|
|
20
|
+
--tds-message-background-error: var(--system-danger-subtle-02);
|
|
21
|
+
--tds-message-background-warning: var(--background-elevation-layer-02);
|
|
22
|
+
--tds-message-background-success: var(--background-elevation-layer-02);
|
|
14
23
|
}
|
|
15
24
|
:host .wrapper {
|
|
16
25
|
display: flex;
|
|
@@ -25,19 +34,21 @@
|
|
|
25
34
|
color: var(--system-info-default);
|
|
26
35
|
}
|
|
27
36
|
:host .wrapper.success {
|
|
37
|
+
background-color: var(--tds-message-background-success);
|
|
28
38
|
border-left: 4px solid var(--system-success-default);
|
|
29
39
|
}
|
|
30
40
|
:host .wrapper.success tds-icon {
|
|
31
41
|
color: var(--system-success-default);
|
|
32
42
|
}
|
|
33
43
|
:host .wrapper.error {
|
|
34
|
-
background-color: var(--
|
|
44
|
+
background-color: var(--tds-message-background-error);
|
|
35
45
|
border-left: 4px solid var(--system-danger-default);
|
|
36
46
|
}
|
|
37
47
|
:host .wrapper.error tds-icon {
|
|
38
48
|
color: var(--system-danger-default);
|
|
39
49
|
}
|
|
40
50
|
:host .wrapper.warning {
|
|
51
|
+
background-color: var(--tds-message-background-warning);
|
|
41
52
|
border-left: 4px solid var(--system-warning-default);
|
|
42
53
|
}
|
|
43
54
|
:host .wrapper.warning tds-icon {
|
|
@@ -216,7 +216,8 @@ button.tds-modal-close {
|
|
|
216
216
|
}
|
|
217
217
|
.tds-modal-close:focus {
|
|
218
218
|
outline: 2px solid var(--tds-blue-400);
|
|
219
|
-
|
|
219
|
+
box-shadow: 0 0 0 1px var(--tds-white);
|
|
220
|
+
outline-offset: 1px;
|
|
220
221
|
}
|
|
221
222
|
@media (min-width: 320px) {
|
|
222
223
|
.tds-modal-close {
|