@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
package/js/oe-bcl-default.umd.js
CHANGED
|
@@ -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
|
|
|
@@ -2351,6 +2373,10 @@
|
|
|
2351
2373
|
requiresIfExists: ['preventOverflow']
|
|
2352
2374
|
};
|
|
2353
2375
|
|
|
2376
|
+
function getVariation(placement) {
|
|
2377
|
+
return placement.split('-')[1];
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2354
2380
|
var unsetSides = {
|
|
2355
2381
|
top: 'auto',
|
|
2356
2382
|
right: 'auto',
|
|
@@ -2377,6 +2403,7 @@
|
|
|
2377
2403
|
var popper = _ref2.popper,
|
|
2378
2404
|
popperRect = _ref2.popperRect,
|
|
2379
2405
|
placement = _ref2.placement,
|
|
2406
|
+
variation = _ref2.variation,
|
|
2380
2407
|
offsets = _ref2.offsets,
|
|
2381
2408
|
position = _ref2.position,
|
|
2382
2409
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
@@ -2403,7 +2430,7 @@
|
|
|
2403
2430
|
if (offsetParent === getWindow(popper)) {
|
|
2404
2431
|
offsetParent = getDocumentElement(popper);
|
|
2405
2432
|
|
|
2406
|
-
if (getComputedStyle$1(offsetParent).position !== 'static') {
|
|
2433
|
+
if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {
|
|
2407
2434
|
heightProp = 'scrollHeight';
|
|
2408
2435
|
widthProp = 'scrollWidth';
|
|
2409
2436
|
}
|
|
@@ -2412,14 +2439,14 @@
|
|
|
2412
2439
|
|
|
2413
2440
|
offsetParent = offsetParent;
|
|
2414
2441
|
|
|
2415
|
-
if (placement === top) {
|
|
2442
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
2416
2443
|
sideY = bottom; // $FlowFixMe[prop-missing]
|
|
2417
2444
|
|
|
2418
2445
|
y -= offsetParent[heightProp] - popperRect.height;
|
|
2419
2446
|
y *= gpuAcceleration ? 1 : -1;
|
|
2420
2447
|
}
|
|
2421
2448
|
|
|
2422
|
-
if (placement === left) {
|
|
2449
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
2423
2450
|
sideX = right; // $FlowFixMe[prop-missing]
|
|
2424
2451
|
|
|
2425
2452
|
x -= offsetParent[widthProp] - popperRect.width;
|
|
@@ -2434,7 +2461,7 @@
|
|
|
2434
2461
|
if (gpuAcceleration) {
|
|
2435
2462
|
var _Object$assign;
|
|
2436
2463
|
|
|
2437
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1)
|
|
2464
|
+
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));
|
|
2438
2465
|
}
|
|
2439
2466
|
|
|
2440
2467
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
@@ -2462,6 +2489,7 @@
|
|
|
2462
2489
|
|
|
2463
2490
|
var commonStyles = {
|
|
2464
2491
|
placement: getBasePlacement(state.placement),
|
|
2492
|
+
variation: getVariation(state.placement),
|
|
2465
2493
|
popper: state.elements.popper,
|
|
2466
2494
|
popperRect: state.rects.popper,
|
|
2467
2495
|
gpuAcceleration: gpuAcceleration
|
|
@@ -2764,10 +2792,6 @@
|
|
|
2764
2792
|
return clippingRect;
|
|
2765
2793
|
}
|
|
2766
2794
|
|
|
2767
|
-
function getVariation(placement) {
|
|
2768
|
-
return placement.split('-')[1];
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
2795
|
function computeOffsets(_ref) {
|
|
2772
2796
|
var reference = _ref.reference,
|
|
2773
2797
|
element = _ref.element,
|
|
@@ -2853,11 +2877,10 @@
|
|
|
2853
2877
|
padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
2854
2878
|
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
2855
2879
|
var altContext = elementContext === popper ? reference : popper;
|
|
2856
|
-
var referenceElement = state.elements.reference;
|
|
2857
2880
|
var popperRect = state.rects.popper;
|
|
2858
2881
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
2859
2882
|
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
2860
|
-
var referenceClientRect = getBoundingClientRect(
|
|
2883
|
+
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
2861
2884
|
var popperOffsets = computeOffsets({
|
|
2862
2885
|
reference: referenceClientRect,
|
|
2863
2886
|
element: popperRect,
|
|
@@ -3338,16 +3361,24 @@
|
|
|
3338
3361
|
}
|
|
3339
3362
|
}
|
|
3340
3363
|
|
|
3364
|
+
function isElementScaled(element) {
|
|
3365
|
+
var rect = element.getBoundingClientRect();
|
|
3366
|
+
var scaleX = rect.width / element.offsetWidth || 1;
|
|
3367
|
+
var scaleY = rect.height / element.offsetHeight || 1;
|
|
3368
|
+
return scaleX !== 1 || scaleY !== 1;
|
|
3369
|
+
} // Returns the composite rect of an element relative to its offsetParent.
|
|
3341
3370
|
// Composite means it takes into account transforms as well as layout.
|
|
3342
3371
|
|
|
3372
|
+
|
|
3343
3373
|
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
3344
3374
|
if (isFixed === void 0) {
|
|
3345
3375
|
isFixed = false;
|
|
3346
3376
|
}
|
|
3347
3377
|
|
|
3378
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
3379
|
+
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
3348
3380
|
var documentElement = getDocumentElement(offsetParent);
|
|
3349
3381
|
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
3350
|
-
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
3351
3382
|
var scroll = {
|
|
3352
3383
|
scrollLeft: 0,
|
|
3353
3384
|
scrollTop: 0
|
|
@@ -3454,7 +3485,10 @@
|
|
|
3454
3485
|
var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
|
|
3455
3486
|
function validateModifiers(modifiers) {
|
|
3456
3487
|
modifiers.forEach(function (modifier) {
|
|
3457
|
-
Object.keys(modifier)
|
|
3488
|
+
[].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
|
|
3489
|
+
.filter(function (value, index, self) {
|
|
3490
|
+
return self.indexOf(value) === index;
|
|
3491
|
+
}).forEach(function (key) {
|
|
3458
3492
|
switch (key) {
|
|
3459
3493
|
case 'name':
|
|
3460
3494
|
if (typeof modifier.name !== 'string') {
|
|
@@ -3468,6 +3502,8 @@
|
|
|
3468
3502
|
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
|
|
3469
3503
|
}
|
|
3470
3504
|
|
|
3505
|
+
break;
|
|
3506
|
+
|
|
3471
3507
|
case 'phase':
|
|
3472
3508
|
if (modifierPhases.indexOf(modifier.phase) < 0) {
|
|
3473
3509
|
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
|
|
@@ -3483,14 +3519,14 @@
|
|
|
3483
3519
|
break;
|
|
3484
3520
|
|
|
3485
3521
|
case 'effect':
|
|
3486
|
-
if (typeof modifier.effect !== 'function') {
|
|
3522
|
+
if (modifier.effect != null && typeof modifier.effect !== 'function') {
|
|
3487
3523
|
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
|
|
3488
3524
|
}
|
|
3489
3525
|
|
|
3490
3526
|
break;
|
|
3491
3527
|
|
|
3492
3528
|
case 'requires':
|
|
3493
|
-
if (!Array.isArray(modifier.requires)) {
|
|
3529
|
+
if (modifier.requires != null && !Array.isArray(modifier.requires)) {
|
|
3494
3530
|
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
|
|
3495
3531
|
}
|
|
3496
3532
|
|
|
@@ -3600,7 +3636,8 @@
|
|
|
3600
3636
|
var isDestroyed = false;
|
|
3601
3637
|
var instance = {
|
|
3602
3638
|
state: state,
|
|
3603
|
-
setOptions: function setOptions(
|
|
3639
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
3640
|
+
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
3604
3641
|
cleanupModifierEffects();
|
|
3605
3642
|
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
3606
3643
|
state.scrollParents = {
|