@baloise/ds-core 16.5.2-nightly.20241016 → 16.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/components/all.d.ts +0 -2
  2. package/components/all.js +0 -3
  3. package/components/bal-app.js +85 -1
  4. package/components/bal-divider.js +6 -3
  5. package/components/index.js +289 -5
  6. package/components/tokens.esm.js +1 -1
  7. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  8. package/dist/baloise-design-system/baloise-design-system.js +1 -1
  9. package/dist/baloise-design-system/index.esm.js +1 -1
  10. package/dist/baloise-design-system/{p-f959646a.system.js → p-013b4c72.system.js} +1 -1
  11. package/dist/baloise-design-system/{p-21b808e0d9.system.entry.js → p-049f6f9bc3.system.entry.js} +1 -1
  12. package/dist/baloise-design-system/{p-728f5b41.system.js → p-0570eb56.system.js} +1 -1
  13. package/dist/baloise-design-system/{p-4d8fe449d5.system.entry.js → p-06a5a7af22.system.entry.js} +1 -1
  14. package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
  15. package/dist/baloise-design-system/{p-715ca77ce1.system.entry.js → p-22cf548aa1.system.entry.js} +1 -1
  16. package/dist/baloise-design-system/{p-ccd0a1e926.system.entry.js → p-29d8f4a3f3.system.entry.js} +1 -1
  17. package/dist/baloise-design-system/{p-96acac65da.entry.js → p-318d8566b5.entry.js} +1 -1
  18. package/dist/baloise-design-system/{p-8f0603e035.entry.js → p-33e346ee9c.entry.js} +1 -1
  19. package/dist/baloise-design-system/{p-c0e29842fb.entry.js → p-414e6186de.entry.js} +1 -1
  20. package/dist/baloise-design-system/{p-9318d4668f.system.entry.js → p-4ecfee4374.system.entry.js} +1 -1
  21. package/dist/baloise-design-system/{p-59d20b29cf.entry.js → p-5003a0c597.entry.js} +1 -1
  22. package/dist/baloise-design-system/p-54f81c32.js +1 -1
  23. package/dist/baloise-design-system/{p-1440dc0f02.system.entry.js → p-60dccd31d0.system.entry.js} +1 -1
  24. package/dist/baloise-design-system/p-6aafd1a509.entry.js +1 -0
  25. package/dist/baloise-design-system/{p-76edb36f.js → p-7369c393.js} +1 -1
  26. package/dist/baloise-design-system/{p-e3f9726328.entry.js → p-737c1fb94a.entry.js} +1 -1
  27. package/dist/baloise-design-system/{p-534e596b58.entry.js → p-74eb881086.entry.js} +1 -1
  28. package/dist/baloise-design-system/{p-f4fecd6a61.entry.js → p-77cdc5cbab.entry.js} +1 -1
  29. package/dist/baloise-design-system/{p-425a147622.entry.js → p-798e2ef3fc.entry.js} +1 -1
  30. package/dist/baloise-design-system/{p-dcabad09c4.system.entry.js → p-840578b091.system.entry.js} +1 -1
  31. package/dist/baloise-design-system/{p-350ff60bf2.system.entry.js → p-9bff7b8289.system.entry.js} +1 -1
  32. package/dist/baloise-design-system/{p-1999fcbbbb.entry.js → p-9df14aeb44.entry.js} +1 -1
  33. package/dist/baloise-design-system/{p-27c25842.system.js → p-9e2ff161.system.js} +1 -1
  34. package/dist/baloise-design-system/p-a37806b3.js +1 -0
  35. package/dist/baloise-design-system/{p-2996de33c9.system.entry.js → p-a5ef8dac6d.system.entry.js} +1 -1
  36. package/dist/baloise-design-system/{p-69cdf5b662.entry.js → p-a818a7381b.entry.js} +1 -1
  37. package/dist/baloise-design-system/{p-13e6d9b4.system.js → p-ab3a5c74.system.js} +1 -1
  38. package/dist/baloise-design-system/{p-f04137fded.entry.js → p-ae96e76be8.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-f493d1cf99.system.entry.js → p-b439906a26.system.entry.js} +1 -1
  40. package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
  41. package/dist/baloise-design-system/{p-c4737ccfad.system.entry.js → p-c5e4359d53.system.entry.js} +1 -1
  42. package/dist/baloise-design-system/{p-b6e796784f.system.entry.js → p-c7a5bfc385.system.entry.js} +1 -1
  43. package/dist/baloise-design-system/{p-f57acb8d.system.js → p-ca3cb874.system.js} +1 -1
  44. package/dist/baloise-design-system/{p-98f62e5849.system.entry.js → p-ca496a02d5.system.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-540343b3b9.entry.js → p-ce5ca16861.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-efc0b7d41b.entry.js → p-e15280fb2b.entry.js} +1 -1
  47. package/dist/baloise-design-system/p-e78a6409.js +1 -0
  48. package/dist/baloise-design-system/{p-e59f3615.js → p-ea5b8ead.js} +1 -1
  49. package/dist/baloise-design-system/{p-4c19e69b4c.system.entry.js → p-fecc5b1e11.system.entry.js} +1 -1
  50. package/dist/cjs/{global-2562a984.js → app-globals-ae3a8623.js} +4 -2
  51. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  52. package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
  53. package/dist/cjs/bal-divider.cjs.entry.js +4 -2
  54. package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
  55. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  56. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  57. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  58. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  59. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  60. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  61. package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
  62. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  63. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  64. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  65. package/dist/cjs/baloise-design-system.cjs.js +2 -3
  66. package/dist/cjs/{breakpoints.decorator-78f08267.js → breakpoints.decorator-e7e9f44f.js} +1 -1
  67. package/dist/cjs/{breakpoints.subject-7a3a48a5.js → breakpoints.subject-e81f405a.js} +1 -1
  68. package/dist/cjs/index.cjs.js +2 -2
  69. package/dist/cjs/initialize-2a19d091.js +1 -1
  70. package/dist/cjs/loader.cjs.js +2 -3
  71. package/dist/cjs/{tokens.esm-d9c84eb7.js → tokens.esm-bd463bce.js} +1 -1
  72. package/dist/cjs/{window-resize.decorator-f85cd134.js → window-resize.decorator-7c2d851d.js} +1 -1
  73. package/dist/collection/collection-manifest.json +1 -2
  74. package/dist/collection/components/bal-divider/bal-divider.css +1 -1
  75. package/dist/collection/components/bal-divider/bal-divider.js +26 -1
  76. package/dist/collection/utils/constants/version.constant.js +1 -1
  77. package/dist/esm/{global-63f4bcec.js → app-globals-b0dd0fc4.js} +4 -2
  78. package/dist/esm/bal-carousel_2.entry.js +3 -3
  79. package/dist/esm/bal-datepicker.entry.js +3 -3
  80. package/dist/esm/bal-divider.entry.js +4 -2
  81. package/dist/esm/bal-hint_5.entry.js +3 -3
  82. package/dist/esm/bal-list_8.entry.js +3 -3
  83. package/dist/esm/bal-logo.entry.js +3 -3
  84. package/dist/esm/bal-nav_8.entry.js +3 -3
  85. package/dist/esm/bal-navbar_5.entry.js +3 -3
  86. package/dist/esm/bal-pagination.entry.js +3 -3
  87. package/dist/esm/bal-progress-bar.entry.js +4 -4
  88. package/dist/esm/bal-segment_2.entry.js +4 -4
  89. package/dist/esm/bal-shape.entry.js +1 -1
  90. package/dist/esm/bal-steps.entry.js +3 -3
  91. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  92. package/dist/esm/baloise-design-system.js +2 -3
  93. package/dist/esm/{breakpoints.decorator-e82931ce.js → breakpoints.decorator-c7356fbf.js} +1 -1
  94. package/dist/esm/{breakpoints.subject-76a230e3.js → breakpoints.subject-c11e7472.js} +1 -1
  95. package/dist/esm/index.js +3 -3
  96. package/dist/esm/initialize-e216cfe4.js +1 -1
  97. package/dist/esm/loader.js +2 -3
  98. package/dist/esm/{tokens.esm-37a3b6c5.js → tokens.esm-ebe36fdf.js} +1 -1
  99. package/dist/esm/{window-resize.decorator-76d795d0.js → window-resize.decorator-4d922021.js} +1 -1
  100. package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
  101. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  102. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  103. package/dist/esm-es5/bal-divider.entry.js +1 -1
  104. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  105. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  106. package/dist/esm-es5/bal-logo.entry.js +1 -1
  107. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  108. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  109. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  110. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  111. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  112. package/dist/esm-es5/bal-shape.entry.js +1 -1
  113. package/dist/esm-es5/bal-steps.entry.js +1 -1
  114. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  115. package/dist/esm-es5/baloise-design-system.js +1 -1
  116. package/dist/esm-es5/{breakpoints.decorator-e82931ce.js → breakpoints.decorator-c7356fbf.js} +1 -1
  117. package/dist/esm-es5/{breakpoints.subject-76a230e3.js → breakpoints.subject-c11e7472.js} +1 -1
  118. package/dist/esm-es5/index.js +1 -1
  119. package/dist/esm-es5/initialize-e216cfe4.js +1 -1
  120. package/dist/esm-es5/loader.js +1 -1
  121. package/dist/esm-es5/{window-resize.decorator-76d795d0.js → window-resize.decorator-4d922021.js} +1 -1
  122. package/dist/html.html-data.json +12 -0
  123. package/dist/types/components/bal-divider/bal-divider.d.ts +4 -0
  124. package/dist/types/components/bal-divider/bal-divider.interfaces.d.ts +1 -0
  125. package/dist/types/components.d.ts +8 -37
  126. package/package.json +7 -7
  127. package/components/bal-app2.js +0 -87
  128. package/components/bal-doc-app.d.ts +0 -11
  129. package/components/bal-doc-app.js +0 -260
  130. package/components/initialize.js +0 -288
  131. package/dist/baloise-design-system/p-360068a4.system.js +0 -1
  132. package/dist/baloise-design-system/p-4ff656dd48.entry.js +0 -1
  133. package/dist/baloise-design-system/p-6d1b6215.js +0 -1
  134. package/dist/baloise-design-system/p-7291766c.system.js +0 -1
  135. package/dist/baloise-design-system/p-7cc52e4a3b.system.entry.js +0 -1
  136. package/dist/baloise-design-system/p-9aa1b794.js +0 -1
  137. package/dist/baloise-design-system/p-b20a3b881d.entry.js +0 -1
  138. package/dist/baloise-design-system/p-e8ffddeb.js +0 -1
  139. package/dist/cjs/app-globals-5fd73c0c.js +0 -7
  140. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
  141. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  142. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
  143. package/dist/esm/app-globals-970bab17.js +0 -5
  144. package/dist/esm/bal-doc-app.entry.js +0 -227
  145. package/dist/esm-es5/app-globals-970bab17.js +0 -1
  146. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  147. package/dist/esm-es5/global-63f4bcec.js +0 -1
  148. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  149. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
  150. /package/dist/baloise-design-system/{p-08982ec1.system.js → p-788f308a.system.js} +0 -0
  151. /package/dist/baloise-design-system/{p-41b9b40c.js → p-8e798e23.js} +0 -0
  152. /package/dist/esm-es5/{tokens.esm-37a3b6c5.js → tokens.esm-ebe36fdf.js} +0 -0
