luna-one 1.0.227 → 1.0.231
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,62 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
+
import React, { Component } from "react";
|
|
3
8
|
import { Dropdown } from "terra-component-lib";
|
|
4
9
|
import checkForDangerouslySet from "../../utils/checkForDangerouslySet";
|
|
5
10
|
import "./MiniFeatDropdown.scss";
|
|
6
11
|
|
|
7
|
-
var MiniFeatDropdown = function
|
|
8
|
-
|
|
9
|
-
dropdowns = _ref.dropdowns;
|
|
12
|
+
var MiniFeatDropdown = /*#__PURE__*/function (_Component) {
|
|
13
|
+
_inherits(MiniFeatDropdown, _Component);
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dropdownState = _useState2[0],
|
|
14
|
-
setDropdownState = _useState2[1];
|
|
15
|
+
function MiniFeatDropdown() {
|
|
16
|
+
var _this;
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
setDropdownState({
|
|
18
|
-
name: selection
|
|
19
|
-
});
|
|
20
|
-
};
|
|
18
|
+
_classCallCheck(this, MiniFeatDropdown);
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(MiniFeatDropdown).call(this));
|
|
21
|
+
|
|
22
|
+
_this.handleDropdownSelect = function (selection, name) {
|
|
23
|
+
_this.setState(_defineProperty({}, name, selection));
|
|
24
|
+
|
|
25
|
+
_this.props.handleDropdownSelect(selection, name);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
_this.generateDropdowns = function () {
|
|
29
|
+
return _this.props.dropdowns.map(function (dropdown, index) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "mini-feat-dropdown__single-dropdown-wrapper",
|
|
32
|
+
key: "".concat(dropdown.name, "-").concat(index, "-dropdown")
|
|
33
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
34
|
+
className: "mini-feat-dropdown__dropdown-label"
|
|
35
|
+
}, dropdown.name), /*#__PURE__*/React.createElement(Dropdown, {
|
|
36
|
+
name: dropdown.name,
|
|
37
|
+
options: dropdown.options,
|
|
38
|
+
handleSelection: _this.handleDropdownSelect,
|
|
39
|
+
selection: _this.state[dropdown.name],
|
|
40
|
+
defaultText: dropdown.defaultText
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
_this.state = {};
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
_createClass(MiniFeatDropdown, [{
|
|
50
|
+
key: "render",
|
|
51
|
+
value: function render() {
|
|
52
|
+
var content = this.props.content;
|
|
24
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
className: "mini-feat-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}))
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, content.header), content && content.header && checkForDangerouslySet(content.header) && /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: "mini-feat-dropdown__header",
|
|
47
|
-
dangerouslySetInnerHTML: {
|
|
48
|
-
__html: content.header
|
|
49
|
-
}
|
|
50
|
-
}), content && content.text && !checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("p", {
|
|
51
|
-
className: "mini-feat-dropdown__text"
|
|
52
|
-
}, content.text), content && content.text && checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className: "mini-feat-dropdown__text",
|
|
54
|
-
dangerouslySetInnerHTML: {
|
|
55
|
-
__html: content.text
|
|
54
|
+
className: "mini-feat-dropdown"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: "mini-feat-dropdown__text-container"
|
|
57
|
+
}, content && content.header && !checkForDangerouslySet(content.header) && /*#__PURE__*/React.createElement("h3", {
|
|
58
|
+
className: "mini-feat-dropdown__header"
|
|
59
|
+
}, content.header), content && content.header && checkForDangerouslySet(content.header) && /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: "mini-feat-dropdown__header dangerously-set-content",
|
|
61
|
+
dangerouslySetInnerHTML: {
|
|
62
|
+
__html: content.header
|
|
63
|
+
}
|
|
64
|
+
}), content && content.text && !checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("p", {
|
|
65
|
+
className: "mini-feat-dropdown__text"
|
|
66
|
+
}, content.text), content && content.text && checkForDangerouslySet(content.text) && /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "mini-feat-dropdown__text dangerously-set-content",
|
|
68
|
+
dangerouslySetInnerHTML: {
|
|
69
|
+
__html: content.text
|
|
70
|
+
}
|
|
71
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: "mini-feat-dropdown__dropdown-container"
|
|
73
|
+
}, this.generateDropdowns()));
|
|
56
74
|
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
75
|
+
}]);
|
|
76
|
+
|
|
77
|
+
return MiniFeatDropdown;
|
|
78
|
+
}(Component);
|
|
61
79
|
|
|
62
80
|
export default MiniFeatDropdown;
|
|
@@ -24,7 +24,7 @@ var Feat2B = function Feat2B(_ref) {
|
|
|
24
24
|
className: "ter-feat-two-b ".concat(generateThemeClassName("ter-feat-two-b", theme), " "),
|
|
25
25
|
style: content.header || content.subHeader ? {
|
|
26
26
|
display: "grid",
|
|
27
|
-
gridTemplateRows: "
|
|
27
|
+
gridTemplateRows: "auto 1fr"
|
|
28
28
|
} : {
|
|
29
29
|
zIndex: zIndex + 1 || "auto"
|
|
30
30
|
}
|
|
@@ -91,16 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.ter-nav-mini-menu {
|
|
94
|
-
-webkit-box-align: center;
|
|
95
|
-
-ms-flex-align: center;
|
|
96
|
-
align-items: center;
|
|
97
|
-
display: -webkit-box;
|
|
98
|
-
display: -ms-flexbox;
|
|
99
|
-
display: flex;
|
|
100
94
|
height: 72px;
|
|
101
|
-
-webkit-box-pack: justify;
|
|
102
|
-
-ms-flex-pack: justify;
|
|
103
|
-
justify-content: space-between;
|
|
104
95
|
|
|
105
96
|
&:hover {
|
|
106
97
|
cursor: pointer;
|
|
@@ -123,7 +114,6 @@
|
|
|
123
114
|
&__text {
|
|
124
115
|
flex: 1;
|
|
125
116
|
position: relative;
|
|
126
|
-
bottom: 7px;
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
119
|
|