@baloise/ds-core 19.9.0 → 19.9.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 (164) hide show
  1. package/components/floating-ui.dom.js +151 -125
  2. package/components/index.js +1 -1
  3. package/components/svg.js +1595 -1325
  4. package/components/tokens.esm.js +1 -1
  5. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  6. package/dist/baloise-design-system/index.esm.js +1 -1
  7. package/dist/baloise-design-system/{p-79006350e3.system.entry.js → p-00d493e589.system.entry.js} +1 -1
  8. package/dist/baloise-design-system/{p-862bf2c3e6.entry.js → p-01b27feafd.entry.js} +1 -1
  9. package/dist/baloise-design-system/{p-2333a469fa.entry.js → p-02323ca1fe.entry.js} +1 -1
  10. package/dist/baloise-design-system/{p-c23854bd63.entry.js → p-0732a81f81.entry.js} +1 -1
  11. package/dist/baloise-design-system/{p-efd2551aca.entry.js → p-0974dcb139.entry.js} +1 -1
  12. package/dist/baloise-design-system/{p-b9bbf796f3.system.entry.js → p-0c0190dc67.system.entry.js} +1 -1
  13. package/dist/baloise-design-system/{p-493e239429.entry.js → p-12d43e06d9.entry.js} +1 -1
  14. package/dist/baloise-design-system/{p-bd5655b6a8.entry.js → p-198c6e75ad.entry.js} +1 -1
  15. package/dist/baloise-design-system/{p-1ee3f23f54.entry.js → p-1c913d4359.entry.js} +1 -1
  16. package/dist/baloise-design-system/{p-a7503a0c9d.entry.js → p-1f0f2e599d.entry.js} +1 -1
  17. package/dist/baloise-design-system/{p-44137a3d17.system.entry.js → p-213c4d93f4.system.entry.js} +1 -1
  18. package/dist/baloise-design-system/{p-7f2e1e1be7.entry.js → p-239ed27774.entry.js} +1 -1
  19. package/dist/baloise-design-system/{p-5c3f48e883.system.entry.js → p-25dce380f8.system.entry.js} +1 -1
  20. package/dist/baloise-design-system/{p-e9095ec856.system.entry.js → p-29defa9270.system.entry.js} +1 -1
  21. package/dist/baloise-design-system/{p-586de1181e.entry.js → p-340cd7b9e8.entry.js} +1 -1
  22. package/dist/baloise-design-system/p-38d8f6459e.system.entry.js +1 -0
  23. package/dist/baloise-design-system/{p-c637edb9ea.entry.js → p-3d9d33c487.entry.js} +1 -1
  24. package/dist/baloise-design-system/{p-b75b727fbc.entry.js → p-3ec4feac2e.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-772db94619.system.entry.js → p-3ff089ddd6.system.entry.js} +1 -1
  26. package/dist/baloise-design-system/{p-Dn1vzM6-.js → p-4MIQMEtx.js} +1 -1
  27. package/dist/baloise-design-system/{p-0556bebe3a.system.entry.js → p-5ed691fea4.system.entry.js} +1 -1
  28. package/dist/baloise-design-system/{p-fb980109e2.system.entry.js → p-6620c99966.system.entry.js} +1 -1
  29. package/dist/baloise-design-system/p-777471c320.entry.js +1 -0
  30. package/dist/baloise-design-system/{p-14ae6214c4.system.entry.js → p-78eb8b6cd9.system.entry.js} +1 -1
  31. package/dist/baloise-design-system/{p-0077e5a12f.entry.js → p-79d0e94ea1.entry.js} +1 -1
  32. package/dist/baloise-design-system/p-992840a30d.entry.js +1 -0
  33. package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
  34. package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
  35. package/dist/baloise-design-system/p-Bk7UdnZ5.system.js +1 -1
  36. package/dist/baloise-design-system/p-BmOE4zEk.system.js +1 -0
  37. package/dist/baloise-design-system/{p-TqRS9XF1.system.js → p-Bp0A6Ore.system.js} +1 -1
  38. package/dist/baloise-design-system/{p-DmVt6SeJ.js → p-BzAHSyRi.js} +1 -1
  39. package/dist/baloise-design-system/p-C8LDaK6Z.system.js +1 -0
  40. package/dist/baloise-design-system/p-CAb2C8az.js +1 -0
  41. package/dist/baloise-design-system/p-Ck7YRry-.system.js +2 -0
  42. package/dist/baloise-design-system/{p-BDYdAsv_.system.js → p-CkIgsCwS.system.js} +1 -1
  43. package/dist/baloise-design-system/p-Cr2H7Jt3.js +1 -0
  44. package/dist/baloise-design-system/p-DojUs2K8.js +2 -0
  45. package/dist/baloise-design-system/{p-CE3V5D8z.system.js → p-DvahsaGu.system.js} +1 -1
  46. package/dist/baloise-design-system/{p-bNRkwxp2.system.js → p-G8UK5F7H.system.js} +1 -1
  47. package/dist/baloise-design-system/p-P4eJh_wN.js +1 -0
  48. package/dist/baloise-design-system/{p-7cb15b231d.entry.js → p-a1482cbe4a.entry.js} +1 -1
  49. package/dist/baloise-design-system/p-a9d42c63a1.system.entry.js +1 -0
  50. package/dist/baloise-design-system/{p-ee0b45ff30.system.entry.js → p-b1877d6778.system.entry.js} +1 -1
  51. package/dist/baloise-design-system/{p-393a31ad6e.system.entry.js → p-bc641f2029.system.entry.js} +1 -1
  52. package/dist/baloise-design-system/{p-6191805e40.system.entry.js → p-d41ca5c096.system.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-bb255885a4.system.entry.js → p-d5de2680ad.system.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-fec5974e23.entry.js → p-dafa925d2c.entry.js} +1 -1
  55. package/dist/baloise-design-system/{p-3ed3bfc59a.system.entry.js → p-f22c5ab5ed.system.entry.js} +1 -1
  56. package/dist/baloise-design-system/{p-eb98a3713f.system.entry.js → p-f481d72c52.system.entry.js} +1 -1
  57. package/dist/baloise-design-system/{p-8029d2f939.entry.js → p-f4c4d03e6e.entry.js} +1 -1
  58. package/dist/baloise-design-system/{p-c8491fda99.system.entry.js → p-fc8024a9d7.system.entry.js} +1 -1
  59. package/dist/baloise-design-system/{p-a10bc9e5d8.entry.js → p-fc9a46b295.entry.js} +1 -1
  60. package/dist/baloise-design-system/{p-a3558335f2.system.entry.js → p-fd5d4c0fd7.system.entry.js} +1 -1
  61. package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -4
  62. package/dist/cjs/bal-date.cjs.entry.js +1 -1
  63. package/dist/cjs/bal-dropdown_3.cjs.entry.js +1 -1
  64. package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
  65. package/dist/cjs/bal-footer.cjs.entry.js +1 -1
  66. package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
  67. package/dist/cjs/bal-icon.cjs.entry.js +1 -1
  68. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  69. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  70. package/dist/cjs/bal-nav_8.cjs.entry.js +5 -4
  71. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  72. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  73. package/dist/cjs/bal-popup.cjs.entry.js +1 -1
  74. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  75. package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
  76. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  77. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  78. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  79. package/dist/cjs/bal-tooltip.cjs.entry.js +1 -1
  80. package/dist/cjs/{breakpoints.decorator-DhiWnqha.js → breakpoints.decorator-Cc1aDi12.js} +1 -1
  81. package/dist/cjs/{breakpoints.subject-DPTVZ3As.js → breakpoints.subject-CEyIkleD.js} +1 -1
  82. package/dist/cjs/{floating-ui-DyN44UhF.js → floating-ui-BE1Qsw-b.js} +1 -1
  83. package/dist/cjs/{floating-ui.dom-BPU3HWKX.js → floating-ui.dom-DCg2YBDr.js} +151 -125
  84. package/dist/cjs/index.cjs.js +2 -2
  85. package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
  86. package/dist/cjs/svg-qEvvK3mS.js +1607 -0
  87. package/dist/cjs/{tokens.esm-DM_dMnsW.js → tokens.esm-CO4NpDkI.js} +1 -1
  88. package/dist/cjs/{window-resize.decorator-oyMA7gDI.js → window-resize.decorator-DiYHzl6q.js} +1 -1
  89. package/dist/collection/utils/constants/version.constant.js +1 -1
  90. package/dist/esm/bal-carousel_2.entry.js +5 -4
  91. package/dist/esm/bal-date.entry.js +1 -1
  92. package/dist/esm/bal-dropdown_3.entry.js +1 -1
  93. package/dist/esm/bal-field_5.entry.js +3 -3
  94. package/dist/esm/bal-footer.entry.js +1 -1
  95. package/dist/esm/bal-hint_5.entry.js +3 -3
  96. package/dist/esm/bal-icon.entry.js +1 -1
  97. package/dist/esm/bal-list_8.entry.js +3 -3
  98. package/dist/esm/bal-logo.entry.js +3 -3
  99. package/dist/esm/bal-nav_8.entry.js +5 -4
  100. package/dist/esm/bal-navbar_5.entry.js +3 -3
  101. package/dist/esm/bal-pagination.entry.js +3 -3
  102. package/dist/esm/bal-popup.entry.js +1 -1
  103. package/dist/esm/bal-progress-bar.entry.js +4 -4
  104. package/dist/esm/bal-segment_2.entry.js +4 -4
  105. package/dist/esm/bal-shape.entry.js +1 -1
  106. package/dist/esm/bal-steps.entry.js +3 -3
  107. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  108. package/dist/esm/bal-tooltip.entry.js +1 -1
  109. package/dist/esm/{breakpoints.decorator-C-DmFJbn.js → breakpoints.decorator-CFE2cXqN.js} +1 -1
  110. package/dist/esm/{breakpoints.subject-Iyftu-nV.js → breakpoints.subject-BtghxYYt.js} +1 -1
  111. package/dist/esm/{floating-ui-Bx04QSXP.js → floating-ui-gZ7E41T8.js} +1 -1
  112. package/dist/esm/{floating-ui.dom-DKxvaA1I.js → floating-ui.dom-Cr2H7Jt3.js} +151 -125
  113. package/dist/esm/index.js +3 -3
  114. package/dist/esm/initialize-W3od-FM9.js +1 -1
  115. package/dist/esm/svg-DhNz-XmR.js +1605 -0
  116. package/dist/esm/{tokens.esm-C9EQ_6RZ.js → tokens.esm-DcKTia-G.js} +1 -1
  117. package/dist/esm/{window-resize.decorator-BU569j2_.js → window-resize.decorator-DJtj2dCF.js} +1 -1
  118. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  119. package/dist/esm-es5/bal-date.entry.js +1 -1
  120. package/dist/esm-es5/bal-dropdown_3.entry.js +1 -1
  121. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  122. package/dist/esm-es5/bal-footer.entry.js +1 -1
  123. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  124. package/dist/esm-es5/bal-icon.entry.js +1 -1
  125. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  126. package/dist/esm-es5/bal-logo.entry.js +1 -1
  127. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  128. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  129. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  130. package/dist/esm-es5/bal-popup.entry.js +1 -1
  131. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  132. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  133. package/dist/esm-es5/bal-shape.entry.js +1 -1
  134. package/dist/esm-es5/bal-steps.entry.js +1 -1
  135. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  136. package/dist/esm-es5/bal-tooltip.entry.js +1 -1
  137. package/dist/esm-es5/{breakpoints.decorator-C-DmFJbn.js → breakpoints.decorator-CFE2cXqN.js} +1 -1
  138. package/dist/esm-es5/{breakpoints.subject-Iyftu-nV.js → breakpoints.subject-BtghxYYt.js} +1 -1
  139. package/dist/esm-es5/{floating-ui-Bx04QSXP.js → floating-ui-gZ7E41T8.js} +1 -1
  140. package/dist/esm-es5/floating-ui.dom-Cr2H7Jt3.js +1 -0
  141. package/dist/esm-es5/index.js +1 -1
  142. package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
  143. package/dist/esm-es5/svg-DhNz-XmR.js +2 -0
  144. package/dist/esm-es5/{window-resize.decorator-BU569j2_.js → window-resize.decorator-DJtj2dCF.js} +1 -1
  145. package/dist/types/utils/svg.d.ts +1 -1
  146. package/package.json +9 -9
  147. package/dist/baloise-design-system/p-37641c340c.entry.js +0 -1
  148. package/dist/baloise-design-system/p-BIBFYhYa.system.js +0 -1
  149. package/dist/baloise-design-system/p-BS3tl84b.system.js +0 -3
  150. package/dist/baloise-design-system/p-CI2FR64u.js +0 -1
  151. package/dist/baloise-design-system/p-DKxvaA1I.js +0 -1
  152. package/dist/baloise-design-system/p-DUNB4kTY.js +0 -2
  153. package/dist/baloise-design-system/p-Dz-E2PRm.system.js +0 -1
  154. package/dist/baloise-design-system/p-Ere8qsaI.js +0 -1
  155. package/dist/baloise-design-system/p-a31aacd887.system.entry.js +0 -1
  156. package/dist/baloise-design-system/p-c1f871bb5b.system.entry.js +0 -1
  157. package/dist/baloise-design-system/p-dc45f7cf9c.entry.js +0 -1
  158. package/dist/cjs/svg-Bw61tXih.js +0 -1337
  159. package/dist/esm/svg-DUNB4kTY.js +0 -1335
  160. package/dist/esm-es5/floating-ui.dom-DKxvaA1I.js +0 -1
  161. package/dist/esm-es5/svg-DUNB4kTY.js +0 -2
  162. /package/dist/baloise-design-system/{p-C9EQ_6RZ.js → p-DcKTia-G.js} +0 -0
  163. /package/dist/baloise-design-system/{p-dEE6wNs_.system.js → p-q1IO5uRR.system.js} +0 -0
  164. /package/dist/esm-es5/{tokens.esm-C9EQ_6RZ.js → tokens.esm-DcKTia-G.js} +0 -0
