@openeuropa/bcl-theme-default 0.11.0 → 0.15.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.
- package/css/oe-bcl-default.css +1453 -17
- package/css/oe-bcl-default.css.map +1 -1
- package/css/oe-bcl-default.min.css +1 -1
- package/css/oe-bcl-default.min.css.map +1 -1
- package/js/oe-bcl-default.bundle.js +53 -21
- package/js/oe-bcl-default.bundle.js.map +1 -1
- package/js/oe-bcl-default.bundle.min.js +1 -1
- package/js/oe-bcl-default.bundle.min.js.map +1 -1
- package/js/oe-bcl-default.esm.min.js.map +1 -1
- package/js/oe-bcl-default.umd.js +61 -24
- package/js/oe-bcl-default.umd.js.map +1 -1
- package/js/oe-bcl-default.umd.min.js +1 -1
- package/js/oe-bcl-default.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/src/scss/_badge.scss +2 -1
- package/src/scss/_banners.scss +9 -7
- package/src/scss/_collapse.scss +8 -0
- package/src/scss/_header.scss +1 -0
- package/src/scss/_inpage-navigation.scss +19 -0
- package/src/scss/_tabs.scss +3 -0
- package/src/scss/_timeline.scss +78 -0
- package/src/scss/_utilities.scss +78 -0
- package/src/scss/_variables.scss +16 -9
- package/src/scss/oe-bcl-default.scss +4 -14
- package/templates/bcl-banner/banner.html.twig +64 -0
- package/templates/bcl-base-templates/content-type.html.twig +91 -0
- package/templates/bcl-base-templates/listing-page.html.twig +60 -0
- package/templates/{bcl-search/search-offcanvas.html.twig → bcl-base-templates/sidebar-search.html.twig} +0 -1
- package/templates/bcl-card/card.html.twig +42 -33
- package/templates/bcl-content-banner/content-banner.html.twig +103 -0
- package/templates/bcl-date-block/date-block.html.twig +42 -0
- package/templates/bcl-description-list/description-list.html.twig +110 -0
- package/templates/bcl-event/event.html.twig +41 -0
- package/templates/bcl-fact-figures/fact-figures.html.twig +115 -0
- package/templates/bcl-featured-media/featured-media.html.twig +49 -5
- package/templates/bcl-file/file.html.twig +205 -0
- package/templates/bcl-footer/footer.html.twig +1 -1
- package/templates/bcl-group/group-landing.html.twig +101 -0
- package/templates/bcl-group/group.html.twig +25 -0
- package/templates/bcl-header/header.html.twig +3 -3
- package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +42 -0
- package/templates/bcl-landing-page/landing-page.html.twig +59 -0
- package/templates/bcl-link/link.html.twig +5 -0
- package/templates/bcl-links-block/links-block.html.twig +4 -1
- package/templates/bcl-listing/listing.html.twig +56 -35
- package/templates/bcl-page/page.html.twig +64 -0
- package/templates/bcl-recent-activities/recent-activities.html.twig +57 -0
- package/templates/bcl-timeline/timeline.html.twig +109 -0
- package/templates/bcl-toast/toasts.html.twig +3 -1
- package/templates/bcl-user/user-edit.html.twig +38 -0
- package/templates/{bcl-user-view → bcl-user}/user-view-compact.html.twig +2 -2
- package/templates/bcl-user/user-view.html.twig +96 -0
- package/templates/bcl-search/search.html.twig +0 -52
- package/templates/bcl-user-edit/edit-contents.html.twig +0 -32
- package/templates/bcl-user-edit/user-edit.html.twig +0 -18
- package/templates/bcl-user-listing/user-listing-offcanvas.html.twig +0 -8
- package/templates/bcl-user-listing/user-listing.html.twig +0 -47
- package/templates/bcl-user-view/user-view.html.twig +0 -105
|
@@ -2077,17 +2077,39 @@
|
|
|
2077
2077
|
return placement.split('-')[0];
|
|
2078
2078
|
}
|
|
2079
2079
|
|
|
2080
|
-
|
|
2080
|
+
// import { isHTMLElement } from './instanceOf';
|
|
2081
|
+
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
|
|
2082
|
+
includeScale) {
|
|
2083
|
+
|
|
2081
2084
|
var rect = element.getBoundingClientRect();
|
|
2085
|
+
var scaleX = 1;
|
|
2086
|
+
var scaleY = 1; // FIXME:
|
|
2087
|
+
// `offsetWidth` returns an integer while `getBoundingClientRect`
|
|
2088
|
+
// returns a float. This results in `scaleX` or `scaleY` being
|
|
2089
|
+
// non-1 when it should be for elements that aren't a full pixel in
|
|
2090
|
+
// width or height.
|
|
2091
|
+
// if (isHTMLElement(element) && includeScale) {
|
|
2092
|
+
// const offsetHeight = element.offsetHeight;
|
|
2093
|
+
// const offsetWidth = element.offsetWidth;
|
|
2094
|
+
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
2095
|
+
// // Fallback to 1 in case both values are `0`
|
|
2096
|
+
// if (offsetWidth > 0) {
|
|
2097
|
+
// scaleX = rect.width / offsetWidth || 1;
|
|
2098
|
+
// }
|
|
2099
|
+
// if (offsetHeight > 0) {
|
|
2100
|
+
// scaleY = rect.height / offsetHeight || 1;
|
|
2101
|
+
// }
|
|
2102
|
+
// }
|
|
2103
|
+
|
|
2082
2104
|
return {
|
|
2083
|
-
width: rect.width,
|
|
2084
|
-
height: rect.height,
|
|
2085
|
-
top: rect.top,
|
|
2086
|
-
right: rect.right,
|
|
2087
|
-
bottom: rect.bottom,
|
|
2088
|
-
left: rect.left,
|
|
2089
|
-
x: rect.left,
|
|
2090
|
-
y: rect.top
|
|
2105
|
+
width: rect.width / scaleX,
|
|
2106
|
+
height: rect.height / scaleY,
|
|
2107
|
+
top: rect.top / scaleY,
|
|
2108
|
+
right: rect.right / scaleX,
|
|
2109
|
+
bottom: rect.bottom / scaleY,
|
|
2110
|
+
left: rect.left / scaleX,
|
|
2111
|
+
x: rect.left / scaleX,
|
|
2112
|
+
y: rect.top / scaleY
|
|
2091
2113
|
};
|
|
2092
2114
|
}
|
|
2093
2115
|
|
|
@@ -2342,6 +2364,10 @@
|
|
|
2342
2364
|
requiresIfExists: ['preventOverflow']
|
|
2343
2365
|
};
|
|
2344
2366
|
|
|
2367
|
+
function getVariation(placement) {
|
|
2368
|
+
return placement.split('-')[1];
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2345
2371
|
var unsetSides = {
|
|
2346
2372
|
top: 'auto',
|
|
2347
2373
|
right: 'auto',
|
|
@@ -2368,6 +2394,7 @@
|
|
|
2368
2394
|
var popper = _ref2.popper,
|
|
2369
2395
|
popperRect = _ref2.popperRect,
|
|
2370
2396
|
placement = _ref2.placement,
|
|
2397
|
+
variation = _ref2.variation,
|
|
2371
2398
|
offsets = _ref2.offsets,
|
|
2372
2399
|
position = _ref2.position,
|
|
2373
2400
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
@@ -2394,7 +2421,7 @@
|
|
|
2394
2421
|
if (offsetParent === getWindow(popper)) {
|
|
2395
2422
|
offsetParent = getDocumentElement(popper);
|
|
2396
2423
|
|
|
2397
|
-
if (getComputedStyle$1(offsetParent).position !== 'static') {
|
|
2424
|
+
if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {
|
|
2398
2425
|
heightProp = 'scrollHeight';
|
|
2399
2426
|
widthProp = 'scrollWidth';
|
|
2400
2427
|
}
|
|
@@ -2403,14 +2430,14 @@
|
|
|
2403
2430
|
|
|
2404
2431
|
offsetParent = offsetParent;
|
|
2405
2432
|
|
|
2406
|
-
if (placement === top) {
|
|
2433
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
2407
2434
|
sideY = bottom; // $FlowFixMe[prop-missing]
|
|
2408
2435
|
|
|
2409
2436
|
y -= offsetParent[heightProp] - popperRect.height;
|
|
2410
2437
|
y *= gpuAcceleration ? 1 : -1;
|
|
2411
2438
|
}
|
|
2412
2439
|
|
|
2413
|
-
if (placement === left) {
|
|
2440
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
2414
2441
|
sideX = right; // $FlowFixMe[prop-missing]
|
|
2415
2442
|
|
|
2416
2443
|
x -= offsetParent[widthProp] - popperRect.width;
|
|
@@ -2425,7 +2452,7 @@
|
|
|
2425
2452
|
if (gpuAcceleration) {
|
|
2426
2453
|
var _Object$assign;
|
|
2427
2454
|
|
|
2428
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1)
|
|
2455
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
|
2429
2456
|
}
|
|
2430
2457
|
|
|
2431
2458
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
@@ -2443,6 +2470,7 @@
|
|
|
2443
2470
|
|
|
2444
2471
|
var commonStyles = {
|
|
2445
2472
|
placement: getBasePlacement(state.placement),
|
|
2473
|
+
variation: getVariation(state.placement),
|
|
2446
2474
|
popper: state.elements.popper,
|
|
2447
2475
|
popperRect: state.rects.popper,
|
|
2448
2476
|
gpuAcceleration: gpuAcceleration
|
|
@@ -2745,10 +2773,6 @@
|
|
|
2745
2773
|
return clippingRect;
|
|
2746
2774
|
}
|
|
2747
2775
|
|
|
2748
|
-
function getVariation(placement) {
|
|
2749
|
-
return placement.split('-')[1];
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2752
2776
|
function computeOffsets(_ref) {
|
|
2753
2777
|
var reference = _ref.reference,
|
|
2754
2778
|
element = _ref.element,
|
|
@@ -2834,11 +2858,10 @@
|
|
|
2834
2858
|
padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
2835
2859
|
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
2836
2860
|
var altContext = elementContext === popper ? reference : popper;
|
|
2837
|
-
var referenceElement = state.elements.reference;
|
|
2838
2861
|
var popperRect = state.rects.popper;
|
|
2839
2862
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
2840
2863
|
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
2841
|
-
var referenceClientRect = getBoundingClientRect(
|
|
2864
|
+
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
2842
2865
|
var popperOffsets = computeOffsets({
|
|
2843
2866
|
reference: referenceClientRect,
|
|
2844
2867
|
element: popperRect,
|
|
@@ -3315,16 +3338,24 @@
|
|
|
3315
3338
|
}
|
|
3316
3339
|
}
|
|
3317
3340
|
|
|
3341
|
+
function isElementScaled(element) {
|
|
3342
|
+
var rect = element.getBoundingClientRect();
|
|
3343
|
+
var scaleX = rect.width / element.offsetWidth || 1;
|
|
3344
|
+
var scaleY = rect.height / element.offsetHeight || 1;
|
|
3345
|
+
return scaleX !== 1 || scaleY !== 1;
|
|
3346
|
+
} // Returns the composite rect of an element relative to its offsetParent.
|
|
3318
3347
|
// Composite means it takes into account transforms as well as layout.
|
|
3319
3348
|
|
|
3349
|
+
|
|
3320
3350
|
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
3321
3351
|
if (isFixed === void 0) {
|
|
3322
3352
|
isFixed = false;
|
|
3323
3353
|
}
|
|
3324
3354
|
|
|
3355
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
3356
|
+
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
3325
3357
|
var documentElement = getDocumentElement(offsetParent);
|
|
3326
3358
|
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
3327
|
-
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
3328
3359
|
var scroll = {
|
|
3329
3360
|
scrollLeft: 0,
|
|
3330
3361
|
scrollTop: 0
|
|
@@ -3478,7 +3509,8 @@
|
|
|
3478
3509
|
var isDestroyed = false;
|
|
3479
3510
|
var instance = {
|
|
3480
3511
|
state: state,
|
|
3481
|
-
setOptions: function setOptions(
|
|
3512
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
3513
|
+
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
3482
3514
|
cleanupModifierEffects();
|
|
3483
3515
|
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
3484
3516
|
state.scrollParents = {
|