@@ -28,7 +28,6 @@ import { BalDateCalendar, defineCustomElement as defineBalDateCalendar } from '.
28
28
  import { BalDateCalendarCell, defineCustomElement as defineBalDateCalendarCell } from './bal-date-calendar-cell'
29
29
  import { BalDatepicker, defineCustomElement as defineBalDatepicker } from './bal-datepicker'
30
30
  import { BalDivider, defineCustomElement as defineBalDivider } from './bal-divider'
31
- import { BalDocApp, defineCustomElement as defineBalDocApp } from './bal-doc-app'
32
31
  import { BalDropdown, defineCustomElement as defineBalDropdown } from './bal-dropdown'
33
32
  import { BalField, defineCustomElement as defineBalField } from './bal-field'
34
33
  import { BalFieldControl, defineCustomElement as defineBalFieldControl } from './bal-field-control'
@@ -147,7 +146,6 @@ export { BalDateCalendar, defineBalDateCalendar }
147
146
  export { BalDateCalendarCell, defineBalDateCalendarCell }
148
147
  export { BalDatepicker, defineBalDatepicker }
149
148
  export { BalDivider, defineBalDivider }
150
- export { BalDocApp, defineBalDocApp }
151
149
  export { BalDropdown, defineBalDropdown }
152
150
  export { BalField, defineBalField }
