@baloise/ds-core 19.0.0-nightly.20250521 → 19.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/components/all.d.ts +0 -2
  2. package/components/all.js +0 -3
  3. package/components/bal-app.js +93 -1
  4. package/components/bal-radio2.js +4 -9
  5. package/components/index.js +314 -7
  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-002d7bb9.js +1 -0
  11. package/dist/baloise-design-system/{p-fba8996de6.system.entry.js → p-058dece332.system.entry.js} +1 -1
  12. package/dist/baloise-design-system/{p-2bfab45958.entry.js → p-0ac528b6cb.entry.js} +1 -1
  13. package/dist/baloise-design-system/{p-42b3836a.system.js → p-1e738175.system.js} +1 -1
  14. package/dist/baloise-design-system/{p-a1659effa2.system.entry.js → p-234c26f450.system.entry.js} +1 -1
  15. package/dist/baloise-design-system/{p-4aa6c30187.entry.js → p-2556cb83d1.entry.js} +1 -1
  16. package/dist/baloise-design-system/{p-70c83fd67d.system.entry.js → p-2bc77d4c8d.system.entry.js} +1 -1
  17. package/dist/baloise-design-system/p-345aa92d.system.js +1 -0
  18. package/dist/baloise-design-system/{p-bf8766cc2e.entry.js → p-36ce945a77.entry.js} +1 -1
  19. package/dist/baloise-design-system/p-3913c6ae.js +1 -1
  20. package/dist/baloise-design-system/{p-c8ca3755.js → p-3b1a0df0.js} +1 -1
  21. package/dist/baloise-design-system/{p-2b8df03802.entry.js → p-40b022e526.entry.js} +1 -1
  22. package/dist/baloise-design-system/{p-83512f21.system.js → p-456114b8.system.js} +1 -1
  23. package/dist/baloise-design-system/{p-048f6753.system.js → p-5281d378.system.js} +1 -1
  24. package/dist/baloise-design-system/{p-22d31cca32.system.entry.js → p-58cd37922d.system.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-52be396d3e.system.entry.js → p-5cfc65b40f.system.entry.js} +1 -1
  26. package/dist/baloise-design-system/{p-515ab2f1.system.js → p-655d37c8.system.js} +1 -1
  27. package/dist/baloise-design-system/p-659ecadc.system.js +1 -1
  28. package/dist/baloise-design-system/{p-af6258b471.system.entry.js → p-817f7907be.system.entry.js} +1 -1
  29. package/dist/baloise-design-system/{p-8bec751e53.system.entry.js → p-859c0fae39.system.entry.js} +1 -1
  30. package/dist/baloise-design-system/{p-e2b53f14d2.entry.js → p-85a6191cd8.entry.js} +1 -1
  31. package/dist/baloise-design-system/{p-1b0191b01d.system.entry.js → p-8f17a55f2b.system.entry.js} +1 -1
  32. package/dist/baloise-design-system/{p-6e32e3fd7f.entry.js → p-917729be7f.entry.js} +1 -1
  33. package/dist/baloise-design-system/p-98b6f8ba43.entry.js +1 -0
  34. package/dist/baloise-design-system/{p-de0cd4d4e9.system.entry.js → p-9f14664495.system.entry.js} +1 -1
  35. package/dist/baloise-design-system/{p-e4756237cb.system.entry.js → p-a15a24d3a1.system.entry.js} +1 -1
  36. package/dist/baloise-design-system/{p-66a13bca60.system.entry.js → p-b268996da1.system.entry.js} +1 -1
  37. package/dist/baloise-design-system/{p-7de2a95fad.entry.js → p-b26a67d805.entry.js} +1 -1
  38. package/dist/baloise-design-system/{p-d5a8abdffb.entry.js → p-b79164fedd.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-2ed7623b6a.entry.js → p-bbdf082862.entry.js} +1 -1
  40. package/dist/baloise-design-system/{p-340204c5.system.js → p-beb28f85.system.js} +1 -1
  41. package/dist/baloise-design-system/{p-832bbfc7f7.system.entry.js → p-c661a0bb96.system.entry.js} +1 -1
  42. package/dist/baloise-design-system/{p-43becf4f4a.entry.js → p-c8ee46d5bc.entry.js} +1 -1
  43. package/dist/baloise-design-system/{p-7931d64983.system.entry.js → p-df5ddf4439.system.entry.js} +1 -1
  44. package/dist/baloise-design-system/{p-df3f2b1cf6.entry.js → p-ee275c12a9.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-a50bf448.js → p-ef4bf5f5.js} +1 -1
  46. package/dist/baloise-design-system/{p-d15334b9f7.entry.js → p-f005df0cd0.entry.js} +1 -1
  47. package/dist/baloise-design-system/{p-3ec393b3.js → p-f89208a3.js} +1 -1
  48. package/dist/cjs/{global-2a76769b.js → app-globals-0d8db19e.js} +4 -2
  49. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  50. package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
  51. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  52. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  53. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  54. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  55. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  56. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  57. package/dist/cjs/bal-radio_2.cjs.entry.js +4 -9
  58. package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
  59. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  60. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  61. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  62. package/dist/cjs/baloise-design-system.cjs.js +2 -3
  63. package/dist/cjs/{breakpoints.decorator-9af03ab2.js → breakpoints.decorator-9a0be218.js} +1 -1
  64. package/dist/cjs/{breakpoints.subject-6ab07ab8.js → breakpoints.subject-19c7123e.js} +1 -1
  65. package/dist/cjs/index.cjs.js +2 -2
  66. package/dist/cjs/initialize-2e8978a4.js +1 -1
  67. package/dist/cjs/loader.cjs.js +2 -3
  68. package/dist/cjs/{tokens.esm-25cb0474.js → tokens.esm-3468979c.js} +1 -1
  69. package/dist/cjs/{window-resize.decorator-c1dc9455.js → window-resize.decorator-86974eaf.js} +1 -1
  70. package/dist/collection/collection-manifest.json +1 -2
  71. package/dist/collection/components/bal-radio/bal-radio.js +4 -9
  72. package/dist/collection/utils/constants/version.constant.js +1 -1
  73. package/dist/esm/{global-6e86728b.js → app-globals-5dd5fe6b.js} +4 -2
  74. package/dist/esm/bal-carousel_2.entry.js +3 -3
  75. package/dist/esm/bal-hint_5.entry.js +3 -3
  76. package/dist/esm/bal-list_8.entry.js +3 -3
  77. package/dist/esm/bal-logo.entry.js +3 -3
  78. package/dist/esm/bal-nav_8.entry.js +3 -3
  79. package/dist/esm/bal-navbar_5.entry.js +3 -3
  80. package/dist/esm/bal-pagination.entry.js +3 -3
  81. package/dist/esm/bal-progress-bar.entry.js +4 -4
  82. package/dist/esm/bal-radio_2.entry.js +4 -9
  83. package/dist/esm/bal-segment_2.entry.js +4 -4
  84. package/dist/esm/bal-shape.entry.js +1 -1
  85. package/dist/esm/bal-steps.entry.js +3 -3
  86. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  87. package/dist/esm/baloise-design-system.js +2 -3
  88. package/dist/esm/{breakpoints.decorator-96df0648.js → breakpoints.decorator-899aba5d.js} +1 -1
  89. package/dist/esm/{breakpoints.subject-e1eca12e.js → breakpoints.subject-2397d734.js} +1 -1
  90. package/dist/esm/index.js +3 -3
  91. package/dist/esm/initialize-be160cc4.js +1 -1
  92. package/dist/esm/loader.js +2 -3
  93. package/dist/esm/{tokens.esm-b4dd8e76.js → tokens.esm-a6a0f537.js} +1 -1
  94. package/dist/esm/{window-resize.decorator-0a707742.js → window-resize.decorator-f286b710.js} +1 -1
  95. package/dist/esm-es5/app-globals-5dd5fe6b.js +1 -0
  96. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  97. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  98. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  99. package/dist/esm-es5/bal-logo.entry.js +1 -1
  100. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  101. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  102. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  103. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  104. package/dist/esm-es5/bal-radio_2.entry.js +1 -1
  105. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  106. package/dist/esm-es5/bal-shape.entry.js +1 -1
  107. package/dist/esm-es5/bal-steps.entry.js +1 -1
  108. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  109. package/dist/esm-es5/baloise-design-system.js +1 -1
  110. package/dist/esm-es5/breakpoints.decorator-899aba5d.js +1 -0
  111. package/dist/esm-es5/{breakpoints.subject-e1eca12e.js → breakpoints.subject-2397d734.js} +1 -1
  112. package/dist/esm-es5/index.js +1 -1
  113. package/dist/esm-es5/initialize-be160cc4.js +1 -1
  114. package/dist/esm-es5/loader.js +1 -1
  115. package/dist/esm-es5/{window-resize.decorator-0a707742.js → window-resize.decorator-f286b710.js} +1 -1
  116. package/dist/types/components.d.ts +0 -37
  117. package/package.json +6 -6
  118. package/components/bal-app2.js +0 -95
  119. package/components/bal-doc-app.d.ts +0 -11
  120. package/components/bal-doc-app.js +0 -262
  121. package/components/initialize.js +0 -312
  122. package/dist/baloise-design-system/p-01d1565bf3.entry.js +0 -1
  123. package/dist/baloise-design-system/p-1e142b10.system.js +0 -1
  124. package/dist/baloise-design-system/p-294f38c2.js +0 -1
  125. package/dist/baloise-design-system/p-343cc097d4.entry.js +0 -1
  126. package/dist/baloise-design-system/p-42e66219.system.js +0 -1
  127. package/dist/baloise-design-system/p-47f0669a.js +0 -1
  128. package/dist/baloise-design-system/p-96301206d3.system.entry.js +0 -1
  129. package/dist/cjs/app-globals-f63c33e7.js +0 -7
  130. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -233
  131. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  132. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -247
  133. package/dist/esm/app-globals-1ecf000f.js +0 -5
  134. package/dist/esm/bal-doc-app.entry.js +0 -229
  135. package/dist/esm-es5/app-globals-1ecf000f.js +0 -1
  136. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  137. package/dist/esm-es5/breakpoints.decorator-96df0648.js +0 -1
  138. package/dist/esm-es5/global-6e86728b.js +0 -1
  139. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  140. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -82
  141. /package/dist/baloise-design-system/{p-e521a2e6.js → p-95d42ad1.js} +0 -0
  142. /package/dist/baloise-design-system/{p-ee5d1507.system.js → p-cebe968d.system.js} +0 -0
  143. /package/dist/esm-es5/{tokens.esm-b4dd8e76.js → tokens.esm-a6a0f537.js} +0 -0
