@sbb-esta/lyne-elements 2.0.3 → 2.2.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/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +6 -6
- package/action-group.js +3 -3
- package/alert/alert.js +8 -8
- package/autocomplete/autocomplete-base-element.d.ts +4 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +4 -4
- package/autocomplete-grid/autocomplete-grid-cell.js +3 -3
- package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-option.js +10 -10
- package/autocomplete-grid/autocomplete-grid-row.js +5 -5
- package/autocomplete.js +99 -90
- package/breadcrumb/breadcrumb-group.js +5 -5
- package/button/accent-button-link.js +9 -9
- package/button/accent-button-static.js +6 -6
- package/button/accent-button.js +6 -6
- package/button/button-link.js +7 -7
- package/button/button-static.js +7 -7
- package/button/button.js +8 -8
- package/button/common.js +15 -15
- package/button/mini-button-group.js +8 -8
- package/button/secondary-button-link.js +7 -7
- package/button/secondary-button-static.js +7 -7
- package/button/secondary-button.js +3 -3
- package/button/transparent-button-link.js +6 -6
- package/button/transparent-button-static.js +5 -5
- package/button/transparent-button.js +6 -6
- package/card/card-badge.js +11 -11
- package/card/card-button.js +5 -5
- package/card/card-link.js +7 -7
- package/card/card.js +3 -3
- package/checkbox/checkbox-panel.js +16 -16
- package/checkbox/checkbox.js +15 -15
- package/checkbox/common.js +3 -3
- package/chip-label.js +3 -3
- package/clock.js +10 -10
- package/container/container/container.d.ts +1 -1
- package/container/container/container.d.ts.map +1 -1
- package/container/container.js +23 -23
- package/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +4 -4
- package/core/a11y/focus.d.ts.map +1 -1
- package/core/a11y.js +8 -8
- package/core/base-elements/link-base-element.d.ts +2 -0
- package/core/base-elements/link-base-element.d.ts.map +1 -1
- package/core/base-elements.js +125 -114
- package/core/controllers.js +4 -4
- package/core/datetime/date-adapter.d.ts +1 -1
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +6 -6
- package/core/dom/scroll.d.ts +1 -0
- package/core/dom/scroll.d.ts.map +1 -1
- package/core/dom.js +35 -35
- package/core/eventing.js +4 -4
- package/core/images.d.ts.map +1 -1
- package/core/mixins.js +18 -18
- package/core/styles/core.scss +23 -2
- package/core/testing.js +14 -14
- package/core.css +20 -2
- package/custom-elements.json +828 -431
- package/datepicker/common/datepicker-association-controllers.d.ts +21 -0
- package/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
- package/datepicker/common/datepicker-button.d.ts +17 -9
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.d.ts +1 -0
- package/datepicker/common.d.ts.map +1 -1
- package/datepicker/common.js +130 -92
- package/datepicker/datepicker/datepicker.d.ts +19 -4
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +106 -113
- package/datepicker/datepicker.js +95 -80
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +1 -1
- package/development/action-group.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts +4 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-cell.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option.js +3 -3
- package/development/autocomplete-grid/autocomplete-grid-row.js +1 -1
- package/development/autocomplete.js +37 -8
- package/development/breadcrumb/breadcrumb-group.js +3 -3
- package/development/button/common.js +69 -70
- package/development/calendar.js +1 -1
- package/development/card/card-badge.js +1 -1
- package/development/card/card.js +1 -1
- package/development/chip-label.js +1 -1
- package/development/clock.js +1 -1
- package/development/container/container/container.d.ts +1 -1
- package/development/container/container/container.d.ts.map +1 -1
- package/development/container/container.js +18 -2
- package/development/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +9 -1
- package/development/core/a11y/focus.d.ts.map +1 -1
- package/development/core/a11y.js +3 -3
- package/development/core/base-elements/link-base-element.d.ts +2 -0
- package/development/core/base-elements/link-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +22 -5
- package/development/core/controllers.js +1 -1
- package/development/core/datetime/date-adapter.d.ts +1 -1
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +1 -1
- package/development/core/dom/scroll.d.ts +1 -0
- package/development/core/dom/scroll.d.ts.map +1 -1
- package/development/core/dom.js +4 -1
- package/development/core/images.d.ts.map +1 -1
- package/development/core/mixins.js +1 -1
- package/development/datepicker/common/datepicker-association-controllers.d.ts +21 -0
- package/development/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
- package/development/datepicker/common/datepicker-button.d.ts +17 -9
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.d.ts +1 -0
- package/development/datepicker/common.d.ts.map +1 -1
- package/development/datepicker/common.js +139 -90
- package/development/datepicker/datepicker/datepicker.d.ts +19 -4
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +76 -73
- package/development/datepicker/datepicker.js +55 -37
- package/development/dialog/dialog/dialog.d.ts +2 -0
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-content.js +1 -1
- package/development/dialog/dialog.js +38 -12
- package/development/expansion-panel/expansion-panel-content.js +1 -1
- package/development/flip-card/flip-card-details.js +1 -1
- package/development/flip-card/flip-card-summary.js +1 -1
- package/development/icon.js +1 -1
- package/development/image.js +2 -2
- package/development/lead-container.js +1 -1
- package/development/link-list/link-list-anchor.js +1 -1
- package/development/link-list/link-list.js +1 -1
- package/development/loading-indicator-circle.js +1 -1
- package/development/loading-indicator.js +1 -1
- package/development/map-container.js +1 -1
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +35 -12
- package/development/message.js +1 -1
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation.js +15 -8
- package/development/notification.js +1 -1
- package/development/option/optgroup.js +1 -1
- package/development/option/option/option-base-element.d.ts +3 -2
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +16 -9
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +29 -13
- package/development/paginator/paginator.js +1 -1
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +16 -13
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +2 -2
- package/development/{sbb-tokens-BdGhUJjM.js → sbb-tokens-CSAKTXUi.js} +15 -15
- package/development/screen-reader-only.js +1 -1
- package/development/select/select.d.ts +11 -0
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +60 -9
- package/development/signet.js +1 -1
- package/development/stepper/step.js +1 -1
- package/development/tabs/tab.js +1 -1
- package/development/time-input.js +1 -1
- package/development/title/title-base.d.ts.map +1 -1
- package/development/title.js +4 -5
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +14 -8
- package/development/toggle/toggle.js +2 -2
- package/development/train/train-blocked-passage.js +1 -1
- package/development/train/train-wagon.js +1 -1
- package/dialog/dialog/dialog.d.ts +2 -0
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-content.js +4 -4
- package/dialog/dialog-title.js +8 -8
- package/dialog/dialog.js +59 -49
- package/divider.js +12 -12
- package/expansion-panel/expansion-panel-content.js +3 -3
- package/file-selector/file-selector-dropzone.js +5 -5
- package/file-selector/file-selector.js +6 -6
- package/flip-card/flip-card-details.js +7 -7
- package/flip-card/flip-card-summary.js +12 -12
- package/header/header-button.js +5 -5
- package/header/header-link.js +5 -5
- package/icon.js +37 -37
- package/image.js +16 -16
- package/lead-container.js +3 -3
- package/link/block-link-button.js +4 -4
- package/link/block-link-static.js +9 -9
- package/link/block-link.js +4 -4
- package/link/common.js +16 -16
- package/link/link-button.js +7 -7
- package/link/link-static.js +7 -7
- package/link/link.js +4 -4
- package/link-list/common.js +12 -12
- package/link-list/link-list-anchor.js +3 -3
- package/link-list/link-list.js +3 -3
- package/loading-indicator-circle.js +14 -14
- package/loading-indicator.js +3 -3
- package/map-container.js +6 -6
- package/menu/common.js +7 -7
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu-button.js +8 -8
- package/menu/menu-link.js +6 -6
- package/menu/menu.js +64 -42
- package/message.js +3 -3
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-button.js +4 -4
- package/navigation/navigation-link.js +7 -7
- package/navigation/navigation-list.js +4 -4
- package/navigation/navigation-marker.js +3 -3
- package/navigation/navigation.js +21 -20
- package/notification.js +19 -19
- package/option/optgroup.js +14 -14
- package/option/option/option-base-element.d.ts +3 -2
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +115 -103
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +87 -84
- package/package.json +1 -1
- package/paginator/common.js +6 -6
- package/paginator/paginator.js +1 -1
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +73 -73
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +1 -1
- package/radio-button/radio-button-panel.js +5 -5
- package/{sbb-tokens-Dx20OtVg.js → sbb-tokens-BgDF8jIh.js} +14 -14
- package/screen-reader-only.js +8 -8
- package/select/select.d.ts +11 -0
- package/select/select.d.ts.map +1 -1
- package/select.js +111 -83
- package/signet.js +1 -1
- package/slider.js +8 -8
- package/standard-theme.css +20 -2
- package/status.js +3 -3
- package/stepper/step-label.js +4 -4
- package/stepper/step.js +3 -3
- package/table/table-wrapper.js +4 -4
- package/tabs/tab-group.js +24 -24
- package/tabs/tab.js +4 -4
- package/tag/tag-group.js +7 -7
- package/teaser-product/common.js +5 -5
- package/teaser-product/teaser-product-static.js +2 -2
- package/time-input.js +3 -3
- package/timetable-occupancy-icon.js +3 -3
- package/timetable-occupancy.js +6 -6
- package/title/title-base.d.ts.map +1 -1
- package/title.js +41 -42
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +58 -54
- package/toggle/toggle-option.js +11 -11
- package/toggle/toggle.js +3 -3
- package/toggle-check.js +5 -5
- package/train/train-blocked-passage.js +3 -3
- package/train/train.js +28 -28
package/core/base-elements.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
1
|
+
var V = (l) => {
|
|
2
2
|
throw TypeError(l);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import {
|
|
8
|
-
import { hostAttributes as
|
|
9
|
-
import { property as
|
|
10
|
-
import { isEventPrevented as
|
|
11
|
-
import { SbbFormAssociatedMixin as
|
|
12
|
-
import { SbbLanguageController as
|
|
13
|
-
import { i18nTargetOpensInNewWindow as
|
|
4
|
+
var W = (l, r, n) => r.has(l) || V("Cannot " + n);
|
|
5
|
+
var v = (l, r, n) => (W(l, r, "read from private field"), n ? n.call(l) : r.get(l)), k = (l, r, n) => r.has(l) ? V("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, n), h = (l, r, n, i) => (W(l, r, "write to private field"), i ? i.call(l, n) : r.set(l, n), n);
|
|
6
|
+
import { __esDecorate as _, __runInitializers as o } from "tslib";
|
|
7
|
+
import { LitElement as J, html as B, isServer as Q, nothing as y } from "lit";
|
|
8
|
+
import { hostAttributes as T, forceType as D } from "./decorators.js";
|
|
9
|
+
import { property as g } from "lit/decorators.js";
|
|
10
|
+
import { isEventPrevented as X, EventEmitter as A } from "./eventing.js";
|
|
11
|
+
import { SbbFormAssociatedMixin as Y } from "./mixins.js";
|
|
12
|
+
import { SbbLanguageController as Z } from "./controllers.js";
|
|
13
|
+
import { i18nTargetOpensInNewWindow as ee } from "./i18n.js";
|
|
14
14
|
import "../screen-reader-only.js";
|
|
15
|
-
let
|
|
16
|
-
var
|
|
17
|
-
let l = [
|
|
15
|
+
let U = (() => {
|
|
16
|
+
var u;
|
|
17
|
+
let l = [T({
|
|
18
18
|
"data-action": ""
|
|
19
|
-
})], r, n = [], i,
|
|
20
|
-
return
|
|
19
|
+
})], r, n = [], i, f = J;
|
|
20
|
+
return u = class extends f {
|
|
21
21
|
get maybeDisabled() {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
22
|
+
const d = this;
|
|
23
|
+
return d.disabled || d.formDisabled;
|
|
24
24
|
}
|
|
25
25
|
get maybeDisabledInteractive() {
|
|
26
26
|
return this.disabledInteractive;
|
|
@@ -31,8 +31,8 @@ let W = (() => {
|
|
|
31
31
|
setupBaseEventHandlers() {
|
|
32
32
|
this.addEventListener(
|
|
33
33
|
"click",
|
|
34
|
-
(
|
|
35
|
-
this.maybeDisabled && !this.maybeDisabledInteractive && (
|
|
34
|
+
(d) => {
|
|
35
|
+
this.maybeDisabled && !this.maybeDisabledInteractive && (d.preventDefault(), d.stopImmediatePropagation());
|
|
36
36
|
},
|
|
37
37
|
// capture is necessary here, as this event handler needs to be executed before any other
|
|
38
38
|
// in order to stop immediate propagation in the disabled case.
|
|
@@ -45,19 +45,19 @@ let W = (() => {
|
|
|
45
45
|
}
|
|
46
46
|
/** Default render method for button-like components. */
|
|
47
47
|
render() {
|
|
48
|
-
return
|
|
48
|
+
return B`<span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span>`;
|
|
49
49
|
}
|
|
50
|
-
}, i =
|
|
51
|
-
const
|
|
52
|
-
|
|
50
|
+
}, i = u, (() => {
|
|
51
|
+
const d = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
|
|
52
|
+
_(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: d }, null, n), i = r.value, d && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: d }), o(i, n);
|
|
53
53
|
})(), i;
|
|
54
|
-
})(),
|
|
55
|
-
var
|
|
56
|
-
let l = [
|
|
54
|
+
})(), he = (() => {
|
|
55
|
+
var m;
|
|
56
|
+
let l = [T({
|
|
57
57
|
tabindex: "0",
|
|
58
58
|
"data-button": ""
|
|
59
|
-
})], r, n = [], i,
|
|
60
|
-
return
|
|
59
|
+
})], r, n = [], i, f = Y(U), u = [], O, d;
|
|
60
|
+
return m = class extends f {
|
|
61
61
|
/**
|
|
62
62
|
* The type attribute to use for the button.
|
|
63
63
|
* @default 'button'
|
|
@@ -73,19 +73,19 @@ let W = (() => {
|
|
|
73
73
|
this._formId = e;
|
|
74
74
|
}
|
|
75
75
|
get form() {
|
|
76
|
-
var e,
|
|
77
|
-
return this._formId ? ((
|
|
76
|
+
var e, s;
|
|
77
|
+
return this._formId ? ((s = (e = this.ownerDocument) == null ? void 0 : e.querySelector) == null ? void 0 : s.call(e, `form#${this._formId}`)) ?? null : this.internals.form;
|
|
78
78
|
}
|
|
79
79
|
constructor() {
|
|
80
|
-
if (super(), this._formId = (
|
|
81
|
-
if (this.type === "button" || await
|
|
80
|
+
if (super(), this._formId = (o(this, u), ""), this._handleButtonClick = async (e) => {
|
|
81
|
+
if (this.type === "button" || await X(e))
|
|
82
82
|
return;
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
83
|
+
const s = this.form;
|
|
84
|
+
if (s)
|
|
85
85
|
if (this.type === "submit") {
|
|
86
86
|
const c = document.createElement("button");
|
|
87
|
-
c.inert = !0, c.hidden = !0, c.name = this.name, c.value = this.value ?? "",
|
|
88
|
-
} else this.type === "reset" &&
|
|
87
|
+
c.inert = !0, c.hidden = !0, c.name = this.name, c.value = this.value ?? "", s.append(c), s.requestSubmit(c), c.remove();
|
|
88
|
+
} else this.type === "reset" && s.reset();
|
|
89
89
|
else return;
|
|
90
90
|
}, this._preventScrollOnSpaceKeydown = (e) => {
|
|
91
91
|
e.key === " " && (e.preventDefault(), e.target.toggleAttribute("data-active", !0));
|
|
@@ -94,29 +94,29 @@ let W = (() => {
|
|
|
94
94
|
}, this._dispatchClickEventOnSpaceKeyup = (e) => {
|
|
95
95
|
e.key === " " && (this._removeActiveMarker(e), this._dispatchClickEvent(e));
|
|
96
96
|
}, this._dispatchClickEvent = (e) => {
|
|
97
|
-
const { altKey:
|
|
97
|
+
const { altKey: s, ctrlKey: c, metaKey: z, shiftKey: $ } = e;
|
|
98
98
|
e.target.dispatchEvent(new PointerEvent("click", {
|
|
99
99
|
bubbles: !0,
|
|
100
100
|
cancelable: !0,
|
|
101
101
|
composed: !0,
|
|
102
102
|
pointerId: -1,
|
|
103
103
|
pointerType: "",
|
|
104
|
-
altKey:
|
|
104
|
+
altKey: s,
|
|
105
105
|
ctrlKey: c,
|
|
106
|
-
metaKey:
|
|
107
|
-
shiftKey:
|
|
106
|
+
metaKey: z,
|
|
107
|
+
shiftKey: $
|
|
108
108
|
}));
|
|
109
|
-
}, this.internals.role = "button", !
|
|
109
|
+
}, this.internals.role = "button", !Q) {
|
|
110
110
|
this.setupBaseEventHandlers();
|
|
111
111
|
const e = { passive: !0 };
|
|
112
|
-
this.addEventListener("click", this._handleButtonClick), this.addEventListener("keydown", this._preventScrollOnSpaceKeydown), this.addEventListener("keyup", this._dispatchClickEventOnSpaceKeyup, e), this.addEventListener("blur", this._removeActiveMarker, e), this.addEventListener("keypress", (
|
|
113
|
-
(
|
|
114
|
-
`) && this._dispatchClickEvent(
|
|
112
|
+
this.addEventListener("click", this._handleButtonClick), this.addEventListener("keydown", this._preventScrollOnSpaceKeydown), this.addEventListener("keyup", this._dispatchClickEventOnSpaceKeyup, e), this.addEventListener("blur", this._removeActiveMarker, e), this.addEventListener("keypress", (s) => {
|
|
113
|
+
(s.key === "Enter" || s.key === `
|
|
114
|
+
`) && this._dispatchClickEvent(s);
|
|
115
115
|
}, e);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
attributeChangedCallback(e,
|
|
119
|
-
(!["name", "value"].includes(e) ||
|
|
118
|
+
attributeChangedCallback(e, s, c) {
|
|
119
|
+
(!["name", "value"].includes(e) || s !== c) && super.attributeChangedCallback(e, s, c);
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Intentionally empty, as buttons are not targeted by form reset
|
|
@@ -128,7 +128,7 @@ let W = (() => {
|
|
|
128
128
|
* Intentionally empty, as buttons are not targeted by form restore
|
|
129
129
|
* @internal
|
|
130
130
|
*/
|
|
131
|
-
formStateRestoreCallback(e,
|
|
131
|
+
formStateRestoreCallback(e, s) {
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* Intentionally empty, as button does not write its data in form.
|
|
@@ -137,85 +137,93 @@ let W = (() => {
|
|
|
137
137
|
*/
|
|
138
138
|
updateFormValue() {
|
|
139
139
|
}
|
|
140
|
-
}, i =
|
|
141
|
-
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
} }, metadata: e }, null,
|
|
145
|
-
|
|
146
|
-
} }, metadata: e }, null,
|
|
140
|
+
}, i = m, (() => {
|
|
141
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
|
|
142
|
+
O = [g()], d = [g()], _(m, null, O, { kind: "setter", name: "type", static: !1, private: !1, access: { has: (s) => "type" in s, set: (s, c) => {
|
|
143
|
+
s.type = c;
|
|
144
|
+
} }, metadata: e }, null, u), _(m, null, d, { kind: "setter", name: "form", static: !1, private: !1, access: { has: (s) => "form" in s, set: (s, c) => {
|
|
145
|
+
s.form = c;
|
|
146
|
+
} }, metadata: e }, null, u), _(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: e }, null, n), i = r.value, e && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e }), o(i, n);
|
|
147
147
|
})(), i;
|
|
148
|
-
})(),
|
|
149
|
-
var
|
|
150
|
-
let l = [
|
|
148
|
+
})(), be = (() => {
|
|
149
|
+
var C, S, E, I, L, x, b;
|
|
150
|
+
let l = [T({
|
|
151
151
|
"data-link": ""
|
|
152
|
-
})], r, n = [], i,
|
|
153
|
-
return b = class extends
|
|
152
|
+
})], r, n = [], i, f = U, u, O = [], d = [], m, K = [], e = [], s, c = [], z = [], $, R = [], j = [], P, q = [], M = [], H, N = [], F = [];
|
|
153
|
+
return b = class extends f {
|
|
154
154
|
constructor() {
|
|
155
155
|
super();
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
k(this, C);
|
|
157
|
+
k(this, S);
|
|
158
|
+
k(this, E);
|
|
159
|
+
k(this, I);
|
|
160
|
+
k(this, L);
|
|
161
|
+
k(this, x);
|
|
162
|
+
h(this, C, o(this, O, "")), h(this, S, (o(this, d), o(this, K, ""))), h(this, E, (o(this, e), o(this, c, ""))), h(this, I, (o(this, z), o(this, R, !1))), h(this, L, (o(this, j), o(this, q, ""))), h(this, x, (o(this, M), o(this, N, ""))), this.language = (o(this, F), new Z(this)), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : y, Q || this.setupBaseEventHandlers();
|
|
162
163
|
}
|
|
163
164
|
/** The href value you want to link to. */
|
|
164
165
|
get href() {
|
|
165
|
-
return
|
|
166
|
+
return v(this, C);
|
|
166
167
|
}
|
|
167
|
-
set href(
|
|
168
|
-
|
|
168
|
+
set href(a) {
|
|
169
|
+
h(this, C, a);
|
|
169
170
|
}
|
|
170
171
|
/** Where to display the linked URL. */
|
|
171
172
|
get target() {
|
|
172
|
-
return
|
|
173
|
+
return v(this, S);
|
|
173
174
|
}
|
|
174
|
-
set target(
|
|
175
|
-
|
|
175
|
+
set target(a) {
|
|
176
|
+
h(this, S, a);
|
|
176
177
|
}
|
|
177
178
|
/** The relationship of the linked URL as space-separated link types. */
|
|
178
179
|
get rel() {
|
|
179
|
-
return
|
|
180
|
+
return v(this, E);
|
|
180
181
|
}
|
|
181
|
-
set rel(
|
|
182
|
-
|
|
182
|
+
set rel(a) {
|
|
183
|
+
h(this, E, a);
|
|
183
184
|
}
|
|
184
185
|
/** Whether the browser will show the download dialog on click. */
|
|
185
186
|
get download() {
|
|
186
|
-
return
|
|
187
|
+
return v(this, I);
|
|
187
188
|
}
|
|
188
|
-
set download(
|
|
189
|
-
|
|
189
|
+
set download(a) {
|
|
190
|
+
h(this, I, a);
|
|
190
191
|
}
|
|
191
192
|
/** This will be forwarded as aria-label to the inner anchor element. */
|
|
192
193
|
get accessibilityLabel() {
|
|
193
|
-
return
|
|
194
|
+
return v(this, L);
|
|
195
|
+
}
|
|
196
|
+
set accessibilityLabel(a) {
|
|
197
|
+
h(this, L, a);
|
|
198
|
+
}
|
|
199
|
+
/** This will be forwarded as aria-current to the inner anchor element. */
|
|
200
|
+
get accessibilityCurrent() {
|
|
201
|
+
return v(this, x);
|
|
194
202
|
}
|
|
195
|
-
set
|
|
196
|
-
|
|
203
|
+
set accessibilityCurrent(a) {
|
|
204
|
+
h(this, x, a);
|
|
197
205
|
}
|
|
198
206
|
/** @internal */
|
|
199
|
-
focus(
|
|
207
|
+
focus(a) {
|
|
200
208
|
var t;
|
|
201
|
-
(t = this.shadowRoot.querySelector("a")) == null || t.focus(
|
|
209
|
+
(t = this.shadowRoot.querySelector("a")) == null || t.focus(a);
|
|
202
210
|
}
|
|
203
211
|
/** @internal */
|
|
204
212
|
blur() {
|
|
205
|
-
var
|
|
206
|
-
(
|
|
213
|
+
var a;
|
|
214
|
+
(a = this.shadowRoot.querySelector("a")) == null || a.blur();
|
|
207
215
|
}
|
|
208
216
|
/** @internal */
|
|
209
217
|
click() {
|
|
210
|
-
var
|
|
211
|
-
(
|
|
218
|
+
var a;
|
|
219
|
+
(a = this.shadowRoot.querySelector("a")) == null || a.click();
|
|
212
220
|
}
|
|
213
221
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
214
222
|
render() {
|
|
215
223
|
return this.renderLink(this.renderTemplate());
|
|
216
224
|
}
|
|
217
|
-
renderLink(
|
|
218
|
-
return
|
|
225
|
+
renderLink(a) {
|
|
226
|
+
return B`
|
|
219
227
|
<a
|
|
220
228
|
class="sbb-action-base ${this.localName}"
|
|
221
229
|
href=${this.href || y}
|
|
@@ -223,36 +231,39 @@ let W = (() => {
|
|
|
223
231
|
target=${this.target || y}
|
|
224
232
|
rel=${this._evaluateRelAttribute()}
|
|
225
233
|
aria-label=${this.accessibilityLabel || y}
|
|
234
|
+
aria-current=${this.accessibilityCurrent || y}
|
|
226
235
|
tabindex=${this.maybeDisabled && !this.maybeDisabledInteractive ? "-1" : y}
|
|
227
236
|
aria-disabled=${this.maybeDisabled ? "true" : y}
|
|
228
237
|
>
|
|
229
|
-
${
|
|
230
|
-
${this.href && this.target === "_blank" ?
|
|
231
|
-
>. ${
|
|
238
|
+
${a}
|
|
239
|
+
${this.href && this.target === "_blank" ? B`<sbb-screen-reader-only
|
|
240
|
+
>. ${ee[this.language.current]}</sbb-screen-reader-only
|
|
232
241
|
>` : y}
|
|
233
242
|
</a>
|
|
234
243
|
`;
|
|
235
244
|
}
|
|
236
|
-
},
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
t.href =
|
|
240
|
-
} }, metadata:
|
|
241
|
-
t.target =
|
|
242
|
-
} }, metadata:
|
|
243
|
-
t.rel =
|
|
244
|
-
} }, metadata:
|
|
245
|
-
t.download =
|
|
246
|
-
} }, metadata:
|
|
247
|
-
t.accessibilityLabel =
|
|
248
|
-
} }, metadata:
|
|
245
|
+
}, C = new WeakMap(), S = new WeakMap(), E = new WeakMap(), I = new WeakMap(), L = new WeakMap(), x = new WeakMap(), i = b, (() => {
|
|
246
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
|
|
247
|
+
u = [D(), g()], m = [D(), g()], s = [D(), g()], $ = [D(), g({ type: Boolean })], P = [D(), g({ attribute: "accessibility-label" })], H = [D(), g({ attribute: "accessibility-current" })], _(b, null, u, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (t) => "href" in t, get: (t) => t.href, set: (t, p) => {
|
|
248
|
+
t.href = p;
|
|
249
|
+
} }, metadata: a }, O, d), _(b, null, m, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (t) => "target" in t, get: (t) => t.target, set: (t, p) => {
|
|
250
|
+
t.target = p;
|
|
251
|
+
} }, metadata: a }, K, e), _(b, null, s, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (t) => "rel" in t, get: (t) => t.rel, set: (t, p) => {
|
|
252
|
+
t.rel = p;
|
|
253
|
+
} }, metadata: a }, c, z), _(b, null, $, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (t) => "download" in t, get: (t) => t.download, set: (t, p) => {
|
|
254
|
+
t.download = p;
|
|
255
|
+
} }, metadata: a }, R, j), _(b, null, P, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (t) => "accessibilityLabel" in t, get: (t) => t.accessibilityLabel, set: (t, p) => {
|
|
256
|
+
t.accessibilityLabel = p;
|
|
257
|
+
} }, metadata: a }, q, M), _(b, null, H, { kind: "accessor", name: "accessibilityCurrent", static: !1, private: !1, access: { has: (t) => "accessibilityCurrent" in t, get: (t) => t.accessibilityCurrent, set: (t, p) => {
|
|
258
|
+
t.accessibilityCurrent = p;
|
|
259
|
+
} }, metadata: a }, N, F), _(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: a }, null, n), i = r.value, a && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), o(i, n);
|
|
249
260
|
})(), i;
|
|
250
261
|
})();
|
|
251
|
-
const
|
|
262
|
+
const w = class w extends J {
|
|
252
263
|
constructor() {
|
|
253
|
-
super(...arguments), this.willOpen = new
|
|
264
|
+
super(...arguments), this.willOpen = new A(this, w.events.willOpen, { cancelable: !0 }), this.didOpen = new A(this, w.events.didOpen, {
|
|
254
265
|
cancelable: !0
|
|
255
|
-
}), this.willClose = new
|
|
266
|
+
}), this.willClose = new A(this, w.events.willClose, { cancelable: !0 }), this.didClose = new A(this, w.events.didClose, { cancelable: !0 });
|
|
256
267
|
}
|
|
257
268
|
/** The state of the component. */
|
|
258
269
|
set state(r) {
|
|
@@ -269,16 +280,16 @@ const g = class g extends F {
|
|
|
269
280
|
super.connectedCallback(), this.state || (this.state = "closed");
|
|
270
281
|
}
|
|
271
282
|
};
|
|
272
|
-
|
|
283
|
+
w.events = {
|
|
273
284
|
willOpen: "willOpen",
|
|
274
285
|
didOpen: "didOpen",
|
|
275
286
|
willClose: "willClose",
|
|
276
287
|
didClose: "didClose"
|
|
277
288
|
};
|
|
278
|
-
let
|
|
289
|
+
let G = w;
|
|
279
290
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
291
|
+
U as SbbActionBaseElement,
|
|
292
|
+
he as SbbButtonBaseElement,
|
|
293
|
+
be as SbbLinkBaseElement,
|
|
294
|
+
G as SbbOpenCloseBaseElement
|
|
284
295
|
};
|
package/core/controllers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isServer as n } from "lit";
|
|
2
2
|
import { readConfig as b } from "./config.js";
|
|
3
|
-
import { S as f,
|
|
3
|
+
import { S as f, i as m, h as g } from "../sbb-tokens-BgDF8jIh.js";
|
|
4
4
|
class S {
|
|
5
5
|
get signal() {
|
|
6
6
|
var t;
|
|
@@ -17,7 +17,7 @@ class S {
|
|
|
17
17
|
(t = this._abortController) == null || t.abort(), this._abortController = void 0;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const v = ["script", "head", "template", "style"], y = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set();
|
|
21
21
|
class O {
|
|
22
22
|
constructor(t, e = y, i = A) {
|
|
23
23
|
var s, o;
|
|
@@ -53,7 +53,7 @@ class O {
|
|
|
53
53
|
var e, i;
|
|
54
54
|
let t = this._currentOverlay();
|
|
55
55
|
for (; t !== document.documentElement && t !== null; )
|
|
56
|
-
Array.from(((e = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : e.childNodes) ?? []).filter((s) => s !== t && s instanceof window.HTMLElement && !
|
|
56
|
+
Array.from(((e = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : e.childNodes) ?? []).filter((s) => s !== t && s instanceof window.HTMLElement && !v.includes(s.localName)).forEach((s) => {
|
|
57
57
|
this._inertElements.add(s), s.inert || (s.inert = !0, s.toggleAttribute("data-sbb-inert", !0)), s.hasAttribute("aria-hidden") || (s.setAttribute("aria-hidden", "true"), s.toggleAttribute("data-sbb-aria-hidden", !0));
|
|
58
58
|
}), t = (t == null ? void 0 : t.parentElement) ?? ((i = t == null ? void 0 : t.getRootNode()) == null ? void 0 : i.host) ?? null;
|
|
59
59
|
}
|
|
@@ -92,7 +92,7 @@ r._defaultLanguage = "en", r._supportedLocales = ["en", "de", "fr", "it"], r._li
|
|
|
92
92
|
attributeOldValue: !0
|
|
93
93
|
};
|
|
94
94
|
let u = r;
|
|
95
|
-
const _ = (a) => a / f, w = "(forced-colors: active)", M = "(any-hover: hover)", N = "(pointer: coarse)", Q = `(min-width: ${_(
|
|
95
|
+
const _ = (a) => a / f, w = "(forced-colors: active)", M = "(any-hover: hover)", N = "(pointer: coarse)", Q = `(min-width: ${_(g)}rem)`, H = `(max-width: ${_(m)}rem)`, l = /* @__PURE__ */ new Map();
|
|
96
96
|
class L {
|
|
97
97
|
constructor(t, e) {
|
|
98
98
|
this._queries = e, t.addController(this);
|
|
@@ -56,7 +56,7 @@ export declare abstract class DateAdapter<T = any> {
|
|
|
56
56
|
* Checks whether a given `date` is valid.
|
|
57
57
|
* @param date
|
|
58
58
|
*/
|
|
59
|
-
abstract isValid(date: T | null | undefined):
|
|
59
|
+
abstract isValid(date: T | null | undefined): date is T;
|
|
60
60
|
/**
|
|
61
61
|
* Creates a new date by cloning the given one.
|
|
62
62
|
* @param date
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAU,CAAC;AACvC,eAAO,MAAM,cAAc,EAAE,MAAW,CAAC;AACzC,eAAO,MAAM,WAAW,QACgE,CAAC;AAEzF;;;;GAIG;AACH,8BAAsB,WAAW,CAAC,CAAC,GAAG,GAAG;IACvC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;;OAIG;aACa,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAEzC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;OAGG;aACa,YAAY,CAAC,IAAI,EAAE,CAAC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AE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;KAAE,GACvD,MAAM;IAwBT;;;OAGG;aACa,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAEjD;;;OAGG;aACa,OAAO,IAAI,CAAC;IAE5B;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAKjC;;;;;OAKG;IACI,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI;IAInD;;OAEG;IACI,kBAAkB,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAO1C;;;;;;OAMG;IACI,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM;IAQ/C;;;;;;OAMG;IACI,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,OAAO;IAY3D;;;;;;;OAOG;IACI,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC;CAS7D"}
|
|
@@ -37,7 +37,7 @@ export declare class NativeDateAdapter extends DateAdapter<Date> {
|
|
|
37
37
|
/** Checks whether the given `obj` is a Date. */
|
|
38
38
|
isDateInstance(obj: any): boolean;
|
|
39
39
|
/** Checks whether the given `date` is a valid Date. */
|
|
40
|
-
isValid(date: Date | null | undefined):
|
|
40
|
+
isValid(date: Date | null | undefined): date is Date;
|
|
41
41
|
/** Creates a new date by cloning the given one. */
|
|
42
42
|
clone(date: Date): Date;
|
|
43
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/native-date-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO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mDAAmD;IAC5C,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAI9B;;;;OAIG;IACI,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxD;;;;OAIG;IACI,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ1D,yFAAyF;IAClF,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKtD,6EAA6E;IAC7D,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAkB9E,+DAA+D;IACxD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;IA4BtD,OAAO,IAAI,IAAI;IAI/B;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAId,gEAAgE;IAChE,OAAO,CAAC,uBAAuB;CAShC;AAED,eAAO,MAAM,kBAAkB,mBAA0B,CAAC"}
|
package/core/datetime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SbbLanguageController as i } from "./controllers.js";
|
|
2
|
-
const o = 7, f = 4, m = 4, d = 24,
|
|
3
|
-
class
|
|
2
|
+
const o = 7, f = 4, m = 4, d = 24, u = /(^0?[1-9]?|[12]?[0-9]?|3?[01]?)[.,\\/\-\s](0?[1-9]?|1?[0-2]?)?[.,\\/\-\s](\d{1,4}$)?/;
|
|
3
|
+
class l {
|
|
4
4
|
/**
|
|
5
5
|
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
6
6
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
@@ -89,7 +89,7 @@ class u {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
const D = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
92
|
-
class g extends
|
|
92
|
+
class g extends l {
|
|
93
93
|
constructor(t = 15) {
|
|
94
94
|
super(), this._cutoffYearOffset = t;
|
|
95
95
|
}
|
|
@@ -215,7 +215,7 @@ class g extends u {
|
|
|
215
215
|
parse(t, e) {
|
|
216
216
|
if (!t)
|
|
217
217
|
return null;
|
|
218
|
-
const r = t.replace(/\D/g, " ").trim(), n = r == null ? void 0 : r.match(
|
|
218
|
+
const r = t.replace(/\D/g, " ").trim(), n = r == null ? void 0 : r.match(u);
|
|
219
219
|
if (!n || n.index !== 0 || n.length <= 2 || n.some((s) => s === void 0) || !this.isValid(this.createDate(+n[3], +n[2], +n[1])))
|
|
220
220
|
return null;
|
|
221
221
|
let a = +n[3];
|
|
@@ -245,8 +245,8 @@ class g extends u {
|
|
|
245
245
|
const w = new g();
|
|
246
246
|
export {
|
|
247
247
|
o as DAYS_PER_ROW,
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
l as DateAdapter,
|
|
249
|
+
u as FORMAT_DATE,
|
|
250
250
|
f as MONTHS_PER_ROW,
|
|
251
251
|
g as NativeDateAdapter,
|
|
252
252
|
d as YEARS_PER_PAGE,
|
package/core/dom/scroll.d.ts
CHANGED
package/core/dom/scroll.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/scroll.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,gBAAgB,CAAU;IAE3B,aAAa,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/scroll.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,gBAAgB,CAAU;IAE3B,aAAa,IAAI,IAAI;IAsBrB,YAAY,IAAI,IAAI;CAc5B"}
|