luna-one 1.0.241 → 1.0.243

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.
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+
3
+ /**
4
+ * Render a single Heading tag with specified level.
5
+ * If text is undefined or null, nothing is rendered.
6
+ */
7
+ var Heading = function Heading(_ref) {
8
+ var level = _ref.level,
9
+ className = _ref.className,
10
+ text = _ref.text;
11
+ return React.createElement("h".concat(level), {
12
+ className: className
13
+ }, text);
14
+ };
15
+ export default Heading;
@@ -5,8 +5,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
5
5
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
6
  import React, { Component } from "react";
7
7
  import { Dropdown, Checkbox } from "terra-component-lib";
8
+ import Heading from "../../components/Heading/Heading";
8
9
  import generateThemeClassName from "../../utils/generateThemeClassName";
9
- import generateStyles from "../../utils/generateStyles";
10
10
  import "./FilterHero.scss";
11
11
  import generateID from "../../utils/generateID";
12
12
  import { Fade } from "react-awesome-reveal";
@@ -81,9 +81,11 @@ var FilterHero = /*#__PURE__*/function (_Component) {
81
81
  id: generateID(id, header)
82
82
  }, /*#__PURE__*/React.createElement("div", {
83
83
  className: "ter-filter-hero__header-section"
84
- }, header && /*#__PURE__*/React.createElement("h3", {
85
- className: "ter-filter-hero__header"
86
- }, header), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
84
+ }, /*#__PURE__*/React.createElement(Heading, {
85
+ className: "ter-filter-hero__header",
86
+ level: 1,
87
+ text: header
88
+ }), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
87
89
  className: "ter-filter-hero__text"
88
90
  }, text), text && checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("div", {
89
91
  className: "ter-filter-hero__text-holder",
@@ -101,9 +103,11 @@ var FilterHero = /*#__PURE__*/function (_Component) {
101
103
  id: generateID(id, header)
102
104
  }, /*#__PURE__*/React.createElement("div", {
103
105
  className: "ter-filter-hero__header-section"
104
- }, header && /*#__PURE__*/React.createElement("h3", {
105
- className: "ter-filter-hero__header"
106
- }, header), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
106
+ }, header && /*#__PURE__*/React.createElement(Heading, {
107
+ className: "ter-filter-hero__header",
108
+ level: 1,
109
+ text: header
110
+ }), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
107
111
  className: "ter-filter-hero__text"
108
112
  }, text), text && checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("div", {
109
113
  className: "ter-filter-hero__text-holder",
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import React, { useState, useEffect } from "react";
3
3
  import "./Hero1.scss";
4
4
  import { CTASection } from "terra-component-lib";
5
+ import Heading from "../../components/Heading/Heading";
5
6
  import { windowSizes } from "../../utils/globalVariables";
6
7
  import generateThemeClassName from "../../utils/generateThemeClassName";
7
8
  import fpoSquare from "../../images/fpo-square.png";
@@ -15,7 +16,8 @@ var Hero1 = function Hero1(_ref) {
15
16
  contentSide = _ref.contentSide,
16
17
  theme = _ref.theme,
17
18
  id = _ref.id,
18
- motion = _ref.motion;
19
+ motion = _ref.motion,
20
+ level = _ref.level;
19
21
  var images = content.images,
20
22
  header = content.header,
21
23
  text = content.text,
@@ -62,9 +64,11 @@ var Hero1 = function Hero1(_ref) {
62
64
  transform: "translate(-48px, -".concat(contentHeight + 48, "px)"),
63
65
  float: "right"
64
66
  } : {}
65
- }, header && /*#__PURE__*/React.createElement("h2", {
66
- className: "ter-hero-one__header"
67
- }, header), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
67
+ }, header && /*#__PURE__*/React.createElement(Heading, {
68
+ className: "ter-hero-one__header",
69
+ level: level,
70
+ text: header
71
+ }), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
68
72
  className: "ter-hero-one__text"
69
73
  }, text), text && checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("div", {
70
74
  className: "ter-hero-one__text-holder",
@@ -82,12 +86,17 @@ var Hero1 = function Hero1(_ref) {
82
86
  transform: "translate(48px, -".concat(contentHeight + 48, "px)"),
83
87
  float: "left"
84
88
  } : {}
85
- }, header && /*#__PURE__*/React.createElement("h2", {
86
- className: "ter-hero-one__header"
87
- }, header), text && /*#__PURE__*/React.createElement("p", {
89
+ }, header && /*#__PURE__*/React.createElement(Heading, {
90
+ className: "ter-hero-one__header",
91
+ level: level,
92
+ text: header
93
+ }), text && /*#__PURE__*/React.createElement("p", {
88
94
  className: "ter-hero-one__text"
89
95
  }, text), _ctas && (_ctas.ctaOne && _ctas.ctaOne.url && _ctas.ctaOne.text || _ctas.ctaTwo && _ctas.ctaTwo.url && _ctas.ctaTwo.text) && /*#__PURE__*/React.createElement(CTASection, {
90
96
  ctas: _ctas
91
97
  })))));
