@royaloperahouse/harmonic 0.1.8-g → 0.1.8-i

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.
@@ -1,7 +1,4 @@
1
- import type { InformationCtaVariant } from '../../../types/information';
2
1
  export declare const InfoWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
2
  export declare const InfoTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const InfoCTAWrapper: import("styled-components").StyledComponent<"div", any, {
5
- variant: InformationCtaVariant;
6
- }, never>;
3
+ export declare const InfoCTAWrapper: import("styled-components").StyledComponent<"div", any, Pick<import("../../../types/information").IInformationCTAProps, "theme" | "variant">, never>;
7
4
  export declare const InfoBodyWrapper: import("styled-components").StyledComponent<({ children, size, color, className, ...props }: import("../../../types/typography").IGenericTypographyProps<HTMLParagraphElement>) => import("react").JSX.Element, any, {}, never>;
@@ -1,10 +1,11 @@
1
1
  import type { InformationCtaVariant } from '../../../types/information';
2
+ import { ThemeType } from '../../../types/types';
2
3
  export declare const COLORS: {
3
4
  readonly default: "var(--information-panel-button-color)";
4
5
  readonly background: "var(--information-panel-button-bg-color)";
5
6
  readonly hover: "var(--information-panel-button-hover-color)";
6
7
  readonly pressed: "var(--information-panel-button-pressed-color)";
7
8
  };
8
- export declare const getTextColor: (variant: InformationCtaVariant, colorValue: string) => string;
9
- export declare const getBackgroundColor: (variant: InformationCtaVariant, colorValue: string) => string;
10
- export declare const getBorderColor: (variant: InformationCtaVariant, colorValue: string) => string;
9
+ export declare const getTextColor: (variant: InformationCtaVariant | undefined, theme: ThemeType, colorValue: string) => string;
10
+ export declare const getBackgroundColor: (variant: InformationCtaVariant | undefined, colorValue: string) => string;
11
+ export declare const getBorderColor: (variant: InformationCtaVariant | undefined, colorValue: string) => string;
@@ -8608,22 +8608,29 @@ var COLORS$4 = {
8608
8608
  hover: 'var(--information-panel-button-hover-color)',
8609
8609
  pressed: 'var(--information-panel-button-pressed-color)'
8610
8610
  };