@@ -27,7 +27,6 @@ import { BalDate, defineCustomElement as defineBalDate } from './bal-date'
27
27
  import { BalDateCalendar, defineCustomElement as defineBalDateCalendar } from './bal-date-calendar'
28
28
  import { BalDateCalendarCell, defineCustomElement as defineBalDateCalendarCell } from './bal-date-calendar-cell'
29
29
  import { BalDivider, defineCustomElement as defineBalDivider } from './bal-divider'
30
- import { BalDocApp, defineCustomElement as defineBalDocApp } from './bal-doc-app'
31
30
  import { BalDropdown, defineCustomElement as defineBalDropdown } from './bal-dropdown'
32
31
  import { BalField, defineCustomElement as defineBalField } from './bal-field'
33
32
  import { BalFieldControl, defineCustomElement as defineBalFieldControl } from './bal-field-control'
@@ -146,7 +145,6 @@ export { BalDate, defineBalDate }
146
145
  export { BalDateCalendar, defineBalDateCalendar }
147
146
  export { BalDateCalendarCell, defineBalDateCalendarCell }
148
147
  export { BalDivider, defineBalDivider }
149
- export { BalDocApp, defineBalDocApp }
150
148
  export { BalDropdown, defineBalDropdown }
151
149
  export { BalField, defineBalField }
