@scania/tegel 1.21.1-header-dropdown-click-event-beta.1 → 1.21.1-header-dropdown-click-event-testing-2-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/loader.cjs.js +1 -1
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +23 -9
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +3 -4
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +10 -7
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +3 -2
- package/dist/cjs/tds-popover-core.cjs.entry.js +44 -6
- package/dist/cjs/tds-popover-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-menu.cjs.entry.js +3 -2
- package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.css +1 -0
- package/dist/collection/components/dropdown/dropdown.css +19 -3
- package/dist/collection/components/dropdown/dropdown.js +39 -7
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +10 -13
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +6 -0
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +2 -20
- package/dist/collection/components/popover-canvas/popover-canvas.js +21 -2
- package/dist/collection/components/popover-core/popover-core.js +48 -7
- package/dist/collection/components/popover-core/tds-popover-core.css +6965 -0
- package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.css +1 -0
- package/dist/collection/components/popover-menu/popover-menu.js +21 -2
- package/dist/collection/components/toggle/toggle.css +1 -1
- package/dist/collection/utils/classList.js +22 -0
- package/dist/components/p-3191ad55.js +2052 -0
- package/dist/components/{p-cc6e8a0d.js → p-7f87740b.js} +5 -3
- package/dist/components/{p-d326bda7.js → p-8bc36666.js} +23 -8
- package/dist/components/{p-832ca7ac.js → p-9411c8ea.js} +1 -1
- package/dist/components/{p-75e8d778.js → p-d1b7ad21.js} +4 -5
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-header-dropdown-list-item.js +1 -1
- package/dist/components/tds-header-dropdown.js +13 -10
- package/dist/components/tds-header-launcher-list-item.js +1 -1
- package/dist/components/tds-header-launcher.js +2 -2
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu-item.js +1 -1
- package/dist/components/tds-popover-menu.js +5 -3
- package/dist/components/tds-table-footer.js +2 -2
- package/dist/components/tds-toggle.js +1 -1
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +23 -9
- package/dist/esm/tds-header-dropdown-list-item.entry.js +4 -5
- package/dist/esm/tds-header-dropdown.entry.js +10 -7
- package/dist/esm/tds-popover-canvas.entry.js +3 -2
- package/dist/esm/tds-popover-core.entry.js +44 -6
- package/dist/esm/tds-popover-menu-item.entry.js +1 -1
- package/dist/esm/tds-popover-menu.entry.js +3 -2
- package/dist/esm/tds-toggle.entry.js +1 -1
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-062adc6d.entry.js +1 -0
- package/dist/tegel/p-1acfd8a2.entry.js +1 -0
- package/dist/tegel/p-23ddcd21.entry.js +1 -0
- package/dist/tegel/p-7097a39a.entry.js +1 -0
- package/dist/tegel/p-85d1ec5b.entry.js +1 -0
- package/dist/tegel/p-89235968.entry.js +1 -0
- package/dist/tegel/p-dd060c11.entry.js +1 -0
- package/dist/tegel/p-f45d905c.entry.js +1 -0
- package/dist/tegel/tegel.css +1 -1
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +1 -1
- package/dist/types/components/header/header-dropdown-list-item/header-dropdown-list-item.d.ts +0 -2
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
- package/dist/types/components/popover-core/popover-core.d.ts +3 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +2 -0
- package/dist/types/components.d.ts +26 -16
- package/dist/types/utils/classList.d.ts +18 -0
- package/package.json +1 -1
- package/dist/components/p-1e1cf7f4.js +0 -2012
- package/dist/tegel/p-08612c5e.entry.js +0 -1
- package/dist/tegel/p-19571a64.entry.js +0 -1
- package/dist/tegel/p-3bec4c6c.entry.js +0 -1
- package/dist/tegel/p-66282839.entry.js +0 -1
- package/dist/tegel/p-b21eb276.entry.js +0 -1
- package/dist/tegel/p-b810cf07.entry.js +0 -1
- package/dist/tegel/p-b8f8a973.entry.js +0 -1
- package/dist/tegel/p-bb86ab14.entry.js +0 -1
|
@@ -58,7 +58,7 @@ const appendHiddenInput = (element, name, value, disabled, additionalAttributes)
|
|
|
58
58
|
input.value = value || '';
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const dropdownCss = "@charset \"UTF-8\";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:var(--tds-dropdown-border-radius)}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .value-wrapper input{color:var(--tds-dropdown-filter-input-color)}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select button:focus{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button.error{border-bottom-color:var(--tds-negative)}:host .dropdown-select button.error:focus{border-bottom-color:transparent}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select.disabled button{border:none}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside.xs{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--tds-placeholder-margin);}:host .dropdown-select .placeholder.xs{line-height:1}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .dropdown-select.xs{height:29px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;
|
|
61
|
+
const dropdownCss = "@charset \"UTF-8\";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:var(--tds-dropdown-border-radius)}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .value-wrapper input{color:var(--tds-dropdown-filter-input-color)}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select button{transition:border-bottom-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-select button:focus{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button:hover{border-bottom-color:var(--tds-dropdown-border-bottom-hover)}:host .dropdown-select button{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button.error{border-bottom-color:var(--tds-negative)}:host .dropdown-select button.error:focus{border-bottom-color:transparent}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select.disabled button{border:none}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside.xs{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--tds-placeholder-margin);}:host .dropdown-select .placeholder.xs{line-height:1}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .dropdown-select.xs{height:29px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;border-radius:var(--tds-dropdown-list-border-radius-down);overflow-y:auto;transform:scaleY(0);pointer-events:none}:host .dropdown-list:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .dropdown-list::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}:host .dropdown-list::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .dropdown-list{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.xs{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;border-radius:var(--tds-dropdown-list-border-radius-up)}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);pointer-events:none}:host .dropdown-list.open{transform:scaleY(1);visibility:visible;opacity:1;pointer-events:auto}:host .dropdown-list.animation-enter-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-enter)}:host .dropdown-list.animation-exit-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-exit)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .dropdown-list .no-result.xs{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host tds-icon.open{transform:rotateZ(180deg)}";
|
|
62
62
|
const TdsDropdownStyle0 = dropdownCss;
|
|
63
63
|
|
|
64
64
|
const TdsDropdown = class {
|
|
@@ -220,6 +220,7 @@ const TdsDropdown = class {
|
|
|
220
220
|
this.openDirection = 'auto';
|
|
221
221
|
this.placeholder = undefined;
|
|
222
222
|
this.size = 'lg';
|
|
223
|
+
this.animation = 'slide';
|
|
223
224
|
this.error = false;
|
|
224
225
|
this.multiselect = false;
|
|
225
226
|
this.filter = false;
|
|
@@ -417,7 +418,7 @@ const TdsDropdown = class {
|
|
|
417
418
|
render() {
|
|
418
419
|
var _a, _b, _c, _d;
|
|
419
420
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
420
|
-
return (h(Host, { key: '
|
|
421
|
+
return (h(Host, { key: '1aaaed6d1da4e1303baacc3681ea25b1c03d25a6', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'fd55bd167dbbddd2bceac0d6f4cb90bfc971e0ff', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'df149c04f0aee442ca2fed5fb608188b71d632d3', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
421
422
|
filter: true,
|
|
422
423
|
focus: this.filterFocus,
|
|
423
424
|
disabled: this.disabled,
|
|
@@ -434,7 +435,15 @@ const TdsDropdown = class {
|
|
|
434
435
|
this.inputElement.value = this.getValue();
|
|
435
436
|
}
|
|
436
437
|
this.handleBlur(event);
|
|
437
|
-
}, onFocus: (event) =>
|
|
438
|
+
}, onFocus: (event) => {
|
|
439
|
+
this.open = true;
|
|
440
|
+
this.filterFocus = true;
|
|
441
|
+
if (this.multiselect) {
|
|
442
|
+
this.inputElement.value = '';
|
|
443
|
+
}
|
|
444
|
+
this.handleFocus(event);
|
|
445
|
+
this.handleFilter({ target: { value: '' } });
|
|
446
|
+
}, onKeyDown: (event) => {
|
|
438
447
|
if (event.key === 'Escape') {
|
|
439
448
|
this.open = false;
|
|
440
449
|
}
|
|
@@ -459,11 +468,16 @@ const TdsDropdown = class {
|
|
|
459
468
|
label-inside-as-placeholder
|
|
460
469
|
${this.size}
|
|
461
470
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
462
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
471
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'de4472ee9c9dccfe2678da20ab7131bb12d264a8', ref: (element) => (this.dropdownList = element), class: {
|
|
472
|
+
'dropdown-list': true,
|
|
473
|
+
[this.size]: true,
|
|
474
|
+
[this.getOpenDirection()]: true,
|
|
475
|
+
'label-outside': this.label && this.labelPosition === 'outside',
|
|
476
|
+
'open': this.open,
|
|
477
|
+
'closed': !this.open,
|
|
478
|
+
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
479
|
+
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
480
|
+
} }, h("slot", { key: 'fa587fd8b54e3235cb5977aecddd00a4253d1df1', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '5a79c2185c6144fef7b1bb53f10b9b761e19c769', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '6a57ad1b661309c9613fb78022d49efc4d5e0077', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: 'c993272ef793c9b1ee0d7f729fc81cb91bce05df', name: "error", size: "16px" }), this.helper))));
|
|
467
481
|
}
|
|
468
482
|
get host() { return getElement(this); }
|
|
469
483
|
static get watchers() { return {
|
|
@@ -472,7 +486,7 @@ const TdsDropdown = class {
|
|
|
472
486
|
};
|
|
473
487
|
TdsDropdown.style = TdsDropdownStyle0;
|
|
474
488
|
|
|
475
|
-
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}: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}";
|
|
489
|
+
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}";
|
|
476
490
|
const TdsDropdownOptionStyle0 = dropdownOptionCss;
|
|
477
491
|
|
|
478
492
|
const TdsDropdownOption = class {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-51d04e39.js';
|
|
2
2
|
|
|
3
|
-
const headerDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:var(--tds-header-list-item-md-height);width:100%}:host .component{height:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border:none;display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-nav-dropdown-item-background);color:var(--tds-header-nav-item-dropdown-opened-color)}:host .component ::slotted(a:hover){background-color:var(--tds-nav-item-background-hover);cursor:pointer}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .component-selected{background-color:var(--tds-nav-item-background-selected);padding-right:4px;border-left-width:4px;border-left-style:solid;border-left-color:var(--tds-nav-item-border-color-active)}:host .component-selected ::slotted(a),:host .component-selected ::slotted(button){background-color:var(--tds-nav-item-background-selected)}:host(:not(:last-child)){border-bottom:1px solid var(--tds-nav-dropdown-item-border-color)}:host([size=lg]){height:var(--tds-header-height)}:host([size=lg]) ::slotted(a),:host([size=lg]) ::slotted(button){padding:0 16px;color:var(--tds-header-app-launcher-item-color)}";
|
|
3
|
+
const headerDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:var(--tds-header-list-item-md-height);width:100%}:host .component{height:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border:none;display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-nav-dropdown-item-background);color:var(--tds-header-nav-item-dropdown-opened-color)}:host .component ::slotted(a) tds-icon,:host .component ::slotted(a) div,:host .component ::slotted(button) tds-icon,:host .component ::slotted(button) div{pointer-events:none !important}:host .component ::slotted(a:hover){background-color:var(--tds-nav-item-background-hover);cursor:pointer}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .component-selected{background-color:var(--tds-nav-item-background-selected);padding-right:4px;border-left-width:4px;border-left-style:solid;border-left-color:var(--tds-nav-item-border-color-active)}:host .component-selected ::slotted(a),:host .component-selected ::slotted(button){background-color:var(--tds-nav-item-background-selected)}:host(:not(:last-child)){border-bottom:1px solid var(--tds-nav-dropdown-item-border-color)}:host([size=lg]){height:var(--tds-header-height)}:host([size=lg]) ::slotted(a),:host([size=lg]) ::slotted(button){padding:0 16px;color:var(--tds-header-app-launcher-item-color)}";
|
|
4
4
|
const TdsHeaderDropdownListItemStyle0 = headerDropdownListItemCss;
|
|
5
5
|
|
|
6
6
|
const TdsHeaderDropdownListItem = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
|
-
this.closeDropdownFromListItem = createEvent(this, "closeDropdownFromListItem", 7);
|
|
10
9
|
this.selected = false;
|
|
11
10
|
this.size = 'md';
|
|
12
11
|
}
|
|
13
12
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'e884013f09151c5ba323ac69c34c88e8aba9d132' }, h("div", { key: 'e4babaebaac5f661b2ef365a120e9953d6535c73', class: {
|
|
15
14
|
'component': true,
|
|
16
15
|
'component-selected': this.selected,
|
|
17
|
-
}
|
|
16
|
+
} }, h("slot", { key: 'b58b6c84093c4edd303ee3ed202703f316cfcaa2' }))));
|
|
18
17
|
}
|
|
19
18
|
get host() { return getElement(this); }
|
|
20
19
|
};
|
|
@@ -8,6 +8,12 @@ const TdsHeaderDropdown = class {
|
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
10
|
this.uuid = generateUniqueId();
|
|
11
|
+
this.handleSlottedItemClick = (event) => {
|
|
12
|
+
const eventSource = event.target.tagName.toLowerCase();
|
|
13
|
+
if (['a', 'button'].includes(eventSource)) {
|
|
14
|
+
this.open = false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
11
17
|
this.label = undefined;
|
|
12
18
|
this.noDropdownIcon = false;
|
|
13
19
|
this.selected = false;
|
|
@@ -24,24 +30,21 @@ const TdsHeaderDropdown = class {
|
|
|
24
30
|
toggleDropdown() {
|
|
25
31
|
this.open = !this.open;
|
|
26
32
|
}
|
|
27
|
-
handleCloseDropdownFromListItem() {
|
|
28
|
-
this.open = false;
|
|
29
|
-
}
|
|
30
33
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '73a8e824b891f66806fad583470460a30af641de' }, h("div", { key: '81e78a9f21b152ae4698ec6f693ead79eb40f936', class: {
|
|
32
35
|
'state-open': this.open,
|
|
33
|
-
} }, h("tds-header-item", { key: '
|
|
36
|
+
} }, h("tds-header-item", { key: 'aab78709417d1fd623c9a9969246434d78bcc055', class: "button", active: this.open, selected: this.selected }, h("button", { key: 'dff4234a39520177ba3cc058511144431facb944', ref: (el) => {
|
|
34
37
|
this.buttonEl = el;
|
|
35
38
|
}, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
|
|
36
39
|
this.toggleDropdown();
|
|
37
|
-
} }, h("slot", { key: '
|
|
40
|
+
} }, h("slot", { key: 'ec32e95833f0bc4a93a18c0058c7bea979cde638', name: "icon" }), this.label, h("slot", { key: 'ab077d925ecbc941446bb9f1f6755dccae26e0ae', name: "label" }), !this.noDropdownIcon && (h("tds-icon", { key: 'eb45d913a11433c12e5add804c88fd7c33e343ea', class: "dropdown-icon", name: "chevron_down", size: "16px" })))), this.buttonEl && (h("tds-popover-canvas", { key: 'bc15799eeb488984d58abe21cfc27ba695a395a0', id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
38
41
|
{
|
|
39
42
|
name: 'flip',
|
|
40
43
|
options: {
|
|
41
44
|
fallbackPlacements: [],
|
|
42
45
|
},
|
|
43
46
|
},
|
|
44
|
-
] }, this.open ? h("slot", null) : null)))));
|
|
47
|
+
] }, this.open ? (h("span", { onClick: (e) => this.handleSlottedItemClick(e), onKeyDown: (e) => e.key === 'Enter' && this.handleSlottedItemClick(e) }, h("slot", null))) : null)))));
|
|
45
48
|
}
|
|
46
49
|
get host() { return getElement(this); }
|
|
47
50
|
};
|
|
@@ -14,6 +14,7 @@ const TdsPopoverCanvas = class {
|
|
|
14
14
|
this.show = null;
|
|
15
15
|
this.placement = 'auto';
|
|
16
16
|
this.offsetSkidding = 0;
|
|
17
|
+
this.animation = 'none';
|
|
17
18
|
this.offsetDistance = 8;
|
|
18
19
|
this.modifiers = [];
|
|
19
20
|
this.childRef = undefined;
|
|
@@ -28,12 +29,12 @@ const TdsPopoverCanvas = class {
|
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
31
|
var _a;
|
|
31
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '13a6fe4800b9efc612ec21d20da5b2c2c9cdc2ce' }, h("tds-popover-core", Object.assign({ key: 'e3912733d09d6b7e5aa8bc2f5f6e87d828a2b07b' }, this.inheritedAttributes, { class: {
|
|
32
33
|
'tds-popover-canvas': true,
|
|
33
34
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
34
35
|
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, modifiers: this.modifiers, trigger: 'click', ref: (el) => {
|
|
35
36
|
this.childRef = el;
|
|
36
|
-
}, defaultShow: this.defaultShow }), h("div", { key: '
|
|
37
|
+
}, defaultShow: this.defaultShow, animation: this.animation }), h("div", { key: '69bfa1b736a60777b578de6a0d4c4959c0a21781' }, h("slot", { key: '01776b37392ff7f23d35ff10fa647214d6567d1d' })))));
|
|
37
38
|
}
|
|
38
39
|
get host() { return getElement(this); }
|
|
39
40
|
};
|