@sbb-esta/lyne-elements 3.11.0 → 3.12.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 (173) hide show
  1. package/action-group/action-group.component.js +1 -1
  2. package/alert/alert/alert.component.js +1 -1
  3. package/autocomplete/autocomplete-base-element.d.ts +5 -0
  4. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  5. package/autocomplete/autocomplete-base-element.js +72 -59
  6. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +1 -1
  7. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
  8. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +1 -1
  9. package/badge.css +1 -0
  10. package/breadcrumb/breadcrumb/breadcrumb.component.js +4 -4
  11. package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +1 -1
  12. package/button/common.js +1 -1
  13. package/button/mini-button/mini-button.component.js +1 -1
  14. package/button.js +1 -1
  15. package/calendar/calendar.component.js +1 -1
  16. package/card/card/card.component.js +1 -1
  17. package/card/card-badge/card-badge.component.js +1 -1
  18. package/carousel/carousel-list/carousel-list.component.d.ts +8 -3
  19. package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
  20. package/carousel/carousel-list/carousel-list.component.js +62 -40
  21. package/checkbox/checkbox-group/checkbox-group.component.js +1 -1
  22. package/chip/chip/chip.component.js +1 -1
  23. package/chip/chip-group/chip-group.component.js +1 -1
  24. package/chip-label/chip-label.component.js +1 -1
  25. package/container/container/container.component.js +11 -11
  26. package/container/sticky-bar/sticky-bar.component.js +9 -9
  27. package/core/mixins.js +1 -1
  28. package/core/overlay/overlay-option-panel.d.ts +2 -1
  29. package/core/overlay/overlay-option-panel.d.ts.map +1 -1
  30. package/core/overlay/overlay-option-panel.js +8 -5
  31. package/core/overlay/position.d.ts +2 -0
  32. package/core/overlay/position.d.ts.map +1 -1
  33. package/core/overlay/position.js +19 -17
  34. package/core/styles/layout.scss +4 -0
  35. package/core/styles/mixins/badge.scss +3 -0
  36. package/core/styles/mixins/layout.scss +5 -4
  37. package/core/styles/mixins/link.scss +0 -11
  38. package/custom-elements.json +352 -197
  39. package/date-input/date-input.component.js +1 -1
  40. package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
  41. package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
  42. package/datepicker/datepicker-toggle/datepicker-toggle.component.js +1 -1
  43. package/development/autocomplete/autocomplete-base-element.d.ts +5 -0
  44. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  45. package/development/autocomplete/autocomplete-base-element.js +25 -5
  46. package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -2
  47. package/development/carousel/carousel-list/carousel-list.component.d.ts +8 -3
  48. package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
  49. package/development/carousel/carousel-list/carousel-list.component.js +51 -19
  50. package/development/container/container/container.component.js +3 -3
  51. package/development/container/sticky-bar/sticky-bar.component.js +5 -5
  52. package/development/core/overlay/overlay-option-panel.d.ts +2 -1
  53. package/development/core/overlay/overlay-option-panel.d.ts.map +1 -1
  54. package/development/core/overlay/overlay-option-panel.js +6 -3
  55. package/development/core/overlay/position.d.ts +2 -0
  56. package/development/core/overlay/position.d.ts.map +1 -1
  57. package/development/core/overlay/position.js +3 -2
  58. package/development/footer/footer.component.js +3 -3
  59. package/development/header/header/header.component.js +3 -3
  60. package/development/lead-container/lead-container.component.js +8 -7
  61. package/development/link/common/block-link-common.js +2 -12
  62. package/development/link/common/inline-link-common.js +2 -10
  63. package/development/link/common/link-common.js +1 -1
  64. package/development/link/common.js +1 -1
  65. package/development/{link-common-DPLJx5Uo.js → link-common-BDFF9Oiz.js} +1 -3
  66. package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -2
  67. package/development/link.js +1 -1
  68. package/development/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
  69. package/development/mini-calendar/mini-calendar/mini-calendar.component.js +5 -7
  70. package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +3 -3
  71. package/development/paginator/common/paginator-common.d.ts +2 -1
  72. package/development/paginator/common/paginator-common.d.ts.map +1 -1
  73. package/development/paginator/common/paginator-common.js +87 -49
  74. package/development/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
  75. package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
  76. package/development/paginator/paginator/paginator.component.d.ts +6 -0
  77. package/development/paginator/paginator/paginator.component.d.ts.map +1 -1
  78. package/development/paginator/paginator/paginator.component.js +19 -4
  79. package/development/tag/tag/tag.component.js +2 -1
  80. package/dialog/dialog/dialog.component.js +1 -1
  81. package/dialog/dialog-actions/dialog-actions.component.js +1 -1
  82. package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
  83. package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
  84. package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +1 -1
  85. package/file-selector/common.js +1 -1
  86. package/file-selector-common-BEWjyy75.js +5 -0
  87. package/file-selector.js +1 -1
  88. package/flip-card/flip-card/flip-card.component.js +1 -1
  89. package/flip-card/flip-card-summary/flip-card-summary.component.js +1 -1
  90. package/footer/footer.component.js +8 -8
  91. package/form-error/form-error.component.js +1 -1
  92. package/form-field/form-field/form-field.component.js +1 -1
  93. package/form-field/form-field-clear/form-field-clear.component.js +1 -1
  94. package/header/common/header-action-common.js +1 -1
  95. package/header/header/header.component.js +32 -32
  96. package/icon-sidebar-button-common-XcKoF2SP.js +7 -0
  97. package/layout.css +9 -3
  98. package/lead-container/lead-container.component.js +8 -8
  99. package/link/common/block-link-common.js +25 -25
  100. package/link/common/inline-link-common.js +7 -7
  101. package/link/common/link-common.js +1 -1
  102. package/link/common.js +1 -1
  103. package/link-common-nA3q92jp.js +46 -0
  104. package/link-list/link-list/link-list.component.js +1 -1
  105. package/link-list/link-list-anchor/link-list-anchor.component.js +5 -5
  106. package/link.js +1 -1
  107. package/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
  108. package/logo/logo.component.js +1 -1
  109. package/map-container/map-container.component.js +1 -1
  110. package/menu/common/menu-action-common.js +1 -1
  111. package/menu/menu/menu.component.js +1 -1
  112. package/mini-calendar/mini-calendar/mini-calendar.component.d.ts.map +1 -1
  113. package/mini-calendar/mini-calendar/mini-calendar.component.js +5 -9
  114. package/mini-calendar/mini-calendar-day/mini-calendar-day.component.js +1 -1
  115. package/mini-calendar/mini-calendar-month/mini-calendar-month.component.js +16 -16
  116. package/navigation/common/navigation-action-common.js +1 -1
  117. package/navigation/navigation/navigation.component.js +1 -1
  118. package/navigation/navigation-marker/navigation-marker.component.js +1 -1
  119. package/navigation/navigation-section/navigation-section.component.js +1 -1
  120. package/notification/notification.component.js +1 -1
  121. package/off-brand-theme.css +10 -3
  122. package/option/option/option.component.js +1 -1
  123. package/overlay/overlay.component.js +1 -1
  124. package/package.json +1 -1
  125. package/paginator/common/paginator-common.d.ts +2 -1
  126. package/paginator/common/paginator-common.d.ts.map +1 -1
  127. package/paginator/common/paginator-common.js +102 -81
  128. package/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
  129. package/paginator/compact-paginator/compact-paginator.component.js +2 -1
  130. package/paginator/paginator/paginator.component.d.ts +6 -0
  131. package/paginator/paginator/paginator.component.d.ts.map +1 -1
  132. package/paginator/paginator/paginator.component.js +57 -45
  133. package/popover/popover/popover.component.js +1 -1
  134. package/popover/popover-trigger/popover-trigger.component.js +1 -1
  135. package/radio-button/common.js +1 -1
  136. package/radio-button/radio-button-group/radio-button-group.component.js +1 -1
  137. package/radio-button-common-Bw2t3Sxz.js +5 -0
  138. package/radio-button.js +1 -1
  139. package/safety-theme.css +10 -3
  140. package/select/select.component.js +1 -1
  141. package/selection-expansion-panel/selection-expansion-panel.component.js +1 -1
  142. package/sidebar/common.js +1 -1
  143. package/sidebar/sidebar-container/sidebar-container.component.js +1 -1
  144. package/sidebar.js +1 -1
  145. package/signet/signet.component.js +1 -1
  146. package/slider/slider.component.js +1 -1
  147. package/standard-theme.css +10 -3
  148. package/stepper/step-label/step-label.component.js +1 -1
  149. package/stepper/stepper/stepper.component.js +1 -1
  150. package/tabs/tab-label/tab-label.component.js +1 -1
  151. package/tag/tag/tag.component.js +4 -4
  152. package/teaser/teaser.component.js +1 -1
  153. package/teaser-hero/teaser-hero.component.js +1 -1
  154. package/teaser-product/common.js +1 -1
  155. package/teaser-product/teaser-product/teaser-product.component.js +1 -1
  156. package/teaser-product-common-Du28QCY3.js +5 -0
  157. package/teaser-product.js +1 -1
  158. package/time-input/time-input.component.js +1 -1
  159. package/timetable-occupancy/timetable-occupancy.component.js +1 -1
  160. package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +1 -1
  161. package/toggle/toggle/toggle.component.js +1 -1
  162. package/toggle-check/toggle-check.component.js +1 -1
  163. package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
  164. package/train/train-formation/train-formation.component.js +1 -1
  165. package/train/train-wagon/train-wagon.component.js +1 -1
  166. package/transparent-button-DJIkG5hj.js +9 -0
  167. package/visual-checkbox/visual-checkbox.component.js +1 -1
  168. package/file-selector-common-D88J9PEh.js +0 -5
  169. package/icon-sidebar-button-common-BeRXvifI.js +0 -7
  170. package/link-common-BBKGg9HN.js +0 -46
  171. package/radio-button-common-Nm9ULjVb.js +0 -5
  172. package/teaser-product-common-DIra6aVg.js +0 -5
  173. package/transparent-button-Bg9fU_iZ.js +0 -9