153
151
  export { BalFieldControl, defineBalFieldControl }
package/components/all.js CHANGED
@@ -28,7 +28,6 @@ import { BalDateCalendar, defineCustomElement as defineBalDateCalendar } from '.
28
28
  import { BalDateCalendarCell, defineCustomElement as defineBalDateCalendarCell } from './bal-date-calendar-cell'
29
29
  import { BalDatepicker, defineCustomElement as defineBalDatepicker } from './bal-datepicker'
30
30
  import { BalDivider, defineCustomElement as defineBalDivider } from './bal-divider'
31
- import { BalDocApp, defineCustomElement as defineBalDocApp } from './bal-doc-app'
32
31
  import { BalDropdown, defineCustomElement as defineBalDropdown } from './bal-dropdown'
33
32
  import { BalField, defineCustomElement as defineBalField } from './bal-field'
34
33
  import { BalFieldControl, defineCustomElement as defineBalFieldControl } from './bal-field-control'
@@ -147,7 +146,6 @@ export { BalDateCalendar, defineBalDateCalendar }
147
146
  export { BalDateCalendarCell, defineBalDateCalendarCell }
148
147
  export { BalDatepicker, defineBalDatepicker }
149
148
  export { BalDivider, defineBalDivider }
150
- export { BalDocApp, defineBalDocApp }
151
149
  export { BalDropdown, defineBalDropdown }
152
150
  export { BalField, defineBalField }
153
151
  export { BalFieldControl, defineBalFieldControl }