152
150
  export { BalFieldControl, defineBalFieldControl }
package/components/all.js CHANGED
@@ -27,7 +27,6 @@ import { BalDate, defineCustomElement as defineBalDate } from './bal-date'
27
27
  import { BalDateCalendar, defineCustomElement as defineBalDateCalendar } from './bal-date-calendar'
28
28
  import { BalDateCalendarCell, defineCustomElement as defineBalDateCalendarCell } from './bal-date-calendar-cell'
29
29
  import { BalDivider, defineCustomElement as defineBalDivider } from './bal-divider'
30
- import { BalDocApp, defineCustomElement as defineBalDocApp } from './bal-doc-app'
31
30
  import { BalDropdown, defineCustomElement as defineBalDropdown } from './bal-dropdown'
32
31
  import { BalField, defineCustomElement as defineBalField } from './bal-field'
33
32
  import { BalFieldControl, defineCustomElement as defineBalFieldControl } from './bal-field-control'
@@ -146,7 +145,6 @@ export { BalDate, defineBalDate }
146
145
  export { BalDateCalendar, defineBalDateCalendar }
147
146
  export { BalDateCalendarCell, defineBalDateCalendarCell }
148
147
  export { BalDivider, defineBalDivider }
149
- export { BalDocApp, defineBalDocApp }
150
148
  export { BalDropdown, defineBalDropdown }