@@ -12,11 +12,11 @@ var string = require('./string-CKS6CsMi.js');
12
12
  var balTab_util = require('./bal-tab.util-DFGwGbfr.js');
13
13
  var aria = require('./aria-BzkqcV7W.js');
14
14
  var browser = require('./browser-BwmkTmm8.js');
15
- var breakpoints_subject = require('./breakpoints.subject-DPTVZ3As.js');
15
+ var breakpoints_subject = require('./breakpoints.subject-CEyIkleD.js');
16
16
  var config_default = require('./config.default-Cko-wpRU.js');
17
17
  var mutation_decorator = require('./mutation.decorator-BolUYaKD.js');
18
18
  var visibility_decorator = require('./visibility.decorator-DTARY-5M.js');
19
- var breakpoints_decorator = require('./breakpoints.decorator-DhiWnqha.js');
19
+ var breakpoints_decorator = require('./breakpoints.decorator-Cc1aDi12.js');
20
20
  var resize_decorator = require('./resize.decorator-ChuFQ8x3.js');
21
21
  var swipe_decorator = require('./swipe.decorator-BZYUlkYt.js');
22
22
  var animation_decorator = require('./animation.decorator-B4NJvcMF.js');
@@ -28,7 +28,7 @@ require('./config.utils-Civnz2jT.js');
28
28
  require('./keyboard.helpers-BkZpVT-9.js');
