@baloise/ds-core 17.2.0 → 17.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bal-carousel2.js +1 -1
- package/components/bal-close2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-date.js +1 -1
- package/components/bal-input-date2.js +2 -2
- package/components/bal-list-item-accordion-body2.js +3 -3
- package/components/bal-pagination2.js +4 -4
- package/components/bal-segment.js +1 -1
- package/components/bal-stage-image.js +1 -1
- package/components/bal-tabs2.js +12 -14
- package/components/index.js +1 -1
- package/components/mutation.decorator.js +11 -13
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-512a273a.js → p-00281d6b.js} +1 -1
- package/dist/baloise-design-system/{p-799a292492.entry.js → p-04979ee232.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cc4dc17721.system.entry.js → p-18fbeec32d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ba38ccde00.entry.js → p-19abec97c4.entry.js} +1 -1
- package/dist/baloise-design-system/{p-749fe3de.system.js → p-1c118a88.system.js} +1 -1
- package/dist/baloise-design-system/{p-aebb3198c4.system.entry.js → p-1cb1fb71d4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c045d5a57c.system.entry.js → p-20d7a74311.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c412a7d9f5.system.entry.js → p-25e640839d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-246e9e2585.system.entry.js → p-27d3f5d35a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34b1a9a33b.entry.js → p-296b12e3a9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-13e7a8817c.entry.js → p-2ad664ad93.entry.js} +1 -1
- package/dist/baloise-design-system/{p-56f5e6d1.system.js → p-35120ab6.system.js} +1 -1
- package/dist/baloise-design-system/{p-e3a563de25.system.entry.js → p-374ce10b98.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9f83acd71d.entry.js → p-39ad885d73.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fb2a9f7542.system.entry.js → p-3a0a84fbcc.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-3d1747bc.system.js +1 -0
- package/dist/baloise-design-system/{p-eee34b1983.entry.js → p-47ae469120.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b5152365.system.js → p-486eb96d.system.js} +1 -1
- package/dist/baloise-design-system/p-51380295.system.js +1 -1
- package/dist/baloise-design-system/{p-8b8019c57c.entry.js → p-58f7826179.entry.js} +1 -1
- package/dist/baloise-design-system/{p-88be14c716.entry.js → p-5bbc6e33c0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d8fb982e61.system.entry.js → p-61b87619ac.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-01cdb12b31.entry.js → p-63793834ec.entry.js} +1 -1
- package/dist/baloise-design-system/p-65b542bd.system.js +1 -1
- package/dist/baloise-design-system/{p-5361e8255f.system.entry.js → p-682a1550e1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-38eaad35.js → p-7684efd8.js} +1 -1
- package/dist/baloise-design-system/{p-fd88b00c71.system.entry.js → p-77a1d547e2.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-992c49c23e.system.entry.js → p-7d63b70a40.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-737eb79c75.entry.js → p-7e50273c21.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3c4bbee680.system.entry.js → p-9e2730c56b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d1c71ad702.entry.js → p-a33ee4ca30.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4023b8977a.entry.js → p-a5a8da4e09.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b86876e144.entry.js → p-a6556b9bd0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8e244ba61a.entry.js → p-a76969fe16.entry.js} +1 -1
- package/dist/baloise-design-system/p-aa08fe2376.entry.js +1 -0
- package/dist/baloise-design-system/{p-30679d51bd.system.entry.js → p-ab64213bd1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7cf23072c.entry.js → p-ac2b4a256d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4c8470249b.system.entry.js → p-b5c538994b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-be6d3bde8f.entry.js → p-c486a8a8ed.entry.js} +1 -1
- package/dist/baloise-design-system/{p-faaf77375f.system.entry.js → p-c6ee7ff820.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c72669019f.system.entry.js → p-cd5cbb0462.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-ce674dca.js +1 -0
- package/dist/baloise-design-system/{p-73efab2c3a.system.entry.js → p-d21e99c2da.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a68d21a21e.system.entry.js → p-d8420ad3d5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-de13d5c0.system.js → p-dafb9ede.system.js} +1 -1
- package/dist/baloise-design-system/{p-34c50dfa1e.entry.js → p-dc032a0d49.entry.js} +1 -1
- package/dist/baloise-design-system/p-e3167218.js +1 -1
- package/dist/baloise-design-system/{p-ccee08eae1.system.entry.js → p-e5724f1013.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-749056f366.entry.js → p-fc915218bf.entry.js} +1 -1
- package/dist/baloise-design-system/p-fe30593a.js +1 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-close.cjs.entry.js +1 -1
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-field_5.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +6 -6
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +4 -4
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +7 -7
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-segment_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +16 -18
- package/dist/cjs/{breakpoints.decorator-8bde2bcf.js → breakpoints.decorator-2c97bb36.js} +1 -1
- package/dist/cjs/{breakpoints.subject-15687772.js → breakpoints.subject-f3104eb9.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-6421e1c1.js +1 -1
- package/dist/cjs/{mutation.decorator-d2ce6c1a.js → mutation.decorator-5ac1e198.js} +10 -12
- package/dist/cjs/{tokens.esm-bdae5d02.js → tokens.esm-dbef942e.js} +1 -1
- package/dist/cjs/{window-resize.decorator-e1fbbe1f.js → window-resize.decorator-69ff6e4c.js} +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +3 -3
- package/dist/collection/components/bal-close/bal-close.js +4 -4
- package/dist/collection/components/bal-date/bal-date-calendar/bal-date-calendar.js +1 -1
- package/dist/collection/components/bal-date/bal-date.js +3 -3
- package/dist/collection/components/bal-input/bal-input-date/bal-input-date.js +4 -4
- package/dist/collection/components/bal-list/bal-list-item-accordion-body/bal-list-item-accordion-body.js +3 -3
- package/dist/collection/components/bal-pagination/bal-pagination.js +6 -6
- package/dist/collection/components/bal-segment/bal-segment.js +1 -1
- package/dist/collection/components/bal-stage/bal-stage-image/bal-stage-image.js +1 -1
- package/dist/collection/components/bal-tabs/bal-tabs.js +12 -14
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/mutation/mutation.subject.js +11 -13
- package/dist/esm/bal-carousel_2.entry.js +5 -5
- package/dist/esm/bal-checkbox_2.entry.js +1 -1
- package/dist/esm/bal-close.entry.js +1 -1
- package/dist/esm/bal-date-calendar_2.entry.js +3 -3
- package/dist/esm/bal-date.entry.js +1 -1
- package/dist/esm/bal-field_5.entry.js +1 -1
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +6 -6
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +4 -4
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +7 -7
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-radio_2.entry.js +1 -1
- package/dist/esm/bal-segment_2.entry.js +5 -5
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +16 -18
- package/dist/esm/{breakpoints.decorator-7623ded8.js → breakpoints.decorator-a8efc52b.js} +1 -1
- package/dist/esm/{breakpoints.subject-ac2d9287.js → breakpoints.subject-0764e6ff.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-b9912138.js +1 -1
- package/dist/esm/{mutation.decorator-985cc0a1.js → mutation.decorator-74831883.js} +11 -13
- package/dist/esm/{tokens.esm-44ff650d.js → tokens.esm-69df759d.js} +1 -1
- package/dist/esm/{window-resize.decorator-ab11c379.js → window-resize.decorator-53d6279e.js} +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-close.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-stage_6.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-a8efc52b.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-ac2d9287.js → breakpoints.subject-0764e6ff.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-b9912138.js +1 -1
- package/dist/esm-es5/mutation.decorator-74831883.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-ab11c379.js → window-resize.decorator-53d6279e.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +1 -2
- package/dist/types/components/bal-close/bal-close.d.ts +1 -2
- package/dist/types/components/bal-date/bal-date-calendar/bal-date-calendar.d.ts +1 -1
- package/dist/types/components/bal-date/bal-date.d.ts +1 -2
- package/dist/types/components/bal-input/bal-input-date/bal-input-date.d.ts +1 -1
- package/dist/types/components/bal-list/bal-list-item-accordion-body/bal-list-item-accordion-body.d.ts +1 -1
- package/dist/types/components/bal-pagination/bal-pagination.d.ts +1 -2
- package/dist/types/components/bal-segment/bal-segment.d.ts +1 -1
- package/dist/types/components.d.ts +7 -7
- package/package.json +7 -7
- package/dist/baloise-design-system/p-12a557557c.entry.js +0 -1
- package/dist/baloise-design-system/p-55d6475b.js +0 -1
- package/dist/baloise-design-system/p-738ca720.system.js +0 -1
- package/dist/baloise-design-system/p-950bd476.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-7623ded8.js +0 -1
- package/dist/esm-es5/mutation.decorator-985cc0a1.js +0 -1
- /package/dist/baloise-design-system/{p-18a74018.js → p-0521dc23.js} +0 -0
- /package/dist/baloise-design-system/{p-69313d59.system.js → p-342d34ac.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-44ff650d.js → tokens.esm-69df759d.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5b1faf93.js';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
3
3
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
4
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
4
|
+
import { b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
5
5
|
import { d as defaultConfig } from './config.default-7efdc82d.js';
|
|
6
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
6
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-a8efc52b.js';
|
|
7
7
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
8
8
|
import './helpers-72ae7307.js';
|
|
9
9
|
import './browser-a8073d92.js';
|
|
@@ -11,7 +11,7 @@ import './icons.constant-a7885631.js';
|
|
|
11
11
|
import './config.utils-6ac6c9bd.js';
|
|
12
12
|
import './device-8c6d2881.js';
|
|
13
13
|
import './listener-04842ae9.js';
|
|
14
|
-
import './tokens.esm-
|
|
14
|
+
import './tokens.esm-69df759d.js';
|
|
15
15
|
import './log-dfd1c19f.js';
|
|
16
16
|
|
|
17
17
|
function generatePaginationControl(value, totalPages, pageRange) {
|
|
@@ -236,10 +236,10 @@ const Pagination = class {
|
|
|
236
236
|
const leftControlTitle = i18nControlLabel[this.language].left;
|
|
237
237
|
const rightControlTitle = i18nControlLabel[this.language].right;
|
|
238
238
|
const hasBasicNavigationButtons = this.interface === '' || (isSmall && this.totalPages <= 5);
|
|
239
|
-
const SmallWithText = () => (h("span", { key: '
|
|
240
|
-
const PaginationTablet = () => (h("ul", { key: '
|
|
241
|
-
const PaginationMobile = () => (h("ul", { key: '
|
|
242
|
-
return (h(Host, { key: '
|
|
239
|
+
const SmallWithText = () => (h("span", { key: '8d0f477acb2db965fe7ca9a323db754dadb8c2d1', class: Object.assign(Object.assign({}, elList.class()), elList.modifier(`context-${this.interface}`).class()) }, h("span", { key: '25bc274a3580f3103acb6aa21bb0f132da31a4cd' }, this._value), ' / ' + this.totalPages));
|
|
240
|
+
const PaginationTablet = () => (h("ul", { key: '635a052d90c4d86104752eedf70d28d60a3ea194', class: Object.assign(Object.assign(Object.assign({}, elList.class()), elList.modifier(`context-${this.interface}`).class()), { 'is-disabled': this.disabled }), "data-testid": "bal-pagination-list" }, tabletItems));
|
|
241
|
+
const PaginationMobile = () => (h("ul", { key: '36bc734dd92d55f93cae88e34c032fbae5239ae2', class: Object.assign(Object.assign(Object.assign({}, elList.class()), elList.modifier(`context-${this.interface}`).class()), { 'is-disabled': this.disabled }), "data-testid": "bal-pagination-list" }, mobileItems));
|
|
242
|
+
return (h(Host, { key: '1f6888814e691b8f4b46987055e3d474078bac38', class: Object.assign(Object.assign({}, block.class()), block.modifier('is-sticky').class(this.sticky)) }, h("nav", { key: '00eba4def4d24082f102861ef471043c3646a18a', class: Object.assign(Object.assign(Object.assign({}, elNav.class()), elNav.modifier(`context-${this.interface}`).class(this.interface !== '')), elNav.modifier(`align-${this.align}`).class(this.align !== '')), role: "navigation", "aria-label": "pagination" }, h("bal-button", { key: '068a1d8b79deecd129b3280ac4eefb4e6c7ef814', square: true, color: buttonColor, size: buttonSize, flat: flat, class: Object.assign(Object.assign({}, elPrevious.class()), elPrevious.modifier(`context-${this.interface}`).class()), disabled: this._value < 2 || this.disabled, onClick: () => this.previous(), "data-testid": "bal-pagination-controls-left", title: leftControlTitle }, h("bal-icon", { key: '0ceeb68b1426edc0b1425b6bb1236941534ead5d', name: "nav-go-left", size: "small" })), h("bal-button", { key: '3eb18c38c467b0f8bfc2326341e93e236567c060', square: true, color: buttonColor, size: buttonSize, flat: flat, class: Object.assign(Object.assign({}, elNext.class()), elNext.modifier(`context-${this.interface}`).class()), disabled: this._value === this.totalPages || this.disabled, onClick: () => this.next(), "data-testid": "bal-pagination-controls-right", title: rightControlTitle }, h("bal-icon", { key: 'fa8feb6b44def140d75218f387fcfdbb984bd99a', name: "nav-go-right", size: "small" })), hasBasicNavigationButtons && this.isMobile ? h(PaginationMobile, null) : '', hasBasicNavigationButtons && !this.isMobile ? h(PaginationTablet, null) : '', !hasBasicNavigationButtons ? h(SmallWithText, null) : '')));
|
|
243
243
|
}
|
|
244
244
|
get el() { return getElement(this); }
|
|
245
245
|
static get watchers() { return {
|
|
@@ -2,15 +2,15 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-5b
|
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
3
3
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
4
4
|
import { n as raf } from './helpers-72ae7307.js';
|
|
5
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
6
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
7
|
-
import { L as ListenToWindowResize } from './window-resize.decorator-
|
|
5
|
+
import { b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
6
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-a8efc52b.js';
|
|
7
|
+
import { L as ListenToWindowResize } from './window-resize.decorator-53d6279e.js';
|
|
8
8
|
import './browser-a8073d92.js';
|
|
9
9
|
import './icons.constant-a7885631.js';
|
|
10
10
|
import './config.utils-6ac6c9bd.js';
|
|
11
11
|
import './device-8c6d2881.js';
|
|
12
12
|
import './listener-04842ae9.js';
|
|
13
|
-
import './tokens.esm-
|
|
13
|
+
import './tokens.esm-69df759d.js';
|
|
14
14
|
|
|
15
15
|
const balProgressBarCss = ":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-background-purple:var(--bal-color-purple-2);--bal-progress-bar-background-yellow:var(--bal-color-yellow-2);--bal-progress-bar-background-red:var(--bal-color-red-2);--bal-progress-bar-background-green:var(--bal-color-green-2);--bal-progress-bar-line-color-primary:var(--bal-color-primary);--bal-progress-bar-line-color-purple:var(--bal-color-purple-6);--bal-progress-bar-line-color-yellow:var(--bal-color-yellow-6);--bal-progress-bar-line-color-red:var(--bal-color-red-6);--bal-progress-bar-line-color-green:var(--bal-color-green-6);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white-of-primary,.bal-progress-bar--background-white-of-purple,.bal-progress-bar--background-white-of-red,.bal-progress-bar--background-white-of-green,.bal-progress-bar--background-white-of-yellow{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey-of-primary{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar--background-grey-of-purple{background:var(--bal-progress-bar-background-purple)}.bal-progress-bar--background-grey-of-red{background:var(--bal-progress-bar-background-red)}.bal-progress-bar--background-grey-of-green{background:var(--bal-progress-bar-background-green)}.bal-progress-bar--background-grey-of-yellow{background:var(--bal-progress-bar-background-yellow)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-color-primary);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}.bal-progress-bar__line--color-purple{background:var(--bal-progress-bar-line-color-purple)}.bal-progress-bar__line--color-yellow{background:var(--bal-progress-bar-line-color-yellow)}.bal-progress-bar__line--color-red{background:var(--bal-progress-bar-line-color-red)}.bal-progress-bar__line--color-green{background:var(--bal-progress-bar-line-color-green)}";
|
|
16
16
|
const BalProgressBarStyle0 = balProgressBarCss;
|
|
@@ -10,7 +10,7 @@ import { d as defaultBalAriaForm } from './form-fb8dd9f5.js';
|
|
|
10
10
|
import { L as ListenTo } from './listen-d1712e70.js';
|
|
11
11
|
import { d as isSpaceKey } from './keyboard.helpers-b2dd6393.js';
|
|
12
12
|
import { L as ListenToFocus } from './focus.decorator-dc333802.js';
|
|
13
|
-
import { L as ListenToMutation } from './mutation.decorator-
|
|
13
|
+
import { L as ListenToMutation } from './mutation.decorator-74831883.js';
|
|
14
14
|
import './browser-a8073d92.js';
|
|
15
15
|
import './icons.constant-a7885631.js';
|
|
16
16
|
import './config.utils-6ac6c9bd.js';
|
|
@@ -9,16 +9,16 @@ import { d as defaultBalAriaForm } from './form-fb8dd9f5.js';
|
|
|
9
9
|
import { L as ListenTo } from './listen-d1712e70.js';
|
|
10
10
|
import { d as isSpaceKey, b as isEnterKey, a as isArrowUpKey, e as isArrowLeftKey, i as isArrowDownKey, f as isArrowRightKey, g as isHomeKey, h as isEndKey } from './keyboard.helpers-b2dd6393.js';
|
|
11
11
|
import { L as ListenToFocus } from './focus.decorator-dc333802.js';
|
|
12
|
-
import { L as ListenToWindowResize } from './window-resize.decorator-
|
|
13
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
12
|
+
import { L as ListenToWindowResize } from './window-resize.decorator-53d6279e.js';
|
|
13
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-a8efc52b.js';
|
|
14
14
|
import { i as inheritAttributes } from './attributes-4fa7040f.js';
|
|
15
15
|
import './browser-a8073d92.js';
|
|
16
16
|
import './icons.constant-a7885631.js';
|
|
17
17
|
import './config.utils-6ac6c9bd.js';
|
|
18
18
|
import './listener-04842ae9.js';
|
|
19
|
-
import './breakpoints.subject-
|
|
19
|
+
import './breakpoints.subject-0764e6ff.js';
|
|
20
20
|
import './device-8c6d2881.js';
|
|
21
|
-
import './tokens.esm-
|
|
21
|
+
import './tokens.esm-69df759d.js';
|
|
22
22
|
|
|
23
23
|
const balSegmentCss = ":root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment{display:-ms-flexbox;display:flex;background:var(--bal-segment-background);border-radius:var(--bal-radius-normal);gap:.125rem;gap:.125rem;padding:.25rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-segment--invalid{background:var(--bal-segment-background-invalid)}.bal-segment--vertical{-ms-flex-direction:column;flex-direction:column;width:100%}.bal-segment--vertical .bal-segment-item__button{width:100%;-ms-flex:1;flex:1}.bal-segment--vertical.bal-segment--scrollable{overflow:auto;max-height:240px}.bal-segment--expanded{width:100%;min-width:100%;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.bal-segment--expanded .bal-segment-item,.bal-segment--expanded .bal-segment-item>button{-ms-flex:1;flex:1;width:100%}.bal-segment--expanded .bal-segment-item .bal-content,.bal-segment--expanded .bal-segment-item>button .bal-content{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";
|
|
24
24
|
const BalSegmentStyle0 = balSegmentCss;
|
|
@@ -323,7 +323,7 @@ const Segment = class {
|
|
|
323
323
|
render() {
|
|
324
324
|
const { invalid, isVertical, scrollable, keyboardMode, expanded, isMobile, disabled } = this;
|
|
325
325
|
const block = BEM.block('segment');
|
|
326
|
-
return (h(Host, { key: '
|
|
326
|
+
return (h(Host, { key: 'eadae45bddff8b5367b8db4e38c2eb467097ffb3', role: "radiogroup", id: this.ariaForm.controlId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('invalid').class(invalid)), block.modifier('vertical').class(isVertical)), block.modifier('scrollable').class(scrollable)), block.modifier('keyboard').class(keyboardMode)), block.modifier('disabled').class(disabled)), block.modifier('expanded').class((expanded || isMobile) && !isVertical)), onClick: this.onClick }, h("slot", { key: 'b82c45b87b6cbd116d3b176fbd93661944740823', onSlotchange: this.onSlottedItemsChange })));
|
|
327
327
|
}
|
|
328
328
|
get el() { return getElement(this); }
|
|
329
329
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-5b1faf93.js';
|
|
2
2
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
3
|
-
import { f as balColorGrey4, g as balColorYellow3, h as balColorYellow5, i as balColorPurple3, j as balColorPurple6, k as balColorRed3, l as balColorRed5, m as balColorGreen3, n as balColorGreen6 } from './tokens.esm-
|
|
3
|
+
import { f as balColorGrey4, g as balColorYellow3, h as balColorYellow5, i as balColorPurple3, j as balColorPurple6, k as balColorRed3, l as balColorRed5, m as balColorGreen3, n as balColorGreen6 } from './tokens.esm-69df759d.js';
|
|
4
4
|
|
|
5
5
|
const balShapeCss = ".bal-shape{display:block;overflow:hidden;border-radius:var(--bal-radius-normal);width:66px;height:66px}@media screen and (min-width: 769px),print{.bal-shape{width:120px;height:120px}}@media screen and (min-width: 1024px){.bal-shape{width:198px;height:198px;border-radius:unset}}.bal-shape--is-rotation-0{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.bal-shape--is-rotation-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.bal-shape--is-rotation-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-shape--is-rotation-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}";
|
|
6
6
|
const BalShapeStyle0 = balShapeCss;
|
|
@@ -123,7 +123,7 @@ const StageImage = class {
|
|
|
123
123
|
render() {
|
|
124
124
|
const block = BEM.block('stage-image');
|
|
125
125
|
const imageSrc = this.fallback ? this.fallback : this.srcSet.split(',')[0];
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'fc6b85b3671ee0ef029f22d3e0468849cf09c3ac', class: Object.assign({}, block.class()) }, this.isLargestContentfulPaintDone ? (h("img", Object.assign({ src: imageSrc, srcset: this.srcSet, sizes: "100vw" }, this.imageInheritAttributes))) : ('')));
|
|
127
127
|
}
|
|
128
128
|
get el() { return getElement(this); }
|
|
129
129
|
};
|
|
@@ -6,9 +6,9 @@ import { L as Logger } from './log-dfd1c19f.js';
|
|
|
6
6
|
import { a as areArraysEqual } from './array-4c09dfe3.js';
|
|
7
7
|
import { s as stopEventBubbling } from './form-input-264ad739.js';
|
|
8
8
|
import { n as newBalStepOption } from './bal-step.util-3905ad56.js';
|
|
9
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
10
|
-
import { L as ListenToMutation } from './mutation.decorator-
|
|
11
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
9
|
+
import { b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
10
|
+
import { L as ListenToMutation } from './mutation.decorator-74831883.js';
|
|
11
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-a8efc52b.js';
|
|
12
12
|
import './browser-a8073d92.js';
|
|
13
13
|
import './icons.constant-a7885631.js';
|
|
14
14
|
import './config.utils-6ac6c9bd.js';
|
|
@@ -17,7 +17,7 @@ import './index-95ee0c4b.js';
|
|
|
17
17
|
import './_commonjsHelpers-1c8beb5f.js';
|
|
18
18
|
import './device-8c6d2881.js';
|
|
19
19
|
import './listener-04842ae9.js';
|
|
20
|
-
import './tokens.esm-
|
|
20
|
+
import './tokens.esm-69df759d.js';
|
|
21
21
|
|
|
22
22
|
const StepIcon = ({ item, isMobile }) => {
|
|
23
23
|
const bemEl = BEM.block('steps').element('nav').element('item').element('icon');
|
|
@@ -10,9 +10,9 @@ import { s as stopEventBubbling } from './form-input-264ad739.js';
|
|
|
10
10
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
11
11
|
import { a as getComputedPadding } from './style-ca1bd202.js';
|
|
12
12
|
import { L as ListenTo } from './listen-d1712e70.js';
|
|
13
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
14
|
-
import { L as ListenToMutation } from './mutation.decorator-
|
|
15
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
13
|
+
import { b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
14
|
+
import { L as ListenToMutation } from './mutation.decorator-74831883.js';
|
|
15
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-a8efc52b.js';
|
|
16
16
|
import { L as ListenToResize } from './resize.decorator-f2d8461d.js';
|
|
17
17
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
18
18
|
import './index-82aff103.js';
|
|
@@ -22,7 +22,7 @@ import './icons.constant-a7885631.js';
|
|
|
22
22
|
import './config.utils-6ac6c9bd.js';
|
|
23
23
|
import './device-8c6d2881.js';
|
|
24
24
|
import './listener-04842ae9.js';
|
|
25
|
-
import './tokens.esm-
|
|
25
|
+
import './tokens.esm-69df759d.js';
|
|
26
26
|
|
|
27
27
|
const TabItem = class {
|
|
28
28
|
constructor(hostRef) {
|
|
@@ -425,17 +425,15 @@ const Tabs = class {
|
|
|
425
425
|
*/
|
|
426
426
|
this.onOptionChange = debounce(() => this.onOptionChangeInternal(), 100);
|
|
427
427
|
this.onOptionChangeInternal = async () => {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
console.warn('[WARN] - Could not read tab options');
|
|
438
|
-
}
|
|
428
|
+
try {
|
|
429
|
+
const options = await this.getOptions();
|
|
430
|
+
this.updateStore(options);
|
|
431
|
+
this.setActiveItem();
|
|
432
|
+
this.setActiveContent();
|
|
433
|
+
this.animateLine();
|
|
434
|
+
}
|
|
435
|
+
catch (e) {
|
|
436
|
+
console.warn('[WARN] - Could not read tab options');
|
|
439
437
|
}
|
|
440
438
|
};
|
|
441
439
|
this.onSelectTab = async (ev, tab) => {
|
|
@@ -537,8 +535,8 @@ const Tabs = class {
|
|
|
537
535
|
}
|
|
538
536
|
}
|
|
539
537
|
componentDidLoad() {
|
|
538
|
+
this.onOptionChange();
|
|
540
539
|
rLCP(() => {
|
|
541
|
-
this.onOptionChange();
|
|
542
540
|
this.isLargestContentfulPaintDone = true;
|
|
543
541
|
});
|
|
544
542
|
}
|
|
@@ -764,13 +762,13 @@ const Tabs = class {
|
|
|
764
762
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
765
763
|
const valueExists = this.value !== undefined && !!this.store.find(o => o.value === this.value);
|
|
766
764
|
const isLinkList = !this.isTabList;
|
|
767
|
-
return (h(Host, { key: '
|
|
765
|
+
return (h(Host, { key: 'dfe8fd6f11b4d884bf8e7605653b637526412382', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('navbar').class(this.inNavbar)), block.modifier('vertical').class(isVertical)), block.modifier('fullwidth').class(this.expanded || this.fullwidth)), block.modifier('accordion').class(this.accordion)), block.modifier('animated').class(this.animated)), block.modifier('expanding').class(this.accordionState === 8 /* AccordionState.Expanding */)), block.modifier('expanded').class(this.accordionState === 4 /* AccordionState.Expanded */)), block.modifier('collapsing').class(this.accordionState === 2 /* AccordionState.Collapsing */)), block.modifier('collapsed').class(this.accordionState === 1 /* AccordionState.Collapsed */)), "data-value": this.store
|
|
768
766
|
.filter(t => this.isTabActive(t))
|
|
769
767
|
.map(t => t.value)
|
|
770
768
|
.join(','), "data-label": this.store
|
|
771
769
|
.filter(t => this.isTabActive(t))
|
|
772
770
|
.map(t => t.label)
|
|
773
|
-
.join(',') }, isSelect ? (h(TabSelect, { value: this.value, items: tabs, onSelectTab: this.onSelectTab })) : (h(TabNav, { items: tabs, isLinkList: isLinkList, tabsId: this.tabsId, clickable: this.clickable, accordion: this.accordion, isAccordionOpen: this.isAccordionOpen, lineActive: valueExists, inverted: isInverted, animated: this.animated, context: this.context, border: this.border, spaceless: this.spaceless, expanded: this.expanded, isMobile: isMobile, isTouch: isTouch, isVertical: isVertical, inNavbar: this.inNavbar, hasCarousel: hasCarousel, iconPosition: this.iconPosition, verticalColSize: this.verticalColSize, onSelectTab: this.onSelectTab, dimInactiveElements: this.dimInactiveElements })), h("div", { key: '
|
|
771
|
+
.join(',') }, isSelect ? (h(TabSelect, { value: this.value, items: tabs, onSelectTab: this.onSelectTab })) : (h(TabNav, { items: tabs, isLinkList: isLinkList, tabsId: this.tabsId, clickable: this.clickable, accordion: this.accordion, isAccordionOpen: this.isAccordionOpen, lineActive: valueExists, inverted: isInverted, animated: this.animated, context: this.context, border: this.border, spaceless: this.spaceless, expanded: this.expanded, isMobile: isMobile, isTouch: isTouch, isVertical: isVertical, inNavbar: this.inNavbar, hasCarousel: hasCarousel, iconPosition: this.iconPosition, verticalColSize: this.verticalColSize, onSelectTab: this.onSelectTab, dimInactiveElements: this.dimInactiveElements })), h("div", { key: '0aac73b494d835402ac6654a6a281593917c355a', part: contentPart, ref: contentEl => (this.contentEl = contentEl), class: Object.assign({}, block.element('tabs').element('content').class()) }, h("div", { key: '77c68b5ce4d763f99bacff6e8395f9cd4c03e430', id: this.tabsId, class: Object.assign({}, block.element('tabs').element('content').element('wrapper').class()), ref: contentElWrapper => (this.contentElWrapper = contentElWrapper) }, h("slot", { key: '822c8efa61f9e44fc42e6f8ba31b5286967d7181' })))));
|
|
774
772
|
}
|
|
775
773
|
get el() { return getElement(this); }
|
|
776
774
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@ import { j as debounce, k as addEventListener, r as removeEventListener } from '
|
|
|
2
2
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
3
3
|
import { b as balDevice } from './device-8c6d2881.js';
|
|
4
4
|
import { L as ListenerAbstract, S as Subject } from './listener-04842ae9.js';
|
|
5
|
-
import { b as balBreakpointDesktop, a as balBreakpointHighDefinition, c as balBreakpointWidescreen, d as balBreakpointFullhd$1, e as balBreakpointTablet } from './tokens.esm-
|
|
5
|
+
import { b as balBreakpointDesktop, a as balBreakpointHighDefinition, c as balBreakpointWidescreen, d as balBreakpointFullhd$1, e as balBreakpointTablet } from './tokens.esm-69df759d.js';
|
|
6
6
|
|
|
7
7
|
class BalWindowResizeHandler {
|
|
8
8
|
constructor(options = {}) {
|
package/dist/esm/index.js
CHANGED
|
@@ -18,15 +18,15 @@ import { b as balDevice } from './device-8c6d2881.js';
|
|
|
18
18
|
export { B as BalDevice, b as balDevice } from './device-8c6d2881.js';
|
|
19
19
|
export { I as INVALID_VALUE } from './mask-util-71edc2b8.js';
|
|
20
20
|
import { g as getOverlays, a as getOverlay } from './overlays-73dcc4a8.js';
|
|
21
|
-
import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject-
|
|
22
|
-
export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject-
|
|
21
|
+
import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
22
|
+
export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject-0764e6ff.js';
|
|
23
23
|
export { a as attachToConfig, d as detachFromConfig, o as onBalConfigChange, u as updateBalAllowedLanguages, b as updateBalAnimated, c as updateBalIcons, e as updateBalLanguage, f as updateBalRegion, g as useBalConfig } from './config.utils-6ac6c9bd.js';
|
|
24
24
|
export { d as defaultConfig } from './config.default-7efdc82d.js';
|
|
25
25
|
import { S as Subject } from './listener-04842ae9.js';
|
|
26
26
|
export { B as BalSwipeSubject } from './swipe.subject-683f7c7b.js';
|
|
27
27
|
import './index-5b1faf93.js';
|
|
28
28
|
import './icons.constant-a7885631.js';
|
|
29
|
-
import './tokens.esm-
|
|
29
|
+
import './tokens.esm-69df759d.js';
|
|
30
30
|
import './log-dfd1c19f.js';
|
|
31
31
|
|
|
32
32
|
const i18nBalFieldLabel = {
|
|
@@ -283,7 +283,7 @@ const setupConfig = (userConfig = {}, win = {}) => {
|
|
|
283
283
|
};
|
|
284
284
|
|
|
285
285
|
// generated by .build/version.js
|
|
286
|
-
const VERSION = '17.2.
|
|
286
|
+
const VERSION = '17.2.1';
|
|
287
287
|
|
|
288
288
|
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
289
289
|
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as deepReady, b as waitAfterFramePaint, j as debounce
|
|
1
|
+
import { f as deepReady, b as waitAfterFramePaint, j as debounce } from './helpers-72ae7307.js';
|
|
2
2
|
import { L as ListenerAbstract, a as SingleSubject } from './listener-04842ae9.js';
|
|
3
3
|
|
|
4
4
|
class BalMutationListener extends ListenerAbstract {
|
|
@@ -78,20 +78,18 @@ class BalMutationSubject extends SingleSubject {
|
|
|
78
78
|
this.listener = new BalMutationListener(options);
|
|
79
79
|
}
|
|
80
80
|
attach(observer) {
|
|
81
|
+
var _a, _b, _c;
|
|
81
82
|
super.attach(observer);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
if (closestElement) {
|
|
87
|
-
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.connect(closestElement);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
(_b = this.listener) === null || _b === void 0 ? void 0 : _b.connect(observer.el);
|
|
83
|
+
if (this.options.closest) {
|
|
84
|
+
const closestElement = observer.el.closest(this.options.closest);
|
|
85
|
+
if (closestElement) {
|
|
86
|
+
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.connect(closestElement);
|
|
92
87
|
}
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
(_b = this.listener) === null || _b === void 0 ? void 0 : _b.connect(observer.el);
|
|
91
|
+
}
|
|
92
|
+
(_c = this.listener) === null || _c === void 0 ? void 0 : _c.add(() => this.debouncedNotify());
|
|
95
93
|
}
|
|
96
94
|
detach() {
|
|
97
95
|
var _a;
|
package/dist/esm/{window-resize.decorator-ab11c379.js → window-resize.decorator-53d6279e.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BalWindowResizeListener } from './breakpoints.subject-
|
|
1
|
+
import { B as BalWindowResizeListener } from './breakpoints.subject-0764e6ff.js';
|
|
2
2
|
import { a as SingleSubject } from './listener-04842ae9.js';
|
|
3
3
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter,__generator}from"tslib";import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-5b1faf93.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{j as debounce,l as rLCP,n as raf,b as waitAfterFramePaint}from"./helpers-72ae7307.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{s as stopEventBubbling}from"./form-input-264ad739.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-7623ded8.js";import{g as getComputedWidth}from"./style-ca1bd202.js";import{L as ListenTo}from"./listen-d1712e70.js";import{L as ListenToMutation}from"./mutation.decorator-985cc0a1.js";import{L as ListenToSwipe}from"./swipe.decorator-56b6d574.js";import{L as ListenToResize}from"./resize.decorator-f2d8461d.js";import{b as balBreakpoints}from"./breakpoints.subject-ac2d9287.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";import"./swipe.subject-683f7c7b.js";import"./device-8c6d2881.js";import"./tokens.esm-44ff650d.js";import"./log-dfd1c19f.js";var TabControl=function(t){var e=t.value,r=t.items,a=t.containerId,i=t.onControlChange;var o=BEM.block("carousel");var n=o.element("controls");return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-card",null,h("bal-card-content",null,r.map((function(t){return h("bal-button",{"aria-controls":a,key:t.value,expanded:true,color:e===t.value?"primary":"light",onClick:function(){return i(t)}},t.label)})))))};var DotControl=function(t){var e=t.value,r=t.items,a=t.containerId,i=t.onControlChange;var o=BEM.block("carousel");var n=o.element("controls");var s=function(t){var e=t.detail-1;if(e<0){e=0}if(e>=r.length){e=r.length-1}i(r[e])};return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-pagination",{"aria-controls":a,interface:"small",value:e+1,totalPages:r.length,onBalChange:s}))};var LargeControl=function(t){var e=t.isFirst,r=t.isLast,a=t.inverted,i=t.areControlsHidden,o=t.onNextClick,n=t.onPreviousClick,s=t.containerId,l=t.leftControlTitle,c=t.rightControlTitle;var u=BEM.block("carousel");var d=u.element("controls");var b=d.element("button");return h("div",{"data-mutation":"false",class:Object.assign(Object.assign({},d.class()),d.modifier("large").class())},h("bal-button",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("left").class()),b.modifier("hidden").class(e&&i)),"aria-controls":s,square:true,icon:"nav-go-left",rounded:true,inverted:a,onClick:function(){return n()},disabled:e,"aria-hidden":e&&i?"true":null,"data-testid":"bal-carousel-control-left",title:l}),h("bal-button",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("right").class()),b.modifier("hidden").class(r&&i)),"aria-controls":s,square:true,icon:"nav-go-right",rounded:true,inverted:a,onClick:function(){return o()},disabled:r,"aria-hidden":r&&i?"true":null,"data-testid":"bal-carousel-control-right",title:c}))};var SmallControl=function(t){var e=t.isFirst,r=t.isLast,a=t.inverted,i=t.leftControlTitle,o=t.rightControlTitle,n=t.containerId,s=t.onNextClick,l=t.onPreviousClick;var c=BEM.block("carousel");var u=c.element("controls");var d=u.element("button");return h("div",{class:Object.assign(Object.assign({},u.class()),u.modifier("small").class())},h("bal-button",{class:Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("left").class()),d.modifier("hidden").class(e)),"aria-controls":n,square:true,size:"small",icon:"nav-go-left",rounded:true,inverted:a,onClick:function(){return l()},disabled:e,"aria-hidden":e?"true":null,tabindex:"-1","data-testid":"bal-carousel-control-left",title:i}),h("bal-button",{class:Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("right").class()),d.modifier("hidden").class(r)),"aria-controls":n,square:true,size:"small",icon:"nav-go-right",rounded:true,inverted:a,onClick:function(){return s()},disabled:r,"aria-hidden":r?"true":null,tabindex:"-1","data-testid":"bal-carousel-control-right",title:o}))};var i18nControlLabel={de:{left:"vorherige",right:"nächste"},en:{left:"previous",right:"next"},fr:{left:"précédent",right:"suivant"},it:{left:"precedente",right:"successivo"},nl:{left:"vorige",right:"volgende"},es:{left:"anterior",right:"siguiente"},pl:{left:"poprzedni",right:"następny"},pt:{left:"anterior",right:"próximo"},sv:{left:"föregående",right:"nästa"},fi:{left:"edellinen",right:"seuraava"}};var balCarouselCss=':root{--bal-carousel-inner-border-background:var(--bal-color-border);--bal-carousel-inner-border-background-inverted:var(--bal-color-border-primary-light);--bal-carousel-inner-shadow-left-background-before:var(--bal-color-white);--bal-carousel-inner-shadow-right-background-after:var(--bal-color-white);--bal-carousel-inner-shadow-left-background-inverted-before:var(--bal-color-primary);--bal-carousel-inner-shadow-right-background-inverted-after:var(--bal-color-primary);--bal-carousel-product-item-button-background:var(--bal-color-white);--bal-carousel-product-item-button-background-green:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-hover:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-active:var(--bal-color-green-2);--bal-carousel-product-item-button-background-red:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-hover:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-active:var(--bal-color-red-2);--bal-carousel-product-item-button-background-yellow:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-hover:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-active:var(--bal-color-yellow-2);--bal-carousel-product-item-button-background-purple:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-hover:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-active:var(--bal-color-purple-2);--bal-carousel-inner-border-radius:var(--bal-radius-rounded);--bal-carousel-image-border-radius:var(--bal-radius-normal);--bal-carousel-product-item-button-border-radius:var(--bal-radius-large);--bal-carousel-product-item-button-label-text-color:var(--bal-color-text-primary);--bal-carousel-sticky-top:0}.bal-carousel{display:block;position:relative}.bal-carousel__inner{display:block;position:relative;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;-ms-touch-action:pan-y;touch-action:pan-y}.bal-carousel--full-height{height:100%}.bal-carousel__inner--full-height{height:100%}.bal-carousel__inner__container{position:relative;width:100%;height:100%;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-duration:0ms;transition-duration:0ms;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container--border{padding-bottom:var(--bal-border-width-normal)}.bal-carousel__inner__container__border{position:absolute;background:var(--bal-carousel-inner-border-background);border-radius:var(--bal-carousel-inner-border-radius);height:var(--bal-border-width-normal);width:100%;bottom:0;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container__border--inverted{background:var(--bal-carousel-inner-border-background-inverted)}.bal-carousel__item{text-align:center;font-size:var(--bal-text-size-large);min-height:2rem;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.bal-carousel__inner--shadow-left::before,.bal-carousel__inner--shadow-right::after{position:absolute;width:3rem;height:100%;top:0}.bal-carousel__inner--shadow-left::before{content:"";left:0;background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-carousel__inner--shadow-right::after{content:"";right:0;background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-after) 50%)}.bal-carousel__inner--shadow-left.bal-carousel__inner--inverted::before{background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-inverted-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-inverted-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-carousel__inner--shadow-right.bal-carousel__inner--inverted::after{background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-inverted-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel__inner--items-per-view-auto .bal-carousel__item{width:auto}.bal-carousel__inner--items-per-view-1 .bal-carousel__item{width:100%}.bal-carousel__inner--items-per-view-2 .bal-carousel__item{width:50%}.bal-carousel__inner--items-per-view-3 .bal-carousel__item{width:33.3333%}.bal-carousel__inner--items-per-view-4 .bal-carousel__item{width:25%}.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:2.5rem}}@media screen and (min-width: 1024px){.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:3rem}}.bal-carousel--card{margin-left:-1rem;margin-right:-1rem}@media screen and (min-width: 769px),print{.bal-carousel--card{margin-left:-2.5rem;margin-right:-2.5rem}}.bal-carousel--card .bal-carousel__controls{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__controls{padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--card .bal-carousel__item{width:calc(100% - 2rem);padding-top:1rem;padding-bottom:1rem;padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__item{width:calc(100% - 5rem);padding-top:2.5rem;padding-bottom:2.5rem;padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--controls-sticky .bal-carousel__controls--tabs{position:-webkit-sticky;position:sticky;top:var(--bal-carousel-sticky-top);z-index:var(--bal-z-index-sticky)}.bal-carousel__controls--tabs .bal-card{padding:0}.bal-carousel__controls--tabs .bal-card-content{padding:.5rem !important;gap:.5rem;display:-ms-flexbox;display:flex}.bal-carousel__controls--tabs .bal-card-content .bal-button{-ms-flex:1;flex:1}.bal-carousel__controls--tabs .bal-card-content .bal-button .button{padding:.5rem !important}.bal-carousel--image .bal-carousel__inner{border-radius:var(--bal-carousel-image-border-radius)}.bal-carousel--image .bal-carousel__inner--is-1by1{padding-top:100%}.bal-carousel--image .bal-carousel__inner--is-16by9{padding-top:56.25%}.bal-carousel--image .bal-carousel__inner--is-3by2{padding-top:66.66%}.bal-carousel--image .bal-carousel__inner--is-4by3{padding-top:75%}.bal-carousel--image .bal-carousel__inner__container{position:absolute;top:0;left:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%}.bal-carousel--image .bal-carousel__item{position:relative;-ms-flex:0 0 100%;flex:0 0 100%}.bal-carousel--image .bal-carousel__item>img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-drag:none;user-zoom:fixed}.bal-carousel--product .bal-carousel__inner__container{gap:1rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-carousel--product .bal-carousel__item{display:-ms-flexbox;display:flex;width:10rem;height:11rem;text-align:center;padding-top:.5rem;padding-bottom:.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item__button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:1rem;border-radius:var(--bal-carousel-product-item-button-border-radius);padding:var(--bal-text-size-x-small);border:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;background:var(--bal-carousel-product-item-button-background)}@media (hover: hover)and (pointer: fine){.bal-carousel--product .bal-carousel__item__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-green{background:var(--bal-carousel-product-item-button-background-green)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-green:hover{background:var(--bal-carousel-product-item-button-background-green-hover)}.bal-carousel--product .bal-carousel__item__button--color-green:active{background:var(--bal-carousel-product-item-button-background-green-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-red{background:var(--bal-carousel-product-item-button-background-red)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-red:hover{background:var(--bal-carousel-product-item-button-background-red-hover)}.bal-carousel--product .bal-carousel__item__button--color-red:active{background:var(--bal-carousel-product-item-button-background-red-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-yellow{background:var(--bal-carousel-product-item-button-background-yellow)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-yellow:hover{background:var(--bal-carousel-product-item-button-background-yellow-hover)}.bal-carousel--product .bal-carousel__item__button--color-yellow:active{background:var(--bal-carousel-product-item-button-background-yellow-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-purple{background:var(--bal-carousel-product-item-button-background-purple)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-purple:hover{background:var(--bal-carousel-product-item-button-background-purple-hover)}.bal-carousel--product .bal-carousel__item__button--color-purple:active{background:var(--bal-carousel-product-item-button-background-purple-active)}}.bal-carousel--product .bal-carousel__item__button__image{width:5rem;height:5rem;pointer-events:none}.bal-carousel--product .bal-carousel__item__button__label{font-weight:var(--bal-font-weight-bold);color:var(--bal-carousel-product-item-button-label-text-color);font-size:var(--bal-text-size-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:3.5rem;overflow:hidden;line-height:1.15rem;word-break:break-word}@media screen and (max-width: 768px){.bal-carousel__controls--large{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:100%;gap:2rem;margin-top:1rem}}@media screen and (min-width: 769px),print{.bal-carousel__controls--large .bal-carousel__controls__button{position:absolute;top:calc(50% - 24px);z-index:7}.bal-carousel__controls--large .bal-carousel__controls__button--left{left:0}.bal-carousel__controls--large .bal-carousel__controls__button--right{right:0}}.bal-carousel__controls__button--hidden{display:none !important;visibility:none !important}.bal-carousel__controls--small .bal-carousel__controls__button{position:absolute;top:calc(50% - 1rem);z-index:7}.bal-carousel__controls--small .bal-carousel__controls__button--left{left:0}.bal-carousel__controls--small .bal-carousel__controls__button--right{right:0}.bal-carousel__controls--small .bal-carousel__controls__button--hidden{display:none !important;visibility:hidden !important}';var BalCarouselStyle0=balCarouselCss;var Carousel=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.previousTransformValue=0;this.carouselId="bal-carousel-".concat(CarouselIds++);this.carouselContainerId="bal-carousel-".concat(CarouselIds++,"-container");this.mutationObserverActive=true;this.itemsChanged=debounce((function(){return e.itemsChangedInternal()}),100);this.onPreviousButtonClick=function(){return e.previous()};this.onNextButtonClick=function(){return e.next()};this.onControlChange=function(t){if(t!==e.value){var r=t>e.value;if(r){e.next(t-e.value)}else{e.previous(e.value-t)}}};this.isLargestContentfulPaintDone=false;this.isLastSlideVisible=true;this.isMobile=balBreakpoints.isMobile;this.language=defaultConfig.language;this.value=0;this.steps=1;this.itemsPerView=1;this.controls="none";this.htmlRole="list";this.controlsOverflow=false;this.inverted=false;this.fullHeight=false;this.aspectRatio="16by9";this.interface="";this.controlsSticky=false;this.scrollY=true;this.border=false}t.prototype.componentDidLoad=function(){var t=this;rLCP((function(){t.isLargestContentfulPaintDone=true}))};t.prototype.blockVerticalScrolling=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){if(!this.scrollY&&((e=this.el)===null||e===void 0?void 0:e.contains(t.target))){stopEventBubbling(t)}return[2]}))}))};t.prototype.mutationListener=function(){this.itemsChanged()};t.prototype.swipeListener=function(t){var e=t.left,r=t.right;if(e){this.next()}else if(r){this.previous()}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile;this.itemsChanged()};t.prototype.resizeListener=function(){this.itemsChanged()};t.prototype.listenToKeyDown=function(t){if(this.htmlRole!=="tablist"){if(t.code==="Tab"){if(t.shiftKey){this.focusPreviousItem(t)}else{this.focusNextItem(t)}}}};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;return[2]}))}))};t.prototype.previous=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r,a;if(t===void 0){t=this.steps}return __generator(this,(function(i){switch(i.label){case 0:e=this.value-t;if(e<0){e=0}return[4,this.buildSlide(e)];case 1:r=i.sent();if(!r)return[3,3];return[4,this.animate(r.transformActive,true)];case 2:a=i.sent();if(a||this.value!==e){this.value=e;this.balChange.emit(this.value)}i.label=3;case 3:return[2,r]}}))}))};t.prototype.next=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r,a,i,o;if(t===void 0){t=this.steps}return __generator(this,(function(n){switch(n.label){case 0:e=this.getAllItemElements();r=e.length;a=this.value+t;if(a>=r){a=r-1}return[4,this.buildSlide(a)];case 1:i=n.sent();if(!i)return[3,3];return[4,this.animate(i.transformActive,true)];case 2:o=n.sent();if(o||this.value!==a){this.value=a;this.balChange.emit(this.value)}n.label=3;case 3:return[2,i]}}))}))};t.prototype.animate=function(){return __awaiter(this,arguments,void 0,(function(t,e){var r=this;if(t===void 0){t=0}if(e===void 0){e=true}return __generator(this,(function(a){return[2,new Promise((function(a){if(r.currentRaf!==undefined){cancelAnimationFrame(r.currentRaf)}r.currentRaf=raf((function(){return __awaiter(r,void 0,void 0,(function(){var r,i,o,n,s,l,c,u,d,b,h;return __generator(this,(function(f){switch(f.label){case 0:if(!(this.containerEl&&this.innerEl))return[3,2];return[4,this.buildSlide()];case 1:r=f.sent();if(r){i=this.innerEl.clientWidth||0;o=r.transformNext||0;n=o<=i;s=o-i;l=s<=t;if(this.itemsPerView===3){s=o-i-1;l=s<=t}c=t===0||s<=2;if(c){this.value=0;this.balChange.emit(this.value)}u=this.controls==="small";d=this.controls==="large";b=n?0:l?s:t;if(!c&&!n&&(u||d&&!this.isMobile)){b=b-(l?0:d?56:48)}this.containerEl.style.transitionDuration=e?"0.6s":"0";this.containerEl.style.transform="translate3d(-".concat(b,"px, 0px, 0px)");h=b!==this.previousTransformValue;this.previousTransformValue=b;this.isLastSlideVisible=l;if(this.borderEl){this.borderEl.style.transitionDuration=e?"0.6s":"0";this.borderEl.style.transform="translate3d(".concat(b,"px, 0px, 0px)")}if(!h){return[2,a(false)]}return[2,a(true)]}f.label=2;case 2:return[2]}}))}))}))}))]}))}))};t.prototype.buildSlide=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,a,i;return __generator(this,(function(o){switch(o.label){case 0:e=this.getAllItemElements();r=t===undefined?e.length-1:t;if(!(e.length>r&&r>=0))return[3,2];return[4,this.getAllItemData()];case 1:a=o.sent();i=this.interface==="product"?16:0;return[2,{el:e[r],data:a[r],transformNext:e.filter((function(t,e){return e<r+1})).reduce((function(t,e){return t+getComputedWidth(e)+i}),0),transformActive:e.filter((function(t,e){return e<r})).reduce((function(t,e){return t+getComputedWidth(e)+i}),0),isFirst:r===0,isLast:r===e.length-1,total:e.length,index:r}];case 2:return[2,undefined]}}))}))};t.prototype.itemsChangedInternal=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!this.isLargestContentfulPaintDone)return[3,2];return[4,this.buildSlide(this.value)];case 1:t=e.sent();if(t){this.animate(t.transformActive,false)}e.label=2;case 2:return[2]}}))}))};t.prototype.focusNextItem=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:if(!!this.isLast)return[3,3];return[4,this.next(1)];case 1:e=r.sent();if(!(e&&e.el))return[3,3];stopEventBubbling(t);return[4,e.el.setFocus()];case 2:r.sent();r.label=3;case 3:return[2]}}))}))};t.prototype.focusPreviousItem=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:if(!!this.isFirst)return[3,3];return[4,this.previous(1)];case 1:e=r.sent();if(!(e&&e.el))return[3,3];stopEventBubbling(t);return[4,e.el.setFocus()];case 2:r.sent();r.label=3;case 3:return[2]}}))}))};t.prototype.getAllItemData=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this.getAllItemElements().map((function(t){return t.getData()}));return[4,Promise.all(t)];case 1:return[2,e.sent()]}}))}))};t.prototype.getAllItemElements=function(){return Array.from(this.el.querySelectorAll("bal-carousel-item"))};t.prototype.getAllControlItems=function(){var t=this.getAllItemElements();return t.map((function(t,e){return{value:e,label:t.label}}))};t.prototype.hasShadow=function(){return this.itemsPerView==="auto"||this.itemsPerView>1||this.interface==="card"};t.prototype.hasShadowLeft=function(){return this.hasShadow()&&(this.value!==0||this.interface==="card")};t.prototype.hasShadowRight=function(){return this.hasShadow()&&(!this.isLastSlideVisible||this.interface==="card")};t.prototype.isFirst=function(){return this.value===0};t.prototype.isLast=function(){return this.isLastSlideVisible};t.prototype.render=function(){var t=this;var e=BEM.block("carousel");var r=e.element("inner");var a=r.element("container");var i=i18nControlLabel[this.language].left;var o=i18nControlLabel[this.language].right;var n=this.getAllControlItems();return h(Host,{key:"8f136f31e2fe4fb99703fdd2a5974697cea659b7",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier(this.interface).class(this.interface!=="")),e.modifier("full-height").class(this.fullHeight)),e.modifier("controls-sticky").class(this.controlsSticky)),e.modifier("controls-".concat(this.controls)).class())},this.isLargestContentfulPaintDone&&this.controls==="tabs"?h(TabControl,{value:this.value,items:n,containerId:this.carouselContainerId,onControlChange:function(e){return t.onControlChange(e.value)}}):"",h("div",{key:"76e644a3db07b7aeae2a599b560903a24312cb6b",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r.class()),r.modifier("items-per-view-".concat(this.itemsPerView)).class()),r.modifier("is-".concat(this.aspectRatio)).class()),r.modifier("inverted").class(this.inverted)),r.modifier("full-height").class(this.fullHeight)),r.modifier("shadow-left").class(this.hasShadowLeft())),r.modifier("shadow-right").class(this.hasShadowRight())),ref:function(e){return t.innerEl=e}},h("div",{key:"8040a1b67deccfa135bda7c1b3cef5b05492ad19",role:this.htmlRole,"aria-live":this.htmlRole!==""?"polite":undefined,id:this.carouselContainerId,class:Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("border").class(this.border)),a.modifier("is-".concat(this.aspectRatio)).class()),ref:function(e){return t.containerEl=e}},h("slot",{key:"855f44ac6e8b1cfdfd31cc39f9fd2d9749a2f326"}),this.border?h("div",{id:"".concat(this.carouselId,"-border"),"aria-hidden":"true",class:Object.assign(Object.assign({},a.element("border").class()),a.element("border").modifier("inverted").class(this.inverted)),ref:function(e){return t.borderEl=e}}):"")),this.isLargestContentfulPaintDone&&this.controls==="dots"?h(DotControl,{value:this.value,items:n,containerId:this.carouselContainerId,onControlChange:function(e){return t.onControlChange(e.value)}}):"",this.isLargestContentfulPaintDone&&this.controls==="large"?h(LargeControl,{isFirst:this.isFirst(),isLast:this.isLast(),inverted:this.inverted,areControlsHidden:!this.isMobile,leftControlTitle:i,rightControlTitle:o,containerId:this.carouselContainerId,onNextClick:function(){return t.onNextButtonClick()},onPreviousClick:function(){return t.onPreviousButtonClick()}}):"",this.isLargestContentfulPaintDone&&this.controls==="small"?h(SmallControl,{isFirst:this.isFirst(),isLast:this.isLast(),inverted:this.inverted,leftControlTitle:i,rightControlTitle:o,containerId:this.carouselContainerId,onNextClick:function(){return t.onNextButtonClick()},onPreviousClick:function(){return t.onPreviousButtonClick()}}):"")};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();__decorate([ListenTo("touchmove",{target:"window",passive:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"blockVerticalScrolling",null);__decorate([ListenToMutation({tags:["bal-carousel-item"],characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"mutationListener",null);__decorate([ListenToSwipe(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"swipeListener",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"breakpointListener",null);__decorate([ListenToResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"resizeListener",null);__decorate([ListenTo("keydown"),__metadata("design:type",Function),__metadata("design:paramtypes",[KeyboardEvent]),__metadata("design:returntype",void 0)],Carousel.prototype,"listenToKeyDown",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"configChanged",null);var CarouselIds=0;Carousel.style=BalCarouselStyle0;var CarouselItem=function(){function t(t){var e=this;registerInstance(this,t);this.balNavigate=createEvent(this,"balNavigate",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.imageInheritAttributes={};this.onClick=function(t){if(e.href!==undefined){e.balNavigate.emit(t)}};this.onFocus=function(){e.balFocus.emit()};this.onBlur=function(){e.balBlur.emit()};this.isLargestContentfulPaintDone=false;this.src=undefined;this.label="";this.htmlRole="listitem";this.elementType="button";this.name="";this.value="";this.href=undefined;this.target="_self";this.rel=undefined;this.download=undefined;this.color=undefined}t.prototype.componentDidLoad=function(){var t=this;rLCP((function(){t.isLargestContentfulPaintDone=true}))};t.prototype.componentWillLoad=function(){this.imageInheritAttributes=inheritAttributes(this.el,["alt"])};t.prototype.getData=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,{clientWidth:this.el.clientWidth,label:this.label}]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,waitAfterFramePaint()];case 1:t.sent();if(this.buttonEl){this.buttonEl.focus()}return[2]}}))}))};t.prototype.render=function(){var t=this;var e=BEM.block("carousel");var r=e.element("item");var a=!!this.color&&!!this.label;if(!a){return h(Host,{role:this.htmlRole,class:Object.assign({},r.class())},this.isLargestContentfulPaintDone&&this.src!==undefined?h("img",Object.assign({draggable:false,onDragStart:function(){return false},src:this.src},this.imageInheritAttributes)):"",h("slot",null))}var i=r.element("button");var o=i.element("image");var n=i.element("label");var s=this,l=s.elementType,c=s.download,u=s.href,d=s.rel,b=s.target,f=s.name,_=s.value;var m=this.href===undefined?"button":"a";var p=m==="button"?{type:l,name:f,value:_}:{download:c,href:u,rel:d,target:b};return h(Host,{role:this.htmlRole,class:Object.assign({},r.class())},h(m,Object.assign({},p,{class:Object.assign(Object.assign({},i.class()),i.modifier("color-".concat(this.color)).class()),part:"native",onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,ref:function(e){return t.buttonEl=e}}),this.isLargestContentfulPaintDone&&this.src!==undefined?h("img",Object.assign({class:Object.assign({},o.class()),draggable:false,onDragStart:function(){return false},"aria-hidden":"true",src:this.src},this.imageInheritAttributes)):"",this.label!==undefined?h("span",{class:Object.assign({},n.class())},this.label):"",h("slot",null)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();export{Carousel as bal_carousel,CarouselItem as bal_carousel_item};
|
|
1
|
+
import{__awaiter,__generator}from"tslib";import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-5b1faf93.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{j as debounce,l as rLCP,n as raf,b as waitAfterFramePaint}from"./helpers-72ae7307.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{s as stopEventBubbling}from"./form-input-264ad739.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-a8efc52b.js";import{g as getComputedWidth}from"./style-ca1bd202.js";import{L as ListenTo}from"./listen-d1712e70.js";import{L as ListenToMutation}from"./mutation.decorator-74831883.js";import{L as ListenToSwipe}from"./swipe.decorator-56b6d574.js";import{L as ListenToResize}from"./resize.decorator-f2d8461d.js";import{b as balBreakpoints}from"./breakpoints.subject-0764e6ff.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./listener-04842ae9.js";import"./swipe.subject-683f7c7b.js";import"./device-8c6d2881.js";import"./tokens.esm-69df759d.js";import"./log-dfd1c19f.js";var TabControl=function(t){var e=t.value,r=t.items,a=t.containerId,i=t.onControlChange;var o=BEM.block("carousel");var n=o.element("controls");return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-card",null,h("bal-card-content",null,r.map((function(t){return h("bal-button",{"aria-controls":a,key:t.value,expanded:true,color:e===t.value?"primary":"light",onClick:function(){return i(t)}},t.label)})))))};var DotControl=function(t){var e=t.value,r=t.items,a=t.containerId,i=t.onControlChange;var o=BEM.block("carousel");var n=o.element("controls");var s=function(t){var e=t.detail-1;if(e<0){e=0}if(e>=r.length){e=r.length-1}i(r[e])};return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-pagination",{"aria-controls":a,interface:"small",value:e+1,totalPages:r.length,onBalChange:s}))};var LargeControl=function(t){var e=t.isFirst,r=t.isLast,a=t.inverted,i=t.areControlsHidden,o=t.onNextClick,n=t.onPreviousClick,s=t.containerId,l=t.leftControlTitle,c=t.rightControlTitle;var u=BEM.block("carousel");var d=u.element("controls");var b=d.element("button");return h("div",{"data-mutation":"false",class:Object.assign(Object.assign({},d.class()),d.modifier("large").class())},h("bal-button",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("left").class()),b.modifier("hidden").class(e&&i)),"aria-controls":s,square:true,icon:"nav-go-left",rounded:true,inverted:a,onClick:function(){return n()},disabled:e,"aria-hidden":e&&i?"true":null,"data-testid":"bal-carousel-control-left",title:l}),h("bal-button",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("right").class()),b.modifier("hidden").class(r&&i)),"aria-controls":s,square:true,icon:"nav-go-right",rounded:true,inverted:a,onClick:function(){return o()},disabled:r,"aria-hidden":r&&i?"true":null,"data-testid":"bal-carousel-control-right",title:c}))};var SmallControl=function(t){var e=t.isFirst,r=t.isLast,a=t.inverted,i=t.leftControlTitle,o=t.rightControlTitle,n=t.containerId,s=t.onNextClick,l=t.onPreviousClick;var c=BEM.block("carousel");var u=c.element("controls");var d=u.element("button");return h("div",{class:Object.assign(Object.assign({},u.class()),u.modifier("small").class())},h("bal-button",{class:Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("left").class()),d.modifier("hidden").class(e)),"aria-controls":n,square:true,size:"small",icon:"nav-go-left",rounded:true,inverted:a,onClick:function(){return l()},disabled:e,"aria-hidden":e?"true":null,tabindex:"-1","data-testid":"bal-carousel-control-left",title:i}),h("bal-button",{class:Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("right").class()),d.modifier("hidden").class(r)),"aria-controls":n,square:true,size:"small",icon:"nav-go-right",rounded:true,inverted:a,onClick:function(){return s()},disabled:r,"aria-hidden":r?"true":null,tabindex:"-1","data-testid":"bal-carousel-control-right",title:o}))};var i18nControlLabel={de:{left:"vorherige",right:"nächste"},en:{left:"previous",right:"next"},fr:{left:"précédent",right:"suivant"},it:{left:"precedente",right:"successivo"},nl:{left:"vorige",right:"volgende"},es:{left:"anterior",right:"siguiente"},pl:{left:"poprzedni",right:"następny"},pt:{left:"anterior",right:"próximo"},sv:{left:"föregående",right:"nästa"},fi:{left:"edellinen",right:"seuraava"}};var balCarouselCss=':root{--bal-carousel-inner-border-background:var(--bal-color-border);--bal-carousel-inner-border-background-inverted:var(--bal-color-border-primary-light);--bal-carousel-inner-shadow-left-background-before:var(--bal-color-white);--bal-carousel-inner-shadow-right-background-after:var(--bal-color-white);--bal-carousel-inner-shadow-left-background-inverted-before:var(--bal-color-primary);--bal-carousel-inner-shadow-right-background-inverted-after:var(--bal-color-primary);--bal-carousel-product-item-button-background:var(--bal-color-white);--bal-carousel-product-item-button-background-green:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-hover:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-active:var(--bal-color-green-2);--bal-carousel-product-item-button-background-red:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-hover:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-active:var(--bal-color-red-2);--bal-carousel-product-item-button-background-yellow:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-hover:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-active:var(--bal-color-yellow-2);--bal-carousel-product-item-button-background-purple:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-hover:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-active:var(--bal-color-purple-2);--bal-carousel-inner-border-radius:var(--bal-radius-rounded);--bal-carousel-image-border-radius:var(--bal-radius-normal);--bal-carousel-product-item-button-border-radius:var(--bal-radius-large);--bal-carousel-product-item-button-label-text-color:var(--bal-color-text-primary);--bal-carousel-sticky-top:0}.bal-carousel{display:block;position:relative}.bal-carousel__inner{display:block;position:relative;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;-ms-touch-action:pan-y;touch-action:pan-y}.bal-carousel--full-height{height:100%}.bal-carousel__inner--full-height{height:100%}.bal-carousel__inner__container{position:relative;width:100%;height:100%;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-duration:0ms;transition-duration:0ms;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container--border{padding-bottom:var(--bal-border-width-normal)}.bal-carousel__inner__container__border{position:absolute;background:var(--bal-carousel-inner-border-background);border-radius:var(--bal-carousel-inner-border-radius);height:var(--bal-border-width-normal);width:100%;bottom:0;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container__border--inverted{background:var(--bal-carousel-inner-border-background-inverted)}.bal-carousel__item{text-align:center;font-size:var(--bal-text-size-large);min-height:2rem;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.bal-carousel__inner--shadow-left::before,.bal-carousel__inner--shadow-right::after{position:absolute;width:3rem;height:100%;top:0}.bal-carousel__inner--shadow-left::before{content:"";left:0;background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-carousel__inner--shadow-right::after{content:"";right:0;background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-after) 50%)}.bal-carousel__inner--shadow-left.bal-carousel__inner--inverted::before{background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-inverted-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-inverted-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-carousel__inner--shadow-right.bal-carousel__inner--inverted::after{background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-inverted-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel__inner--items-per-view-auto .bal-carousel__item{width:auto}.bal-carousel__inner--items-per-view-1 .bal-carousel__item{width:100%}.bal-carousel__inner--items-per-view-2 .bal-carousel__item{width:50%}.bal-carousel__inner--items-per-view-3 .bal-carousel__item{width:33.3333%}.bal-carousel__inner--items-per-view-4 .bal-carousel__item{width:25%}.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:2.5rem}}@media screen and (min-width: 1024px){.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:3rem}}.bal-carousel--card{margin-left:-1rem;margin-right:-1rem}@media screen and (min-width: 769px),print{.bal-carousel--card{margin-left:-2.5rem;margin-right:-2.5rem}}.bal-carousel--card .bal-carousel__controls{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__controls{padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--card .bal-carousel__item{width:calc(100% - 2rem);padding-top:1rem;padding-bottom:1rem;padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__item{width:calc(100% - 5rem);padding-top:2.5rem;padding-bottom:2.5rem;padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--controls-sticky .bal-carousel__controls--tabs{position:-webkit-sticky;position:sticky;top:var(--bal-carousel-sticky-top);z-index:var(--bal-z-index-sticky)}.bal-carousel__controls--tabs .bal-card{padding:0}.bal-carousel__controls--tabs .bal-card-content{padding:.5rem !important;gap:.5rem;display:-ms-flexbox;display:flex}.bal-carousel__controls--tabs .bal-card-content .bal-button{-ms-flex:1;flex:1}.bal-carousel__controls--tabs .bal-card-content .bal-button .button{padding:.5rem !important}.bal-carousel--image .bal-carousel__inner{border-radius:var(--bal-carousel-image-border-radius)}.bal-carousel--image .bal-carousel__inner--is-1by1{padding-top:100%}.bal-carousel--image .bal-carousel__inner--is-16by9{padding-top:56.25%}.bal-carousel--image .bal-carousel__inner--is-3by2{padding-top:66.66%}.bal-carousel--image .bal-carousel__inner--is-4by3{padding-top:75%}.bal-carousel--image .bal-carousel__inner__container{position:absolute;top:0;left:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%}.bal-carousel--image .bal-carousel__item{position:relative;-ms-flex:0 0 100%;flex:0 0 100%}.bal-carousel--image .bal-carousel__item>img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-drag:none;user-zoom:fixed}.bal-carousel--product .bal-carousel__inner__container{gap:1rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-carousel--product .bal-carousel__item{display:-ms-flexbox;display:flex;width:10rem;height:11rem;text-align:center;padding-top:.5rem;padding-bottom:.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item__button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:1rem;border-radius:var(--bal-carousel-product-item-button-border-radius);padding:var(--bal-text-size-x-small);border:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;background:var(--bal-carousel-product-item-button-background)}@media (hover: hover)and (pointer: fine){.bal-carousel--product .bal-carousel__item__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-green{background:var(--bal-carousel-product-item-button-background-green)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-green:hover{background:var(--bal-carousel-product-item-button-background-green-hover)}.bal-carousel--product .bal-carousel__item__button--color-green:active{background:var(--bal-carousel-product-item-button-background-green-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-red{background:var(--bal-carousel-product-item-button-background-red)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-red:hover{background:var(--bal-carousel-product-item-button-background-red-hover)}.bal-carousel--product .bal-carousel__item__button--color-red:active{background:var(--bal-carousel-product-item-button-background-red-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-yellow{background:var(--bal-carousel-product-item-button-background-yellow)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-yellow:hover{background:var(--bal-carousel-product-item-button-background-yellow-hover)}.bal-carousel--product .bal-carousel__item__button--color-yellow:active{background:var(--bal-carousel-product-item-button-background-yellow-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-purple{background:var(--bal-carousel-product-item-button-background-purple)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-purple:hover{background:var(--bal-carousel-product-item-button-background-purple-hover)}.bal-carousel--product .bal-carousel__item__button--color-purple:active{background:var(--bal-carousel-product-item-button-background-purple-active)}}.bal-carousel--product .bal-carousel__item__button__image{width:5rem;height:5rem;pointer-events:none}.bal-carousel--product .bal-carousel__item__button__label{font-weight:var(--bal-font-weight-bold);color:var(--bal-carousel-product-item-button-label-text-color);font-size:var(--bal-text-size-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:3.5rem;overflow:hidden;line-height:1.15rem;word-break:break-word}@media screen and (max-width: 768px){.bal-carousel__controls--large{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:100%;gap:2rem;margin-top:1rem}}@media screen and (min-width: 769px),print{.bal-carousel__controls--large .bal-carousel__controls__button{position:absolute;top:calc(50% - 24px);z-index:7}.bal-carousel__controls--large .bal-carousel__controls__button--left{left:0}.bal-carousel__controls--large .bal-carousel__controls__button--right{right:0}}.bal-carousel__controls__button--hidden{display:none !important;visibility:none !important}.bal-carousel__controls--small .bal-carousel__controls__button{position:absolute;top:calc(50% - 1rem);z-index:7}.bal-carousel__controls--small .bal-carousel__controls__button--left{left:0}.bal-carousel__controls--small .bal-carousel__controls__button--right{right:0}.bal-carousel__controls--small .bal-carousel__controls__button--hidden{display:none !important;visibility:hidden !important}';var BalCarouselStyle0=balCarouselCss;var Carousel=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.previousTransformValue=0;this.carouselId="bal-carousel-".concat(CarouselIds++);this.carouselContainerId="bal-carousel-".concat(CarouselIds++,"-container");this.mutationObserverActive=true;this.itemsChanged=debounce((function(){return e.itemsChangedInternal()}),100);this.onPreviousButtonClick=function(){return e.previous()};this.onNextButtonClick=function(){return e.next()};this.onControlChange=function(t){if(t!==e.value){var r=t>e.value;if(r){e.next(t-e.value)}else{e.previous(e.value-t)}}};this.isLargestContentfulPaintDone=false;this.isLastSlideVisible=true;this.isMobile=balBreakpoints.isMobile;this.language=defaultConfig.language;this.value=0;this.steps=1;this.itemsPerView=1;this.controls="none";this.htmlRole="list";this.controlsOverflow=false;this.inverted=false;this.fullHeight=false;this.aspectRatio="16by9";this.interface="";this.controlsSticky=false;this.scrollY=true;this.border=false}t.prototype.componentDidLoad=function(){var t=this;rLCP((function(){t.isLargestContentfulPaintDone=true}))};t.prototype.blockVerticalScrolling=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){if(!this.scrollY&&((e=this.el)===null||e===void 0?void 0:e.contains(t.target))){stopEventBubbling(t)}return[2]}))}))};t.prototype.mutationListener=function(){this.itemsChanged()};t.prototype.swipeListener=function(t){var e=t.left,r=t.right;if(e){this.next()}else if(r){this.previous()}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile;this.itemsChanged()};t.prototype.resizeListener=function(){this.itemsChanged()};t.prototype.listenToKeyDown=function(t){if(this.htmlRole!=="tablist"){if(t.code==="Tab"){if(t.shiftKey){this.focusPreviousItem(t)}else{this.focusNextItem(t)}}}};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;return[2]}))}))};t.prototype.previous=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r,a;if(t===void 0){t=this.steps}return __generator(this,(function(i){switch(i.label){case 0:e=this.value-t;if(e<0){e=0}return[4,this.buildSlide(e)];case 1:r=i.sent();if(!r)return[3,3];return[4,this.animate(r.transformActive,true)];case 2:a=i.sent();if(a||this.value!==e){this.value=e;this.balChange.emit(this.value)}i.label=3;case 3:return[2,r]}}))}))};t.prototype.next=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r,a,i,o;if(t===void 0){t=this.steps}return __generator(this,(function(n){switch(n.label){case 0:e=this.getAllItemElements();r=e.length;a=this.value+t;if(a>=r){a=r-1}return[4,this.buildSlide(a)];case 1:i=n.sent();if(!i)return[3,3];return[4,this.animate(i.transformActive,true)];case 2:o=n.sent();if(o||this.value!==a){this.value=a;this.balChange.emit(this.value)}n.label=3;case 3:return[2,i]}}))}))};t.prototype.animate=function(){return __awaiter(this,arguments,void 0,(function(t,e){var r=this;if(t===void 0){t=0}if(e===void 0){e=true}return __generator(this,(function(a){return[2,new Promise((function(a){if(r.currentRaf!==undefined){cancelAnimationFrame(r.currentRaf)}r.currentRaf=raf((function(){return __awaiter(r,void 0,void 0,(function(){var r,i,o,n,s,l,c,u,d,b,h;return __generator(this,(function(f){switch(f.label){case 0:if(!(this.containerEl&&this.innerEl))return[3,2];return[4,this.buildSlide()];case 1:r=f.sent();if(r){i=this.innerEl.clientWidth||0;o=r.transformNext||0;n=o<=i;s=o-i;l=s<=t;if(this.itemsPerView===3){s=o-i-1;l=s<=t}c=t===0||s<=2;if(c){this.value=0;this.balChange.emit(this.value)}u=this.controls==="small";d=this.controls==="large";b=n?0:l?s:t;if(!c&&!n&&(u||d&&!this.isMobile)){b=b-(l?0:d?56:48)}this.containerEl.style.transitionDuration=e?"0.6s":"0";this.containerEl.style.transform="translate3d(-".concat(b,"px, 0px, 0px)");h=b!==this.previousTransformValue;this.previousTransformValue=b;this.isLastSlideVisible=l;if(this.borderEl){this.borderEl.style.transitionDuration=e?"0.6s":"0";this.borderEl.style.transform="translate3d(".concat(b,"px, 0px, 0px)")}if(!h){return[2,a(false)]}return[2,a(true)]}f.label=2;case 2:return[2]}}))}))}))}))]}))}))};t.prototype.buildSlide=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,a,i;return __generator(this,(function(o){switch(o.label){case 0:e=this.getAllItemElements();r=t===undefined?e.length-1:t;if(!(e.length>r&&r>=0))return[3,2];return[4,this.getAllItemData()];case 1:a=o.sent();i=this.interface==="product"?16:0;return[2,{el:e[r],data:a[r],transformNext:e.filter((function(t,e){return e<r+1})).reduce((function(t,e){return t+getComputedWidth(e)+i}),0),transformActive:e.filter((function(t,e){return e<r})).reduce((function(t,e){return t+getComputedWidth(e)+i}),0),isFirst:r===0,isLast:r===e.length-1,total:e.length,index:r}];case 2:return[2,undefined]}}))}))};t.prototype.itemsChangedInternal=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!this.isLargestContentfulPaintDone)return[3,2];return[4,this.buildSlide(this.value)];case 1:t=e.sent();if(t){this.animate(t.transformActive,false)}e.label=2;case 2:return[2]}}))}))};t.prototype.focusNextItem=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:if(!!this.isLast)return[3,3];return[4,this.next(1)];case 1:e=r.sent();if(!(e&&e.el))return[3,3];stopEventBubbling(t);return[4,e.el.setFocus()];case 2:r.sent();r.label=3;case 3:return[2]}}))}))};t.prototype.focusPreviousItem=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:if(!!this.isFirst)return[3,3];return[4,this.previous(1)];case 1:e=r.sent();if(!(e&&e.el))return[3,3];stopEventBubbling(t);return[4,e.el.setFocus()];case 2:r.sent();r.label=3;case 3:return[2]}}))}))};t.prototype.getAllItemData=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this.getAllItemElements().map((function(t){return t.getData()}));return[4,Promise.all(t)];case 1:return[2,e.sent()]}}))}))};t.prototype.getAllItemElements=function(){return Array.from(this.el.querySelectorAll("bal-carousel-item"))};t.prototype.getAllControlItems=function(){var t=this.getAllItemElements();return t.map((function(t,e){return{value:e,label:t.label}}))};t.prototype.hasShadow=function(){return this.itemsPerView==="auto"||this.itemsPerView>1||this.interface==="card"};t.prototype.hasShadowLeft=function(){return this.hasShadow()&&(this.value!==0||this.interface==="card")};t.prototype.hasShadowRight=function(){return this.hasShadow()&&(!this.isLastSlideVisible||this.interface==="card")};t.prototype.isFirst=function(){return this.value===0};t.prototype.isLast=function(){return this.isLastSlideVisible};t.prototype.render=function(){var t=this;var e=BEM.block("carousel");var r=e.element("inner");var a=r.element("container");var i=i18nControlLabel[this.language].left;var o=i18nControlLabel[this.language].right;var n=this.getAllControlItems();return h(Host,{key:"9805dc838ffaf76bf0db144968685dd4c8483816",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier(this.interface).class(this.interface!=="")),e.modifier("full-height").class(this.fullHeight)),e.modifier("controls-sticky").class(this.controlsSticky)),e.modifier("controls-".concat(this.controls)).class())},this.isLargestContentfulPaintDone&&this.controls==="tabs"?h(TabControl,{value:this.value,items:n,containerId:this.carouselContainerId,onControlChange:function(e){return t.onControlChange(e.value)}}):"",h("div",{key:"dced19705178ae9cdca9ab3594793ed9b86d0a9f",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r.class()),r.modifier("items-per-view-".concat(this.itemsPerView)).class()),r.modifier("is-".concat(this.aspectRatio)).class()),r.modifier("inverted").class(this.inverted)),r.modifier("full-height").class(this.fullHeight)),r.modifier("shadow-left").class(this.hasShadowLeft())),r.modifier("shadow-right").class(this.hasShadowRight())),ref:function(e){return t.innerEl=e}},h("div",{key:"64b95814c1bba169bab81a1384a2d753dfcf964d",role:this.htmlRole,"aria-live":this.htmlRole!==""?"polite":undefined,id:this.carouselContainerId,class:Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("border").class(this.border)),a.modifier("is-".concat(this.aspectRatio)).class()),ref:function(e){return t.containerEl=e}},h("slot",{key:"2baee20f00ff09cc771ba6743bff97f62a1a7570"}),this.border?h("div",{id:"".concat(this.carouselId,"-border"),"aria-hidden":"true",class:Object.assign(Object.assign({},a.element("border").class()),a.element("border").modifier("inverted").class(this.inverted)),ref:function(e){return t.borderEl=e}}):"")),this.isLargestContentfulPaintDone&&this.controls==="dots"?h(DotControl,{value:this.value,items:n,containerId:this.carouselContainerId,onControlChange:function(e){return t.onControlChange(e.value)}}):"",this.isLargestContentfulPaintDone&&this.controls==="large"?h(LargeControl,{isFirst:this.isFirst(),isLast:this.isLast(),inverted:this.inverted,areControlsHidden:!this.isMobile,leftControlTitle:i,rightControlTitle:o,containerId:this.carouselContainerId,onNextClick:function(){return t.onNextButtonClick()},onPreviousClick:function(){return t.onPreviousButtonClick()}}):"",this.isLargestContentfulPaintDone&&this.controls==="small"?h(SmallControl,{isFirst:this.isFirst(),isLast:this.isLast(),inverted:this.inverted,leftControlTitle:i,rightControlTitle:o,containerId:this.carouselContainerId,onNextClick:function(){return t.onNextButtonClick()},onPreviousClick:function(){return t.onPreviousButtonClick()}}):"")};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();__decorate([ListenTo("touchmove",{target:"window",passive:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"blockVerticalScrolling",null);__decorate([ListenToMutation({tags:["bal-carousel-item"],characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"mutationListener",null);__decorate([ListenToSwipe(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"swipeListener",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"breakpointListener",null);__decorate([ListenToResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"resizeListener",null);__decorate([ListenTo("keydown"),__metadata("design:type",Function),__metadata("design:paramtypes",[KeyboardEvent]),__metadata("design:returntype",void 0)],Carousel.prototype,"listenToKeyDown",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"configChanged",null);var CarouselIds=0;Carousel.style=BalCarouselStyle0;var CarouselItem=function(){function t(t){var e=this;registerInstance(this,t);this.balNavigate=createEvent(this,"balNavigate",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.imageInheritAttributes={};this.onClick=function(t){if(e.href!==undefined){e.balNavigate.emit(t)}};this.onFocus=function(){e.balFocus.emit()};this.onBlur=function(){e.balBlur.emit()};this.isLargestContentfulPaintDone=false;this.src=undefined;this.label="";this.htmlRole="listitem";this.elementType="button";this.name="";this.value="";this.href=undefined;this.target="_self";this.rel=undefined;this.download=undefined;this.color=undefined}t.prototype.componentDidLoad=function(){var t=this;rLCP((function(){t.isLargestContentfulPaintDone=true}))};t.prototype.componentWillLoad=function(){this.imageInheritAttributes=inheritAttributes(this.el,["alt"])};t.prototype.getData=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,{clientWidth:this.el.clientWidth,label:this.label}]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,waitAfterFramePaint()];case 1:t.sent();if(this.buttonEl){this.buttonEl.focus()}return[2]}}))}))};t.prototype.render=function(){var t=this;var e=BEM.block("carousel");var r=e.element("item");var a=!!this.color&&!!this.label;if(!a){return h(Host,{role:this.htmlRole,class:Object.assign({},r.class())},this.isLargestContentfulPaintDone&&this.src!==undefined?h("img",Object.assign({draggable:false,onDragStart:function(){return false},src:this.src},this.imageInheritAttributes)):"",h("slot",null))}var i=r.element("button");var o=i.element("image");var n=i.element("label");var s=this,l=s.elementType,c=s.download,u=s.href,d=s.rel,b=s.target,f=s.name,_=s.value;var m=this.href===undefined?"button":"a";var p=m==="button"?{type:l,name:f,value:_}:{download:c,href:u,rel:d,target:b};return h(Host,{role:this.htmlRole,class:Object.assign({},r.class())},h(m,Object.assign({},p,{class:Object.assign(Object.assign({},i.class()),i.modifier("color-".concat(this.color)).class()),part:"native",onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,ref:function(e){return t.buttonEl=e}}),this.isLargestContentfulPaintDone&&this.src!==undefined?h("img",Object.assign({class:Object.assign({},o.class()),draggable:false,onDragStart:function(){return false},"aria-hidden":"true",src:this.src},this.imageInheritAttributes)):"",this.label!==undefined?h("span",{class:Object.assign({},n.class())},this.label):"",h("slot",null)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();export{Carousel as bal_carousel,CarouselItem as bal_carousel_item};
|