@royaloperahouse/chord 0.5.1 → 0.5.5
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/CHANGELOG.md +18 -0
- package/dist/chord.cjs.development.js +121 -61
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +115 -54
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/molecules/Card/Card.style.d.ts +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [0.5.5]
|
|
4
|
+
- Export ImageAspectRatioWrapper component and AspectRatio enum
|
|
5
|
+
|
|
6
|
+
## [0.5.4]
|
|
7
|
+
- Fix Card typography
|
|
8
|
+
- Fix Carousel title typography
|
|
9
|
+
- Fix Image Carousel size
|
|
10
|
+
- Fix focus style in rotator buttons (Safari)
|
|
11
|
+
- Anchor tab links hover style only for desktop
|
|
12
|
+
- Fix Anchor bar internal navigation
|
|
13
|
+
|
|
14
|
+
## [0.5.3]
|
|
15
|
+
- Handle keyboard events using key attribute
|
|
16
|
+
|
|
17
|
+
## [0.5.2]
|
|
18
|
+
- Highlights Carousel: info change swiping slide
|
|
19
|
+
- Fix RotatorButtons a11y
|
|
20
|
+
|
|
3
21
|
## [0.5.1]
|
|
4
22
|
- Highlights Carousel: fix box-sizing
|
|
5
23
|
|
|
@@ -2424,19 +2424,17 @@ var SectionSplitter = function SectionSplitter(_ref) {
|
|
|
2424
2424
|
}, /*#__PURE__*/React__default.createElement(Splitter, null)));
|
|
2425
2425
|
};
|
|
2426
2426
|
|
|
2427
|
-
var AspectRatio;
|
|
2428
|
-
|
|
2429
2427
|
(function (AspectRatio) {
|
|
2430
2428
|
AspectRatio["1:1"] = "1 / 1";
|
|
2431
2429
|
AspectRatio["3:4"] = "3 / 4";
|
|
2432
2430
|
AspectRatio["4:3"] = "4 / 3";
|
|
2433
2431
|
AspectRatio["16:9"] = "16 / 9";
|
|
2434
|
-
})(AspectRatio || (AspectRatio = {}));
|
|
2432
|
+
})(exports.AspectRatio || (exports.AspectRatio = {}));
|
|
2435
2433
|
|
|
2436
2434
|
var _templateObject$d;
|
|
2437
2435
|
var ImageAspectRatioWrapper = /*#__PURE__*/styled__default.div(_templateObject$d || (_templateObject$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n aspect-ratio: ", ";\n\n img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n"])), function (_ref) {
|
|
2438
2436
|
var _ref$aspectRatio = _ref.aspectRatio,
|
|
2439
|
-
aspectRatio = _ref$aspectRatio === void 0 ? AspectRatio['1:1'] : _ref$aspectRatio;
|
|
2437
|
+
aspectRatio = _ref$aspectRatio === void 0 ? exports.AspectRatio['1:1'] : _ref$aspectRatio;
|
|
2440
2438
|
return aspectRatio;
|
|
2441
2439
|
});
|
|
2442
2440
|
|
|
@@ -2515,9 +2513,9 @@ var Tab = function Tab(_ref) {
|
|
|
2515
2513
|
};
|
|
2516
2514
|
|
|
2517
2515
|
var onKeyDownHandler = function onKeyDownHandler(e) {
|
|
2518
|
-
if (e.
|
|
2516
|
+
if (e.key === 'Enter') {
|
|
2519
2517
|
clickHandler();
|
|
2520
|
-
} else if (e.
|
|
2518
|
+
} else if (e.key === 'Escape') {
|
|
2521
2519
|
onReset == null ? void 0 : onReset();
|
|
2522
2520
|
}
|
|
2523
2521
|
};
|
|
@@ -2541,7 +2539,7 @@ var Tab = function Tab(_ref) {
|
|
|
2541
2539
|
};
|
|
2542
2540
|
|
|
2543
2541
|
var _templateObject$f, _templateObject2$3;
|
|
2544
|
-
var TabLinkWrapper = /*#__PURE__*/styled__default.a(_templateObject$f || (_templateObject$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: ", ";\n font-family: var(--font-family-navigation);\n font-size: var(--font-size-navigation);\n font-weight: var(--font-weight-navigation);\n line-height: var(--line-height-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n text-transform: var(--text-transform-navigation);\n color: ", ";\n width: fit-content;\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n border-bottom: ", ";\n ", "\n\n
|
|
2542
|
+
var TabLinkWrapper = /*#__PURE__*/styled__default.a(_templateObject$f || (_templateObject$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: ", ";\n font-family: var(--font-family-navigation);\n font-size: var(--font-size-navigation);\n font-weight: var(--font-weight-navigation);\n line-height: var(--line-height-navigation);\n letter-spacing: var(--letter-spacing-navigation);\n text-transform: var(--text-transform-navigation);\n color: ", ";\n width: fit-content;\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n border-bottom: ", ";\n ", "\n\n @media ", ", ", " {\n &:hover {\n color: var(--base-color-", ");\n border-bottom: 1px solid var(--base-color-", ");\n\n && svg path {\n fill: var(--base-color-", ");\n }\n }\n }\n"])), function (_ref) {
|
|
2545
2543
|
var iconName = _ref.iconName;
|
|
2546
2544
|
return iconName ? 'calc(var(--text-link-underline-offset) - 4px) 0' : 'var(--text-link-underline-offset) 0';
|
|
2547
2545
|
}, function (_ref2) {
|
|
@@ -2557,7 +2555,7 @@ var TabLinkWrapper = /*#__PURE__*/styled__default.a(_templateObject$f || (_templ
|
|
|
2557
2555
|
var selected = _ref4.selected,
|
|
2558
2556
|
hoverColor = _ref4.hoverColor;
|
|
2559
2557
|
return selected ? "&& svg path {\n fill: var(--base-color-" + hoverColor + ");\n }" : '';
|
|
2560
|
-
}, function (_ref5) {
|
|
2558
|
+
}, devices.desktop, devices.largeDesktop, function (_ref5) {
|
|
2561
2559
|
var hoverColor = _ref5.hoverColor;
|
|
2562
2560
|
return hoverColor;
|
|
2563
2561
|
}, function (_ref6) {
|
|
@@ -2630,16 +2628,28 @@ var RotatorButtons = function RotatorButtons(_ref) {
|
|
|
2630
2628
|
}
|
|
2631
2629
|
};
|
|
2632
2630
|
|
|
2631
|
+
var onPrevKeyDownHandler = function onPrevKeyDownHandler(e) {
|
|
2632
|
+
if (e.key === 'Enter') {
|
|
2633
|
+
onClickLeftHandler();
|
|
2634
|
+
}
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2633
2637
|
var onClickRightHandler = function onClickRightHandler() {
|
|
2634
2638
|
if (onClickNext) {
|
|
2635
2639
|
onClickNext();
|
|
2636
2640
|
}
|
|
2637
2641
|
};
|
|
2638
2642
|
|
|
2643
|
+
var onNextKeyDownHandler = function onNextKeyDownHandler(e) {
|
|
2644
|
+
if (e.key === 'Enter') {
|
|
2645
|
+
onClickRightHandler();
|
|
2646
|
+
}
|
|
2647
|
+
};
|
|
2648
|
+
|
|
2639
2649
|
var renderPrevIcon = function renderPrevIcon() {
|
|
2640
2650
|
return /*#__PURE__*/React__default.createElement(Icon, {
|
|
2641
2651
|
iconName: 'CarouselArrow',
|
|
2642
|
-
direction: "
|
|
2652
|
+
direction: "reverse"
|
|
2643
2653
|
});
|
|
2644
2654
|
};
|
|
2645
2655
|
|
|
@@ -2651,11 +2661,15 @@ var RotatorButtons = function RotatorButtons(_ref) {
|
|
|
2651
2661
|
|
|
2652
2662
|
return /*#__PURE__*/React__default.createElement(ButtonsContainer, null, availablePrev ? /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
2653
2663
|
onClick: onClickLeftHandler,
|
|
2664
|
+
onKeyDown: onPrevKeyDownHandler,
|
|
2665
|
+
tabIndex: 0,
|
|
2654
2666
|
"data-testid": "iconprev"
|
|
2655
2667
|
}, renderPrevIcon()) : /*#__PURE__*/React__default.createElement(IconUnavailableWrapper, {
|
|
2656
2668
|
"data-testid": "iconprevnoavailable"
|
|
2657
2669
|
}, renderPrevIcon()), availableNext ? /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
2658
2670
|
onClick: onClickRightHandler,
|
|
2671
|
+
onKeyDown: onNextKeyDownHandler,
|
|
2672
|
+
tabIndex: 0,
|
|
2659
2673
|
"data-testid": "iconnext"
|
|
2660
2674
|
}, renderNextIcon()) : /*#__PURE__*/React__default.createElement(IconUnavailableWrapper, {
|
|
2661
2675
|
"data-testid": "iconnextnoavailable"
|
|
@@ -2860,7 +2874,7 @@ var Basket$1 = function Basket(_ref) {
|
|
|
2860
2874
|
};
|
|
2861
2875
|
|
|
2862
2876
|
var onKeyDownHandler = function onKeyDownHandler(e) {
|
|
2863
|
-
if (e.
|
|
2877
|
+
if (e.key === 'Enter') {
|
|
2864
2878
|
onClickHandler();
|
|
2865
2879
|
}
|
|
2866
2880
|
};
|
|
@@ -2910,7 +2924,7 @@ var Search$1 = function Search(_ref) {
|
|
|
2910
2924
|
colorPrimary = _ref$colorPrimary === void 0 ? 'primary' : _ref$colorPrimary;
|
|
2911
2925
|
|
|
2912
2926
|
var onKeyDownHandler = function onKeyDownHandler(e) {
|
|
2913
|
-
if (e.
|
|
2927
|
+
if (e.key === 'Enter') {
|
|
2914
2928
|
onClick == null ? void 0 : onClick();
|
|
2915
2929
|
}
|
|
2916
2930
|
};
|
|
@@ -3069,9 +3083,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
3069
3083
|
};
|
|
3070
3084
|
|
|
3071
3085
|
var onKeyDownHandler = function onKeyDownHandler(e, link) {
|
|
3072
|
-
if (e.
|
|
3086
|
+
if (e.key === 'Enter') {
|
|
3073
3087
|
handleChange(link);
|
|
3074
|
-
} else if (e.
|
|
3088
|
+
} else if (e.key === 'Escape') {
|
|
3075
3089
|
onResetHandler();
|
|
3076
3090
|
}
|
|
3077
3091
|
};
|
|
@@ -3266,17 +3280,17 @@ var ControlledDropdown = function ControlledDropdown(_ref) {
|
|
|
3266
3280
|
}, [ref, resetHandler, active]);
|
|
3267
3281
|
|
|
3268
3282
|
var handleOptionKeyDown = function handleOptionKeyDown(e, link) {
|
|
3269
|
-
if (e.
|
|
3283
|
+
if (e.key === 'Enter') {
|
|
3270
3284
|
onOptionClick == null ? void 0 : onOptionClick(link);
|
|
3271
|
-
} else if (e.
|
|
3285
|
+
} else if (e.key === 'Escape') {
|
|
3272
3286
|
resetHandler();
|
|
3273
3287
|
}
|
|
3274
3288
|
};
|
|
3275
3289
|
|
|
3276
3290
|
var handleHeaderKeyDown = function handleHeaderKeyDown(e) {
|
|
3277
|
-
if (e.
|
|
3291
|
+
if (e.key === 'Enter') {
|
|
3278
3292
|
onClick == null ? void 0 : onClick();
|
|
3279
|
-
} else if (e.
|
|
3293
|
+
} else if (e.key === 'Escape') {
|
|
3280
3294
|
resetHandler();
|
|
3281
3295
|
}
|
|
3282
3296
|
};
|
|
@@ -3540,7 +3554,7 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
3540
3554
|
};
|
|
3541
3555
|
|
|
3542
3556
|
var handleKeypress = function handleKeypress(e, value) {
|
|
3543
|
-
if (e.
|
|
3557
|
+
if (e.key === 'Enter' && showSearchLink) {
|
|
3544
3558
|
onSearchHandler(value);
|
|
3545
3559
|
}
|
|
3546
3560
|
};
|
|
@@ -3563,7 +3577,7 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
3563
3577
|
};
|
|
3564
3578
|
|
|
3565
3579
|
var onKeyboardCloseHandler = function onKeyboardCloseHandler(e) {
|
|
3566
|
-
if (e.
|
|
3580
|
+
if (e.key === 'Enter') {
|
|
3567
3581
|
onCloseHandler();
|
|
3568
3582
|
}
|
|
3569
3583
|
};
|
|
@@ -3865,8 +3879,6 @@ var _excluded$7 = ["text"],
|
|
|
3865
3879
|
_excluded3 = ["id", "text"];
|
|
3866
3880
|
|
|
3867
3881
|
var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
3868
|
-
var _tabListRef$current, _tabListRef$current2;
|
|
3869
|
-
|
|
3870
3882
|
var tabs = _ref.tabs,
|
|
3871
3883
|
title = _ref.title,
|
|
3872
3884
|
links = _ref.links,
|
|
@@ -3882,13 +3894,15 @@ var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
|
3882
3894
|
tabsOverflow = _useState2[0],
|
|
3883
3895
|
setTabsOverflow = _useState2[1];
|
|
3884
3896
|
|
|
3885
|
-
var _useState3 = React.useState(
|
|
3886
|
-
|
|
3887
|
-
|
|
3897
|
+
var _useState3 = React.useState(false),
|
|
3898
|
+
canScrollToLeft = _useState3[0],
|
|
3899
|
+
setCanScrollToLeft = _useState3[1];
|
|
3900
|
+
|
|
3901
|
+
var _useState4 = React.useState(tabsOverflow),
|
|
3902
|
+
canScrollToRight = _useState4[0],
|
|
3903
|
+
setCanScrollToRight = _useState4[1];
|
|
3888
3904
|
|
|
3889
3905
|
var hasTitleOrLinks = title || links;
|
|
3890
|
-
var scrollStart = 0 === scroll;
|
|
3891
|
-
var scrollEnd = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) - (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0) <= scroll;
|
|
3892
3906
|
|
|
3893
3907
|
var isSelectedItem = function isSelectedItem(id) {
|
|
3894
3908
|
return id === selectedItem;
|
|
@@ -3903,10 +3917,11 @@ var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
|
3903
3917
|
};
|
|
3904
3918
|
|
|
3905
3919
|
React.useEffect(function () {
|
|
3906
|
-
var _tabListRef$
|
|
3920
|
+
var _tabListRef$current, _tabListRef$current2;
|
|
3907
3921
|
|
|
3908
|
-
var tabsIsOverflowed = (((_tabListRef$
|
|
3922
|
+
var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
|
|
3909
3923
|
setTabsOverflow(tabsIsOverflowed);
|
|
3924
|
+
setCanScrollToRight(tabsIsOverflowed);
|
|
3910
3925
|
}, [tabListRef]);
|
|
3911
3926
|
React.useEffect(function () {
|
|
3912
3927
|
var scrollTriggerCheck = function scrollTriggerCheck() {
|
|
@@ -3921,6 +3936,24 @@ var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
|
3921
3936
|
if (window.scrollY === 0) {
|
|
3922
3937
|
setSelectedItem(onTabClick ? selectedItem : '');
|
|
3923
3938
|
} else if (reachedItem) {
|
|
3939
|
+
var _ref2 = (tabListRef == null ? void 0 : tabListRef.current) || {},
|
|
3940
|
+
_ref2$scrollLeft = _ref2.scrollLeft,
|
|
3941
|
+
scrollLeft = _ref2$scrollLeft === void 0 ? 0 : _ref2$scrollLeft,
|
|
3942
|
+
_ref2$clientWidth = _ref2.clientWidth,
|
|
3943
|
+
clientWidth = _ref2$clientWidth === void 0 ? 0 : _ref2$clientWidth;
|
|
3944
|
+
|
|
3945
|
+
var tabLinkElement = document.getElementById("tablink-" + reachedItem.id) || {
|
|
3946
|
+
offsetLeft: 0,
|
|
3947
|
+
offsetWidth: 0
|
|
3948
|
+
};
|
|
3949
|
+
var offsetLeft = tabLinkElement.offsetLeft,
|
|
3950
|
+
offsetWidth = tabLinkElement.offsetWidth;
|
|
3951
|
+
var isInView = offsetLeft >= scrollLeft && offsetLeft + offsetWidth < scrollLeft + clientWidth;
|
|
3952
|
+
|
|
3953
|
+
if (!isInView && tabListRef != null && tabListRef.current) {
|
|
3954
|
+
tabListRef.current.scrollLeft = offsetLeft;
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3924
3957
|
setSelectedItem(reachedItem.id);
|
|
3925
3958
|
}
|
|
3926
3959
|
};
|
|
@@ -3929,34 +3962,47 @@ var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
|
3929
3962
|
return function () {
|
|
3930
3963
|
return document.removeEventListener('scroll', scrollTriggerCheck);
|
|
3931
3964
|
};
|
|
3932
|
-
}, [tabs, selectedItem, hasTitleOrLinks]);
|
|
3933
|
-
var tabsColumnStart = tabsOverflow ?
|
|
3934
|
-
var tabsColumnSpan = tabsOverflow ?
|
|
3965
|
+
}, [tabs, selectedItem, hasTitleOrLinks, tabListRef]);
|
|
3966
|
+
var tabsColumnStart = tabsOverflow ? !canScrollToLeft ? 2 : 1 : 3;
|
|
3967
|
+
var tabsColumnSpan = tabsOverflow ? !canScrollToLeft ? 14 : 15 : 13;
|
|
3935
3968
|
|
|
3936
|
-
var
|
|
3937
|
-
primaryButtonText =
|
|
3938
|
-
primaryButtonProps = _objectWithoutPropertiesLoose(
|
|
3969
|
+
var _ref3 = (links == null ? void 0 : links[0]) || {},
|
|
3970
|
+
primaryButtonText = _ref3.text,
|
|
3971
|
+
primaryButtonProps = _objectWithoutPropertiesLoose(_ref3, _excluded$7);
|
|
3939
3972
|
|
|
3940
|
-
var
|
|
3941
|
-
secondaryButtonText =
|
|
3942
|
-
secondaryButtonProps = _objectWithoutPropertiesLoose(
|
|
3973
|
+
var _ref4 = (links == null ? void 0 : links[1]) || {},
|
|
3974
|
+
secondaryButtonText = _ref4.text,
|
|
3975
|
+
secondaryButtonProps = _objectWithoutPropertiesLoose(_ref4, _excluded2);
|
|
3943
3976
|
|
|
3944
3977
|
var scrollToRight = function scrollToRight() {
|
|
3945
3978
|
if (tabListRef.current) {
|
|
3979
|
+
var scroll = tabListRef.current.scrollLeft;
|
|
3946
3980
|
var newScroll = Math.min(tabListRef.current.clientWidth, tabListRef.current.scrollWidth - scroll);
|
|
3947
3981
|
tabListRef.current.scrollLeft += newScroll;
|
|
3948
|
-
setScroll(tabListRef.current.scrollLeft + newScroll);
|
|
3949
3982
|
}
|
|
3950
3983
|
};
|
|
3951
3984
|
|
|
3952
3985
|
var scrollToLeft = function scrollToLeft() {
|
|
3953
3986
|
if (tabListRef.current) {
|
|
3987
|
+
var scroll = tabListRef.current.scrollLeft;
|
|
3954
3988
|
var newScroll = Math.max(0, scroll - tabListRef.current.clientWidth);
|
|
3955
3989
|
tabListRef.current.scrollLeft = newScroll;
|
|
3956
|
-
setScroll(newScroll);
|
|
3957
3990
|
}
|
|
3958
3991
|
};
|
|
3959
3992
|
|
|
3993
|
+
var onTabsScroll = function onTabsScroll() {
|
|
3994
|
+
var _ref5 = (tabListRef == null ? void 0 : tabListRef.current) || {},
|
|
3995
|
+
_ref5$scrollLeft = _ref5.scrollLeft,
|
|
3996
|
+
scrollLeft = _ref5$scrollLeft === void 0 ? 0 : _ref5$scrollLeft,
|
|
3997
|
+
_ref5$clientWidth = _ref5.clientWidth,
|
|
3998
|
+
clientWidth = _ref5$clientWidth === void 0 ? 0 : _ref5$clientWidth,
|
|
3999
|
+
_ref5$scrollWidth = _ref5.scrollWidth,
|
|
4000
|
+
scrollWidth = _ref5$scrollWidth === void 0 ? 0 : _ref5$scrollWidth;
|
|
4001
|
+
|
|
4002
|
+
setCanScrollToLeft(scrollLeft > 0);
|
|
4003
|
+
setCanScrollToRight(scrollLeft + clientWidth < scrollWidth);
|
|
4004
|
+
};
|
|
4005
|
+
|
|
3960
4006
|
return /*#__PURE__*/React__default.createElement(AnchorTapbarWrapper, null, title || links ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TitleCTAGrid, null, title ? /*#__PURE__*/React__default.createElement(GridItem, {
|
|
3961
4007
|
columnStartDesktop: 2,
|
|
3962
4008
|
columnSpanDesktop: 9,
|
|
@@ -3981,27 +4027,29 @@ var AnchorTapBar = function AnchorTapBar(_ref) {
|
|
|
3981
4027
|
"data-testid": "anchor-tabs"
|
|
3982
4028
|
}, /*#__PURE__*/React__default.createElement(TabsList, {
|
|
3983
4029
|
ref: tabListRef,
|
|
3984
|
-
tabsOverflow: tabsOverflow
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
4030
|
+
tabsOverflow: tabsOverflow,
|
|
4031
|
+
onScroll: onTabsScroll
|
|
4032
|
+
}, tabs.map(function (_ref6) {
|
|
4033
|
+
var id = _ref6.id,
|
|
4034
|
+
text = _ref6.text,
|
|
4035
|
+
rest = _objectWithoutPropertiesLoose(_ref6, _excluded3);
|
|
3989
4036
|
|
|
3990
4037
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
3991
4038
|
key: id
|
|
3992
4039
|
}, /*#__PURE__*/React__default.createElement(TabLink, Object.assign({
|
|
3993
4040
|
selected: isSelectedItem(id),
|
|
4041
|
+
id: "tablink-" + id,
|
|
3994
4042
|
onClick: function onClick(e) {
|
|
3995
4043
|
return onClicktab(e, id);
|
|
3996
4044
|
},
|
|
3997
4045
|
tabIndex: 0
|
|
3998
4046
|
}, rest), text));
|
|
3999
|
-
})), tabsOverflow ? /*#__PURE__*/React__default.createElement(ArrowsContainer, null,
|
|
4047
|
+
})), tabsOverflow ? /*#__PURE__*/React__default.createElement(ArrowsContainer, null, canScrollToLeft ? /*#__PURE__*/React__default.createElement(ArrowWrapper, {
|
|
4000
4048
|
onClick: scrollToLeft
|
|
4001
4049
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
4002
4050
|
iconName: "Arrow",
|
|
4003
4051
|
direction: "reverse"
|
|
4004
|
-
})) : null,
|
|
4052
|
+
})) : null, canScrollToRight ? /*#__PURE__*/React__default.createElement(ArrowWrapper, {
|
|
4005
4053
|
onClick: scrollToRight
|
|
4006
4054
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
4007
4055
|
iconName: "Arrow"
|
|
@@ -4027,7 +4075,7 @@ var CarouselWrapper = /*#__PURE__*/styled__default.div(_templateObject$x || (_te
|
|
|
4027
4075
|
var calcColumns = "calc(calc(80% - " + gapsInMainGraid + ") * " + numberOfColumns + " / 12)";
|
|
4028
4076
|
return "\n & {\n .swiper-slide {\n width: calc(" + calcColumns + " + " + gapsSpace + " - 1px);\n margin-right: var(--grid-column-gap);\n -webkit-transform: translate3d(0, 0, 0);\n }\n }\n ";
|
|
4029
4077
|
} else {
|
|
4030
|
-
return "\n & {\n .swiper-slide {\n height: fit-content;\n width: auto;\n margin-right: var(--grid-column-gap);\n -webkit-transform: translate3d(0, 0, 0);\n\n > div {\n height: " + imagesHeightDesktop + "px;\n }\n }\n }\n ";
|
|
4078
|
+
return "\n & {\n .swiper-slide {\n height: fit-content;\n width: auto;\n margin-right: var(--grid-column-gap);\n -webkit-transform: translate3d(0, 0, 0);\n\n > div {\n height: calc(" + imagesHeightDesktop + "px + var(--line-height-body-2) + 12px);\n }\n }\n }\n ";
|
|
4031
4079
|
}
|
|
4032
4080
|
}, devices.mobile, function (_ref2) {
|
|
4033
4081
|
var active = _ref2.active,
|
|
@@ -4044,11 +4092,11 @@ var CarouselWrapper = /*#__PURE__*/styled__default.div(_templateObject$x || (_te
|
|
|
4044
4092
|
var marginRight = active ? "calc(calc(var(--grid-column-gap) * 2) + " + columnWidth + ")" : "calc(calc(" + columnWidth + " * 2) + var(--grid-column-gap))";
|
|
4045
4093
|
return "\n && {\n .swiper-slide {\n width: calc(" + calcColumns + " + " + gapsSpace + " - 1px);\n margin-right: " + marginRight + ";\n -webkit-transform: translate3d(0, 0, 0);\n }\n }";
|
|
4046
4094
|
} else {
|
|
4047
|
-
return "\n &&& {\n .swiper-slide > div{\n height: " + imagesHeightDevice + "px;\n }\n }";
|
|
4095
|
+
return "\n &&& {\n .swiper-slide > div{\n height: calc(" + imagesHeightDevice + "px + var(--line-height-body-2) + 12px);\n }\n }";
|
|
4048
4096
|
}
|
|
4049
4097
|
});
|
|
4050
4098
|
var TitleButtonsGrid = /*#__PURE__*/styled__default(Grid)(_templateObject2$h || (_templateObject2$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 28px;\n\n @media ", " {\n margin-bottom: 20px;\n }\n"])), devices.mobile);
|
|
4051
|
-
var TitleWrapper = /*#__PURE__*/styled__default.div(_templateObject3$b || (_templateObject3$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n align-items: center;\n user-select: text;\n\n
|
|
4099
|
+
var TitleWrapper = /*#__PURE__*/styled__default.div(_templateObject3$b || (_templateObject3$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n align-items: center;\n user-select: text;\n\n h4 {\n padding: 0;\n margin: 0;\n }\n"])));
|
|
4052
4100
|
var ButtonsWrapper = /*#__PURE__*/styled__default.div(_templateObject4$8 || (_templateObject4$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: flex-end;\n align-items: start;\n\n @media ", " {\n display: none;\n }\n"])), devices.mobileAndTablet);
|
|
4053
4101
|
|
|
4054
4102
|
var Carousel = function Carousel(_ref) {
|
|
@@ -4128,7 +4176,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
4128
4176
|
}, /*#__PURE__*/React__default.createElement(TitleWrapper, {
|
|
4129
4177
|
"data-testid": "carousel-title-wrapper"
|
|
4130
4178
|
}, /*#__PURE__*/React__default.createElement(AltHeader, {
|
|
4131
|
-
level:
|
|
4179
|
+
level: 4
|
|
4132
4180
|
}, title))), /*#__PURE__*/React__default.createElement(GridItem, {
|
|
4133
4181
|
columnStartDesktop: 14,
|
|
4134
4182
|
columnSpanDesktop: 2,
|
|
@@ -4260,6 +4308,16 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
4260
4308
|
restLink = _objectWithoutPropertiesLoose(link, _excluded$8);
|
|
4261
4309
|
|
|
4262
4310
|
var description = infoText == null ? void 0 : infoText.substring(0, 130);
|
|
4311
|
+
React.useEffect(function () {
|
|
4312
|
+
var slideChangeHandler = function slideChangeHandler(s) {
|
|
4313
|
+
return setCurrentSlide(s.realIndex);
|
|
4314
|
+
};
|
|
4315
|
+
|
|
4316
|
+
swiper == null ? void 0 : swiper.on('slideChangeTransitionStart', slideChangeHandler);
|
|
4317
|
+
return function () {
|
|
4318
|
+
return swiper == null ? void 0 : swiper.off('slideChangeTransitionStart', slideChangeHandler);
|
|
4319
|
+
};
|
|
4320
|
+
}, [swiper]);
|
|
4263
4321
|
|
|
4264
4322
|
var onSwiper = function onSwiper(s) {
|
|
4265
4323
|
setSwiper(s);
|
|
@@ -4268,14 +4326,12 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
4268
4326
|
var onNext = function onNext() {
|
|
4269
4327
|
if (swiper && !swiper.animating) {
|
|
4270
4328
|
swiper.slideNext();
|
|
4271
|
-
setCurrentSlide(swiper.realIndex);
|
|
4272
4329
|
}
|
|
4273
4330
|
};
|
|
4274
4331
|
|
|
4275
4332
|
var onPrev = function onPrev() {
|
|
4276
4333
|
if (swiper && !swiper.animating) {
|
|
4277
4334
|
swiper.slidePrev();
|
|
4278
|
-
setCurrentSlide(swiper.realIndex);
|
|
4279
4335
|
}
|
|
4280
4336
|
};
|
|
4281
4337
|
|
|
@@ -4320,7 +4376,7 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
4320
4376
|
return /*#__PURE__*/React__default.createElement(swiperReact_js.SwiperSlide, {
|
|
4321
4377
|
key: image.key
|
|
4322
4378
|
}, /*#__PURE__*/React__default.createElement(ImageAspectRatioWrapper, {
|
|
4323
|
-
aspectRatio: AspectRatio['4:3']
|
|
4379
|
+
aspectRatio: exports.AspectRatio['4:3']
|
|
4324
4380
|
}, /*#__PURE__*/React__default.createElement("img", Object.assign({}, image))));
|
|
4325
4381
|
}))));
|
|
4326
4382
|
};
|
|
@@ -4444,7 +4500,7 @@ var Accordions = function Accordions(_ref) {
|
|
|
4444
4500
|
}));
|
|
4445
4501
|
};
|
|
4446
4502
|
|
|
4447
|
-
var _templateObject$B, _templateObject2$k, _templateObject3$e, _templateObject4$b, _templateObject5$7, _templateObject6$6, _templateObject7$4, _templateObject8$4;
|
|
4503
|
+
var _templateObject$B, _templateObject2$k, _templateObject3$e, _templateObject4$b, _templateObject5$7, _templateObject6$6, _templateObject7$4, _templateObject8$4, _templateObject9$3;
|
|
4448
4504
|
var LENGTH_LARGE_TEXT = 28;
|
|
4449
4505
|
var LENGTH_SMALL_TEXT = 19;
|
|
4450
4506
|
var LENGTH_TEXT_TABLET = 10;
|
|
@@ -4458,10 +4514,11 @@ var ContentContainer$1 = /*#__PURE__*/styled__default.div(_templateObject4$b ||
|
|
|
4458
4514
|
var fullWidth = _ref2.fullWidth;
|
|
4459
4515
|
return fullWidth ? '0' : '20px';
|
|
4460
4516
|
});
|
|
4461
|
-
var TitleContainer$2 = /*#__PURE__*/styled__default.div(_templateObject5$7 || (_templateObject5$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: calc(-1 * var(--editorial-margin-between)) 0 calc(-1 * var(--editorial-margin-between)) 0;\n"])));
|
|
4462
|
-
var
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
4517
|
+
var TitleContainer$2 = /*#__PURE__*/styled__default.div(_templateObject5$7 || (_templateObject5$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: calc(-1 * var(--editorial-margin-between)) 0 calc(-1 * var(--editorial-margin-between)) 0;\n\n @media ", " {\n display: none;\n }\n"])), devices.mobile);
|
|
4518
|
+
var TitleContainerMobile = /*#__PURE__*/styled__default.div(_templateObject6$6 || (_templateObject6$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: calc(-1 * var(--editorial-margin-between)) 0 calc(-1 * var(--editorial-margin-between)) 0;\n display: none;\n\n @media ", " {\n display: block;\n }\n"])), devices.mobile);
|
|
4519
|
+
var TextContainer = /*#__PURE__*/styled__default.div(_templateObject7$4 || (_templateObject7$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-body);\n font-feature-settings: var(--font-feature-settings-body);\n font-size: var(--font-size-body-1);\n font-weight: var(--font-weight-body-1);\n line-height: var(--line-height-body-1);\n letter-spacing: var(--letter-spacing-body-1);\n text-transform: var(--text-transform-body);\n margin-top: var(--editorial-spacing-hover);\n padding: 0;\n white-space: break-spaces;\n overflow-wrap: break-word;\n\n em {\n font-family: var(--font-family-body-italics);\n }\n"])));
|
|
4520
|
+
var SubtitleContainer = /*#__PURE__*/styled__default.span(_templateObject8$4 || (_templateObject8$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: var(--font-family-subtitle);\n font-feature-settings: var(--font-feature-settings-subtitle);\n font-size: var(--font-size-subtitle-2);\n font-weight: var(--font-weight-subtitle-2);\n line-height: var(--line-height-subtitle-2);\n letter-spacing: var(--letter-spacing-subtitle-2);\n text-transform: var(--text-transform-subtitle);\n display: block;\n overflow-wrap: break-word;\n"])));
|
|
4521
|
+
var ButtonsContainer$1 = /*#__PURE__*/styled__default.div(_templateObject9$3 || (_templateObject9$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n opacity: 0;\n display: flex;\n gap: 16px;\n margin-top: var(--editorial-margin-between);\n\n ", "\n\n @media ", " {\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n flex-direction: column;\n align-items: center;\n }\n\n @media ", " {\n opacity: 1 !important;\n gap: 24px;\n margin-top: 24px;\n align-items: flex-start;\n\n ", "\n }\n"])), function (_ref3) {
|
|
4465
4522
|
var size = _ref3.size,
|
|
4466
4523
|
primaryButtonTextLength = _ref3.primaryButtonTextLength,
|
|
4467
4524
|
tertiaryButtonTextLength = _ref3.tertiaryButtonTextLength;
|
|
@@ -4585,7 +4642,7 @@ var Card = function Card(_ref) {
|
|
|
4585
4642
|
}, hovered && /*#__PURE__*/React__default.createElement(HoverContainer, {
|
|
4586
4643
|
"data-testid": "hovercontainer"
|
|
4587
4644
|
}), /*#__PURE__*/React__default.createElement(ImageAspectRatioWrapper, {
|
|
4588
|
-
aspectRatio: AspectRatio['4:3']
|
|
4645
|
+
aspectRatio: exports.AspectRatio['4:3']
|
|
4589
4646
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
4590
4647
|
src: image,
|
|
4591
4648
|
alt: "test"
|
|
@@ -4600,6 +4657,8 @@ var Card = function Card(_ref) {
|
|
|
4600
4657
|
}, tags ? /*#__PURE__*/React__default.createElement(TypeTags, {
|
|
4601
4658
|
list: tags
|
|
4602
4659
|
}) : null, /*#__PURE__*/React__default.createElement(TitleContainer$2, null, /*#__PURE__*/React__default.createElement(Header, {
|
|
4660
|
+
level: size === 'small' ? 6 : 5
|
|
4661
|
+
}, title)), /*#__PURE__*/React__default.createElement(TitleContainerMobile, null, /*#__PURE__*/React__default.createElement(Header, {
|
|
4603
4662
|
level: 6
|
|
4604
4663
|
}, title)), subtitle ? /*#__PURE__*/React__default.createElement(SubtitleContainer, null, subtitle) : null, /*#__PURE__*/React__default.createElement(TextContainer, {
|
|
4605
4664
|
dangerouslySetInnerHTML: {
|
|
@@ -4687,7 +4746,7 @@ var Editorial = function Editorial(_ref) {
|
|
|
4687
4746
|
"data-testid": "image-wrapper",
|
|
4688
4747
|
imageToLeft: imageToLeft
|
|
4689
4748
|
}, /*#__PURE__*/React__default.createElement(ImageAspectRatioWrapper, {
|
|
4690
|
-
aspectRatio: AspectRatio['1:1']
|
|
4749
|
+
aspectRatio: exports.AspectRatio['1:1']
|
|
4691
4750
|
}, children)), /*#__PURE__*/React__default.createElement(EditorialTextWrapper, {
|
|
4692
4751
|
"data-testid": "text-wrapper",
|
|
4693
4752
|
imageToLeft: imageToLeft
|
|
@@ -4984,7 +5043,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
|
4984
5043
|
"data-testid": "image-wrapper",
|
|
4985
5044
|
imageToLeft: imageToLeft
|
|
4986
5045
|
}, /*#__PURE__*/React__default.createElement(ImageAspectRatioWrapper, {
|
|
4987
|
-
aspectRatio: AspectRatio['4:3']
|
|
5046
|
+
aspectRatio: exports.AspectRatio['4:3']
|
|
4988
5047
|
}, children)), /*#__PURE__*/React__default.createElement(PromoWithTitleContentWrapper, {
|
|
4989
5048
|
"data-testid": "content-wrapper",
|
|
4990
5049
|
imageToLeft: imageToLeft
|
|
@@ -5966,6 +6025,7 @@ exports.HighlightsCarouselCinema = HighlightsCinema;
|
|
|
5966
6025
|
exports.HighlightsCarouselCore = HighlightsCore;
|
|
5967
6026
|
exports.HighlightsCarouselStream = HighlightsStream;
|
|
5968
6027
|
exports.Icon = Icon;
|
|
6028
|
+
exports.ImageAspectRatioWrapper = ImageAspectRatioWrapper;
|
|
5969
6029
|
exports.ImageWithCaption = ImageWithCaption;
|
|
5970
6030
|
exports.Navigation = Navigation;
|
|
5971
6031
|
exports.Overline = Overline;
|