@sbb-esta/lyne-elements 2.5.0 → 2.6.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/autocomplete/autocomplete-base-element.d.ts +19 -21
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +7 -7
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts +2 -2
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -1
- package/autocomplete.js +145 -136
- package/chip/chip/chip.d.ts +32 -0
- package/chip/chip/chip.d.ts.map +1 -0
- package/chip/chip-group/chip-group.d.ts +100 -0
- package/chip/chip-group/chip-group.d.ts.map +1 -0
- package/chip/chip-group.d.ts +2 -0
- package/chip/chip-group.d.ts.map +1 -0
- package/chip/chip-group.js +225 -0
- package/chip/chip.d.ts +2 -0
- package/chip/chip.d.ts.map +1 -0
- package/chip/chip.js +85 -0
- package/chip.d.ts +3 -0
- package/chip.d.ts.map +1 -0
- package/chip.js +2 -0
- package/clock/clock.d.ts.map +1 -1
- package/clock.js +1 -1
- package/core/base-elements/button-base-element.d.ts +5 -0
- package/core/base-elements/button-base-element.d.ts.map +1 -1
- package/core/base-elements.js +94 -79
- package/core/controllers/id-observer-controller.d.ts +21 -0
- package/core/controllers/id-observer-controller.d.ts.map +1 -0
- package/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/core/controllers.d.ts +2 -1
- package/core/controllers.d.ts.map +1 -1
- package/core/controllers.js +135 -80
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +8 -3
- package/core/dom/find-referenced-element.d.ts +1 -0
- package/core/dom/find-referenced-element.d.ts.map +1 -1
- package/core/dom/input-element.d.ts +3 -1
- package/core/dom/input-element.d.ts.map +1 -1
- package/core/dom/platform.d.ts +5 -0
- package/core/dom/platform.d.ts.map +1 -1
- package/core/dom.js +10 -9
- package/core/i18n/i18n.d.ts +3 -0
- package/core/i18n/i18n.d.ts.map +1 -1
- package/core/i18n.js +135 -117
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/core/mixins.js +71 -63
- package/core/overlay/overlay-trigger-attributes.d.ts +1 -1
- package/core/overlay/overlay-trigger-attributes.d.ts.map +1 -1
- package/core/overlay/position.d.ts +1 -1
- package/core/overlay/position.d.ts.map +1 -1
- package/core/styles/core.scss +89 -24
- package/core/styles/image.scss +1 -1
- package/core/styles/mixins/table.scss +63 -26
- package/core/styles/table.scss +16 -0
- package/core/testing/scroll.d.ts +1 -0
- package/core/testing/scroll.d.ts.map +1 -1
- package/core/testing/wait-for-image-ready.d.ts.map +1 -1
- package/core/testing.js +8 -5
- package/core.css +90 -34
- package/custom-elements.json +2568 -740
- package/datepicker/datepicker/datepicker.d.ts +4 -4
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +0 -3
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +30 -34
- package/datepicker/datepicker.js +103 -105
- package/development/autocomplete/autocomplete-base-element.d.ts +19 -21
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button.js +3 -3
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts +2 -2
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +1 -1
- package/development/autocomplete.js +104 -82
- package/development/chip/chip/chip.d.ts +32 -0
- package/development/chip/chip/chip.d.ts.map +1 -0
- package/development/chip/chip-group/chip-group.d.ts +100 -0
- package/development/chip/chip-group/chip-group.d.ts.map +1 -0
- package/development/chip/chip-group.d.ts +2 -0
- package/development/chip/chip-group.d.ts.map +1 -0
- package/development/chip/chip-group.js +349 -0
- package/development/chip/chip.d.ts +2 -0
- package/development/chip/chip.d.ts.map +1 -0
- package/development/chip/chip.js +212 -0
- package/development/chip.d.ts +3 -0
- package/development/chip.d.ts.map +1 -0
- package/development/chip.js +3 -0
- package/development/clock/clock.d.ts.map +1 -1
- package/development/clock.js +5 -2
- package/development/core/base-elements/button-base-element.d.ts +5 -0
- package/development/core/base-elements/button-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +38 -10
- package/development/core/controllers/id-observer-controller.d.ts +21 -0
- package/development/core/controllers/id-observer-controller.d.ts.map +1 -0
- package/development/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/development/core/controllers.d.ts +2 -1
- package/development/core/controllers.d.ts.map +1 -1
- package/development/core/controllers.js +116 -44
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +6 -2
- package/development/core/dom/find-referenced-element.d.ts +1 -0
- package/development/core/dom/find-referenced-element.d.ts.map +1 -1
- package/development/core/dom/input-element.d.ts +3 -1
- package/development/core/dom/input-element.d.ts.map +1 -1
- package/development/core/dom/platform.d.ts +5 -0
- package/development/core/dom/platform.d.ts.map +1 -1
- package/development/core/dom.js +3 -1
- package/development/core/i18n/i18n.d.ts +3 -0
- package/development/core/i18n/i18n.d.ts.map +1 -1
- package/development/core/i18n.js +23 -2
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +19 -6
- package/development/core/overlay/overlay-trigger-attributes.d.ts +1 -1
- package/development/core/overlay/overlay-trigger-attributes.d.ts.map +1 -1
- package/development/core/overlay/position.d.ts +1 -1
- package/development/core/overlay/position.d.ts.map +1 -1
- package/development/core/overlay.js +1 -1
- package/development/core/testing/scroll.d.ts +1 -0
- package/development/core/testing/scroll.d.ts.map +1 -1
- package/development/core/testing/wait-for-image-ready.d.ts.map +1 -1
- package/development/core/testing.js +6 -2
- package/development/datepicker/datepicker/datepicker.d.ts +4 -4
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +0 -3
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +4 -12
- package/development/datepicker/datepicker.js +46 -43
- package/development/dialog/dialog-title/dialog-title.d.ts +0 -1
- package/development/dialog/dialog-title/dialog-title.d.ts.map +1 -1
- package/development/dialog/dialog-title.js +2 -5
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts +0 -2
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel.js +2 -7
- package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/development/flip-card/flip-card-details.js +3 -3
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field.js +13 -146
- package/development/header/header/header.d.ts +6 -7
- package/development/header/header/header.d.ts.map +1 -1
- package/development/header/header.js +45 -34
- package/development/menu/menu/menu.d.ts +7 -8
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +42 -41
- package/development/navigation/navigation/navigation.d.ts +7 -8
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/development/navigation/navigation-marker.js +3 -3
- package/development/navigation/navigation-section/navigation-section.d.ts +8 -9
- package/development/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +50 -47
- package/development/navigation/navigation.js +42 -40
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup/optgroup.d.ts +2 -2
- package/development/option/optgroup/optgroup.d.ts.map +1 -1
- package/development/option/optgroup.js +3 -3
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +3 -3
- package/development/paginator/paginator.js +12 -1
- package/development/popover/popover/popover.d.ts +8 -7
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +28 -35
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +0 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +3 -5
- package/development/select/select.d.ts +6 -3
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +20 -18
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +0 -2
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +2 -7
- package/development/sidebar/sidebar/sidebar.d.ts.map +1 -1
- package/development/sidebar/sidebar.js +3 -3
- package/development/stepper/step/step.d.ts +13 -1
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step-label.js +2 -2
- package/development/stepper/step.js +21 -6
- package/development/stepper/stepper/stepper.d.ts +1 -0
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +5 -1
- package/development/table/table-wrapper.js +2 -1
- package/development/time-input/time-input.d.ts +6 -8
- package/development/time-input/time-input.d.ts.map +1 -1
- package/development/time-input.js +42 -44
- package/dialog/dialog-title/dialog-title.d.ts +0 -1
- package/dialog/dialog-title/dialog-title.d.ts.map +1 -1
- package/dialog/dialog-title.js +18 -21
- package/expansion-panel/expansion-panel/expansion-panel.d.ts +0 -2
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel.js +53 -56
- package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/flip-card/flip-card-details.js +8 -8
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field.js +103 -98
- package/header/header/header.d.ts +6 -7
- package/header/header/header.d.ts.map +1 -1
- package/header/header.js +72 -70
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/menu/menu/menu.d.ts +7 -8
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +73 -73
- package/navigation/navigation/navigation.d.ts +7 -8
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/navigation/navigation-marker.js +4 -4
- package/navigation/navigation-section/navigation-section.d.ts +8 -9
- package/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/navigation/navigation-section.js +75 -77
- package/navigation/navigation.js +70 -70
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup/optgroup.d.ts +2 -2
- package/option/optgroup/optgroup.d.ts.map +1 -1
- package/option/optgroup.js +13 -13
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +2 -2
- package/package.json +16 -1
- package/paginator/paginator.js +44 -44
- package/popover/popover/popover.d.ts +8 -7
- 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 +0 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +8 -8
- package/select/select.d.ts +6 -3
- package/select/select.d.ts.map +1 -1
- package/select.js +73 -73
- package/selection-expansion-panel/selection-expansion-panel.d.ts +0 -2
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +10 -13
- package/sidebar/sidebar/sidebar.d.ts.map +1 -1
- package/sidebar/sidebar.js +2 -2
- package/standard-theme.css +166 -79
- package/stepper/step/step.d.ts +13 -1
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step-label.js +1 -1
- package/stepper/step.js +34 -23
- package/stepper/stepper/stepper.d.ts +1 -0
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +19 -16
- package/table/table-wrapper.js +4 -4
- package/table.css +75 -44
- package/time-input/time-input.d.ts +6 -8
- package/time-input/time-input.d.ts.map +1 -1
- package/time-input.js +66 -73
package/core/mixins.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
1
|
+
var L = (d) => {
|
|
2
2
|
throw TypeError(d);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var C = (d, v, c) => (
|
|
4
|
+
var F = (d, v, c) => v.has(d) || L("Cannot " + c);
|
|
5
|
+
var C = (d, v, c) => (F(d, v, "read from private field"), c ? c.call(d) : v.get(d)), E = (d, v, c) => v.has(d) ? L("Cannot add the same private member more than once") : v instanceof WeakSet ? v.add(d) : v.set(d, c), S = (d, v, c, l) => (F(d, v, "write to private field"), l ? l.call(d, c) : v.set(d, c), c);
|
|
6
6
|
import { __esDecorate as y, __runInitializers as _ } from "tslib";
|
|
7
|
-
import { property as k, state as
|
|
7
|
+
import { property as k, state as N, eventOptions as G } from "lit/decorators.js";
|
|
8
8
|
import { forceType as I, getOverride as H, hostAttributes as K } from "./decorators.js";
|
|
9
|
-
import { defaultConverter as
|
|
9
|
+
import { defaultConverter as T, isServer as A, html as R, nothing as O, css as W } from "lit";
|
|
10
10
|
import { SbbLanguageController as M, SbbConnectedAbortController as X } from "./controllers.js";
|
|
11
|
-
import { preventScrollOnSpacebarPress as
|
|
12
|
-
import { i18nCheckboxRequired as
|
|
13
|
-
import { isWebkit as
|
|
14
|
-
import { sbbInputModalityDetector as
|
|
11
|
+
import { preventScrollOnSpacebarPress as Y, EventEmitter as J } from "./eventing.js";
|
|
12
|
+
import { i18nCheckboxRequired as Q, i18nInputRequired as Z, i18nSelectionRequired as ee } from "./i18n.js";
|
|
13
|
+
import { isWebkit as j } from "./dom.js";
|
|
14
|
+
import { sbbInputModalityDetector as te, interactivityChecker as se, isArrowKeyPressed as ae, getNextElementIndex as ie } from "./a11y.js";
|
|
15
15
|
import "../screen-reader-only.js";
|
|
16
|
-
const
|
|
16
|
+
const ye = (d) => {
|
|
17
17
|
class v extends d {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this.isAnimating = !1, this._animationPromise = Promise.resolve();
|
|
@@ -81,7 +81,7 @@ const _e = (d) => {
|
|
|
81
81
|
s.disabled = a;
|
|
82
82
|
} }, metadata: e }, f, n), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
83
83
|
})(), t;
|
|
84
|
-
})(),
|
|
84
|
+
})(), re = (d) => (() => {
|
|
85
85
|
var b, t;
|
|
86
86
|
let c = d, l, f = [], n = [];
|
|
87
87
|
return t = class extends c {
|
|
@@ -103,8 +103,8 @@ const _e = (d) => {
|
|
|
103
103
|
s.disabledInteractive = a;
|
|
104
104
|
} }, metadata: e }, f, n), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
105
105
|
})(), t;
|
|
106
|
-
})(),
|
|
107
|
-
class v extends
|
|
106
|
+
})(), Se = (d) => {
|
|
107
|
+
class v extends re(B(d)) {
|
|
108
108
|
willUpdate(l) {
|
|
109
109
|
super.willUpdate(l), l.has("disabledInteractive") && (this.internals.ariaDisabled = this.disabledInteractive ? "true" : null), l.has("disabled") && (this.disabled ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"));
|
|
110
110
|
}
|
|
@@ -302,14 +302,14 @@ const V = (d) => (() => {
|
|
|
302
302
|
const g = m in o ? o[m] : !1;
|
|
303
303
|
Object.defineProperty(this.internals.validity, m, { value: g, configurable: !0 }), g && (o.customError = !0);
|
|
304
304
|
}
|
|
305
|
-
this.internals.setValidity(o, i),
|
|
305
|
+
this.internals.setValidity(o, i), j && Object.defineProperty(this.internals.validity, "customError", {
|
|
306
306
|
value: this._validityStates.has("customError") || !!o.customError,
|
|
307
307
|
configurable: !0
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
}, u = new WeakMap(), (() => {
|
|
311
311
|
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
312
|
-
f = [k()], n = [k()], b = [
|
|
312
|
+
f = [k()], n = [k()], b = [N()], y(e, null, f, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (o) => "name" in o, set: (o, p) => {
|
|
313
313
|
o.name = p;
|
|
314
314
|
} }, metadata: i }, null, l), y(e, null, n, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (o) => "value" in o, set: (o, p) => {
|
|
315
315
|
o.value = p;
|
|
@@ -347,7 +347,7 @@ const V = (d) => (() => {
|
|
|
347
347
|
r.required = u;
|
|
348
348
|
} }, metadata: t }, null, l), t && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
349
349
|
})(), n;
|
|
350
|
-
})(),
|
|
350
|
+
})(), xe = (d) => (() => {
|
|
351
351
|
var u;
|
|
352
352
|
let c = [K({
|
|
353
353
|
tabindex: "0"
|
|
@@ -375,7 +375,7 @@ const V = (d) => (() => {
|
|
|
375
375
|
}, this._handleUserInteraction = () => {
|
|
376
376
|
var o;
|
|
377
377
|
this.disabled || ((o = this.withUserInteraction) == null || o.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
378
|
-
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown",
|
|
378
|
+
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown", Y), (i = this.addEventListener) == null || i.call(this, "keyup", this._handleKeyboardInteraction);
|
|
379
379
|
}
|
|
380
380
|
attributeChangedCallback(s, a, i) {
|
|
381
381
|
(s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s, a, i);
|
|
@@ -407,25 +407,30 @@ const V = (d) => (() => {
|
|
|
407
407
|
return super.shouldValidate(s) || s === "checked" || s === "required";
|
|
408
408
|
}
|
|
409
409
|
validate() {
|
|
410
|
-
super.validate(), this.required && !this.checked ? this.setValidityFlag("valueMissing",
|
|
410
|
+
super.validate(), this.required && !this.checked ? this.setValidityFlag("valueMissing", Q[this._languageController.current]) : this.removeValidityFlag("valueMissing");
|
|
411
411
|
}
|
|
412
412
|
}, n = u, (() => {
|
|
413
413
|
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(b[Symbol.metadata] ?? null) : void 0;
|
|
414
414
|
r = [k({
|
|
415
415
|
type: Boolean,
|
|
416
416
|
converter: {
|
|
417
|
-
...
|
|
417
|
+
...T,
|
|
418
418
|
// We need to pass information to the setter so that we know it was called by attribute change.
|
|
419
419
|
fromAttribute: (a, i) => {
|
|
420
420
|
var p, x;
|
|
421
|
-
return { value: (x = (p =
|
|
421
|
+
return { value: (x = (p = T).fromAttribute) == null ? void 0 : x.call(p, a, i), attribute: !0 };
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
})], y(u, null, r, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (a) => "checked" in a, set: (a, i) => {
|
|
425
425
|
a.checked = i;
|
|
426
426
|
} }, metadata: s }, null, t), y(null, l = { value: n }, c, { kind: "class", name: n.name, metadata: s }, null, f), n = l.value, s && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), _(n, f);
|
|
427
427
|
})(), n;
|
|
428
|
-
})(),
|
|
428
|
+
})(), ne = () => {
|
|
429
|
+
if (A)
|
|
430
|
+
return !1;
|
|
431
|
+
const d = document.createElement("div");
|
|
432
|
+
return d.setAttribute("contenteditable", "PLAINTEXT-ONLY"), d.contentEditable === "plaintext-only";
|
|
433
|
+
}, le = ne(), Ce = (d) => (() => {
|
|
429
434
|
var r;
|
|
430
435
|
let c = D(V(d)), l = [], f, n, b, t;
|
|
431
436
|
return r = class extends c {
|
|
@@ -482,7 +487,7 @@ const V = (d) => (() => {
|
|
|
482
487
|
if ((m.key === "Enter" || m.key === `
|
|
483
488
|
`) && m.isTrusted)
|
|
484
489
|
m.preventDefault(), m.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", m));
|
|
485
|
-
else if (
|
|
490
|
+
else if (j && this.value && (m.key === "Backspace" || m.key === "Delete") && m.isTrusted) {
|
|
486
491
|
if (m.preventDefault(), m.stopImmediatePropagation(), !this.dispatchEvent(new KeyboardEvent("keydown", m)))
|
|
487
492
|
return;
|
|
488
493
|
const h = (g = window.getSelection()) == null ? void 0 : g.getRangeAt(0);
|
|
@@ -501,7 +506,7 @@ const V = (d) => (() => {
|
|
|
501
506
|
!h || !g || (h.deleteContents(), h.insertNode(document.createTextNode(g)), h.setStart(h.endContainer, h.endOffset), this._dispatchInputEvent());
|
|
502
507
|
}), (p = this.addEventListener) == null || p.call(this, "focus", () => {
|
|
503
508
|
var m;
|
|
504
|
-
|
|
509
|
+
te.mostRecentModality === "keyboard" && ((m = window.getSelection()) == null || m.selectAllChildren(this));
|
|
505
510
|
}), (x = this.addEventListener) == null || x.call(this, "blur", () => {
|
|
506
511
|
var m;
|
|
507
512
|
(m = window.getSelection()) == null || m.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
|
|
@@ -511,7 +516,7 @@ const V = (d) => (() => {
|
|
|
511
516
|
super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.innerHTML = this.value;
|
|
512
517
|
}
|
|
513
518
|
focus(e) {
|
|
514
|
-
if (super.focus(e), !
|
|
519
|
+
if (super.focus(e), !A && !this.disabled && !this.readOnly && this.value) {
|
|
515
520
|
const s = window.getSelection();
|
|
516
521
|
if (!s)
|
|
517
522
|
return;
|
|
@@ -544,6 +549,9 @@ const V = (d) => (() => {
|
|
|
544
549
|
formStateRestoreCallback(e, s) {
|
|
545
550
|
e && typeof e == "string" && (this.value = e);
|
|
546
551
|
}
|
|
552
|
+
async firstUpdated(e) {
|
|
553
|
+
super.firstUpdated(e), this.value && !this.innerHTML.length && (this.innerHTML = this.value);
|
|
554
|
+
}
|
|
547
555
|
updateFormValue() {
|
|
548
556
|
this.internals.setFormValue(this.value, this.value);
|
|
549
557
|
}
|
|
@@ -565,8 +573,8 @@ const V = (d) => (() => {
|
|
|
565
573
|
e.remove();
|
|
566
574
|
}
|
|
567
575
|
_updateContenteditable() {
|
|
568
|
-
if (!
|
|
569
|
-
const e = this.disabled || this.readOnly ? "false" :
|
|
576
|
+
if (!A && this.isConnected) {
|
|
577
|
+
const e = this.disabled || this.readOnly ? "false" : le ? "plaintext-only" : "true";
|
|
570
578
|
this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
|
|
571
579
|
}
|
|
572
580
|
}
|
|
@@ -586,7 +594,7 @@ const V = (d) => (() => {
|
|
|
586
594
|
s.placeholder = a;
|
|
587
595
|
} }, metadata: e }, null, l), y(r, null, t, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (s) => "_cleanChildren" in s, get: (s) => s._cleanChildren }, metadata: e }, null, l), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
588
596
|
})(), r;
|
|
589
|
-
})(),
|
|
597
|
+
})(), P = /* @__PURE__ */ new WeakMap(), Ee = (d) => (() => {
|
|
590
598
|
var n;
|
|
591
599
|
let c = B(D(V(d))), l = [], f;
|
|
592
600
|
return n = class extends c {
|
|
@@ -614,7 +622,7 @@ const V = (d) => (() => {
|
|
|
614
622
|
}
|
|
615
623
|
constructor() {
|
|
616
624
|
var t;
|
|
617
|
-
super(), this._checked = (_(this, l), !1), this.abort = new X(this), this.
|
|
625
|
+
super(), this._checked = (_(this, l), !1), this.abort = new X(this), this._languageController = new M(this), this.internals.role = "radio", (t = this.addEventListener) == null || t.call(this, "keydown", (r) => this._handleArrowKeyDown(r));
|
|
618
626
|
}
|
|
619
627
|
connectedCallback() {
|
|
620
628
|
super.connectedCallback(), this._connectToRegistry(), this._synchronizeGroupState();
|
|
@@ -642,7 +650,7 @@ const V = (d) => (() => {
|
|
|
642
650
|
super.willUpdate(t), t.has("disabled") && this.updateFocusableRadios();
|
|
643
651
|
}
|
|
644
652
|
firstUpdated(t) {
|
|
645
|
-
super.firstUpdated(t), this.
|
|
653
|
+
super.firstUpdated(t), this.updateFocusableRadios();
|
|
646
654
|
}
|
|
647
655
|
/**
|
|
648
656
|
* Called on `value` change
|
|
@@ -672,7 +680,7 @@ const V = (d) => (() => {
|
|
|
672
680
|
* - the first non-disabled radio in DOM order;
|
|
673
681
|
*/
|
|
674
682
|
updateFocusableRadios() {
|
|
675
|
-
if (!this.
|
|
683
|
+
if (!this.hasUpdated)
|
|
676
684
|
return;
|
|
677
685
|
const t = this._interactableGroupedRadios(), r = t.findIndex((e) => e.checked && !e.disabled && !e.formDisabled), u = r !== -1 ? r : t.findIndex((e) => !e.disabled && !e.formDisabled);
|
|
678
686
|
u !== -1 && (t[u].tabIndex = 0, t.splice(u, 1)), t.forEach((e) => e.removeAttribute("tabindex"));
|
|
@@ -690,10 +698,10 @@ const V = (d) => (() => {
|
|
|
690
698
|
* Add `this` to the radioButton registry
|
|
691
699
|
*/
|
|
692
700
|
_connectToRegistry() {
|
|
693
|
-
if (!this.name ||
|
|
701
|
+
if (!this.name || A)
|
|
694
702
|
return;
|
|
695
703
|
const t = this.form ?? this.getRootNode();
|
|
696
|
-
this._radioButtonGroupsMap =
|
|
704
|
+
this._radioButtonGroupsMap = P.get(t), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), P.set(t, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
|
|
697
705
|
const r = Array.from(this.associatedRadioButtons);
|
|
698
706
|
this.associatedRadioButtons.clear();
|
|
699
707
|
const u = r.findIndex((e) => this.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
@@ -710,7 +718,7 @@ const V = (d) => (() => {
|
|
|
710
718
|
* Return a list of 'interactable' grouped radios, ordered in DOM order
|
|
711
719
|
*/
|
|
712
720
|
_interactableGroupedRadios() {
|
|
713
|
-
return Array.from(this.associatedRadioButtons ?? []).filter((t) =>
|
|
721
|
+
return Array.from(this.associatedRadioButtons ?? []).filter((t) => se.isVisible(t));
|
|
714
722
|
}
|
|
715
723
|
/**
|
|
716
724
|
* Deselect other radio of the same group
|
|
@@ -719,10 +727,10 @@ const V = (d) => (() => {
|
|
|
719
727
|
Array.from(this.associatedRadioButtons ?? []).filter((t) => t !== this).forEach((t) => t.checked = !1);
|
|
720
728
|
}
|
|
721
729
|
async _handleArrowKeyDown(t) {
|
|
722
|
-
if (!
|
|
730
|
+
if (!ae(t))
|
|
723
731
|
return;
|
|
724
732
|
t.preventDefault();
|
|
725
|
-
const r = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), u = r.indexOf(this), e =
|
|
733
|
+
const r = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), u = r.indexOf(this), e = ie(t, u, r.length);
|
|
726
734
|
await this.navigateByKeyboard(r[e]);
|
|
727
735
|
}
|
|
728
736
|
}, (() => {
|
|
@@ -731,7 +739,7 @@ const V = (d) => (() => {
|
|
|
731
739
|
r.checked = u;
|
|
732
740
|
} }, metadata: t }, null, l), t && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
733
741
|
})(), n;
|
|
734
|
-
})(),
|
|
742
|
+
})(), oe = (d) => {
|
|
735
743
|
class v extends d {
|
|
736
744
|
/**
|
|
737
745
|
* Returns a Promise that resolves when the element has completed hydration.
|
|
@@ -766,16 +774,16 @@ const V = (d) => (() => {
|
|
|
766
774
|
}
|
|
767
775
|
}
|
|
768
776
|
return v;
|
|
769
|
-
},
|
|
777
|
+
}, U = "data-ssr-child-count", z = "li", we = (d) => (() => {
|
|
770
778
|
var b, t;
|
|
771
|
-
let c =
|
|
779
|
+
let c = oe(d), l, f = [], n = [];
|
|
772
780
|
return t = class extends c {
|
|
773
781
|
constructor() {
|
|
774
782
|
super(...arguments);
|
|
775
783
|
E(this, b);
|
|
776
784
|
S(this, b, _(this, f, [])), this._handleSlotchange = (_(this, n), () => {
|
|
777
785
|
const e = Array.from(this.children ?? []).filter((s) => this.listChildLocalNames.includes(s.localName));
|
|
778
|
-
e.length === this.listChildren.length && this.listChildren.every((s, a) => e[a] === s) || (this.listChildren.filter((s) => !e.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((s, a) => s.setAttribute("slot", `${
|
|
786
|
+
e.length === this.listChildren.length && this.listChildren.every((s, a) => e[a] === s) || (this.listChildren.filter((s) => !e.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((s, a) => s.setAttribute("slot", `${z}-${a}`)), this.removeAttribute(U));
|
|
779
787
|
});
|
|
780
788
|
}
|
|
781
789
|
/**
|
|
@@ -811,11 +819,11 @@ const V = (d) => (() => {
|
|
|
811
819
|
return a.length >= 2 ? R`
|
|
812
820
|
<ul
|
|
813
821
|
class=${e.class || this.localName}
|
|
814
|
-
aria-label=${e.ariaLabel ||
|
|
815
|
-
aria-labelledby=${e.ariaLabelledby ||
|
|
822
|
+
aria-label=${e.ariaLabel || O}
|
|
823
|
+
aria-labelledby=${e.ariaLabelledby || O}
|
|
816
824
|
>
|
|
817
825
|
${a.map((i) => R`
|
|
818
|
-
<li aria-hidden=${i.ariaHidden ||
|
|
826
|
+
<li aria-hidden=${i.ariaHidden || O}>
|
|
819
827
|
<slot name=${i.name}></slot>
|
|
820
828
|
</li>
|
|
821
829
|
`)}
|
|
@@ -837,10 +845,10 @@ const V = (d) => (() => {
|
|
|
837
845
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
838
846
|
*/
|
|
839
847
|
listSlotEntries(e) {
|
|
840
|
-
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(
|
|
848
|
+
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(U) ?? 0) })).map((a, i) => {
|
|
841
849
|
var o;
|
|
842
850
|
return {
|
|
843
|
-
name: `${
|
|
851
|
+
name: `${z}-${i}`,
|
|
844
852
|
ariaHidden: ((o = e == null ? void 0 : e.localNameVisualOnly) == null ? void 0 : o.includes(a.localName)) ?? !1
|
|
845
853
|
};
|
|
846
854
|
});
|
|
@@ -855,11 +863,11 @@ const V = (d) => (() => {
|
|
|
855
863
|
}
|
|
856
864
|
}, b = new WeakMap(), (() => {
|
|
857
865
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
858
|
-
l = [
|
|
866
|
+
l = [N()], y(t, null, l, { kind: "accessor", name: "listChildren", static: !1, private: !1, access: { has: (s) => "listChildren" in s, get: (s) => s.listChildren, set: (s, a) => {
|
|
859
867
|
s.listChildren = a;
|
|
860
868
|
} }, metadata: e }, f, n), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
861
869
|
})(), t;
|
|
862
|
-
})(),
|
|
870
|
+
})(), Re = (d) => (() => {
|
|
863
871
|
var b, t;
|
|
864
872
|
let c = d, l, f = [], n = [];
|
|
865
873
|
return t = class extends c {
|
|
@@ -881,7 +889,7 @@ const V = (d) => (() => {
|
|
|
881
889
|
s.negative = a;
|
|
882
890
|
} }, metadata: e }, f, n), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
883
891
|
})(), t;
|
|
884
|
-
})(),
|
|
892
|
+
})(), Ie = (d) => (() => {
|
|
885
893
|
var a, i, o, p;
|
|
886
894
|
let c = d, l, f = [], n = [], b, t = [], r = [], u, e = [], s = [];
|
|
887
895
|
return p = class extends c {
|
|
@@ -890,7 +898,7 @@ const V = (d) => (() => {
|
|
|
890
898
|
E(this, a);
|
|
891
899
|
E(this, i);
|
|
892
900
|
E(this, o);
|
|
893
|
-
S(this, a, _(this, f, "white")), S(this, i, (_(this, n), _(this, t, !1))), S(this, o, (_(this, r), _(this, e, ""))), this._panelConnected = (_(this, s), new
|
|
901
|
+
S(this, a, _(this, f, "white")), S(this, i, (_(this, n), _(this, t, !1))), S(this, o, (_(this, r), _(this, e, ""))), this._panelConnected = (_(this, s), new J(this, p.events.panelConnected, { bubbles: !0 }));
|
|
894
902
|
}
|
|
895
903
|
/** The background color of the panel. */
|
|
896
904
|
get color() {
|
|
@@ -929,7 +937,7 @@ const V = (d) => (() => {
|
|
|
929
937
|
})(), p.events = {
|
|
930
938
|
panelConnected: "panelConnected"
|
|
931
939
|
}, p;
|
|
932
|
-
})(),
|
|
940
|
+
})(), Ae = (d) => {
|
|
933
941
|
class v extends d {
|
|
934
942
|
constructor() {
|
|
935
943
|
super(...arguments), this._updatePromise = Promise.resolve(), this._updateResolve = () => {
|
|
@@ -947,22 +955,22 @@ const V = (d) => (() => {
|
|
|
947
955
|
}
|
|
948
956
|
}
|
|
949
957
|
return v;
|
|
950
|
-
},
|
|
958
|
+
}, Oe = W`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--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-expansion-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-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);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-expansion-panel-inner-background, var(--sbb-color-milk) )}: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-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-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;top:0;right:0;bottom:0;left: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) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left: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}`;
|
|
951
959
|
export {
|
|
952
|
-
|
|
953
|
-
|
|
960
|
+
ye as SbbAnimationCompleteMixin,
|
|
961
|
+
re as SbbDisabledInteractiveMixin,
|
|
954
962
|
B as SbbDisabledMixin,
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
963
|
+
Se as SbbDisabledTabIndexActionMixin,
|
|
964
|
+
xe as SbbFormAssociatedCheckboxMixin,
|
|
965
|
+
Ce as SbbFormAssociatedInputMixin,
|
|
958
966
|
V as SbbFormAssociatedMixin,
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
967
|
+
Ee as SbbFormAssociatedRadioButtonMixin,
|
|
968
|
+
oe as SbbHydrationMixin,
|
|
969
|
+
we as SbbNamedSlotListMixin,
|
|
970
|
+
Re as SbbNegativeMixin,
|
|
971
|
+
Ie as SbbPanelMixin,
|
|
964
972
|
D as SbbRequiredMixin,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
973
|
+
Ae as SbbUpdateSchedulerMixin,
|
|
974
|
+
Oe as panelCommonStyle,
|
|
975
|
+
P as radioButtonRegistry
|
|
968
976
|
};
|
|
@@ -14,5 +14,5 @@ export declare function setAriaComboBoxAttributes(trigger: HTMLElement, overlayI
|
|
|
14
14
|
/**
|
|
15
15
|
* Remove aria attributes from trigger elements.
|
|
16
16
|
*/
|
|
17
|
-
export declare function removeAriaComboBoxAttributes(trigger?: HTMLElement): void;
|
|
17
|
+
export declare function removeAriaComboBoxAttributes(trigger?: HTMLElement | null): void;
|
|
18
18
|
//# sourceMappingURL=overlay-trigger-attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-trigger-attributes.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-trigger-attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,MAAM,GAAG,QAAQ,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,IAAI,CAQN;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAQhG;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,OAAO,EACjB,QAAQ,GAAE,SAAS,GAAG,MAAkB,GACvC,IAAI,CAYN;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"overlay-trigger-attributes.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-trigger-attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,MAAM,GAAG,QAAQ,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,IAAI,CAQN;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAQhG;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,OAAO,EACjB,QAAQ,GAAE,SAAS,GAAG,MAAkB,GACvC,IAAI,CAYN;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAY/E"}
|
|
@@ -16,7 +16,7 @@ export declare function getElementRectangle(el: HTMLElement): ElementRectangle;
|
|
|
16
16
|
/**
|
|
17
17
|
* Determines whether an event is fired on a specific element.
|
|
18
18
|
*/
|
|
19
|
-
export declare function isEventOnElement(element: HTMLElement, event: MouseEvent | PointerEvent): boolean;
|
|
19
|
+
export declare function isEventOnElement(element: HTMLElement | null, event: MouseEvent | PointerEvent): boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Determines the position of an element relative to a trigger element by evaluating
|
|
22
22
|
* the optimal position based on the available space.
|
|
@@ -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,
|
|
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;CAC5B,GACA,uBAAuB,CAqGzB"}
|
package/core/styles/core.scss
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
sbb-css-tokens;
|
|
3
3
|
@use './core/mediaqueries';
|
|
4
4
|
@use './core/functions';
|
|
5
|
-
@use './mixins/font-face';
|
|
6
5
|
@use './mixins/a11y';
|
|
6
|
+
@use './mixins/font-face';
|
|
7
|
+
@use './mixins/helpers';
|
|
8
|
+
@use './mixins/inputs';
|
|
7
9
|
@use './mixins/scrollbar';
|
|
8
10
|
@use './mixins/typo';
|
|
9
|
-
@use './mixins/helpers';
|
|
10
11
|
|
|
11
12
|
@include helpers.box-sizing;
|
|
12
13
|
|
|
@@ -68,30 +69,82 @@ html {
|
|
|
68
69
|
@include typo.placeholder;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
// TODO: Remove if webkit bug is resolved: https://bugs.webkit.org/show_bug.cgi?id=223814
|
|
72
72
|
sbb-form-field {
|
|
73
|
-
:where(input, textarea)
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
:where(input, select, textarea, sbb-select, sbb-date-input) {
|
|
74
|
+
@include typo.text-m--regular;
|
|
75
|
+
@include helpers.ellipsis;
|
|
76
|
+
@include inputs.input-reset;
|
|
77
|
+
|
|
78
|
+
// Use !important here to not interfere with Firefox focus ring definition
|
|
79
|
+
// which appears in normalize CSS of several frameworks.
|
|
80
|
+
outline: none !important;
|
|
81
|
+
overflow: var(--sbb-form-field-overflow);
|
|
82
|
+
width: 100%;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
color: var(--sbb-form-field-text-color);
|
|
85
|
+
|
|
86
|
+
// Fill color needed for Safari
|
|
87
|
+
-webkit-text-fill-color: var(--sbb-form-field-text-color);
|
|
88
|
+
opacity: 1;
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
|
|
91
|
+
// To be more specific than the styles in normalize.scss we need to use !important
|
|
92
|
+
// TODO: Find a better solution
|
|
93
|
+
font-size: var(--sbb-form-field-input-text-size) !important;
|
|
94
|
+
font-family: var(--sbb-typo-font-family) !important;
|
|
95
|
+
line-height: var(--sbb-typo-line-height-body-text) !important;
|
|
96
|
+
|
|
97
|
+
&::placeholder {
|
|
98
|
+
@include typo.placeholder;
|
|
99
|
+
}
|
|
76
100
|
}
|
|
77
101
|
|
|
78
|
-
&[floating-label] :where(input, textarea)::placeholder,
|
|
102
|
+
&[floating-label] :where(input, select, textarea, sbb-select)::placeholder,
|
|
79
103
|
// This covers the placeholder of the sbb-date-input
|
|
80
104
|
&[floating-label] sbb-date-input::after {
|
|
81
|
-
color: transparent;
|
|
82
|
-
-webkit-text-fill-color: transparent;
|
|
105
|
+
color: transparent !important;
|
|
106
|
+
-webkit-text-fill-color: transparent !important;
|
|
83
107
|
|
|
84
108
|
@include a11y.if-forced-colors {
|
|
85
|
-
color: Canvas;
|
|
86
|
-
-webkit-text-fill-color: Canvas;
|
|
109
|
+
color: Canvas !important;
|
|
110
|
+
-webkit-text-fill-color: Canvas !important;
|
|
87
111
|
}
|
|
88
112
|
}
|
|
89
113
|
|
|
90
|
-
|
|
114
|
+
// TODO: Remove if webkit bug is resolved: https://bugs.webkit.org/show_bug.cgi?id=223814
|
|
115
|
+
&:not([floating-label]) :where(input, select, textarea, sbb-select):disabled::placeholder {
|
|
116
|
+
color: var(--sbb-color-granite);
|
|
117
|
+
-webkit-text-fill-color: var(--sbb-color-granite);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Fix positioning issue for select which occurs in Safari
|
|
121
|
+
:where(select) {
|
|
122
|
+
vertical-align: middle;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(select, sbb-select) {
|
|
126
|
+
padding-inline-end: var(--sbb-form-field-select-inline-padding-end);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where(textarea) {
|
|
91
130
|
@include scrollbar.scrollbar;
|
|
131
|
+
|
|
132
|
+
& {
|
|
133
|
+
position: relative;
|
|
134
|
+
resize: none;
|
|
135
|
+
|
|
136
|
+
// White-space break needed for Firefox
|
|
137
|
+
white-space: break-spaces;
|
|
138
|
+
overflow-y: auto;
|
|
139
|
+
min-height: calc((var(--sbb-typo-line-height-body-text) * 1em));
|
|
140
|
+
}
|
|
92
141
|
}
|
|
93
142
|
|
|
94
|
-
&[
|
|
143
|
+
&[size='l'] :where(textarea) {
|
|
144
|
+
padding-block-end: #{functions.px-to-rem-build(5.5)};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&[negative] :where(textarea) {
|
|
95
148
|
@include scrollbar.scrollbar($negative: true);
|
|
96
149
|
}
|
|
97
150
|
}
|
|
@@ -186,7 +239,7 @@ img {
|
|
|
186
239
|
// TODO: Move back to the sbb-container components when the global CSS refactoring happens
|
|
187
240
|
sbb-container {
|
|
188
241
|
> [slot='image']:is(sbb-image, img),
|
|
189
|
-
> [slot='image'] :is(sbb-image, img) {
|
|
242
|
+
> [slot='image'] :is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
190
243
|
--sbb-image-object-fit: cover;
|
|
191
244
|
|
|
192
245
|
border-radius: var(--sbb-container-background-border-radius);
|
|
@@ -198,7 +251,7 @@ sbb-container {
|
|
|
198
251
|
// TODO: Move back to the sbb-flip-card-summary components when the global CSS refactoring happens
|
|
199
252
|
sbb-flip-card-summary {
|
|
200
253
|
> [slot='image']:is(sbb-image, img),
|
|
201
|
-
> [slot='image'] :is(sbb-image, img) {
|
|
254
|
+
> [slot='image'] :is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
202
255
|
--sbb-image-aspect-ratio: auto;
|
|
203
256
|
--sbb-image-object-fit: cover;
|
|
204
257
|
|
|
@@ -211,7 +264,7 @@ sbb-flip-card-summary {
|
|
|
211
264
|
// TODO: Move back to the sbb-lead-container components when the global CSS refactoring happens
|
|
212
265
|
sbb-lead-container {
|
|
213
266
|
> [slot='image']:is(sbb-image, img, picture),
|
|
214
|
-
> [slot='image'] :is(sbb-image, img, picture) {
|
|
267
|
+
> [slot='image'] :is(sbb-image, img, picture):not(.sbb-figure-overlap-image) {
|
|
215
268
|
--sbb-image-aspect-ratio: var(--sbb-lead-container-image-ratio);
|
|
216
269
|
--sbb-image-object-fit: cover;
|
|
217
270
|
|
|
@@ -222,7 +275,7 @@ sbb-lead-container {
|
|
|
222
275
|
// TODO: Move back to the sbb-message components when the global CSS refactoring happens
|
|
223
276
|
sbb-message {
|
|
224
277
|
> [slot='image']:is(sbb-image, img),
|
|
225
|
-
> [slot='image'] :is(sbb-image, img) {
|
|
278
|
+
> [slot='image'] :is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
226
279
|
border-radius: var(--sbb-message-image-border-radius);
|
|
227
280
|
}
|
|
228
281
|
}
|
|
@@ -244,7 +297,7 @@ sbb-message {
|
|
|
244
297
|
}
|
|
245
298
|
}
|
|
246
299
|
|
|
247
|
-
:is(sbb-image, img) {
|
|
300
|
+
:is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
248
301
|
will-change: filter;
|
|
249
302
|
filter: brightness(var(--sbb-teaser-image-brightness, 1));
|
|
250
303
|
transition: filter var(--sbb-teaser-image-animation-duration)
|
|
@@ -254,20 +307,20 @@ sbb-message {
|
|
|
254
307
|
|
|
255
308
|
// TODO: Move back to the teaser components when the global CSS refactoring happens
|
|
256
309
|
:is(sbb-teaser-product, sbb-teaser-product-static) {
|
|
257
|
-
:is(sbb-image, img) {
|
|
310
|
+
:is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
258
311
|
border-radius: 0; // Reset sbb-image border radius in order to control it from teaser product.
|
|
259
312
|
|
|
260
313
|
--sbb-image-object-fit: cover;
|
|
261
314
|
--sbb-image-aspect-ratio: 16 / 9;
|
|
262
315
|
}
|
|
263
316
|
|
|
264
|
-
img {
|
|
317
|
+
img:not(.sbb-figure-overlap-image) {
|
|
265
318
|
place-self: stretch;
|
|
266
319
|
}
|
|
267
320
|
}
|
|
268
321
|
|
|
269
322
|
// TODO: Move back to the teaser components when the global CSS refactoring happens
|
|
270
|
-
sbb-teaser :is(sbb-image, img) {
|
|
323
|
+
sbb-teaser :is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
271
324
|
--sbb-image-object-fit: cover;
|
|
272
325
|
--sbb-image-aspect-ratio: 4 / 3;
|
|
273
326
|
|
|
@@ -277,8 +330,8 @@ sbb-teaser :is(sbb-image, img) {
|
|
|
277
330
|
}
|
|
278
331
|
|
|
279
332
|
// TODO: Move back to the teaser-hero components when the global CSS refactoring happens
|
|
280
|
-
|
|
281
|
-
:is(sbb-image, img) {
|
|
333
|
+
sbb-teaser-hero {
|
|
334
|
+
:is(sbb-image, img):not(.sbb-figure-overlap-image) {
|
|
282
335
|
--sbb-image-aspect-ratio: 1 / 1;
|
|
283
336
|
|
|
284
337
|
border-radius: 0;
|
|
@@ -288,7 +341,7 @@ sbb-teaser :is(sbb-image, img) {
|
|
|
288
341
|
}
|
|
289
342
|
}
|
|
290
343
|
|
|
291
|
-
img {
|
|
344
|
+
img:not(.sbb-figure-overlap-image) {
|
|
292
345
|
display: block;
|
|
293
346
|
align-self: stretch;
|
|
294
347
|
width: 100%;
|
|
@@ -408,3 +461,15 @@ sbb-sidebar:has(sbb-sidebar-title) {
|
|
|
408
461
|
sbb-header + :where(sbb-sidebar-container, sbb-icon-sidebar-container) {
|
|
409
462
|
margin-block-start: var(--sbb-header-height);
|
|
410
463
|
}
|
|
464
|
+
|
|
465
|
+
// We set some dimension to the selects trigger element in order that the screen reader's outline box looks more accurate.
|
|
466
|
+
.sbb-select-trigger {
|
|
467
|
+
width: 100%;
|
|
468
|
+
|
|
469
|
+
// We set the smallest possible height (zero breakpoint, size s)
|
|
470
|
+
height: var(--sbb-size-element-xs);
|
|
471
|
+
|
|
472
|
+
sbb-form-field & {
|
|
473
|
+
top: 0;
|
|
474
|
+
}
|
|
475
|
+
}
|