@openeuropa/bcl-theme-joinup 0.26.0 → 0.27.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 (65) hide show
  1. package/icons/bcl-default-icons.svg +1 -1
  2. package/js/oe-bcl-joinup.bundle.js +60 -49
  3. package/js/oe-bcl-joinup.bundle.js.map +1 -1
  4. package/js/oe-bcl-joinup.bundle.min.js +1 -1
  5. package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
  6. package/js/oe-bcl-joinup.umd.js +60 -49
  7. package/js/oe-bcl-joinup.umd.js.map +1 -1
  8. package/js/oe-bcl-joinup.umd.min.js +1 -1
  9. package/js/oe-bcl-joinup.umd.min.js.map +1 -1
  10. package/package.json +7 -7
  11. package/templates/bcl-accordion/accordion.html.twig +2 -2
  12. package/templates/bcl-alert/alert.html.twig +2 -2
  13. package/templates/bcl-badge/badge.html.twig +2 -2
  14. package/templates/bcl-banner/banner.html.twig +2 -2
  15. package/templates/bcl-base-templates/content-type.html.twig +2 -2
  16. package/templates/bcl-blockquote/blockquote.html.twig +2 -2
  17. package/templates/bcl-breadcrumb/breadcrumb.html.twig +2 -2
  18. package/templates/bcl-button/button.html.twig +2 -2
  19. package/templates/bcl-button-group/button-group.html.twig +2 -2
  20. package/templates/bcl-card/card.html.twig +2 -2
  21. package/templates/bcl-card-layout/card-layout.html.twig +2 -2
  22. package/templates/bcl-carousel/carousel.html.twig +2 -2
  23. package/templates/bcl-content-banner/content-banner.html.twig +2 -2
  24. package/templates/bcl-date-block/date-block.html.twig +2 -2
  25. package/templates/bcl-description-list/description-list.html.twig +87 -85
  26. package/templates/bcl-dropdown/dropdown.html.twig +2 -2
  27. package/templates/bcl-fact-figures/fact-figures.html.twig +2 -2
  28. package/templates/bcl-featured-media/featured-media.html.twig +2 -2
  29. package/templates/bcl-file/file.html.twig +2 -2
  30. package/templates/bcl-footer/footer.html.twig +2 -2
  31. package/templates/bcl-form/form.html.twig +2 -2
  32. package/templates/bcl-form-input/form-input.html.twig +2 -2
  33. package/templates/bcl-gallery/gallery.html.twig +2 -2
  34. package/templates/bcl-header/header.html.twig +2 -2
  35. package/templates/bcl-heading/heading.html.twig +2 -2
  36. package/templates/bcl-icon/icon.html.twig +2 -2
  37. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +2 -2
  38. package/templates/bcl-language-list/language-list-grid.html.twig +2 -2
  39. package/templates/bcl-language-list/language-list.html.twig +2 -2
  40. package/templates/bcl-language-switcher/language-switcher.html.twig +2 -2
  41. package/templates/bcl-link/link.html.twig +2 -2
  42. package/templates/bcl-links-block/links-block.html.twig +2 -2
  43. package/templates/bcl-list-group/list-group.html.twig +2 -2
  44. package/templates/bcl-listing/listing.html.twig +2 -2
  45. package/templates/bcl-modal/modal.html.twig +2 -2
  46. package/templates/bcl-navbar/navbar.html.twig +2 -2
  47. package/templates/bcl-navigation/navigation.html.twig +4 -4
  48. package/templates/bcl-offcanvas/offcanvas.html.twig +2 -2
  49. package/templates/bcl-pagination/pagination.html.twig +2 -2
  50. package/templates/bcl-placeholder/placeholder.html.twig +2 -2
  51. package/templates/bcl-progress/progress.html.twig +2 -2
  52. package/templates/bcl-project/project-lists.html.twig +2 -2
  53. package/templates/bcl-project-status/project-contributions.html.twig +2 -2
  54. package/templates/bcl-project-status/project-status.html.twig +2 -2
  55. package/templates/bcl-recent-activities/recent-activities.html.twig +2 -2
  56. package/templates/bcl-search-form/search-form.html.twig +2 -2
  57. package/templates/bcl-section/section.html.twig +41 -0
  58. package/templates/bcl-select/select.html.twig +2 -2
  59. package/templates/bcl-spinner/spinner.html.twig +2 -2
  60. package/templates/bcl-subscription-block/subscription-block.html.twig +2 -2
  61. package/templates/bcl-table/table.html.twig +2 -2
  62. package/templates/bcl-textarea/textarea.html.twig +2 -2
  63. package/templates/bcl-timeline/timeline.html.twig +2 -2
  64. package/templates/bcl-toast/toasts.html.twig +2 -2
  65. package/templates/bcl-user/user-compact.html.twig +22 -14