@@ -5,6 +5,7 @@
5
5
  * @param optionContainer The reference to the option panel.
6
6
  * @param container The element which has the position:fixed applied.
7
7
  * @param element The reference to the component.
8
+ * @param position The allowed position of the overlay relative to the origin.
8
9
  */
9
- export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement): void;
10
+ export declare function setOverlayPosition(dialog: HTMLElement, originElement: HTMLElement, optionContainer: HTMLElement, container: HTMLElement, element: HTMLElement, position?: 'auto' | 'above' | 'below'): void;
10
11
  //# sourceMappingURL=overlay-option-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,WAAW,EAC1B,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,GACnB,IAAI,CAmBN"}
1
+ {"version":3,"file":"overlay-option-panel.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay-option-panel.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,WAAW,EAC1B,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,MAAM,GAAG,OAAO,GAAG,OAAgB,GAC5C,IAAI,CAsBN"}
@@ -1,11 +1,14 @@
1
- import { getElementPosition as a } from "./position.js";
2
- function r(p, o, i, e, t) {
3
- if (!p || !o)
1
+ import { getElementPosition as r } from "./position.js";
2
+ function b(e, o, i, a, t, p = "auto") {
3
+ if (!e || !o)
4
4
  return;
5
5
  t.style.setProperty("--sbb-options-panel-width", `${o.offsetWidth}px`), t.style.setProperty("--sbb-options-panel-origin-height", `${o.offsetHeight}px`);
6
- const s = a(i, o, e);
6
+ const s = r(i, o, a, {
7
+ forceBelow: p === "below",
8
+ forceAbove: p === "above"
9
+ });
7
10
  t.style.setProperty("--sbb-options-panel-position-x", `${s.left}px`), t.style.setProperty("--sbb-options-panel-position-y", `${s.top}px`), t.style.setProperty("--sbb-options-panel-max-height", s.maxHeight), t.setAttribute("data-options-panel-position", s.alignment.vertical), o.setAttribute("data-options-panel-position", s.alignment.vertical);
8
11
  }
9
12
  export {
10
- r as setOverlayPosition
13
+ b as setOverlayPosition
11
14
  };
@@ -37,6 +37,8 @@ export declare function getElementPosition(element: HTMLElement, trigger: HTMLEl
37
37
  horizontalOffset?: number;
38
38
  centered?: boolean;
39
39
  responsiveHeight?: boolean;
40
+ forceAbove?: boolean;
41
+ forceBelow?: boolean;
40
42
  }): SbbElementPositionInfos;