@@ -267,7 +265,6 @@ export const defineAllComponents = () => {
267
265
  defineBalDateCalendarCell()
268
266
  defineBalDatepicker()
269
267
  defineBalDivider()
270
- defineBalDocApp()
271
268
  defineBalDropdown()
272
269
  defineBalField()
273
270
  defineBalFieldControl()
@@ -1,4 +1,88 @@
1
- import { A as App, d as defineCustomElement$1 } from './bal-app2.js';
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { _ as __decorate, a as __metadata } from './tslib.es6.js';
3
+ import { b as balBrowser } from './browser.js';
4
+ import { b as balDevice } from './device.js';
5
+ import { h as debounce, k as rIC } from './helpers.js';
6
+ import { L as Logger } from './log.js';
7
+ import { s as startFocusVisible } from './focus-visible.js';
8
+ import { b as updateBalAnimated } from './config.utils.js';
9
+
10
+ const balAppCss = ":root{--bal-app-height:100%}.bal-app{position:relative;display:block}";
11
+ const BalAppStyle0 = balAppCss;
12
+
13
+ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
14
+ constructor() {
15
+ super();
16
+ this.__registerHost();
17
+ this.debouncedNotify = debounce(() => this.notifyResize(), 100);
18
+ this.notifyResize = async () => {
19
+ if (balBrowser.hasDocument && balBrowser.hasWindow) {
20
+ const doc = document.documentElement;
21
+ doc.style.setProperty('--bal-app-height', `${window.innerHeight}px`);
22
+ }
23
+ };
24
+ this.animated = true;
25
+ this.ready = false;
26
+ }
27
+ createLogger(log) {
28
+ this.log = log;
29
+ }
30
+ connectedCallback() {
31
+ updateBalAnimated(this.animated);
32
+ if (balBrowser.hasWindow) {
33
+ window.addEventListener('resize', this.debouncedNotify);
34
+ this.debouncedNotify();
35
+ }
36
+ }
37
+ componentDidLoad() {
38
+ rIC(async () => {
39
+ this.ready = true;
40
+ startFocusVisible();
41
+ });
42
+ }
43
+ disconnectedCallback() {
44
+ if (balBrowser.hasWindow) {
45
+ window.removeEventListener('resize', this.debouncedNotify);
46
+ }
47
+ }
48
+ async setFocus(elements) {
49
+ if (this.focusVisible) {
50
+ this.focusVisible.setFocus(elements);
51
+ }
52
+ }
53
+ render() {
54
+ return (h(Host, { class: {
55
+ 'bal-app': true,
56
+ 'bal-app--safari': balBrowser.isSafari,
57
+ 'bal-app--touch': balDevice.hasTouchScreen,
58
+ } }, h("slot", null)));
59
+ }
60
+ get el() { return this; }
61
+ static get style() { return BalAppStyle0; }
62
+ }, [4, "bal-app", {
63
+ "animated": [516],
64
+ "ready": [1540],
65
+ "setFocus": [64]
66
+ }]);
67
+ __decorate([
68
+ Logger('bal-app'),
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", [Function]),
71
+ __metadata("design:returntype", void 0)
72
+ ], App.prototype, "createLogger", null);
73
+ function defineCustomElement$1() {
74
+ if (typeof customElements === "undefined") {
75
+ return;
76
+ }
77
+ const components = ["bal-app"];
78
+ components.forEach(tagName => { switch (tagName) {
79
+ case "bal-app":
80
+ if (!customElements.get(tagName)) {
81
+ customElements.define(tagName, App);
82
+ }
83
+ break;
84
+ } });
85
+ }
2
86
 
3
87
  const BalApp = App;
4
88
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { _ as __decorate, a as __metadata } from './tslib.es6.js';
3
3
  import { B as BEM } from './bem.js';
4
4
  import { L as Logger } from './log.js';
5
5
 