92
98
  };
93
- export default Hero1;
99
+ export default Hero1;
100
+ Hero1.defaultProps = {
101
+ level: 2
102
+ };
@@ -1,12 +1,12 @@
1
1
  import React, { useRef, Suspense, lazy } from "react";
2
2
  import "./Hero2.scss";
3
3
  import { CTASection } from "terra-component-lib";
4
- import generateStyles from "../../utils/generateStyles";
5
4
  import generateThemeClassName from "../../utils/generateThemeClassName";
6
5
  import fpoSquare from "../../images/fpo-square.png";
7
6
  import generateID from "../../utils/generateID";
8
7
  import { removeSpaces } from "../../utils/removeSpaces";
9
8
  import { calcRatioPadding } from "../../utils/calcRatioPadding";
9
+ import Heading from "../../components/Heading/Heading";
10
10
  var HeroRatioWrapper = lazy(function () {
11
11
  return import("../HeroRatioWrapper/HeroRatioWrapper");
12
12
  });
@@ -15,7 +15,8 @@ var Hero2 = function Hero2(props) {
15
15
  content = _props$content === void 0 ? {} : _props$content,
16
16
  theme = props.theme,
17
17
  id = props.id,
18
- motion = props.motion;
18
+ motion = props.motion,
19
+ level = props.level;
19
20
  var wrapper = useRef(null);
20
21
  return /*#__PURE__*/React.createElement("section", {
21
22
  className: "ter-hero-2 ".concat(generateThemeClassName("ter-hero-2", theme)),
@@ -55,9 +56,11 @@ var Hero2 = function Hero2(props) {
55
56
  className: "ter-hero-2__card ter-card"
56
57
  }, /*#__PURE__*/React.createElement("div", {
57
58
  className: "ter-card__body"
58
- }, content && content.header && /*#__PURE__*/React.createElement("h1", {
59
- className: "ter-hero-2__header"
60
- }, content.header), content && content.subHeader && /*#__PURE__*/React.createElement("div", {
59
+ }, content && content.header && /*#__PURE__*/React.createElement(Heading, {
60
+ className: "ter-hero-2__header",
61
+ level: level,
62
+ text: content.header
63
+ }), content && content.subHeader && /*#__PURE__*/React.createElement("div", {
61
64
  className: "ter-hero-2__sub-header"
62
65
  }, content.subHeader), content.ctas && /*#__PURE__*/React.createElement("div", {
63
66
  className: "ter-hero-2__cta-section-wrapper"
@@ -65,4 +68,7 @@ var Hero2 = function Hero2(props) {
65
68
  ctas: content.ctas
66
69
  }))))));
67
70
  };
71
+ Hero2.defaultProps = {
72
+ level: 1
73
+ };
68
74
  export default Hero2;
@@ -14,6 +14,7 @@ import checkForDangerouslySet from "../../utils/checkForDangerouslySet";
14
14
  import { removeSpaces } from "../../utils/removeSpaces";
15
15
  import VidyardModal from "../../components/VidyardModal/VidyardModal";
16
16
  import { calcRatioPadding } from "../../utils/calcRatioPadding";
17
+ import Heading from "../../components/Heading/Heading";
17
18
  var HeroRatioWrapper = lazy(function () {
18
19
  return import("../HeroRatioWrapper/HeroRatioWrapper");
19
20
  });
