@royaloperahouse/harmonic 0.17.0-l → 0.17.1-a
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/dist/components/organisms/AnchorTabBar/AnchorTabBar.style.d.ts +1 -1
- package/dist/harmonic.cjs.development.js +22 -11
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +22 -11
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/types.d.ts +5 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ export declare const AnchorTabbarWrapper: import("styled-components").StyledComp
|
|
|
4
4
|
export declare const TabsGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const TabsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const TabsList: import("styled-components").StyledComponent<"ul", any, IAnchorTabsListProps, never>;
|
|
7
|
-
export declare const ArrowControls: import("styled-components").StyledComponent<({ onClickPrev, onClickNext, availablePrev, availableNext, showFullscreen, onClickFullscreen, isFullscreen, className, }: import("../../../types/buttonTypes").RotatorButtonsProps) => import("react").JSX.Element
|
|
7
|
+
export declare const ArrowControls: import("styled-components").StyledComponent<({ onClickPrev, onClickNext, availablePrev, availableNext, showFullscreen, onClickFullscreen, isFullscreen, className, }: import("../../../types/buttonTypes").RotatorButtonsProps) => import("react").JSX.Element, any, IAnchorTabBarBorderProps, never>;
|
|
8
8
|
export declare const ArrowsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
9
9
|
withShadow?: boolean | undefined;
|
|
10
10
|
}, never>;
|
|
@@ -5846,6 +5846,7 @@ var PrintHideWrapper = /*#__PURE__*/styled__default.div(_templateObject7$5 || (_
|
|
|
5846
5846
|
|
|
5847
5847
|
/* eslint-disable react/no-unstable-nested-components */
|
|
5848
5848
|
var Accordion = function Accordion(_ref) {
|
|
5849
|
+
var _expandedStateIcon$ic, _collapsedStateIcon$i;
|
|
5849
5850
|
var _ref$title = _ref.title,
|
|
5850
5851
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
5851
5852
|
_ref$showLine = _ref.showLine,
|
|
@@ -5853,16 +5854,26 @@ var Accordion = function Accordion(_ref) {
|
|
|
5853
5854
|
children = _ref.children,
|
|
5854
5855
|
_ref$initOpen = _ref.initOpen,
|
|
5855
5856
|
initOpen = _ref$initOpen === void 0 ? false : _ref$initOpen,
|
|
5856
|
-
className = _ref.className
|
|
5857
|
+
className = _ref.className,
|
|
5858
|
+
expandedStateIcon = _ref.expandedStateIcon,
|
|
5859
|
+
collapsedStateIcon = _ref.collapsedStateIcon;
|
|
5857
5860
|
var _useState = React.useState(initOpen),
|
|
5858
5861
|
openAccordion = _useState[0],
|
|
5859
5862
|
setOpenAccordion = _useState[1];
|
|
5860
5863
|
var _useState2 = React.useState('0px'),
|
|
5861
5864
|
textHeight = _useState2[0],
|
|
5862
5865
|
setTextHeight = _useState2[1];
|
|
5863
|
-
var
|
|
5864
|
-
iconName =
|
|
5865
|
-
|
|
5866
|
+
var expandedStateIconData = {
|
|
5867
|
+
iconName: (_expandedStateIcon$ic = expandedStateIcon == null ? void 0 : expandedStateIcon.iconName) != null ? _expandedStateIcon$ic : 'Detract',
|
|
5868
|
+
direction: expandedStateIcon == null ? void 0 : expandedStateIcon.direction
|
|
5869
|
+
};
|
|
5870
|
+
var collapsedStateIconData = {
|
|
5871
|
+
iconName: (_collapsedStateIcon$i = collapsedStateIcon == null ? void 0 : collapsedStateIcon.iconName) != null ? _collapsedStateIcon$i : 'Expand',
|
|
5872
|
+
direction: collapsedStateIcon == null ? void 0 : collapsedStateIcon.direction
|
|
5873
|
+
};
|
|
5874
|
+
var _useState3 = React.useState(initOpen ? expandedStateIconData : collapsedStateIconData),
|
|
5875
|
+
icon = _useState3[0],
|
|
5876
|
+
setIcon = _useState3[1];
|
|
5866
5877
|
// Contents children visibility is set to prevent it from being keyboard tabbable when the accordion is closed
|
|
5867
5878
|
var _useState4 = React.useState(initOpen),
|
|
5868
5879
|
childrenVisibility = _useState4[0],
|
|
@@ -5886,7 +5897,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
5886
5897
|
var toggleAccordion = function toggleAccordion() {
|
|
5887
5898
|
if (React__default.Children.count(children) === 0) return;
|
|
5888
5899
|
if (openAccordion) {
|
|
5889
|
-
|
|
5900
|
+
setIcon(collapsedStateIconData);
|
|
5890
5901
|
setOpenAccordion(false);
|
|
5891
5902
|
setTextHeight('0px');
|
|
5892
5903
|
window.setTimeout(function () {
|
|
@@ -5895,7 +5906,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
5895
5906
|
} else {
|
|
5896
5907
|
setChildrenVisibility(true);
|
|
5897
5908
|
setOpenAccordion(true);
|
|
5898
|
-
|
|
5909
|
+
setIcon(expandedStateIconData);
|
|
5899
5910
|
}
|
|
5900
5911
|
};
|
|
5901
5912
|
var keyDown = function keyDown(e) {
|
|
@@ -5917,9 +5928,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
5917
5928
|
"aria-expanded": openAccordion,
|
|
5918
5929
|
"aria-controls": contentContainerId,
|
|
5919
5930
|
hasChildren: !!children
|
|
5920
|
-
}, /*#__PURE__*/React__default.createElement(TitleText, null, title), children && (/*#__PURE__*/React__default.createElement(PrintHideWrapper, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
5921
|
-
iconName: iconName
|
|
5922
|
-
})))), /*#__PURE__*/React__default.createElement(ContentContainer, {
|
|
5931
|
+
}, /*#__PURE__*/React__default.createElement(TitleText, null, title), children && (/*#__PURE__*/React__default.createElement(PrintHideWrapper, null, /*#__PURE__*/React__default.createElement(Icon, Object.assign({}, icon))))), /*#__PURE__*/React__default.createElement(ContentContainer, {
|
|
5923
5932
|
"data-testid": "richcontainer",
|
|
5924
5933
|
ref: content,
|
|
5925
5934
|
textHeight: textHeight,
|
|
@@ -5948,7 +5957,9 @@ var Accordions = function Accordions(_ref) {
|
|
|
5948
5957
|
return /*#__PURE__*/React__default.createElement(Accordion, {
|
|
5949
5958
|
key: accordion.title + "-" + index,
|
|
5950
5959
|
title: accordion.title,
|
|
5951
|
-
showLine: isLastAccordion(index)
|
|
5960
|
+
showLine: isLastAccordion(index),
|
|
5961
|
+
expandedStateIcon: accordion.expandedStateIcon,
|
|
5962
|
+
collapsedStateIcon: accordion.collapsedStateIcon
|
|
5952
5963
|
}, accordion.children);
|
|
5953
5964
|
}));
|
|
5954
5965
|
};
|
|
@@ -8494,7 +8505,7 @@ var _excluded$l = ["text"],
|
|
|
8494
8505
|
_excluded3$1 = ["text"];
|
|
8495
8506
|
var _buttonTypeToButton$1;
|
|
8496
8507
|
var LENGTH_TEXT$1 = 28;
|
|
8497
|
-
var LENGTH_TEXT_PARAGRAPH =
|
|
8508
|
+
var LENGTH_TEXT_PARAGRAPH = 130;
|
|
8498
8509
|
var buttonTypeToButton$1 = (_buttonTypeToButton$1 = {}, _buttonTypeToButton$1[exports.ButtonType.Primary] = PrimaryButton, _buttonTypeToButton$1[exports.ButtonType.Secondary] = SecondaryButton, _buttonTypeToButton$1[exports.ButtonType.Tertiary] = TertiaryButton, _buttonTypeToButton$1);
|
|
8499
8510
|
var PromoWithTags = function PromoWithTags(_ref) {
|
|
8500
8511
|
var _ref$imagePosition = _ref.imagePosition,
|