6
- const balDividerCss = ":root{--bal-divider-border-width:var(--bal-border-width-normal);--bal-divider-background-primary:var(--bal-color-border-primary);--bal-divider-background-primary-light:var(--bal-color-border-primary-light);--bal-divider-background-primary-dark:var(--bal-color-border-primary-pressed);--bal-divider-background-grey-light:var(--bal-color-border-divider);--bal-divider-background-grey:var(--bal-color-border);--bal-divider-background-grey-dark:var(--bal-color-border-grey-dark);--bal-divider-background-warning:var(--bal-color-border-warning);--bal-divider-background-success:var(--bal-color-border-success);--bal-divider-background-danger:var(--bal-color-border-danger);--bal-divider-background-danger-dark:var(--bal-color-border-danger-hovered);--bal-divider-background-danger-darker:var(--bal-color-border-danger-pressed);--bal-divider-background-white:var(--bal-color-border-inverted);--bal-divider-background-light-blue:var(--bal-color-border-primary-hovered);--bal-divider-radius:var(--bal-radius-rounded)}.bal-divider{margin:0;display:block;border-radius:var(--bal-divider-radius)}.bal-divider--color-primary{background:var(--bal-divider-background-primary)}.bal-divider--color-primary-light{background:var(--bal-divider-background-primary-light)}.bal-divider--color-primary-dark{background:var(--bal-divider-background-primary-dark)}.bal-divider--color-grey-light{background:var(--bal-divider-background-grey-light)}.bal-divider--color-grey{background:var(--bal-divider-background-grey)}.bal-divider--color-grey-dark{background:var(--bal-divider-background-grey-dark)}.bal-divider--color-warning{background:var(--bal-divider-background-warning)}.bal-divider--color-success{background:var(--bal-divider-background-success)}.bal-divider--color-danger{background:var(--bal-divider-background-danger)}.bal-divider--color-danger-dark{background:var(--bal-divider-background-danger-dark)}.bal-divider--color-danger-darker{background:var(--bal-divider-background-danger-darker)}.bal-divider--color-white{background:var(--bal-divider-background-white)}.bal-divider--color-light-blue{background:var(--bal-divider-background-light-blue)}.bal-divider--layout-horizontal{-ms-flex:1 0 100%;flex:1 0 100%;width:100%;min-height:var(--bal-divider-border-width);height:var(--bal-divider-border-width)}.bal-divider--layout-vertical{height:auto;-ms-flex-negative:0;flex-shrink:0;-ms-flex-item-align:stretch;align-self:stretch;width:var(--bal-divider-border-width)}.bal-divider--space-none{margin:0}.bal-divider--space-xx-small{margin:var(--bal-space-xx-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xx-small{margin:var(--bal-space-xx-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xx-small{margin:var(--bal-space-xx-small-desktop) 0}}.bal-divider--space-x-small{margin:var(--bal-space-x-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-x-small{margin:var(--bal-space-x-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-x-small{margin:var(--bal-space-x-small-desktop) 0}}.bal-divider--space-small{margin:var(--bal-space-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-small{margin:var(--bal-space-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-small{margin:var(--bal-space-small-desktop) 0}}.bal-divider--space-normal{margin:var(--bal-space-normal) 0}@media screen and (min-width: 769px),print{.bal-divider--space-normal{margin:var(--bal-space-normal-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-normal{margin:var(--bal-space-normal-desktop) 0}}.bal-divider--space-medium{margin:var(--bal-space-medium) 0}@media screen and (min-width: 769px),print{.bal-divider--space-medium{margin:var(--bal-space-medium-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-medium{margin:var(--bal-space-medium-desktop) 0}}.bal-divider--space-large{margin:var(--bal-space-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-large{margin:var(--bal-space-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-large{margin:var(--bal-space-large-desktop) 0}}.bal-divider--space-x-large{margin:var(--bal-space-x-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-x-large{margin:var(--bal-space-x-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-x-large{margin:var(--bal-space-x-large-desktop) 0}}.bal-divider--space-xx-large{margin:var(--bal-space-xx-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xx-large{margin:var(--bal-space-xx-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xx-large{margin:var(--bal-space-xx-large-desktop) 0}}.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large-desktop) 0}}.bal-divider--layout-vertical.bal-divider--space-none{margin:0}.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal-desktop)}}.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium-desktop)}}.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large-desktop)}}";
6
+ const balDividerCss = ":root{--bal-divider-border-width:var(--bal-border-width-normal);--bal-divider-background-primary:var(--bal-color-border-primary);--bal-divider-background-primary-light:var(--bal-color-border-primary-light);--bal-divider-background-primary-dark:var(--bal-color-border-primary-pressed);--bal-divider-background-grey-light:var(--bal-color-border-divider);--bal-divider-background-grey:var(--bal-color-border);--bal-divider-background-grey-dark:var(--bal-color-border-grey-dark);--bal-divider-background-warning:var(--bal-color-border-warning);--bal-divider-background-success:var(--bal-color-border-success);--bal-divider-background-danger:var(--bal-color-border-danger);--bal-divider-background-danger-dark:var(--bal-color-border-danger-hovered);--bal-divider-background-danger-darker:var(--bal-color-border-danger-pressed);--bal-divider-background-white:var(--bal-color-border-inverted);--bal-divider-background-light-blue:var(--bal-color-border-primary-hovered);--bal-divider-radius:var(--bal-radius-rounded)}.bal-divider{margin:0;display:block;border-radius:var(--bal-divider-radius)}.bal-divider--color-primary{background:var(--bal-divider-background-primary)}.bal-divider--color-primary-light{background:var(--bal-divider-background-primary-light)}.bal-divider--color-primary-dark{background:var(--bal-divider-background-primary-dark)}.bal-divider--color-grey-light{background:var(--bal-divider-background-grey-light)}.bal-divider--color-grey{background:var(--bal-divider-background-grey)}.bal-divider--color-grey-dark{background:var(--bal-divider-background-grey-dark)}.bal-divider--color-warning{background:var(--bal-divider-background-warning)}.bal-divider--color-success{background:var(--bal-divider-background-success)}.bal-divider--color-danger{background:var(--bal-divider-background-danger)}.bal-divider--color-danger-dark{background:var(--bal-divider-background-danger-dark)}.bal-divider--color-danger-darker{background:var(--bal-divider-background-danger-darker)}.bal-divider--color-white{background:var(--bal-divider-background-white)}.bal-divider--color-light-blue{background:var(--bal-divider-background-light-blue)}.bal-divider--layout-horizontal{-ms-flex:1 0 100%;flex:1 0 100%;width:100%;min-height:var(--bal-divider-border-width);height:var(--bal-divider-border-width)}.bal-divider--layout-vertical{height:auto;-ms-flex-negative:0;flex-shrink:0;-ms-flex-item-align:stretch;align-self:stretch;width:var(--bal-divider-border-width)}.bal-divider--border-style-dashed.bal-divider--color-primary{background:repeating-linear-gradient(90deg, var(--bal-divider-background-primary) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-primary-light{background:repeating-linear-gradient(90deg, var(--bal-divider-background-primary-light) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-primary-dark{background:repeating-linear-gradient(90deg, var(--bal-divider-background-primary-dark) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-grey-light{background:repeating-linear-gradient(90deg, var(--bal-divider-background-grey-light) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-grey{background:repeating-linear-gradient(90deg, var(--bal-divider-background-grey) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-grey-dark{background:repeating-linear-gradient(90deg, var(--bal-divider-background-grey-dark) 0px, var --bal-divider-background-grey 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-warning{background:repeating-linear-gradient(90deg, var(--bal-divider-background-warning) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-success{background:repeating-linear-gradient(90deg, var(--bal-divider-background-success) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-danger{background:repeating-linear-gradient(90deg, var(--bal-divider-background-danger) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-danger-dark{background:repeating-linear-gradient(90deg, var(--bal-divider-background-danger-dark) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-danger-darker{background:repeating-linear-gradient(90deg, var(--bal-divider-background-danger-darker) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-white{background:repeating-linear-gradient(90deg, var(--bal-divider-background-white) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--border-style-dashed.bal-divider--color-light-blue{background:repeating-linear-gradient(90deg, var(--bal-divider-background-light-blue) 0px, var(--bal-divider-background-grey) 8px, transparent 8px, transparent 16px)}.bal-divider--space-none{margin:0}.bal-divider--space-xx-small{margin:var(--bal-space-xx-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xx-small{margin:var(--bal-space-xx-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xx-small{margin:var(--bal-space-xx-small-desktop) 0}}.bal-divider--space-x-small{margin:var(--bal-space-x-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-x-small{margin:var(--bal-space-x-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-x-small{margin:var(--bal-space-x-small-desktop) 0}}.bal-divider--space-small{margin:var(--bal-space-small) 0}@media screen and (min-width: 769px),print{.bal-divider--space-small{margin:var(--bal-space-small-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-small{margin:var(--bal-space-small-desktop) 0}}.bal-divider--space-normal{margin:var(--bal-space-normal) 0}@media screen and (min-width: 769px),print{.bal-divider--space-normal{margin:var(--bal-space-normal-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-normal{margin:var(--bal-space-normal-desktop) 0}}.bal-divider--space-medium{margin:var(--bal-space-medium) 0}@media screen and (min-width: 769px),print{.bal-divider--space-medium{margin:var(--bal-space-medium-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-medium{margin:var(--bal-space-medium-desktop) 0}}.bal-divider--space-large{margin:var(--bal-space-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-large{margin:var(--bal-space-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-large{margin:var(--bal-space-large-desktop) 0}}.bal-divider--space-x-large{margin:var(--bal-space-x-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-x-large{margin:var(--bal-space-x-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-x-large{margin:var(--bal-space-x-large-desktop) 0}}.bal-divider--space-xx-large{margin:var(--bal-space-xx-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xx-large{margin:var(--bal-space-xx-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xx-large{margin:var(--bal-space-xx-large-desktop) 0}}.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large) 0}@media screen and (min-width: 769px),print{.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large-tablet) 0}}@media screen and (min-width: 1024px){.bal-divider--space-xxx-large{margin:var(--bal-space-xxx-large-desktop) 0}}.bal-divider--layout-vertical.bal-divider--space-none{margin:0}.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xx-small{margin:0 var(--bal-space-xx-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-x-small{margin:0 var(--bal-space-x-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-small{margin:0 var(--bal-space-small-desktop)}}.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-normal{margin:0 var(--bal-space-normal-desktop)}}.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-medium{margin:0 var(--bal-space-medium-desktop)}}.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-large{margin:0 var(--bal-space-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-x-large{margin:0 var(--bal-space-x-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xx-large{margin:0 var(--bal-space-xx-large-desktop)}}.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large)}@media screen and (min-width: 769px),print{.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large-tablet)}}@media screen and (min-width: 1024px){.bal-divider--layout-vertical.bal-divider--space-xxx-large{margin:0 var(--bal-space-xxx-large-desktop)}}";
7
7
  const BalDividerStyle0 = balDividerCss;