151
149
  export { BalField, defineBalField }
152
150
  export { BalFieldControl, defineBalFieldControl }
@@ -266,7 +264,6 @@ export const defineAllComponents = () => {
266
264
  defineBalDateCalendar()
267
265
  defineBalDateCalendarCell()
268
266
  defineBalDivider()
269
- defineBalDocApp()
270
267
  defineBalDropdown()
271
268
  defineBalField()
272
269
  defineBalFieldControl()
@@ -1,4 +1,96 @@
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 { k as debounce, p as rIC, m as rOnLoad } 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}.lcp-wait{opacity:0;visibility:hidden;display:none}.lcp-ready .lcp-wait{opacity:inherit;visibility:inherit;display:inherit}";
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
+ if (this.animated === false) {
32
+ updateBalAnimated(this.animated);
33
+ }
34
+ if (balBrowser.hasWindow) {
35
+ window.addEventListener('resize', this.debouncedNotify);
36
+ this.debouncedNotify();
37
+ }
38
+ }
39
+ componentDidLoad() {
40
+ rIC(() => {
41
+ this.ready = true;
42
+ startFocusVisible();
43
+ });
44
+ rOnLoad(() => {
45
+ if (balBrowser.hasDocument && balBrowser.hasWindow) {
46
+ const doc = document.documentElement;
47
+ doc.classList.add('lcp-ready');
48
+ }
49
+ });
50
+ }
51
+ disconnectedCallback() {
52
+ if (balBrowser.hasWindow) {
53
+ window.removeEventListener('resize', this.debouncedNotify);
54
+ }
55
+ }
56
+ async setFocus(elements) {
57
+ if (this.focusVisible) {
58
+ this.focusVisible.setFocus(elements);
59
+ }
60
+ }
61
+ render() {
62
+ return (h(Host, { key: '8aa3c989125e06e500597db9773fca378e4b7467', class: {
63
+ 'bal-app': true,
64
+ 'bal-app--safari': balBrowser.isSafari,
65
+ 'bal-app--touch': balDevice.hasTouchScreen,
66
+ } }, h("slot", { key: 'c0e432a988e29f653198ed4eeead7f18fa447035' })));
67
+ }
68
+ get el() { return this; }
69
+ static get style() { return BalAppStyle0; }
70
+ }, [4, "bal-app", {
71
+ "animated": [516],
72
+ "ready": [1540],
73
+ "setFocus": [64]
74
+ }]);
75
+ __decorate([
76
+ Logger('bal-app'),
77
+ __metadata("design:type", Function),
78
+ __metadata("design:paramtypes", [Function]),
79
+ __metadata("design:returntype", void 0)
80
+ ], App.prototype, "createLogger", null);
81
+ function defineCustomElement$1() {
82
+ if (typeof customElements === "undefined") {
83
+ return;
84
+ }
85
+ const components = ["bal-app"];
86
+ components.forEach(tagName => { switch (tagName) {
87
+ case "bal-app":
88
+ if (!customElements.get(tagName)) {
89
+ customElements.define(tagName, App);
90
+ }
91
+ break;
92
+ } });
93
+ }
2
94
 
3
95
  const BalApp = App;
4
96
  const defineCustomElement = defineCustomElement$1;
