@scania/tegel 1.38.0-handleValueChange-correct-logic-beta.0 → 1.38.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/index-ca8040ad.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +21 -49
- package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +6 -4
- 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-slider.cjs.entry.js +10 -39
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +3 -13
- package/dist/collection/components/dropdown/dropdown.js +18 -48
- package/dist/collection/components/header/header-item/header-item.css +3 -3
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +6 -4
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +6 -84
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +6 -82
- package/dist/collection/components/slider/slider.css +28 -24
- package/dist/collection/components/slider/slider.js +9 -38
- package/dist/components/{p-072bf53a.js → p-63437b77.js} +1 -1
- package/dist/components/{p-ad6babcd.js → p-6adb1ce3.js} +1 -1
- package/dist/components/{p-9a47d831.js → p-94bfc9f4.js} +19 -37
- package/dist/components/{p-c4318e35.js → p-d64878cb.js} +3 -13
- package/dist/components/{p-92c2da85.js → p-ea381f94.js} +1 -1
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-header-brand-symbol.js +1 -1
- package/dist/components/tds-header-dropdown.js +1 -1
- 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.js +2 -2
- package/dist/components/tds-side-menu-collapse-button.js +7 -5
- 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-slider.js +12 -59
- package/dist/components/tds-table-footer.js +2 -2
- package/dist/components/tds-text-field.js +185 -1
- package/dist/esm/index-51d04e39.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +21 -49
- package/dist/esm/tds-side-menu-collapse-button.entry.js +6 -4
- 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-slider.entry.js +10 -39
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-06d3490c.entry.js +1 -0
- package/dist/tegel/p-397c8969.entry.js +1 -0
- package/dist/tegel/p-5c077bb9.entry.js +1 -0
- package/dist/tegel/p-61a1dc59.entry.js +1 -0
- package/dist/tegel/p-a0591e58.entry.js +1 -0
- package/dist/tegel/p-ae438c2e.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 +0 -3
- package/dist/types/components/slider/slider.d.ts +0 -2
- package/package.json +1 -1
- package/dist/components/p-a0c21704.js +0 -187
- package/dist/tegel/p-2c9ea0be.entry.js +0 -1
- package/dist/tegel/p-2f9b15f6.entry.js +0 -1
- package/dist/tegel/p-336f2de3.entry.js +0 -1
- package/dist/tegel/p-7368906f.entry.js +0 -1
- package/dist/tegel/p-c465f9b8.entry.js +0 -1
- package/dist/tegel/p-c4f701f6.entry.js +0 -1
|
@@ -27,6 +27,12 @@ tds-slider .sr-only {
|
|
|
27
27
|
pointer-events: none;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.tds-slider-wrapper:focus-within {
|
|
31
|
+
outline: 2px solid var(--tds-blue-400);
|
|
32
|
+
outline-offset: 2px;
|
|
33
|
+
border-radius: var(--tds-spacing-element-4);
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
.tds-slider {
|
|
31
37
|
width: 100%;
|
|
32
38
|
display: flex;
|
|
@@ -38,12 +44,6 @@ tds-slider .sr-only {
|
|
|
38
44
|
height: 20px;
|
|
39
45
|
position: relative;
|
|
40
46
|
}
|
|
41
|
-
.tds-slider .tds-slider-inner:focus-within .tds-slider__thumb-inner {
|
|
42
|
-
outline: var(--tds-slider-thumb-focus-outline);
|
|
43
|
-
box-shadow: var(--tds-slider-thumb-focus-box-shadow);
|
|
44
|
-
outline-offset: var(--tds-slider-thumb-focus-outline-offset);
|
|
45
|
-
z-index: 1;
|
|
46
|
-
}
|
|
47
47
|
.tds-slider .tds-slider__controls {
|
|
48
48
|
position: relative;
|
|
49
49
|
top: -25px;
|
|
@@ -81,22 +81,29 @@ tds-slider .sr-only {
|
|
|
81
81
|
justify-content: center;
|
|
82
82
|
border-radius: 4px 4px 0 0;
|
|
83
83
|
}
|
|
84
|
-
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field {
|
|
85
|
+
font: var(--tds-detail-02);
|
|
86
|
+
letter-spacing: var(--tds-detail-02-ls);
|
|
87
|
+
color: var(--tds-slider-inputfield-number-color);
|
|
88
|
+
border: 0;
|
|
89
|
+
background-color: transparent;
|
|
87
90
|
text-align: center;
|
|
91
|
+
padding: 12px;
|
|
92
|
+
box-shadow: inset 0 -1px 0 var(--tds-slider-inputfield-box-shadow);
|
|
93
|
+
border-radius: 4px 4px 0 0;
|
|
88
94
|
appearance: textfield;
|
|
89
95
|
}
|
|
90
|
-
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-
|
|
91
|
-
|
|
92
|
-
appearance: none;
|
|
93
|
-
margin: 0;
|
|
96
|
+
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field:hover {
|
|
97
|
+
box-shadow: inset 0 -1px 0 var(--tds-grey-600);
|
|
94
98
|
}
|
|
95
|
-
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-
|
|
96
|
-
|
|
99
|
+
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field:focus {
|
|
100
|
+
box-shadow: inset 0 -2px 0 var(--tds-blue-400);
|
|
101
|
+
outline: 0;
|
|
97
102
|
}
|
|
98
|
-
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-
|
|
99
|
-
|
|
103
|
+
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field::-webkit-outer-spin-button,
|
|
104
|
+
.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field::-webkit-inner-spin-button {
|
|
105
|
+
appearance: none;
|
|
106
|
+
margin: 0;
|
|
100
107
|
}
|
|
101
108
|
.tds-slider label {
|
|
102
109
|
font: var(--tds-detail-05);
|
|
@@ -115,7 +122,7 @@ tds-slider .sr-only {
|
|
|
115
122
|
letter-spacing: var(--tds-detail-01-ls);
|
|
116
123
|
user-select: none;
|
|
117
124
|
border-radius: 4px;
|
|
118
|
-
padding: 8px
|
|
125
|
+
padding: 8px;
|
|
119
126
|
position: absolute;
|
|
120
127
|
transform: translate(-50%, -100%);
|
|
121
128
|
top: -24px;
|
|
@@ -132,9 +139,6 @@ tds-slider .sr-only {
|
|
|
132
139
|
.tds-slider .tds-slider__thumb {
|
|
133
140
|
position: absolute;
|
|
134
141
|
}
|
|
135
|
-
.tds-slider .tds-slider__thumb:hover .tds-slider__value {
|
|
136
|
-
display: block;
|
|
137
|
-
}
|
|
138
142
|
.tds-slider .tds-slider__thumb .tds-slider__thumb-inner {
|
|
139
143
|
width: 20px;
|
|
140
144
|
height: 20px;
|
|
@@ -160,7 +164,7 @@ tds-slider .sr-only {
|
|
|
160
164
|
}
|
|
161
165
|
.tds-slider .tds-slider__thumb .tds-slider__thumb-inner:hover::before {
|
|
162
166
|
display: block;
|
|
163
|
-
|
|
167
|
+
opacity: 0.08;
|
|
164
168
|
}
|
|
165
169
|
.tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed {
|
|
166
170
|
width: 24px;
|
|
@@ -168,7 +172,7 @@ tds-slider .sr-only {
|
|
|
168
172
|
}
|
|
169
173
|
.tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed::before {
|
|
170
174
|
display: block;
|
|
171
|
-
|
|
175
|
+
opacity: 0.16 !important;
|
|
172
176
|
}
|
|
173
177
|
.tds-slider .tds-slider__value-dividers-wrapper {
|
|
174
178
|
position: relative;
|
|
@@ -303,7 +307,7 @@ tds-slider .sr-only {
|
|
|
303
307
|
}
|
|
304
308
|
|
|
305
309
|
.tds-slider .tds-slider__controls .tds-slider__control {
|
|
306
|
-
cursor:
|
|
310
|
+
cursor: default;
|
|
307
311
|
}
|
|
308
312
|
.tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-minus tds-icon, .tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-plus tds-icon {
|
|
309
313
|
color: var(--tds-slider-controls-color);
|
|
@@ -267,25 +267,6 @@ export class TdsSlider {
|
|
|
267
267
|
const rounded = this.roundToStep(newValue);
|
|
268
268
|
this.forceValueUpdate(rounded.toString());
|
|
269
269
|
}
|
|
270
|
-
/** Updates the slider value when using tds-text-field (reads value from host element) */
|
|
271
|
-
updateSliderValueFromTextField(event) {
|
|
272
|
-
const hostEl = event.target; // tds-text-field host element exposes a value prop
|
|
273
|
-
const raw = hostEl && typeof hostEl.value !== 'undefined' ? hostEl.value : '';
|
|
274
|
-
let newValue = parseFloat(raw);
|
|
275
|
-
if (Number.isNaN(newValue)) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const minNum = parseFloat(this.min);
|
|
279
|
-
const maxNum = parseFloat(this.max);
|
|
280
|
-
if (newValue < minNum) {
|
|
281
|
-
newValue = minNum;
|
|
282
|
-
}
|
|
283
|
-
else if (newValue > maxNum) {
|
|
284
|
-
newValue = maxNum;
|
|
285
|
-
}
|
|
286
|
-
const rounded = this.roundToStep(newValue);
|
|
287
|
-
this.forceValueUpdate(rounded.toString());
|
|
288
|
-
}
|
|
289
270
|
/** Updates the slider value based on the current input value when enter is pressed */
|
|
290
271
|
handleInputFieldEnterPress(event) {
|
|
291
272
|
event.stopPropagation();
|
|
@@ -306,16 +287,7 @@ export class TdsSlider {
|
|
|
306
287
|
}
|
|
307
288
|
}
|
|
308
289
|
calculateInputSizeFromMax() {
|
|
309
|
-
|
|
310
|
-
if (input) {
|
|
311
|
-
if (this.readOnly) {
|
|
312
|
-
// explicit size to fit suffix icon
|
|
313
|
-
input.style.width = `${52 + this.max.length * 8}px`;
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
input.setAttribute('size', `${this.max.length}`);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
290
|
+
return this.max.length;
|
|
319
291
|
}
|
|
320
292
|
controlsStep(delta, event) {
|
|
321
293
|
if (this.readOnly || this.disabled) {
|
|
@@ -386,7 +358,6 @@ export class TdsSlider {
|
|
|
386
358
|
}
|
|
387
359
|
}
|
|
388
360
|
componentDidLoad() {
|
|
389
|
-
this.calculateInputSizeFromMax();
|
|
390
361
|
if (!this.resizeObserverAdded) {
|
|
391
362
|
this.resizeObserverAdded = true;
|
|
392
363
|
const resizeObserver = new ResizeObserver(() => {
|
|
@@ -430,30 +401,30 @@ export class TdsSlider {
|
|
|
430
401
|
}
|
|
431
402
|
render() {
|
|
432
403
|
const ariaLabel = this.readOnly ? this.tdsReadOnlyAriaLabel : this.label || this.tdsAriaLabel;
|
|
433
|
-
return (h("div", { key: '
|
|
404
|
+
return (h("div", { key: 'b4dd7706df0be052f0028a5f8ba6b6158f403b13', class: {
|
|
434
405
|
'tds-slider-wrapper': true,
|
|
435
406
|
'read-only': this.readOnly,
|
|
436
|
-
} }, h("input", { key: '
|
|
407
|
+
} }, h("input", { key: '672c2aaa6dfee6489cd5e764ef151728c2af10fc', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled }), h("div", { key: '8c7200436a9ef6524a3b2d554a2556bda8cc6afd', class: "sr-only", "aria-live": "assertive", ref: (el) => {
|
|
437
408
|
this.ariaLiveElement = el;
|
|
438
|
-
} }), h("div", { key: '
|
|
409
|
+
} }), h("div", { key: '1ce8e7ddccd19ca15733683768900c8fcde514d3', class: {
|
|
439
410
|
'tds-slider': true,
|
|
440
411
|
'disabled': this.disabled,
|
|
441
412
|
'tds-slider-small': this.useSmall,
|
|
442
413
|
}, ref: (el) => {
|
|
443
414
|
this.wrapperElement = el;
|
|
444
|
-
}, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '
|
|
415
|
+
}, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '54616f1cb5e4c13541f6f5fa700ddf4b1c4a9493', id: `${this.sliderId}-label`, class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'f6b8283409e9fb74ebf5fe89af5d88c29fde904d', class: "tds-slider__input-values" }, h("div", { key: '30532947c70dc8e0612fea3c01c25a5e86dacfca', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '6c001b8caba4a396bb9f4f4f3ba7b9ee6ca36f84', class: "tds-slider__controls" }, h("div", { key: '7a5804b789f84a4cd749c21d0ecc4b73bf7bae09', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event), role: "button", "aria-label": "Decrease value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '41db4dc1a8fda4972303fd48400078035648ca5c', name: "minus", size: "16px" })))), h("div", { key: 'f3cb2039ec4245b1d5c58bb819675381c4490197', class: "tds-slider-inner", tabIndex: -1 }, this.tickValues.length > 0 && (h("div", { key: '38bf8ca015894f3a42a0e9e33800cc7f0ff9c8d5', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: '6a5aaa5d652d55f23db24b1b531664d125fc2a23', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '0c99475a8bdb1fdec04358421ec34630111a63b8', class: "tds-slider__track", ref: (el) => {
|
|
445
416
|
this.trackElement = el;
|
|
446
417
|
}, tabindex: this.disabled ? '-1' : '0', role: "presentation", onFocus: () => {
|
|
447
418
|
if (this.thumbElement) {
|
|
448
419
|
this.thumbElement.focus();
|
|
449
420
|
}
|
|
450
|
-
} }, h("div", { key: '
|
|
421
|
+
} }, h("div", { key: 'd3ece50db5fbc17e4ebbf4272faa17fcf201dccf', class: "tds-slider__track-fill", ref: (el) => {
|
|
451
422
|
this.trackFillElement = el;
|
|
452
|
-
} }), h("div", { key: '
|
|
423
|
+
} }), h("div", { key: 'c304176e6a240820418d80aa8bfad35fbbdaf0f4', class: "tds-slider__thumb", ref: (el) => {
|
|
453
424
|
this.thumbElement = el;
|
|
454
|
-
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: '
|
|
425
|
+
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: '7c46c4f8b3cc3bf3aeae7c841a2f38e7b3d1dfbb', class: "tds-slider__value" }, this.value, h("svg", { key: '871a05a8fc1560c8e94071172c57563d63e10f22', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0c99295a2049b3aac5d0472880e63acc4318fa07', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: 'bf42f5b512d3041a88bd8cc420a5a4aaeb875e49', class: "tds-slider__thumb-inner", ref: (el) => {
|
|
455
426
|
this.thumbInnerElement = el;
|
|
456
|
-
} })))), this.useInput && (h("div", { key: '
|
|
427
|
+
} })))), this.useInput && (h("div", { key: '9a1ed941f13b84e738500921b12aeb21ace2464c', class: "tds-slider__input-values" }, h("div", { key: '2bdf5b0fb2687075b2fc12ce931859d2f26a0685', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '480825ddccd550527ac18f046c6a8ce26baaba87', class: "tds-slider__input-field-wrapper" }, h("input", { key: '94a1446990ea0ae3955e8db9f0119e4a0ec71970', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, "aria-label": this.readOnly ? this.tdsReadOnlyAriaLabel : undefined, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max, step: this.step })))), this.useControls && (h("div", { key: 'b7415e621df023ffe0eca844d9970454d01c72ce', class: "tds-slider__controls" }, h("div", { key: '044a984a7212d56f8c1bcb5709608d90677d7647', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event), role: "button", "aria-label": "Increase value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '0b6410f7fb4af32681c3f49f29c9696e871bfd5a', name: "plus", size: "16px" })))))));
|
|
457
428
|
}
|
|
458
429
|
static get is() { return "tds-slider"; }
|
|
459
430
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
|
|
4
|
-
import { d as defineCustomElement$2 } from './p-
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './p-b390ece5.js';
|
|
6
6
|
|
|
7
7
|
const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
|
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
|
2
2
|
import { d as dfs } from './p-52bf0fdf.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './p-9ad61cb5.js';
|
|
4
4
|
|
|
5
|
-
const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){
|
|
5
|
+
const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
|
|
6
6
|
const TdsHeaderItemStyle0 = headerItemCss;
|
|
7
7
|
|
|
8
8
|
const TdsHeaderItem = /*@__PURE__*/ proxyCustomElement(class TdsHeaderItem extends H {
|
|
@@ -67,7 +67,7 @@ const TdsDropdownStyle0 = dropdownCss;
|
|
|
67
67
|
function hasValueChanged(newValue, currentValue) {
|
|
68
68
|
if (newValue.length !== currentValue.length)
|
|
69
69
|
return true;
|
|
70
|
-
return newValue.some((val
|
|
70
|
+
return newValue.some((val) => !currentValue.includes(val));
|
|
71
71
|
}
|
|
72
72
|
const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H {
|
|
73
73
|
constructor() {
|
|
@@ -78,7 +78,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
78
78
|
this.tdsFocus = createEvent(this, "tdsFocus", 6);
|
|
79
79
|
this.tdsBlur = createEvent(this, "tdsBlur", 6);
|
|
80
80
|
this.tdsInput = createEvent(this, "tdsInput", 6);
|
|
81
|
-
this.hasFocus = false;
|
|
82
81
|
this.setDefaultOption = () => {
|
|
83
82
|
if (this.internalDefaultValue) {
|
|
84
83
|
// Convert the internal default value to an array if it's not already
|
|
@@ -193,23 +192,19 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
193
192
|
// Add this line to ensure internal value is cleared
|
|
194
193
|
this.internalValue = '';
|
|
195
194
|
};
|
|
196
|
-
this.handleFocus = () => {
|
|
195
|
+
this.handleFocus = (event) => {
|
|
197
196
|
this.open = true;
|
|
198
197
|
this.filterFocus = true;
|
|
199
198
|
if (this.multiselect && this.inputElement) {
|
|
200
199
|
this.inputElement.value = '';
|
|
201
200
|
}
|
|
202
|
-
|
|
201
|
+
this.tdsFocus.emit(event);
|
|
203
202
|
if (this.filter) {
|
|
204
203
|
this.handleFilter({ target: { value: '' } });
|
|
205
204
|
}
|
|
206
205
|
};
|
|
207
|
-
this.handleBlur = () => {
|
|
208
|
-
|
|
209
|
-
this.filterFocus = false;
|
|
210
|
-
if (this.multiselect && this.inputElement) {
|
|
211
|
-
this.inputElement.value = this.getValue();
|
|
212
|
-
}
|
|
206
|
+
this.handleBlur = (event) => {
|
|
207
|
+
this.tdsBlur.emit(event);
|
|
213
208
|
};
|
|
214
209
|
this.resetInput = () => {
|
|
215
210
|
const inputEl = this.host.querySelector('input');
|
|
@@ -384,7 +379,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
384
379
|
}
|
|
385
380
|
}
|
|
386
381
|
// Always trigger the focus event to open the dropdown
|
|
387
|
-
this.handleFocus();
|
|
382
|
+
this.handleFocus({});
|
|
388
383
|
}
|
|
389
384
|
/** Method for closing the Dropdown. */
|
|
390
385
|
async close() {
|
|
@@ -406,25 +401,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
406
401
|
}
|
|
407
402
|
}
|
|
408
403
|
}
|
|
409
|
-
onFocusIn(event) {
|
|
410
|
-
// Check if the focus is within this dropdown component
|
|
411
|
-
if (this.host.contains(event.target)) {
|
|
412
|
-
if (!this.hasFocus) {
|
|
413
|
-
this.hasFocus = true;
|
|
414
|
-
this.tdsFocus.emit(event);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
onFocusOut(event) {
|
|
419
|
-
// Only emit blur if focus is actually leaving the entire dropdown component
|
|
420
|
-
const relatedTarget = event.relatedTarget;
|
|
421
|
-
// If relatedTarget is null (focus going to body/window) or outside the component, emit blur
|
|
422
|
-
if (this.hasFocus && (!relatedTarget || !this.host.contains(relatedTarget))) {
|
|
423
|
-
this.hasFocus = false;
|
|
424
|
-
this.handleBlur();
|
|
425
|
-
this.tdsBlur.emit(event);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
404
|
async onKeyDown(event) {
|
|
429
405
|
var _a;
|
|
430
406
|
// Get the active element
|
|
@@ -544,9 +520,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
544
520
|
// Generate unique IDs for associating labels and helpers with the input/button
|
|
545
521
|
const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
|
|
546
522
|
const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
|
|
547
|
-
return (h(Host, { key: '
|
|
523
|
+
return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
|
|
548
524
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
549
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
525
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
|
|
550
526
|
'dropdown-select': true,
|
|
551
527
|
[this.size]: true,
|
|
552
528
|
'disabled': this.disabled,
|
|
@@ -563,7 +539,13 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
563
539
|
// eslint-disable-next-line no-return-assign
|
|
564
540
|
ref: (inputEl) => (this.inputElement = inputEl), class: {
|
|
565
541
|
placeholder: this.labelPosition === 'inside',
|
|
566
|
-
}, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? '' : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event),
|
|
542
|
+
}, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? '' : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
|
|
543
|
+
this.filterFocus = false;
|
|
544
|
+
if (this.multiselect) {
|
|
545
|
+
this.inputElement.value = this.getValue();
|
|
546
|
+
}
|
|
547
|
+
this.handleBlur(event);
|
|
548
|
+
}, onFocus: (event) => this.handleFocus(event), onKeyDown: (event) => {
|
|
567
549
|
if (event.key === 'Escape') {
|
|
568
550
|
this.open = false;
|
|
569
551
|
}
|
|
@@ -590,7 +572,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
590
572
|
label-inside-as-placeholder
|
|
591
573
|
${this.size}
|
|
592
574
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
593
|
-
` }, 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: '
|
|
575
|
+
` }, 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: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
594
576
|
this.dropdownList = element;
|
|
595
577
|
}, class: {
|
|
596
578
|
'dropdown-list': true,
|
|
@@ -601,11 +583,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
601
583
|
'closed': !this.open,
|
|
602
584
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
603
585
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
604
|
-
} }, h("slot", { key: '
|
|
586
|
+
} }, h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
|
|
605
587
|
helper: true,
|
|
606
588
|
error: this.error,
|
|
607
589
|
disabled: this.disabled,
|
|
608
|
-
} }, this.error && h("tds-icon", { key: '
|
|
590
|
+
} }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
|
|
609
591
|
}
|
|
610
592
|
get host() { return this; }
|
|
611
593
|
static get watchers() { return {
|
|
@@ -646,7 +628,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
646
628
|
"close": [64],
|
|
647
629
|
"updateDisplay": [64],
|
|
648
630
|
"appendValue": [64]
|
|
649
|
-
}, [[9, "mousedown", "onAnyClick"], [0, "
|
|
631
|
+
}, [[9, "mousedown", "onAnyClick"], [0, "keydown", "onKeyDown"]], {
|
|
650
632
|
"value": ["handleValueChange"],
|
|
651
633
|
"open": ["handleOpenState"],
|
|
652
634
|
"defaultValue": ["handleDefaultValueChange"]
|
|
@@ -66,18 +66,10 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
this.handleFocus = (event) => {
|
|
69
|
-
|
|
70
|
-
// Only emit if this is a standalone option (not within a dropdown)
|
|
71
|
-
if (!this.parentElement) {
|
|
72
|
-
this.tdsFocus.emit(event);
|
|
73
|
-
}
|
|
69
|
+
this.tdsFocus.emit(event);
|
|
74
70
|
};
|
|
75
71
|
this.handleBlur = (event) => {
|
|
76
|
-
|
|
77
|
-
// Only emit if this is a standalone option (not within a dropdown)
|
|
78
|
-
if (!this.parentElement) {
|
|
79
|
-
this.tdsBlur.emit(event);
|
|
80
|
-
}
|
|
72
|
+
this.tdsBlur.emit(event);
|
|
81
73
|
};
|
|
82
74
|
this.value = undefined;
|
|
83
75
|
this.internalValue = undefined;
|
|
@@ -98,7 +90,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
|
|
|
98
90
|
this.internalValue = convertToString(this.value);
|
|
99
91
|
}
|
|
100
92
|
render() {
|
|
101
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
|
|
102
94
|
${this.size}
|
|
103
95
|
${this.selected ? 'selected' : ''}
|
|
104
96
|
${this.disabled ? 'disabled' : ''}
|
|
@@ -108,8 +100,6 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
|
|
|
108
100
|
}
|
|
109
101
|
} }, h("tds-checkbox", { onTdsChange: (event) => {
|
|
110
102
|
this.handleMultiselect(event);
|
|
111
|
-
}, onTdsBlur: (event) => {
|
|
112
|
-
event.stopPropagation();
|
|
113
103
|
}, disabled: this.disabled, checked: this.selected, tdsAriaLabel: this.tdsAriaLabel, class: {
|
|
114
104
|
[this.size]: true,
|
|
115
105
|
} }, h("div", { slot: "label" }, h("slot", null))))) : (h("button", { role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected, "aria-label": this.tdsAriaLabel, onClick: () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as dfs } from './p-52bf0fdf.js';
|
|
3
3
|
|
|
4
|
-
const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:
|
|
4
|
+
const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component:hover ::slotted(a),:host .component:hover ::slotted(button){background-color:var(--tds-sidebar-item-state-hover)}:host .component:active ::slotted(a),:host .component:active ::slotted(button){background-color:var(--tds-sidemenu-item-state-active)}:host .component-collapsed ::slotted(a),:host .component-collapsed ::slotted(button){padding:0;display:flex;justify-content:center;align-items:center;position:relative}:host .component-selected:not(:host .component-active) ::slotted(a),:host .component-selected:not(:host .component-active) ::slotted(button),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user){position:relative;background-color:var(--tds-sidebar-item-state-selected)}:host .component-selected:not(:host .component-active) ::slotted(a)::before,:host .component-selected:not(:host .component-active) ::slotted(button)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}@media (min-width: 992px){:host .component.component-collapsed ::slotted(a),:host .component.component-collapsed ::slotted(button){color:rgba(90, 90, 90, 0);overflow:hidden}}";
|
|
5
5
|
const TdsSideMenuItemStyle0 = sideMenuItemCss;
|
|
6
6
|
|
|
7
7
|
const TdsSideMenuItem = /*@__PURE__*/ proxyCustomElement(class TdsSideMenuItem extends H {
|
|
@@ -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-d64878cb.js';
|
|
2
2
|
|
|
3
3
|
const TdsDropdownOption = TdsDropdownOption$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
|
|
4
4
|
|
|
5
5
|
const headerBrandSymbolCss = ":host tds-header-item{display:none}:host tds-header-item ::slotted(*){background-image:var(--tds-background-image-scania-symbol-svg-local), var(--tds-background-image-scania-symbol-svg);background-size:30px auto;background-position:center;background-repeat:no-repeat}@media (min-width: 992px){:host tds-header-item{display:block}}";
|
|
6
6
|
const TdsHeaderBrandSymbolStyle0 = headerBrandSymbolCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { g as generateUniqueId } from './p-11648030.js';
|
|
3
3
|
import { d as defineCustomElement$6 } from './p-9ad61cb5.js';
|
|
4
|
-
import { d as defineCustomElement$5 } from './p-
|
|
4
|
+
import { d as defineCustomElement$5 } from './p-6adb1ce3.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-b390ece5.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-df84759a.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-d3866be7.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './p-9ad61cb5.js';
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-6adb1ce3.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-b390ece5.js';
|
|
6
6
|
|
|
7
7
|
const headerHamburgerCss = ":host{color:var(--tds-white)}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:background 0.2s ease-in-out, color 0.2s ease-in-out}@media screen and (min-width: 992px){:host tds-header-item{display:none}:host([persistent]) tds-header-item{display:block}}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-63437b77.js';
|
|
2
2
|
|
|
3
3
|
const TdsHeaderLauncherButton = TdsHeaderLauncherButton$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -2,8 +2,8 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
|
2
2
|
import { g as generateUniqueId } from './p-11648030.js';
|
|
3
3
|
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-9ad61cb5.js';
|
|
5
|
-
import { d as defineCustomElement$6 } from './p-
|
|
6
|
-
import { d as defineCustomElement$5 } from './p-
|
|
5
|
+
import { d as defineCustomElement$6 } from './p-6adb1ce3.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './p-63437b77.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-b390ece5.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-df84759a.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-d3866be7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-ea381f94.js';
|
|
3
3
|
|
|
4
4
|
const sideMenuCollapseButtonCss = ":host{position:sticky;bottom:0;display:none;height:68px;border-top:1px solid var(--tds-sidebar-side-menu-bottom-menu-border-top)}:host .icon{transform:rotateZ(90deg);transition:all 0.2s ease-in-out;width:20px;height:20px}:host .state-collapsed .icon{transform:translateX(-50%) rotateZ(90deg) rotateX(180deg);color:var(--tds-sidebar-side-menu-single-item-color);margin-left:0;position:absolute;left:50%}@media (min-width: 992px){:host{display:block}}";
|
|
5
5
|
const TdsSideMenuCollapseButtonStyle0 = sideMenuCollapseButtonCss;
|
|
@@ -35,12 +35,14 @@ const TdsSideMenuCollapseButton$1 = /*@__PURE__*/ proxyCustomElement(class TdsSi
|
|
|
35
35
|
this.collapsed = this.sideMenuEl.collapsed;
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: 'fecd00dc0ef2ce899b82ce304034b5b6f75704ed', role: "button", tabindex: "0", "aria-expanded": !this.collapsed ? 'true' : 'false', onClick: () => {
|
|
39
|
+
this.handleClick();
|
|
40
|
+
} }, h("div", { key: '6d7ae7bd95d8c4c37895d06ce8d4eaebe08e91dd', class: {
|
|
39
41
|
'wrapper': true,
|
|
40
42
|
'state-collapsed': this.collapsed,
|
|
41
|
-
} }, h("tds-side-menu-item", { key: '
|
|
42
|
-
|
|
43
|
-
} }, h("svg", { key: '
|
|
43
|
+
} }, h("tds-side-menu-item", { key: '2cc8087248c6f9eee7943039092c5a45f9c2376d', class: {
|
|
44
|
+
button: true,
|
|
45
|
+
} }, h("a", { key: 'e2510c1f475b5f6ff3d1de367360fc2e34e0c0c0' }, h("svg", { key: '7ea54a6bcfb144cab3045fb34316eac400c59e43', class: "icon", slot: "icon", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { key: '3db930370416d9906ccdf821e6d43d0e6633534a', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16 1.975a1 1 0 0 1 1 1v20.3l9.311-9.312a1 1 0 0 1 1.415 1.414l-9.887 9.887a2.6 2.6 0 0 1-3.677 0l-9.887-9.887a1 1 0 1 1 1.414-1.414L15 23.274V2.975a1 1 0 0 1 1-1ZM5.188 28.001a1 1 0 0 0 0 2h21.62a1 1 0 1 0 0-2H5.188Z", fill: "currentColor" })), !this.collapsed && h("slot", { key: '7fba28f202ca8089ffce93c051c8d6afc23afef7' }))))));
|
|
44
46
|
}
|
|
45
47
|
get host() { return this; }
|
|
46
48
|
static get style() { return TdsSideMenuCollapseButtonStyle0; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
|
|
3
|
-
const sideMenuDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:48px;width:100%}:host .component{height:100%;width:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border-right:1px solid var(--tds-nav-item-border-color);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-header-nav-item-dropdown-opened-background);color:var(--tds-header-nav-item-dropdown-opened-color);border:none}:host .component ::slotted(a:hover),:host .component ::slotted(button:hover){background-color:var(--tds-
|
|
3
|
+
const sideMenuDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:48px;width:100%}:host .component{height:100%;width:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border-right:1px solid var(--tds-nav-item-border-color);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-header-nav-item-dropdown-opened-background);color:var(--tds-header-nav-item-dropdown-opened-color);border:none}:host .component ::slotted(a:hover),:host .component ::slotted(button:hover){background-color:var(--tds-header-nav-item-dropdown-opened-background-hover);cursor:pointer}:host .component ::slotted(a:active),:host .component ::slotted(button:active){background-color:var(--tds-header-nav-item-dropdown-opened-background-active) !important;cursor:pointer}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component.component-selected ::slotted(a),:host .component.component-selected ::slotted(button){box-shadow:inset 4px 0 0 var(--tds-nav-item-border-color-active);background-color:var(--tds-header-nav-item-dropdown-opened-background-selected)}:host .component.component-dropdown-has-icon:not(.component-collapsed) ::slotted(a),:host .component.component-dropdown-has-icon:not(.component-collapsed) ::slotted(button){padding:16px 48px 16px 58px}:host .component.component-dropdown-has-user:not(.component-collapsed) ::slotted(a),:host .component.component-dropdown-has-user:not(.component-collapsed) ::slotted(button){padding:16px 48px 16px 64px}";
|
|
4
4
|
const TdsSideMenuDropdownListItemStyle0 = sideMenuDropdownListItemCss;
|
|
5
5
|
|
|
6
6
|
const TdsSideMenuDropdownListItem$1 = /*@__PURE__*/ proxyCustomElement(class TdsSideMenuDropdownListItem extends H {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, F as Fragment, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as defineCustomElement$3 } from './p-b390ece5.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-ea381f94.js';
|
|
4
4
|
|
|
5
5
|
const sideMenuDropdownCss = ":host{display:block}:host .wrapper{display:flex;flex-direction:column}:host .dropdown-icon{margin-left:auto;transition:all 0.2s ease-in-out}:host .state-open .dropdown-icon{transform:rotateZ(180deg)}:host .state-open .menu{display:block}:host .state-collapsed .menu{--side-menu-width:69px;position:absolute;left:var(--side-menu-width);box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-sidebar-side-menu-subnav-background)}:host .state-collapsed .menu .heading-collapsed{all:unset;box-sizing:border-box;padding:16px 24px 15px;min-height:48px;display:flex;align-items:center;border-bottom:1px solid var(--tds-sidebar-side-menu-bottom-menu-border-top);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls)}:host :not(.state-collapsed) .menu ::slotted(tds-side-menu-dropdown-list){width:100%}:host .menu{display:none;flex-direction:column}";
|
|
6
6
|
const TdsSideMenuDropdownStyle0 = sideMenuDropdownCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsSideMenuItem$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsSideMenuItem$1, d as defineCustomElement$1 } from './p-ea381f94.js';
|
|
2
2
|
|
|
3
3
|
const TdsSideMenuItem = TdsSideMenuItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|