@@ -23,7 +24,8 @@ var Hero3 = function Hero3(_ref) {
23
24
  id = _ref.id,
24
25
  motion = _ref.motion,
25
26
  zIndex = _ref.zIndex,
26
- videoSide = _ref.videoSide;
27
+ videoSide = _ref.videoSide,
28
+ level = _ref.level;
27
29
  var _useVideo = useVideo(false, false, false),
28
30
  hovering = _useVideo.hovering,
29
31
  modalDeployed = _useVideo.modalDeployed,
@@ -58,9 +60,11 @@ var Hero3 = function Hero3(_ref) {
58
60
  delay: motion ? 200 : 0,
59
61
  triggerOnce: true,
60
62
  className: "ter-hero-three__content-container"
61
- }, /*#__PURE__*/React.createElement("div", null, content && content.header && /*#__PURE__*/React.createElement("h2", {
62
- className: "ter-hero-three__header"
63
- }, content.header), content && content.text && !checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("p", {
63
+ }, /*#__PURE__*/React.createElement("div", null, content && content.header && /*#__PURE__*/React.createElement(Heading, {
64
+ className: "ter-hero-one__header",
65
+ level: level,
66
+ text: content.header
67
+ }), content && content.text && !checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("p", {
64
68
  className: "ter-hero-three__text"
65
69
  }, content.text), content && content.text && checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("div", {
66
70
  className: "ter-hero-three__text-holder",
@@ -143,4 +147,7 @@ var Hero3 = function Hero3(_ref) {
143
147
  video: content.video
144
148
  }))));
145
149
  };
146
- export default Hero3;
150
+ export default Hero3;
151
+ Hero3.defaultProps = {
152
+ level: 3
153
+ };
@@ -10,6 +10,7 @@ import { contentFadeDelay } from "./hero4Methods";
10
10
  import checkThemeForBrand from "../../utils/checkThemeForBrand";
11
11
  import { removeSpaces } from "../../utils/removeSpaces";
12
12
  import { calcRatioPadding } from "../../utils/calcRatioPadding";
13
+ import Heading from "../../components/Heading/Heading";
13
14
  var HeroRatioWrapper = lazy(function () {
14
15
  return import("../HeroRatioWrapper/HeroRatioWrapper");
15
16
  });
@@ -20,7 +21,8 @@ var Hero4 = function Hero4(_ref) {
20
21
  id = _ref.id,
21
22
  motion = _ref.motion,
22
23
  zIndex = _ref.zIndex,
23
- heroType = _ref.heroType;
24
+ heroType = _ref.heroType,
25
+ level = _ref.level;
24
26
  var image = content.image,
25
27
  header = content.header,
26
28
  subHeader = content.subHeader,
@@ -55,11 +57,15 @@ var Hero4 = function Hero4(_ref) {
55
57
  delay: motion ? contentFadeDelay(motion) : 0,
56
58
  triggerOnce: true,
57
59
  className: "ter-hero-four__content-container"
58
- }, /*#__PURE__*/React.createElement("aside", null, header && /*#__PURE__*/React.createElement("h3", {
59
- className: "ter-hero-four__header"
60
- }, header), subHeader && /*#__PURE__*/React.createElement("h4", {
61
- className: "ter-hero-four__sub-header"
62
- }, subHeader), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
60
+ }, /*#__PURE__*/React.createElement("aside", null, header && /*#__PURE__*/React.createElement(Heading, {
61
+ className: "ter-hero-four__header",
62
+ level: level,
63
+ text: header
64
+ }), subHeader && /*#__PURE__*/React.createElement(Heading, {
65
+ className: "ter-hero-four__sub-header",
66
+ level: level + 1,
67
+ text: subHeader
68
+ }), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
63
69
  className: "ter-hero-four__text"
64
70
  }, text), text && checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("div", {
65
71
  className: "ter-hero-four__text-holder",
@@ -70,4 +76,7 @@ var Hero4 = function Hero4(_ref) {
70
76
  ctas: checkThemeForBrand(theme, ctas, true)
71
77
  }))));
72
78
  };