@@ -2123,38 +2123,57 @@
2123
2123
  var min = Math.min;
2124
2124
  var round = Math.round;
2125
2125
 
2126
- function getBoundingClientRect(element, includeScale) {
2126
+ function getUAString() {
2127
+ var uaData = navigator.userAgentData;
2128
+
2129
+ if (uaData != null && uaData.brands) {
2130
+ return uaData.brands.map(function (item) {
2131
+ return item.brand + "/" + item.version;
2132
+ }).join(' ');
2133
+ }
2134
+
2135
+ return navigator.userAgent;
2136
+ }
2137
+
2138
+ function isLayoutViewport() {
2139
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
2140
+ }
2141
+
2142
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
2127
2143
  if (includeScale === void 0) {
2128
2144
  includeScale = false;
2129
2145
  }
2130
2146
 
2131
- var rect = element.getBoundingClientRect();
2147
+ if (isFixedStrategy === void 0) {
2148
+ isFixedStrategy = false;
2149
+ }
2150
+
2151
+ var clientRect = element.getBoundingClientRect();
2132
2152
  var scaleX = 1;
2133
2153
  var scaleY = 1;
2134
2154
 
2135
- if (isHTMLElement(element) && includeScale) {
2136
- var offsetHeight = element.offsetHeight;
2137
- var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
2138
- // Fallback to 1 in case both values are `0`
2139
-
2140
- if (offsetWidth > 0) {
2141
- scaleX = round(rect.width) / offsetWidth || 1;
2142
- }
2143
-
2144
- if (offsetHeight > 0) {
2145
- scaleY = round(rect.height) / offsetHeight || 1;
2146
- }
2155
+ if (includeScale && isHTMLElement(element)) {
2156
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
2157
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
2147
2158
  }
2148
2159
 
2160
+ var _ref = isElement(element) ? getWindow(element) : window,
2161
+ visualViewport = _ref.visualViewport;
2162
+
2163
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
2164
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
2165
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
2166
+ var width = clientRect.width / scaleX;
2167
+ var height = clientRect.height / scaleY;
2149
2168
  return {
2150
- width: rect.width / scaleX,
2151
- height: rect.height / scaleY,
2152
- top: rect.top / scaleY,
2153
- right: rect.right / scaleX,
2154
- bottom: rect.bottom / scaleY,
2155
- left: rect.left / scaleX,
2156
- x: rect.left / scaleX,
2157
- y: rect.top / scaleY
2169
+ width: width,
2170
+ height: height,
2171
+ top: y,
2172
+ right: x + width,
2173
+ bottom: y + height,
2174
+ left: x,
2175
+ x: x,
2176
+ y: y
2158
2177
  };
2159
2178
  }
2160
2179
 
@@ -2249,8 +2268,8 @@
2249
2268
 
2250
2269
 
2251
2270
  function getContainingBlock(element) {
2252
- var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
2253
- var isIE = navigator.userAgent.indexOf('Trident') !== -1;
2271
+ var isFirefox = /firefox/i.test(getUAString());
2272
+ var isIE = /Trident/i.test(getUAString());
2254
2273
 
2255
2274
  if (isIE && isHTMLElement(element)) {
2256
2275
  // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
@@ -2690,31 +2709,21 @@
2690
2709
  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
2691
2710
  }
2692
2711
 
2693
- function getViewportRect(element) {
2712
+ function getViewportRect(element, strategy) {
2694
2713
  var win = getWindow(element);
2695
2714
  var html = getDocumentElement(element);
2696
2715
  var visualViewport = win.visualViewport;
2697
2716
  var width = html.clientWidth;
2698
2717
  var height = html.clientHeight;
2699
2718
  var x = 0;
2700
- var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
2701
- // can be obscured underneath it.
2702
- // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
2703
- // if it isn't open, so if this isn't available, the popper will be detected
2704
- // to overflow the bottom of the screen too early.
2719
+ var y = 0;
2705
2720
 
2706
2721
  if (visualViewport) {
2707
2722
  width = visualViewport.width;
2708
- height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
2709
- // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
2710
- // errors due to floating point numbers, so we need to check precision.
2711
- // Safari returns a number <= 0, usually < -1 when pinch-zoomed
2712
- // Feature detection fails in mobile emulation mode in Chrome.
2713
- // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
2714
- // 0.001
2715
- // Fallback here: "Not Safari" userAgent
2716
-
2717
- if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
2723
+ height = visualViewport.height;
2724
+ var layoutViewport = isLayoutViewport();
2725
+
2726
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
2718
2727
  x = visualViewport.offsetLeft;
2719
2728
  y = visualViewport.offsetTop;
2720
2729
  }
@@ -2808,8 +2817,8 @@
2808
2817
  });
2809
2818
  }
2810
2819
 
2811
- function getInnerBoundingClientRect(element) {
2812
- var rect = getBoundingClientRect(element);
2820
+ function getInnerBoundingClientRect(element, strategy) {
2821
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
2813
2822
  rect.top = rect.top + element.clientTop;
2814
2823
  rect.left = rect.left + element.clientLeft;
2815
2824
  rect.bottom = rect.top + element.clientHeight;
@@ -2821,8 +2830,8 @@
2821
2830
  return rect;
2822
2831
  }
2823
2832
 
2824
- function getClientRectFromMixedType(element, clippingParent) {
2825
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2833
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
2834
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2826
2835
  } // A "clipping parent" is an overflowable container with the characteristic of
2827
2836
  // clipping (or hiding) overflowing elements with a position different from
2828
2837
  // `initial`
@@ -2845,18 +2854,18 @@
2845
2854
  // clipping parents
2846
2855
 
2847
2856
 
2848
- function getClippingRect(element, boundary, rootBoundary) {
2857
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
2849
2858
  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
2850
2859
  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
2851
2860
  var firstClippingParent = clippingParents[0];
2852
2861
  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
2853
- var rect = getClientRectFromMixedType(element, clippingParent);
2862
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
2854
2863
  accRect.top = max(rect.top, accRect.top);
2855
2864
  accRect.right = min(rect.right, accRect.right);
2856
2865
  accRect.bottom = min(rect.bottom, accRect.bottom);
2857
2866
  accRect.left = max(rect.left, accRect.left);
2858
2867
  return accRect;
2859
- }, getClientRectFromMixedType(element, firstClippingParent));
2868
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
2860
2869
  clippingRect.width = clippingRect.right - clippingRect.left;
2861
2870
  clippingRect.height = clippingRect.bottom - clippingRect.top;
2862
2871
  clippingRect.x = clippingRect.left;
@@ -2937,6 +2946,8 @@
2937
2946
  var _options = options,
2938
2947
  _options$placement = _options.placement,
2939
2948
  placement = _options$placement === void 0 ? state.placement : _options$placement,
2949
+ _options$strategy = _options.strategy,
2950
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
2940
2951
  _options$boundary = _options.boundary,
2941
2952
  boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
2942
2953
  _options$rootBoundary = _options.rootBoundary,
@@ -2951,7 +2962,7 @@
2951
2962
  var altContext = elementContext === popper ? reference : popper;
2952
2963
  var popperRect = state.rects.popper;
2953
2964
  var element = state.elements[altBoundary ? altContext : elementContext];
2954
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
2965
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
2955
2966
  var referenceClientRect = getBoundingClientRect(state.elements.reference);
2956
2967
  var popperOffsets = computeOffsets({
2957
2968
  reference: referenceClientRect,
@@ -3469,7 +3480,7 @@
3469
3480
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
3470
3481
  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
3471
3482
  var documentElement = getDocumentElement(offsetParent);
3472
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
3483
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
3473
3484
  var scroll = {
3474
3485
  scrollLeft: 0,
3475
3486
  scrollTop: 0