@openeuropa/bcl-theme-default 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 (66) hide show
  1. package/icons/bcl-default-icons.svg +1 -1
  2. package/js/oe-bcl-default.bundle.js +60 -49
  3. package/js/oe-bcl-default.bundle.js.map +1 -1
  4. package/js/oe-bcl-default.bundle.min.js +1 -1
  5. package/js/oe-bcl-default.bundle.min.js.map +1 -1
  6. package/js/oe-bcl-default.umd.js +60 -49
  7. package/js/oe-bcl-default.umd.js.map +1 -1
  8. package/js/oe-bcl-default.umd.min.js +1 -1
  9. package/js/oe-bcl-default.umd.min.js.map +1 -1
  10. package/package.json +5 -5
  11. package/src/icons/icons.js +2 -0
  12. package/templates/bcl-accordion/accordion.html.twig +2 -2
  13. package/templates/bcl-alert/alert.html.twig +2 -2
  14. package/templates/bcl-badge/badge.html.twig +2 -2
  15. package/templates/bcl-banner/banner.html.twig +2 -2
  16. package/templates/bcl-base-templates/content-type.html.twig +2 -2
  17. package/templates/bcl-blockquote/blockquote.html.twig +2 -2
  18. package/templates/bcl-breadcrumb/breadcrumb.html.twig +2 -2
  19. package/templates/bcl-button/button.html.twig +2 -2
  20. package/templates/bcl-button-group/button-group.html.twig +2 -2
  21. package/templates/bcl-card/card.html.twig +2 -2
  22. package/templates/bcl-card-layout/card-layout.html.twig +2 -2
  23. package/templates/bcl-carousel/carousel.html.twig +2 -2
  24. package/templates/bcl-content-banner/content-banner.html.twig +2 -2
  25. package/templates/bcl-date-block/date-block.html.twig +2 -2
  26. package/templates/bcl-description-list/description-list.html.twig +87 -85
  27. package/templates/bcl-dropdown/dropdown.html.twig +2 -2
  28. package/templates/bcl-fact-figures/fact-figures.html.twig +2 -2
  29. package/templates/bcl-featured-media/featured-media.html.twig +2 -2
  30. package/templates/bcl-file/file.html.twig +2 -2
  31. package/templates/bcl-footer/footer.html.twig +2 -2
  32. package/templates/bcl-form/form.html.twig +2 -2
  33. package/templates/bcl-form-input/form-input.html.twig +2 -2
  34. package/templates/bcl-gallery/gallery.html.twig +2 -2
  35. package/templates/bcl-header/header.html.twig +2 -2
  36. package/templates/bcl-heading/heading.html.twig +2 -2
  37. package/templates/bcl-icon/icon.html.twig +2 -2
  38. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +2 -2
  39. package/templates/bcl-language-list/language-list-grid.html.twig +2 -2
  40. package/templates/bcl-language-list/language-list.html.twig +2 -2
  41. package/templates/bcl-language-switcher/language-switcher.html.twig +2 -2
  42. package/templates/bcl-link/link.html.twig +2 -2
  43. package/templates/bcl-links-block/links-block.html.twig +2 -2
  44. package/templates/bcl-list-group/list-group.html.twig +2 -2
  45. package/templates/bcl-listing/listing.html.twig +2 -2
  46. package/templates/bcl-modal/modal.html.twig +2 -2
  47. package/templates/bcl-navbar/navbar.html.twig +2 -2
  48. package/templates/bcl-navigation/navigation.html.twig +4 -4
  49. package/templates/bcl-offcanvas/offcanvas.html.twig +2 -2
  50. package/templates/bcl-pagination/pagination.html.twig +2 -2
  51. package/templates/bcl-placeholder/placeholder.html.twig +2 -2
  52. package/templates/bcl-progress/progress.html.twig +2 -2
  53. package/templates/bcl-project/project-lists.html.twig +2 -2
  54. package/templates/bcl-project-status/project-contributions.html.twig +2 -2
  55. package/templates/bcl-project-status/project-status.html.twig +2 -2
  56. package/templates/bcl-recent-activities/recent-activities.html.twig +2 -2
  57. package/templates/bcl-search-form/search-form.html.twig +2 -2
  58. package/templates/bcl-section/section.html.twig +41 -0
  59. package/templates/bcl-select/select.html.twig +2 -2
  60. package/templates/bcl-spinner/spinner.html.twig +2 -2
  61. package/templates/bcl-subscription-block/subscription-block.html.twig +2 -2
  62. package/templates/bcl-table/table.html.twig +2 -2
  63. package/templates/bcl-textarea/textarea.html.twig +2 -2
  64. package/templates/bcl-timeline/timeline.html.twig +2 -2
  65. package/templates/bcl-toast/toasts.html.twig +2 -2
  66. 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