@@ -40,7 +40,8 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
40
40
  this.toggleChecked = (ev) => {
41
41
  ev.preventDefault();
42
42
  this.setFocus();
43
- this.setChecked(!this.checked);
43
+ this.checked = true;
44
+ this.setChecked(this.checked);
44
45
  };
45
46
  this.onClick = (ev) => {
46
47
  if (this.disabled) {
@@ -219,12 +220,6 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
219
220
  this.checked = newChecked;
220
221
  }
221
222
  }
222
- // if (this.radioButton) {
223
- // this.buttonTabindex = -1
224
- // if (this.radioButton.setChecked) {
225
- // this.radioButton.setChecked(this.checked)
226
- // }
227
- // }
228
223
  }
229
224
  /**
230
225
  * @internal
@@ -294,11 +289,11 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
294
289
  if (this.labelHidden) {
295
290
  inputAttributes['aria-labelledby'] = labelId;
296
291
  }
297
- return (h(Host, { key: '9c108eed067c8d47d94180715714ed97d7c2df2d', "aria-checked": `${this.checked}`, "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-hidden": this.disabled ? 'true' : null, "aria-focused": focused ? 'true' : null, "aria-labelledby": labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ 'bal-focused': focused }, block.class()), block.modifier('button').class(this.interface === 'button')), block.modifier('tile').class(this.interface === 'tile')), block.modifier(`tile-color-${this.color}`).class(this.interface === 'tile' && !!this.color)), block.modifier('invalid').class(this.invalid)), block.modifier('checked').class(this.checked)), block.modifier('flat').class(this.flat)), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)), block.modifier(`column-${this.colSize}`).class(this.interface === 'tile' && this.colSize > 1)), block
292
+ return (h(Host, { key: '0cb18e6ebb7c792fb484473ec6fa2efbc318f221', "aria-checked": `${this.checked}`, "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-hidden": this.disabled ? 'true' : null, "aria-focused": focused ? 'true' : null, "aria-labelledby": labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ 'bal-focused': focused }, block.class()), block.modifier('button').class(this.interface === 'button')), block.modifier('tile').class(this.interface === 'tile')), block.modifier(`tile-color-${this.color}`).class(this.interface === 'tile' && !!this.color)), block.modifier('invalid').class(this.invalid)), block.modifier('checked').class(this.checked)), block.modifier('flat').class(this.flat)), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)), block.modifier(`column-${this.colSize}`).class(this.interface === 'tile' && this.colSize > 1)), block
298
293
  .modifier(`column-tablet-${this.colSizeTablet}`)
299
294
  .class(this.interface === 'tile' && this.colSizeTablet > 1)), block
300
295
  .modifier(`column-mobile-${this.colSizeMobile}`)
301
- .class(this.interface === 'tile' && this.colSizeMobile > 1)), onClick: this.onClick }, h(LabelTag, { key: '4b3d8626b04257821c3fe1ef713fe9ff9bf0a925', class: Object.assign({}, labelEl.class()), "data-testid": "bal-radio-label" }, hasFormControl ? (h("input", Object.assign({ id: id, type: "radio", "data-testid": "bal-radio-input", name: this.name, value: value, checked: this.checked, required: this.required, disabled: this.disabled || this.nonSubmit, readonly: this.readonly, class: Object.assign({}, inputEl.class()), "aria-hidden": ariaBooleanToString(this.nonSubmit), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-describedby": this.ariaForm.messageId, onChange: ev => this.toggleChecked(ev), onFocus: ev => this.onFocus(ev), onBlur: ev => this.onBlur(ev), ref: inputEl => (this.nativeInput = inputEl) }, inputAttributes))) : (''), this.interface !== 'tile' ? (h("div", { class: Object.assign({}, labelIconEl.class()) }, h("bal-radio-icon", { checked: this.checked, disabled: this.disabled || this.readonly, invalid: this.invalid, inverted: this.interface === 'button' && this.checked, hovered: this.mergedElementState.hovered, pressed: this.mergedElementState.pressed }))) : (''), h("div", { key: 'de3d15790b976a11a18435e5e7c816f9cc9918c3', class: Object.assign(Object.assign({}, labelTextEl.class()), labelTextEl.modifier('hidden').class(this.labelHidden)) }, h("slot", { key: '0a6ef4b1a0ebbdd01b1367c8965cfedf05b9acec' })))));
296
+ .class(this.interface === 'tile' && this.colSizeMobile > 1)), onClick: this.onClick }, h(LabelTag, { key: 'ef2616849a3b0f2fe95b92fc8ae81df21fd73c47', class: Object.assign({}, labelEl.class()), "data-testid": "bal-radio-label" }, hasFormControl ? (h("input", Object.assign({ id: id, type: "radio", "data-testid": "bal-radio-input", name: this.name, value: value, checked: this.checked, required: this.required, disabled: this.disabled || this.nonSubmit, readonly: this.readonly, class: Object.assign({}, inputEl.class()), "aria-hidden": ariaBooleanToString(this.nonSubmit), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-describedby": this.ariaForm.messageId, onChange: ev => this.toggleChecked(ev), onFocus: ev => this.onFocus(ev), onBlur: ev => this.onBlur(ev), ref: inputEl => (this.nativeInput = inputEl) }, inputAttributes))) : (''), this.interface !== 'tile' ? (h("div", { class: Object.assign({}, labelIconEl.class()) }, h("bal-radio-icon", { checked: this.checked, disabled: this.disabled || this.readonly, invalid: this.invalid, inverted: this.interface === 'button' && this.checked, hovered: this.mergedElementState.hovered, pressed: this.mergedElementState.pressed }))) : (''), h("div", { key: '609c44dc552fba3ba309166407730a28219616e6', class: Object.assign(Object.assign({}, labelTextEl.class()), labelTextEl.modifier('hidden').class(this.labelHidden)) }, h("slot", { key: '0f200df04d88e458de4400687dfd7b1a2a3e9ac1' })))));
302
297
  }
303
298
  get el() { return this; }
304
299
  static get watchers() { return {
@@ -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';
@@ -5,16 +6,17 @@ export { i as i18nBalClose } from './bal-close.i18n.js';
5
6
  export { i as i18nBalTimeInput } from './bal-time-input.i18n.js';
6
7
  export { i as i18nBalInputStepper } from './bal-input-stepper.i18n.js';
7
8
  export { i as i18nBalLabel } from './bal-label.i18n.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';
9
+ import { b as balBrowser } from './browser.js';
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';
9
15
  export { n as newBalOption } from './option.js';
10
16
  export { n as newBalStepOption } from './bal-step.util.js';
11
17
  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';
14
18
  export { s as scrollToFirstInvalidField } from './form.js';
15
19
  export { B as BalScrollHandler } from './scroll.js';
16
- import { b as balBrowser } from './browser.js';
17
- export { b as balBrowser } from './browser.js';
18
20
  import { b as balDevice } from './device.js';
19
21
  export { B as BalDevice, b as balDevice } from './device.js';
20
22
  export { I as INVALID_VALUE } from './mask-util.js';
@@ -22,11 +24,175 @@ import { g as getOverlays, a as getOverlay } from './overlays.js';
22
24
  import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
23
25
  export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
24
26
  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';
26
27
  import { S as Subject } from './listener.js';
27
28
  export { B as BalSwipeSubject } from './swipe.subject.js';
28
29
  export { B as BalDate } from './date.js';
29
30
 
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
+
30
196
  const i18nBalFieldLabel = {
31
197
  de: {
32
198
  optional: ' (optional)',
@@ -60,6 +226,147 @@ const i18nBalFieldLabel = {
60
226
  },
61
227
  };
62
228
 
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 = '19.0.1';
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
+
63
370
  const newBalCheckboxOption = (option) => {
64
371
  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 });
65
372
  };
@@ -177,4 +484,4 @@ const isPlatform = (winOrPlatform, platform) => {
177
484
  const NewBalOptionValue = newBalOptionValue;
178
485
  const NewBalSingleOptionValue = newBalSingleOptionValue;
179
486
 
180
- export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
487
+ 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, 21 May 2025 06:16:42 GMT
3
+ * Generated on Wed, 21 May 2025 13:42:52 GMT
4
4
  */
5
5
  const balColorGreen3 = "#94e3d4";
6
6
  const balColorGreen6 = "#1b5951";