41
43
  /**
42
44
  * Determines the position of an element relative to a trigger element by evaluating
@@ -1 +1 @@
1
- {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/position.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,WAAW,EACX,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CACjG,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAoCrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,KAAK,EAAE,UAAU,GAAG,YAAY,GAC/B,OAAO,CAYT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GACA,uBAAuB,CAqGzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,uBAAuB,CAgEzB"}
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/position.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,WAAW,EACX,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CACjG,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAoCrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,KAAK,EAAE,UAAU,GAAG,YAAY,GAC/B,OAAO,CAYT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GACA,uBAAuB,CAsGzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,uBAAuB,CAgEzB"}
@@ -1,6 +1,6 @@
1
1
  function R(t) {
2
- const o = window.getComputedStyle(t), c = o.display, h = parseInt(o.maxHeight, 10).toString();
3
- if (c !== "none" && h !== "0")
2
+ const o = window.getComputedStyle(t), c = o.display, s = parseInt(o.maxHeight, 10).toString();
3
+ if (c !== "none" && s !== "0")
4
4
  return {
5
5
  scrollHeight: t.scrollHeight,
6
6
  clientHeight: t.clientHeight,
@@ -10,8 +10,8 @@ function R(t) {
10
10
  offsetWidth: t.offsetWidth
11
11
  };
12
12
  t.style.position = "absolute", t.style.visibility = "hidden", t.style.display = "block";
13
- const v = t.scrollHeight, n = t.clientHeight, g = t.offsetHeight, r = t.scrollWidth, e = t.clientWidth, i = t.offsetWidth;
14
- return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: v, clientHeight: n, offsetHeight: g, scrollWidth: r, clientWidth: e, offsetWidth: i };
13
+ const p = t.scrollHeight, n = t.clientHeight, g = t.offsetHeight, r = t.scrollWidth, e = t.clientWidth, i = t.offsetWidth;
14
+ return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: p, clientHeight: n, offsetHeight: g, scrollWidth: r, clientWidth: e, offsetWidth: i };
15
15
  }
16
16
  function x(t, o) {
17
17
  if (!t || !o)
@@ -19,33 +19,35 @@ function x(t, o) {
19
19
  const c = t.getBoundingClientRect();
20
20
  return c.top <= o.clientY && o.clientY <= c.top + c.height && c.left <= o.clientX && o.clientX <= c.left + c.width;
21
21
  }
22
- function y(t, o, c, h) {
23
- const n = h?.verticalOffset || 0, g = h?.horizontalOffset || 0, r = h?.responsiveHeight || !1, e = o.getBoundingClientRect(), i = R(t), f = e.left, H = e.top, W = document.documentElement.clientWidth - (f + e.width), d = H - n, u = document.documentElement.clientHeight - (H + e.height + n);
24
- let s = f, m = H + e.height + n, l = i.offsetWidth - e.width;
22
+ function w(t, o, c, s) {
23
+ const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = s?.responsiveHeight || !1, e = o.getBoundingClientRect(), i = R(t), f = e.left, H = e.top, W = document.documentElement.clientWidth - (f + e.width), d = H - n, u = document.documentElement.clientHeight - (H + e.height + n);
24
+ let h = f, m = H + e.height + n, l = i.offsetWidth - e.width;
25
25
  const a = { horizontal: "start", vertical: "below" };
26
26
  let O = `${u - n}px`;
27
- h?.centered && f - 16 + e.width / 2 > i.offsetWidth / 2 && W - 16 > l / 2 && (s -= l /= 2, a.horizontal = "center"), W < l && f > l && (s = s - l, a.horizontal = "end"), g && a.horizontal !== "center" && e.width / 2 < g && (s += g * (a.horizontal === "start" ? -1 : 1)), (f < l && W < l || document.documentElement.clientWidth < i.offsetWidth) && (s = document.documentElement.clientWidth / 2 - i.offsetWidth / 2), (u - n < i.scrollHeight && d - n > (r ? i.clientHeight : i.scrollHeight) || d > u && u - n < i.clientHeight && !r) && (m = d < i.scrollHeight ? m - e.height - d - n : H - i.clientHeight - n, O = `${d - n}px`, a.vertical = "above");
28
- const p = c.getBoundingClientRect();
29
- return p.left < 0 && (s -= p.left), p.top < 0 && (m -= p.top), {
27
+ s?.centered && f - 16 + e.width / 2 > i.offsetWidth / 2 && W - 16 > l / 2 && (h -= l /= 2, a.horizontal = "center"), W < l && f > l && (h = h - l, a.horizontal = "end"), g && a.horizontal !== "center" && e.width / 2 < g && (h += g * (a.horizontal === "start" ? -1 : 1)), (f < l && W < l || document.documentElement.clientWidth < i.offsetWidth) && (h = document.documentElement.clientWidth / 2 - i.offsetWidth / 2);
28
+ const b = u - n < i.scrollHeight && d - n > (r ? i.clientHeight : i.scrollHeight) || d > u && u - n < i.clientHeight && !r;
29
+ !s?.forceBelow && (s?.forceAbove || b) && (m = d < i.scrollHeight ? m - e.height - d - n : H - i.clientHeight - n, O = `${d - n}px`, a.vertical = "above");
30
+ const v = c.getBoundingClientRect();
31
+ return v.left < 0 && (h -= v.left), v.top < 0 && (m -= v.top), {
30
32
  top: m,
31
- left: s,
33
+ left: h,
32
34
  maxHeight: O,
33
35
  alignment: a
34
36
  };
35
37
  }
36
- function b(t, o, c, h) {
37
- const n = h?.verticalOffset || 0, g = h?.horizontalOffset || 0, r = o.getBoundingClientRect(), e = R(t), i = o.parentElement.shadowRoot.querySelector(h?.contentSelector ?? `.${t.className}`).getBoundingClientRect(), f = c.getBoundingClientRect(), H = document.documentElement.clientWidth - i.right, W = document.documentElement.clientHeight - (r.top - n), d = document.documentElement.clientHeight, u = `${d - 32}px`, s = { horizontal: "end", vertical: "above" }, m = e.offsetWidth + g;
38
+ function y(t, o, c, s) {
39
+ const n = s?.verticalOffset || 0, g = s?.horizontalOffset || 0, r = o.getBoundingClientRect(), e = R(t), i = o.parentElement.shadowRoot.querySelector(s?.contentSelector ?? `.${t.className}`).getBoundingClientRect(), f = c.getBoundingClientRect(), H = document.documentElement.clientWidth - i.right, W = document.documentElement.clientHeight - (r.top - n), d = document.documentElement.clientHeight, u = `${d - 32}px`, h = { horizontal: "end", vertical: "above" }, m = e.offsetWidth + g;
38
40
  let l = i.right, a = r.top + n;
39
- return H < m && r.left > m && (l = l - i.width - e.offsetWidth, s.horizontal = "start"), g && s.horizontal !== "center" && (l += g * (s.horizontal === "start" ? -1 : 1)), W < e.scrollHeight && (a = d - e.clientHeight - 16), f.left < 0 && (l -= f.left), f.top < 0 && (a -= f.top), {
41
+ return H < m && r.left > m && (l = l - i.width - e.offsetWidth, h.horizontal = "start"), g && h.horizontal !== "center" && (l += g * (h.horizontal === "start" ? -1 : 1)), W < e.scrollHeight && (a = d - e.clientHeight - 16), f.left < 0 && (l -= f.left), f.top < 0 && (a -= f.top), {
40
42
  top: a,
41
43
  left: l,
42
44
  maxHeight: u,
43
- alignment: s
45
+ alignment: h
44
46
  };
45
47
  }
46
48
  export {
47
- y as getElementPosition,
48
- b as getElementPositionHorizontal,
49
+ w as getElementPosition,
50
+ y as getElementPositionHorizontal,
49
51
  R as getElementRectangle,
50
52
  x as isEventOnElement
51
53
  };
@@ -14,3 +14,7 @@
14
14
  .sbb-grid-expanded {
15
15
  @include layout.grid-base;
16
16
  }
17
+
18
+ .sbb-grid-only {
19
+ @include layout.grid-base;
20
+ }
@@ -12,6 +12,9 @@
12
12
  color: var(--sbb-color-1-negative);
13
13
  min-width: var(--sbb-spacing-fixed-4x);
14
14
  max-height: var(--sbb-spacing-fixed-4x);
15
+
16
+ // Transparent outline is visible in forced colors mode to ensure readability
17
+ outline: var(--sbb-border-width-1x) solid transparent;
15
18
  }
16
19
 
17
20
  @mixin badge-attribute {
@@ -1,7 +1,7 @@
1
1
  @use '../core/mediaqueries';
2
2
 
3
3
  @mixin page-spacing {
4
- padding-inline: var(--sbb-layout-base-offset-responsive);
4
+ padding-inline: var(--sbb-page-spacing-padding, var(--sbb-layout-base-offset-responsive));
5
5
  margin-inline: auto;
6
6
 
7
7
  // If using page-spacing in flex context,
@@ -10,14 +10,15 @@
10
10
 
11
11
  @include mediaqueries.mq($from: ultra) {
12
12
  // Subtract padding to get real max-width
13
- max-width: calc(
14
- var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive)
13
+ max-width: var(
14
+ --sbb-spacing-max-width,
15
+ calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))
15
16
  );
16
17
  }
17
18
  }
18
19
 
19
20
  @mixin page-spacing-expanded {
20
- padding-inline: var(--sbb-spacing-responsive-xxs);
21
+ padding-inline: var(--sbb-page-spacing-padding, var(--sbb-spacing-responsive-xxs));
21
22
  }
22
23
 
23
24
  @mixin grid-base {
@@ -6,17 +6,10 @@
6
6
  @mixin link-common-variables {
7
7
  --sbb-link-color-hover: light-dark(var(--sbb-color-primary125), var(--sbb-color-graphite));
8
8
  --sbb-link-color-active: light-dark(var(--sbb-color-primary150), var(--sbb-color-metal));
9
- --sbb-link-text-decoration-color: light-dark(
10
- color-mix(in srgb, currentcolor 80%, white),
11
- color-mix(in srgb, currentcolor 80%, black)
12
- );
13
- --sbb-link-text-decoration-color-hover: currentcolor;
14
9
  }
15
10
 
16
11
  @mixin link-common-variables--negative {
17
12
  --sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
18
- --sbb-link-text-decoration-color: color-mix(in srgb, currentcolor 80%, black);
19
- --sbb-link-text-decoration-color-hover: currentcolor;
20
13
  }
21
14
 
22
15
  @mixin block-link-variables {
@@ -39,14 +32,12 @@
39
32
  @mixin block-link-variables--active {
40
33
  --sbb-link-color-normal: light-dark(var(--sbb-color-black), var(--sbb-color-cement));
41
34
  --sbb-link-text-decoration-line: underline;
42
- --sbb-link-text-decoration-color: currentcolor;
43
35
  }
44
36
 
45
37
  // To display a current active page, e.g. if the CSS class sbb-active is set
46
38
  @mixin block-link-variables--active-negative {
47
39
  --sbb-link-color-normal: var(--sbb-color-cement);
48
40
  --sbb-link-text-decoration-line: underline;
49
- --sbb-link-text-decoration-color: currentcolor;
50
41
  }
51
42
 
52
43
  @mixin link-variables {
@@ -73,7 +64,6 @@
73
64
  @mixin link-base {
74
65
  color: var(--sbb-link-color-normal);
75
66
  text-decoration-line: var(--sbb-link-text-decoration-line, underline);
76
- text-decoration-color: var(--sbb-link-text-decoration-color);
77
67
  text-decoration-thickness: #{functions.px-to-rem-build(1)};
78
68
  text-underline-offset: 0.3125em; // 5px
79
69
  user-select: none;
@@ -95,7 +85,6 @@
95
85
  @include mediaqueries.hover-mq($hover: true) {
96
86
  color: var(--sbb-link-color-hover);
97
87
  text-decoration-line: var(--sbb-link-hover-text-decoration, underline);
98
- text-decoration-color: var(--sbb-link-text-decoration-color-hover);
99
88
  }
100
89
  }
101
90