@baloise/ds-core 16.1.0-nightly.20240516 → 16.2.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 (201) 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-date.js +3 -1
  5. package/components/bal-footer.js +7 -2
  6. package/components/bal-input-date2.js +15 -3
  7. package/components/index.js +290 -5
  8. package/components/mask-util.js +3 -0
  9. package/components/scroll.js +1 -1
  10. package/components/tokens.esm.js +1 -1
  11. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  12. package/dist/baloise-design-system/baloise-design-system.js +1 -1
  13. package/dist/baloise-design-system/index.esm.js +1 -1
  14. package/dist/baloise-design-system/{p-f959646a.system.js → p-013b4c72.system.js} +1 -1
  15. package/dist/baloise-design-system/{p-12e6222708.entry.js → p-14c1efdb08.entry.js} +1 -1
  16. package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
  17. package/dist/baloise-design-system/p-1a158488.js +1 -0
  18. package/dist/baloise-design-system/{p-6655383a97.entry.js → p-1cae0f6215.entry.js} +1 -1
  19. package/dist/baloise-design-system/{p-f233fe25.system.js → p-1d351673.system.js} +1 -1
  20. package/dist/baloise-design-system/{p-d3b7f290c9.entry.js → p-2a0359206a.entry.js} +1 -1
  21. package/dist/baloise-design-system/{p-e9ae0323bf.entry.js → p-2e9f9838d0.entry.js} +1 -1
  22. package/dist/baloise-design-system/{p-c03fa59efc.entry.js → p-35697fd842.entry.js} +1 -1
  23. package/dist/baloise-design-system/{p-9dc5cb62e3.system.entry.js → p-3586f88589.system.entry.js} +1 -1
  24. package/dist/baloise-design-system/{p-13d0473d5c.entry.js → p-3e3240a165.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-84d97c84.system.js → p-4122160f.system.js} +1 -1
  26. package/dist/baloise-design-system/p-42bff14b.system.js +1 -0
  27. package/dist/baloise-design-system/p-45e0c0783b.entry.js +1 -0
  28. package/dist/baloise-design-system/{p-2624559a.system.js → p-46962c31.system.js} +1 -1
  29. package/dist/baloise-design-system/p-4afba8511a.system.entry.js +1 -0
  30. package/dist/baloise-design-system/{p-b30852e875.system.entry.js → p-4ba5509697.system.entry.js} +1 -1
  31. package/dist/baloise-design-system/p-51c0348938.entry.js +1 -0
  32. package/dist/baloise-design-system/{p-64a06bb628.entry.js → p-53b032957c.entry.js} +1 -1
  33. package/dist/baloise-design-system/{p-47a3898e82.system.entry.js → p-542d4ba42e.system.entry.js} +1 -1
  34. package/dist/baloise-design-system/p-54f81c32.js +1 -1
  35. package/dist/baloise-design-system/{p-2f5dca902b.entry.js → p-594ed43172.entry.js} +1 -1
  36. package/dist/baloise-design-system/{p-4232c923c3.system.entry.js → p-5b9789ea9b.system.entry.js} +1 -1
  37. package/dist/baloise-design-system/p-5f26e92f.system.js +1 -0
  38. package/dist/baloise-design-system/{p-195585f39c.entry.js → p-6b62dde878.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-53cee50940.system.entry.js → p-6cec985f79.system.entry.js} +1 -1
  40. package/dist/baloise-design-system/{p-58fc8247.js → p-6e0f125e.js} +1 -1
  41. package/dist/baloise-design-system/p-6f4a362824.system.entry.js +1 -0
  42. package/dist/baloise-design-system/{p-947b33f7.js → p-71109949.js} +1 -1
  43. package/dist/baloise-design-system/{p-d6aa526659.entry.js → p-7dc6846c06.entry.js} +1 -1
  44. package/dist/baloise-design-system/{p-e945d757c9.system.entry.js → p-7e909d3137.system.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-86eeae36fa.system.entry.js → p-90aa7db300.system.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-f4cd3ba2f0.entry.js → p-ae372094d2.entry.js} +1 -1
  47. package/dist/baloise-design-system/{p-4c799e91b1.system.entry.js → p-b1227cb400.system.entry.js} +1 -1
  48. package/dist/baloise-design-system/p-ba14aa7026.system.entry.js +1 -0
  49. package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
  50. package/dist/baloise-design-system/{p-dc3bfd6ee9.system.entry.js → p-bff4f2e518.system.entry.js} +1 -1
  51. package/dist/baloise-design-system/{p-3d0159890b.system.entry.js → p-c907685cee.system.entry.js} +1 -1
  52. package/dist/baloise-design-system/p-cef24f8c62.entry.js +1 -0
  53. package/dist/baloise-design-system/{p-67eab4f8cb.system.entry.js → p-d458e5e328.system.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-1facd2a3f2.entry.js → p-dc45a57023.entry.js} +1 -1
  55. package/dist/baloise-design-system/{p-00553c7763.system.entry.js → p-e18c0e64a7.system.entry.js} +1 -1
  56. package/dist/baloise-design-system/{p-4703a74f25.system.entry.js → p-e3ef34506f.system.entry.js} +1 -1
  57. package/dist/baloise-design-system/p-e78a6409.js +1 -0
  58. package/dist/baloise-design-system/{p-c7cd363617.entry.js → p-e7bd7e7c5d.entry.js} +1 -1
  59. package/dist/baloise-design-system/{p-2334f35b62.entry.js → p-e7f7fee312.entry.js} +1 -1
  60. package/dist/baloise-design-system/{p-2d830440.js → p-eb10ad25.js} +1 -1
  61. package/dist/baloise-design-system/{p-e68999cd51.system.entry.js → p-f4e7710a45.system.entry.js} +1 -1
  62. package/dist/cjs/{global-2562a984.js → app-globals-ae3a8623.js} +4 -2
  63. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  64. package/dist/cjs/bal-date-calendar_2.cjs.entry.js +14 -3
  65. package/dist/cjs/bal-date.cjs.entry.js +2 -1
  66. package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
  67. package/dist/cjs/bal-footer.cjs.entry.js +7 -2
  68. package/dist/cjs/bal-hint_3.cjs.entry.js +4 -4
  69. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  70. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  71. package/dist/cjs/bal-modal_3.cjs.entry.js +1 -1
  72. package/dist/cjs/bal-nav_8.cjs.entry.js +4 -4
  73. package/dist/cjs/bal-navbar_5.cjs.entry.js +4 -4
  74. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  75. package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
  76. package/dist/cjs/bal-progress-bar.cjs.entry.js +3 -3
  77. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  78. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  79. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  80. package/dist/cjs/baloise-design-system.cjs.js +2 -3
  81. package/dist/cjs/{breakpoints.decorator-1af22a0b.js → breakpoints.decorator-555e2caf.js} +1 -1
  82. package/dist/cjs/{breakpoints.subject-92d5b596.js → breakpoints.subject-0d00c248.js} +1 -1
  83. package/dist/cjs/index.cjs.js +5 -3
  84. package/dist/cjs/initialize-2a19d091.js +1 -1
  85. package/dist/cjs/loader.cjs.js +2 -3
  86. package/dist/cjs/mask-util-19c28b4a.js +5 -0
  87. package/dist/cjs/{scroll-b839ffe1.js → scroll-5d6ac91d.js} +1 -1
  88. package/dist/cjs/{tokens.esm-c267b8b2.js → tokens.esm-93d7e2f7.js} +1 -1
  89. package/dist/collection/collection-manifest.json +1 -2
  90. package/dist/collection/components/bal-date/bal-date.js +21 -2
  91. package/dist/collection/components/bal-footer/bal-footer.css +1 -1
  92. package/dist/collection/components/bal-footer/bal-footer.js +6 -1
  93. package/dist/collection/components/bal-input/bal-input-date/bal-input-date.js +19 -0
  94. package/dist/collection/components/bal-select/bal-select.js +1 -1
  95. package/dist/collection/index.js +1 -0
  96. package/dist/collection/utils/constants/version.constant.js +1 -1
  97. package/dist/collection/utils/mask/__test__/mask-component.mock.js +1 -0
  98. package/dist/collection/utils/mask/context/mask-context.js +1 -0
  99. package/dist/collection/utils/mask/mask-util.js +1 -0
  100. package/dist/collection/utils/mask/mask.js +2 -2
  101. package/dist/collection/utils/mask/types/mask-date.js +10 -1
  102. package/dist/collection/utils/scroll.js +1 -1
  103. package/dist/esm/{global-63f4bcec.js → app-globals-b0dd0fc4.js} +4 -2
  104. package/dist/esm/bal-carousel_2.entry.js +3 -3
  105. package/dist/esm/bal-date-calendar_2.entry.js +14 -3
  106. package/dist/esm/bal-date.entry.js +2 -1
  107. package/dist/esm/bal-datepicker.entry.js +3 -3
  108. package/dist/esm/bal-footer.entry.js +7 -2
  109. package/dist/esm/bal-hint_3.entry.js +4 -4
  110. package/dist/esm/bal-list_8.entry.js +3 -3
  111. package/dist/esm/bal-logo.entry.js +3 -3
  112. package/dist/esm/bal-modal_3.entry.js +1 -1
  113. package/dist/esm/bal-nav_8.entry.js +4 -4
  114. package/dist/esm/bal-navbar_5.entry.js +4 -4
  115. package/dist/esm/bal-pagination.entry.js +3 -3
  116. package/dist/esm/bal-popover_2.entry.js +3 -3
  117. package/dist/esm/bal-progress-bar.entry.js +3 -3
  118. package/dist/esm/bal-shape.entry.js +1 -1
  119. package/dist/esm/bal-steps.entry.js +3 -3
  120. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  121. package/dist/esm/baloise-design-system.js +2 -3
  122. package/dist/esm/{breakpoints.decorator-4adc321a.js → breakpoints.decorator-dad33c75.js} +1 -1
  123. package/dist/esm/{breakpoints.subject-a1204db2.js → breakpoints.subject-ba72fe99.js} +1 -1
  124. package/dist/esm/index.js +5 -4
  125. package/dist/esm/initialize-e216cfe4.js +1 -1
  126. package/dist/esm/loader.js +2 -3
  127. package/dist/esm/mask-util-71edc2b8.js +3 -0
  128. package/dist/esm/{scroll-972c7ce5.js → scroll-e341d95b.js} +1 -1
  129. package/dist/esm/{tokens.esm-1091fd9b.js → tokens.esm-366a5b1e.js} +1 -1
  130. package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
  131. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  132. package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
  133. package/dist/esm-es5/bal-date.entry.js +1 -1
  134. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  135. package/dist/esm-es5/bal-footer.entry.js +1 -1
  136. package/dist/esm-es5/bal-hint_3.entry.js +1 -1
  137. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  138. package/dist/esm-es5/bal-logo.entry.js +1 -1
  139. package/dist/esm-es5/bal-modal_3.entry.js +1 -1
  140. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  141. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  142. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  143. package/dist/esm-es5/bal-popover_2.entry.js +1 -1
  144. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  145. package/dist/esm-es5/bal-shape.entry.js +1 -1
  146. package/dist/esm-es5/bal-steps.entry.js +1 -1
  147. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  148. package/dist/esm-es5/baloise-design-system.js +1 -1
  149. package/dist/esm-es5/breakpoints.decorator-dad33c75.js +1 -0
  150. package/dist/esm-es5/{breakpoints.subject-a1204db2.js → breakpoints.subject-ba72fe99.js} +1 -1
  151. package/dist/esm-es5/index.js +1 -1
  152. package/dist/esm-es5/initialize-e216cfe4.js +1 -1
  153. package/dist/esm-es5/loader.js +1 -1
  154. package/dist/esm-es5/mask-util-71edc2b8.js +1 -0
  155. package/dist/esm-es5/{scroll-972c7ce5.js → scroll-e341d95b.js} +1 -1
  156. package/dist/html.html-data.json +10 -2
  157. package/dist/types/components/bal-date/bal-date.d.ts +5 -1
  158. package/dist/types/components/bal-footer/bal-footer.d.ts +1 -0
  159. package/dist/types/components/bal-input/bal-input-date/bal-input-date.d.ts +4 -0
  160. package/dist/types/components/bal-select/bal-select.d.ts +1 -1
  161. package/dist/types/components.d.ts +20 -41
  162. package/dist/types/index.d.ts +1 -0
  163. package/dist/types/utils/mask/__test__/mask-component.mock.d.ts +1 -0
  164. package/dist/types/utils/mask/component/mask-component-interfaces.d.ts +1 -0
  165. package/dist/types/utils/mask/context/mask-context.d.ts +2 -0
  166. package/dist/types/utils/mask/mask-util.d.ts +1 -0
  167. package/dist/types/utils/mask/mask.d.ts +3 -1
  168. package/dist/types/utils/mask/types/mask-date.d.ts +3 -1
  169. package/package.json +7 -7
  170. package/components/bal-app2.js +0 -87
  171. package/components/bal-doc-app.d.ts +0 -11
  172. package/components/bal-doc-app.js +0 -260
  173. package/components/initialize.js +0 -288
  174. package/dist/baloise-design-system/p-06e9a468fc.system.entry.js +0 -1
  175. package/dist/baloise-design-system/p-18e2e391e0.system.entry.js +0 -1
  176. package/dist/baloise-design-system/p-317cee9b56.system.entry.js +0 -1
  177. package/dist/baloise-design-system/p-360068a4.system.js +0 -1
  178. package/dist/baloise-design-system/p-5b571a9fb1.entry.js +0 -1
  179. package/dist/baloise-design-system/p-6648acba05.entry.js +0 -1
  180. package/dist/baloise-design-system/p-6d1b6215.js +0 -1
  181. package/dist/baloise-design-system/p-7291766c.system.js +0 -1
  182. package/dist/baloise-design-system/p-7c42a363f3.entry.js +0 -1
  183. package/dist/baloise-design-system/p-b9f197815f.entry.js +0 -1
  184. package/dist/baloise-design-system/p-e4de708de1.system.entry.js +0 -1
  185. package/dist/baloise-design-system/p-e8ffddeb.js +0 -1
  186. package/dist/baloise-design-system/p-f961ac52.system.js +0 -1
  187. package/dist/cjs/app-globals-5fd73c0c.js +0 -7
  188. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
  189. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  190. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
  191. package/dist/esm/app-globals-970bab17.js +0 -5
  192. package/dist/esm/bal-doc-app.entry.js +0 -227
  193. package/dist/esm-es5/app-globals-970bab17.js +0 -1
  194. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  195. package/dist/esm-es5/breakpoints.decorator-4adc321a.js +0 -1
  196. package/dist/esm-es5/global-63f4bcec.js +0 -1
  197. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  198. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
  199. /package/dist/baloise-design-system/{p-4ae802f4.system.js → p-448185d8.system.js} +0 -0
  200. /package/dist/baloise-design-system/{p-cf875c54.js → p-5e1cb403.js} +0 -0
  201. /package/dist/esm-es5/{tokens.esm-1091fd9b.js → tokens.esm-366a5b1e.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'
@@ -145,7 +144,6 @@ export { BalDateCalendar, defineBalDateCalendar }
145
144
  export { BalDateCalendarCell, defineBalDateCalendarCell }
146
145
  export { BalDatepicker, defineBalDatepicker }
147
146
  export { BalDivider, defineBalDivider }
148
- export { BalDocApp, defineBalDocApp }
149
147
  export { BalDropdown, defineBalDropdown }
150
148
  export { BalField, defineBalField }
151
149
  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'
@@ -145,7 +144,6 @@ export { BalDateCalendar, defineBalDateCalendar }
145
144
  export { BalDateCalendarCell, defineBalDateCalendarCell }
146
145
  export { BalDatepicker, defineBalDatepicker }
147
146
  export { BalDivider, defineBalDivider }
148
- export { BalDocApp, defineBalDocApp }
149
147
  export { BalDropdown, defineBalDropdown }
150
148
  export { BalField, defineBalField }
151
149
  export { BalFieldControl, defineBalFieldControl }
@@ -263,7 +261,6 @@ export const defineAllComponents = () => {
263
261
  defineBalDateCalendarCell()
264
262
  defineBalDatepicker()
265
263
  defineBalDivider()
266
- defineBalDocApp()
267
264
  defineBalDropdown()
268
265
  defineBalField()
269
266
  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;
@@ -114,6 +114,7 @@ const Date = /*@__PURE__*/ proxyCustomElement(class Date extends HTMLElement {
114
114
  this.maxYearProp = undefined;
115
115
  this.defaultDate = undefined;
116
116
  this.allowedDates = undefined;
117
+ this.allowInvalidValue = false;
117
118
  this.debounce = 0;
118
119
  this.autoInvalidOff = false;
119
120
  }
@@ -285,7 +286,7 @@ const Date = /*@__PURE__*/ proxyCustomElement(class Date extends HTMLElement {
285
286
  const block = BEM.block('date');
286
287
  const blockIcon = block.element('icon');
287
288
  const blockPopup = block.element('popup');
288
- return (h(Host, { id: this.inputId, class: Object.assign({}, block.class()) }, h("bal-input-group", { invalid: this.invalid, readonly: this.readonly, disabled: this.disabled, ref: el => (this.referenceEl = el) }, h("bal-input-date", Object.assign({ name: this.name, required: this.required, placeholder: this.placeholder, value: this.value, min: this.min, max: this.max, invalid: this.invalid, readonly: this.readonly, disabled: this.disabled, onClick: this.onInputClick, onBalInput: this.onInputInput, onBalChange: this.onInputChange, onBalFocus: this.onInputFocus, onBalBlur: this.onInputBlur, onBalKeyPress: this.onKeyPress, ref: el => (this.inputEl = el) }, this.inheritedAttributes)), !this.freeSolo ? (h("bal-icon", { name: "date", role: "button", tabindex: -1, class: Object.assign(Object.assign({}, blockIcon.class()), blockIcon.modifier('clickable').class(!this.disabled && !this.readonly)), "is-right": true, color: this.disabled || this.readonly ? 'grey' : this.invalid ? 'danger' : 'primary', onClick: this.onIconClick, "aria-label": i18nBalDate[this.language].toggleDatepicker, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? 'true' : 'false' })) : ('')), h("div", { role: "dialog", class: Object.assign(Object.assign({}, blockPopup.class()), blockPopup.modifier('visible').class(this.isExpanded)), ref: el => (this.floatingEl = el), "aria-hidden": `${this.isExpanded !== true}`, "aria-presented": `${this.isExpanded === true}` }, h("bal-date-calendar", { value: this.calendarValue, min: this.min, max: this.max, minYearProp: this.minYearProp, maxYearProp: this.maxYearProp, defaultDate: this.defaultDate, allowedDates: this.allowedDates, onBalChange: this.onCalendarChange }))));
289
+ return (h(Host, { id: this.inputId, class: Object.assign({}, block.class()) }, h("bal-input-group", { invalid: this.invalid, readonly: this.readonly, disabled: this.disabled, ref: el => (this.referenceEl = el) }, h("bal-input-date", Object.assign({ name: this.name, required: this.required, placeholder: this.placeholder, value: this.value, min: this.min, max: this.max, invalid: this.invalid, readonly: this.readonly, disabled: this.disabled, allowInvalidValue: this.allowInvalidValue, onClick: this.onInputClick, onBalInput: this.onInputInput, onBalChange: this.onInputChange, onBalFocus: this.onInputFocus, onBalBlur: this.onInputBlur, onBalKeyPress: this.onKeyPress, ref: el => (this.inputEl = el) }, this.inheritedAttributes)), !this.freeSolo ? (h("bal-icon", { name: "date", role: "button", tabindex: -1, class: Object.assign(Object.assign({}, blockIcon.class()), blockIcon.modifier('clickable').class(!this.disabled && !this.readonly)), "is-right": true, color: this.disabled || this.readonly ? 'grey' : this.invalid ? 'danger' : 'primary', onClick: this.onIconClick, "aria-label": i18nBalDate[this.language].toggleDatepicker, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? 'true' : 'false' })) : ('')), h("div", { role: "dialog", class: Object.assign(Object.assign({}, blockPopup.class()), blockPopup.modifier('visible').class(this.isExpanded)), ref: el => (this.floatingEl = el), "aria-hidden": `${this.isExpanded !== true}`, "aria-presented": `${this.isExpanded === true}` }, h("bal-date-calendar", { value: this.calendarValue, min: this.min, max: this.max, minYearProp: this.minYearProp, maxYearProp: this.maxYearProp, defaultDate: this.defaultDate, allowedDates: this.allowedDates, onBalChange: this.onCalendarChange }))));
289
290
  }
290
291
  get el() { return this; }
291
292
  static get watchers() { return {
@@ -310,6 +311,7 @@ const Date = /*@__PURE__*/ proxyCustomElement(class Date extends HTMLElement {
310
311
  "maxYearProp": [2, "max-year"],
311
312
  "defaultDate": [1, "default-date"],
312
313
  "allowedDates": [16],
314
+ "allowInvalidValue": [4, "allow-invalid-value"],
313
315
  "debounce": [2],
314
316
  "autoInvalidOff": [516, "auto-invalid-off"],
315
317
  "isExpanded": [32],
@@ -4,6 +4,7 @@ import { u as loadFooterLinks, v as loadSocialMediaLinks, L as Language } from '
4
4
  import { B as BEM } from './bem.js';
5
5
  import { L as Logger } from './log.js';
6
6
  import { k as rIC } from './helpers.js';
7
+ import { s as stopEventBubbling } from './form-input.js';
7
8
  import { d as defineCustomElement$b } from './bal-checkbox2.js';
8
9
  import { d as defineCustomElement$a } from './bal-close2.js';
9
10
  import { d as defineCustomElement$9 } from './bal-icon2.js';
@@ -18,7 +19,7 @@ import { e as updateBalLanguage } from './config.utils.js';
18
19
  import { d as defaultConfig } from './config.default.js';
19
20
  import { L as ListenToConfig } from './config.decorator.js';
20
21
 
21
- const balFooterCss = ":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background-active:var(--bal-color-light-blue-3)}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);color:var(--bal-footer-color);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner,.bal-footer__inner p{color:var(--bal-footer-color)}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language:hover bal-icon svg,.bal-footer__inner__wrapper__header-container__language:hover bal-icon g,.bal-footer__inner__wrapper__header-container__language:hover bal-icon path,.bal-footer__inner__wrapper__header-container__language:hover bal-icon circle{fill:var(--bal-footer-language-background-hover)}.bal-footer__inner__wrapper__header-container__language:hover .input{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language:active bal-icon svg,.bal-footer__inner__wrapper__header-container__language:active bal-icon g,.bal-footer__inner__wrapper__header-container__language:active bal-icon path,.bal-footer__inner__wrapper__header-container__language:active bal-icon circle{fill:var(--bal-footer-language-background-active)}.bal-footer__inner__wrapper__header-container__language:active .input{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__language__wrapper{width:5rem}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group{background:rgba(0,0,0,0);border:none}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group:hover{background:rgba(0,0,0,0) !important}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group bal-icon{min-width:.75rem !important}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";
22
+ const balFooterCss = ":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background-active:var(--bal-color-light-blue-3)}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);color:var(--bal-footer-color);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner,.bal-footer__inner p{color:var(--bal-footer-color)}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language bal-icon,.bal-footer__inner__wrapper__header-container__language .input{cursor:pointer}.bal-footer__inner__wrapper__header-container__language:hover bal-icon svg,.bal-footer__inner__wrapper__header-container__language:hover bal-icon g,.bal-footer__inner__wrapper__header-container__language:hover bal-icon path,.bal-footer__inner__wrapper__header-container__language:hover bal-icon circle{fill:var(--bal-footer-language-background-hover)}.bal-footer__inner__wrapper__header-container__language:hover .input{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language:active bal-icon svg,.bal-footer__inner__wrapper__header-container__language:active bal-icon g,.bal-footer__inner__wrapper__header-container__language:active bal-icon path,.bal-footer__inner__wrapper__header-container__language:active bal-icon circle{fill:var(--bal-footer-language-background-active)}.bal-footer__inner__wrapper__header-container__language:active .input{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__language__wrapper{width:5rem}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group{background:rgba(0,0,0,0);border:none}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group:hover{background:rgba(0,0,0,0) !important}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group bal-icon{min-width:.75rem !important}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";
22
23
  const BalFooterStyle0 = balFooterCss;
23
24
 
24
25
  const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement {
@@ -105,7 +106,11 @@ const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement
105
106
  const elSocialMediaLinks = elLinksContainer.element('social-media-links');
106
107
  return (h(Host, { class: Object.assign({}, block.class()) }, h("footer", { class: Object.assign({}, elInner.class()) }, h("div", { class: Object.assign({}, elInnerWrapper.class()) }, h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elHeaderContainer.class()) }, h("div", { class: Object.assign({}, elLogo.class()) }, h("bal-logo", { color: "white" })), h("div", { class: Object.assign({}, elLanguage.class()), style: {
107
108
  display: this.hideLanguageSelection || this.allowedLanguages.length <= 1 ? 'none' : 'flex',
108
- } }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class: Object.assign({}, elIcon.class()), name: "web", color: "white" }), h("bal-select", { value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-select-option", { key: language, label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("slot", null), h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { class: Object.assign({}, elSocialMediaLinks.class()), style: {
109
+ } }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class: Object.assign({}, elIcon.class()), name: "web", color: "white", onClick: el => {
110
+ var _a;
111
+ stopEventBubbling(el);
112
+ (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.open();
113
+ } }), h("bal-select", { ref: el => (this.selectEl = el), value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-select-option", { key: language, label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("slot", null), h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { class: Object.assign({}, elSocialMediaLinks.class()), style: {
109
114
  display: !this.showSocialMedia ? 'none' : 'flex',
110
115
  } }, this.socialMediaLinks.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
111
116
  'link': true,
@@ -8,6 +8,7 @@ import { i as inputSetFocus, a as inputSetBlur } from './form-input.js';
8
8
  import { d as defaultBalAriaForm } from './form.js';
9
9
  import { d as dateSeparator } from './index.esm.js';
10
10
  import { N as NUMBER_KEYS } from './keys.constant.js';
11
+ import { I as INVALID_VALUE } from './mask-util.js';
11
12
  import { B as BalDate } from './date.js';
12
13
  import { L as ListenToConfig } from './config.decorator.js';
13
14
 
@@ -85,6 +86,7 @@ class MaskContext {
85
86
  this._value = this._options.component.nativeInput.value;
86
87
  }
87
88
  this.position = new MaskPosition(this._options);
89
+ this.component = this._options.component;
88
90
  }
89
91
  get target() {
90
92
  if (this._options.component && this._options.component.nativeInput) {
@@ -454,7 +456,7 @@ class AbstractMask {
454
456
  context.value = inputValue;
455
457
  context.position.toEnd();
456
458
  }
457
- onParseValue(inputValue) {
459
+ onParseValue(inputValue, options = { allowInvalidValue: false }) {
458
460
  if (inputValue) {
459
461
  return inputValue.trim();
460
462
  }
@@ -519,7 +521,7 @@ class AbstractMask {
519
521
  }
520
522
  else {
521
523
  this.onBlur(context);
522
- context.submit('blur', this.onParseValue(context.value));
524
+ context.submit('blur', this.onParseValue(context.value, { allowInvalidValue: context.component.allowInvalidValue }));
523
525
  }
524
526
  }
525
527
  }
@@ -709,12 +711,15 @@ class DateMask extends AbstractMask {
709
711
  fi: 'V',
710
712
  };
711
713
  }
712
- onParseValue(inputValue) {
714
+ onParseValue(inputValue, options = { allowInvalidValue: false }) {
713
715
  if (inputValue) {
714
716
  const date = BalDate.fromAnyFormat(this.blocks.getRawValueWithoutMask(inputValue));
715
717
  if (date.isValid) {
716
718
  return date.toISODate();
717
719
  }
720
+ else if (options && options.allowInvalidValue) {
721
+ return INVALID_VALUE;
722
+ }
718
723
  }
719
724
  return '';
720
725
  }
@@ -744,6 +749,11 @@ class DateMask extends AbstractMask {
744
749
  context.value = formattedDate;
745
750
  }
746
751
  }
752
+ else if (context.component.allowInvalidValue) {
753
+ if (rawValue !== context.value) {
754
+ context.value = rawValue;
755
+ }
756
+ }
747
757
  }
748
758
  }
749
759
 
@@ -904,6 +914,7 @@ const InputDate = /*@__PURE__*/ proxyCustomElement(class InputDate extends HTMLE
904
914
  this.hasIconRight = false;
905
915
  this.value = undefined;
906
916
  this.autoInvalidOff = false;
917
+ this.allowInvalidValue = false;
907
918
  }
908
919
  createLogger(log) {
909
920
  this.log = log;
@@ -1007,6 +1018,7 @@ const InputDate = /*@__PURE__*/ proxyCustomElement(class InputDate extends HTMLE
1007
1018
  "hasIconRight": [4, "has-icon-right"],
1008
1019
  "value": [1025],
1009
1020
  "autoInvalidOff": [516, "auto-invalid-off"],
1021
+ "allowInvalidValue": [4, "allow-invalid-value"],
1010
1022
  "focused": [32],
1011
1023
  "isGrouped": [32],
1012
1024
  "ariaForm": [32],
@@ -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,19 +18,167 @@ 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';
23
+ export { I as INVALID_VALUE } from './mask-util.js';
21
24
  import { g as getOverlays, a as getOverlay } from './overlays.js';
22
25
  import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
23
26
  export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
24
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';
25
- export { d as defaultConfig } from './config.default.js';
26
28
  import { S as Subject } from './listener.js';
27
29
  export { B as BalSwipeSubject } from './swipe.subject.js';
28
30
  export { B as BalDate } from './date.js';
29
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
+
30
182
  const i18nBalFieldLabel = {
31
183
  de: {
32
184
  optional: ' (optional)',
@@ -60,6 +212,139 @@ const i18nBalFieldLabel = {
60
212
  },
61
213
  };
62
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.2.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
+
63
348
  const newBalCheckboxOption = (option) => {
64
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 });
65
350
  };
@@ -177,4 +462,4 @@ const isPlatform = (winOrPlatform, platform) => {
177
462
  const NewBalOptionValue = newBalOptionValue;
178
463
  const NewBalSingleOptionValue = newBalSingleOptionValue;
179
464
 
180
- 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 };
@@ -0,0 +1,3 @@
1
+ const INVALID_VALUE = 'INVALID_VALUE';
2
+
3
+ export { INVALID_VALUE as I };
@@ -61,7 +61,7 @@ class BalScrollHandler {
61
61
  }
62
62
  }
63
63
  disable() {
64
- if (this.target) {
64
+ if (!this.disabled && this.target) {
65
65
  if (balBrowser.hasWindow && balBrowser.hasDocument) {
66
66
  this.x = window.pageXOffset || document.documentElement.scrollLeft;
67
67
  this.y = window.pageYOffset || document.documentElement.scrollTop;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 May 2024 06:09:21 GMT
3
+ * Generated on Thu, 16 May 2024 13:25:06 GMT
4
4
  */
5
5
  const balColorGreen3 = "#94e3d4";
6
6
  const balColorGreen6 = "#1b5951";