29
29
  require('./device-CoogBamh.js');
30
30
  require('./listener-DspXpqzY.js');
31
- require('./tokens.esm-DM_dMnsW.js');
31
+ require('./tokens.esm-CO4NpDkI.js');
32
32
  require('./swipe.subject-BaKNugDQ.js');
33
33
 
34
34
  const TabItem = class {
@@ -5,7 +5,7 @@ var tslib_es6 = require('./tslib.es6-DrfCPgT9.js');
5
5
  var bem = require('./bem-p0PWVN8n.js');
6
6
  var browser = require('./browser-BwmkTmm8.js');
7
7
  var device = require('./device-CoogBamh.js');
8
- var floatingUi = require('./floating-ui-DyN44UhF.js');
8
+ var floatingUi = require('./floating-ui-BE1Qsw-b.js');
9
9
  var log = require('./log-CXDMiw7o.js');
10
10
  require('./helpers-HuaiWXrB.js');
11
11
  require('./config.utils-Civnz2jT.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var breakpoints_subject = require('./breakpoints.subject-DPTVZ3As.js');
3
+ var breakpoints_subject = require('./breakpoints.subject-CEyIkleD.js');
4
4
 
5
5
  function ListenToBreakpoints() {
6
6
  return function (target, _propertyKey, _descriptor) {
@@ -4,7 +4,7 @@ var helpers = require('./helpers-HuaiWXrB.js');
4
4
  var browser = require('./browser-BwmkTmm8.js');
5
5
  var device = require('./device-CoogBamh.js');
6
6
  var listener = require('./listener-DspXpqzY.js');
7
- var tokens_esm = require('./tokens.esm-DM_dMnsW.js');
7
+ var tokens_esm = require('./tokens.esm-CO4NpDkI.js');
8
8
 
9
9
  class BalWindowResizeHandler {
10
10
  constructor(options = {}) {
@@ -11,7 +11,7 @@ class BalFloatingUiInternal {
11
11
  }
12
12
  else {
13
13
  helpers.rOnLoad(async () => {
14
- Promise.resolve().then(function () { return require(/* @vite-ignore */ './floating-ui.dom-BPU3HWKX.js'); })
14
+ Promise.resolve().then(function () { return require(/* @vite-ignore */ './floating-ui.dom-DCg2YBDr.js'); })
15
15
  .then(module => {
16
16
  this.lib = module;
17
17
  resolve(this.lib);
@@ -22,10 +22,6 @@ const oppositeSideMap = {
22
22
  bottom: 'top',
23
23
  top: 'bottom'
24
24
  };
25
- const oppositeAlignmentMap = {
26
- start: 'end',
27
- end: 'start'
28
- };
29
25
  function clamp(start, value, end) {
30
26
  return max(start, min(value, end));
31
27
  }
@@ -45,7 +41,8 @@ function getAxisLength(axis) {
45
41
  return axis === 'y' ? 'height' : 'width';
46
42
  }
47
43
  function getSideAxis(placement) {
48
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
44
+ const firstChar = placement[0];
45
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
49
46
  }
50
47
  function getAlignmentAxis(placement) {
51
48
  return getOppositeAxis(getSideAxis(placement));
@@ -68,21 +65,21 @@ function getExpandedPlacements(placement) {
68
65
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
69
66
  }
70
67
  function getOppositeAlignmentPlacement(placement) {
71
- return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
68
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
72
69
  }
70
+ const lrPlacement = ['left', 'right'];
71
+ const rlPlacement = ['right', 'left'];
72
+ const tbPlacement = ['top', 'bottom'];
73
+ const btPlacement = ['bottom', 'top'];
73
74
  function getSideList(side, isStart, rtl) {
74
- const lr = ['left', 'right'];
75
- const rl = ['right', 'left'];
76
- const tb = ['top', 'bottom'];
77
- const bt = ['bottom', 'top'];
78
75
  switch (side) {
79
76
  case 'top':
80
77
  case 'bottom':
81
- if (rtl) return isStart ? rl : lr;
82
- return isStart ? lr : rl;
78
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
79
+ return isStart ? lrPlacement : rlPlacement;
83
80
  case 'left':
84
81
  case 'right':
85
- return isStart ? tb : bt;
82
+ return isStart ? tbPlacement : btPlacement;
86
83
  default:
87
84
  return [];
88
85
  }
@@ -99,7 +96,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
99
96
  return list;
100
97
  }
101
98
  function getOppositePlacement(placement) {
102
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
99
+ const side = getSide(placement);
100
+ return oppositeSideMap[side] + placement.slice(side.length);
103
101
  }
104
102
  function expandPaddingObject(padding) {
105
103
  return {
@@ -193,6 +191,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
193
191
  return coords;
194
192
  }
195
193
 
194
+ /**
195
+ * Resolves with an object of overflow side offsets that determine how much the
196
+ * element is overflowing a given clipping boundary on each side.
197
+ * - positive = overflowing the boundary by that number of pixels
198
+ * - negative = how many pixels left before it will overflow
199
+ * - 0 = lies flush with the boundary
200
+ * @see https://floating-ui.com/docs/detectOverflow
201
+ */
202
+ async function detectOverflow$1(state, options) {
203
+ var _await$platform$isEle;
204
+ if (options === void 0) {
205
+ options = {};
206
+ }
207
+ const {
208
+ x,
209
+ y,
210
+ platform,
211
+ rects,
212
+ elements,
213
+ strategy
214
+ } = state;
215
+ const {
216
+ boundary = 'clippingAncestors',
217
+ rootBoundary = 'viewport',
218
+ elementContext = 'floating',
219
+ altBoundary = false,
220
+ padding = 0
221
+ } = evaluate(options, state);
222
+ const paddingObject = getPaddingObject(padding);
223
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
224
+ const element = elements[altBoundary ? altContext : elementContext];
225
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
226
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
227
+ boundary,
228
+ rootBoundary,
229
+ strategy
230
+ }));
231
+ const rect = elementContext === 'floating' ? {
232
+ x,
233
+ y,
234
+ width: rects.floating.width,
235
+ height: rects.floating.height
236
+ } : rects.reference;
237
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
238
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
239
+ x: 1,
240
+ y: 1
241
+ } : {
242
+ x: 1,
243
+ y: 1
244
+ };
245
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
246
+ elements,
247
+ rect,
248
+ offsetParent,
249
+ strategy
250
+ }) : rect);
251
+ return {
252
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
253
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
254
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
255
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
256
+ };
257
+ }
258
+
259
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
260
+ const MAX_RESET_COUNT = 50;
261
+
196
262
  /**
197
263
  * Computes the `x` and `y` coordinates that will place the floating element
198
264
  * next to a given reference element.
@@ -207,7 +273,10 @@ const computePosition$1 = async (reference, floating, config) => {
207
273
  middleware = [],
208
274
  platform
209
275
  } = config;
210
- const validMiddleware = middleware.filter(Boolean);
276
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
277
+ ...platform,
278
+ detectOverflow: detectOverflow$1
279
+ };
211
280
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
212
281
  let rects = await platform.getElementRects({
213
282
  reference,
@@ -219,13 +288,17 @@ const computePosition$1 = async (reference, floating, config) => {
219
288
  y
220
289
  } = computeCoordsFromPlacement(rects, placement, rtl);
221
290
  let statefulPlacement = placement;
222
- let middlewareData = {};
223
291
  let resetCount = 0;
224
- for (let i = 0; i < validMiddleware.length; i++) {
292
+ const middlewareData = {};
293
+ for (let i = 0; i < middleware.length; i++) {
294
+ const currentMiddleware = middleware[i];
295
+ if (!currentMiddleware) {
296
+ continue;
297
+ }
225
298
  const {
226
299
  name,
227
300
  fn
228
- } = validMiddleware[i];
301
+ } = currentMiddleware;
229
302
  const {
230
303
  x: nextX,
231
304
  y: nextY,
@@ -239,7 +312,7 @@ const computePosition$1 = async (reference, floating, config) => {
239
312
  strategy,
240
313
  middlewareData,
241
314
  rects,
242
- platform,
315
+ platform: platformWithDetectOverflow,
243
316
  elements: {
244
317
  reference,
245
318
  floating
@@ -247,14 +320,11 @@ const computePosition$1 = async (reference, floating, config) => {
247
320
  });
248
321
  x = nextX != null ? nextX : x;
249
322
  y = nextY != null ? nextY : y;
250
- middlewareData = {
251
- ...middlewareData,
252
- [name]: {
253
- ...middlewareData[name],
254
- ...data
255
- }
323
+ middlewareData[name] = {
324
+ ...middlewareData[name],
325
+ ...data
256
326
  };
257
- if (reset && resetCount <= 50) {
327
+ if (reset && resetCount < MAX_RESET_COUNT) {
258
328
  resetCount++;
259
329
  if (typeof reset === 'object') {
260
330
  if (reset.placement) {
@@ -284,71 +354,6 @@ const computePosition$1 = async (reference, floating, config) => {
284
354
  };
285
355
  };
286
356
 
287
- /**
288
- * Resolves with an object of overflow side offsets that determine how much the
289
- * element is overflowing a given clipping boundary on each side.
290
- * - positive = overflowing the boundary by that number of pixels
291
- * - negative = how many pixels left before it will overflow
292
- * - 0 = lies flush with the boundary
293
- * @see https://floating-ui.com/docs/detectOverflow
294
- */
295
- async function detectOverflow$1(state, options) {
296
- var _await$platform$isEle;
297
- if (options === void 0) {
298
- options = {};
299
- }
300
- const {
301
- x,
302
- y,
303
- platform,
304
- rects,
305
- elements,
306
- strategy
307
- } = state;
308
- const {
309
- boundary = 'clippingAncestors',
310
- rootBoundary = 'viewport',
311
- elementContext = 'floating',
312
- altBoundary = false,
313
- padding = 0
314
- } = evaluate(options, state);
315
- const paddingObject = getPaddingObject(padding);
316
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
317
- const element = elements[altBoundary ? altContext : elementContext];
318
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
319
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
320
- boundary,
321
- rootBoundary,
322
- strategy
323
- }));
324
- const rect = elementContext === 'floating' ? {
325
- x,
326
- y,
327
- width: rects.floating.width,
328
- height: rects.floating.height
329
- } : rects.reference;
330
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
331
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
332
- x: 1,
333
- y: 1
334
- } : {
335
- x: 1,
336
- y: 1
337
- };
338
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
339
- elements,
340
- rect,
341
- offsetParent,
342
- strategy
343
- }) : rect);
344
- return {
345
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
346
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
347
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
348
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
349
- };
350
- }
351
-
352
357
  /**
353
358
  * Provides data to position an inner element of the floating element so that it
354
359
  * appears centered to the reference element.
@@ -470,7 +475,7 @@ const autoPlacement$1 = function (options) {
470
475
  ...detectOverflowOptions
471
476
  } = evaluate(options, state);
472
477
  const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
473
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
478
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
474
479
  const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
475
480
  const currentPlacement = placements$1[currentIndex];
476
481
  if (currentPlacement == null) {
@@ -584,7 +589,7 @@ const flip$1 = function (options) {
584
589
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
585
590
  }
586
591
  const placements = [initialPlacement, ...fallbackPlacements];
587
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
592
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
588
593
  const overflows = [];
589
594
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
590
595
  if (checkMainAxis) {
@@ -605,16 +610,22 @@ const flip$1 = function (options) {
605
610
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
606
611
  const nextPlacement = placements[nextIndex];
607
612
  if (nextPlacement) {
608
- // Try next placement and re-run the lifecycle.
609
- return {
610
- data: {
611
- index: nextIndex,
612
- overflows: overflowsData
613
- },
614
- reset: {
615
- placement: nextPlacement
616
- }
617
- };
613
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
614
+ if (!ignoreCrossAxisOverflow ||
615
+ // We leave the current main axis only if every placement on that axis
616
+ // overflows the main axis.
617
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
618
+ // Try next placement and re-run the lifecycle.
619
+ return {
620
+ data: {
621
+ index: nextIndex,
622
+ overflows: overflowsData
623
+ },
624
+ reset: {
625
+ placement: nextPlacement
626
+ }
627
+ };
628
+ }
618
629
  }
619
630
 
620
631
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -685,7 +696,8 @@ const hide$1 = function (options) {
685
696
  options,
686
697
  async fn(state) {
687
698
  const {
688
- rects
699
+ rects,
700
+ platform
689
701
  } = state;
690
702
  const {
691
703
  strategy = 'referenceHidden',
@@ -694,7 +706,7 @@ const hide$1 = function (options) {
694
706
  switch (strategy) {
695
707
  case 'referenceHidden':
696
708
  {
697
- const overflow = await detectOverflow$1(state, {
709
+ const overflow = await platform.detectOverflow(state, {
698
710
  ...detectOverflowOptions,
699
711
  elementContext: 'reference'
700
712
  });
@@ -708,7 +720,7 @@ const hide$1 = function (options) {
708
720
  }
709
721
  case 'escaped':
710
722
  {
711
- const overflow = await detectOverflow$1(state, {
723
+ const overflow = await platform.detectOverflow(state, {
712
724
  ...detectOverflowOptions,
713
725
  altBoundary: true
714
726
  });
@@ -860,6 +872,8 @@ const inline$1 = function (options) {
860
872
  };
861
873
  };
862
874
 
875
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
876
+
863
877
  // For type backwards-compatibility, the `OffsetOptions` type was also
864
878
  // Derivable.
865
879
 
@@ -873,7 +887,7 @@ async function convertValueToCoords(state, options) {
873
887
  const side = getSide(placement);
874
888
  const alignment = getAlignment(placement);
875
889
  const isVertical = getSideAxis(placement) === 'y';
876
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
890
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
877
891
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
878
892
  const rawValue = evaluate(options, state);
879
893
 
@@ -960,7 +974,8 @@ const shift$1 = function (options) {
960
974
  const {
961
975
  x,
962
976
  y,
963
- placement
977
+ placement,
978
+ platform
964
979
  } = state;
965
980
  const {
966
981
  mainAxis: checkMainAxis = true,
@@ -983,7 +998,7 @@ const shift$1 = function (options) {
983
998
  x,
984
999
  y
985
1000
  };
986
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
1001
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
987
1002
  const crossAxis = getSideAxis(getSide(placement));
988
1003
  const mainAxis = getOppositeAxis(crossAxis);
989
1004
  let mainAxisCoord = coords[mainAxis];
@@ -1073,7 +1088,7 @@ const limitShift$1 = function (options) {
1073
1088
  if (checkCrossAxis) {
1074
1089
  var _middlewareData$offse, _middlewareData$offse2;
1075
1090
  const len = mainAxis === 'y' ? 'width' : 'height';
1076
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
1091
+ const isOriginSide = originSides.has(getSide(placement));
1077
1092
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1078
1093
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1079
1094
  if (crossAxisCoord < limitMin) {
@@ -1115,7 +1130,7 @@ const size$1 = function (options) {
1115
1130
  apply = () => {},
1116
1131
  ...detectOverflowOptions
1117
1132
  } = evaluate(options, state);
1118
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
1133
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1119
1134
  const side = getSide(placement);
1120
1135
  const alignment = getAlignment(placement);
1121
1136
  const isYAxis = getSideAxis(placement) === 'y';
@@ -1225,27 +1240,35 @@ function isOverflowElement(element) {
1225
1240
  overflowY,
1226
1241
  display
1227
1242
  } = getComputedStyle(element);
1228
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1243
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
1229
1244
  }
1230
1245
  function isTableElement(element) {
1231
- return ['table', 'td', 'th'].includes(getNodeName(element));
1246
+ return /^(table|td|th)$/.test(getNodeName(element));
1232
1247
  }
1233
1248
  function isTopLayer(element) {
1234
- return [':popover-open', ':modal'].some(selector => {
1235
- try {
1236
- return element.matches(selector);
1237
- } catch (e) {
1238
- return false;
1249
+ try {
1250
+ if (element.matches(':popover-open')) {
1251
+ return true;
1239
1252
  }
1240
- });
1253
+ } catch (_e) {
1254
+ // no-op
1255
+ }
1256
+ try {
1257
+ return element.matches(':modal');
1258
+ } catch (_e) {
1259
+ return false;
1260
+ }
1241
1261
  }
1262
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1263
+ const containRe = /paint|layout|strict|content/;
1264
+ const isNotNone = value => !!value && value !== 'none';
1265
+ let isWebKitValue;
1242
1266
  function isContainingBlock(elementOrCss) {
1243
- const webkit = isWebKit();
1244
1267
  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
1245
1268
 
1246
1269
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1247
1270
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1248
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1271
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
1249
1272
  }
1250
1273
  function getContainingBlock(element) {
1251
1274
  let currentNode = getParentNode(element);
@@ -1260,11 +1283,13 @@ function getContainingBlock(element) {
1260
1283
  return null;
1261
1284
  }
1262
1285
  function isWebKit() {
1263
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
1264
- return CSS.supports('-webkit-backdrop-filter', 'none');
1286
+ if (isWebKitValue == null) {
1287
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
1288
+ }
1289
+ return isWebKitValue;
1265
1290
  }
1266
1291
  function isLastTraversableNode(node) {
1267
- return ['html', 'body', '#document'].includes(getNodeName(node));
1292
+ return /^(html|body|#document)$/.test(getNodeName(node));
1268
1293
  }
1269
1294
  function getComputedStyle(element) {
1270
1295
  return getWindow(element).getComputedStyle(element);
@@ -1320,8 +1345,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
1320
1345
  if (isBody) {
1321
1346
  const frameElement = getFrameElement(win);
1322
1347
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1348
+ } else {
1349
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1323
1350
  }
1324
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1325
1351
  }
1326
1352
  function getFrameElement(win) {
1327
1353
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -17,13 +17,13 @@ var helpers = require('./helpers-HuaiWXrB.js');
17
17
  var maskUtil = require('./mask-util-B8hrxmqO.js');
18
18
  var scroll = require('./scroll-B_kvfDui.js');
19
19
  var overlays = require('./overlays-DQGlu5jj.js');
20
- var breakpoints_subject = require('./breakpoints.subject-DPTVZ3As.js');
20
+ var breakpoints_subject = require('./breakpoints.subject-CEyIkleD.js');
21
21
  var config_utils = require('./config.utils-Civnz2jT.js');
22
22
  var config_default = require('./config.default-Cko-wpRU.js');
23
23
  var listener = require('./listener-DspXpqzY.js');
24
24
  var swipe_subject = require('./swipe.subject-BaKNugDQ.js');
25
25
  require('./index-feA4skrY.js');
26
- require('./tokens.esm-DM_dMnsW.js');
26
+ require('./tokens.esm-CO4NpDkI.js');
27
27
  require('./log-CXDMiw7o.js');
28
28
 
29
29
  const i18nBalFieldLabel = {
@@ -402,7 +402,7 @@ const tags = [
402
402
  ];
403
403
 
404
404
  // generated by .build/version.js
405
- const VERSION = '19.9.0';
405
+ const VERSION = '19.9.1';
406
406
 
407
407
  const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
408
408
  if (Object.keys(win).length === 0 && browser.balBrowser.hasWindow) {