@baloise/ds-core 18.1.0 → 18.2.0-nightly.20250326
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/all.d.ts +2 -0
- package/components/all.js +3 -0
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-list-item2.js +4 -2
- package/components/bal-nav.js +8 -6
- package/components/bal-navbar-brand.js +4 -2
- package/components/bal-select2.js +10 -10
- package/components/bal-stage-back-link.js +4 -2
- package/components/bal-step-item.js +5 -2
- package/components/bal-steps.js +1 -1
- package/components/index.js +7 -314
- package/components/initialize.js +312 -0
- package/components/mutation.decorator.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/p-0395231a99.entry.js +1 -0
- package/dist/baloise-design-system/{p-6d1f5b32f2.entry.js → p-0724c5fc39.entry.js} +1 -1
- package/dist/baloise-design-system/{p-93d7df5c6d.entry.js → p-0ad80f603a.entry.js} +1 -1
- package/dist/baloise-design-system/p-12cc39fd81.entry.js +1 -0
- package/dist/baloise-design-system/p-12fd353c67.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-01db36ea75.entry.js → p-132c035180.entry.js} +1 -1
- package/dist/baloise-design-system/{p-597ab81cc5.system.entry.js → p-13ef392379.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-16ee87c645.entry.js +1 -0
- package/dist/baloise-design-system/p-1e142b10.system.js +1 -0
- package/dist/baloise-design-system/{p-4ad178aba6.system.entry.js → p-1fca1b86d7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-02116878a7.entry.js → p-225aca33c2.entry.js} +1 -1
- package/dist/baloise-design-system/p-253668db69.entry.js +1 -0
- package/dist/baloise-design-system/{p-b40e313eda.system.entry.js → p-264b84a616.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-01d5d4831c.system.entry.js → p-282f238b03.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-294f38c2.js +1 -0
- package/dist/baloise-design-system/{p-0e764d05.system.js → p-2cf54680.system.js} +1 -1
- package/dist/baloise-design-system/{p-6454bcbea8.entry.js → p-320e8d5293.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b52edbdfd9.entry.js → p-36f2bf9c2d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ebae74f9d4.system.entry.js → p-380ca15c13.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-3913c6ae.js +1 -1
- package/dist/baloise-design-system/{p-3aacf427.system.js → p-3a7bab99.system.js} +1 -1
- package/dist/baloise-design-system/{p-bcdc73ad.system.js → p-3d9fa849.system.js} +1 -1
- package/dist/baloise-design-system/p-400bbebf71.entry.js +1 -0
- package/dist/baloise-design-system/p-42e66219.system.js +1 -0
- package/dist/baloise-design-system/p-47f0669a.js +1 -0
- package/dist/baloise-design-system/{p-54493c5289.system.entry.js → p-4bc159376b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bc5e76952e.entry.js → p-4c9ac6263c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fce9274127.system.entry.js → p-4e7c82ad7e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7bec4431.system.js → p-5298de0e.system.js} +1 -1
- package/dist/baloise-design-system/p-541e16db86.system.entry.js +1 -0
- package/dist/baloise-design-system/p-659ecadc.system.js +1 -1
- package/dist/baloise-design-system/{p-945ab6b2ac.system.entry.js → p-6be3a3b641.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ab4b82d7f1.system.entry.js → p-7f62bccd50.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-456114b8.system.js → p-83512f21.system.js} +1 -1
- package/dist/baloise-design-system/{p-4cac86d6.js → p-83ac9b11.js} +1 -1
- package/dist/baloise-design-system/{p-b5efe0d316.entry.js → p-8437f370bf.entry.js} +1 -1
- package/dist/baloise-design-system/{p-de9f9b8bb2.system.entry.js → p-869a6d4d84.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cc6d9a72.js → p-932e616a.js} +1 -1
- package/dist/baloise-design-system/{p-2240314a30.entry.js → p-943a238763.entry.js} +1 -1
- package/dist/baloise-design-system/{p-316efc7003.system.entry.js → p-9b9a37274f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-75bb9a489c.system.entry.js → p-a21fb35332.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-26ce82e216.entry.js → p-a695e1a456.entry.js} +1 -1
- package/dist/baloise-design-system/p-a70f415677.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-57e1067192.system.entry.js → p-b4b88e4c03.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b232c63512.system.entry.js → p-beb74e3f57.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bfb6c67686.entry.js +1 -0
- package/dist/baloise-design-system/{p-c78452b9c8.entry.js → p-c5240bee3a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-886ba68a.js → p-ce441ff9.js} +1 -1
- package/dist/baloise-design-system/p-dce0104d78.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-fa2fc18e.js → p-dd9ed526.js} +1 -1
- package/dist/baloise-design-system/{p-d2c1ffb4.system.js → p-e9ed304e.system.js} +1 -1
- package/dist/baloise-design-system/{p-2afffcefff.entry.js → p-f647cac833.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bcb7267a32.entry.js → p-f6b687740a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e53b8d198d.system.entry.js → p-fa727288c4.system.entry.js} +1 -1
- package/dist/cjs/app-globals-f63c33e7.js +7 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- 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 -5
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +12 -10
- package/dist/cjs/bal-navbar_5.cjs.entry.js +6 -5
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- 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 +4 -4
- package/dist/cjs/bal-select_2.cjs.entry.js +10 -10
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +3 -2
- package/dist/cjs/bal-step-item.cjs.entry.js +4 -2
- package/dist/cjs/bal-steps.cjs.entry.js +5 -5
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-d9acbe93.js → breakpoints.decorator-d8b784bf.js} +1 -1
- package/dist/cjs/{breakpoints.subject-d32ef910.js → breakpoints.subject-8d48bde5.js} +1 -1
- package/dist/cjs/{app-globals-0d8db19e.js → global-2a76769b.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-2e8978a4.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{mutation.decorator-84b44cab.js → mutation.decorator-485e250e.js} +1 -1
- package/dist/cjs/{tokens.esm-bb7102ae.js → tokens.esm-470152c6.js} +1 -1
- package/dist/cjs/{window-resize.decorator-e5134724.js → window-resize.decorator-27d53349.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-list/bal-list-item/bal-list-item.js +24 -4
- package/dist/collection/components/bal-nav/components/accordion-button.js +2 -2
- package/dist/collection/components/bal-nav/components/overview-link.js +1 -1
- package/dist/collection/components/bal-nav/components/section-list.js +2 -2
- package/dist/collection/components/bal-nav/components/service-list.js +2 -2
- package/dist/collection/components/bal-nav/models/bal-nav-link-item.js +3 -1
- package/dist/collection/components/bal-nav/models/bal-nav-section-link-item.js +2 -2
- package/dist/collection/components/bal-nav/models/bal-nav-service-link-item.js +1 -1
- package/dist/collection/components/bal-navbar/bal-navbar-brand/bal-navbar-brand.js +23 -3
- package/dist/collection/components/bal-select/bal-select.js +10 -10
- package/dist/collection/components/bal-stage/bal-stage-back-link/bal-stage-back-link.js +22 -2
- package/dist/collection/components/bal-steps/bal-step-item/bal-step-item.js +24 -3
- package/dist/collection/components/bal-steps/components/step-button.js +1 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +1 -0
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +247 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/mutation/mutation.listener.js +1 -1
- package/dist/esm/app-globals-1ecf000f.js +5 -0
- package/dist/esm/bal-carousel_2.entry.js +4 -4
- package/dist/esm/bal-checkbox_2.entry.js +1 -1
- package/dist/esm/bal-doc-app.entry.js +229 -0
- 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 -5
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +12 -10
- package/dist/esm/bal-navbar_5.entry.js +6 -5
- package/dist/esm/bal-pagination.entry.js +3 -3
- 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 +4 -4
- package/dist/esm/bal-select_2.entry.js +10 -10
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +3 -2
- package/dist/esm/bal-step-item.entry.js +4 -2
- package/dist/esm/bal-steps.entry.js +5 -5
- package/dist/esm/bal-tab-item_2.entry.js +4 -4
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-21aa6099.js → breakpoints.decorator-3eb14754.js} +1 -1
- package/dist/esm/{breakpoints.subject-2ddcb3fc.js → breakpoints.subject-b455ba7a.js} +1 -1
- package/dist/esm/{app-globals-5dd5fe6b.js → global-6e86728b.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-be160cc4.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{mutation.decorator-a8bfa55f.js → mutation.decorator-e915d053.js} +1 -1
- package/dist/esm/{tokens.esm-2a14112a.js → tokens.esm-083ba79e.js} +1 -1
- package/dist/esm/{window-resize.decorator-a356c751.js → window-resize.decorator-3cf6867d.js} +1 -1
- package/dist/esm-es5/app-globals-1ecf000f.js +1 -0
- 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-doc-app.entry.js +1 -0
- 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-select_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-step-item.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/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-21aa6099.js → breakpoints.decorator-3eb14754.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-2ddcb3fc.js → breakpoints.subject-b455ba7a.js} +1 -1
- package/dist/esm-es5/global-6e86728b.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-be160cc4.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{mutation.decorator-a8bfa55f.js → mutation.decorator-e915d053.js} +1 -1
- package/dist/esm-es5/{window-resize.decorator-a356c751.js → window-resize.decorator-3cf6867d.js} +1 -1
- package/dist/html.html-data.json +16 -0
- package/dist/types/components/bal-list/bal-list-item/bal-list-item.d.ts +7 -2
- package/dist/types/components/bal-nav/bal-nav.interfaces.d.ts +2 -0
- package/dist/types/components/bal-nav/components/accordion-button.d.ts +1 -0
- package/dist/types/components/bal-nav/models/bal-nav-link-item.d.ts +1 -0
- package/dist/types/components/bal-nav/models/bal-nav-section-link-item.d.ts +1 -1
- package/dist/types/components/bal-navbar/bal-navbar-brand/bal-navbar-brand.d.ts +5 -0
- package/dist/types/components/bal-stage/bal-stage-back-link/bal-stage-back-link.d.ts +5 -0
- package/dist/types/components/bal-steps/bal-step-item/bal-step-item.d.ts +6 -0
- package/dist/types/components/bal-steps/bal-step.type.d.ts +1 -0
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +69 -0
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
- package/package.json +6 -6
- package/dist/baloise-design-system/p-002d7bb9.js +0 -1
- package/dist/baloise-design-system/p-2f46adf2d0.entry.js +0 -1
- package/dist/baloise-design-system/p-345aa92d.system.js +0 -1
- package/dist/baloise-design-system/p-36d8ef03de.entry.js +0 -1
- package/dist/baloise-design-system/p-4504bc9205.system.entry.js +0 -1
- package/dist/baloise-design-system/p-7d24c607ec.system.entry.js +0 -1
- package/dist/baloise-design-system/p-957d43447d.entry.js +0 -1
- package/dist/baloise-design-system/p-9f85ccf908.entry.js +0 -1
- package/dist/baloise-design-system/p-aa2b2147a2.entry.js +0 -1
- package/dist/baloise-design-system/p-e59cf0bb7e.system.entry.js +0 -1
- package/dist/esm-es5/app-globals-5dd5fe6b.js +0 -1
- /package/dist/baloise-design-system/{p-a6df630b.system.js → p-1f0f307a.system.js} +0 -0
- /package/dist/baloise-design-system/{p-e97f3e9b.js → p-35520b2b.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-2a14112a.js → tokens.esm-083ba79e.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
3
|
import { B as BEM } from './bem.js';
|
|
4
|
-
import { L as Logger } from './log.js';
|
|
5
4
|
import { n as raf, t as transitionEndAsync } from './helpers.js';
|
|
5
|
+
import { L as Logger } from './log.js';
|
|
6
6
|
import { L as ListenToConfig } from './config.decorator.js';
|
|
7
7
|
|
|
8
8
|
const ListItem = /*@__PURE__*/ proxyCustomElement(class ListItem extends HTMLElement {
|
|
@@ -165,6 +165,7 @@ const ListItem = /*@__PURE__*/ proxyCustomElement(class ListItem extends HTMLEle
|
|
|
165
165
|
this.accordion = false;
|
|
166
166
|
this.subAccordionItem = false;
|
|
167
167
|
this.href = '';
|
|
168
|
+
this.rel = undefined;
|
|
168
169
|
this.target = '_self';
|
|
169
170
|
this.download = undefined;
|
|
170
171
|
}
|
|
@@ -240,7 +241,7 @@ const ListItem = /*@__PURE__*/ proxyCustomElement(class ListItem extends HTMLEle
|
|
|
240
241
|
const trigger = item.element('trigger');
|
|
241
242
|
const basicClasses = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, item.class()), item.modifier('disabled').class(this.disabled)), item.modifier('selected').class(this.selected)), item.modifier('animated').class(this.animated)), item.modifier('accordion').class(this.accordion)), item.modifier('sub-accordion').class(this.subAccordionItem)), item.modifier('active').class(this.accordionOpen)), item.modifier('expanding').class(this.state === 8 /* AccordionState.Expanding */)), item.modifier('expanded').class(this.state === 4 /* AccordionState.Expanded */)), item.modifier('collapsing').class(this.state === 2 /* AccordionState.Collapsing */)), item.modifier('collapsed').class(this.state === 1 /* AccordionState.Collapsed */)), item.modifier('clickable').class(!this.disabled && (this.clickable || this.href.length > 0 || this.accordion)));
|
|
242
243
|
if (this.href.length > 0 && !this.disabled) {
|
|
243
|
-
return (h(Host, { role: "listitem", class: Object.assign({}, basicClasses) }, h("a", { class: Object.assign({}, trigger.class()), href: this.href, target: this.target, download: this.download, onClick: (ev) => this.onClickTrigger(ev) }, h("slot", null))));
|
|
244
|
+
return (h(Host, { role: "listitem", class: Object.assign({}, basicClasses) }, h("a", { class: Object.assign({}, trigger.class()), rel: this.rel, href: this.href, target: this.target, download: this.download, onClick: (ev) => this.onClickTrigger(ev) }, h("slot", null))));
|
|
244
245
|
}
|
|
245
246
|
if (this.clickable) {
|
|
246
247
|
return (h(Host, { role: "listitem", class: Object.assign({}, basicClasses) }, h("button", { class: Object.assign({}, trigger.class()), disabled: this.disabled, onClick: (ev) => this.onClickTrigger(ev) }, h("slot", null))));
|
|
@@ -258,6 +259,7 @@ const ListItem = /*@__PURE__*/ proxyCustomElement(class ListItem extends HTMLEle
|
|
|
258
259
|
"accordion": [4],
|
|
259
260
|
"subAccordionItem": [4, "sub-accordion-item"],
|
|
260
261
|
"href": [1],
|
|
262
|
+
"rel": [1],
|
|
261
263
|
"target": [1],
|
|
262
264
|
"download": [1],
|
|
263
265
|
"state": [32],
|
package/components/bal-nav.js
CHANGED
|
@@ -49,6 +49,7 @@ class NavLinkItem {
|
|
|
49
49
|
this.id = `nav-link-item-${NavLinkItemIDs++}`;
|
|
50
50
|
this.value = item.value || this.id;
|
|
51
51
|
this.href = item.href;
|
|
52
|
+
this.rel = item.rel;
|
|
52
53
|
this.target = item.target;
|
|
53
54
|
this.active = !!item.active;
|
|
54
55
|
this.clickable = !!item.clickable;
|
|
@@ -77,6 +78,7 @@ class NavLinkItem {
|
|
|
77
78
|
label: this.label,
|
|
78
79
|
value: this.value,
|
|
79
80
|
href: this.href,
|
|
81
|
+
rel: this.rel,
|
|
80
82
|
target: this.target,
|
|
81
83
|
data: this.data,
|
|
82
84
|
};
|
|
@@ -84,7 +86,7 @@ class NavLinkItem {
|
|
|
84
86
|
renderTouch(_context) {
|
|
85
87
|
const block = BEM.block('nav');
|
|
86
88
|
return (h("li", null,
|
|
87
|
-
h("a", { id: this.id, class: Object.assign(Object.assign(Object.assign({}, block.element('mobile-links').class()), block.element('mobile-links').modifier('selected').class(this.active)), block.element('mobile-links').modifier('clickable').class(this.clickable)), href: this.href, target: this.target, onClick: ev => this.onClick(ev) }, this.label)));
|
|
89
|
+
h("a", { id: this.id, class: Object.assign(Object.assign(Object.assign({}, block.element('mobile-links').class()), block.element('mobile-links').modifier('selected').class(this.active)), block.element('mobile-links').modifier('clickable').class(this.clickable)), href: this.href, rel: this.rel, target: this.target, onClick: ev => this.onClick(ev) }, this.label)));
|
|
88
90
|
}
|
|
89
91
|
render(_context) {
|
|
90
92
|
return (h("bal-nav-link", { role: "listitem", href: this.href, target: this.target, clickable: this.clickable, selected: this.active, onClick: ev => this.onClick(ev) }, this.label));
|
|
@@ -111,7 +113,7 @@ class NavSectionLinkItem extends NavLinkItem {
|
|
|
111
113
|
const block = BEM.block('nav');
|
|
112
114
|
const hasItems = this.linkItems && this.linkItems.length > 0;
|
|
113
115
|
return (h("li", null,
|
|
114
|
-
h("a", { id: this.id, class: Object.assign(Object.assign(Object.assign({}, block.element('mobile-section-item').class()), block.element('mobile-section-item').modifier('selected').class(this.active)), block.element('mobile-section-item').modifier('clickable').class(this.clickable)), href: this.href, target: this.target, onClick: ev => this.onClick(ev) }, this.label),
|
|
116
|
+
h("a", { id: this.id, class: Object.assign(Object.assign(Object.assign({}, block.element('mobile-section-item').class()), block.element('mobile-section-item').modifier('selected').class(this.active)), block.element('mobile-section-item').modifier('clickable').class(this.clickable)), href: this.href, rel: this.rel, target: this.target, onClick: ev => this.onClick(ev) }, this.label),
|
|
115
117
|
hasItems ? (h("ul", { class: Object.assign({}, block.element('mobile-links-list').class()) }, this.linkItems.map(item => item.renderTouch()))) : ('')));
|
|
116
118
|
}
|
|
117
119
|
render(_context) {
|
|
@@ -139,7 +141,7 @@ class NavServiceLinkItem extends NavLinkItem {
|
|
|
139
141
|
const block = BEM.block('nav');
|
|
140
142
|
const hasItems = this.linkItems && this.linkItems.length > 0;
|
|
141
143
|
return (h("li", { class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('mobile-service-item').class()), block.element('mobile-service-item').modifier(`color-${this.color}`).class()), block.element('mobile-service-item').modifier('selected').class(this.active)), block.element('mobile-service-item').modifier('clickable').class(this.clickable)) },
|
|
142
|
-
h("a", { id: this.id, href: this.href, target: this.target, onClick: ev => this.onClick(ev) }, this.label),
|
|
144
|
+
h("a", { id: this.id, href: this.href, rel: this.rel, target: this.target, onClick: ev => this.onClick(ev) }, this.label),
|
|
143
145
|
hasItems ? (h("ul", { class: Object.assign({}, block.element('mobile-links-list').class()) }, this.linkItems.map(item => item.renderTouch()))) : ('')));
|
|
144
146
|
}
|
|
145
147
|
render(_context) {
|
|
@@ -150,9 +152,9 @@ class NavServiceLinkItem extends NavLinkItem {
|
|
|
150
152
|
}
|
|
151
153
|
let NavServiceLinkItemIDs = 0;
|
|
152
154
|
|
|
153
|
-
const AccordionButton = ({ id, label, level, open, link, href, target, onClick, }) => {
|
|
155
|
+
const AccordionButton = ({ id, label, level, open, link, href, rel, target, onClick, }) => {
|
|
154
156
|
const block = BEM.block('nav');
|
|
155
|
-
return link ? (h("a", { id: id, class: Object.assign({}, block.element(`mobile-${level}-item`).class()), href: href, target: target, onClick: ev => onClick(ev) },
|
|
157
|
+
return link ? (h("a", { id: id, class: Object.assign({}, block.element(`mobile-${level}-item`).class()), href: href, rel: rel, target: target, onClick: ev => onClick(ev) },
|
|
156
158
|
h("span", null, label))) : (h("button", { id: id, class: Object.assign({}, block.element(`mobile-${level}-item`).class()), onClick: ev => onClick(ev) },
|
|
157
159
|
h("span", null, label),
|
|
158
160
|
h("bal-icon", { name: "nav-go-down", size: "small", turn: open })));
|
|
@@ -166,7 +168,7 @@ const OverviewLink = ({ item, isMenu, onClick, isVisible }) => {
|
|
|
166
168
|
return (h("a", { class: Object.assign(Object.assign(Object.assign({}, block.element('mobile-overview-link').class()), block.element('mobile-overview-link').modifier('menu').class(!!isMenu)), block
|
|
167
169
|
.element('mobile-overview-link')
|
|
168
170
|
.modifier('invisible')
|
|
169
|
-
.class(isVisible === false)), href: item.href, target: item.target, onClick: ev => onClick(ev) },
|
|
171
|
+
.class(isVisible === false)), href: item.href, rel: item.rel, target: item.target, onClick: ev => onClick(ev) },
|
|
170
172
|
item.label,
|
|
171
173
|
" ",
|
|
172
174
|
item.label ? '➞' : ''));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
3
|
import { B as BEM } from './bem.js';
|
|
4
|
-
import { B as BalScrollHandler } from './scroll.js';
|
|
5
4
|
import { b as balBrowser } from './browser.js';
|
|
6
5
|
import { i as wait } from './helpers.js';
|
|
6
|
+
import { B as BalScrollHandler } from './scroll.js';
|
|
7
7
|
import { d as defineCustomElement$5 } from './bal-button2.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './bal-icon2.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './bal-logo2.js';
|
|
@@ -55,6 +55,7 @@ const NavbarBrand = /*@__PURE__*/ proxyCustomElement(class NavbarBrand extends H
|
|
|
55
55
|
this.language = defaultConfig.language;
|
|
56
56
|
this.isMenuActive = false;
|
|
57
57
|
this.href = '';
|
|
58
|
+
this.rel = undefined;
|
|
58
59
|
this.logoClickable = false;
|
|
59
60
|
this.logoLabel = undefined;
|
|
60
61
|
this.target = '_self';
|
|
@@ -117,7 +118,7 @@ const NavbarBrand = /*@__PURE__*/ proxyCustomElement(class NavbarBrand extends H
|
|
|
117
118
|
const navbarBrandEl = BEM.block('navbar').element('brand');
|
|
118
119
|
const logoTemplate = this.logo ? (h("img", { class: Object.assign({}, navbarBrandEl.element('logo').class()), src: this.logo, alt: "" })) : (h("bal-logo", { animated: this.animated, color: 'white', size: this.logoSize }));
|
|
119
120
|
const logoLabel = this.logoLabel ? this.logoLabel : i18nBalNavbarBrand[this.language].logoButtonLabel;
|
|
120
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '89cac098cf15e08c2d48748b6eb2cc184ed57292', class: Object.assign(Object.assign({}, navbarBrandEl.class()), navbarBrandEl.modifier(`context-${this.interface}`).class()) }, this.href ? (h("a", { "aria-label": logoLabel, title: logoLabel, href: this.href, rel: this.rel, target: this.target, onClick: (ev) => this.balNavigate.emit(ev) }, logoTemplate)) : this.logoClickable ? (h("button", { "aria-label": logoLabel, title: logoLabel, onClick: (ev) => this.balNavigate.emit(ev) }, logoTemplate)) : (logoTemplate), h("span", { key: 'b5807bd115fe7e7d5f75a7d319b810ad33c1db39', class: Object.assign({}, navbarBrandEl.element('title').class()) }, h("slot", { key: '14741534401ef235bee19db0d4aead5ec437c501' })), h("bal-button", { key: '9104e683dd114554c8ec84f4b20abd13e2c77dfe', class: Object.assign(Object.assign({}, navbarBrandEl.element('burger').class()), navbarBrandEl
|
|
121
122
|
.element('burger')
|
|
122
123
|
.modifier('hidden')
|
|
123
124
|
.class(this.interface === 'simple')), color: "light", inverted: true, square: true, icon: this.isMenuActive ? 'close' : 'menu-bars', onClick: () => this.onClick() })));
|
|
@@ -125,6 +126,7 @@ const NavbarBrand = /*@__PURE__*/ proxyCustomElement(class NavbarBrand extends H
|
|
|
125
126
|
get el() { return this; }
|
|
126
127
|
}, [4, "bal-navbar-brand", {
|
|
127
128
|
"href": [1],
|
|
129
|
+
"rel": [1],
|
|
128
130
|
"logoClickable": [4, "logo-clickable"],
|
|
129
131
|
"logoLabel": [1, "logo-label"],
|
|
130
132
|
"target": [1],
|
|
@@ -208,7 +208,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
208
208
|
updateRawValue(newValue, isHuman = true) {
|
|
209
209
|
if (!areArraysEqual(newValue, this.rawValue || [])) {
|
|
210
210
|
this.rawValue = [...newValue];
|
|
211
|
-
this.syncNativeInput();
|
|
211
|
+
this.syncNativeInput(isHuman);
|
|
212
212
|
if (this.didInit && isHuman === true) {
|
|
213
213
|
if (this.multiple) {
|
|
214
214
|
if (lodash_isnil(this.rawValue)) {
|
|
@@ -669,7 +669,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
669
669
|
this.updateRawValue(newRawValue, isHuman);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
syncNativeInput() {
|
|
672
|
+
syncNativeInput(isHuman = true) {
|
|
673
673
|
if (!this.multiple) {
|
|
674
674
|
if (length(this.rawValue) > 0) {
|
|
675
675
|
const valuesArray = getValues(this.rawValue);
|
|
@@ -679,9 +679,9 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
679
679
|
}
|
|
680
680
|
return this.updateInputValue(label);
|
|
681
681
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
682
|
+
}
|
|
683
|
+
if (!isHuman && length(this.rawValue) === 0) {
|
|
684
|
+
return this.updateInputValue('');
|
|
685
685
|
}
|
|
686
686
|
return Promise.resolve();
|
|
687
687
|
}
|
|
@@ -722,7 +722,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
722
722
|
*/
|
|
723
723
|
render() {
|
|
724
724
|
var _a;
|
|
725
|
-
const Chip = (props) => (h("bal-tag", { key: '
|
|
725
|
+
const Chip = (props) => (h("bal-tag", { key: '5bcf5db754537ec86b2c332f2c63ae1d28f04f98', size: "", closable: !this.disabled, disabled: this.disabled, invalid: this.invalid, tabindex: -1, onBalCloseClick: _ => this.removeValue(props.value), "data-testid": "bal-select-chip" }, findLabelByValue(this.options, props.value) || props.value));
|
|
726
726
|
const valuesArray = getValues(this.rawValue);
|
|
727
727
|
const block = BEM.block('select');
|
|
728
728
|
const nativeEl = block.element('native');
|
|
@@ -736,19 +736,19 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
736
736
|
const optionContentEl = optionEl.element('content');
|
|
737
737
|
const optionContentCheckboxEl = optionContentEl.element('checkbox');
|
|
738
738
|
const optionContentLabelEl = optionContentEl.element('label');
|
|
739
|
-
return (h(Host, { key: '
|
|
739
|
+
return (h(Host, { key: '8a2ed44d1007220a11cba788bc215e07417797f8', role: "listbox", onClick: this.handleClick, "aria-disabled": ariaBooleanToString(this.disabled), "data-value": (_a = this.rawValue) === null || _a === void 0 ? void 0 : _a.map(v => findLabelByValue(this.options, v)).join(','), class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('inverted').class(this.inverted)), block.modifier('inverted-footer').class(this.inverted)) }, h("select", { key: 'b9605f9d566c9b5637dc4fed4a49370e04ce238b', class: Object.assign({}, nativeEl.class()), name: this.name, multiple: this.multiple, required: this.required, tabindex: -1, ref: el => (this.nativeSelectEl = el) }, valuesArray.map((value) => (h("option", { key: value, value: value, selected: true }, value)))), h("bal-popover", { key: '2116e76113fb0cd238e6a1b7a551c1e45c8cee47', onBalChange: this.handlePopoverChange, ref: el => (this.popoverElement = el) }, h("div", { key: '7d77bf05a11bdf40b06732099f21fb4eb151ed52', "bal-popover-trigger": true, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, controlEl.class()), controlEl.modifier('invalid').class(this.invalid)), controlEl.modifier('disabled').class(this.disabled || this.readonly)), controlEl.modifier('focused').class(this.isPopoverOpen)), controlEl.modifier('inverted-footer').class(this.inverted)) }, h("div", { key: '5a52ce88c32363ea2c69e3b4008568674f9040b2', class: Object.assign(Object.assign({}, controlSelectionsEl.class()), controlSelectionsEl
|
|
740
740
|
.modifier('clickable')
|
|
741
741
|
.class(!this.isPopoverOpen && !this.disabled && !this.readonly)), onClick: this.handleInputClick, ref: el => (this.selectionEl = el) }, valuesArray
|
|
742
742
|
.filter(_ => this.multiple)
|
|
743
|
-
.map((value) => (h(Chip, { value: value }))), h("input", { key: '
|
|
743
|
+
.map((value) => (h(Chip, { value: value }))), h("input", { key: '1329705b31e8846d7c8cad7736204575d2bb68a6', type: "text", class: Object.assign(Object.assign({}, controlInputEl.class()), { 'input': true, 'is-inverted': this.inverted, 'is-danger': this.invalid, 'is-disabled': this.disabled || this.readonly, 'is-clickable': !this.isPopoverOpen && !this.disabled && !this.readonly, 'data-test-select-input': true }), id: this.ariaForm.controlId || this.inputId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-disabled": ariaBooleanToString(this.disabled), "data-testid": "bal-select-input", autocomplete: this.autocomplete, "aria-autocomplete": this.autocomplete === 'off' ? 'none' : null, placeholder: this.inputPlaceholder, readonly: !this.typeahead || this.disabled || this.readonly, contentEditable: this.typeahead, disabled: this.disabled, maxLength: this.maxLength, tabindex: this.balTabindex, onInput: this.handleInput, onClick: this.handleInputClick, onChange: this.handleInputChange, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onKeyPress: this.handleKeyPress, ref: el => (this.inputElement = el) })), !this.freeSolo && !this.loading ? (h("bal-icon", { class: Object.assign(Object.assign(Object.assign({}, controlIconEl.class()), controlIconEl.modifier('loading').class(this.loading)), controlIconEl.modifier('clickable').class(!this.disabled && !this.readonly)), name: !this.inverted ? 'caret-down' : 'caret-up', color: this.disabled || this.readonly
|
|
744
744
|
? 'grey-light'
|
|
745
745
|
: this.inverted
|
|
746
746
|
? 'white'
|
|
747
747
|
: this.invalid
|
|
748
748
|
? 'danger'
|
|
749
|
-
: 'primary', turn: this.isPopoverOpen, onClick: ev => this.handleInputClick(ev, true), size: !this.inverted ? '' : 'x-small' })) : ('')), h("bal-popover-content", { key: '
|
|
749
|
+
: 'primary', turn: this.isPopoverOpen, onClick: ev => this.handleInputClick(ev, true), size: !this.inverted ? '' : 'x-small' })) : ('')), h("bal-popover-content", { key: 'ecc1305ae4c29e9fd3d131e69dc781deb4bd4bdc', class: Object.assign({}, popoverContentEl.class()), scrollable: this.scrollable, spaceless: true, expanded: true }, this.optionArray.map((option, index) => (h("button", { key: option.value, type: "button", role: "option", id: option.id, "data-value": option.value, "data-label": option.label, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, optionEl.class()), optionEl
|
|
750
750
|
.modifier('selected')
|
|
751
|
-
.class(valuesArray.includes(option.value) && !(this.typeahead && !this.multiple))), optionEl.modifier('focused').class(this.focusIndex === index)), optionEl.modifier('checkbox').class(this.multiple)), optionEl.modifier('disabled').class(option.disabled === true)), "data-testid": "bal-select-option", disabled: option.disabled, tabIndex: -1, onMouseEnter: () => this.handleOptionMouseEnter(index), onClick: () => this.optionSelected(option) }, h("div", { class: Object.assign({}, optionContentEl.class()) }, h("span", { class: Object.assign({}, optionContentCheckboxEl.class()), style: { display: this.multiple ? 'flex' : 'none' } }, h("bal-checkbox", { checked: valuesArray.includes(option.value), tabindex: -1, nonSubmit: true, flat: true, onBalChange: preventDefault })), h("span", { class: Object.assign({}, optionContentLabelEl.class()), innerHTML: option.innerHTML }))))), h("div", { key: '
|
|
751
|
+
.class(valuesArray.includes(option.value) && !(this.typeahead && !this.multiple))), optionEl.modifier('focused').class(this.focusIndex === index)), optionEl.modifier('checkbox').class(this.multiple)), optionEl.modifier('disabled').class(option.disabled === true)), "data-testid": "bal-select-option", disabled: option.disabled, tabIndex: -1, onMouseEnter: () => this.handleOptionMouseEnter(index), onClick: () => this.optionSelected(option) }, h("div", { class: Object.assign({}, optionContentEl.class()) }, h("span", { class: Object.assign({}, optionContentCheckboxEl.class()), style: { display: this.multiple ? 'flex' : 'none' } }, h("bal-checkbox", { checked: valuesArray.includes(option.value), tabindex: -1, nonSubmit: true, flat: true, onBalChange: preventDefault })), h("span", { class: Object.assign({}, optionContentLabelEl.class()), innerHTML: option.innerHTML }))))), h("div", { key: 'c24a3bf08a3c8c5c403a8eab86ee2adce14f896f', class: Object.assign(Object.assign({}, popoverContentEmptyEl.class()), popoverContentEmptyEl
|
|
752
752
|
.modifier('hidden')
|
|
753
753
|
.class(this.noDataLabel === undefined || this.hasOptions() || !this.typeahead || this.selectionOptional)) }, this.noDataLabel)))));
|
|
754
754
|
}
|
|
@@ -7,19 +7,21 @@ const StageBackLink = /*@__PURE__*/ proxyCustomElement(class StageBackLink exten
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.href = undefined;
|
|
10
|
+
this.rel = undefined;
|
|
10
11
|
this.shadow = false;
|
|
11
12
|
this.inverted = false;
|
|
12
13
|
}
|
|
13
14
|
render() {
|
|
14
15
|
const block = BEM.block('stage-back-link');
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '5158c9c4cff372138c88a8af2997d6f85bd8d885', class: Object.assign(Object.assign({}, block.class()), block.modifier('shadow').class(this.shadow)) }, h("a", { key: '205e1ae01e652fb595e088879287d9b25315b234', class: {
|
|
16
17
|
'link': true,
|
|
17
18
|
'is-inverted': this.inverted,
|
|
18
|
-
}, href: this.href }, h("bal-icon", { key: '
|
|
19
|
+
}, href: this.href, rel: this.rel }, h("bal-icon", { key: 'db43094884a07ab6e079b3ac6f89d7c2f927b1b6', class: "mr-x-small", name: "caret-left", size: "x-small", inverted: this.inverted, shadow: this.shadow }), h("slot", { key: 'a680c6fac50060190d267890f6c7d7ccbec1f3f4' }))));
|
|
19
20
|
}
|
|
20
21
|
get el() { return this; }
|
|
21
22
|
}, [4, "bal-stage-back-link", {
|
|
22
23
|
"href": [1],
|
|
24
|
+
"rel": [1],
|
|
23
25
|
"shadow": [4],
|
|
24
26
|
"inverted": [4]
|
|
25
27
|
}]);
|
|
@@ -12,6 +12,7 @@ const StepItem = /*@__PURE__*/ proxyCustomElement(class StepItem extends HTMLEle
|
|
|
12
12
|
this.value = '';
|
|
13
13
|
this.label = '';
|
|
14
14
|
this.href = '';
|
|
15
|
+
this.rel = undefined;
|
|
15
16
|
this.target = '_self';
|
|
16
17
|
this.disabled = false;
|
|
17
18
|
this.done = false;
|
|
@@ -39,6 +40,7 @@ const StepItem = /*@__PURE__*/ proxyCustomElement(class StepItem extends HTMLEle
|
|
|
39
40
|
value: this.value,
|
|
40
41
|
label: this.label,
|
|
41
42
|
href: this.href,
|
|
43
|
+
rel: this.rel,
|
|
42
44
|
target: this.target,
|
|
43
45
|
active: this.active,
|
|
44
46
|
disabled: this.disabled,
|
|
@@ -52,10 +54,10 @@ const StepItem = /*@__PURE__*/ proxyCustomElement(class StepItem extends HTMLEle
|
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '6d93a7d6ac124b26f15803167945b1316915f303', role: "tabpanel", class: {
|
|
56
58
|
'bal-step-item': true,
|
|
57
59
|
'bal-step-item--active': this.isActive,
|
|
58
|
-
} }, h("slot", { key: '
|
|
60
|
+
} }, h("slot", { key: '563c4d2ea864f40885618e92743d44656d469067' })));
|
|
59
61
|
}
|
|
60
62
|
get el() { return this; }
|
|
61
63
|
}, [4, "bal-step-item", {
|
|
@@ -63,6 +65,7 @@ const StepItem = /*@__PURE__*/ proxyCustomElement(class StepItem extends HTMLEle
|
|
|
63
65
|
"value": [513],
|
|
64
66
|
"label": [513],
|
|
65
67
|
"href": [513],
|
|
68
|
+
"rel": [1],
|
|
66
69
|
"target": [1],
|
|
67
70
|
"disabled": [516],
|
|
68
71
|
"done": [516],
|
package/components/bal-steps.js
CHANGED
|
@@ -28,7 +28,7 @@ const StepButton = ({ item, color, isMobile, clickable, onSelectTab }) => {
|
|
|
28
28
|
if (item.invisible) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
return (h("a", { role: "tab", class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, bemEl.class()), bemEl.modifier(`color-${color}`).class()), bemEl.modifier('done').class(item.done)), bemEl.modifier('active').class(item.active)), bemEl.modifier('failed').class(item.failed)), bemEl.modifier('disabled').class(item.disabled)), bemEl.modifier('clickable').class(clickable)), bemEl.modifier('passed').class(item.passed)), { 'bal-focusable': !item.disabled && !item.invisible }), "data-label": item.label, "data-value": item.value, "data-index": item.index, "data-testid": "bal-steps-option", "aria-disabled": `${item.disabled}`, href: item.href === '' ? 'javascript:;' : item.href, target: item.target, onClick: (ev) => onSelectTab(ev, item) },
|
|
31
|
+
return (h("a", { role: "tab", class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, bemEl.class()), bemEl.modifier(`color-${color}`).class()), bemEl.modifier('done').class(item.done)), bemEl.modifier('active').class(item.active)), bemEl.modifier('failed').class(item.failed)), bemEl.modifier('disabled').class(item.disabled)), bemEl.modifier('clickable').class(clickable)), bemEl.modifier('passed').class(item.passed)), { 'bal-focusable': !item.disabled && !item.invisible }), "data-label": item.label, "data-value": item.value, "data-index": item.index, "data-testid": "bal-steps-option", "aria-disabled": `${item.disabled}`, href: item.href === '' ? 'javascript:;' : item.href, rel: item.rel, target: item.target, onClick: (ev) => onSelectTab(ev, item) },
|
|
32
32
|
h(StepIcon, { item: item, isMobile: isMobile }),
|
|
33
33
|
h(StepLabel, { item: item })));
|
|
34
34
|
};
|
package/components/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
2
|
export { F as FileUploadRejectionReason } from './bal-file-upload.type.js';
|
|
4
3
|
export { i as i18nBalDate } from './bal-date.i18n.js';
|
|
@@ -6,17 +5,16 @@ export { i as i18nBalClose } from './bal-close.i18n.js';
|
|
|
6
5
|
export { i as i18nBalTimeInput } from './bal-time-input.i18n.js';
|
|
7
6
|
export { i as i18nBalInputStepper } from './bal-input-stepper.i18n.js';
|
|
8
7
|
export { i as i18nBalLabel } from './bal-label.i18n.js';
|
|
9
|
-
|
|
10
|
-
export { b as balBrowser } from './browser.js';
|
|
11
|
-
import { w as waitForComponent, g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
12
|
-
export { c as componentOnReady, h as deepReady, g as getAppRoot, j as isDescendant, s as shallowReady, i as wait, b as waitAfterFramePaint, d as waitAfterIdleCallback, e as waitAfterLargestContentfulPaintCallback, w as waitForComponent, a as waitForDesignSystem, f as waitOnLoadEventCallback } from './helpers.js';
|
|
13
|
-
import { d as defaultConfig } from './config.default.js';
|
|
14
|
-
export { d as defaultConfig } from './config.default.js';
|
|
8
|
+
export { a as BalSnackbarController, B as BalToastController, c as balSnackbarController, b as balToastController, i as initialize, i as initializeBaloiseDesignSystem, s as setupConfig } from './initialize.js';
|
|
15
9
|
export { n as newBalOption } from './option.js';
|
|
16
10
|
export { n as newBalStepOption } from './bal-step.util.js';
|
|
17
11
|
export { n as newBalTabOption } from './bal-tab.util.js';
|
|
12
|
+
import { g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
13
|
+
export { c as componentOnReady, h as deepReady, g as getAppRoot, j as isDescendant, s as shallowReady, i as wait, b as waitAfterFramePaint, d as waitAfterIdleCallback, e as waitAfterLargestContentfulPaintCallback, w as waitForComponent, a as waitForDesignSystem, f as waitOnLoadEventCallback } from './helpers.js';
|
|
18
14
|
export { s as scrollToFirstInvalidField } from './form.js';
|
|
19
15
|
export { B as BalScrollHandler } from './scroll.js';
|
|
16
|
+
import { b as balBrowser } from './browser.js';
|
|
17
|
+
export { b as balBrowser } from './browser.js';
|
|
20
18
|
import { b as balDevice } from './device.js';
|
|
21
19
|
export { B as BalDevice, b as balDevice } from './device.js';
|
|
22
20
|
export { I as INVALID_VALUE } from './mask-util.js';
|
|
@@ -24,175 +22,11 @@ import { g as getOverlays, a as getOverlay } from './overlays.js';
|
|
|
24
22
|
import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
|
|
25
23
|
export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
|
|
26
24
|
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.js';
|
|
25
|
+
export { d as defaultConfig } from './config.default.js';
|
|
27
26
|
import { S as Subject } from './listener.js';
|
|
28
27
|
export { B as BalSwipeSubject } from './swipe.subject.js';
|
|
29
28
|
export { B as BalDate } from './date.js';
|
|
30
29
|
|
|
31
|
-
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
32
|
-
const BALOISE_ANIMATION_KEY = 'baloise-animated';
|
|
33
|
-
|
|
34
|
-
class Config {
|
|
35
|
-
constructor() {
|
|
36
|
-
this._componentObservers = [];
|
|
37
|
-
this._observers = [];
|
|
38
|
-
this._config = defaultConfig;
|
|
39
|
-
}
|
|
40
|
-
get locale() {
|
|
41
|
-
return `${this._config.language}-${this._config.region}`;
|
|
42
|
-
}
|
|
43
|
-
get region() {
|
|
44
|
-
return this._config.region;
|
|
45
|
-
}
|
|
46
|
-
set region(region) {
|
|
47
|
-
if (region !== this._config.region) {
|
|
48
|
-
this._config.region = region;
|
|
49
|
-
this._notify();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
get language() {
|
|
53
|
-
return this._config.language;
|
|
54
|
-
}
|
|
55
|
-
set language(language) {
|
|
56
|
-
if (language !== this._config.language) {
|
|
57
|
-
if (this._config.allowedLanguages.includes(language)) {
|
|
58
|
-
this._config.language = language;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this._config.language = this._config.fallbackLanguage;
|
|
62
|
-
}
|
|
63
|
-
this._notify();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
get allowedLanguages() {
|
|
67
|
-
return this._config.allowedLanguages;
|
|
68
|
-
}
|
|
69
|
-
set allowedLanguages(allowedLanguages) {
|
|
70
|
-
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
71
|
-
this._config.allowedLanguages = allowedLanguages;
|
|
72
|
-
this._notify();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
get icons() {
|
|
76
|
-
return this._config.icons;
|
|
77
|
-
}
|
|
78
|
-
set icons(icons) {
|
|
79
|
-
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
80
|
-
this._notify();
|
|
81
|
-
}
|
|
82
|
-
get logger() {
|
|
83
|
-
return this._config.logger;
|
|
84
|
-
}
|
|
85
|
-
set logger(logger) {
|
|
86
|
-
this._config.logger = Object.assign({}, logger);
|
|
87
|
-
this._notify();
|
|
88
|
-
}
|
|
89
|
-
get animated() {
|
|
90
|
-
return this._config.animated;
|
|
91
|
-
}
|
|
92
|
-
set animated(animated) {
|
|
93
|
-
this._config.animated = animated;
|
|
94
|
-
this._notify();
|
|
95
|
-
}
|
|
96
|
-
get httpFormSubmit() {
|
|
97
|
-
return this._config.httpFormSubmit;
|
|
98
|
-
}
|
|
99
|
-
set httpFormSubmit(httpFormSubmit) {
|
|
100
|
-
this._config.httpFormSubmit = httpFormSubmit;
|
|
101
|
-
this._notify();
|
|
102
|
-
}
|
|
103
|
-
attach(observer) {
|
|
104
|
-
const isExist = this._observers.includes(observer);
|
|
105
|
-
if (isExist) {
|
|
106
|
-
return console.log('Subject: Observer has been attached already.');
|
|
107
|
-
}
|
|
108
|
-
this._observers.push(observer);
|
|
109
|
-
observer.configChanged(this._config);
|
|
110
|
-
}
|
|
111
|
-
detach(observer) {
|
|
112
|
-
const observerIndex = this._observers.indexOf(observer);
|
|
113
|
-
if (observerIndex === -1) {
|
|
114
|
-
return console.log('Subject: Nonexistent observer.');
|
|
115
|
-
}
|
|
116
|
-
this._observers.splice(observerIndex, 1);
|
|
117
|
-
}
|
|
118
|
-
attachComponent(observer) {
|
|
119
|
-
const isExist = this._componentObservers.includes(observer);
|
|
120
|
-
if (isExist) {
|
|
121
|
-
return console.log('Subject: Observer has been attached already.');
|
|
122
|
-
}
|
|
123
|
-
this._componentObservers.push(observer);
|
|
124
|
-
observer.configChanged(this._config);
|
|
125
|
-
}
|
|
126
|
-
detachComponent(observer) {
|
|
127
|
-
const observerIndex = this._componentObservers.indexOf(observer);
|
|
128
|
-
if (observerIndex === -1) {
|
|
129
|
-
return console.log('Subject: Nonexistent observer.');
|
|
130
|
-
}
|
|
131
|
-
this._componentObservers.splice(observerIndex, 1);
|
|
132
|
-
}
|
|
133
|
-
toString() {
|
|
134
|
-
return JSON.stringify(this._config);
|
|
135
|
-
}
|
|
136
|
-
reset(config) {
|
|
137
|
-
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
138
|
-
this._notify(false);
|
|
139
|
-
}
|
|
140
|
-
_notify(all = true) {
|
|
141
|
-
for (const observer of this._componentObservers) {
|
|
142
|
-
observer.configChanged(this._config);
|
|
143
|
-
}
|
|
144
|
-
if (all) {
|
|
145
|
-
for (const observer of this._observers) {
|
|
146
|
-
observer.configChanged(this._config);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (balBrowser.hasWindow) {
|
|
150
|
-
saveConfig(window, this._config);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const config = /*@__PURE__*/ new Config();
|
|
155
|
-
const configFromSession = (win) => {
|
|
156
|
-
try {
|
|
157
|
-
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
158
|
-
return configStr !== null ? JSON.parse(configStr) : {};
|
|
159
|
-
}
|
|
160
|
-
catch (e) {
|
|
161
|
-
return {};
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
const configFromLocalStorage = (win) => {
|
|
165
|
-
try {
|
|
166
|
-
const animated = JSON.parse(win.localStorage.getItem(BALOISE_ANIMATION_KEY));
|
|
167
|
-
if (animated !== null) {
|
|
168
|
-
return {
|
|
169
|
-
animated,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return {};
|
|
173
|
-
}
|
|
174
|
-
catch (e) {
|
|
175
|
-
return {};
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const saveConfig = (win, c) => {
|
|
179
|
-
try {
|
|
180
|
-
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
181
|
-
}
|
|
182
|
-
catch (e) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const setupConfig = (userConfig = {}, win = {}) => {
|
|
188
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
189
|
-
win = window;
|
|
190
|
-
}
|
|
191
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
192
|
-
config.reset(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), configFromLocalStorage(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
|
|
193
|
-
win.BaloiseDesignSystem.config = config;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
30
|
const i18nBalFieldLabel = {
|
|
197
31
|
de: {
|
|
198
32
|
optional: ' (optional)',
|
|
@@ -226,147 +60,6 @@ const i18nBalFieldLabel = {
|
|
|
226
60
|
},
|
|
227
61
|
};
|
|
228
62
|
|
|
229
|
-
class BalNoticeController {
|
|
230
|
-
constructor(options) {
|
|
231
|
-
this.options = options;
|
|
232
|
-
this.container = null;
|
|
233
|
-
this.queue = [];
|
|
234
|
-
this.preQueue = [];
|
|
235
|
-
this.queueLimit = 5;
|
|
236
|
-
}
|
|
237
|
-
create(options) {
|
|
238
|
-
if (balBrowser.hasDocument) {
|
|
239
|
-
this.setupContainer(options);
|
|
240
|
-
const clone = this.findClone(options);
|
|
241
|
-
if (clone === undefined) {
|
|
242
|
-
const el = document.createElement(this.options.tag);
|
|
243
|
-
Object.assign(el, options);
|
|
244
|
-
el.addEventListener('balClose', ev => {
|
|
245
|
-
this.removeFromQueue(ev.detail);
|
|
246
|
-
});
|
|
247
|
-
this.preQueue.push(el);
|
|
248
|
-
this.updateQueue();
|
|
249
|
-
return el;
|
|
250
|
-
}
|
|
251
|
-
return clone;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
setQueue(queueLimit) {
|
|
255
|
-
this.queueLimit = queueLimit;
|
|
256
|
-
}
|
|
257
|
-
async dismissAll() {
|
|
258
|
-
var _a;
|
|
259
|
-
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
260
|
-
if (elements) {
|
|
261
|
-
const closingQueue = [];
|
|
262
|
-
for (let index = 0; index < elements.length; index++) {
|
|
263
|
-
const el = elements[index];
|
|
264
|
-
if (el.close) {
|
|
265
|
-
closingQueue.push(el.close());
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
await Promise.all(closingQueue);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @deprecated use dismissAll instead
|
|
273
|
-
*/
|
|
274
|
-
async clearAll() {
|
|
275
|
-
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
276
|
-
return this.dismissAll();
|
|
277
|
-
}
|
|
278
|
-
findClone(options) {
|
|
279
|
-
for (let index = 0; index < this.queue.length; index++) {
|
|
280
|
-
const el = this.queue[index];
|
|
281
|
-
if (el.message === options.message && el.color === options.color) {
|
|
282
|
-
return el;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return undefined;
|
|
286
|
-
}
|
|
287
|
-
setupContainer(options) {
|
|
288
|
-
if (balBrowser.hasDocument) {
|
|
289
|
-
const containerId = `${this.options.tag}-container`;
|
|
290
|
-
this.container = document.getElementById(containerId);
|
|
291
|
-
if (this.container)
|
|
292
|
-
return;
|
|
293
|
-
if (!this.container) {
|
|
294
|
-
this.container = document.createElement('bal-notices');
|
|
295
|
-
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
296
|
-
this.container.setAttribute('animated', options.animated ? 'true' : 'false');
|
|
297
|
-
if (options.container !== undefined) {
|
|
298
|
-
this.container.setAttribute('container', options.container === true ? '' : options.container);
|
|
299
|
-
}
|
|
300
|
-
this.container.id = containerId;
|
|
301
|
-
}
|
|
302
|
-
document.body.appendChild(this.container);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
async updateQueue() {
|
|
306
|
-
var _a;
|
|
307
|
-
if (this.queue.length < this.queueLimit) {
|
|
308
|
-
const el = this.preQueue.shift();
|
|
309
|
-
if (el && this.container) {
|
|
310
|
-
await waitForComponent(this.container);
|
|
311
|
-
const innerEl = this.container.querySelector('.bal-notices__inner');
|
|
312
|
-
if (innerEl) {
|
|
313
|
-
this.queue.push(el);
|
|
314
|
-
innerEl.insertAdjacentElement('beforeend', el);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
if (this.queue.length === 0) {
|
|
319
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
removeFromQueue(toastId) {
|
|
323
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
324
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
class BalToastController extends BalNoticeController {
|
|
329
|
-
constructor() {
|
|
330
|
-
super({
|
|
331
|
-
tag: 'bal-toast',
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
create(options) {
|
|
335
|
-
return super.create(options);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
const balToastController = new BalToastController();
|
|
339
|
-
|
|
340
|
-
class BalSnackbarController extends BalNoticeController {
|
|
341
|
-
constructor() {
|
|
342
|
-
super({
|
|
343
|
-
tag: 'bal-snackbar',
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
create(options) {
|
|
347
|
-
return super.create(options);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
const balSnackbarController = new BalSnackbarController();
|
|
351
|
-
|
|
352
|
-
// generated by .build/version.js
|
|
353
|
-
const VERSION = '18.1.0';
|
|
354
|
-
|
|
355
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
356
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
357
|
-
win = window;
|
|
358
|
-
}
|
|
359
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
360
|
-
if (platformConfig) {
|
|
361
|
-
setPlatformHelpers(platformConfig);
|
|
362
|
-
}
|
|
363
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
364
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
365
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
366
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
367
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
368
|
-
};
|
|
369
|
-
|
|
370
63
|
const newBalCheckboxOption = (option) => {
|
|
371
64
|
return Object.assign(Object.assign({ interface: 'checkbox', labelHidden: false, flat: false, disabled: false, readonly: false, required: false, nonSubmit: false, invalid: false, checked: false }, option), { label: '', html: option.label });
|
|
372
65
|
};
|
|
@@ -484,4 +177,4 @@ const isPlatform = (winOrPlatform, platform) => {
|
|
|
484
177
|
const NewBalOptionValue = newBalOptionValue;
|
|
485
178
|
const NewBalSingleOptionValue = newBalSingleOptionValue;
|
|
486
179
|
|
|
487
|
-
export { BalModalController, BalOrientationSubject,
|
|
180
|
+
export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
|