@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
|
@@ -12,7 +12,7 @@ import { SbbNamedSlotListMixin as C } from "../core/mixins.js";
|
|
|
12
12
|
const M = _`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-action-gap: var(--sbb-spacing-responsive-xs);--sbb-navigation-marker-position-x: var(--sbb-spacing-fixed-1x);--sbb-navigation-marker-position-y: unset;--sbb-navigation-marker-width: 1.0625rem;--sbb-navigation-marker-border: var(--sbb-border-width-1x);--sbb-navigation-marker-padding-inline-start: var(--sbb-spacing-fixed-6x);--sbb-navigation-marker-typo-line-height: var(--sbb-typo-line-height-titles);--sbb-navigation-margin-inline-start: var(--sbb-spacing-fixed-3x);--sbb-navigation-marker-margin-block: calc( 1em * var(--sbb-navigation-marker-typo-line-height) / 2 - var(--sbb-navigation-marker-border) / 2 );display:block}:host([size=s]){--sbb-navigation-action-gap: var(--sbb-spacing-fixed-2x);--sbb-navigation-marker-width: .5rem;--sbb-navigation-marker-typo-line-height: var(--sbb-typo-line-height-body-text);--sbb-navigation-margin-inline-start: var(--sbb-spacing-fixed-2x);--sbb-navigation-marker-position-x: calc( var(--sbb-navigation-marker-padding-inline-start) - var(--sbb-spacing-fixed-2x) );--sbb-navigation-marker-padding-inline-start: calc( var(--sbb-spacing-fixed-6x) + var(--sbb-spacing-fixed-1x) )}.sbb-navigation-marker{list-style:none;padding:0;font-size:inherit;--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-4);position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:var(--sbb-navigation-action-gap);padding-inline-start:var(--sbb-navigation-marker-padding-inline-start)}.sbb-navigation-marker:before{content:"";position:absolute;opacity:0;inset-inline-start:var(--sbb-navigation-marker-position-x);inset-block-start:var(--sbb-navigation-marker-position-y);width:var(--sbb-navigation-marker-width);border-block-start:var(--sbb-navigation-marker-border) solid var(--sbb-color-storm);margin-block:var(--sbb-navigation-marker-margin-block);transition-duration:var(--sbb-disable-animation-duration, var(--sbb-animation-duration-6x));transition-timing-function:ease;transition-property:opacity,inset-block-start}:host([data-has-active-action]) .sbb-navigation-marker:before{opacity:1}@media (forced-colors: active){.sbb-navigation-marker:before{border-color:CanvasText}}:host([size=s]) .sbb-navigation-marker{--sbb-text-font-size: var(--sbb-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}::slotted(:is(sbb-navigation-button,sbb-navigation-link)){margin-inline-start:var(--sbb-navigation-margin-inline-start)}`;
|
|
13
13
|
let O = (() => {
|
|
14
14
|
var o, n;
|
|
15
|
-
let i = [z("sbb-navigation-marker")], e, a = [], s, v = C(A), g,
|
|
15
|
+
let i = [z("sbb-navigation-marker")], e, a = [], s, v = C(A), g, d = [], m = [];
|
|
16
16
|
return n = class extends v {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
@@ -20,7 +20,7 @@ let O = (() => {
|
|
|
20
20
|
this.listChildLocalNames = [
|
|
21
21
|
"sbb-navigation-button",
|
|
22
22
|
"sbb-navigation-link"
|
|
23
|
-
], l(this, o, c(this,
|
|
23
|
+
], l(this, o, c(this, d, S() ? "s" : "l")), this._currentActiveAction = c(this, m), new y(this, {
|
|
24
24
|
skipInitial: !0,
|
|
25
25
|
callback: () => this._setMarkerPosition()
|
|
26
26
|
});
|
|
@@ -74,7 +74,7 @@ let O = (() => {
|
|
|
74
74
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
|
|
75
75
|
g = [w({ reflect: !0 })], x(n, null, g, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (r) => "size" in r, get: (r) => r.size, set: (r, b) => {
|
|
76
76
|
r.size = b;
|
|
77
|
-
} }, metadata: t },
|
|
77
|
+
} }, metadata: t }, d, m), x(null, e = { value: s }, i, { kind: "class", name: s.name, metadata: t }, null, a), s = e.value, t && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
78
78
|
})(), n.styles = M, c(s, a), s;
|
|
79
79
|
})();
|
|
80
80
|
export {
|
package/navigation/navigation.js
CHANGED
|
@@ -2,23 +2,23 @@ var A = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var O = (e, o, s) => o.has(e) || A("Cannot " + s);
|
|
5
|
-
var h = (e, o, s) => (O(e, o, "read from private field"), s ? s.call(e) : o.get(e)), m = (e, o, s) => o.has(e) ? A("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, s),
|
|
6
|
-
import { __esDecorate as
|
|
5
|
+
var h = (e, o, s) => (O(e, o, "read from private field"), s ? s.call(e) : o.get(e)), m = (e, o, s) => o.has(e) ? A("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, s), d = (e, o, s, r) => (O(e, o, "write to private field"), r ? r.call(e, s) : o.set(e, s), s);
|
|
6
|
+
import { __esDecorate as g, __runInitializers as v } from "tslib";
|
|
7
7
|
import { MutationController as D } from "@lit-labs/observers/mutation-controller.js";
|
|
8
8
|
import { ResizeController as H } from "@lit-labs/observers/resize-controller.js";
|
|
9
9
|
import { css as B, html as z } from "lit";
|
|
10
|
-
import { customElement as F, property as L, state as
|
|
10
|
+
import { customElement as F, property as L, state as P } from "lit/decorators.js";
|
|
11
11
|
import { ref as T } from "lit/directives/ref.js";
|
|
12
|
-
import { SbbFocusHandler as
|
|
13
|
-
import { SbbOpenCloseBaseElement as
|
|
14
|
-
import { SbbLanguageController as
|
|
12
|
+
import { SbbFocusHandler as R, setModalityOnNextFocus as I } from "../core/a11y.js";
|
|
13
|
+
import { SbbOpenCloseBaseElement as q } from "../core/base-elements.js";
|
|
14
|
+
import { SbbLanguageController as M, SbbInertController as U } from "../core/controllers.js";
|
|
15
15
|
import { hostAttributes as $, forceType as X } from "../core/decorators.js";
|
|
16
16
|
import { SbbScrollHandler as Z, isZeroAnimationDuration as j, findReferencedElement as V } from "../core/dom.js";
|
|
17
17
|
import { i18nCloseNavigation as G } from "../core/i18n.js";
|
|
18
18
|
import { SbbUpdateSchedulerMixin as K } from "../core/mixins.js";
|
|
19
19
|
import { isEventOnElement as u, removeAriaOverlayTriggerAttributes as W, setAriaOverlayTriggerAttributes as J } from "../core/overlay.js";
|
|
20
20
|
import "../button/transparent-button.js";
|
|
21
|
-
const Q = B`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-grid-column: 1 / 5;--sbb-navigation-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-3x) );--sbb-navigation-animation-easing: ease-in;--sbb-navigation-padding-inline: var(--sbb-layout-base-offset-responsive);--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-l);--sbb-navigation-padding-block-end: var(--sbb-spacing-responsive-xl);--sbb-navigation-backdrop-visibility: hidden;--sbb-navigation-backdrop-pointer-events: none;--sbb-navigation-backdrop-color: transparent;--sbb-navigation-list-margin-block-start: var(--sbb-spacing-responsive-xxl);--sbb-navigation-inline-start: 0;--sbb-navigation-expanded-width: 100%;--sbb-navigation-inset: 0 auto auto 0;--sbb-navigation-transform: translateX(-100%);--sbb-navigation-content-transform: translateX(0);--sbb-navigation-width: 100%;--sbb-navigation-height: 100dvh;--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);display:
|
|
21
|
+
const Q = B`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-grid-column: 1 / 5;--sbb-navigation-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-3x) );--sbb-navigation-animation-easing: ease-in;--sbb-navigation-padding-inline: var(--sbb-layout-base-offset-responsive);--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-l);--sbb-navigation-padding-block-end: var(--sbb-spacing-responsive-xl);--sbb-navigation-backdrop-visibility: hidden;--sbb-navigation-backdrop-pointer-events: none;--sbb-navigation-backdrop-color: transparent;--sbb-navigation-list-margin-block-start: var(--sbb-spacing-responsive-xxl);--sbb-navigation-inline-start: 0;--sbb-navigation-expanded-width: 100%;--sbb-navigation-inset: 0 auto auto 0;--sbb-navigation-transform: translateX(-100%);--sbb-navigation-content-transform: translateX(0);--sbb-navigation-width: 100%;--sbb-navigation-height: 100dvh;--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);display:none;position:fixed;inset:var(--sbb-navigation-inset);z-index:var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index));overflow:hidden}@media (min-width: 52.5rem){:host{--sbb-navigation-grid-column: 1 / 9}}@media (min-width: 64rem){:host{--sbb-navigation-grid-column: 1 / 5;--sbb-navigation-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-xl);--sbb-navigation-padding-inline: var(--sbb-layout-base-offset-responsive) 0;--sbb-navigation-list-margin-block-start: var(--sbb-spacing-fixed-1x);--sbb-navigation-inline-start: calc(var(--sbb-layout-base-offset-responsive) * -1);--sbb-navigation-width: calc(100% + var(--sbb-layout-base-offset-responsive))}}@media (min-width: 90rem){:host{--sbb-navigation-grid-column: 1 / 6;--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-xxl)}}:host([data-state]:not([data-state=closed])){display:block}:host([data-state=opened]){--sbb-navigation-animation-easing: ease-out}:host(:is([data-state=opened],[data-state=opening])){--sbb-navigation-backdrop-visibility: visible;--sbb-navigation-backdrop-pointer-events: all;--sbb-navigation-backdrop-color: var(--sbb-color-black-alpha-70)}:host(:not([data-state=closed])){--sbb-navigation-inset: 0;--sbb-navigation-transform: translateX(0)}:host([data-has-navigation-section]){--sbb-navigation-content-transform: translateX(-100%)}@media (min-width: 64rem){:host([data-has-navigation-section]){--sbb-navigation-expanded-width: 100dvw;--sbb-navigation-content-transform: translateX(0%)}}:host([data-resize-disable-animation]){--sbb-disable-animation-duration: 0s}.sbb-navigation__container{display:grid;gap:var(--sbb-grid-base-gutter-responsive);grid-template-columns:repeat(var(--sbb-grid-base-columns),1fr);padding-inline:0;pointer-events:none;transform:var(--sbb-navigation-transform)}@media (min-width: 64rem){.sbb-navigation__container{padding-inline:var(--sbb-layout-base-offset-responsive)}.sbb-navigation__container:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:background-color,visibility;content:"";visibility:var(--sbb-navigation-backdrop-visibility);pointer-events:var(--sbb-navigation-backdrop-pointer-events);position:fixed;inset:var(--sbb-navigation-inset);background-color:var(--sbb-navigation-backdrop-color)}}.sbb-navigation{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;display:none;width:var(--sbb-navigation-width);grid-column:var(--sbb-navigation-grid-column);padding:0;margin:0;position:relative;inset-inline-start:var(--sbb-navigation-inline-start);inset-block-start:0;border:none;pointer-events:none;height:var(--sbb-navigation-height);color:var(--sbb-color-white);background-color:var(--sbb-color-midnight)}.sbb-navigation:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;content:"";position:absolute;width:var(--sbb-navigation-expanded-width);height:var(--sbb-navigation-height);background:var(--sbb-color-midnight)}:host([data-state]:not([data-state=closed])) .sbb-navigation{display:block;pointer-events:all;animation-name:open;animation-duration:var(--sbb-navigation-animation-duration);animation-timing-function:var(--sbb-navigation-animation-easing)}:host([data-state][data-state=closing]) .sbb-navigation{pointer-events:none;animation-name:close}@media (forced-colors: active){.sbb-navigation{outline:var(--sbb-border-width-1x) solid CanvasText}}.sbb-navigation__wrapper{outline:none}.sbb-navigation__header{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;display:flex;justify-content:flex-end;position:absolute;width:var(--sbb-navigation-expanded-width);pointer-events:none;padding:var(--sbb-spacing-responsive-xs);z-index:calc(var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index)) + 1)}.sbb-navigation__close{pointer-events:all}.sbb-navigation__content{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:transform;--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: var(--sbb-color-white-alpha-30);--sbb-scrollbar-color-hover: var(--sbb-color-white-alpha-60);--sbb-scrollbar-track-color: transparent;--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x)}.sbb-navigation__content::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation__content::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation__content::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-navigation__content::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-navigation__content::-webkit-scrollbar-button,.sbb-navigation__content::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-navigation__content{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-navigation__content{display:flex;flex-direction:column;gap:var(--sbb-spacing-responsive-xxl);position:relative;height:var(--sbb-navigation-height);padding-inline:var(--sbb-navigation-padding-inline);padding-block:var(--sbb-navigation-padding-block-start) var(--sbb-navigation-padding-block-end);overflow-y:auto;transform:var(--sbb-navigation-content-transform)}::slotted(:first-child){margin-block-start:var(--sbb-navigation-list-margin-block-start)}@keyframes open{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes close{0%{transform:translate(0)}to{transform:translate(-100%)}}`, Y = {
|
|
22
22
|
subtree: !0,
|
|
23
23
|
attributeFilter: ["data-state"]
|
|
24
24
|
};
|
|
@@ -27,15 +27,16 @@ const it = 150;
|
|
|
27
27
|
let ft = (() => {
|
|
28
28
|
var l, c, b;
|
|
29
29
|
let e = [F("sbb-navigation"), $({
|
|
30
|
-
role: "navigation"
|
|
31
|
-
|
|
30
|
+
role: "navigation",
|
|
31
|
+
popover: "manual"
|
|
32
|
+
})], o, s = [], r, p = K(q), _ = [], f, w, k = [], y = [], C, E = [], x = [];
|
|
32
33
|
return b = class extends p {
|
|
33
34
|
constructor() {
|
|
34
35
|
var t, i, a;
|
|
35
36
|
super();
|
|
36
37
|
m(this, l);
|
|
37
38
|
m(this, c);
|
|
38
|
-
this._trigger = (v(this, _), null),
|
|
39
|
+
this._trigger = (v(this, _), null), d(this, l, v(this, k, "")), d(this, c, (v(this, y), v(this, E, null))), this._navigation = v(this, x), this._triggerElement = null, this._language = new M(this), this._inertController = new U(this), this._focusHandler = new R(), this._scrollHandler = new Z(), this._isPointerDownEventOnNavigation = !1, this._resizeObserverTimeout = null, this._navigationResizeObserver = new H(this, {
|
|
39
40
|
skipInitial: !0,
|
|
40
41
|
callback: () => this._onNavigationResize()
|
|
41
42
|
}), this._trapFocusFilter = (n) => n.nodeName !== "SBB-NAVIGATION-SECTION" || n.getAttribute("data-state") === "opened", this._pointerDownListener = (n) => {
|
|
@@ -67,7 +68,7 @@ let ft = (() => {
|
|
|
67
68
|
return h(this, l);
|
|
68
69
|
}
|
|
69
70
|
set accessibilityCloseLabel(t) {
|
|
70
|
-
|
|
71
|
+
d(this, l, t);
|
|
71
72
|
}
|
|
72
73
|
/**
|
|
73
74
|
* Whether a navigation section is displayed.
|
|
@@ -76,7 +77,7 @@ let ft = (() => {
|
|
|
76
77
|
return h(this, c);
|
|
77
78
|
}
|
|
78
79
|
set _activeNavigationSection(t) {
|
|
79
|
-
|
|
80
|
+
d(this, c, t);
|
|
80
81
|
}
|
|
81
82
|
get activeNavigationSection() {
|
|
82
83
|
return this._activeNavigationSection;
|
|
@@ -85,8 +86,8 @@ let ft = (() => {
|
|
|
85
86
|
* Opens the navigation.
|
|
86
87
|
*/
|
|
87
88
|
open() {
|
|
88
|
-
var t;
|
|
89
|
-
this.state !== "closed" || !this._navigation || this.willOpen.emit() && (this.state = "opening", this._checkActiveActions(), this._checkActiveSection(), this.startUpdate(), this._scrollHandler.disableScroll(), (
|
|
89
|
+
var t, i;
|
|
90
|
+
this.state !== "closed" || !this._navigation || this.willOpen.emit() && ((t = this.showPopover) == null || t.call(this), this.state = "opening", this._checkActiveActions(), this._checkActiveSection(), this.startUpdate(), this._scrollHandler.disableScroll(), (i = this._triggerElement) == null || i.setAttribute("aria-expanded", "true"), this._isZeroAnimationDuration() && this._handleOpening());
|
|
90
91
|
}
|
|
91
92
|
_checkActiveSection() {
|
|
92
93
|
var i;
|
|
@@ -111,8 +112,8 @@ let ft = (() => {
|
|
|
111
112
|
return j(this, "--sbb-navigation-animation-duration");
|
|
112
113
|
}
|
|
113
114
|
_handleClosing() {
|
|
114
|
-
var t, i;
|
|
115
|
-
this.state = "closed", this._navigationContentElement.scrollTo(0, 0), I(this._triggerElement), this._inertController.deactivate(), (
|
|
115
|
+
var t, i, a;
|
|
116
|
+
this.state = "closed", (t = this.hidePopover) == null || t.call(this), this._navigationContentElement.scrollTo(0, 0), I(this._triggerElement), this._inertController.deactivate(), (i = this._triggerElement) == null || i.focus(), this.didClose.emit(), this._navigationResizeObserver.unobserve(this), this._resetMarkers(), (a = this._windowEventsController) == null || a.abort(), this._focusHandler.disconnect(), this._scrollHandler.enableScroll(), this.completeUpdate();
|
|
116
117
|
}
|
|
117
118
|
_handleOpening() {
|
|
118
119
|
this.state = "opened", this._navigationResizeObserver.observe(this), this._inertController.activate(), this._focusHandler.trap(this, { filter: this._trapFocusFilter }), this._attachWindowEvents(), this._setNavigationFocus(), this.completeUpdate(), this.didOpen.emit();
|
|
@@ -214,13 +215,13 @@ let ft = (() => {
|
|
|
214
215
|
}
|
|
215
216
|
}, l = new WeakMap(), c = new WeakMap(), r = b, (() => {
|
|
216
217
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
|
|
217
|
-
f = [L()], w = [X(), L({ attribute: "accessibility-close-label" })], C = [
|
|
218
|
+
f = [L()], w = [X(), L({ attribute: "accessibility-close-label" })], C = [P()], g(b, null, f, { kind: "setter", name: "trigger", static: !1, private: !1, access: { has: (i) => "trigger" in i, set: (i, a) => {
|
|
218
219
|
i.trigger = a;
|
|
219
|
-
} }, metadata: t }, null, _),
|
|
220
|
+
} }, metadata: t }, null, _), g(b, null, w, { kind: "accessor", name: "accessibilityCloseLabel", static: !1, private: !1, access: { has: (i) => "accessibilityCloseLabel" in i, get: (i) => i.accessibilityCloseLabel, set: (i, a) => {
|
|
220
221
|
i.accessibilityCloseLabel = a;
|
|
221
|
-
} }, metadata: t }, k, y),
|
|
222
|
+
} }, metadata: t }, k, y), g(b, null, C, { kind: "accessor", name: "_activeNavigationSection", static: !1, private: !1, access: { has: (i) => "_activeNavigationSection" in i, get: (i) => i._activeNavigationSection, set: (i, a) => {
|
|
222
223
|
i._activeNavigationSection = a;
|
|
223
|
-
} }, metadata: t }, E, x),
|
|
224
|
+
} }, metadata: t }, E, x), g(null, o = { value: r }, e, { kind: "class", name: r.name, metadata: t }, null, s), r = o.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
224
225
|
})(), b.styles = Q, v(r, s), r;
|
|
225
226
|
})();
|
|
226
227
|
export {
|
package/notification.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var B = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var M = (e, a,
|
|
5
|
-
var c = (e, a,
|
|
4
|
+
var M = (e, a, o) => a.has(e) || B("Cannot " + o);
|
|
5
|
+
var c = (e, a, o) => (M(e, a, "read from private field"), o ? o.call(e) : a.get(e)), d = (e, a, o) => a.has(e) ? B("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, o), s = (e, a, o, l) => (M(e, a, "write to private field"), l ? l.call(e, o) : a.set(e, o), o);
|
|
6
6
|
import { __runInitializers as r, __esDecorate as f } from "tslib";
|
|
7
7
|
import { ResizeController as F } from "@lit-labs/observers/resize-controller.js";
|
|
8
|
-
import { css as G,
|
|
8
|
+
import { css as G, LitElement as J, html as P, nothing as K } from "lit";
|
|
9
9
|
import { customElement as Q, property as y } from "lit/decorators.js";
|
|
10
10
|
import { SbbLanguageController as V } from "./core/controllers.js";
|
|
11
11
|
import { slotState as W, forceType as q, omitEmptyConverter as X } from "./core/decorators.js";
|
|
@@ -21,11 +21,11 @@ const ei = G`*,:before,:after{box-sizing:border-box}:host{--sbb-notification-mar
|
|
|
21
21
|
["success", "circle-tick-small"],
|
|
22
22
|
["warn", "circle-exclamation-point-small"],
|
|
23
23
|
["error", "circle-cross-small"]
|
|
24
|
-
]),
|
|
24
|
+
]), ni = 150;
|
|
25
25
|
let yi = (() => {
|
|
26
|
-
var m, p, v, _, g, u,
|
|
27
|
-
let e = [Q("sbb-notification"), W()], a,
|
|
28
|
-
var h = (
|
|
26
|
+
var m, p, v, _, g, u, n;
|
|
27
|
+
let e = [Q("sbb-notification"), W()], a, o = [], l, w = J, z, k = [], C = [], O, E = [], L = [], N, T = [], A = [], I, S = [], $ = [], D, R = [], H = [], Z, U = [], j = [];
|
|
28
|
+
var h = (n = class extends w {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
d(this, m);
|
|
@@ -119,7 +119,7 @@ let yi = (() => {
|
|
|
119
119
|
this.style.setProperty("--sbb-notification-height", t);
|
|
120
120
|
}
|
|
121
121
|
_onNotificationResize() {
|
|
122
|
-
this._state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"),
|
|
122
|
+
this._state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"), ni), setTimeout(() => this._setNotificationHeight()));
|
|
123
123
|
}
|
|
124
124
|
_onNotificationAnimationEnd(t) {
|
|
125
125
|
this._state === "opening" && t.animationName === "open" && this._handleOpening(), this._state === "closing" && t.animationName === "close-height" && this._handleClosing();
|
|
@@ -150,7 +150,7 @@ let yi = (() => {
|
|
|
150
150
|
<slot></slot>
|
|
151
151
|
</span>
|
|
152
152
|
|
|
153
|
-
${this.readonly ?
|
|
153
|
+
${this.readonly ? K : P`<span class="sbb-notification__close-wrapper">
|
|
154
154
|
<sbb-divider class="sbb-notification__divider" orientation="vertical"></sbb-divider>
|
|
155
155
|
<sbb-secondary-button
|
|
156
156
|
size=${this.size}
|
|
@@ -164,27 +164,27 @@ let yi = (() => {
|
|
|
164
164
|
</div>
|
|
165
165
|
`;
|
|
166
166
|
}
|
|
167
|
-
}, m = new WeakMap(), p = new WeakMap(), v = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), u = new WeakMap(), l =
|
|
167
|
+
}, m = new WeakMap(), p = new WeakMap(), v = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), u = new WeakMap(), l = n, (() => {
|
|
168
168
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(w[Symbol.metadata] ?? null) : void 0;
|
|
169
|
-
z = [y({ reflect: !0 })], O = [q(), y({ attribute: "title-content", reflect: !0, converter: X })], N = [y({ attribute: "title-level" })], I = [q(), y({ reflect: !0, type: Boolean })], D = [y({ reflect: !0 })], Z = [y({ reflect: !0 })], f(
|
|
169
|
+
z = [y({ reflect: !0 })], O = [q(), y({ attribute: "title-content", reflect: !0, converter: X })], N = [y({ attribute: "title-level" })], I = [q(), y({ reflect: !0, type: Boolean })], D = [y({ reflect: !0 })], Z = [y({ reflect: !0 })], f(n, null, z, { kind: "accessor", name: "type", static: !1, private: !1, access: { has: (i) => "type" in i, get: (i) => i.type, set: (i, b) => {
|
|
170
170
|
i.type = b;
|
|
171
|
-
} }, metadata: t }, k, C), f(
|
|
171
|
+
} }, metadata: t }, k, C), f(n, null, O, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (i) => "titleContent" in i, get: (i) => i.titleContent, set: (i, b) => {
|
|
172
172
|
i.titleContent = b;
|
|
173
|
-
} }, metadata: t }, E, L), f(
|
|
173
|
+
} }, metadata: t }, E, L), f(n, null, N, { kind: "accessor", name: "titleLevel", static: !1, private: !1, access: { has: (i) => "titleLevel" in i, get: (i) => i.titleLevel, set: (i, b) => {
|
|
174
174
|
i.titleLevel = b;
|
|
175
|
-
} }, metadata: t }, T, A), f(
|
|
175
|
+
} }, metadata: t }, T, A), f(n, null, I, { kind: "accessor", name: "readonly", static: !1, private: !1, access: { has: (i) => "readonly" in i, get: (i) => i.readonly, set: (i, b) => {
|
|
176
176
|
i.readonly = b;
|
|
177
|
-
} }, metadata: t }, S, $), f(
|
|
177
|
+
} }, metadata: t }, S, $), f(n, null, D, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, b) => {
|
|
178
178
|
i.size = b;
|
|
179
|
-
} }, metadata: t }, R, H), f(
|
|
179
|
+
} }, metadata: t }, R, H), f(n, null, Z, { kind: "accessor", name: "animation", static: !1, private: !1, access: { has: (i) => "animation" in i, get: (i) => i.animation, set: (i, b) => {
|
|
180
180
|
i.animation = b;
|
|
181
|
-
} }, metadata: t }, U, j), f(null, a = { value: l }, e, { kind: "class", name: l.name, metadata: t }, null,
|
|
182
|
-
})(),
|
|
181
|
+
} }, metadata: t }, U, j), f(null, a = { value: l }, e, { kind: "class", name: l.name, metadata: t }, null, o), h = l = a.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
182
|
+
})(), n.styles = ei, n.events = {
|
|
183
183
|
willOpen: "willOpen",
|
|
184
184
|
didOpen: "didOpen",
|
|
185
185
|
willClose: "willClose",
|
|
186
186
|
didClose: "didClose"
|
|
187
|
-
}, r(l,
|
|
187
|
+
}, r(l, o), n);
|
|
188
188
|
return h = l;
|
|
189
189
|
})();
|
|
190
190
|
export {
|
package/option/optgroup.js
CHANGED
|
@@ -8,14 +8,14 @@ import { property as D, state as T, customElement as E } from "lit/decorators.js
|
|
|
8
8
|
import { MutationController as I } from "@lit-labs/observers/mutation-controller.js";
|
|
9
9
|
import { css as L, LitElement as j, html as q } from "lit";
|
|
10
10
|
import { hostAttributes as P, forceType as U } from "../core/decorators.js";
|
|
11
|
-
import {
|
|
11
|
+
import { isSafari as B, setOrRemoveAttribute as F } from "../core/dom.js";
|
|
12
12
|
import { SbbDisabledMixin as M, SbbHydrationMixin as $ } from "../core/mixins.js";
|
|
13
13
|
import "../divider.js";
|
|
14
|
-
const N = L`*,:before,:after{box-sizing:border-box}:host{--sbb-optgroup-divider-display: block;--sbb-optgroup-divider-spacing: 0;--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-padding-inline: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-font-size: var(--sbb-typo-scale-0-75x);--sbb-optgroup-label-color: var(--sbb-color-metal);display:block}:host(:first-child){--sbb-optgroup-divider-display: none;--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-2x)}:host([data-variant=select]){--sbb-optgroup-divider-spacing: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-padding-inline: var(--sbb-spacing-responsive-xxxs);--sbb-optgroup-label-padding-start: 0;--sbb-optgroup-label-font-size: inherit}:host([data-variant=select]:first-child){--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-4x)}:host([data-negative]){--sbb-optgroup-label-color: var(--sbb-color-smoke)}.sbb-optgroup{margin-block:var(--sbb-spacing-fixed-4x);margin-inline:var(--sbb-spacing-fixed-4x)}.sbb-optgroup__label{--sbb-text-font-size: var(--sbb-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;column-gap:var(--sbb-spacing-responsive-xxxs);color:var(--sbb-optgroup-label-color);-webkit-text-fill-color:var(--sbb-optgroup-label-color);padding-inline:var(--sbb-optgroup-label-padding-inline);padding-block:var(--sbb-optgroup-label-padding-start) var(--sbb-spacing-fixed-2x)}:host([data-variant=select][data-multiple]) .sbb-optgroup__label{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);padding-inline-start:calc(var(--sbb-spacing-responsive-xxxs) + var(--sbb-spacing-fixed-8x))}.sbb-optgroup__divider{display:var(--sbb-optgroup-divider-display);padding-block:var(--sbb-optgroup-divider-spacing)}.sbb-optgroup__icon-space{display:var(--sbb-option-icon-container-display, none);min-width:var(--sbb-size-icon-ui-small)}`, x =
|
|
14
|
+
const N = L`*,:before,:after{box-sizing:border-box}:host{--sbb-optgroup-divider-display: block;--sbb-optgroup-divider-spacing: 0;--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-padding-inline: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-font-size: var(--sbb-typo-scale-0-75x);--sbb-optgroup-label-color: var(--sbb-color-metal);display:block}:host(:first-child){--sbb-optgroup-divider-display: none;--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-2x)}:host([data-variant=select]){--sbb-optgroup-divider-spacing: var(--sbb-spacing-fixed-4x);--sbb-optgroup-label-padding-inline: var(--sbb-spacing-responsive-xxxs);--sbb-optgroup-label-padding-start: 0;--sbb-optgroup-label-font-size: inherit}:host([data-variant=select]:first-child){--sbb-optgroup-label-padding-start: var(--sbb-spacing-fixed-4x)}:host([data-negative]){--sbb-optgroup-label-color: var(--sbb-color-smoke)}.sbb-optgroup{margin-block:var(--sbb-spacing-fixed-4x);margin-inline:var(--sbb-spacing-fixed-4x)}.sbb-optgroup__label{--sbb-text-font-size: var(--sbb-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;column-gap:var(--sbb-spacing-responsive-xxxs);color:var(--sbb-optgroup-label-color);-webkit-text-fill-color:var(--sbb-optgroup-label-color);padding-inline:var(--sbb-optgroup-label-padding-inline);padding-block:var(--sbb-optgroup-label-padding-start) var(--sbb-spacing-fixed-2x)}:host([data-variant=select][data-multiple]) .sbb-optgroup__label{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);padding-inline-start:calc(var(--sbb-spacing-responsive-xxxs) + var(--sbb-spacing-fixed-8x))}.sbb-optgroup__divider{display:var(--sbb-optgroup-divider-display);padding-block:var(--sbb-optgroup-divider-spacing)}.sbb-optgroup__icon-space{display:var(--sbb-option-icon-container-display, none);min-width:var(--sbb-size-icon-ui-small)}`, x = B;
|
|
15
15
|
let R = (() => {
|
|
16
|
-
var u, g, h,
|
|
17
|
-
let i = [P({ role: x ? null : "group" })], a, l = [], s, c = M($(j)),
|
|
18
|
-
return
|
|
16
|
+
var u, g, h, n;
|
|
17
|
+
let i = [P({ role: x ? null : "group" })], a, l = [], s, c = M($(j)), b, y = [], r = [], d, A = [], z = [], G, S = [], k = [];
|
|
18
|
+
return n = class extends c {
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
21
|
m(this, u, p(this, y, ""));
|
|
@@ -68,7 +68,7 @@ let R = (() => {
|
|
|
68
68
|
for (const o of this.options)
|
|
69
69
|
o.removeAttribute("data-group-label"), (e = o.requestUpdate) == null || e.call(o);
|
|
70
70
|
else {
|
|
71
|
-
|
|
71
|
+
F(this, "aria-label", this.label);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -99,20 +99,20 @@ let R = (() => {
|
|
|
99
99
|
<slot @slotchange=${this._handleSlotchange}></slot>
|
|
100
100
|
`;
|
|
101
101
|
}
|
|
102
|
-
}, u = new WeakMap(), g = new WeakMap(), h = new WeakMap(), s =
|
|
102
|
+
}, u = new WeakMap(), g = new WeakMap(), h = new WeakMap(), s = n, (() => {
|
|
103
103
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
104
|
-
|
|
104
|
+
b = [U(), D()], d = [T()], G = [T()], v(n, null, b, { kind: "accessor", name: "label", static: !1, private: !1, access: { has: (e) => "label" in e, get: (e) => e.label, set: (e, o) => {
|
|
105
105
|
e.label = o;
|
|
106
|
-
} }, metadata: t }, y, r), v(
|
|
106
|
+
} }, metadata: t }, y, r), v(n, null, d, { kind: "accessor", name: "negative", static: !1, private: !1, access: { has: (e) => "negative" in e, get: (e) => e.negative, set: (e, o) => {
|
|
107
107
|
e.negative = o;
|
|
108
|
-
} }, metadata: t }, A, z), v(
|
|
108
|
+
} }, metadata: t }, A, z), v(n, null, G, { kind: "accessor", name: "_inertAriaGroups", static: !1, private: !1, access: { has: (e) => "_inertAriaGroups" in e, get: (e) => e._inertAriaGroups, set: (e, o) => {
|
|
109
109
|
e._inertAriaGroups = o;
|
|
110
110
|
} }, metadata: t }, S, k), v(null, a = { value: s }, i, { kind: "class", name: s.name, metadata: t }, null, l), s = a.value, t && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
111
|
-
})(),
|
|
111
|
+
})(), n.styles = N, p(s, l), s;
|
|
112
112
|
})(), et = (() => {
|
|
113
|
-
var
|
|
113
|
+
var b;
|
|
114
114
|
let i = [E("sbb-optgroup")], a, l = [], s, c = R;
|
|
115
|
-
return
|
|
115
|
+
return b = class extends c {
|
|
116
116
|
get options() {
|
|
117
117
|
var r;
|
|
118
118
|
return Array.from(((r = this.querySelectorAll) == null ? void 0 : r.call(this, "sbb-option")) ?? []);
|
|
@@ -132,7 +132,7 @@ let R = (() => {
|
|
|
132
132
|
var r, d;
|
|
133
133
|
(r = this.closest) != null && r.call(this, "sbb-autocomplete") ? this.setAttribute("data-variant", "autocomplete") : (d = this.closest) != null && d.call(this, "sbb-select") && this.setAttribute("data-variant", "select");
|
|
134
134
|
}
|
|
135
|
-
}, s =
|
|
135
|
+
}, s = b, (() => {
|
|
136
136
|
const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
137
137
|
v(null, a = { value: s }, i, { kind: "class", name: s.name, metadata: r }, null, l), s = a.value, r && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r }), p(s, l);
|
|
138
138
|
})(), s;
|
|
@@ -54,14 +54,15 @@ export declare abstract class SbbOptionBaseElement extends SbbOptionBaseElement_
|
|
|
54
54
|
protected init(): void;
|
|
55
55
|
protected updateAriaDisabled(): void;
|
|
56
56
|
private _updateAriaSelected;
|
|
57
|
-
/**
|
|
57
|
+
/** @deprecated use onExternalMutation() as replacement. Will be removed with next major change. */
|
|
58
58
|
protected onOptionAttributesChange(mutationsList: MutationRecord[]): void;
|
|
59
|
+
/** Observe changes on data attributes + slotted content and set the appropriate values. */
|
|
60
|
+
protected onExternalMutation(mutationsList: MutationRecord[]): void;
|
|
59
61
|
protected handleHighlightState(): void;
|
|
60
62
|
protected getHighlightedLabel(): TemplateResult;
|
|
61
63
|
protected renderIcon(): TemplateResult;
|
|
62
64
|
protected renderLabel(): TemplateResult | typeof nothing;
|
|
63
65
|
protected renderTick(): TemplateResult | typeof nothing;
|
|
64
|
-
private _handleSlotChange;
|
|
65
66
|
protected render(): TemplateResult;
|
|
66
67
|
}
|
|
67
68
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/option/option/option-base-element.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,6BAA6B,CAAC;;
|
|
1
|
+
{"version":3,"file":"option-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/option/option/option-base-element.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,6BAA6B,CAAC;;AAoBrC,8BAEe,oBAAqB,SAAQ,yBAE3C;IACC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAEpC;;;;;OAKG;IACH,IACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAE7B;IACD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,sCAAsC;IACtC,IACW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAGjC;IACD,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,sDAAsD;IACtD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC;IAEjD,iDAAiD;IACjD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;IAEhD,4CAA4C;IACnC,SAAS,CAAC,QAAQ,CAAC,QAAQ,UAAS;IAE7C,yFAAyF;IAChF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,UAAS;IAE7C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAE3C,0CAA0C;IACjC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAEnE,4CAA4C;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IAExD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;;IAsBnC,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,IAAI;IAMP;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrC;;OAEG;IACI,6BAA6B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAQ7C,iBAAiB,IAAI,IAAI;cAUtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cASzD,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAO9E,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IACzD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,IAAI,IAAI;IAEjD,SAAS,CAAC,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAKzD;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAItC,SAAS,CAAC,IAAI,IAAI,IAAI;IAItB,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAQpC,OAAO,CAAC,mBAAmB;IAI3B,mGAAmG;IACnG,SAAS,CAAC,wBAAwB,CAAC,aAAa,EAAE,cAAc,EAAE,GAAG,IAAI;IAIzE,2FAA2F;IAC3F,SAAS,CAAC,kBAAkB,CAAC,aAAa,EAAE,cAAc,EAAE,GAAG,IAAI;IAiBnE,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAuBtC,SAAS,CAAC,mBAAmB,IAAI,cAAc;IAwB/C,SAAS,CAAC,UAAU,IAAI,cAAc;IAItC,SAAS,CAAC,WAAW,IAAI,cAAc,GAAG,OAAO,OAAO;IAIxD,SAAS,CAAC,UAAU,IAAI,cAAc,GAAG,OAAO,OAAO;cAIpC,MAAM,IAAI,cAAc;CAmB5C"}
|