@royaloperahouse/harmonic 0.1.7-c → 0.1.7-d

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.
@@ -4,6 +4,5 @@ import { AnchorTabBar, Footer, Navigation, StickyBar, TitleWithCTA, UpsellSectio
4
4
  import { Accordion, Accordions, AnnouncementBanner, AuxiliaryNav, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PasswordStrength, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, RadioGroup2, ReadMore, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Table, Tabs, TextOnly, UpsellCard, Quote, VideoWithControls, SignUpForm } from './molecules';
5
5
  import ThemeProvider from '../styles/ThemeProvider';
6
6
  import GlobalStyles from '../styles/GlobalStyles';
7
- import HarmonicThemeProvider from '../styles/HarmonicThemeProvider';
8
7
  export { DisplayHeader, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
9
- export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, ContactCard, ContentSummary, CinemaBadge, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, HarmonicThemeProvider, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, SecondaryButton, SecondaryLogo, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Table, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, SignUpForm, };
8
+ export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, ContactCard, ContentSummary, CinemaBadge, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, SecondaryButton, SecondaryLogo, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Table, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, SignUpForm, };
@@ -12065,6 +12065,52 @@ var GlobalStyles = /*#__PURE__*/styled.createGlobalStyle(_templateObject$1k || (
12065
12065
  return theme.footer.tablet.paddingBottom;
12066
12066
  }, devices.desktop, devices.largeDesktop);
12067
12067
 
12068
+ var coreThemeStyles = {"coreTheme":"core-theme-module_coreTheme__pWxYB"};
12069
+
12070
+ var streamThemeStyles = {"streamTheme":"stream-theme-module_streamTheme__lTfqQ"};
12071
+
12072
+ var cinemaThemeStyles = {"cinemaTheme":"cinema-theme-module_cinemaTheme__f5QFs"};
12073
+
12074
+ var schoolsThemeStyles = {"schoolsTheme":"schools-theme-module_schoolsTheme__CWHba"};
12075
+
12076
+ /* eslint-disable react/jsx-no-useless-fragment */
12077
+ var getThemeClass = function getThemeClass(theme) {
12078
+ // Always include the base (core) theme class
12079
+ var baseThemeClass = coreThemeStyles.coreTheme;
12080
+ var overrideClass = '';
12081
+ switch (theme) {
12082
+ case exports.ThemeType.Core:
12083
+ overrideClass = '';
12084
+ break;
12085
+ case exports.ThemeType.Stream:
12086
+ overrideClass = streamThemeStyles.streamTheme;
12087
+ break;
12088
+ case exports.ThemeType.Cinema:
12089
+ overrideClass = cinemaThemeStyles.cinemaTheme;
12090
+ break;
12091
+ case exports.ThemeType.Schools:
12092
+ overrideClass = schoolsThemeStyles.schoolsTheme;
12093
+ break;
12094
+ default:
12095
+ overrideClass = '';
12096
+ }
12097
+ // Return the combined classes
12098
+ return [baseThemeClass, overrideClass].filter(Boolean).join(' ');
12099
+ };
12100
+ var HarmonicThemeProvider = function HarmonicThemeProvider(_ref) {
12101
+ var theme = _ref.theme,
12102
+ children = _ref.children;
12103
+ var themeClass = getThemeClass(theme);
12104
+ // Convert children to an array (assuming they accept a className prop)
12105
+ var childrenArray = React__default.Children.toArray(children);
12106
+ var themedChildren = childrenArray.map(function (child) {
12107
+ return /*#__PURE__*/React__default.cloneElement(child, {
12108
+ className: ((child.props.className || '') + " " + themeClass).trim()
12109
+ });
12110
+ });
12111
+ return themedChildren.length === 1 ? themedChildren[0] : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, themedChildren);
12112
+ };
12113
+
12068
12114
  exports.Accordion = Accordion;
12069
12115
  exports.Accordions = Accordions;
12070
12116
  exports.AltHeader = AltHeader;
@@ -12085,6 +12131,7 @@ exports.Footer = Footer;
12085
12131
  exports.GlobalStyles = GlobalStyles;
12086
12132
  exports.Grid = Grid;
12087
12133
  exports.GridItem = GridItem;
12134
+ exports.HarmonicThemeProvider = HarmonicThemeProvider;
12088
12135
  exports.Header = Header;
12089
12136
  exports.Icon = Icon;
12090
12137
  exports.ImageAspectRatioWrapper = ImageAspectRatioWrapper;