@baloise/ds-core 19.9.2 → 19.9.3-nightly.20260403
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/animation.decorator.js +1 -1
- package/components/bal-accordion.js +34 -12
- package/components/bal-app.js +1 -102
- package/components/bal-app2.js +104 -0
- package/components/bal-button2.js +1 -1
- package/components/bal-carousel-item.js +1 -1
- package/components/bal-checkbox-group.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-date.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +264 -0
- package/components/bal-dropdown.js +1 -1
- package/components/bal-field.js +1 -1
- package/components/bal-footer.js +1 -1
- package/components/bal-form.js +1 -1
- package/components/bal-input-stepper.js +1 -1
- package/components/bal-list-item-accordion-body2.js +1 -1
- package/components/bal-list-item2.js +1 -1
- package/components/bal-logo2.js +1 -1
- package/components/bal-modal.js +1 -1
- package/components/bal-nav.js +1 -1
- package/components/bal-navbar-brand.js +1 -1
- package/components/bal-option-list2.js +1 -1
- package/components/bal-popup2.js +1 -1
- package/components/bal-radio-group.js +1 -1
- package/components/bal-segment-item.js +1 -1
- package/components/bal-select2.js +1 -1
- package/components/bal-spinner2.js +1 -1
- package/components/bal-stage-image.js +1 -1
- package/components/bal-tabs2.js +1 -1
- package/components/breakpoints.subject.js +1 -1
- package/components/element-states.decorator.js +1 -1
- package/components/floating-ui.js +1 -1
- package/components/focus.decorator.js +1 -1
- package/components/form-input.js +1 -1
- package/components/helpers.js +1 -1
- package/components/index.js +5 -449
- package/components/initialize.js +450 -0
- package/components/mutation.decorator.js +1 -1
- package/components/overlays.js +1 -1
- package/components/resize.decorator.js +1 -1
- package/components/swipe.subject.js +1 -1
- package/components/swiper.util.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/components/visibility.decorator.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-591debd7c3.entry.js → p-0d4f106841.entry.js} +1 -1
- package/dist/baloise-design-system/p-21ea7b32f1.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-35a5ef54a0.system.entry.js → p-21f1707096.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1f5ead4b22.entry.js → p-2a39bddb32.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1d1f8316d7.system.entry.js → p-2ceb3f6333.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-414a850825.system.entry.js → p-355dab162a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-CsPrCX4f.system.js → p-3VlTyI5Z.system.js} +1 -1
- package/dist/baloise-design-system/{p-874298b6f3.system.entry.js → p-3a19ba2b9b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-62d22238a8.system.entry.js → p-3a3484447d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8f0624929d.system.entry.js → p-42e73341e6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-550f1b809a.entry.js → p-4f3188d84d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5e3d004ff0.entry.js → p-523b4b23c2.entry.js} +1 -1
- package/dist/baloise-design-system/{p-778faed2c9.entry.js → p-5443ea92b6.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d8f0f0e341.system.entry.js → p-57e2653070.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-402da722fc.system.entry.js → p-63383e4905.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a19115481e.entry.js → p-65fabe9f0a.entry.js} +1 -1
- package/dist/baloise-design-system/p-68c75901a4.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-396bf929bc.system.entry.js → p-6dd84402db.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3f3fd4d0fb.entry.js → p-720cba47c9.entry.js} +1 -1
- package/dist/baloise-design-system/p-7563a0a66d.entry.js +1 -0
- package/dist/baloise-design-system/{p-c638ff8e96.system.entry.js → p-81de2b6ce9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9e1dd8fae9.system.entry.js → p-84c44e94a1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-BT9kotrD.system.js → p-8ShVW5i8.system.js} +1 -1
- package/dist/baloise-design-system/p-9ca0a9bf5c.entry.js +1 -0
- package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
- package/dist/baloise-design-system/p-BIQomDzv.system.js +1 -0
- package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
- package/dist/baloise-design-system/{p-BLNTV2y9.js → p-Bj1UIKJa.js} +1 -1
- package/dist/baloise-design-system/p-BvSkuJ_n.js +1 -0
- package/dist/baloise-design-system/p-BzIZLOtt.system.js +1 -0
- package/dist/baloise-design-system/{p-OSNEECer.js → p-CWl_Z8Ck.js} +1 -1
- package/dist/baloise-design-system/p-C_qvcMEM.system.js +1 -0
- package/dist/baloise-design-system/p-Ectc3YAG.js +1 -0
- package/dist/baloise-design-system/{p-lqmCqCXD.system.js → p-If81YPiv.system.js} +1 -1
- package/dist/baloise-design-system/{p-D4HExdbi.system.js → p-WD7fTBn2.system.js} +1 -1
- package/dist/baloise-design-system/{p-3111be34fe.entry.js → p-a7819c965d.entry.js} +1 -1
- package/dist/baloise-design-system/{p-98b209c6fb.entry.js → p-ac26bf1c41.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4fd089ea55.entry.js → p-b30d16fc24.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0858ef65f2.system.entry.js → p-be738b2b15.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ce1ac691fc.entry.js → p-c534dba230.entry.js} +1 -1
- package/dist/baloise-design-system/{p-33a49c1b2b.system.entry.js → p-c8d1052385.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4d7d8d1fd3.entry.js → p-e8a5dc1823.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ca021528cf.entry.js → p-ef35eaa717.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cnNPy_UF.js → p-mpQwTmfD.js} +1 -1
- package/dist/cjs/app-globals-DcKvQZAC.js +7 -0
- package/dist/cjs/bal-accordion_4.cjs.entry.js +33 -11
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-doc-app.cjs.entry.js +231 -0
- package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- 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-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-BLbtZQPE.js → breakpoints.decorator-B8DRTYL_.js} +1 -1
- package/dist/cjs/{breakpoints.subject-Dm5PhV8R.js → breakpoints.subject-Bkyagu5K.js} +1 -1
- package/dist/cjs/{app-globals-D4xKyILL.js → global-BOGOCc0T.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{tokens.esm-DizoRyJW.js → tokens.esm-BZIpYmb1.js} +1 -1
- package/dist/cjs/{window-resize.decorator-0M6RxXln.js → window-resize.decorator-51XJuaGr.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-accordion/bal-accordion.js +33 -11
- 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 +248 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/app-globals-CIj5uAPM.js +5 -0
- package/dist/esm/bal-accordion_4.entry.js +33 -11
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-field_5.entry.js +3 -3
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +3 -3
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-D8tyvKfl.js → breakpoints.decorator-DiyER4G8.js} +1 -1
- package/dist/esm/{breakpoints.subject-C7sMRxmL.js → breakpoints.subject-C7x4XnK0.js} +1 -1
- package/dist/esm/{app-globals-Blx--ecs.js → global-Llrc69_N.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-W3od-FM9.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{tokens.esm-CggbMUrI.js → tokens.esm-CVJxXAEJ.js} +1 -1
- package/dist/esm/{window-resize.decorator-CzU20wtn.js → window-resize.decorator-DpVzfcm-.js} +1 -1
- package/dist/esm-es5/app-globals-CIj5uAPM.js +1 -0
- package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_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-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.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-D8tyvKfl.js → breakpoints.decorator-DiyER4G8.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-C7sMRxmL.js → breakpoints.subject-C7x4XnK0.js} +1 -1
- package/dist/esm-es5/global-Llrc69_N.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-CzU20wtn.js → window-resize.decorator-DpVzfcm-.js} +1 -1
- package/dist/types/components/bal-accordion/bal-accordion.d.ts +3 -0
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +75 -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-Bk7UdnZ5.system.js +0 -1
- package/dist/baloise-design-system/p-CKN3W8qn.js +0 -1
- package/dist/baloise-design-system/p-aec5e73a82.system.entry.js +0 -1
- package/dist/baloise-design-system/p-aqkRpbjU.system.js +0 -1
- package/dist/baloise-design-system/p-ce2de36f43.entry.js +0 -1
- package/dist/esm-es5/app-globals-Blx--ecs.js +0 -1
- /package/dist/baloise-design-system/{p-DYEfn6Be.system.js → p-C9MTMdnA.system.js} +0 -0
- /package/dist/baloise-design-system/{p-CggbMUrI.js → p-CVJxXAEJ.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-CggbMUrI.js → tokens.esm-CVJxXAEJ.js} +0 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
|
+
import { b as balBrowser } from './browser.js';
|
|
3
|
+
import { f as waitForComponent } from './helpers.js';
|
|
4
|
+
import { d as defaultConfig } from './config.default.js';
|
|
5
|
+
|
|
6
|
+
const BALOISE_ANIMATION_KEY = 'baloise-animated';
|
|
7
|
+
|
|
8
|
+
class Config {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._componentObservers = [];
|
|
11
|
+
this._observers = [];
|
|
12
|
+
this._config = defaultConfig;
|
|
13
|
+
}
|
|
14
|
+
get locale() {
|
|
15
|
+
return `${this._config.language}-${this._config.region}`;
|
|
16
|
+
}
|
|
17
|
+
get region() {
|
|
18
|
+
return this._config.region;
|
|
19
|
+
}
|
|
20
|
+
set region(region) {
|
|
21
|
+
if (region !== this._config.region) {
|
|
22
|
+
this._config.region = region;
|
|
23
|
+
this._notify();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
get language() {
|
|
27
|
+
return this._config.language;
|
|
28
|
+
}
|
|
29
|
+
get brand() {
|
|
30
|
+
return this._config.brand;
|
|
31
|
+
}
|
|
32
|
+
set brand(brand) {
|
|
33
|
+
if (brand !== this._config.brand) {
|
|
34
|
+
this._config.brand = brand;
|
|
35
|
+
this._notify();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
set language(language) {
|
|
39
|
+
if (language !== this._config.language) {
|
|
40
|
+
if (this._config.allowedLanguages.includes(language)) {
|
|
41
|
+
this._config.language = language;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this._config.language = this._config.fallbackLanguage;
|
|
45
|
+
}
|
|
46
|
+
this._notify();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
get allowedLanguages() {
|
|
50
|
+
return this._config.allowedLanguages;
|
|
51
|
+
}
|
|
52
|
+
set allowedLanguages(allowedLanguages) {
|
|
53
|
+
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
54
|
+
this._config.allowedLanguages = allowedLanguages;
|
|
55
|
+
this._notify();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
get icons() {
|
|
59
|
+
return this._config.icons;
|
|
60
|
+
}
|
|
61
|
+
set icons(icons) {
|
|
62
|
+
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
63
|
+
this._notify();
|
|
64
|
+
}
|
|
65
|
+
get logger() {
|
|
66
|
+
return this._config.logger;
|
|
67
|
+
}
|
|
68
|
+
set logger(logger) {
|
|
69
|
+
this._config.logger = Object.assign({}, logger);
|
|
70
|
+
this._notify();
|
|
71
|
+
}
|
|
72
|
+
get animated() {
|
|
73
|
+
return this._config.animated;
|
|
74
|
+
}
|
|
75
|
+
set animated(animated) {
|
|
76
|
+
this._config.animated = animated;
|
|
77
|
+
this._notify();
|
|
78
|
+
}
|
|
79
|
+
get httpFormSubmit() {
|
|
80
|
+
return this._config.httpFormSubmit;
|
|
81
|
+
}
|
|
82
|
+
set httpFormSubmit(httpFormSubmit) {
|
|
83
|
+
this._config.httpFormSubmit = httpFormSubmit;
|
|
84
|
+
this._notify();
|
|
85
|
+
}
|
|
86
|
+
attach(observer) {
|
|
87
|
+
const isExist = this._observers.includes(observer);
|
|
88
|
+
if (isExist) {
|
|
89
|
+
return console.log('Subject: Observer has been attached already.');
|
|
90
|
+
}
|
|
91
|
+
this._observers.push(observer);
|
|
92
|
+
observer.configChanged(this._config);
|
|
93
|
+
}
|
|
94
|
+
detach(observer) {
|
|
95
|
+
const observerIndex = this._observers.indexOf(observer);
|
|
96
|
+
if (observerIndex === -1) {
|
|
97
|
+
return console.log('Subject: Nonexistent observer.');
|
|
98
|
+
}
|
|
99
|
+
this._observers.splice(observerIndex, 1);
|
|
100
|
+
}
|
|
101
|
+
attachComponent(observer) {
|
|
102
|
+
const isExist = this._componentObservers.includes(observer);
|
|
103
|
+
if (isExist) {
|
|
104
|
+
return console.log('Subject: Observer has been attached already.');
|
|
105
|
+
}
|
|
106
|
+
this._componentObservers.push(observer);
|
|
107
|
+
observer.configChanged(this._config);
|
|
108
|
+
}
|
|
109
|
+
detachComponent(observer) {
|
|
110
|
+
const observerIndex = this._componentObservers.indexOf(observer);
|
|
111
|
+
if (observerIndex === -1) {
|
|
112
|
+
return console.log('Subject: Nonexistent observer.');
|
|
113
|
+
}
|
|
114
|
+
this._componentObservers.splice(observerIndex, 1);
|
|
115
|
+
}
|
|
116
|
+
toString() {
|
|
117
|
+
return JSON.stringify(this._config);
|
|
118
|
+
}
|
|
119
|
+
reset(config) {
|
|
120
|
+
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
121
|
+
this._notify(false);
|
|
122
|
+
}
|
|
123
|
+
_notify(all = true) {
|
|
124
|
+
for (const observer of this._componentObservers) {
|
|
125
|
+
observer.configChanged(this._config);
|
|
126
|
+
}
|
|
127
|
+
if (all) {
|
|
128
|
+
for (const observer of this._observers) {
|
|
129
|
+
observer.configChanged(this._config);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const config = /*@__PURE__*/ new Config();
|
|
135
|
+
const configFromLocalStorage = (win) => {
|
|
136
|
+
try {
|
|
137
|
+
const animated = JSON.parse(win.localStorage.getItem(BALOISE_ANIMATION_KEY));
|
|
138
|
+
if (animated !== null) {
|
|
139
|
+
return {
|
|
140
|
+
animated,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return {};
|
|
144
|
+
}
|
|
145
|
+
catch (e) {
|
|
146
|
+
return {};
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const setupConfig = (userConfig = {}, win = {}) => {
|
|
151
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
152
|
+
win = window;
|
|
153
|
+
}
|
|
154
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
155
|
+
config.reset(Object.assign(Object.assign(Object.assign({}, configFromLocalStorage(win)), userConfig), { icons: Object.assign({}, userConfig.icons) }));
|
|
156
|
+
win.BaloiseDesignSystem.config = config;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
class BalNoticeController {
|
|
160
|
+
constructor(options) {
|
|
161
|
+
this.options = options;
|
|
162
|
+
this.container = null;
|
|
163
|
+
this.queue = [];
|
|
164
|
+
this.preQueue = [];
|
|
165
|
+
this.queueLimit = 5;
|
|
166
|
+
}
|
|
167
|
+
create(options) {
|
|
168
|
+
if (balBrowser.hasDocument) {
|
|
169
|
+
this.setupContainer(options);
|
|
170
|
+
const clone = this.findClone(options);
|
|
171
|
+
if (clone === undefined) {
|
|
172
|
+
const el = document.createElement(this.options.tag);
|
|
173
|
+
Object.assign(el, options);
|
|
174
|
+
el.addEventListener('balClose', ev => {
|
|
175
|
+
this.removeFromQueue(ev.detail);
|
|
176
|
+
});
|
|
177
|
+
this.preQueue.push(el);
|
|
178
|
+
this.updateQueue();
|
|
179
|
+
return el;
|
|
180
|
+
}
|
|
181
|
+
return clone;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
setQueue(queueLimit) {
|
|
185
|
+
this.queueLimit = queueLimit;
|
|
186
|
+
}
|
|
187
|
+
async dismissAll() {
|
|
188
|
+
var _a;
|
|
189
|
+
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
190
|
+
if (elements) {
|
|
191
|
+
const closingQueue = [];
|
|
192
|
+
for (let index = 0; index < elements.length; index++) {
|
|
193
|
+
const el = elements[index];
|
|
194
|
+
if (el.close) {
|
|
195
|
+
closingQueue.push(el.close());
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
await Promise.all(closingQueue);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @deprecated use dismissAll instead
|
|
203
|
+
*/
|
|
204
|
+
async clearAll() {
|
|
205
|
+
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
206
|
+
return this.dismissAll();
|
|
207
|
+
}
|
|
208
|
+
findClone(options) {
|
|
209
|
+
for (let index = 0; index < this.queue.length; index++) {
|
|
210
|
+
const el = this.queue[index];
|
|
211
|
+
if (el.message === options.message && el.color === options.color) {
|
|
212
|
+
return el;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return undefined;
|
|
216
|
+
}
|
|
217
|
+
setupContainer(options) {
|
|
218
|
+
if (balBrowser.hasDocument) {
|
|
219
|
+
const containerId = `${this.options.tag}-container`;
|
|
220
|
+
this.container = document.getElementById(containerId);
|
|
221
|
+
if (this.container)
|
|
222
|
+
return;
|
|
223
|
+
if (!this.container) {
|
|
224
|
+
this.container = document.createElement('bal-notices');
|
|
225
|
+
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
226
|
+
this.container.setAttribute('animated', options.animated ? 'true' : 'false');
|
|
227
|
+
if (options.container !== undefined) {
|
|
228
|
+
this.container.setAttribute('container', options.container === true ? '' : options.container);
|
|
229
|
+
}
|
|
230
|
+
this.container.id = containerId;
|
|
231
|
+
}
|
|
232
|
+
document.body.appendChild(this.container);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async updateQueue() {
|
|
236
|
+
var _a;
|
|
237
|
+
if (this.queue.length < this.queueLimit) {
|
|
238
|
+
const el = this.preQueue.shift();
|
|
239
|
+
if (el && this.container) {
|
|
240
|
+
await waitForComponent(this.container);
|
|
241
|
+
const innerEl = this.container.querySelector('.bal-notices__inner');
|
|
242
|
+
if (innerEl) {
|
|
243
|
+
this.queue.push(el);
|
|
244
|
+
innerEl.insertAdjacentElement('beforeend', el);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (this.queue.length === 0) {
|
|
249
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
removeFromQueue(toastId) {
|
|
253
|
+
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
254
|
+
setTimeout(() => this.updateQueue(), 0);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
class BalSnackbarController extends BalNoticeController {
|
|
259
|
+
constructor() {
|
|
260
|
+
super({
|
|
261
|
+
tag: 'bal-snackbar',
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
create(options) {
|
|
265
|
+
return super.create(options);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const balSnackbarController = new BalSnackbarController();
|
|
269
|
+
|
|
270
|
+
class BalToastController extends BalNoticeController {
|
|
271
|
+
constructor() {
|
|
272
|
+
super({
|
|
273
|
+
tag: 'bal-toast',
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
create(options) {
|
|
277
|
+
return super.create(options);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const balToastController = new BalToastController();
|
|
281
|
+
|
|
282
|
+
const tags = [
|
|
283
|
+
"bal-accordion",
|
|
284
|
+
"bal-accordion-details",
|
|
285
|
+
"bal-accordion-summary",
|
|
286
|
+
"bal-accordion-trigger",
|
|
287
|
+
"bal-app",
|
|
288
|
+
"bal-badge",
|
|
289
|
+
"bal-button",
|
|
290
|
+
"bal-button-group",
|
|
291
|
+
"bal-card",
|
|
292
|
+
"bal-card-actions",
|
|
293
|
+
"bal-card-button",
|
|
294
|
+
"bal-card-content",
|
|
295
|
+
"bal-card-subtitle",
|
|
296
|
+
"bal-card-title",
|
|
297
|
+
"bal-carousel",
|
|
298
|
+
"bal-carousel-item",
|
|
299
|
+
"bal-check",
|
|
300
|
+
"bal-checkbox",
|
|
301
|
+
"bal-checkbox-group",
|
|
302
|
+
"bal-close",
|
|
303
|
+
"bal-content",
|
|
304
|
+
"bal-data",
|
|
305
|
+
"bal-data-item",
|
|
306
|
+
"bal-data-label",
|
|
307
|
+
"bal-data-value",
|
|
308
|
+
"bal-date",
|
|
309
|
+
"bal-date-calendar",
|
|
310
|
+
"bal-date-calendar-cell",
|
|
311
|
+
"bal-divider",
|
|
312
|
+
"bal-dropdown",
|
|
313
|
+
"bal-field",
|
|
314
|
+
"bal-field-control",
|
|
315
|
+
"bal-field-hint",
|
|
316
|
+
"bal-field-label",
|
|
317
|
+
"bal-field-message",
|
|
318
|
+
"bal-file-upload",
|
|
319
|
+
"bal-footer",
|
|
320
|
+
"bal-form",
|
|
321
|
+
"bal-form-col",
|
|
322
|
+
"bal-form-grid",
|
|
323
|
+
"bal-heading",
|
|
324
|
+
"bal-hint",
|
|
325
|
+
"bal-hint-text",
|
|
326
|
+
"bal-hint-title",
|
|
327
|
+
"bal-icon",
|
|
328
|
+
"bal-input",
|
|
329
|
+
"bal-input-date",
|
|
330
|
+
"bal-input-group",
|
|
331
|
+
"bal-input-slider",
|
|
332
|
+
"bal-input-stepper",
|
|
333
|
+
"bal-label",
|
|
334
|
+
"bal-list",
|
|
335
|
+
"bal-list-item",
|
|
336
|
+
"bal-list-item-accordion-body",
|
|
337
|
+
"bal-list-item-accordion-head",
|
|
338
|
+
"bal-list-item-content",
|
|
339
|
+
"bal-list-item-icon",
|
|
340
|
+
"bal-list-item-subtitle",
|
|
341
|
+
"bal-list-item-title",
|
|
342
|
+
"bal-logo",
|
|
343
|
+
"bal-modal",
|
|
344
|
+
"bal-modal-body",
|
|
345
|
+
"bal-modal-header",
|
|
346
|
+
"bal-nav",
|
|
347
|
+
"bal-nav-link",
|
|
348
|
+
"bal-nav-link-grid",
|
|
349
|
+
"bal-nav-link-grid-col",
|
|
350
|
+
"bal-nav-link-group",
|
|
351
|
+
"bal-nav-menu-bar",
|
|
352
|
+
"bal-nav-menu-flyout",
|
|
353
|
+
"bal-nav-meta-bar",
|
|
354
|
+
"bal-navbar",
|
|
355
|
+
"bal-navbar-brand",
|
|
356
|
+
"bal-navbar-menu",
|
|
357
|
+
"bal-navbar-menu-end",
|
|
358
|
+
"bal-navbar-menu-start",
|
|
359
|
+
"bal-notices",
|
|
360
|
+
"bal-notification",
|
|
361
|
+
"bal-number-input",
|
|
362
|
+
"bal-option",
|
|
363
|
+
"bal-option-list",
|
|
364
|
+
"bal-pagination",
|
|
365
|
+
"bal-popover",
|
|
366
|
+
"bal-popover-content",
|
|
367
|
+
"bal-popup",
|
|
368
|
+
"bal-progress-bar",
|
|
369
|
+
"bal-radio",
|
|
370
|
+
"bal-radio-group",
|
|
371
|
+
"bal-radio-icon",
|
|
372
|
+
"bal-segment",
|
|
373
|
+
"bal-segment-item",
|
|
374
|
+
"bal-select",
|
|
375
|
+
"bal-select-option",
|
|
376
|
+
"bal-shape",
|
|
377
|
+
"bal-sheet",
|
|
378
|
+
"bal-snackbar",
|
|
379
|
+
"bal-spinner",
|
|
380
|
+
"bal-stack",
|
|
381
|
+
"bal-stage",
|
|
382
|
+
"bal-stage-back-link",
|
|
383
|
+
"bal-stage-body",
|
|
384
|
+
"bal-stage-foot",
|
|
385
|
+
"bal-stage-head",
|
|
386
|
+
"bal-stage-image",
|
|
387
|
+
"bal-step-item",
|
|
388
|
+
"bal-steps",
|
|
389
|
+
"bal-switch",
|
|
390
|
+
"bal-tab-item",
|
|
391
|
+
"bal-table",
|
|
392
|
+
"bal-tabs",
|
|
393
|
+
"bal-tag",
|
|
394
|
+
"bal-tag-group",
|
|
395
|
+
"bal-text",
|
|
396
|
+
"bal-textarea",
|
|
397
|
+
"bal-time-input",
|
|
398
|
+
"bal-toast",
|
|
399
|
+
"bal-tooltip"
|
|
400
|
+
];
|
|
401
|
+
|
|
402
|
+
// generated by .build/version.js
|
|
403
|
+
const VERSION = '19.9.3-nightly.20260403';
|
|
404
|
+
|
|
405
|
+
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
406
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
407
|
+
win = window;
|
|
408
|
+
}
|
|
409
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
410
|
+
if (platformConfig) {
|
|
411
|
+
setPlatformHelpers(platformConfig);
|
|
412
|
+
}
|
|
413
|
+
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
414
|
+
win.BaloiseDesignSystem.toastController = balToastController;
|
|
415
|
+
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
416
|
+
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
417
|
+
win.BaloiseDesignSystem.version = VERSION;
|
|
418
|
+
if (userConfig._generateHydrateForCustomElementsOutput) {
|
|
419
|
+
generateHydrateForCustomElementsOutput(tags);
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* This function generates the CSS needed for custom elements hydration and inserts it into the document head.
|
|
424
|
+
* The CSS rules include styles for slot fallback and the hydrated class.
|
|
425
|
+
*
|
|
426
|
+
* This is copied from the Stencil core library.
|
|
427
|
+
* src/runtime/bootstrap-lazy.ts
|
|
428
|
+
*/
|
|
429
|
+
const generateHydrateForCustomElementsOutput = (cmpTags = []) => {
|
|
430
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
431
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
432
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
433
|
+
if (!win.document) {
|
|
434
|
+
console.warn('Stencil: No document found. Skipping bootstrapping lazy components.');
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const head = win.document.head;
|
|
438
|
+
const metaCharset = /* @__PURE__ */ head.querySelector('meta[charset]');
|
|
439
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement('style');
|
|
440
|
+
if (cmpTags.length > 0) {
|
|
441
|
+
dataStyles.textContent += SLOT_FB_CSS;
|
|
442
|
+
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
443
|
+
if (dataStyles.innerHTML.length) {
|
|
444
|
+
dataStyles.setAttribute('data-styles', '');
|
|
445
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
export { BalSnackbarController as B, BalToastController as a, balSnackbarController as b, balToastController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as deepReady,
|
|
1
|
+
import { d as deepReady, a as waitAfterFramePaint, q as debounce } from './helpers.js';
|
|
2
2
|
import { L as ListenerAbstract, a as SingleSubject } from './listener.js';
|
|
3
3
|
|
|
4
4
|
class BalMutationListener extends ListenerAbstract {
|
package/components/overlays.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as balDevice } from './device.js';
|
|
2
2
|
import { L as ListenerAbstract, a as SingleSubject } from './listener.js';
|
|
3
|
-
import {
|
|
3
|
+
import { l as rOnLoad } from './helpers.js';
|
|
4
4
|
|
|
5
5
|
class BalSwipeListener extends ListenerAbstract {
|
|
6
6
|
async connect(el) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from '@stencil/core/internal/client';
|
|
2
2
|
import { B as BEM } from './bem.js';
|
|
3
3
|
import { s as stopEventBubbling } from './form-input.js';
|
|
4
|
-
import { i as isDescendant,
|
|
4
|
+
import { i as isDescendant, q as debounce, o as addEventListener, p as removeEventListener, r as raf } from './helpers.js';
|
|
5
5
|
import { e as isTabKey } from './keyboard.helpers.js';
|
|
6
6
|
|
|
7
7
|
const convert = (value) => parseInt(value.slice(0, -2), 10);
|
package/components/tokens.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as deepReady,
|
|
1
|
+
import { d as deepReady, a as waitAfterFramePaint, q as debounce } from './helpers.js';
|
|
2
2
|
import { L as ListenerAbstract, a as SingleSubject } from './listener.js';
|
|
3
3
|
|
|
4
4
|
class BalVisibilityListener extends ListenerAbstract {
|