@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773648109 → 4.7.0-dev.1773670972
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/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +65 -76
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -52
- package/autocomplete-grid/autocomplete-grid-button.js +3 -6
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -17
- package/autocomplete-grid/autocomplete-grid-cell.js +4 -7
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -21
- package/autocomplete-grid/autocomplete-grid-optgroup.js +3 -6
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -33
- package/autocomplete-grid/autocomplete-grid-option.js +4 -9
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -22
- package/autocomplete-grid/autocomplete-grid-row.js +4 -7
- package/autocomplete-grid/autocomplete-grid.js +3 -6
- package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
- package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
- package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
- package/autocomplete-grid.js +9 -21
- package/autocomplete-grid.pure.js +7 -15
- package/core/datetime/date-helper.js +2 -191
- package/core/datetime.js +2 -5
- package/core/timetable/access-leg-helper.js +76 -71
- package/core/timetable/timetable-helper.js +9 -11
- package/core/timetable/timetable-properties.js +0 -1
- package/core/timetable.js +3 -7
- package/date-helper-CGproP5d.js +185 -0
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +114 -122
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -70
- package/development/autocomplete-grid/autocomplete-grid-button.js +6 -4
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -29
- package/development/autocomplete-grid/autocomplete-grid-cell.js +7 -5
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +27 -22
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +6 -4
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -109
- package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -91
- package/development/autocomplete-grid/autocomplete-grid-row.js +7 -5
- package/development/autocomplete-grid/autocomplete-grid.js +6 -4
- package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
- package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
- package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
- package/development/autocomplete-grid.js +10 -14
- package/development/autocomplete-grid.pure.js +4 -13
- package/development/core/datetime/date-helper.js +2 -285
- package/development/core/datetime.js +2 -6
- package/development/core/timetable/access-leg-helper.js +104 -82
- package/development/core/timetable/timetable-helper.js +16 -17
- package/development/core/timetable/timetable-properties.js +0 -2
- package/development/core/timetable.js +3 -8
- package/development/date-helper-8_Y-PuHh.js +520 -0
- package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
- package/development/format-Bbrn2bgo.js +1848 -0
- package/development/isValid-C-HzKv4v.js +178 -0
- package/development/journey-summary/journey-summary.component.js +2 -288
- package/development/journey-summary.component-uGhZvA4p.js +385 -0
- package/development/journey-summary.js +8 -5
- package/development/journey-summary.pure.js +2 -5
- package/development/mapper-hWWm7Uke.js +11454 -0
- package/development/pearl-chain/pearl-chain.component.js +2 -634
- package/development/pearl-chain-time/pearl-chain-time.component.js +2 -306
- package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
- package/development/pearl-chain-time.js +8 -5
- package/development/pearl-chain-time.pure.js +2 -5
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -28
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -393
- package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
- package/development/pearl-chain-vertical-item.js +8 -5
- package/development/pearl-chain-vertical-item.pure.js +2 -5
- package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
- package/development/pearl-chain-vertical.js +8 -5
- package/development/pearl-chain-vertical.pure.js +2 -5
- package/development/pearl-chain.component-wpsTvoSe.js +704 -0
- package/development/pearl-chain.js +8 -5
- package/development/pearl-chain.pure.js +2 -5
- package/development/seat-reservation/common/mapper/icon-mapper.js +168 -71
- package/development/seat-reservation/common/mapper/mapper.js +2 -11429
- package/development/seat-reservation/common/mapper.js +2 -9
- package/development/seat-reservation/common/svgs.js +2 -46
- package/development/seat-reservation/common/translations/i18n.js +1118 -900
- package/development/seat-reservation/common/translations.js +1 -4
- package/development/seat-reservation/common/types.js +0 -2
- package/development/seat-reservation/common.js +8 -12
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1307 -1231
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -862
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -106
- package/development/seat-reservation/seat-reservation-area.js +7 -5
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +35 -34
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -162
- package/development/seat-reservation/seat-reservation-graphic.js +7 -5
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -713
- package/development/seat-reservation/seat-reservation-navigation-coach.js +7 -5
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -131
- package/development/seat-reservation/seat-reservation-navigation-services.js +7 -5
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -601
- package/development/seat-reservation/seat-reservation-place-control.js +7 -5
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -22
- package/development/seat-reservation/seat-reservation-scoped.js +7 -5
- package/development/seat-reservation/seat-reservation.js +7 -6
- package/development/seat-reservation-area.component-ORuli_DC.js +138 -0
- package/development/seat-reservation-graphic.component-lZXqHWIz.js +193 -0
- package/development/seat-reservation-navigation-coach.component-D2QXTMJJ.js +828 -0
- package/development/seat-reservation-navigation-services.component-Bg1adRlU.js +179 -0
- package/development/seat-reservation-place-control.component-CwUX-QYO.js +726 -0
- package/development/seat-reservation-scoped.component-uLT33P9y.js +31 -0
- package/development/seat-reservation.component-MOv5kHDC.js +821 -0
- package/development/seat-reservation.js +16 -29
- package/development/seat-reservation.pure.js +11 -29
- package/development/svgs-kDpBCto5.js +28 -0
- package/development/timetable-duration/timetable-duration.component.js +2 -108
- package/development/timetable-duration.component-D21SXsQq.js +125 -0
- package/development/timetable-duration.js +8 -5
- package/development/timetable-duration.pure.js +2 -5
- package/development/timetable-row/timetable-row.component.js +2 -781
- package/development/timetable-row.component-Y5w8vEwP.js +932 -0
- package/development/timetable-row.js +8 -13
- package/development/timetable-row.pure.js +2 -12
- package/development/toDate-Biiv3kyf.js +150 -0
- package/differenceInMinutes-Dr9gRqtu.js +27 -0
- package/format-CM5exOsN.js +1103 -0
- package/isValid-B9oVW3lA.js +36 -0
- package/journey-summary/journey-summary.component.js +2 -194
- package/journey-summary.component-Cq_4kaOp.js +264 -0
- package/journey-summary.js +5 -4
- package/journey-summary.pure.js +2 -4
- package/mapper-DkiDDseD.js +11382 -0
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +2 -165
- package/pearl-chain-time/pearl-chain-time.component.js +2 -157
- package/pearl-chain-time.component-DGDW5S1c.js +239 -0
- package/pearl-chain-time.js +5 -4
- package/pearl-chain-time.pure.js +2 -4
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -17
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -77
- package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
- package/pearl-chain-vertical-item.js +5 -4
- package/pearl-chain-vertical-item.pure.js +2 -4
- package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
- package/pearl-chain-vertical.js +5 -4
- package/pearl-chain-vertical.pure.js +2 -4
- package/pearl-chain.component-DmjkVIva.js +194 -0
- package/pearl-chain.js +5 -4
- package/pearl-chain.pure.js +2 -4
- package/seat-reservation/common/mapper/icon-mapper.js +71 -71
- package/seat-reservation/common/mapper/mapper.js +2 -11386
- package/seat-reservation/common/mapper.js +3 -9
- package/seat-reservation/common/svgs.js +2 -242
- package/seat-reservation/common/translations/i18n.js +1084 -891
- package/seat-reservation/common/translations.js +2 -4
- package/seat-reservation/common/types.js +0 -1
- package/seat-reservation/common.js +9 -15
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +834 -812
- package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -420
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -51
- package/seat-reservation/seat-reservation-area.js +4 -7
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +68 -71
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -75
- package/seat-reservation/seat-reservation-graphic.js +4 -7
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -234
- package/seat-reservation/seat-reservation-navigation-coach.js +4 -7
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -85
- package/seat-reservation/seat-reservation-navigation-services.js +4 -7
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -203
- package/seat-reservation/seat-reservation-place-control.js +4 -7
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -13
- package/seat-reservation/seat-reservation-scoped.js +4 -7
- package/seat-reservation/seat-reservation.js +5 -9
- package/seat-reservation-area.component-COD6CXhP.js +75 -0
- package/seat-reservation-graphic.component-BNfU5tQM.js +102 -0
- package/seat-reservation-navigation-coach.component-Bh9ILq60.js +333 -0
- package/seat-reservation-navigation-services.component-QL0UnilZ.js +127 -0
- package/seat-reservation-place-control.component-BfnZUyHv.js +322 -0
- package/seat-reservation-scoped.component-CY04BT_4.js +17 -0
- package/seat-reservation.component-zrQHTRl3.js +364 -0
- package/seat-reservation.js +17 -39
- package/seat-reservation.pure.js +15 -32
- package/svgs-D5DhLHxC.js +26 -0
- package/timetable-duration/timetable-duration.component.js +2 -57
- package/timetable-duration.component-DaYoJUGS.js +65 -0
- package/timetable-duration.js +5 -4
- package/timetable-duration.pure.js +2 -4
- package/timetable-row/timetable-row.component.js +2 -427
- package/timetable-row.component-BDMAEsbR.js +559 -0
- package/timetable-row.js +6 -13
- package/timetable-row.pure.js +2 -11
- package/toDate-p-Tpkb7t.js +16 -0
- package/development/differenceInMinutes-B0dawX-5.js +0 -26
- package/development/format-BMkeaqaF.js +0 -1433
- package/development/isValid-BYRch7pV.js +0 -53
- package/development/toDate-BWb6Z1JD.js +0 -24
- package/differenceInMinutes-COvvdYsJ.js +0 -23
- package/format-CmKROkbc.js +0 -1186
- package/isValid-m3_OsPaB.js +0 -45
- package/toDate-Bw2KTWeq.js +0 -15
|
@@ -1,78 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ɵstateController as e } from "@sbb-esta/lyne-elements/core/mixins.js";
|
|
2
|
+
import { SbbAutocompleteBaseElement as t } from "@sbb-esta/lyne-elements/autocomplete.js";
|
|
2
3
|
import { getNextElementIndex as n } from "@sbb-esta/lyne-elements/core/a11y.js";
|
|
3
|
-
import { isSafari as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const s = e[this._activeColumnIndex];
|
|
65
|
-
s instanceof l ? s.setActive(!1) : o(s).delete("focus-visible"), this.triggerElement?.setAttribute("aria-activedescendant", i.id), i.scrollIntoView({ block: "nearest" }), this._activeColumnIndex = r;
|
|
66
|
-
}
|
|
67
|
-
resetActiveElement() {
|
|
68
|
-
this._activeColumnIndex !== 0 && this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button").forEach((t) => o(t).delete("focus-visible")), this.activeOption?.setActive(!1), this.activeOption = null, this._activeColumnIndex = 0, this.triggerElement?.removeAttribute("aria-activedescendant");
|
|
69
|
-
}
|
|
70
|
-
setTriggerAttributes(t) {
|
|
71
|
-
p(t, c ? this.id : this.overlayId, !1, "grid");
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
a.elementName = "sbb-autocomplete-grid", a.role = c ? "grid" : null;
|
|
75
|
-
let d = a;
|
|
76
|
-
export {
|
|
77
|
-
d as SbbAutocompleteGridElement
|
|
4
|
+
import { isSafari as r } from "@sbb-esta/lyne-elements/core/dom.js";
|
|
5
|
+
import { setAriaComboBoxAttributes as i } from "@sbb-esta/lyne-elements/core/overlay.js";
|
|
6
|
+
import { SbbAutocompleteGridOptionElement as a } from "../autocomplete-grid-option/autocomplete-grid-option.component.js";
|
|
7
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.ts
|
|
8
|
+
var o = 0, s = r, c = class extends t {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.overlayId = `sbb-autocomplete-grid-${++o}`, this.panelRole = "grid", this._activeColumnIndex = 0;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.elementName = "sbb-autocomplete-grid";
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.role = s ? "grid" : null;
|
|
17
|
+
}
|
|
18
|
+
get options() {
|
|
19
|
+
return Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-option") ?? []);
|
|
20
|
+
}
|
|
21
|
+
syncNegative() {
|
|
22
|
+
this.querySelectorAll?.("sbb-divider, sbb-autocomplete-grid-button, sbb-option-hint").forEach((e) => e.negative = this.negative), this.querySelectorAll?.("sbb-autocomplete-grid-row, sbb-autocomplete-grid-option, sbb-autocomplete-grid-optgroup").forEach((t) => e(t).toggle("negative", this.negative));
|
|
23
|
+
}
|
|
24
|
+
openedPanelKeyboardInteraction(e) {
|
|
25
|
+
if (this.isOpen) switch (e.key) {
|
|
26
|
+
case "Enter":
|
|
27
|
+
this.selectByKeyboard(e);
|
|
28
|
+
break;
|
|
29
|
+
case "ArrowDown":
|
|
30
|
+
case "ArrowUp":
|
|
31
|
+
this.setNextActiveOption(e);
|
|
32
|
+
break;
|
|
33
|
+
case "ArrowRight":
|
|
34
|
+
case "ArrowLeft":
|
|
35
|
+
this._setNextHorizontalActiveElement(e);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
selectByKeyboard(e) {
|
|
40
|
+
this.activeOption && (e.preventDefault(), this._activeColumnIndex === 0 ? this.activeOption.selectViaUserInteraction(!0) : this.activeOption.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button")[this._activeColumnIndex - 1]?.click());
|
|
41
|
+
}
|
|
42
|
+
setNextActiveOption(t) {
|
|
43
|
+
let r = this.options.filter((e) => !e.matches(":is(:state(disabled),[state--disabled])"));
|
|
44
|
+
if (this.activeOption?.setActive(!1), this.triggerElement?.removeAttribute("aria-activedescendant"), Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-row :is(:state(focus-visible),[state--focus-visible])") ?? []).forEach((t) => e(t).delete("focus-visible")), this._activeColumnIndex = 0, !r.length) {
|
|
45
|
+
this.activeOption = null;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this.activeOption = r[n(t, this.activeOption ? r.indexOf(this.activeOption) : -1, r.length)], this.activeOption.setActive(!0), this.triggerElement?.setAttribute("aria-activedescendant", this.activeOption.id), this.activeOption.scrollIntoView({ block: "nearest" }), t && t.preventDefault(), this.autoSelectActiveOption && t && this.setPendingSelection(this.activeOption);
|
|
49
|
+
}
|
|
50
|
+
_setNextHorizontalActiveElement(t) {
|
|
51
|
+
if (!this.activeOption) return;
|
|
52
|
+
let r = Array.from(this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-option, sbb-autocomplete-grid-button") ?? [])?.filter((e) => !e.matches(":is(:state(disabled),[state--disabled])"));
|
|
53
|
+
if (!r.length) return;
|
|
54
|
+
let i = n(t, this._activeColumnIndex, r.length), o = r[i];
|
|
55
|
+
o instanceof a ? o.setActive(!0) : e(o).add("focus-visible");
|
|
56
|
+
let s = r[this._activeColumnIndex];
|
|
57
|
+
s instanceof a ? s.setActive(!1) : e(s).delete("focus-visible"), this.triggerElement?.setAttribute("aria-activedescendant", o.id), o.scrollIntoView({ block: "nearest" }), this._activeColumnIndex = i;
|
|
58
|
+
}
|
|
59
|
+
resetActiveElement() {
|
|
60
|
+
this._activeColumnIndex !== 0 && this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button").forEach((t) => e(t).delete("focus-visible")), this.activeOption?.setActive(!1), this.activeOption = null, this._activeColumnIndex = 0, this.triggerElement?.removeAttribute("aria-activedescendant");
|
|
61
|
+
}
|
|
62
|
+
setTriggerAttributes(e) {
|
|
63
|
+
i(e, s ? this.id : this.overlayId, !1, "grid");
|
|
64
|
+
}
|
|
78
65
|
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { c as SbbAutocompleteGridElement };
|
|
@@ -1,53 +1,73 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
2
|
-
import { miniButtonStyle as
|
|
3
|
-
import { SbbActionBaseElement as
|
|
4
|
-
import { SbbPropertyWatcherController as
|
|
5
|
-
import { hostAttributes as
|
|
6
|
-
import { isEventPrevented as
|
|
7
|
-
import { SbbDisabledMixin as
|
|
8
|
-
import { boxSizingStyles as
|
|
9
|
-
import { SbbIconNameMixin as
|
|
10
|
-
import { isServer as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
+
import { miniButtonStyle as n } from "@sbb-esta/lyne-elements/button/common.js";
|
|
3
|
+
import { SbbActionBaseElement as r } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
4
|
+
import { SbbPropertyWatcherController as i } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
5
|
+
import { hostAttributes as a } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
6
|
+
import { isEventPrevented as o } from "@sbb-esta/lyne-elements/core/eventing.js";
|
|
7
|
+
import { SbbDisabledMixin as s, SbbNegativeMixin as c } from "@sbb-esta/lyne-elements/core/mixins.js";
|
|
8
|
+
import { boxSizingStyles as l } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
9
|
+
import { SbbIconNameMixin as u } from "@sbb-esta/lyne-elements/icon.js";
|
|
10
|
+
import { isServer as d } from "lit";
|
|
11
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.ts
|
|
12
|
+
var f = 0, p = (() => {
|
|
13
|
+
let p = [a({ tabindex: null })], m, h = [], g, _ = s(c(u(r)));
|
|
14
|
+
var v = class extends _ {
|
|
15
|
+
static {
|
|
16
|
+
g = this;
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(_[Symbol.metadata] ?? null) : void 0;
|
|
20
|
+
e(null, m = { value: g }, p, {
|
|
21
|
+
kind: "class",
|
|
22
|
+
name: g.name,
|
|
23
|
+
metadata: t
|
|
24
|
+
}, null, h), v = g = m.value, t && Object.defineProperty(g, Symbol.metadata, {
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0,
|
|
27
|
+
writable: !0,
|
|
28
|
+
value: t
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.elementName = "sbb-autocomplete-grid-button";
|
|
33
|
+
}
|
|
34
|
+
static {
|
|
35
|
+
this.role = "button";
|
|
36
|
+
}
|
|
37
|
+
static {
|
|
38
|
+
this.styles = [l, n];
|
|
39
|
+
}
|
|
40
|
+
get option() {
|
|
41
|
+
return this.closest("sbb-autocomplete-grid-row")?.querySelector("sbb-autocomplete-grid-option") || null;
|
|
42
|
+
}
|
|
43
|
+
get optgroup() {
|
|
44
|
+
return this.closest("sbb-autocomplete-grid-optgroup");
|
|
45
|
+
}
|
|
46
|
+
constructor() {
|
|
47
|
+
super(), this._handleButtonClick = async (e) => {
|
|
48
|
+
await o(e) || this.closest("form");
|
|
49
|
+
}, this.internals.states.add("button"), d || (this.setupBaseEventHandlers(), this.addEventListener("click", this._handleButtonClick), this.addController(new i(this, () => this.closest("sbb-autocomplete-grid-optgroup"), { disabled: () => this._updateInternals() })));
|
|
50
|
+
}
|
|
51
|
+
isDisabledExternally() {
|
|
52
|
+
return this.optgroup?.disabled ?? !1;
|
|
53
|
+
}
|
|
54
|
+
renderTemplate() {
|
|
55
|
+
return super.renderIconSlot();
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
super.connectedCallback(), this.id ||= `sbb-autocomplete-grid-button-${++f}`;
|
|
59
|
+
}
|
|
60
|
+
willUpdate(e) {
|
|
61
|
+
super.willUpdate(e), e.has("disabled") && this._updateInternals();
|
|
62
|
+
}
|
|
63
|
+
_updateInternals() {
|
|
64
|
+
this.disabled || this.optgroup?.disabled ? (this.internals.states.add("disabled"), this.internals.ariaDisabled = "true") : (this.internals.states.delete("disabled"), this.internals.ariaDisabled = null);
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
t(g, h);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return g;
|
|
50
71
|
})();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { p as SbbAutocompleteGridButtonElement };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { SbbAutocompleteGridButtonElement as e } from "./autocomplete-grid-button/autocomplete-grid-button.component.js";
|
|
2
|
-
e.define();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
e as SbbAutocompleteGridButtonElement
|
|
7
|
-
};
|
|
2
|
+
e.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid-button.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as SbbAutocompleteGridButtonElement };
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { css as i, html as l } from "lit";
|
|
4
|
-
const o = i`:host{--sbb-autocomplete-grid-cell-gap: var(--sbb-spacing-fixed-6x);display:block}.sbb-autocomplete-grid-cell{display:flex;column-gap:var(--sbb-autocomplete-grid-cell-gap)}`, s = class s extends a {
|
|
5
|
-
render() {
|
|
6
|
-
return l`
|
|
7
|
-
<span class="sbb-autocomplete-grid-cell">
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</span>
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
s.elementName = "sbb-autocomplete-grid-cell", s.role = "gridcell", s.styles = [c, o];
|
|
14
|
-
let t = s;
|
|
15
|
-
export {
|
|
16
|
-
t as SbbAutocompleteGridCellElement
|
|
17
|
-
};
|
|
1
|
+
import { t as e } from "../../autocomplete-grid-cell.component-Dak9wlBr.js";
|
|
2
|
+
export { e as SbbAutocompleteGridCellElement };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
e.define();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
e as SbbAutocompleteGridCellElement
|
|
7
|
-
};
|
|
1
|
+
import { t as e } from "../autocomplete-grid-cell.component-Dak9wlBr.js";
|
|
2
|
+
e.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid-cell.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as SbbAutocompleteGridCellElement };
|
package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { SbbPropertyWatcherController as
|
|
2
|
-
import { SbbOptgroupBaseElement as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let e = t;
|
|
20
|
-
export {
|
|
21
|
-
e as SbbAutocompleteGridOptgroupElement
|
|
1
|
+
import { SbbPropertyWatcherController as e } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
2
|
+
import { SbbOptgroupBaseElement as t } from "@sbb-esta/lyne-elements/option.pure.js";
|
|
3
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.ts
|
|
4
|
+
var n = class extends t {
|
|
5
|
+
static {
|
|
6
|
+
this.elementName = "sbb-autocomplete-grid-optgroup";
|
|
7
|
+
}
|
|
8
|
+
get options() {
|
|
9
|
+
return Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-option") ?? []);
|
|
10
|
+
}
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.addController(new e(this, () => this.closest("sbb-autocomplete-grid"), { negative: (e) => {
|
|
13
|
+
this.toggleState("negative", e.negative), this.requestUpdate();
|
|
14
|
+
} }));
|
|
15
|
+
}
|
|
16
|
+
getAutocompleteParent() {
|
|
17
|
+
return this.closest?.("sbb-autocomplete-grid") || null;
|
|
18
|
+
}
|
|
22
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as SbbAutocompleteGridOptgroupElement };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { SbbAutocompleteGridOptgroupElement as e } from "./autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
|
|
2
|
-
e.define();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
e as SbbAutocompleteGridOptgroupElement
|
|
7
|
-
};
|
|
2
|
+
e.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid-optgroup.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as SbbAutocompleteGridOptgroupElement };
|
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { boxSizingStyles as a } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
4
|
-
import { SbbOptionBaseElement as l } from "@sbb-esta/lyne-elements/option.js";
|
|
5
|
-
import { css as r } from "lit";
|
|
6
|
-
const b = r`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-option-color: var(--sbb-color-3-negative);--sbb-option-icon-color: var(--sbb-color-5)}:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot{display:none}:host(:is(:state(active),[state--active])){--sbb-option-focus-outline-color: var(--sbb-focus-outline-color)}.sbb-option{font-size:var(--sbb-option-font-size);letter-spacing:var(--sbb-typo-letter-spacing-text);position:relative;display:flex;align-items:center;column-gap:var(--sbb-option-column-gap);justify-content:start;min-height:var(--sbb-option-min-height);padding-inline:var(--sbb-option-padding-inline);color:var(--sbb-option-color)}.sbb-option:after{content:"";display:block;position:absolute;inset:var(--sbb-option-focus-outline-inset);pointer-events:none;border:var(--sbb-focus-outline-width) solid var(--sbb-option-focus-outline-color);border-radius:var(--sbb-option-border-radius)}:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{font-weight:700}@media(forced-colors:active){:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{color:Highlight}}.sbb-option__icon{display:flex;min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);color:var(--sbb-option-icon-color)}:host(:not(:is(:state(slotted-icon),[state--slotted-icon]),:is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon{display:var(--sbb-option-icon-container-display, none)}.sbb-option__label{text-overflow:var(--sbb-option-text-overflow);overflow:var(--sbb-option-overflow);white-space:var(--sbb-option-white-space, initial)}`, n = "sbb-autocomplete-grid-option", o = class o extends l {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(), this.optionId = n, this.addController(new i(this, () => this.closest("sbb-autocomplete-grid-optgroup"), {
|
|
9
|
-
disabled: (t) => {
|
|
10
|
-
this.disabledFromGroup = t.disabled, s(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled();
|
|
11
|
-
},
|
|
12
|
-
label: (t) => this.groupLabel = t.label
|
|
13
|
-
})), this.addController(new i(this, () => this.closest("sbb-autocomplete-grid"), {
|
|
14
|
-
negative: (t) => this.toggleState("negative", t.negative)
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
willUpdate(t) {
|
|
18
|
-
super.willUpdate(t), t.has("disabled") && (s(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled());
|
|
19
|
-
}
|
|
20
|
-
selectByClick(t) {
|
|
21
|
-
if (this.disabled || this.disabledFromGroup) {
|
|
22
|
-
t.stopPropagation();
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
this.selectViaUserInteraction(!0);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
o.elementName = "sbb-autocomplete-grid-option", o.role = "gridcell", o.styles = [a, b];
|
|
29
|
-
let e = o;
|
|
30
|
-
export {
|
|
31
|
-
e as SbbAutocompleteGridOptionElement,
|
|
32
|
-
n as autocompleteGridOptionId
|
|
33
|
-
};
|
|
1
|
+
import { n as e, t } from "../../autocomplete-grid-option.component-DNRFHOwc.js";
|
|
2
|
+
export { t as SbbAutocompleteGridOptionElement, e as autocompleteGridOptionId };
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Use either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.`);
|
|
6
|
-
export {
|
|
7
|
-
e as SbbAutocompleteGridOptionElement,
|
|
8
|
-
p as autocompleteGridOptionId
|
|
9
|
-
};
|
|
1
|
+
import { n as e, t } from "../autocomplete-grid-option.component-DNRFHOwc.js";
|
|
2
|
+
t.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid-option.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { t as SbbAutocompleteGridOptionElement, e as autocompleteGridOptionId };
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { css as a, html as s } from "lit";
|
|
4
|
-
const b = a`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-autocomplete-grid-row-color: var(--sbb-color-3-negative);--sbb-autocomplete-grid-row-background-color-hover: var(--sbb-background-color-3-negative);--sbb-autocomplete-grid-row-disabled-border-color: var(--sbb-border-color-5);--sbb-autocomplete-grid-row-disabled-background-color: var(--sbb-background-color-3-negative);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark)}@media(any-hover:hover){:host(:hover:not(:is(:state(disabled),[state--disabled]))){--sbb-autocomplete-grid-row-background-color: var( --sbb-autocomplete-grid-row-background-color-hover )}}:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-cursor: var(--sbb-cursor-default)}@media(forced-colors:active){:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-color: GrayText}}::slotted(sbb-autocomplete-grid-option){flex:1 1 auto;margin-right:calc(-1 * var(--sbb-spacing-fixed-2x));overflow-x:hidden}.sbb-autocomplete-grid-row{display:flex;align-items:center;padding-inline-end:var(--sbb-autocomplete-grid-row-padding-inline-end);justify-content:var(--sbb-autocomplete-grid-row-justify-content);gap:var(--sbb-spacing-fixed-6x);color:var(--sbb-autocomplete-grid-row-color);background-color:var(--sbb-autocomplete-grid-row-background-color, inherit);cursor:var(--sbb-autocomplete-grid-row-cursor);-webkit-tap-highlight-color:transparent;-webkit-text-fill-color:var(--sbb-autocomplete-grid-row-color)}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row{position:relative;z-index:0}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{content:"";display:block;position:absolute;inset:.375rem;border:var(--sbb-border-width-1x) dashed var(--sbb-autocomplete-grid-row-disabled-border-color);border-radius:var(--sbb-border-radius-2x);background-color:var(--sbb-autocomplete-grid-row-disabled-background-color);z-index:-1}@media(forced-colors:active){:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{border-color:GrayText}}`;
|
|
5
|
-
let i = 0;
|
|
6
|
-
const o = class o extends e {
|
|
7
|
-
connectedCallback() {
|
|
8
|
-
super.connectedCallback(), this.id ||= `sbb-autocomplete-grid-row-${++i}`;
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
return s`
|
|
12
|
-
<span class="sbb-autocomplete-grid-row">
|
|
13
|
-
<slot></slot>
|
|
14
|
-
</span>
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
o.elementName = "sbb-autocomplete-grid-row", o.role = "row", o.styles = [t, b];
|
|
19
|
-
let r = o;
|
|
20
|
-
export {
|
|
21
|
-
r as SbbAutocompleteGridRowElement
|
|
22
|
-
};
|
|
1
|
+
import { t as e } from "../../autocomplete-grid-row.component-DBHZQ0GQ.js";
|
|
2
|
+
export { e as SbbAutocompleteGridRowElement };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
e.define();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
e as SbbAutocompleteGridRowElement
|
|
7
|
-
};
|
|
1
|
+
import { t as e } from "../autocomplete-grid-row.component-DBHZQ0GQ.js";
|
|
2
|
+
e.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid-row.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as SbbAutocompleteGridRowElement };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { SbbAutocompleteGridElement as e } from "./autocomplete-grid/autocomplete-grid.component.js";
|
|
2
|
-
e.define();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
e as SbbAutocompleteGridElement
|
|
7
|
-
};
|
|
2
|
+
e.define(), console.warn("The entrypoint '@sbb-esta/elements-experimental/autocomplete-grid/autocomplete-grid.js' has been deprecated.\nUse either '@sbb-esta/elements-experimental/autocomplete-grid.js' or '@sbb-esta/elements-experimental/autocomplete-grid.pure.js' instead.");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as SbbAutocompleteGridElement };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SbbElement as e } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
2
|
+
import { boxSizingStyles as t } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
3
|
+
import { css as n, html as r } from "lit";
|
|
4
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.scss?lit&inline
|
|
5
|
+
var i = n`:host{--sbb-autocomplete-grid-cell-gap:var(--sbb-spacing-fixed-6x);display:block}.sbb-autocomplete-grid-cell{column-gap:var(--sbb-autocomplete-grid-cell-gap);display:flex}`, a = class extends e {
|
|
6
|
+
static {
|
|
7
|
+
this.elementName = "sbb-autocomplete-grid-cell";
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.role = "gridcell";
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [t, i];
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return r`
|
|
17
|
+
<span class="sbb-autocomplete-grid-cell">
|
|
18
|
+
<slot></slot>
|
|
19
|
+
</span>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SbbPropertyWatcherController as e } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
2
|
+
import { ɵstateController as t } from "@sbb-esta/lyne-elements/core/mixins.js";
|
|
3
|
+
import { boxSizingStyles as n } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
4
|
+
import { css as r } from "lit";
|
|
5
|
+
import { SbbOptionBaseElement as i } from "@sbb-esta/lyne-elements/option.js";
|
|
6
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.scss?lit&inline
|
|
7
|
+
var a = r`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-option-color:var(--sbb-color-3-negative);--sbb-option-icon-color:var(--sbb-color-5)}:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot{display:none}:host(:is(:state(active),[state--active])){--sbb-option-focus-outline-color:var(--sbb-focus-outline-color)}.sbb-option{font-size:var(--sbb-option-font-size);letter-spacing:var(--sbb-typo-letter-spacing-text);align-items:center;column-gap:var(--sbb-option-column-gap);min-height:var(--sbb-option-min-height);padding-inline:var(--sbb-option-padding-inline);color:var(--sbb-option-color);justify-content:start;display:flex;position:relative}.sbb-option:after{content:"";inset:var(--sbb-option-focus-outline-inset);pointer-events:none;border:var(--sbb-focus-outline-width) solid var(--sbb-option-focus-outline-color);border-radius:var(--sbb-option-border-radius);display:block;position:absolute}:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{font-weight:700}@media (forced-colors:active){:host(:not(:is(:state(disabled),[state--disabled]))) .sbb-option__label--highlight{color:highlight}}.sbb-option__icon{min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);color:var(--sbb-option-icon-color);display:flex}:host(:not(:is(:state(slotted-icon),[state--slotted-icon]),:is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon{display:var(--sbb-option-icon-container-display,none)}.sbb-option__label{text-overflow:var(--sbb-option-text-overflow);overflow:var(--sbb-option-overflow);white-space:var(--sbb-option-white-space,initial)}`, o = "sbb-autocomplete-grid-option", s = class extends i {
|
|
8
|
+
static {
|
|
9
|
+
this.elementName = "sbb-autocomplete-grid-option";
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.role = "gridcell";
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = [n, a];
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super(), this.optionId = o, this.addController(new e(this, () => this.closest("sbb-autocomplete-grid-optgroup"), {
|
|
19
|
+
disabled: (e) => {
|
|
20
|
+
this.disabledFromGroup = e.disabled, t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled();
|
|
21
|
+
},
|
|
22
|
+
label: (e) => this.groupLabel = e.label
|
|
23
|
+
})), this.addController(new e(this, () => this.closest("sbb-autocomplete-grid"), { negative: (e) => this.toggleState("negative", e.negative) }));
|
|
24
|
+
}
|
|
25
|
+
willUpdate(e) {
|
|
26
|
+
super.willUpdate(e), e.has("disabled") && (t(this.closest?.("sbb-autocomplete-grid-row"))?.toggle("disabled", this.disabled || this.disabledFromGroup), this.updateAriaDisabled());
|
|
27
|
+
}
|
|
28
|
+
selectByClick(e) {
|
|
29
|
+
if (this.disabled || this.disabledFromGroup) {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.selectViaUserInteraction(!0);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { o as n, s as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SbbElement as e } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
2
|
+
import { boxSizingStyles as t } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
3
|
+
import { css as n, html as r } from "lit";
|
|
4
|
+
//#region src/elements-experimental/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.scss?lit&inline
|
|
5
|
+
var i = n`:host{display:block}:host(:is(:state(negative),[state--negative])){--sbb-autocomplete-grid-row-color:var(--sbb-color-3-negative);--sbb-autocomplete-grid-row-background-color-hover:var(--sbb-background-color-3-negative);--sbb-autocomplete-grid-row-disabled-border-color:var(--sbb-border-color-5);--sbb-autocomplete-grid-row-disabled-background-color:var(--sbb-background-color-3-negative);--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark)}@media (any-hover:hover){:host(:hover:not(:is(:state(disabled),[state--disabled]))){--sbb-autocomplete-grid-row-background-color:var(--sbb-autocomplete-grid-row-background-color-hover)}}:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is(:state(disabled),[state--disabled])){--sbb-autocomplete-grid-row-color:GrayText}}::slotted(sbb-autocomplete-grid-option){margin-right:calc(-1 * var(--sbb-spacing-fixed-2x));flex:auto;overflow-x:hidden}.sbb-autocomplete-grid-row{align-items:center;justify-content:var(--sbb-autocomplete-grid-row-justify-content);gap:var(--sbb-spacing-fixed-6x);color:var(--sbb-autocomplete-grid-row-color);background-color:var(--sbb-autocomplete-grid-row-background-color,inherit);cursor:var(--sbb-autocomplete-grid-row-cursor);-webkit-tap-highlight-color:transparent;-webkit-text-fill-color:var(--sbb-autocomplete-grid-row-color);padding-inline-end:var(--sbb-autocomplete-grid-row-padding-inline-end);display:flex}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row{z-index:0;position:relative}:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{content:"";border:var(--sbb-border-width-1x) dashed var(--sbb-autocomplete-grid-row-disabled-border-color);border-radius:var(--sbb-border-radius-2x);background-color:var(--sbb-autocomplete-grid-row-disabled-background-color);z-index:-1;display:block;position:absolute;inset:.375rem}@media (forced-colors:active){:host(:is(:state(disabled),[state--disabled])) .sbb-autocomplete-grid-row:before{border-color:graytext}}`, a = 0, o = class extends e {
|
|
6
|
+
static {
|
|
7
|
+
this.elementName = "sbb-autocomplete-grid-row";
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.role = "row";
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [t, i];
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
super.connectedCallback(), this.id ||= `sbb-autocomplete-grid-row-${++a}`;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return r`
|
|
20
|
+
<span class="sbb-autocomplete-grid-row">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</span>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o as t };
|