@@ -2671,31 +2690,21 @@
2671
2690
  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
2672
2691
  }
2673
2692
 
2674
- function getViewportRect(element) {
2693
+ function getViewportRect(element, strategy) {
2675
2694
  var win = getWindow(element);
2676
2695
  var html = getDocumentElement(element);
2677
2696
  var visualViewport = win.visualViewport;
2678
2697
  var width = html.clientWidth;
2679
2698
  var height = html.clientHeight;
2680
2699
  var x = 0;
2681
- var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
2682
- // can be obscured underneath it.
2683
- // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
2684
- // if it isn't open, so if this isn't available, the popper will be detected
2685
- // to overflow the bottom of the screen too early.
2700
+ var y = 0;
2686
2701
 
2687
2702
  if (visualViewport) {
2688
2703
  width = visualViewport.width;
2689
- height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
2690
- // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
2691
- // errors due to floating point numbers, so we need to check precision.
2692
- // Safari returns a number <= 0, usually < -1 when pinch-zoomed
2693
- // Feature detection fails in mobile emulation mode in Chrome.
2694
- // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
2695
- // 0.001
2696
- // Fallback here: "Not Safari" userAgent
2697
-
2698
- if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
2704
+ height = visualViewport.height;
2705
+ var layoutViewport = isLayoutViewport();
2706
+
2707
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
2699
2708
  x = visualViewport.offsetLeft;
2700
2709
  y = visualViewport.offsetTop;
2701
2710
  }
@@ -2789,8 +2798,8 @@
2789
2798
  });
2790
2799
  }
2791
2800
 
2792
- function getInnerBoundingClientRect(element) {
2793
- var rect = getBoundingClientRect(element);
2801
+ function getInnerBoundingClientRect(element, strategy) {
2802
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
2794
2803
  rect.top = rect.top + element.clientTop;
2795
2804
  rect.left = rect.left + element.clientLeft;
2796
2805
  rect.bottom = rect.top + element.clientHeight;
@@ -2802,8 +2811,8 @@
2802
2811
  return rect;
2803
2812
  }
2804
2813
 
2805
- function getClientRectFromMixedType(element, clippingParent) {
2806
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2814
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
2815
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2807
2816
  } // A "clipping parent" is an overflowable container with the characteristic of
2808
2817
  // clipping (or hiding) overflowing elements with a position different from
2809
2818
  // `initial`
@@ -2826,18 +2835,18 @@
2826
2835
  // clipping parents
2827
2836
 
2828
2837
 
2829
- function getClippingRect(element, boundary, rootBoundary) {
2838
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
2830
2839
  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
2831
2840
  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
2832
2841
  var firstClippingParent = clippingParents[0];
2833
2842
  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
2834
- var rect = getClientRectFromMixedType(element, clippingParent);
2843
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
2835
2844
  accRect.top = max(rect.top, accRect.top);
2836
2845
  accRect.right = min(rect.right, accRect.right);
2837
2846
  accRect.bottom = min(rect.bottom, accRect.bottom);
2838
2847
  accRect.left = max(rect.left, accRect.left);
2839
2848
  return accRect;
2840
- }, getClientRectFromMixedType(element, firstClippingParent));
2849
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
2841
2850
  clippingRect.width = clippingRect.right - clippingRect.left;
2842
2851
  clippingRect.height = clippingRect.bottom - clippingRect.top;
2843
2852
  clippingRect.x = clippingRect.left;
@@ -2918,6 +2927,8 @@
2918
2927
  var _options = options,
2919
2928
  _options$placement = _options.placement,
2920
2929
  placement = _options$placement === void 0 ? state.placement : _options$placement,
2930
+ _options$strategy = _options.strategy,
2931
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
2921
2932
  _options$boundary = _options.boundary,
2922
2933
  boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
2923
2934
  _options$rootBoundary = _options.rootBoundary,
@@ -2932,7 +2943,7 @@
2932
2943
  var altContext = elementContext === popper ? reference : popper;
2933
2944
  var popperRect = state.rects.popper;
2934
2945
  var element = state.elements[altBoundary ? altContext : elementContext];
2935
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
2946
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
2936
2947
  var referenceClientRect = getBoundingClientRect(state.elements.reference);
2937
2948
  var popperOffsets = computeOffsets({
2938
2949
  reference: referenceClientRect,
@@ -3446,7 +3457,7 @@
3446
3457
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
3447
3458
  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
3448
3459
  var documentElement = getDocumentElement(offsetParent);
3449
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
3460
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
3450
3461
  var scroll = {
3451
3462
  scrollLeft: 0,
3452
3463
  scrollTop: 0