@sbb-esta/lyne-elements 3.11.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-group/action-group.component.js +1 -1
- package/alert/alert/alert.component.js +1 -1
- package/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete-base-element.js +72 -59
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/badge.css +1 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.js +4 -4
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +1 -1
- package/button/common.js +1 -1
- package/button/mini-button/mini-button.component.js +1 -1
- package/button.js +1 -1
- package/calendar/calendar.component.js +1 -1
- package/card/card/card.component.js +1 -1
- package/card/card-badge/card-badge.component.js +1 -1
- package/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/carousel/carousel-list/carousel-list.component.js +62 -40
- package/checkbox/checkbox-group/checkbox-group.component.js +1 -1
- package/chip/chip/chip.component.js +1 -1
- package/chip/chip-group/chip-group.component.js +1 -1
- package/chip-label/chip-label.component.js +1 -1
- package/container/container/container.component.js +11 -11
- package/container/sticky-bar/sticky-bar.component.js +9 -9
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-input-mixin.js +55 -38
- package/core/mixins.js +1 -1
- package/core/overlay/overlay-option-panel.d.ts +2 -1
- package/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/core/overlay/overlay-option-panel.js +8 -5
- package/core/overlay/position.d.ts +2 -0
- package/core/overlay/position.d.ts.map +1 -1
- package/core/overlay/position.js +19 -17
- package/core/styles/layout.scss +4 -0
- package/core/styles/mixins/badge.scss +3 -0
- package/core/styles/mixins/layout.scss +5 -4
- package/core/styles/mixins/link.scss +0 -11
- package/custom-elements.json +573 -263
- package/date-input/date-input.component.js +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete-base-element.js +25 -5
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -2
- package/development/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/development/carousel/carousel-list/carousel-list.component.js +51 -19
- package/development/container/container/container.component.js +3 -3
- package/development/container/sticky-bar/sticky-bar.component.js +5 -5
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-input-mixin.js +47 -12
- package/development/core/overlay/overlay-option-panel.d.ts +2 -1
- package/development/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/development/core/overlay/overlay-option-panel.js +6 -3
- package/development/core/overlay/position.d.ts +2 -0
- package/development/core/overlay/position.d.ts.map +1 -1
- package/development/core/overlay/position.js +3 -2
- package/development/footer/footer.component.js +3 -3
- package/development/header/header/header.component.js +3 -3
- package/development/lead-container/lead-container.component.js +8 -7
- package/development/link/common/block-link-common.js +2 -12
- package/development/link/common/inline-link-common.js +2 -10
- package/development/link/common/link-common.js +1 -1
- package/development/link/common.js +1 -1
- package/development/{link-common-DPLJx5Uo.js → link-common-BDFF9Oiz.js} +1 -3
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -2
- package/development/link.js +1 -1
- package/development/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
- package/development/mini-calendar/mini-calendar/mini-calendar.component.js +5 -7
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +3 -3
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup/optgroup-base-element.js +2 -1
- package/development/option/option/option-base-element.js +2 -2
- package/development/paginator/common/paginator-common.d.ts +2 -1
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/paginator/common/paginator-common.js +87 -49
- package/development/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
- package/development/paginator/paginator/paginator.component.d.ts +6 -0
- package/development/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/development/paginator/paginator/paginator.component.js +19 -4
- package/development/select/select.component.d.ts +12 -8
- package/development/select/select.component.d.ts.map +1 -1
- package/development/select/select.component.js +97 -85
- package/development/tag/tag/tag.component.js +2 -1
- package/dialog/dialog/dialog.component.js +1 -1
- package/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
- package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +1 -1
- package/file-selector/common.js +1 -1
- package/file-selector-common-BEWjyy75.js +5 -0
- package/file-selector.js +1 -1
- package/flip-card/flip-card/flip-card.component.js +1 -1
- package/flip-card/flip-card-summary/flip-card-summary.component.js +1 -1
- package/footer/footer.component.js +8 -8
- package/form-error/form-error.component.js +1 -1
- package/form-field/form-field/form-field.component.js +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +1 -1
- package/header/common/header-action-common.js +1 -1
- package/header/header/header.component.js +32 -32
- package/icon-sidebar-button-common-XcKoF2SP.js +7 -0
- package/layout.css +9 -3
- package/lead-container/lead-container.component.js +8 -8
- package/link/common/block-link-common.js +25 -25
- package/link/common/inline-link-common.js +7 -7
- package/link/common/link-common.js +1 -1
- package/link/common.js +1 -1
- package/link-common-nA3q92jp.js +46 -0
- package/link-list/link-list/link-list.component.js +1 -1
- package/link-list/link-list-anchor/link-list-anchor.component.js +5 -5
- package/link.js +1 -1
- package/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/logo/logo.component.js +1 -1
- package/map-container/map-container.component.js +1 -1
- package/menu/common/menu-action-common.js +1 -1
- package/menu/menu/menu.component.js +1 -1
- package/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
- package/mini-calendar/mini-calendar/mini-calendar.component.js +5 -9
- package/mini-calendar/mini-calendar-day/mini-calendar-day.component.js +1 -1
- package/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +16 -16
- package/navigation/common/navigation-action-common.js +1 -1
- package/navigation/navigation/navigation.component.js +1 -1
- package/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/navigation/navigation-section/navigation-section.component.js +1 -1
- package/notification/notification.component.js +1 -1
- package/off-brand-theme.css +10 -3
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup/optgroup-base-element.js +5 -5
- package/option/option/option-base-element.js +1 -1
- package/option/option/option.component.js +1 -1
- package/overlay/overlay.component.js +1 -1
- package/package.json +1 -1
- package/paginator/common/paginator-common.d.ts +2 -1
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/paginator/common/paginator-common.js +102 -81
- package/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/paginator/compact-paginator/compact-paginator.component.js +2 -1
- package/paginator/paginator/paginator.component.d.ts +6 -0
- package/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/paginator/paginator/paginator.component.js +57 -45
- package/popover/popover/popover.component.js +1 -1
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/radio-button/common.js +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/radio-button-common-Bw2t3Sxz.js +5 -0
- package/radio-button.js +1 -1
- package/safety-theme.css +10 -3
- package/select/select.component.d.ts +12 -8
- package/select/select.component.d.ts.map +1 -1
- package/select/select.component.js +136 -128
- package/selection-expansion-panel/selection-expansion-panel.component.js +1 -1
- package/sidebar/common.js +1 -1
- package/sidebar/sidebar-container/sidebar-container.component.js +1 -1
- package/sidebar.js +1 -1
- package/signet/signet.component.js +1 -1
- package/slider/slider.component.js +1 -1
- package/standard-theme.css +10 -3
- package/stepper/step-label/step-label.component.js +1 -1
- package/stepper/stepper/stepper.component.js +1 -1
- package/tabs/tab-label/tab-label.component.js +1 -1
- package/tag/tag/tag.component.js +4 -4
- package/teaser/teaser.component.js +1 -1
- package/teaser-hero/teaser-hero.component.js +1 -1
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-Du28QCY3.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +1 -1
- package/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +1 -1
- package/toggle/toggle/toggle.component.js +1 -1
- package/toggle-check/toggle-check.component.js +1 -1
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +1 -1
- package/train/train-wagon/train-wagon.component.js +1 -1
- package/transparent-button-DJIkG5hj.js +9 -0
- package/visual-checkbox/visual-checkbox.component.js +1 -1
- package/file-selector-common-D88J9PEh.js +0 -5
- package/icon-sidebar-button-common-BeRXvifI.js +0 -7
- package/link-common-BBKGg9HN.js +0 -46
- package/radio-button-common-Nm9ULjVb.js +0 -5
- package/teaser-product-common-DIra6aVg.js +0 -5
- package/transparent-button-Bg9fU_iZ.js +0 -9
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
2
|
-
import { isServer as
|
|
1
|
+
import { __esDecorate as l, __runInitializers as f } from "tslib";
|
|
2
|
+
import { isServer as r, html as m } from "lit";
|
|
3
3
|
import { property as c, eventOptions as b } from "lit/decorators.js";
|
|
4
|
-
import { sbbInputModalityDetector as
|
|
5
|
-
import { SbbLanguageController as g } from "../controllers.js";
|
|
6
|
-
import { isWebkit as v } from "../dom.js";
|
|
7
|
-
import { i18nInputRequired as
|
|
8
|
-
import { SbbDisabledMixin as
|
|
9
|
-
import { SbbElementInternalsMixin as
|
|
10
|
-
import { SbbFormAssociatedMixin as
|
|
11
|
-
import { SbbReadonlyMixin as
|
|
12
|
-
import { SbbRequiredMixin as
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
4
|
+
import { sbbInputModalityDetector as p } from "../a11y.js";
|
|
5
|
+
import { SbbLanguageController as g, SbbMediaQueryPointerCoarse as _ } from "../controllers.js";
|
|
6
|
+
import { isWebkit as v, isBlink as y } from "../dom.js";
|
|
7
|
+
import { i18nInputRequired as C } from "../i18n.js";
|
|
8
|
+
import { SbbDisabledMixin as E } from "./disabled-mixin.js";
|
|
9
|
+
import { SbbElementInternalsMixin as S } from "./element-internals-mixin.js";
|
|
10
|
+
import { SbbFormAssociatedMixin as x } from "./form-associated-mixin.js";
|
|
11
|
+
import { SbbReadonlyMixin as k } from "./readonly-mixin.js";
|
|
12
|
+
import { SbbRequiredMixin as w } from "./required-mixin.js";
|
|
13
|
+
const A = () => {
|
|
14
|
+
if (r)
|
|
15
15
|
return !1;
|
|
16
16
|
const a = document.createElement("div");
|
|
17
17
|
return a.setAttribute("contenteditable", "PLAINTEXT-ONLY"), a.contentEditable === "plaintext-only";
|
|
18
|
-
},
|
|
18
|
+
}, O = A(), z = (a) => (() => {
|
|
19
19
|
var s;
|
|
20
|
-
let
|
|
21
|
-
return s = class extends
|
|
20
|
+
let h = k(E(w(x(S(a))))), n = [], d, u, o;
|
|
21
|
+
return s = class extends h {
|
|
22
22
|
/**
|
|
23
23
|
* Form type of element.
|
|
24
24
|
* @default 'text'
|
|
@@ -30,7 +30,7 @@ const k = () => {
|
|
|
30
30
|
* The value of the input. Reflects the current text value of this input.
|
|
31
31
|
*/
|
|
32
32
|
set value(e) {
|
|
33
|
-
this._value = this._cleanText(e), this.hasUpdated &&
|
|
33
|
+
this._value = this._cleanText(e), this.hasUpdated && this._assignValue(this._value), this.dispatchEvent(new Event("displayvaluechange", { bubbles: !0, composed: !0 }));
|
|
34
34
|
}
|
|
35
35
|
get value() {
|
|
36
36
|
return this._value ?? "";
|
|
@@ -42,11 +42,11 @@ const k = () => {
|
|
|
42
42
|
return this.getAttribute("placeholder") ?? "";
|
|
43
43
|
}
|
|
44
44
|
constructor() {
|
|
45
|
-
super(), this._shouldEmitChange = (
|
|
45
|
+
super(), this._shouldEmitChange = (f(this, n), !1), this._shouldTriggerSubmit = !1, this.language = new g(this), this._value = "", this.addEventListener?.("input", () => {
|
|
46
46
|
const e = this._value;
|
|
47
47
|
this._value = this._cleanText(this.textContent ?? ""), this.requestUpdate("value", e), this.internals.states.add("interacted"), this._shouldEmitChange = !0;
|
|
48
48
|
}, { capture: !0 }), this.addEventListener?.("change", () => this._shouldEmitChange = !1, { capture: !0 }), this.addEventListener?.("keydown", (e) => {
|
|
49
|
-
if ((e.key === "Enter" || e.key === `
|
|
49
|
+
if (this._requiresEmptyPatch() && this._assignValue(""), (e.key === "Enter" || e.key === `
|
|
50
50
|
`) && e.isTrusted)
|
|
51
51
|
e.preventDefault(), e.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", e));
|
|
52
52
|
else if (v && this.value && (e.key === "Backspace" || e.key === "Delete") && e.isTrusted) {
|
|
@@ -58,33 +58,37 @@ const k = () => {
|
|
|
58
58
|
t.startOffset !== t.endOffset ? (t.deleteContents(), this._dispatchInputEvent()) : e.key === "Backspace" && t.startOffset > 0 ? (t.setStart(t.startContainer, t.startOffset - 1), t.deleteContents(), this._dispatchInputEvent()) : e.key === "Delete" && t.endOffset < this.value.length && (t.setEnd(t.endContainer, t.endOffset + 1), t.deleteContents(), this._dispatchInputEvent());
|
|
59
59
|
}
|
|
60
60
|
}, { capture: !0 }), this.addEventListener?.("keyup", (e) => {
|
|
61
|
-
|
|
62
|
-
`
|
|
61
|
+
e.key === "Enter" || e.key === `
|
|
62
|
+
` ? (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, this.form?.requestSubmit())) : this._requiresEmptyPatch() && this._setCursorAt(0);
|
|
63
63
|
}, { capture: !0 }), this.addEventListener?.("paste", (e) => {
|
|
64
|
-
e.preventDefault();
|
|
64
|
+
e.preventDefault(), this._requiresEmptyPatch() && this._assignValue("");
|
|
65
65
|
const t = this._cleanText(e.clipboardData?.getData("text/plain") ?? ""), i = window.getSelection()?.getRangeAt(0);
|
|
66
66
|
!i || !t || (i.deleteContents(), i.insertNode(document.createTextNode(this.preparePastedText(t))), i.setStart(i.endContainer, i.endOffset), this._dispatchInputEvent());
|
|
67
67
|
}), this.addEventListener?.("focus", () => {
|
|
68
|
-
|
|
68
|
+
p.mostRecentModality === "keyboard" && window.getSelection()?.selectAllChildren(this);
|
|
69
|
+
}), this.addEventListener?.("touchend", () => {
|
|
70
|
+
this._requiresEmptyPatch() && (this._assignValue(" "), this._setCursorAt(0));
|
|
71
|
+
}), this.addEventListener?.("click", () => {
|
|
72
|
+
this._requiresEmptyPatch() && p.mostRecentModality === "touch" && this._setCursorAt(0);
|
|
69
73
|
}), this.addEventListener?.("blur", () => {
|
|
70
|
-
window.getSelection()?.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
|
|
74
|
+
window.getSelection()?.removeAllRanges(), this.value === "" && this._assignValue(""), this._emitChangeIfNecessary(), this.scrollLeft = 0;
|
|
71
75
|
}, { capture: !0 });
|
|
72
76
|
}
|
|
73
77
|
isDisabledExternally() {
|
|
74
78
|
return this.formDisabled;
|
|
75
79
|
}
|
|
76
80
|
connectedCallback() {
|
|
77
|
-
super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.
|
|
81
|
+
super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this._assignValue(this.value);
|
|
78
82
|
}
|
|
79
83
|
focus(e) {
|
|
80
84
|
if (super.focus(e), this._canSelect()) {
|
|
81
85
|
const t = window.getSelection();
|
|
82
86
|
if (!t)
|
|
83
87
|
return;
|
|
84
|
-
|
|
88
|
+
const i = t.rangeCount > 0 ? t.getRangeAt(0) : null;
|
|
85
89
|
if (i && i.startOffset !== 0)
|
|
86
90
|
return;
|
|
87
|
-
|
|
91
|
+
this._setCursorAt(this.textContent.length);
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
attributeChangedCallback(e, t, i) {
|
|
@@ -119,7 +123,7 @@ const k = () => {
|
|
|
119
123
|
window.getSelection()?.selectAllChildren(this);
|
|
120
124
|
}
|
|
121
125
|
firstUpdated(e) {
|
|
122
|
-
super.firstUpdated(e), this.value && !this.innerHTML.length &&
|
|
126
|
+
super.firstUpdated(e), this.value && !this.innerHTML.length && this._assignValue(this.value);
|
|
123
127
|
}
|
|
124
128
|
requestUpdate(e, t, i) {
|
|
125
129
|
super.requestUpdate(e, t, i), this.isConnected && (e === "disabled" || e === "formDisabled" || e === "readOnly") && this._updateContenteditable();
|
|
@@ -128,11 +132,24 @@ const k = () => {
|
|
|
128
132
|
return super.shouldValidate(e) || e === "value" || e === "required";
|
|
129
133
|
}
|
|
130
134
|
validate() {
|
|
131
|
-
super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing",
|
|
135
|
+
super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", C[this.language.current]) : this.removeValidityFlag("valueMissing");
|
|
132
136
|
}
|
|
133
137
|
preparePastedText(e) {
|
|
134
138
|
return e;
|
|
135
139
|
}
|
|
140
|
+
_requiresEmptyPatch() {
|
|
141
|
+
return r ? !1 : y && this.value === "" && window.matchMedia(_).matches;
|
|
142
|
+
}
|
|
143
|
+
_assignValue(e) {
|
|
144
|
+
this.innerHTML = e;
|
|
145
|
+
}
|
|
146
|
+
_setCursorAt(e) {
|
|
147
|
+
const t = window.getSelection();
|
|
148
|
+
if (!t)
|
|
149
|
+
return;
|
|
150
|
+
const i = document.createRange();
|
|
151
|
+
i.setStart(this.firstChild, e), i.collapse(!0), t.removeAllRanges(), t.addRange(i);
|
|
152
|
+
}
|
|
136
153
|
_cleanText(e) {
|
|
137
154
|
return e === null ? "" : `${e}`.replace(/[\n\r]+/g, "");
|
|
138
155
|
}
|
|
@@ -145,9 +162,9 @@ const k = () => {
|
|
|
145
162
|
e.remove();
|
|
146
163
|
}
|
|
147
164
|
_updateContenteditable() {
|
|
148
|
-
if (!
|
|
165
|
+
if (!r && this.isConnected) {
|
|
149
166
|
this.internals.ariaReadOnly = this.readOnly ? "true" : null, this.internals.ariaDisabled = this.disabled ? "true" : null;
|
|
150
|
-
const e = this.disabled || this.readOnly ? "false" :
|
|
167
|
+
const e = this.disabled || this.readOnly ? "false" : O ? "plaintext-only" : "true";
|
|
151
168
|
this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
|
|
152
169
|
}
|
|
153
170
|
}
|
|
@@ -155,20 +172,20 @@ const k = () => {
|
|
|
155
172
|
this._shouldEmitChange && (this._shouldEmitChange = !1, this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
156
173
|
}
|
|
157
174
|
_canSelect() {
|
|
158
|
-
return !
|
|
175
|
+
return !r && !this.disabled && !this.readOnly && !!this.value;
|
|
159
176
|
}
|
|
160
177
|
render() {
|
|
161
|
-
return
|
|
178
|
+
return m`<slot @slotchange=${this._cleanChildren}></slot>`;
|
|
162
179
|
}
|
|
163
180
|
}, (() => {
|
|
164
|
-
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
165
|
-
|
|
181
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
182
|
+
d = [c()], u = [c({ attribute: !1 })], o = [b({ passive: !0 })], l(s, null, d, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t, i) => {
|
|
166
183
|
t.value = i;
|
|
167
|
-
} }, metadata: e }, null, n),
|
|
184
|
+
} }, metadata: e }, null, n), l(s, null, u, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (t) => "placeholder" in t, set: (t, i) => {
|
|
168
185
|
t.placeholder = i;
|
|
169
|
-
} }, metadata: e }, null, n),
|
|
186
|
+
} }, metadata: e }, null, n), l(s, null, o, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (t) => "_cleanChildren" in t, get: (t) => t._cleanChildren }, metadata: e }, null, n), e && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
170
187
|
})(), s.role = "textbox", s.formFieldAssociated = !0, s;
|
|
171
188
|
})();
|
|
172
189
|
export {
|
|
173
|
-
|
|
190
|
+
z as SbbFormAssociatedInputMixin
|
|
174
191
|
};
|
package/core/mixins.js
CHANGED
|
@@ -14,7 +14,7 @@ import { SbbReadonlyMixin as P } from "./mixins/readonly-mixin.js";
|
|
|
14
14
|
import { SbbSelectionPanelMixin as q } from "./mixins/selection-panel-mixin.js";
|
|
15
15
|
import { SbbUpdateSchedulerMixin as H } from "./mixins/update-scheduler-mixin.js";
|
|
16
16
|
import { css as e } from "lit";
|
|
17
|
-
const n = e`:host{--sbb-selection-panel-background: var( --sbb-selection-panel-inner-background, var(--sbb-background-color-1) );--sbb-selection-panel-border-color: var(--sbb-border-color-4-inverted);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-3);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);--sbb-selection-panel-subtext-color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-panel-inner-background, var(--sbb-background-color-3) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-border-color-3);--sbb-selection-panel-border-width: var( --sbb-selection-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media
|
|
17
|
+
const n = e`:host{--sbb-selection-panel-background: var( --sbb-selection-panel-inner-background, var(--sbb-background-color-1) );--sbb-selection-panel-border-color: var(--sbb-border-color-4-inverted);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-3);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);--sbb-selection-panel-subtext-color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-panel-inner-background, var(--sbb-background-color-3) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-border-color-3);--sbb-selection-panel-border-width: var( --sbb-selection-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media(forced-colors:active){.sbb-selection-panel:after{content:"";display:block;position:absolute;inset:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;inset:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
|
|
18
18
|
export {
|
|
19
19
|
b as SbbAnimationCompleteMixin,
|
|
20
20
|
a as SbbDisabledInteractiveMixin,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @param optionContainer The reference to the option panel.
|
|
6
6
|
* @param container The element which has the position:fixed applied.
|
|
7
7
|
* @param element The reference to the component.
|
|
8
|
+
* @param position The allowed position of the overlay relative to the origin.
|
|
8
9
|
*/
|
|
9
|
-
export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement): void;
|
|
10
|
+
export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement, position?: 'auto' | 'above' | 'below'): void;
|
|
10
11
|
//# sourceMappingURL=overlay-option-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,WAAW,EAC1B,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,MAAM,GAAG,OAAO,GAAG,OAAgB,GAC5C,IAAI,CAsBN"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { getElementPosition as
|
|
2
|
-
function
|
|
3
|
-
if (!
|
|
1
|
+
import { getElementPosition as r } from "./position.js";
|
|
2
|
+
function b(e, o, i, a, t, p = "auto") {
|
|
3
|
+
if (!e || !o)
|
|
4
4
|
return;
|
|
5
5
|
t.style.setProperty("--sbb-options-panel-width", `${o.offsetWidth}px`), t.style.setProperty("--sbb-options-panel-origin-height", `${o.offsetHeight}px`);
|
|
6
|
-
const s =
|
|
6
|
+
const s = r(i, o, a, {
|
|
7
|
+
forceBelow: p === "below",
|
|
8
|
+
forceAbove: p === "above"
|
|
9
|
+
});
|
|
7
10
|
t.style.setProperty("--sbb-options-panel-position-x", `${s.left}px`), t.style.setProperty("--sbb-options-panel-position-y", `${s.top}px`), t.style.setProperty("--sbb-options-panel-max-height", s.maxHeight), t.setAttribute("data-options-panel-position", s.alignment.vertical), o.setAttribute("data-options-panel-position", s.alignment.vertical);
|
|
8
11
|
}
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
b as setOverlayPosition
|
|
11
14
|
};
|
|
@@ -37,6 +37,8 @@ export declare function getElementPosition(element: HTMLElement, trigger: HTMLEl
|
|
|
37
37
|
horizontalOffset?: number;
|
|
38
38
|
centered?: boolean;
|
|
39
39
|
responsiveHeight?: boolean;
|
|
40
|
+
forceAbove?: boolean;
|
|
41
|
+
forceBelow?: boolean;
|
|
40
42
|
}): SbbElementPositionInfos;
|
|
41
43
|
/**
|
|
42
44
|
* Determines the position of an element relative to a trigger element by evaluating
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/position.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,WAAW,EACX,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CACjG,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAoCrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,KAAK,EAAE,UAAU,GAAG,YAAY,GAC/B,OAAO,CAYT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/position.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,WAAW,EACX,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CACjG,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAoCrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,KAAK,EAAE,UAAU,GAAG,YAAY,GAC/B,OAAO,CAYT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GACA,uBAAuB,CAsGzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,uBAAuB,CAgEzB"}
|
package/core/overlay/position.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function R(t) {
|
|
2
|
-
const o = window.getComputedStyle(t), c = o.display,
|
|
3
|
-
if (c !== "none" &&
|
|
2
|
+
const o = window.getComputedStyle(t), c = o.display, s = parseInt(o.maxHeight, 10).toString();
|
|
3
|
+
if (c !== "none" && s !== "0")
|
|
4
4
|
return {
|
|
5
5
|
scrollHeight: t.scrollHeight,
|
|
6
6
|
clientHeight: t.clientHeight,
|
|
@@ -10,8 +10,8 @@ function R(t) {
|
|
|
10
10
|
offsetWidth: t.offsetWidth
|
|
11
11
|
};
|
|
12
12
|
t.style.position = "absolute", t.style.visibility = "hidden", t.style.display = "block";
|
|
13
|
-
const
|
|
14
|
-
return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight:
|
|
13
|
+
const p = t.scrollHeight, n = t.clientHeight, g = t.offsetHeight, r = t.scrollWidth, e = t.clientWidth, i = t.offsetWidth;
|
|
14
|
+
return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: p, clientHeight: n, offsetHeight: g, scrollWidth: r, clientWidth: e, offsetWidth: i };
|
|
15
15
|
}
|
|
16
16
|
function x(t, o) {
|
|
17
17
|
if (!t || !o)
|
|
@@ -19,33 +19,35 @@ function x(t, o) {
|
|
|
19
19
|
const c = t.getBoundingClientRect();
|
|
20
20
|
return c.top <= o.clientY && o.clientY <= c.top + c.height && c.left <= o.clientX && o.clientX <= c.left + c.width;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const n =
|
|
24
|
-
let
|
|
22
|
+
function w(t, o, c, s) {
|
|
23
|
+
const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = s?.responsiveHeight || !1, e = o.getBoundingClientRect(), i = R(t), f = e.left, H = e.top, W = document.documentElement.clientWidth - (f + e.width), d = H - n, u = document.documentElement.clientHeight - (H + e.height + n);
|
|
24
|
+
let h = f, m = H + e.height + n, l = i.offsetWidth - e.width;
|
|
25
25
|
const a = { horizontal: "start", vertical: "below" };
|
|
26
26
|
let O = `${u - n}px`;
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
27
|
+
s?.centered && f - 16 + e.width / 2 > i.offsetWidth / 2 && W - 16 > l / 2 && (h -= l /= 2, a.horizontal = "center"), W < l && f > l && (h = h - l, a.horizontal = "end"), g && a.horizontal !== "center" && e.width / 2 < g && (h += g * (a.horizontal === "start" ? -1 : 1)), (f < l && W < l || document.documentElement.clientWidth < i.offsetWidth) && (h = document.documentElement.clientWidth / 2 - i.offsetWidth / 2);
|
|
28
|
+
const b = u - n < i.scrollHeight && d - n > (r ? i.clientHeight : i.scrollHeight) || d > u && u - n < i.clientHeight && !r;
|
|
29
|
+
!s?.forceBelow && (s?.forceAbove || b) && (m = d < i.scrollHeight ? m - e.height - d - n : H - i.clientHeight - n, O = `${d - n}px`, a.vertical = "above");
|
|
30
|
+
const v = c.getBoundingClientRect();
|
|
31
|
+
return v.left < 0 && (h -= v.left), v.top < 0 && (m -= v.top), {
|
|
30
32
|
top: m,
|
|
31
|
-
left:
|
|
33
|
+
left: h,
|
|
32
34
|
maxHeight: O,
|
|
33
35
|
alignment: a
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
|
-
function
|
|
37
|
-
const n =
|
|
38
|
+
function y(t, o, c, s) {
|
|
39
|
+
const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = o.getBoundingClientRect(), e = R(t), i = o.parentElement.shadowRoot.querySelector(s?.contentSelector ?? `.${t.className}`).getBoundingClientRect(), f = c.getBoundingClientRect(), H = document.documentElement.clientWidth - i.right, W = document.documentElement.clientHeight - (r.top - n), d = document.documentElement.clientHeight, u = `${d - 32}px`, h = { horizontal: "end", vertical: "above" }, m = e.offsetWidth + g;
|
|
38
40
|
let l = i.right, a = r.top + n;
|
|
39
|
-
return H < m && r.left > m && (l = l - i.width - e.offsetWidth,
|
|
41
|
+
return H < m && r.left > m && (l = l - i.width - e.offsetWidth, h.horizontal = "start"), g && h.horizontal !== "center" && (l += g * (h.horizontal === "start" ? -1 : 1)), W < e.scrollHeight && (a = d - e.clientHeight - 16), f.left < 0 && (l -= f.left), f.top < 0 && (a -= f.top), {
|
|
40
42
|
top: a,
|
|
41
43
|
left: l,
|
|
42
44
|
maxHeight: u,
|
|
43
|
-
alignment:
|
|
45
|
+
alignment: h
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
w as getElementPosition,
|
|
50
|
+
y as getElementPositionHorizontal,
|
|
49
51
|
R as getElementRectangle,
|
|
50
52
|
x as isEventOnElement
|
|
51
53
|
};
|
package/core/styles/layout.scss
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
color: var(--sbb-color-1-negative);
|
|
13
13
|
min-width: var(--sbb-spacing-fixed-4x);
|
|
14
14
|
max-height: var(--sbb-spacing-fixed-4x);
|
|
15
|
+
|
|
16
|
+
// Transparent outline is visible in forced colors mode to ensure readability
|
|
17
|
+
outline: var(--sbb-border-width-1x) solid transparent;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
@mixin badge-attribute {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../core/mediaqueries';
|
|
2
2
|
|
|
3
3
|
@mixin page-spacing {
|
|
4
|
-
padding-inline: var(--sbb-layout-base-offset-responsive);
|
|
4
|
+
padding-inline: var(--sbb-page-spacing-padding, var(--sbb-layout-base-offset-responsive));
|
|
5
5
|
margin-inline: auto;
|
|
6
6
|
|
|
7
7
|
// If using page-spacing in flex context,
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
@include mediaqueries.mq($from: ultra) {
|
|
12
12
|
// Subtract padding to get real max-width
|
|
13
|
-
max-width:
|
|
14
|
-
|
|
13
|
+
max-width: var(
|
|
14
|
+
--sbb-spacing-max-width,
|
|
15
|
+
calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))
|
|
15
16
|
);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
@mixin page-spacing-expanded {
|
|
20
|
-
padding-inline: var(--sbb-spacing-responsive-xxs);
|
|
21
|
+
padding-inline: var(--sbb-page-spacing-padding, var(--sbb-spacing-responsive-xxs));
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@mixin grid-base {
|
|
@@ -6,17 +6,10 @@
|
|
|
6
6
|
@mixin link-common-variables {
|
|
7
7
|
--sbb-link-color-hover: light-dark(var(--sbb-color-primary125), var(--sbb-color-graphite));
|
|
8
8
|
--sbb-link-color-active: light-dark(var(--sbb-color-primary150), var(--sbb-color-metal));
|
|
9
|
-
--sbb-link-text-decoration-color: light-dark(
|
|
10
|
-
color-mix(in srgb, currentcolor 80%, white),
|
|
11
|
-
color-mix(in srgb, currentcolor 80%, black)
|
|
12
|
-
);
|
|
13
|
-
--sbb-link-text-decoration-color-hover: currentcolor;
|
|
14
9
|
}
|
|
15
10
|
|
|
16
11
|
@mixin link-common-variables--negative {
|
|
17
12
|
--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
|
|
18
|
-
--sbb-link-text-decoration-color: color-mix(in srgb, currentcolor 80%, black);
|
|
19
|
-
--sbb-link-text-decoration-color-hover: currentcolor;
|
|
20
13
|
}
|
|
21
14
|
|
|
22
15
|
@mixin block-link-variables {
|
|
@@ -39,14 +32,12 @@
|
|
|
39
32
|
@mixin block-link-variables--active {
|
|
40
33
|
--sbb-link-color-normal: light-dark(var(--sbb-color-black), var(--sbb-color-cement));
|
|
41
34
|
--sbb-link-text-decoration-line: underline;
|
|
42
|
-
--sbb-link-text-decoration-color: currentcolor;
|
|
43
35
|
}
|
|
44
36
|
|
|
45
37
|
// To display a current active page, e.g. if the CSS class sbb-active is set
|
|
46
38
|
@mixin block-link-variables--active-negative {
|
|
47
39
|
--sbb-link-color-normal: var(--sbb-color-cement);
|
|
48
40
|
--sbb-link-text-decoration-line: underline;
|
|
49
|
-
--sbb-link-text-decoration-color: currentcolor;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
43
|
@mixin link-variables {
|
|
@@ -73,7 +64,6 @@
|
|
|
73
64
|
@mixin link-base {
|
|
74
65
|
color: var(--sbb-link-color-normal);
|
|
75
66
|
text-decoration-line: var(--sbb-link-text-decoration-line, underline);
|
|
76
|
-
text-decoration-color: var(--sbb-link-text-decoration-color);
|
|
77
67
|
text-decoration-thickness: #{functions.px-to-rem-build(1)};
|
|
78
68
|
text-underline-offset: 0.3125em; // 5px
|
|
79
69
|
user-select: none;
|
|
@@ -95,7 +85,6 @@
|
|
|
95
85
|
@include mediaqueries.hover-mq($hover: true) {
|
|
96
86
|
color: var(--sbb-link-color-hover);
|
|
97
87
|
text-decoration-line: var(--sbb-link-hover-text-decoration, underline);
|
|
98
|
-
text-decoration-color: var(--sbb-link-text-decoration-color-hover);
|
|
99
88
|
}
|
|
100
89
|
}
|
|
101
90
|
|