73
- export default Hero4;
79
+ export default Hero4;
80
+ Hero4.defaultProps = {
81
+ level: 3
82
+ };
@@ -6,9 +6,9 @@ import generateThemeClassName from "../../utils/generateThemeClassName";
6
6
  import fpoSquare from "../../images/fpo-square.png";
7
7
  import generateID from "../../utils/generateID";
8
8
  import { Fade } from "react-awesome-reveal";
9
- import { generateImageStyleDesktop, generateImageStyleTablet } from "./Hero6Methods";
10
9
  import checkForDangerouslySet from "../../utils/checkForDangerouslySet";
11
10
  import { calcRatioPadding } from "../../utils/calcRatioPadding";
11
+ import Heading from "../../components/Heading/Heading";
12
12
  var HeroRatioWrapper = lazy(function () {
13
13
  return import("../HeroRatioWrapper/HeroRatioWrapper");
14
14
  });
@@ -19,7 +19,8 @@ var Hero6 = function Hero6(_ref) {
19
19
  imageSide = _ref$imageSide === void 0 ? "left" : _ref$imageSide,
20
20
  theme = _ref.theme,
21
21
  id = _ref.id,
22
- motion = _ref.motion;
22
+ motion = _ref.motion,
23
+ level = _ref.level;
23
24
  var header = content.header,
24
25
  text = content.text,
25
26
  ctas = content.ctas,
@@ -64,11 +65,15 @@ var Hero6 = function Hero6(_ref) {
64
65
  className: "ter-hero-6__container"
65
66
  }, /*#__PURE__*/React.createElement("aside", {
66
67
  className: "ter-hero-6__content"
67
- }, /*#__PURE__*/React.createElement("h2", {
68
- className: "ter-hero-6__header"
69
- }, header), /*#__PURE__*/React.createElement("h3", {
70
- className: "ter-hero-6__sub-header"
71
- }, subHeader), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
68
+ }, /*#__PURE__*/React.createElement(Heading, {
69
+ className: "ter-hero-6__header",
70
+ level: level,
71
+ text: header
72
+ }), /*#__PURE__*/React.createElement(Heading, {
73
+ className: "ter-hero-6__sub-header",
74
+ level: level + 1,
75
+ text: subHeader
76
+ }), text && !checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("p", {
72
77
  className: "ter-hero-6__text"
73
78
  }, text), text && checkForDangerouslySet(text) && /*#__PURE__*/React.createElement("div", {
74
79
  className: "ter-hero-6__text-holder",
@@ -79,4 +84,7 @@ var Hero6 = function Hero6(_ref) {
79
84
  ctas: checkThemeForBrand(theme, ctas)
80
85
  })))));
81
86
  };
82
- export default Hero6;
87
+ export default Hero6;
88
+ Hero6.defaultProps = {
89
+ level: 2
90
+ };
@@ -110,12 +110,9 @@
110
110
  }
111
111
  }
112
112
 
113
- &__link-container {
114
- }
115
-
116
113
  &__link {
117
- height: 16px;
118
- margin: 0 0 24px;
114
+ height: 48px;
115
+ margin: 0;
119
116
  padding: 0;
120
117
  display: block;
121
118
  width: 160px;
@@ -34,16 +34,19 @@ var NavBar = /*#__PURE__*/function (_Component) {
34
34
  searchField: ""
35
35
  });
36
36
  };
37
+ // Don't need
37
38
  _this.closeRegionLanguageDeployed = function () {
38
39
  _this.setState({
39
40
  regionLanguageDeployed: false
40
41
  });
41
42
  };
43
+ // Don't need
42
44
  _this.toggleRegionLanguageDeployed = function () {
43
45
  _this.setState({
44
46
  regionLanguageDeployed: !_this.state.regionLanguageDeployed
45
47
  });
46
48
  };
49
+ // Don't need
47
50
  _this.closeModal = function () {
48
51
  _this.closeRegionLanguageDeployed();
49
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luna-one",
3
- "version": "1.0.241",
3
+ "version": "1.0.243",
4
4
  "dependencies": {
5
5
  "@vidyard/embed-code": "^4.2.22",
6
6
  "node-sass": "^4.12.0",