8
8
 
9
9
  const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends HTMLElement {
@@ -13,6 +13,7 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends HTMLEleme
13
13
  this.layout = 'horizontal';
14
14
  this.space = 'none';
15
15
  this.color = 'grey';
16
+ this.borderStyle = 'solid';
16
17
  }
17
18
  createLogger(log) {
18
19
  this.log = log;
@@ -26,13 +27,15 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends HTMLEleme
26
27
  const layout = !!this.layout;
27
28
  const space = !!this.space;
28
29
  const color = !!this.color;
29
- return (h(Host, { role: "separator", class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier(`layout-${this.layout}`).class(layout)), block.modifier(`space-${this.space}`).class(space)), block.modifier(`color-${this.color}`).class(color)) }, h("slot", null)));
30
+ const borderStyle = !!this.borderStyle;
31
+ return (h(Host, { role: "separator", class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier(`layout-${this.layout}`).class(layout)), block.modifier(`space-${this.space}`).class(space)), block.modifier(`color-${this.color}`).class(color)), block.modifier(`border-style-${this.borderStyle}`).class(borderStyle)) }, h("slot", null)));
30
32
  }
31
33
  static get style() { return BalDividerStyle0; }
32
34
  }, [4, "bal-divider", {
33
35
  "layout": [1],
34
36
  "space": [1],
35
- "color": [1]
37
+ "color": [1],
38
+ "borderStyle": [1, "border-style"]
36
39
  }]);