8611
- var getTextColor$4 = function getTextColor(variant, colorValue) {
8612
- return variant === InformationCtaVariants.Primary ? COLORS$4["default"] : colorValue;
8611
+ var getTextColor$4 = function getTextColor(variant, theme, colorValue) {
8612
+ if (theme === exports.ThemeType.Cinema && (variant === InformationCtaVariants.Tertiary || variant === InformationCtaVariants.TextLink)) {
8613
+ return 'var(--color-primary-black)';
8614
+ }
8615
+ if (variant === InformationCtaVariants.Primary) {
8616
+ return COLORS$4["default"];
8617
+ }
8618
+ return colorValue;
8613
8619
  };
8614
8620
  var getBackgroundColor$2 = function getBackgroundColor(variant, colorValue) {
8615
- return variant === InformationCtaVariants.Primary ? "background-color: " + colorValue + ";" : '';
8621
+ return variant === InformationCtaVariants.Primary || variant === undefined ? "background-color: " + colorValue + ";" : '';
8616
8622
  };
8617
8623
  var getBorderColor$1 = function getBorderColor(variant, colorValue) {
8618
- return variant === InformationCtaVariants.Primary || variant === InformationCtaVariants.Secondary ? "border-color: " + colorValue + ";" : '';
8624
+ return variant === InformationCtaVariants.Primary || variant === InformationCtaVariants.Secondary || variant === undefined ? "border-color: " + colorValue + ";" : '';
8619
8625
  };
8620
8626
 
8621
8627
  var _templateObject$Z, _templateObject2$K, _templateObject3$w, _templateObject4$r;
8622
8628
  var InfoWrapper$1 = /*#__PURE__*/styled__default(Grid)(_templateObject$Z || (_templateObject$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 60px 0;\n color: var(--information-panel-color);\n background-color: var(--information-panel-bg-color);\n\n @media ", " {\n padding: 40px 0;\n }\n"])), devices.mobile);
8623
8629
  var InfoTitle = /*#__PURE__*/styled__default('div')(_templateObject2$K || (_templateObject2$K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n * {\n margin-block: 0;\n }\n"])));
8624
8630
  var InfoCTAWrapper = /*#__PURE__*/styled__default('div')(_templateObject3$w || (_templateObject3$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n\n @media ", " {\n margin-top: 16px;\n }\n\n a {\n color: ", ";\n ", "\n ", "\n\n svg path {\n fill: ", ";\n }\n\n :hover:not(:active) {\n color: ", ";\n ", "\n ", "\n\n svg path {\n fill: ", ";\n }\n }\n\n :active {\n color: ", ";\n ", "\n ", "\n\n svg path {\n fill: ", ";\n }\n }\n }\n"])), devices.mobile, function (_ref) {
8625
- var variant = _ref.variant;
8626
- return getTextColor$4(variant, COLORS$4.background);
8631
+ var variant = _ref.variant,
8632
+ theme = _ref.theme;
8633
+ return getTextColor$4(variant, theme, COLORS$4.background);
8627
8634
  }, function (_ref2) {
8628
8635
  var variant = _ref2.variant;
8629
8636
  return getBackgroundColor$2(variant, COLORS$4.background);
@@ -8631,11 +8638,13 @@ var InfoCTAWrapper = /*#__PURE__*/styled__default('div')(_templateObject3$w || (
8631
8638
  var variant = _ref3.variant;
8632
8639
  return getBorderColor$1(variant, COLORS$4.background);
8633
8640
  }, function (_ref4) {
8634
- var variant = _ref4.variant;
8635
- return getTextColor$4(variant, COLORS$4.background);
8641
+ var variant = _ref4.variant,
8642
+ theme = _ref4.theme;
8643
+ return getTextColor$4(variant, theme, COLORS$4.background);
8636
8644
  }, function (_ref5) {
8637
- var variant = _ref5.variant;
8638
- return getTextColor$4(variant, COLORS$4.hover);
8645
+ var variant = _ref5.variant,
8646
+ theme = _ref5.theme;
8647
+ return getTextColor$4(variant, theme, COLORS$4.hover);
8639
8648
  }, function (_ref6) {
8640
8649
  var variant = _ref6.variant;
8641
8650
  return getBackgroundColor$2(variant, COLORS$4.hover);
@@ -8643,11 +8652,13 @@ var InfoCTAWrapper = /*#__PURE__*/styled__default('div')(_templateObject3$w || (
8643
8652
  var variant = _ref7.variant;
8644
8653
  return getBorderColor$1(variant, COLORS$4.hover);
8645
8654
  }, function (_ref8) {
8646
- var variant = _ref8.variant;
8647
- return getTextColor$4(variant, COLORS$4.hover);
8655
+ var variant = _ref8.variant,
8656
+ theme = _ref8.theme;
8657
+ return getTextColor$4(variant, theme, COLORS$4.hover);
8648
8658
  }, function (_ref9) {
8649
- var variant = _ref9.variant;
8650
- return getTextColor$4(variant, COLORS$4.pressed);
8659
+ var variant = _ref9.variant,
8660
+ theme = _ref9.theme;
8661
+ return getTextColor$4(variant, theme, COLORS$4.pressed);
8651
8662
  }, function (_ref10) {
8652
8663
  var variant = _ref10.variant;
8653
8664
  return getBackgroundColor$2(variant, COLORS$4.pressed);
@@ -8655,8 +8666,9 @@ var InfoCTAWrapper = /*#__PURE__*/styled__default('div')(_templateObject3$w || (
8655
8666
  var variant = _ref11.variant;
8656
8667
  return getBorderColor$1(variant, COLORS$4.pressed);
8657
8668
  }, function (_ref12) {
8658
- var variant = _ref12.variant;
8659
- return getTextColor$4(variant, COLORS$4.pressed);
8669
+ var variant = _ref12.variant,
8670
+ theme = _ref12.theme;
8671
+ return getTextColor$4(variant, theme, COLORS$4.pressed);
8660
8672
  });
8661
8673
  var InfoBodyWrapper = /*#__PURE__*/styled__default(BodyCopyHarmonic)(_templateObject4$r || (_templateObject4$r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: var(--information-panel-color);\n\n a {\n text-decoration: underline;\n color: var(--information-panel-color);\n }\n\n @media ", " {\n padding-top: 4px;\n }\n"])), devices.mobile);
8662
8674
 
@@ -8709,9 +8721,11 @@ var InfoCta = function InfoCta(_ref2) {
8709
8721
  iconName = _ref2.iconName,
8710
8722
  iconDirection = _ref2.iconDirection,
8711
8723
  _ref2$target = _ref2.target,
8712
- target = _ref2$target === void 0 ? LinkTarget.Self : _ref2$target;
8724
+ target = _ref2$target === void 0 ? LinkTarget.Self : _ref2$target,
8725
+ theme = _ref2.theme;
8713
8726
  return /*#__PURE__*/React__default.createElement(InfoCTAWrapper, {
8714
- variant: variant
8727
+ variant: variant,
8728
+ theme: theme
8715
8729
  }, renderButton({
8716
8730
  variant: variant,
8717
8731
  link: link,
@@ -8736,7 +8750,8 @@ var Information = function Information(_ref) {
8736
8750
  var body = _ref.body,
8737
8751
  title = _ref.title,
8738
8752
  cta = _ref.cta,
8739
- className = _ref.className;
8753
+ className = _ref.className,
8754
+ theme = _ref.theme;
8740
8755
  var safeTitle = title || {
8741
8756
  text: '',
8742
8757
  textSize: 'medium'
@@ -8774,7 +8789,8 @@ var Information = function Information(_ref) {
8774
8789
  text: cta.text,
8775
8790
  iconName: cta.iconName,
8776
8791
  iconDirection: cta.iconDirection,
8777
- target: cta.target
8792
+ target: cta.target,
8793
+ theme: theme
8778
8794
  })))));
8779
8795
  };
8780
8796
 
@@ -13255,6 +13271,13 @@ var GlobalStyles = /*#__PURE__*/styled.createGlobalStyle(_templateObject$1p || (
13255
13271
  return theme.footer.tablet.paddingBottom;
13256
13272
  }, devices.desktop, devices.largeDesktop);
13257
13273
 
13274
+ /* ~~~~~~~ new harmonic types ~~~~~~~ */
13275
+ var HarmonicSizes = {
13276
+ Small: 'small',
13277
+ Medium: 'medium',
13278
+ Large: 'large'
13279
+ };
13280
+
13258
13281
  exports.Accordion = Accordion;
13259
13282
  exports.Accordions = Accordions;
13260
13283
  exports.AltHeader = AltHeader;
@@ -13276,6 +13299,7 @@ exports.Footer = Footer;
13276
13299
  exports.GlobalStyles = GlobalStyles;
13277
13300
  exports.Grid = Grid;
13278
13301
  exports.GridItem = GridItem;
13302
+ exports.HarmonicSizes = HarmonicSizes;
13279
13303
  exports.HarmonicThemeProvider = HarmonicThemeProvider;
13280
13304
  exports.Header = Header;
13281
13305
  exports.HighlightsCarousel = HighlightsCarousel;