@sbb-esta/lyne-elements 3.10.0 → 3.12.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/action-group/action-group.component.js +1 -1
- package/alert/alert/alert.component.js +1 -1
- package/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete-base-element.js +72 -59
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
- package/badge.css +1 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.js +4 -4
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +1 -1
- package/button/common.js +1 -1
- package/button/mini-button/mini-button.component.js +1 -1
- package/button.js +1 -1
- package/calendar/calendar.component.d.ts +2 -1
- package/calendar/calendar.component.d.ts.map +1 -1
- package/calendar/calendar.component.js +1 -1
- package/card/card/card.component.js +1 -1
- package/card/card-badge/card-badge.component.js +1 -1
- package/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/carousel/carousel-list/carousel-list.component.js +62 -40
- package/checkbox/checkbox-group/checkbox-group.component.js +1 -1
- package/chip/chip/chip.component.js +1 -1
- package/chip/chip-group/chip-group.component.js +1 -1
- package/chip-label/chip-label.component.js +1 -1
- package/container/container/container.component.js +11 -11
- package/container/sticky-bar/sticky-bar.component.js +9 -9
- package/core/controllers/escapable-overlay-controller.d.ts +3 -0
- package/core/controllers/escapable-overlay-controller.d.ts.map +1 -1
- package/core/controllers/overlay-position-controller.d.ts +60 -0
- package/core/controllers/overlay-position-controller.d.ts.map +1 -0
- package/core/controllers/overlay-position-controller.js +224 -0
- package/core/controllers.d.ts +1 -0
- package/core/controllers.d.ts.map +1 -1
- package/core/controllers.js +12 -10
- package/core/mixins.js +1 -1
- package/core/overlay/overlay-option-panel.d.ts +2 -1
- package/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/core/overlay/overlay-option-panel.js +8 -5
- package/core/overlay/position.d.ts +2 -0
- package/core/overlay/position.d.ts.map +1 -1
- package/core/overlay/position.js +19 -17
- package/core/styles/core.scss +27 -2
- package/core/styles/layout.scss +4 -0
- package/core/styles/mixins/badge.scss +3 -0
- package/core/styles/mixins/layout.scss +5 -4
- package/core/styles/mixins/link.scss +0 -11
- package/core.css +21 -2
- package/custom-elements.json +2024 -417
- package/date-input/date-input.component.js +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts +5 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete-base-element.js +25 -5
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -2
- package/development/calendar/calendar.component.d.ts +2 -1
- package/development/calendar/calendar.component.d.ts.map +1 -1
- package/development/calendar/calendar.component.js +1 -1
- package/development/carousel/carousel-list/carousel-list.component.d.ts +8 -3
- package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/development/carousel/carousel-list/carousel-list.component.js +51 -19
- package/development/container/container/container.component.js +3 -3
- package/development/container/sticky-bar/sticky-bar.component.js +5 -5
- package/development/core/controllers/escapable-overlay-controller.d.ts +3 -0
- package/development/core/controllers/escapable-overlay-controller.d.ts.map +1 -1
- package/development/core/controllers/escapable-overlay-controller.js +1 -1
- package/development/core/controllers/overlay-position-controller.d.ts +60 -0
- package/development/core/controllers/overlay-position-controller.d.ts.map +1 -0
- package/development/core/controllers/overlay-position-controller.js +306 -0
- package/development/core/controllers.d.ts +1 -0
- package/development/core/controllers.d.ts.map +1 -1
- package/development/core/controllers.js +3 -1
- package/development/core/overlay/overlay-option-panel.d.ts +2 -1
- package/development/core/overlay/overlay-option-panel.d.ts.map +1 -1
- package/development/core/overlay/overlay-option-panel.js +6 -3
- package/development/core/overlay/position.d.ts +2 -0
- package/development/core/overlay/position.d.ts.map +1 -1
- package/development/core/overlay/position.js +3 -2
- package/development/footer/footer.component.js +3 -3
- package/development/header/header/header.component.js +3 -3
- package/development/lead-container/lead-container.component.js +8 -7
- package/development/link/common/block-link-common.js +2 -12
- package/development/link/common/inline-link-common.js +2 -10
- package/development/link/common/link-common.js +1 -1
- package/development/link/common.js +1 -1
- package/development/{link-common-DPLJx5Uo.js → link-common-BDFF9Oiz.js} +1 -3
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -2
- package/development/link.js +1 -1
- package/development/mini-calendar/mini-calendar/mini-calendar.component.d.ts +35 -0
- package/development/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar/mini-calendar.component.js +199 -0
- package/development/mini-calendar/mini-calendar-day/mini-calendar-day.component.d.ts +23 -0
- package/development/mini-calendar/mini-calendar-day/mini-calendar-day.component.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar-day/mini-calendar-day.component.js +181 -0
- package/development/mini-calendar/mini-calendar-day.d.ts +5 -0
- package/development/mini-calendar/mini-calendar-day.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar-day.js +5 -0
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.d.ts +25 -0
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +123 -0
- package/development/mini-calendar/mini-calendar-month.d.ts +5 -0
- package/development/mini-calendar/mini-calendar-month.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar-month.js +5 -0
- package/development/mini-calendar/mini-calendar.d.ts +5 -0
- package/development/mini-calendar/mini-calendar.d.ts.map +1 -0
- package/development/mini-calendar/mini-calendar.js +5 -0
- package/development/mini-calendar.d.ts +7 -0
- package/development/mini-calendar.d.ts.map +1 -0
- package/development/mini-calendar.js +9 -0
- package/development/paginator/common/paginator-common.d.ts +2 -1
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/paginator/common/paginator-common.js +87 -49
- package/development/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
- package/development/paginator/paginator/paginator.component.d.ts +6 -0
- package/development/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/development/paginator/paginator/paginator.component.js +19 -4
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.d.ts +4 -1
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.d.ts.map +1 -1
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.js +5 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.d.ts +4 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.d.ts.map +1 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.js +5 -1
- package/development/tabs/tab/tab.component.d.ts +9 -0
- package/development/tabs/tab/tab.component.d.ts.map +1 -1
- package/development/tabs/tab/tab.component.js +48 -7
- package/development/tabs/tab-group/tab-group.component.d.ts +7 -3
- package/development/tabs/tab-group/tab-group.component.d.ts.map +1 -1
- package/development/tabs/tab-group/tab-group.component.js +19 -39
- package/development/tabs/tab-label/tab-label.component.d.ts.map +1 -1
- package/development/tabs/tab-label/tab-label.component.js +4 -3
- package/development/tag/tag/tag.component.js +2 -1
- package/development/tooltip/tooltip.component.d.ts +11 -4
- package/development/tooltip/tooltip.component.d.ts.map +1 -1
- package/development/tooltip/tooltip.component.js +57 -78
- package/dialog/dialog/dialog.component.js +1 -1
- package/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
- package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +1 -1
- package/file-selector/common.js +1 -1
- package/file-selector-common-BEWjyy75.js +5 -0
- package/file-selector.js +1 -1
- package/flip-card/flip-card/flip-card.component.js +1 -1
- package/flip-card/flip-card-summary/flip-card-summary.component.js +1 -1
- package/footer/footer.component.js +8 -8
- package/form-error/form-error.component.js +1 -1
- package/form-field/form-field/form-field.component.js +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +1 -1
- package/header/common/header-action-common.js +1 -1
- package/header/header/header.component.js +32 -32
- package/icon-sidebar-button-common-XcKoF2SP.js +7 -0
- package/index.d.ts +6 -0
- package/index.js +6 -0
- package/layout.css +9 -3
- package/lead-container/lead-container.component.js +8 -8
- package/link/common/block-link-common.js +25 -25
- package/link/common/inline-link-common.js +7 -7
- package/link/common/link-common.js +1 -1
- package/link/common.js +1 -1
- package/link-common-nA3q92jp.js +46 -0
- package/link-list/link-list/link-list.component.js +1 -1
- package/link-list/link-list-anchor/link-list-anchor.component.js +5 -5
- package/link.js +1 -1
- package/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/logo/logo.component.js +1 -1
- package/map-container/map-container.component.js +1 -1
- package/menu/common/menu-action-common.js +1 -1
- package/menu/menu/menu.component.js +1 -1
- package/mini-calendar/mini-calendar/mini-calendar.component.d.ts +35 -0
- package/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -0
- package/mini-calendar/mini-calendar/mini-calendar.component.js +129 -0
- package/mini-calendar/mini-calendar-day/mini-calendar-day.component.d.ts +23 -0
- package/mini-calendar/mini-calendar-day/mini-calendar-day.component.d.ts.map +1 -0
- package/mini-calendar/mini-calendar-day/mini-calendar-day.component.js +66 -0
- package/mini-calendar/mini-calendar-day.d.ts +5 -0
- package/mini-calendar/mini-calendar-day.d.ts.map +1 -0
- package/mini-calendar/mini-calendar-day.js +4 -0
- package/mini-calendar/mini-calendar-month/mini-calendar-month.component.d.ts +25 -0
- package/mini-calendar/mini-calendar-month/mini-calendar-month.component.d.ts.map +1 -0
- package/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +59 -0
- package/mini-calendar/mini-calendar-month.d.ts +5 -0
- package/mini-calendar/mini-calendar-month.d.ts.map +1 -0
- package/mini-calendar/mini-calendar-month.js +4 -0
- package/mini-calendar/mini-calendar.d.ts +5 -0
- package/mini-calendar/mini-calendar.d.ts.map +1 -0
- package/mini-calendar/mini-calendar.js +4 -0
- package/mini-calendar.d.ts +7 -0
- package/mini-calendar.d.ts.map +1 -0
- package/mini-calendar.js +8 -0
- package/navigation/common/navigation-action-common.js +1 -1
- package/navigation/navigation/navigation.component.js +1 -1
- package/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/navigation/navigation-section/navigation-section.component.js +1 -1
- package/notification/notification.component.js +1 -1
- package/off-brand-theme.css +31 -5
- package/option/option/option.component.js +1 -1
- package/overlay/overlay.component.js +1 -1
- package/package.json +21 -1
- package/paginator/common/paginator-common.d.ts +2 -1
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/paginator/common/paginator-common.js +102 -81
- package/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
- package/paginator/compact-paginator/compact-paginator.component.js +2 -1
- package/paginator/paginator/paginator.component.d.ts +6 -0
- package/paginator/paginator/paginator.component.d.ts.map +1 -1
- package/paginator/paginator/paginator.component.js +57 -45
- package/popover/popover/popover.component.js +1 -1
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/radio-button/common.js +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/radio-button-common-Bw2t3Sxz.js +5 -0
- package/radio-button.js +1 -1
- package/safety-theme.css +31 -5
- package/select/select.component.js +1 -1
- package/selection-expansion-panel/selection-expansion-panel.component.js +1 -1
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar-button/icon-sidebar-button.component.d.ts +4 -1
- package/sidebar/icon-sidebar-button/icon-sidebar-button.component.d.ts.map +1 -1
- package/sidebar/icon-sidebar-button/icon-sidebar-button.component.js +9 -6
- package/sidebar/icon-sidebar-link/icon-sidebar-link.component.d.ts +4 -1
- package/sidebar/icon-sidebar-link/icon-sidebar-link.component.d.ts.map +1 -1
- package/sidebar/icon-sidebar-link/icon-sidebar-link.component.js +13 -10
- package/sidebar/sidebar-container/sidebar-container.component.js +1 -1
- package/sidebar.js +1 -1
- package/signet/signet.component.js +1 -1
- package/slider/slider.component.js +1 -1
- package/standard-theme.css +31 -5
- package/stepper/step-label/step-label.component.js +1 -1
- package/stepper/stepper/stepper.component.js +1 -1
- package/tabs/tab/tab.component.d.ts +9 -0
- package/tabs/tab/tab.component.d.ts.map +1 -1
- package/tabs/tab/tab.component.js +37 -18
- package/tabs/tab-group/tab-group.component.d.ts +7 -3
- package/tabs/tab-group/tab-group.component.d.ts.map +1 -1
- package/tabs/tab-group/tab-group.component.js +51 -52
- package/tabs/tab-label/tab-label.component.d.ts.map +1 -1
- package/tabs/tab-label/tab-label.component.js +12 -12
- package/tag/tag/tag.component.js +4 -4
- package/teaser/teaser.component.js +1 -1
- package/teaser-hero/teaser-hero.component.js +1 -1
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-Du28QCY3.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +1 -1
- package/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +1 -1
- package/toggle/toggle/toggle.component.js +1 -1
- package/toggle-check/toggle-check.component.js +1 -1
- package/tooltip/tooltip.component.d.ts +11 -4
- package/tooltip/tooltip.component.d.ts.map +1 -1
- package/tooltip/tooltip.component.js +60 -84
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +1 -1
- package/train/train-wagon/train-wagon.component.js +1 -1
- package/transparent-button-DJIkG5hj.js +9 -0
- package/visual-checkbox/visual-checkbox.component.js +1 -1
- package/file-selector-common-D88J9PEh.js +0 -5
- package/icon-sidebar-button-common-BeRXvifI.js +0 -7
- package/link-common-BBKGg9HN.js +0 -46
- package/radio-button-common-Nm9ULjVb.js +0 -5
- package/teaser-product-common-DIra6aVg.js +0 -5
- package/transparent-button-Bg9fU_iZ.js +0 -9
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { __esDecorate as l, __runInitializers as r } from "tslib";
|
|
2
|
+
import { ResizeController as b } from "@lit-labs/observers/resize-controller.js";
|
|
3
|
+
import { css as c, LitElement as u, html as h } from "lit";
|
|
4
|
+
import { customElement as m } from "lit/decorators.js";
|
|
5
|
+
import { SbbElementInternalsMixin as v } from "../../core/mixins.js";
|
|
6
|
+
const d = c`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:none}:host:after,:host:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host(:focus-visible){outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}:host(:is(:state(active),[state--active])){display:block;opacity:1;transition-duration:var(--sbb-tab-group-animation-duration);transition-delay:var(--sbb-tab-group-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-behavior:allow-discrete}@starting-style{:host(:is(:state(active),[state--active])){opacity:0}}`;
|
|
7
|
+
let f = 0, C = (() => {
|
|
7
8
|
var t;
|
|
8
|
-
let
|
|
9
|
-
return t = class extends
|
|
9
|
+
let n = [m("sbb-tab")], s, a = [], e, o = v(u);
|
|
10
|
+
return t = class extends o {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this._tabContentResizeObserver = new b(this, {
|
|
13
|
+
target: null,
|
|
14
|
+
skipInitial: !0,
|
|
15
|
+
callback: () => this._onTabContentElementResize()
|
|
16
|
+
});
|
|
17
|
+
}
|
|
10
18
|
/** The `sbb-tab-label` associated with the tab. */
|
|
11
19
|
get label() {
|
|
12
20
|
return this.previousElementSibling?.localName === "sbb-tab-label" ? this.previousElementSibling : null;
|
|
13
21
|
}
|
|
22
|
+
/** Get the parent `sbb-tab-group`. */
|
|
23
|
+
get group() {
|
|
24
|
+
return this.closest("sbb-tab-group");
|
|
25
|
+
}
|
|
14
26
|
/**
|
|
15
27
|
* @internal
|
|
16
28
|
* @deprecated
|
|
@@ -20,20 +32,27 @@ let f = 0, S = (() => {
|
|
|
20
32
|
connectedCallback() {
|
|
21
33
|
super.connectedCallback(), this.id ||= `sbb-tab-${f++}`, this.tabIndex = 0;
|
|
22
34
|
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
activate() {
|
|
37
|
+
this.toggleState("active", !0), this._tabContentResizeObserver.observe(this);
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
deactivate() {
|
|
41
|
+
this._tabContentResizeObserver.unobserve(this), this.toggleState("active", !1);
|
|
42
|
+
}
|
|
43
|
+
_onTabContentElementResize() {
|
|
44
|
+
this.group?.setTabContentHeight(Math.floor(this.getBoundingClientRect().height));
|
|
45
|
+
}
|
|
23
46
|
render() {
|
|
24
|
-
return
|
|
25
|
-
<div class="sbb-tab">
|
|
26
|
-
<slot></slot>
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
47
|
+
return h`<slot></slot>`;
|
|
29
48
|
}
|
|
30
49
|
}, e = t, (() => {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
})(), t.role = "tabpanel", t.styles =
|
|
50
|
+
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
|
|
51
|
+
l(null, s = { value: e }, n, { kind: "class", name: e.name, metadata: i }, null, a), e = s.value, i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
52
|
+
})(), t.role = "tabpanel", t.styles = d, t.events = {
|
|
34
53
|
active: "active"
|
|
35
|
-
},
|
|
54
|
+
}, r(e, a), e;
|
|
36
55
|
})();
|
|
37
56
|
export {
|
|
38
|
-
|
|
57
|
+
C as SbbTabElement
|
|
39
58
|
};
|
|
@@ -30,7 +30,7 @@ export interface InterfaceSbbTabGroupTab extends SbbTabLabelElement {
|
|
|
30
30
|
tabGroupActions?: InterfaceSbbTabGroupActions;
|
|
31
31
|
size: 's' | 'l' | 'xl';
|
|
32
32
|
}
|
|
33
|
-
declare const SbbTabGroupElement_base: import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbHydrationMixinType> & typeof LitElement;
|
|
33
|
+
declare const SbbTabGroupElement_base: import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbElementInternalsMixinType> & import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbHydrationMixinType> & typeof LitElement & import('../../core/mixins.js').SbbElementInternalsConstructor;
|
|
34
34
|
/**
|
|
35
35
|
* It displays one or more tabs, each one with a label and some content.
|
|
36
36
|
*
|
|
@@ -45,7 +45,6 @@ export declare class SbbTabGroupElement extends SbbTabGroupElement_base {
|
|
|
45
45
|
private _tabGroupElement;
|
|
46
46
|
private _tabContentElement;
|
|
47
47
|
private _tabGroupResizeObserver;
|
|
48
|
-
private _tabContentResizeObserver;
|
|
49
48
|
/**
|
|
50
49
|
* Size variant, either s, l or xl.
|
|
51
50
|
* @default 'l' / 's' (lean)
|
|
@@ -60,6 +59,8 @@ export declare class SbbTabGroupElement extends SbbTabGroupElement_base {
|
|
|
60
59
|
accessor initialSelectedIndex: number;
|
|
61
60
|
/** Gets the slotted `sbb-tab-label`s. */
|
|
62
61
|
get labels(): SbbTabLabelElement[];
|
|
62
|
+
/** Gets the slotted `sbb-tab`s. */
|
|
63
|
+
get tabs(): SbbTabElement[];
|
|
63
64
|
constructor();
|
|
64
65
|
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
65
66
|
/**
|
|
@@ -83,8 +84,11 @@ export declare class SbbTabGroupElement extends SbbTabGroupElement_base {
|
|
|
83
84
|
private _onLabelSlotChange;
|
|
84
85
|
private _initSelection;
|
|
85
86
|
private _onTabGroupElementResize;
|
|
86
|
-
private _onTabContentElementResize;
|
|
87
87
|
private _handleKeyDown;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
protected setTabContentHeight(contentHeight: number): void;
|
|
88
92
|
protected render(): TemplateResult;
|
|
89
93
|
}
|
|
90
94
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-group.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-group/tab-group.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AASvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI/C,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,CAAC;IACnC,SAAS,EAAE,aAAa,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACjD,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,IAAI,IAAI,CAAC;IACjB,UAAU,IAAI,IAAI,CAAC;IACnB,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,2BAA2B,CAAC;IAC9C,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;CACxB;;AAED;;;;;GAKG;AACH,qBAEM,kBAAmB,SAAQ,
|
|
1
|
+
{"version":3,"file":"tab-group.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-group/tab-group.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AASvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI/C,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,CAAC;IACnC,SAAS,EAAE,aAAa,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACjD,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,IAAI,IAAI,CAAC;IACjB,UAAU,IAAI,IAAI,CAAC;IACnB,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,2BAA2B,CAAC;IAC9C,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;CACxB;;AAED;;;;;GAKG;AACH,qBAEM,kBAAmB,SAAQ,uBAAuD;IACtF,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;MAElB;IAEX,OAAO,CAAC,gBAAgB,CAAe;IACvC,OAAO,CAAC,kBAAkB,CAAe;IACzC,OAAO,CAAC,uBAAuB,CAI5B;IAEH;;;OAGG;IACH,IACW,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,EAGtC;IACD,IAAW,IAAI,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,CAElC;IACD,OAAO,CAAC,KAAK,CAA0C;IAEvD;;;OAGG;IACH,SAEgB,oBAAoB,EAAE,MAAM,CAAK;IAEjD,yCAAyC;IACzC,IAAW,MAAM,IAAI,kBAAkB,EAAE,CAQxC;IAED,mCAAmC;IACnC,IAAW,IAAI,IAAI,aAAa,EAAE,CAQjC;;cAOkB,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAW9E;;;OAGG;IACI,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMzC;;;OAGG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMxC;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI1C,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,oBAAoB,CAG1B;IAEF,OAAO,CAAC,kBAAkB,CAGxB;IAEF,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,SAAS,CAAC,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;cAIvC,MAAM,IAAI,cAAc;CAiB5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,kBAAkB,CAAC;KACrC;CACF"}
|
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x = (i) => {
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as h, __runInitializers as
|
|
7
|
-
import { ResizeController as
|
|
8
|
-
import { css as
|
|
9
|
-
import { customElement as
|
|
10
|
-
import { ref as
|
|
11
|
-
import { isArrowKeyPressed as
|
|
12
|
-
import { forceType as
|
|
13
|
-
import { isLean as
|
|
14
|
-
import { throttle as
|
|
15
|
-
import { SbbHydrationMixin as
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
var
|
|
19
|
-
let i = [
|
|
20
|
-
return
|
|
4
|
+
var S = (i, a, s) => a.has(i) || x("Cannot " + s);
|
|
5
|
+
var v = (i, a, s) => (S(i, a, "read from private field"), s ? s.call(i) : a.get(i)), z = (i, a, s) => a.has(i) ? x("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, s), c = (i, a, s, l) => (S(i, a, "write to private field"), l ? l.call(i, s) : a.set(i, s), s);
|
|
6
|
+
import { __esDecorate as h, __runInitializers as d } from "tslib";
|
|
7
|
+
import { ResizeController as T } from "@lit-labs/observers/resize-controller.js";
|
|
8
|
+
import { css as k, LitElement as C, html as w } from "lit";
|
|
9
|
+
import { customElement as G, property as E } from "lit/decorators.js";
|
|
10
|
+
import { ref as y } from "lit/directives/ref.js";
|
|
11
|
+
import { isArrowKeyPressed as L, getNextElementIndex as $ } from "../../core/a11y.js";
|
|
12
|
+
import { forceType as D } from "../../core/decorators.js";
|
|
13
|
+
import { isLean as A } from "../../core/dom.js";
|
|
14
|
+
import { throttle as R } from "../../core/eventing.js";
|
|
15
|
+
import { SbbElementInternalsMixin as N, SbbHydrationMixin as O } from "../../core/mixins.js";
|
|
16
|
+
const P = k`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-tab-group-animation-duration: 0s}:host(:is(:state(initialized),[state--initialized])){--sbb-tab-group-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) )}.sbb-tab-group{display:flex;flex-wrap:wrap}.sbb-tab-group-content{margin-block-start:var(--sbb-spacing-responsive-m);transition:height var(--sbb-tab-group-animation-duration) var(--sbb-animation-easing)}`;
|
|
17
|
+
let X = (() => {
|
|
18
|
+
var o, n;
|
|
19
|
+
let i = [G("sbb-tab-group")], a, s = [], l, m = N(O(C)), u = [], p, f, _ = [], g = [];
|
|
20
|
+
return n = class extends m {
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
|
23
|
-
z(this,
|
|
24
|
-
this._tabGroupElement =
|
|
23
|
+
z(this, o);
|
|
24
|
+
this._tabGroupElement = d(this, u), this._tabGroupResizeObserver = new T(this, {
|
|
25
25
|
target: null,
|
|
26
26
|
skipInitial: !0,
|
|
27
27
|
callback: (t) => this._onTabGroupElementResize(t)
|
|
28
|
-
}), this.
|
|
29
|
-
target: null,
|
|
30
|
-
skipInitial: !0,
|
|
31
|
-
callback: (t) => this._onTabContentElementResize(t)
|
|
32
|
-
}), this._size = D() ? "s" : "l", d(this, r, c(this, _, 0)), this._onContentSlotChange = (c(this, g), () => {
|
|
28
|
+
}), this._size = A() ? "s" : "l", c(this, o, d(this, _, 0)), this._onContentSlotChange = (d(this, g), () => {
|
|
33
29
|
this.labels.forEach((t) => t.linkToTab()), this.labels.find((t) => t.active)?.activate();
|
|
34
30
|
}), this._onLabelSlotChange = () => {
|
|
35
31
|
this._updateSize(), this.labels.forEach((t) => t.linkToTab());
|
|
@@ -50,17 +46,21 @@ let V = (() => {
|
|
|
50
46
|
* the tab group, the first enabled tab will be selected.
|
|
51
47
|
*/
|
|
52
48
|
get initialSelectedIndex() {
|
|
53
|
-
return
|
|
49
|
+
return v(this, o);
|
|
54
50
|
}
|
|
55
51
|
set initialSelectedIndex(t) {
|
|
56
|
-
|
|
52
|
+
c(this, o, t);
|
|
57
53
|
}
|
|
58
54
|
/** Gets the slotted `sbb-tab-label`s. */
|
|
59
55
|
get labels() {
|
|
60
56
|
return Array.from(this.children ?? []).filter((t) => /^sbb-tab-label$/u.test(t.localName));
|
|
61
57
|
}
|
|
58
|
+
/** Gets the slotted `sbb-tab`s. */
|
|
59
|
+
get tabs() {
|
|
60
|
+
return Array.from(this.children ?? []).filter((t) => /^sbb-tab$/u.test(t.localName));
|
|
61
|
+
}
|
|
62
62
|
firstUpdated(t) {
|
|
63
|
-
super.firstUpdated(t), this.labels.forEach((e) => e.linkToTab()), this._initSelection(),
|
|
63
|
+
super.firstUpdated(t), this.labels.forEach((e) => e.linkToTab()), this._initSelection(), Promise.resolve().then(() => this.toggleState("initialized", !0)), this._tabGroupResizeObserver.observe(this._tabGroupElement);
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Disables a tab by index.
|
|
@@ -99,54 +99,53 @@ let V = (() => {
|
|
|
99
99
|
}
|
|
100
100
|
_onTabGroupElementResize(t) {
|
|
101
101
|
for (const e of t) {
|
|
102
|
-
const
|
|
103
|
-
for (const b of
|
|
104
|
-
b.toggleAttribute("data-has-divider", b ===
|
|
102
|
+
const r = e.target.firstElementChild.assignedElements();
|
|
103
|
+
for (const b of r)
|
|
104
|
+
b.toggleAttribute("data-has-divider", b === r[0] || b.offsetLeft === r[0].offsetLeft), this.style.setProperty("--sbb-tab-group-width", `${this._tabGroupElement.clientWidth}px`);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
_onTabContentElementResize(t) {
|
|
108
|
-
if (this._tabContentElement)
|
|
109
|
-
for (const e of t) {
|
|
110
|
-
const n = Math.floor(e.contentRect.height);
|
|
111
|
-
this._tabContentElement.style.height = `${n}px`;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
107
|
_handleKeyDown(t) {
|
|
115
108
|
const e = this._enabledTabs();
|
|
116
109
|
if (!(!e || // don't trap nested handling
|
|
117
|
-
t.target !== this && t.target.parentElement !== this) &&
|
|
118
|
-
const
|
|
110
|
+
t.target !== this && t.target.parentElement !== this) && L(t)) {
|
|
111
|
+
const r = e.findIndex((I) => I.active), b = $(t, r, e.length);
|
|
119
112
|
e[b]?.activate(), e[b]?.focus(), t.preventDefault();
|
|
120
113
|
}
|
|
121
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
setTabContentHeight(t) {
|
|
119
|
+
this._tabContentElement.style.height = `${t}px`;
|
|
120
|
+
}
|
|
122
121
|
render() {
|
|
123
122
|
return w`
|
|
124
123
|
<div
|
|
125
124
|
class="sbb-tab-group"
|
|
126
125
|
role="tablist"
|
|
127
|
-
${
|
|
126
|
+
${y((t) => this._tabGroupElement = t)}
|
|
128
127
|
>
|
|
129
128
|
<slot name="tab-bar" @slotchange=${this._onLabelSlotChange}></slot>
|
|
130
129
|
</div>
|
|
131
130
|
<div
|
|
132
131
|
class="sbb-tab-group-content"
|
|
133
|
-
${
|
|
132
|
+
${y((t) => this._tabContentElement = t)}
|
|
134
133
|
>
|
|
135
|
-
<slot @slotchange=${
|
|
134
|
+
<slot @slotchange=${R(this._onContentSlotChange, 150)}></slot>
|
|
136
135
|
</div>
|
|
137
136
|
`;
|
|
138
137
|
}
|
|
139
|
-
},
|
|
140
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
141
|
-
|
|
142
|
-
e.size =
|
|
143
|
-
} }, metadata: t }, null,
|
|
144
|
-
e.initialSelectedIndex =
|
|
138
|
+
}, o = new WeakMap(), l = n, (() => {
|
|
139
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
140
|
+
p = [E()], f = [D(), E({ attribute: "initial-selected-index", type: Number })], h(n, null, p, { kind: "setter", name: "size", static: !1, private: !1, access: { has: (e) => "size" in e, set: (e, r) => {
|
|
141
|
+
e.size = r;
|
|
142
|
+
} }, metadata: t }, null, u), h(n, null, f, { kind: "accessor", name: "initialSelectedIndex", static: !1, private: !1, access: { has: (e) => "initialSelectedIndex" in e, get: (e) => e.initialSelectedIndex, set: (e, r) => {
|
|
143
|
+
e.initialSelectedIndex = r;
|
|
145
144
|
} }, metadata: t }, _, g), h(null, a = { value: l }, i, { kind: "class", name: l.name, metadata: t }, null, s), l = a.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
146
|
-
})(),
|
|
145
|
+
})(), n.styles = P, n.events = {
|
|
147
146
|
tabchange: "tabchange"
|
|
148
|
-
},
|
|
147
|
+
}, d(l, s), l;
|
|
149
148
|
})();
|
|
150
149
|
export {
|
|
151
|
-
|
|
150
|
+
X as SbbTabGroupElement
|
|
152
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-label.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-label/tab-label.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAA6B,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;;AAIrF;;;;;;GAMG;AACH,qBAGM,kBAAmB,SAAQ,uBAEhC;IACC,OAAuB,IAAI,SAAS;IACpC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,mCAAmC;IACnC,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;OAGG;IACH,SAA4B,KAAK,EAAE,aAAa,CAAO;IAEvD,wBAAwB;IACxB,SAEgB,MAAM,EAAE,OAAO,CAAS;IAExC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,wDAAwD;IACxD,IAAW,GAAG,IAAI,aAAa,GAAG,IAAI,CAIrC;IAED,sCAAsC;IACtC,IAAW,KAAK,IAAI,kBAAkB,GAAG,IAAI,CAE5C;;IAQe,iBAAiB,IAAI,IAAI;cAMtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"tab-label.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-label/tab-label.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAA6B,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;;AAIrF;;;;;;GAMG;AACH,qBAGM,kBAAmB,SAAQ,uBAEhC;IACC,OAAuB,IAAI,SAAS;IACpC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,mCAAmC;IACnC,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;OAGG;IACH,SAA4B,KAAK,EAAE,aAAa,CAAO;IAEvD,wBAAwB;IACxB,SAEgB,MAAM,EAAE,OAAO,CAAS;IAExC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,wDAAwD;IACxD,IAAW,GAAG,IAAI,aAAa,GAAG,IAAI,CAIrC;IAED,sCAAsC;IACtC,IAAW,KAAK,IAAI,kBAAkB,GAAG,IAAI,CAE5C;;IAQe,iBAAiB,IAAI,IAAI;cAMtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAsB5E,0BAA0B;IACnB,UAAU,IAAI,IAAI;IAOzB,+FAA+F;IACxF,QAAQ,IAAI,IAAI;IAkCvB;;OAEG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;cAYR,MAAM,IAAI,cAAc;CAoB5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,kBAAkB,CAAC;KACrC;CACF"}
|
|
@@ -5,22 +5,22 @@ var S = (a, b, s) => b.has(a) || E("Cannot " + s);
|
|
|
5
5
|
var h = (a, b, s) => (S(a, b, "read from private field"), s ? s.call(a) : b.get(a)), m = (a, b, s) => b.has(a) ? E("Cannot add the same private member more than once") : b instanceof WeakSet ? b.add(a) : b.set(a, s), n = (a, b, s, o) => (S(a, b, "write to private field"), o ? o.call(a, s) : b.set(a, s), s);
|
|
6
6
|
import { __esDecorate as u, __runInitializers as r } from "tslib";
|
|
7
7
|
import { css as B, LitElement as C } from "lit";
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { unsafeStatic as L, html as
|
|
10
|
-
import { slotState as
|
|
8
|
+
import { customElement as D, property as f } from "lit/decorators.js";
|
|
9
|
+
import { unsafeStatic as L, html as M } from "lit/static-html.js";
|
|
10
|
+
import { slotState as N, forceType as $, omitEmptyConverter as A } from "../../core/decorators.js";
|
|
11
11
|
import { SbbDisabledMixin as G, SbbElementInternalsMixin as j } from "../../core/mixins.js";
|
|
12
12
|
import { SbbIconNameMixin as O } from "../../icon.js";
|
|
13
|
-
const U = B`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-label-height: var(--sbb-size-element-m);--sbb-tab-label-color: var(--sbb-color-granite);--sbb-tab-label-color: light-dark(var(--sbb-color-granite), var(--sbb-color-graphite));--sbb-tab-label-line-color: var(--sbb-border-color-4-inverted);--sbb-tab-label-cursor: pointer;--sbb-tab-label-pointer-events: unset;--sbb-tab-label-inset: 0;--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xs);--sbb-tab-label-marker-transform: scale(0);--sbb-tab-label-text-decoration: none;--sbb-tab-label-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tab-label-animation-easing: var(--sbb-animation-easing);--sbb-tab-label-amount-color: var(--sbb-color-metal);--sbb-tab-label-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));display:inline-block;max-width:100%;pointer-events:var(--sbb-tab-label-pointer-events);-webkit-tap-highlight-color:transparent;outline:none!important}@media
|
|
13
|
+
const U = B`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-label-height: var(--sbb-size-element-m);--sbb-tab-label-color: var(--sbb-color-granite);--sbb-tab-label-color: light-dark(var(--sbb-color-granite), var(--sbb-color-graphite));--sbb-tab-label-line-color: var(--sbb-border-color-4-inverted);--sbb-tab-label-cursor: pointer;--sbb-tab-label-pointer-events: unset;--sbb-tab-label-inset: 0;--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xs);--sbb-tab-label-marker-transform: scale(0);--sbb-tab-label-text-decoration: none;--sbb-tab-label-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tab-label-animation-easing: var(--sbb-animation-easing);--sbb-tab-label-amount-color: var(--sbb-color-metal);--sbb-tab-label-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));display:inline-block;max-width:100%;pointer-events:var(--sbb-tab-label-pointer-events);-webkit-tap-highlight-color:transparent;outline:none!important}@media(forced-colors:active){:host{--sbb-tab-label-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}:host([data-size=s]){--sbb-tab-label-height: var(--sbb-size-element-xs);--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xxxs)}:host([disabled]){--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-text-decoration: line-through}@media(forced-colors:active){:host([disabled]){--sbb-tab-label-color: GrayText;--sbb-tab-label-amount-color: GrayText}}:host([active]:not([disabled])){--sbb-tab-label-color: var(--sbb-color-3);--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-marker-transform: scale(1)}@media(forced-colors:active){:host([active]:not([disabled])){--sbb-tab-label-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}@media(any-hover:hover){:host(:hover:not([disabled])){--sbb-tab-label-marker-transform: scale(1)}}:host(:active){--sbb-tab-label-color: var(--sbb-color-3)}.sbb-tab-label__wrapper{position:relative}:host(:focus-visible) .sbb-tab-label__wrapper:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);content:"";position:absolute;display:block;inset:0;z-index:1;border-radius:calc(var(--sbb-border-radius-2x) - var(--sbb-focus-outline-offset))}.sbb-tab-label{position:relative;margin:0;min-height:var(--sbb-tab-label-height);display:flex;align-items:center;padding-inline:var(--sbb-tab-label-inline-padding);gap:var(--sbb-spacing-fixed-2x);-webkit-user-select:none;user-select:none;cursor:var(--sbb-tab-label-cursor);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing)}:host([data-has-divider]) .sbb-tab-label:after{content:"";position:absolute;inset-inline-start:0;inset-block-end:0;width:var(--sbb-tab-group-width);height:var(--sbb-border-width-1x);background-color:var(--sbb-tab-label-line-color)}.sbb-tab-label:before{position:absolute;content:"";inset-inline:0;inset-block-end:0;height:var(--sbb-border-width-3x);background-color:var(--sbb-tab-label-color);transform:var(--sbb-tab-label-marker-transform);transition-duration:var(--sbb-tab-label-animation-duration);transition-timing-function:var(--sbb-tab-label-animation-easing);transition-property:transform,background-color;z-index:1}.sbb-tab-label__icon,.sbb-tab-label__text,.sbb-tab-label__amount{text-decoration:var(--sbb-tab-label-text-decoration)}.sbb-tab-label__icon{display:flex;flex-shrink:0;color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing)}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tab-label__icon{display:none}.sbb-tab-label__text{color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--sbb-text-font-size: var(--sbb-font-size-text-m);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}:host([data-size=s]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-s);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}:host([data-size=xl]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-xl);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}:host(:not([data-slot-names~=unnamed])) .sbb-tab-label__text{display:none}.sbb-tab-label__amount{display:flex;color:var(--sbb-tab-label-amount-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);--sbb-text-font-size: var(--sbb-font-size-text-m);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)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tab-label__amount{display:none}:host([data-size=s]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-s);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)}:host([data-size=xl]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-xl);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)}`;
|
|
14
14
|
let X = (() => {
|
|
15
15
|
var c, v, d, i;
|
|
16
|
-
let a = [
|
|
16
|
+
let a = [D("sbb-tab-label"), N()], b, s = [], o, p = G(O(j(C))), x, g = [], _ = [], y, z = [], w = [], k, T = [], I = [];
|
|
17
17
|
return i = class extends p {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
20
|
m(this, c);
|
|
21
21
|
m(this, v);
|
|
22
22
|
m(this, d);
|
|
23
|
-
this._selected = !1, n(this, c, r(this,
|
|
23
|
+
this._selected = !1, n(this, c, r(this, g, "1")), n(this, v, (r(this, _), r(this, z, !1))), n(this, d, (r(this, w), r(this, T, ""))), r(this, I), this.addEventListener("click", () => this.activate());
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* The level will correspond to the heading tag generated in the title.
|
|
@@ -58,18 +58,18 @@ let X = (() => {
|
|
|
58
58
|
super.connectedCallback(), this.slot = "tab-bar", this.tabIndex = this.active ? 0 : -1;
|
|
59
59
|
}
|
|
60
60
|
willUpdate(t) {
|
|
61
|
-
super.willUpdate(t), t.has("active") && (this.internals.ariaSelected = `${this.active}`, this.
|
|
61
|
+
super.willUpdate(t), t.has("active") && (this.internals.ariaSelected = `${this.active}`, this.active && !this.disabled ? this.activate() : this.deactivate()), t.has("disabled") && this.disabled && (this.tabIndex = -1, this.active && (this.deactivate(), this.group?.activateTab(0)));
|
|
62
62
|
}
|
|
63
63
|
/** Deactivate the tab. */
|
|
64
64
|
deactivate() {
|
|
65
|
-
this.active = !1, this._selected = !1, this.tabIndex = -1;
|
|
65
|
+
this.active = !1, this.tab?.deactivate(), this._selected = !1, this.tabIndex = -1;
|
|
66
66
|
}
|
|
67
67
|
/** Select the tab, deactivating the current selected one, and dispatch the tabchange event. */
|
|
68
68
|
activate() {
|
|
69
69
|
if (this.disabled)
|
|
70
70
|
return;
|
|
71
71
|
const t = this.group?.labels || [], e = t.find((l) => l._selected);
|
|
72
|
-
e !== this && (e?.deactivate(), this.active = !0, this._selected = !0, this.tabIndex = 0, this.tab?.dispatchEvent(new Event("active", { bubbles: !0, composed: !0 })), this.group?.dispatchEvent(new CustomEvent("tabchange", {
|
|
72
|
+
e !== this && (e?.deactivate(), this.active = !0, this.tab?.activate(), this._selected = !0, this.tabIndex = 0, this.tab?.dispatchEvent(new Event("active", { bubbles: !0, composed: !0 })), this.group?.dispatchEvent(new CustomEvent("tabchange", {
|
|
73
73
|
bubbles: !0,
|
|
74
74
|
composed: !0,
|
|
75
75
|
detail: {
|
|
@@ -90,7 +90,7 @@ let X = (() => {
|
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
92
|
const t = `h${Number(this.level) < 7 ? this.level : "1"}`;
|
|
93
|
-
return
|
|
93
|
+
return M`
|
|
94
94
|
<div class="sbb-tab-label__wrapper">
|
|
95
95
|
<${L(t)} class="sbb-tab-label">
|
|
96
96
|
<span class="sbb-tab-label__icon">
|
|
@@ -108,9 +108,9 @@ let X = (() => {
|
|
|
108
108
|
}
|
|
109
109
|
}, c = new WeakMap(), v = new WeakMap(), d = new WeakMap(), o = i, (() => {
|
|
110
110
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
|
|
111
|
-
|
|
111
|
+
x = [f()], y = [$(), f({ reflect: !0, type: Boolean })], k = [$(), f({ reflect: !0, converter: A })], u(i, null, x, { kind: "accessor", name: "level", static: !1, private: !1, access: { has: (e) => "level" in e, get: (e) => e.level, set: (e, l) => {
|
|
112
112
|
e.level = l;
|
|
113
|
-
} }, metadata: t },
|
|
113
|
+
} }, metadata: t }, g, _), u(i, null, y, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (e) => "active" in e, get: (e) => e.active, set: (e, l) => {
|
|
114
114
|
e.active = l;
|
|
115
115
|
} }, metadata: t }, z, w), u(i, null, k, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (e) => "amount" in e, get: (e) => e.amount, set: (e, l) => {
|
|
116
116
|
e.amount = l;
|
package/tag/tag/tag.component.js
CHANGED
|
@@ -11,10 +11,10 @@ import { slotState as L, forceType as F, omitEmptyConverter as O, getOverride as
|
|
|
11
11
|
import { isLean as M } from "../../core/dom.js";
|
|
12
12
|
import { SbbDisabledTabIndexActionMixin as R } from "../../core/mixins.js";
|
|
13
13
|
import { SbbIconNameMixin as U } from "../../icon.js";
|
|
14
|
-
const Y = V`*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;max-width:100%;--sbb-tag-border-radius: var(--sbb-border-radius-infinity);--sbb-tag-background-color: var(--sbb-background-color-1);--sbb-tag-border-color: var(--sbb-border-color-4-inverted);--sbb-tag-border-style: solid;--sbb-tag-border-width: var(--sbb-border-width-1x);--sbb-tag-text-color: var(--sbb-color-2);--sbb-tag-amount-color: var(--sbb-color-metal);--sbb-tag-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));--sbb-tag-height: var(--sbb-size-element-xs);--sbb-tag-inset: 0;--sbb-tag-cursor: pointer;--sbb-tag-content-shift: translateY(0);--sbb-tag-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tag-animation-easing: var(--sbb-animation-easing);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-5x);--sbb-tag-gap: var(--sbb-spacing-fixed-2x)}@media
|
|
14
|
+
const Y = V`*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;max-width:100%;--sbb-tag-border-radius: var(--sbb-border-radius-infinity);--sbb-tag-background-color: var(--sbb-background-color-1);--sbb-tag-border-color: var(--sbb-border-color-4-inverted);--sbb-tag-border-style: solid;--sbb-tag-border-width: var(--sbb-border-width-1x);--sbb-tag-text-color: var(--sbb-color-2);--sbb-tag-amount-color: var(--sbb-color-metal);--sbb-tag-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));--sbb-tag-height: var(--sbb-size-element-xs);--sbb-tag-inset: 0;--sbb-tag-cursor: pointer;--sbb-tag-content-shift: translateY(0);--sbb-tag-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tag-animation-easing: var(--sbb-animation-easing);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-5x);--sbb-tag-gap: var(--sbb-spacing-fixed-2x)}@media(forced-colors:active){:host{--sbb-tag-background-color: Canvas !important;--sbb-tag-text-color: ButtonText;--sbb-tag-amount-color: ButtonText;--sbb-tag-border-color: CanvasText;--sbb-tag-border-width: var(--sbb-border-width-2x)}}:host([data-checked]){--sbb-tag-border-color: var(--sbb-border-color-3);--sbb-tag-border-width: var(--sbb-border-width-2x)}@media(forced-colors:active){:host([data-checked]){--sbb-tag-border-color: Highlight !important;--sbb-tag-border-width: var(--sbb-border-width-4x)}}:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: var(--sbb-color-granite);--sbb-tag-text-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));--sbb-tag-amount-color: var(--sbb-tag-text-color);--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-border-color: var(--sbb-color-cement);--sbb-tag-border-color: light-dark(var(--sbb-color-cement), var(--sbb-color-smoke));--sbb-tag-border-style: dashed;--sbb-tag-cursor: unset;--sbb-tag-pointer-events: none}@media(forced-colors:active){:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: GrayText;--sbb-tag-amount-color: GrayText;--sbb-tag-border-color: GrayText}}:host([data-checked]:is(:disabled,[disabled-interactive])){--sbb-tag-border-color: var(--sbb-color-metal);--sbb-tag-border-color: light-dark(var(--sbb-color-metal), var(--sbb-color-cement));--sbb-tag-border-style: dashed}@media(any-hover:hover){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-inset: calc(var(--sbb-border-width-2x) * -1);--sbb-tag-content-shift: translateY(calc(var(--sbb-border-width-1x) * -1))}}@media(any-hover:hover)and (forced-colors:active){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-border-color: Highlight}}:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-border-color: var(--sbb-color-iron);--sbb-tag-border-color: light-dark(var(--sbb-color-iron), var(--sbb-color-storm));--sbb-tag-border-width: var(--sbb-border-width-2x);--sbb-tag-text-color: var(--sbb-color-4)}@media(forced-colors:active){:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-border-color: Highlight;--sbb-tag-text-color: ButtonText}}:host([size=s]){--sbb-tag-height: var(--sbb-size-element-xxxs);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-3x)}.sbb-tag{--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);font-weight:700;position:relative;display:flex;align-items:center;height:var(--sbb-tag-height);max-width:100%;gap:var(--sbb-tag-gap);padding-inline:var(--sbb-tag-padding-inline);cursor:var(--sbb-tag-cursor);border-radius:var(--sbb-tag-border-radius);color:var(--sbb-tag-text-color);transition:color var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;pointer-events:var(--sbb-tag-pointer-events, unset)}.sbb-tag:before{content:"";position:absolute;inset:var(--sbb-tag-inset);background-color:var(--sbb-tag-background-color);border:var(--sbb-tag-border-width) var(--sbb-tag-border-style) var(--sbb-tag-border-color);border-radius:var(--sbb-tag-border-radius);transition-duration:var(--sbb-tag-animation-duration);transition-timing-function:var(--sbb-tag-animation-easing);transition-property:inset,background-color,border-color,box-shadow}:host(:focus-visible) .sbb-tag:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-tag__icon{display:flex;align-items:center;height:calc(var(--sbb-typo-line-height-body-text) * 1em);flex-shrink:0}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tag__icon{display:none}.sbb-tag__text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sbb-tag__amount{--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);color:var(--sbb-tag-amount-color)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tag__amount{display:none}.sbb-tag--shift{transition:transform var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);transform:var(--sbb-tag-content-shift);will-change:transform}`;
|
|
15
15
|
let et = (() => {
|
|
16
16
|
var c, d, h, g, i;
|
|
17
|
-
let a = [A("sbb-tag"), L()], s, r = [], b, p = U(R(H)), x, _ = [], k = [], y,
|
|
17
|
+
let a = [A("sbb-tag"), L()], s, r = [], b, p = U(R(H)), x, _ = [], k = [], y, w = [], z = [], E, S = [], C = [], T, I = [], B = [];
|
|
18
18
|
return i = class extends p {
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
@@ -22,7 +22,7 @@ let et = (() => {
|
|
|
22
22
|
v(this, d);
|
|
23
23
|
v(this, h);
|
|
24
24
|
v(this, g);
|
|
25
|
-
n(this, c, l(this, _, null)), n(this, d, (l(this, k), l(this,
|
|
25
|
+
n(this, c, l(this, _, null)), n(this, d, (l(this, k), l(this, w, ""))), n(this, h, (l(this, z), l(this, S, !1))), n(this, g, (l(this, C), l(this, I, M() ? "s" : "m"))), this._group = (l(this, B), null), this.addEventListener?.("click", () => this._handleClick());
|
|
26
26
|
}
|
|
27
27
|
/** Value of the form element. */
|
|
28
28
|
get value() {
|
|
@@ -111,7 +111,7 @@ let et = (() => {
|
|
|
111
111
|
t.value = o;
|
|
112
112
|
} }, metadata: e }, _, k), m(i, null, y, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (t) => "amount" in t, get: (t) => t.amount, set: (t, o) => {
|
|
113
113
|
t.amount = o;
|
|
114
|
-
} }, metadata: e },
|
|
114
|
+
} }, metadata: e }, w, z), m(i, null, E, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (t) => "checked" in t, get: (t) => t.checked, set: (t, o) => {
|
|
115
115
|
t.checked = o;
|
|
116
116
|
} }, metadata: e }, S, C), m(i, null, T, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, o) => {
|
|
117
117
|
t.size = o;
|
|
@@ -9,7 +9,7 @@ import { html as c } from "lit/static-html.js";
|
|
|
9
9
|
import { SbbLinkBaseElement as k } from "../core/base-elements.js";
|
|
10
10
|
import { css as z } from "lit";
|
|
11
11
|
import "../screen-reader-only.js";
|
|
12
|
-
const S = z`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;--sbb-teaser-scale-hover: 1.02;--sbb-teaser-description-color: var(--sbb-color-granite);--sbb-teaser-description-color: light-dark(var(--sbb-color-granite), var(--sbb-color-silver));--sbb-teaser-flex-direction: row;--sbb-teaser-align-items: center;--sbb-teaser-gap: var(--sbb-spacing-fixed-4x);--sbb-teaser-width: fit-content;--sbb-teaser-border-radius: var(--sbb-border-radius-4x)}@media
|
|
12
|
+
const S = z`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;--sbb-teaser-scale-hover: 1.02;--sbb-teaser-description-color: var(--sbb-color-granite);--sbb-teaser-description-color: light-dark(var(--sbb-color-granite), var(--sbb-color-silver));--sbb-teaser-flex-direction: row;--sbb-teaser-align-items: center;--sbb-teaser-gap: var(--sbb-spacing-fixed-4x);--sbb-teaser-width: fit-content;--sbb-teaser-border-radius: var(--sbb-border-radius-4x)}@media(forced-colors:active){:host{--sbb-teaser-description-color: LinkText;--sbb-title-text-color-normal-override: LinkText !important}}:host([alignment=after]){--sbb-teaser-align-items: start}:host([alignment=below]){--sbb-teaser-flex-direction: column;--sbb-teaser-align-items: baseline;--sbb-teaser-gap: var(--sbb-spacing-fixed-3x);--sbb-teaser-width: 100%}@media(any-hover:hover){:host(:hover){--sbb-teaser-scale: var(--sbb-teaser-scale-hover)}}.sbb-teaser__wrapper{display:flex;position:relative;cursor:pointer}.sbb-teaser__wrapper:before{content:"";-webkit-user-select:none;user-select:none;width:0;height:0}.sbb-teaser{text-decoration:none;position:absolute;inset:0}.sbb-teaser:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);border-radius:var(--sbb-teaser-border-radius)}@media(forced-colors:active){.sbb-teaser{outline-offset:var(--sbb-focus-outline-offset);outline:CanvasText solid var(--sbb-focus-outline-width);border-radius:var(--sbb-teaser-border-radius)}.sbb-teaser:hover{outline-color:Highlight}}.sbb-teaser__container{display:flex;flex-flow:var(--sbb-teaser-flex-direction) nowrap;align-items:var(--sbb-teaser-align-items);gap:var(--sbb-teaser-gap);max-width:100%;width:100%;pointer-events:none}.sbb-teaser__text{--sbb-text-font-size: var(--sbb-font-size-text-s);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);color:var(--sbb-teaser-description-color);overflow:hidden;max-width:100%}::slotted([slot=image]){width:18.75rem;display:block}.sbb-teaser__image-wrapper{flex-shrink:0;overflow:hidden;border-radius:var(--sbb-teaser-border-radius);transition:box-shadow var(--sbb-teaser-image-animation-duration) var(--sbb-animation-easing)}@media(any-hover:hover){:host(:hover) .sbb-teaser__image-wrapper{box-shadow:var(--sbb-shadow-elevation-level-9-shadow-2-offset-x) var(--sbb-shadow-elevation-level-9-shadow-2-offset-y) var(--sbb-shadow-elevation-level-9-shadow-2-blur) var(--sbb-shadow-elevation-level-9-shadow-2-spread) var(--sbb-shadow-color-hard-2),var(--sbb-shadow-elevation-level-9-shadow-1-offset-x) var(--sbb-shadow-elevation-level-9-shadow-1-offset-y) var(--sbb-shadow-elevation-level-9-shadow-1-blur) var(--sbb-shadow-elevation-level-9-shadow-1-spread) var(--sbb-shadow-color-hard-1)}}.sbb-teaser__description{display:inline-block;margin:0;padding:0}::slotted(sbb-chip-label){display:block;max-width:fit-content;margin-block-end:var(--sbb-spacing-fixed-1x)}::slotted(sbb-title){margin-block:0}`;
|
|
13
13
|
let j = (() => {
|
|
14
14
|
var n, l;
|
|
15
15
|
let e = [x("sbb-teaser")], s, a = [], i, d = k, h, m = [], v = [];
|
|
@@ -10,7 +10,7 @@ import { html as C } from "lit/static-html.js";
|
|
|
10
10
|
import { SbbLinkBaseElement as w } from "../core/base-elements.js";
|
|
11
11
|
import { slotState as z, forceType as S, omitEmptyConverter as E } from "../core/decorators.js";
|
|
12
12
|
import "../link/block-link-static.js";
|
|
13
|
-
const T = k`*,:before,:after{box-sizing:border-box}:host{display:block;outline:none!important;--sbb-panel-width: 13.9375rem;--sbb-panel-inner-height: 10.4375rem;--sbb-panel-triangle-height: 2.0625rem;--sbb-panel-height: calc(var(--sbb-panel-inner-height) + 2 * var(--sbb-panel-triangle-height));--sbb-panel-line-height: var(--sbb-typo-line-height-titles);--sbb-panel-font-size: var(--sbb-typo-scale-1-5x);--sbb-panel-color: var(--sbb-color-1-negative);--sbb-panel-background-color: color-mix(in srgb, var(--sbb-color-primary) 90%, transparent);--sbb-panel-background-color-hover: var(--sbb-color-primary);--sbb-panel-padding-inline: var(--sbb-spacing-responsive-m);--sbb-panel-gap: var(--sbb-spacing-responsive-xs);--sbb-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-panel-animation-easing: var(--sbb-animation-easing)}@media
|
|
13
|
+
const T = k`*,:before,:after{box-sizing:border-box}:host{display:block;outline:none!important;--sbb-panel-width: 13.9375rem;--sbb-panel-inner-height: 10.4375rem;--sbb-panel-triangle-height: 2.0625rem;--sbb-panel-height: calc(var(--sbb-panel-inner-height) + 2 * var(--sbb-panel-triangle-height));--sbb-panel-line-height: var(--sbb-typo-line-height-titles);--sbb-panel-font-size: var(--sbb-typo-scale-1-5x);--sbb-panel-color: var(--sbb-color-1-negative);--sbb-panel-background-color: color-mix(in srgb, var(--sbb-color-primary) 90%, transparent);--sbb-panel-background-color-hover: var(--sbb-color-primary);--sbb-panel-padding-inline: var(--sbb-spacing-responsive-m);--sbb-panel-gap: var(--sbb-spacing-responsive-xs);--sbb-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-panel-animation-easing: var(--sbb-animation-easing)}@media(min-width:52.5rem){:host{--sbb-panel-width: 20.0625rem;--sbb-panel-inner-height: 15.006875rem;--sbb-panel-triangle-height: 2.965625rem;--sbb-panel-font-size: var(--sbb-typo-scale-2x)}}@media(min-width:64rem){:host{--sbb-panel-width: 26.75rem;--sbb-panel-inner-height: 20.02375rem;--sbb-panel-triangle-height: 3.956875rem;--sbb-panel-font-size: var(--sbb-typo-scale-2-5x);--sbb-panel-line-height: 1.2}}@media(any-hover:hover){:host(:hover){--sbb-panel-background-color: var(--sbb-panel-background-color-hover)}}::slotted([slot=image]){width:100%}.sbb-teaser-hero{position:relative;display:flex;min-height:var(--sbb-panel-height);text-decoration:none}.sbb-teaser-hero:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-teaser-hero__panel{z-index:1;position:relative;display:flex;flex-direction:column;justify-content:center;gap:var(--sbb-panel-gap);width:var(--sbb-panel-width);height:var(--sbb-panel-height);padding-block:var(--sbb-panel-triangle-height);padding-inline:var(--sbb-panel-padding-inline);clip-path:polygon(0 0,100% var(--sbb-panel-triangle-height),100% calc(100% - var(--sbb-panel-triangle-height)),0% 100%);background-color:var(--sbb-panel-background-color);transition:background var(--sbb-panel-animation-duration) var(--sbb-panel-animation-easing)}@media(any-hover:hover){.sbb-teaser-hero__panel:hover{--sbb-panel-background-color: var(--sbb-panel-background-color-hover)}}.sbb-teaser-hero__panel{position:absolute;top:50%;transform:translateY(-50%)}:host(:not([data-slot-names~=unnamed],[data-slot-names~=link-content],[link-content])) .sbb-teaser-hero__panel{display:none}.sbb-teaser-hero__panel-text{font-family:var(--sbb-typo-font-family);font-size:var(--sbb-panel-font-size);font-weight:300;line-height:var(--sbb-panel-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);color:var(--sbb-panel-color);-webkit-hyphens:auto;hyphens:auto;display:inline;margin:0;padding:0}:host(:not([href])) .sbb-teaser-hero__panel-link{display:none}`;
|
|
14
14
|
let L = (() => {
|
|
15
15
|
var o, s;
|
|
16
16
|
let e = [y("sbb-teaser-hero"), z()], t, a = [], n, b = w, p, c = [], h = [];
|
package/teaser-product/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SbbTeaserProductCommonElementMixin as r } from "./common/teaser-product-common.js";
|
|
2
|
-
import { t as m } from "../teaser-product-common-
|
|
2
|
+
import { t as m } from "../teaser-product-common-Du28QCY3.js";
|
|
3
3
|
export {
|
|
4
4
|
r as SbbTeaserProductCommonElementMixin,
|
|
5
5
|
m as teaserProductCommonStyle
|
|
@@ -5,7 +5,7 @@ import { SbbLinkBaseElement as u } from "../../core/base-elements.js";
|
|
|
5
5
|
import { SbbTeaserProductCommonElementMixin as d, teaserProductCommonStyle as m } from "../common.js";
|
|
6
6
|
import { css as p } from "lit";
|
|
7
7
|
import "../../screen-reader-only.js";
|
|
8
|
-
const f = p`:host{--sbb-teaser-product-border-radius: var(--sbb-border-radius-4x)}@media
|
|
8
|
+
const f = p`:host{--sbb-teaser-product-border-radius: var(--sbb-border-radius-4x)}@media(forced-colors:active){:host{--sbb-title-text-color-normal-override: LinkText !important;--sbb-teaser-product-content-color: LinkText !important;--sbb-teaser-product-footer-color: LinkText !important}}.sbb-teaser-product__wrapper{position:relative}.sbb-teaser-product__root{pointer-events:none}@media(forced-colors:active){:host(:hover) .sbb-teaser-product__root:after{border-color:Highlight}}.sbb-teaser-product{position:absolute;inset:0}.sbb-teaser-product:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);border-radius:var(--sbb-teaser-product-border-radius)}`;
|
|
9
9
|
let k = (() => {
|
|
10
10
|
var t;
|
|
11
11
|
let l = [n("sbb-teaser-product")], o, s = [], e, a = d(u);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { css as r } from "lit";
|
|
2
|
+
const o = r`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-teaser-product-background-color: var(--sbb-color-cloud);--sbb-teaser-product-background-color: light-dark( var(--sbb-color-cloud), var(--sbb-color-midnight) );--sbb-teaser-product-background-gradient-direction: to right;--sbb-teaser-product-background: var(--sbb-teaser-product-background-color);--sbb-teaser-product-border-radius: var(--sbb-border-radius-4x);--sbb-teaser-product-content-color: var(--sbb-color-4);--sbb-teaser-product-footer-color: var(--sbb-color-anthracite);--sbb-teaser-product-footer-color: light-dark( var(--sbb-color-anthracite), var(--sbb-color-cloud) );--sbb-teaser-product-container-padding-block: var(--sbb-spacing-responsive-l);--sbb-teaser-product-min-height: 37.5rem;--sbb-teaser-product-background-gradient-start: 25%;--sbb-teaser-product-background-gradient-end: 75%}@media(min-width:64rem){:host{--sbb-teaser-product-background: linear-gradient( var(--sbb-teaser-product-background-gradient-direction), var(--sbb-teaser-product-background-color) var(--sbb-teaser-product-background-gradient-start), transparent var(--sbb-teaser-product-background-gradient-end) )}}:host([negative]){--sbb-teaser-product-background-color: var(--sbb-background-color-1-negative);--sbb-teaser-product-content-color: var(--sbb-color-4-negative);--sbb-teaser-product-footer-color: var(--sbb-color-4-negative);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-title-text-color-normal-override: var(--sbb-color-3-negative)}:host([image-alignment=before]){--sbb-teaser-product-background-gradient-direction: to left}.sbb-teaser-product__image-container{overflow:hidden;border-radius:var(--sbb-teaser-product-border-radius) var(--sbb-teaser-product-border-radius) 0 0}@media(min-width:64rem){.sbb-teaser-product__image-container{position:absolute;inset:0;border-radius:var(--sbb-teaser-product-border-radius)}}::slotted(p.sbb-teaser-product--spacing){margin:0}::slotted(sbb-title.sbb-teaser-product--spacing){--sbb-title-margin-block-start: 0}::slotted(:is(sbb-action-group,[data-action]).sbb-teaser-product--spacing){margin-block-start:var(--sbb-spacing-responsive-xxs)}::slotted([slot=image]){display:flex;width:100%;height:100%}@media(forced-colors:active){.sbb-teaser-product__root:after{content:"";position:absolute;display:block;inset:0;pointer-events:none;border:var(--sbb-border-width-2x) solid CanvasText;border-radius:var(--sbb-teaser-product-border-radius)}}.sbb-action-base{display:block;position:relative;text-decoration:none}.sbb-teaser-product__container{background:var(--sbb-teaser-product-background);border-radius:0 0 var(--sbb-teaser-product-border-radius) var(--sbb-teaser-product-border-radius);padding:var(--sbb-spacing-responsive-s)}@media(min-width:64rem){.sbb-teaser-product__container{display:grid;grid:"content ." 1fr "footnote ." auto/1fr 1fr;column-gap:var(--sbb-spacing-responsive-xxl);background:var(--sbb-teaser-product-background);border-radius:var(--sbb-teaser-product-border-radius);padding-block:var(--sbb-teaser-product-container-padding-block) 0;padding-inline:var(--sbb-spacing-responsive-xl);position:relative}:host([image-alignment=before]) .sbb-teaser-product__container{grid-template-areas:". content" ". footnote"}}.sbb-teaser-product__content{grid-area:content;align-self:center;margin:0;color:var(--sbb-teaser-product-content-color)}@media(min-width:64rem){.sbb-teaser-product__content{align-content:center;min-height:calc(var(--sbb-teaser-product-min-height) - 2 * var(--sbb-teaser-product-container-padding-block))}}.sbb-teaser-product__footnote{grid-area:footnote;padding-block-start:var(--sbb-spacing-responsive-s);color:var(--sbb-teaser-product-footer-color);--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)}:host(:not([data-slot-names~=footnote])) .sbb-teaser-product__footnote{padding-block-start:0}@media(min-width:64rem){.sbb-teaser-product__footnote{min-height:var(--sbb-teaser-product-container-padding-block);padding-block:var(--sbb-spacing-responsive-xs)}}`;
|
|
3
|
+
export {
|
|
4
|
+
o as t
|
|
5
|
+
};
|
package/teaser-product.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SbbTeaserProductElement as r } from "./teaser-product/teaser-product/teaser-product.component.js";
|
|
2
2
|
import { SbbTeaserProductStaticElement as m } from "./teaser-product/teaser-product-static/teaser-product-static.component.js";
|
|
3
3
|
import { SbbTeaserProductCommonElementMixin as b } from "./teaser-product/common/teaser-product-common.js";
|
|
4
|
-
import { t as c } from "./teaser-product-common-
|
|
4
|
+
import { t as c } from "./teaser-product-common-Du28QCY3.js";
|
|
5
5
|
export {
|
|
6
6
|
b as SbbTeaserProductCommonElementMixin,
|
|
7
7
|
r as SbbTeaserProductElement,
|
|
@@ -5,7 +5,7 @@ import { sbbLiveAnnouncer as m } from "../core/a11y.js";
|
|
|
5
5
|
import { SbbLanguageController as A } from "../core/controllers.js";
|
|
6
6
|
import { i18nTimeInputChange as T, i18nTimeInvalid as y, i18nTimeMax as D, i18nTimeMaxLength as E } from "../core/i18n.js";
|
|
7
7
|
import { SbbFormAssociatedInputMixin as V } from "../core/mixins.js";
|
|
8
|
-
const w = f`*,:before,:after{box-sizing:border-box}:host{display:inline-flex;min-width:var(--sbb-time-input-max-width);max-width:var(--sbb-time-input-max-width);cursor:text;align-items:center}@media
|
|
8
|
+
const w = f`*,:before,:after{box-sizing:border-box}:host{display:inline-flex;min-width:var(--sbb-time-input-max-width);max-width:var(--sbb-time-input-max-width);cursor:text;align-items:center}@media(forced-colors:active){:host{color:FieldText}}:host(:disabled){cursor:default}:host(:focus){text-overflow:initial!important}:host(:empty):after{content:attr(placeholder);color:var(--sbb-color-5);-webkit-text-fill-color:var(--sbb-color-5);opacity:1}@media(forced-colors:active){:host(:empty):after{color:GrayText}}`, x = /[0-9.:,\-;_hH]/, d = /[^0-9.:,\-;_hH]/g, S = /^([0-9]{1,2})([0-9]{2})$/, C = /^([0-9]{1,2})?[.:,\-;_hH]?([0-9]{1,2})?$/;
|
|
9
9
|
let M = (() => {
|
|
10
10
|
var a;
|
|
11
11
|
let _ = [g("sbb-time-input")], r, l = [], s, n = V(v), u = [], o;
|
|
@@ -11,7 +11,7 @@ import { i18nClass as D } from "../core/i18n.js";
|
|
|
11
11
|
import { SbbNegativeMixin as j } from "../core/mixins.js";
|
|
12
12
|
import "../screen-reader-only.js";
|
|
13
13
|
import "../timetable-occupancy-icon.js";
|
|
14
|
-
const L = S`*,:before,:after{box-sizing:border-box}:host{display:inline-block;--sbb-timetable-occupancy-color: var(--sbb-color-2);--sbb-icon-svg-width: .890625rem;--sbb-icon-svg-height: v0.75rem}@media
|
|
14
|
+
const L = S`*,:before,:after{box-sizing:border-box}:host{display:inline-block;--sbb-timetable-occupancy-color: var(--sbb-color-2);--sbb-icon-svg-width: .890625rem;--sbb-icon-svg-height: v0.75rem}@media(min-width:52.5rem){:host{--sbb-icon-svg-width: 1.1875rem;--sbb-icon-svg-height: v1rem}}:host([negative]){--sbb-timetable-occupancy-color: var(--sbb-color-2-negative)}.sbb-timetable-occupancy__list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-2x)}.sbb-timetable-occupancy__list-item{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x)}.sbb-timetable-occupancy__list-item-class{--sbb-text-font-size: var(--sbb-font-size-text-s);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);line-height:1;color:var(--sbb-timetable-occupancy-color)}.sbb-timetable-occupancy__list-item-icon{display:flex}`;
|
|
15
15
|
let J = (() => {
|
|
16
16
|
var l, r, n;
|
|
17
17
|
let s = [E("sbb-timetable-occupancy")], t, a = [], i, h = j($), d, _ = [], g = [], O, C = [], v = [];
|
|
@@ -10,7 +10,7 @@ import { i18nOccupancy as I } from "../core/i18n.js";
|
|
|
10
10
|
import { SbbNegativeMixin as k } from "../core/mixins.js";
|
|
11
11
|
import { SbbIconBase as v } from "../icon.js";
|
|
12
12
|
import { css as N } from "lit";
|
|
13
|
-
const x = N`@media
|
|
13
|
+
const x = N`@media(forced-colors:active)and (prefers-color-scheme:light){:host svg{filter:invert(1)}}`;
|
|
14
14
|
let H = (() => {
|
|
15
15
|
var o, i;
|
|
16
16
|
let t = [A("sbb-timetable-occupancy-icon")], a, s = [], c, u = k(v), h, m = [], b = [];
|