37
40
  __decorate([
38
41
  Logger('bal-divider'),
@@ -1,3 +1,4 @@
1
+ import { setPlatformHelpers } from '@stencil/core/internal/client';
1
2
  export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
3
  export { F as FileUploadRejectionReason } from './bal-file-upload.type.js';
3
4
  export { i as i18nBalDate } from './bal-date.i18n.js';
@@ -6,7 +7,10 @@ export { i as i18nBalDatepicker } from './bal-datepicker.i18n.js';
6
7
  export { i as i18nBalTimeInput } from './bal-time-input.i18n.js';
7
8
  export { i as i18nBalInputStepper } from './bal-input-stepper.i18n.js';
8
9
  export { i as i18nBalLabel } from './bal-label.i18n.js';
9
- 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';
10
+ import { b as balBrowser } from './browser.js';
11
+ export { b as balBrowser } from './browser.js';
12
+ import { d as defaultConfig } from './config.default.js';
13
+ export { d as defaultConfig } from './config.default.js';
10
14
  export { n as newBalOption } from './option.js';
11
15
  export { n as newBalStepOption } from './bal-step.util.js';
12
16
  export { n as newBalTabOption } from './bal-tab.util.js';
@@ -14,8 +18,6 @@ import { g as getAppRoot, c as componentOnReady } from './helpers.js';
14
18
  export { c as componentOnReady, e as deepReady, g as getAppRoot, i as isDescendant, s as shallowReady, f as wait, b as waitAfterFramePaint, d as waitAfterIdleCallback, w as waitForComponent, a as waitForDesignSystem } from './helpers.js';
15
19
  export { s as scrollToFirstInvalidField } from './form.js';
16
20
  export { B as BalScrollHandler } from './scroll.js';
17
- import { b as balBrowser } from './browser.js';
18
- export { b as balBrowser } from './browser.js';
19
21
  import { b as balDevice } from './device.js';
20
22
  export { B as BalDevice, b as balDevice } from './device.js';
21
23
  export { I as INVALID_VALUE } from './mask-util.js';
@@ -23,11 +25,160 @@ import { g as getOverlays, a as getOverlay } from './overlays.js';
23
25
  import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
24
26
  export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
25
27
  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';
26
- export { d as defaultConfig } from './config.default.js';
27
28
  import { S as Subject } from './listener.js';
28
29
  export { B as BalSwipeSubject } from './swipe.subject.js';
29
30
  export { B as BalDate } from './date.js';
30
31
 
32
+ const BALOISE_SESSION_KEY = 'baloise-persist-config';
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 saveConfig = (win, c) => {
165
+ try {
166
+ win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
167
+ }
168
+ catch (e) {
169
+ return;
170
+ }
171
+ };
172
+
173
+ const setupConfig = (userConfig = {}, win = {}) => {
174
+ if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
175
+ win = window;
176
+ }
177
+ win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
178
+ config.reset(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
179
+ win.BaloiseDesignSystem.config = config;
180
+ };
181
+
31
182
  const i18nBalFieldLabel = {
32
183
  de: {
33
184
  optional: ' (optional)',
@@ -61,6 +212,139 @@ const i18nBalFieldLabel = {
61
212
  },
62
213
  };
63
214
 
215
+ class BalNoticeController {
216
+ constructor(options) {
217
+ this.options = options;
218
+ this.container = null;
219
+ this.queue = [];
220
+ this.preQueue = [];
221
+ this.queueLimit = 5;
222
+ }
223
+ create(options) {
224
+ if (balBrowser.hasDocument) {
225
+ this.setupContainer();
226
+ const clone = this.findClone(options);
227
+ if (clone === undefined) {
228
+ const el = document.createElement(this.options.tag);
229
+ Object.assign(el, options);
230
+ el.addEventListener('balClose', ev => {
231
+ this.removeFromQueue(ev.detail);
232
+ });
233
+ this.preQueue.push(el);
234
+ this.updateQueue();
235
+ return el;
236
+ }
237
+ return clone;
238
+ }
239
+ }
240
+ setQueue(queueLimit) {
241
+ this.queueLimit = queueLimit;
242
+ }
243
+ async dismissAll() {
244
+ var _a;
245
+ const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
246
+ if (elements) {
247
+ const closingQueue = [];
248
+ for (let index = 0; index < elements.length; index++) {
249
+ const el = elements[index];
250
+ if (el.close) {
251
+ closingQueue.push(el.close());
252
+ }
253
+ }
254
+ await Promise.all(closingQueue);
255
+ }
256
+ }
257
+ /**
258
+ * @deprecated use dismissAll instead
259
+ */
260
+ async clearAll() {
261
+ console.warn('[DEPRECATED] - use dismissAll() instead');
262
+ return this.dismissAll();
263
+ }
264
+ findClone(options) {
265
+ for (let index = 0; index < this.queue.length; index++) {
266
+ const el = this.queue[index];
267
+ if (el.message === options.message && el.color === options.color) {
268
+ return el;
269
+ }
270
+ }
271
+ return undefined;
272
+ }
273
+ setupContainer() {
274
+ if (balBrowser.hasDocument) {
275
+ const containerId = `${this.options.tag}-container`;
276
+ this.container = document.getElementById(containerId);
277
+ if (this.container)
278
+ return;
279
+ if (!this.container) {
280
+ this.container = document.createElement('bal-notices');
281
+ this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
282
+ this.container.id = containerId;
283
+ }
284
+ document.body.appendChild(this.container);
285
+ }
286
+ }
287
+ updateQueue() {
288
+ var _a;
289
+ if (this.queue.length < this.queueLimit) {
290
+ const el = this.preQueue.shift();
291
+ if (el && this.container) {
292
+ this.queue.push(el);
293
+ this.container.insertAdjacentElement('beforeend', el);
294
+ }
295
+ }
296
+ if (this.queue.length === 0) {
297
+ (_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
298
+ }
299
+ }
300
+ removeFromQueue(toastId) {
301
+ this.queue = this.queue.filter(el => el.id !== toastId);
302
+ setTimeout(() => this.updateQueue(), 0);
303
+ }
304
+ }
305
+
306
+ class BalToastController extends BalNoticeController {
307
+ constructor() {
308
+ super({
309
+ tag: 'bal-toast',
310
+ });
311
+ }
312
+ create(options) {
313
+ return super.create(options);
314
+ }
315
+ }
316
+ const balToastController = new BalToastController();
317
+
318
+ class BalSnackbarController extends BalNoticeController {
319
+ constructor() {
320
+ super({
321
+ tag: 'bal-snackbar',
322
+ });
323
+ }
324
+ create(options) {
325
+ return super.create(options);
326
+ }
327
+ }
328
+ const balSnackbarController = new BalSnackbarController();
329
+
330
+ // generated by .build/version.js
331
+ const VERSION = '16.6.0';
332
+
333
+ const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
334
+ if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
335
+ win = window;
336
+ }
337
+ win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
338
+ if (platformConfig) {
339
+ setPlatformHelpers(platformConfig);
340
+ }
341
+ setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
342
+ win.BaloiseDesignSystem.toastController = balToastController;
343
+ win.BaloiseDesignSystem.snackbarController = balSnackbarController;
344
+ win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
345
+ win.BaloiseDesignSystem.version = VERSION;
346
+ };
347
+
64
348
  const newBalCheckboxOption = (option) => {
65
349
  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 });
66
350
  };
@@ -178,4 +462,4 @@ const isPlatform = (winOrPlatform, platform) => {
178
462
  const NewBalOptionValue = newBalOptionValue;
179
463
  const NewBalSingleOptionValue = newBalSingleOptionValue;
180
464
 
181
- export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
465
+ export { BalModalController, BalOrientationSubject, BalSnackbarController, BalToastController, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, balSnackbarController, balToastController, getPlatforms, hasTouchSupport, i18nBalFieldLabel, initializeBaloiseDesignSystem as initialize, initializeBaloiseDesignSystem, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue, setupConfig };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 16 Oct 2024 06:14:13 GMT
3
+ * Generated on Wed, 16 Oct 2024 08:59:28 GMT
4
4
  */
5
5
  const balColorGreen3 = "#94e3d4";
6
6
  const balColorGreen6 = "#1b5951";