luna-one 3.1.369 → 3.1.372
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.
|
@@ -19,8 +19,7 @@ require("./BlockListItems.scss");
|
|
|
19
19
|
|
|
20
20
|
var _checkForExternalLink = _interopRequireDefault(require("../../utils/checkForExternalLink"));
|
|
21
21
|
|
|
22
|
-
var
|
|
23
|
-
|
|
22
|
+
var firstRender = true;
|
|
24
23
|
var imageSizes = {
|
|
25
24
|
thumbnail: {
|
|
26
25
|
desktop: {
|
|
@@ -77,6 +76,8 @@ var imageSizes = {
|
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
var AppCards = function AppCards(_ref) {
|
|
79
|
+
var _BlockListItems$conte;
|
|
80
|
+
|
|
80
81
|
var content = _ref.content,
|
|
81
82
|
motion = _ref.motion;
|
|
82
83
|
var GatsbyImage = content === null || content === void 0 ? void 0 : content.GatsbyImage;
|
|
@@ -87,21 +88,28 @@ var AppCards = function AppCards(_ref) {
|
|
|
87
88
|
var isMobile = false;
|
|
88
89
|
var isPad = false;
|
|
89
90
|
|
|
90
|
-
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
91
|
-
size = _useWindowSize.size;
|
|
92
|
-
|
|
93
91
|
var _useState = (0, _react.useState)({
|
|
94
|
-
height: null
|
|
92
|
+
height: null,
|
|
93
|
+
width: null
|
|
95
94
|
}),
|
|
96
95
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
dimensions = _useState2[0],
|
|
97
|
+
setDimensions = _useState2[1];
|
|
98
|
+
|
|
99
|
+
if (typeof window !== "undefined" && firstRender) {
|
|
100
|
+
setDimensions({
|
|
101
|
+
height: window.innerHeight,
|
|
102
|
+
width: window.innerWidth
|
|
103
|
+
});
|
|
104
|
+
firstRender = false;
|
|
105
|
+
}
|
|
99
106
|
|
|
100
107
|
(0, _react.useEffect)(function () {
|
|
101
108
|
if (typeof window !== "undefined") {
|
|
102
109
|
var handleResize = function handleResize() {
|
|
103
|
-
|
|
104
|
-
height: window.innerHeight
|
|
110
|
+
setDimensions({
|
|
111
|
+
height: window.innerHeight,
|
|
112
|
+
width: window.innerWidth
|
|
105
113
|
});
|
|
106
114
|
};
|
|
107
115
|
|
|
@@ -114,14 +122,14 @@ var AppCards = function AppCards(_ref) {
|
|
|
114
122
|
}
|
|
115
123
|
});
|
|
116
124
|
|
|
117
|
-
if (
|
|
125
|
+
if (dimensions.width >= 1101) {
|
|
118
126
|
arraysNeeded = 3;
|
|
119
127
|
colClassName = "three-col";
|
|
120
|
-
} else if (
|
|
128
|
+
} else if (dimensions.width <= 1100 && dimensions.width >= 801) {
|
|
121
129
|
arraysNeeded = 2;
|
|
122
130
|
colClassName = "two-col";
|
|
123
131
|
isPad = true;
|
|
124
|
-
} else if (
|
|
132
|
+
} else if (dimensions.width <= 800) {
|
|
125
133
|
arraysNeeded = 1;
|
|
126
134
|
colClassName = "one-col";
|
|
127
135
|
isMobile = true;
|
|
@@ -153,6 +161,8 @@ var AppCards = function AppCards(_ref) {
|
|
|
153
161
|
text: card === null || card === void 0 ? void 0 : (_card$cardLink = card.cardLink) === null || _card$cardLink === void 0 ? void 0 : _card$cardLink.text,
|
|
154
162
|
GatsbyImage: GatsbyImage,
|
|
155
163
|
Link: Link,
|
|
164
|
+
viewLessText: card === null || card === void 0 ? void 0 : card.viewLessText,
|
|
165
|
+
viewMoreText: card === null || card === void 0 ? void 0 : card.viewMoreText,
|
|
156
166
|
cardAlignment: content === null || content === void 0 ? void 0 : content.cardAlignment,
|
|
157
167
|
imageSizes: imageSizes
|
|
158
168
|
};
|
|
@@ -177,11 +187,11 @@ var AppCards = function AppCards(_ref) {
|
|
|
177
187
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
188
|
className: "ter-app-cards__primitives",
|
|
179
189
|
style: {
|
|
180
|
-
height:
|
|
190
|
+
height: dimensions.height
|
|
181
191
|
}
|
|
182
192
|
}), /*#__PURE__*/_react.default.createElement("h3", {
|
|
183
193
|
className: "ter-app-cards__main-heading"
|
|
184
|
-
},
|
|
194
|
+
}, _terraOne.BlockListItems === null || _terraOne.BlockListItems === void 0 ? void 0 : (_BlockListItems$conte = _terraOne.BlockListItems.content) === null || _BlockListItems$conte === void 0 ? void 0 : _BlockListItems$conte.title), /*#__PURE__*/_react.default.createElement("section", {
|
|
185
195
|
className: "ter-app-cards"
|
|
186
196
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
187
197
|
className: colClassName
|
|
@@ -128,35 +128,74 @@
|
|
|
128
128
|
.ter-app-cards {
|
|
129
129
|
display: flex;
|
|
130
130
|
margin: 0 auto;
|
|
131
|
+
max-width: 1120px;
|
|
132
|
+
justify-content: space-between;
|
|
131
133
|
|
|
132
134
|
.three-col {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
margin: 0 auto;
|
|
136
|
+
max-width: 399px;
|
|
137
|
+
min-width: 340px;
|
|
135
138
|
width: 33%;
|
|
136
139
|
|
|
140
|
+
&:not(:first-child):not(:last-child) {
|
|
141
|
+
margin: 0 20px;
|
|
142
|
+
}
|
|
143
|
+
|
|
137
144
|
.ter-app-card {
|
|
138
145
|
margin-bottom: 41px;
|
|
146
|
+
|
|
147
|
+
&__link-holder {
|
|
148
|
+
width: unset;
|
|
149
|
+
}
|
|
139
150
|
}
|
|
140
151
|
}
|
|
152
|
+
|
|
141
153
|
.two-col {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
154
|
+
max-width: 399px;
|
|
155
|
+
min-width: 340px;
|
|
156
|
+
|
|
157
|
+
&:first-child {
|
|
158
|
+
margin-right: 10px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&:last-child {
|
|
162
|
+
margin-left: 10px;
|
|
163
|
+
}
|
|
145
164
|
|
|
146
165
|
.ter-app-card {
|
|
147
166
|
margin-bottom: 37px;
|
|
167
|
+
|
|
168
|
+
&__link-holder {
|
|
169
|
+
width: unset;
|
|
170
|
+
}
|
|
148
171
|
}
|
|
149
172
|
}
|
|
150
173
|
.one-col {
|
|
151
|
-
|
|
174
|
+
margin: 0 auto;
|
|
175
|
+
max-width: 340px;
|
|
152
176
|
width: 100%;
|
|
153
177
|
|
|
178
|
+
@media screen and (max-width: 800px) {
|
|
179
|
+
max-width: unset;
|
|
180
|
+
width: 100%;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media screen and (max-width: 375px) {
|
|
184
|
+
min-width: 296px;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
154
188
|
.ter-app-card {
|
|
155
189
|
margin: 0 auto 21px;
|
|
156
|
-
max-width: 399px;
|
|
157
190
|
|
|
158
|
-
|
|
159
|
-
|
|
191
|
+
&__link-holder {
|
|
192
|
+
width: unset;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media screen and (max-width: 375px) {
|
|
196
|
+
&__half-col__right {
|
|
197
|
+
right: 25px;
|
|
198
|
+
}
|
|
160
199
|
}
|
|
161
200
|
}
|
|
162
201
|
}
|
|
@@ -51,6 +51,8 @@ var Point = function Point(_ref) {
|
|
|
51
51
|
var header = _ref.header,
|
|
52
52
|
description = _ref.description,
|
|
53
53
|
icon = _ref.icon,
|
|
54
|
+
_ref$iconSize = _ref.iconSize,
|
|
55
|
+
iconSize = _ref$iconSize === void 0 ? '48px' : _ref$iconSize,
|
|
54
56
|
variant = _ref.variant,
|
|
55
57
|
index = _ref.index,
|
|
56
58
|
themes = _ref.themes;
|
|
@@ -58,7 +60,7 @@ var Point = function Point(_ref) {
|
|
|
58
60
|
className: "data-point__item data-point--".concat(variant, "__item data-point--").concat(variant, "__item--").concat(index, " ")
|
|
59
61
|
}, /*#__PURE__*/_react.default.createElement(_terraOne.Icon, {
|
|
60
62
|
type: icon === null || icon === void 0 ? void 0 : icon.type,
|
|
61
|
-
size: "
|
|
63
|
+
size: Number.isInteger(iconSize) ? "".concat(iconSize, "px") : iconSize,
|
|
62
64
|
color: (themes === null || themes === void 0 ? void 0 : themes.color) || "#26292E",
|
|
63
65
|
className: "data-point__icon "
|
|
64
66
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luna-one",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.372",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@storybook/addon-knobs": "^6.3.1",
|
|
6
6
|
"@testing-library/jest-dom": "^5.11.9",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-scroll": "^1.7.14",
|
|
25
25
|
"react-slidedown": "^2.4.5",
|
|
26
26
|
"smoothscroll-polyfill": "^0.4.4",
|
|
27
|
-
"terra-one": "^3.0.
|
|
27
|
+
"terra-one": "^3.0.125"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"node-sass": "^4.12.0",
|