@quintype/arrow 3.15.1-perf.4 → 3.15.1-perf.5
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.
- package/cjs/index.js +14589 -0
- package/package.json +1 -1
- package/atoms/Author/index.js +0 -170
- package/atoms/Author/styles.arrow.css +0 -1
- package/atoms/AuthorWithTime/index.js +0 -514
- package/atoms/AuthorWithTime/styles.arrow.css +0 -1
- package/atoms/CollectionName/index.js +0 -255
- package/atoms/CollectionName/styles.arrow.css +0 -1
- package/atoms/ExtendedLoadMore/index-0f809dd9.js +0 -254
- package/atoms/ExtendedLoadMore/index-142f015c.js +0 -476
- package/atoms/ExtendedLoadMore/index-37a9ccff.js +0 -182
- package/atoms/ExtendedLoadMore/index-446679c8.js +0 -191
- package/atoms/ExtendedLoadMore/index-44f97338.js +0 -300
- package/atoms/ExtendedLoadMore/index-57dd4870.js +0 -239
- package/atoms/ExtendedLoadMore/index-66dd4dbd.js +0 -215
- package/atoms/ExtendedLoadMore/index-8462c597.js +0 -363
- package/atoms/ExtendedLoadMore/index-93cb06d1.js +0 -1016
- package/atoms/ExtendedLoadMore/index-afd44863.js +0 -95
- package/atoms/ExtendedLoadMore/index-b5754c5d.js +0 -195
- package/atoms/ExtendedLoadMore/index-bbaf526e.js +0 -256
- package/atoms/ExtendedLoadMore/index-cfb262ef.js +0 -192
- package/atoms/ExtendedLoadMore/index.js +0 -20
- package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
- package/atoms/Headline/index.js +0 -379
- package/atoms/Headline/styles.arrow.css +0 -1
- package/atoms/HeroImage/index.js +0 -336
- package/atoms/HeroImage/styles.arrow.css +0 -1
- package/atoms/LoadmoreButton/index.js +0 -175
- package/atoms/LoadmoreButton/styles.arrow.css +0 -1
- package/atoms/ScrollSnap/index.js +0 -379
- package/atoms/ScrollSnap/styles.arrow.css +0 -1
- package/atoms/SectionTag/index.js +0 -140
- package/atoms/SectionTag/styles.arrow.css +0 -1
- package/atoms/Subheadline/index.js +0 -120
- package/atoms/Subheadline/styles.arrow.css +0 -1
- package/atoms/TimeStamp/index.js +0 -221
- package/atoms/TimeStamp/styles.arrow.css +0 -1
- package/molecules/KeyEvents/index.js +0 -457
- package/molecules/KeyEvents/styles.arrow.css +0 -1
- package/molecules/PageIntroductionCard/index.js +0 -248
- package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
- package/molecules/SocialShareTemplate/index.js +0 -506
- package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
- package/molecules/StoryCard/index.js +0 -1430
- package/molecules/StoryCard/styles.arrow.css +0 -1
- package/molecules/StoryElementCard/index.js +0 -3091
- package/molecules/StoryElementCard/styles.arrow.css +0 -1
- package/molecules/StorycardContent/index.js +0 -976
- package/molecules/StorycardContent/styles.arrow.css +0 -1
- package/rows/AlternateCollectionFilter/index.js +0 -2189
- package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
- package/rows/AsideCollection/index.js +0 -2135
- package/rows/AsideCollection/styles.arrow.css +0 -1
- package/rows/AstrologyCollection/index.js +0 -2106
- package/rows/AstrologyCollection/styles.arrow.css +0 -1
- package/rows/AuthorIntroductionCard/index.js +0 -813
- package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/rows/AuthorsList/index.js +0 -996
- package/rows/AuthorsList/styles.arrow.css +0 -1
- package/rows/CollectionFilter/index.js +0 -2279
- package/rows/CollectionFilter/styles.arrow.css +0 -1
- package/rows/ElevenStories/index.js +0 -2118
- package/rows/ElevenStories/styles.arrow.css +0 -1
- package/rows/FourColFiveStories/index.js +0 -1861
- package/rows/FourColFiveStories/styles.arrow.css +0 -1
- package/rows/FourColGrid/index.js +0 -2083
- package/rows/FourColGrid/styles.arrow.css +0 -1
- package/rows/FourColPortraitStories/index.js +0 -2116
- package/rows/FourColPortraitStories/styles.arrow.css +0 -1
- package/rows/FourColSixteenStories/index.js +0 -1849
- package/rows/FourColSixteenStories/styles.arrow.css +0 -1
- package/rows/FourColTwelveStories/index.js +0 -1822
- package/rows/FourColTwelveStories/styles.arrow.css +0 -1
- package/rows/FourStorySlider/index.js +0 -2223
- package/rows/FourStorySlider/styles.arrow.css +0 -1
- package/rows/FourStorySliderPortrait/index.js +0 -2226
- package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
- package/rows/FourTabbedBigStorySlider/index.js +0 -1985
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
- package/rows/FullScreenSlider/index.js +0 -2141
- package/rows/FullScreenSlider/styles.arrow.css +0 -1
- package/rows/HalfScreenSlider/index.js +0 -1994
- package/rows/HalfScreenSlider/styles.arrow.css +0 -1
- package/rows/ListComponent/index.js +0 -1942
- package/rows/ListComponent/styles.arrow.css +0 -1
- package/rows/Listicles/index.js +0 -945
- package/rows/Listicles/styles.arrow.css +0 -1
- package/rows/MagazineEditions/index.js +0 -690
- package/rows/MagazineEditions/styles.arrow.css +0 -1
- package/rows/MagazineHeaderCard/index.js +0 -684
- package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
- package/rows/MagazineWidget/index.js +0 -1994
- package/rows/MagazineWidget/styles.arrow.css +0 -1
- package/rows/OneColStoryList/index.js +0 -2169
- package/rows/OneColStoryList/styles.arrow.css +0 -1
- package/rows/OpinionCollection/index.js +0 -1545
- package/rows/OpinionCollection/styles.arrow.css +0 -1
- package/rows/SixColSixStories/index.js +0 -2014
- package/rows/SixColSixStories/styles.arrow.css +0 -1
- package/rows/StoryCollection/index.js +0 -2135
- package/rows/StoryCollection/styles.arrow.css +0 -1
- package/rows/TagIntroductionCard/index.js +0 -103
- package/rows/TagIntroductionCard/styles.arrow.css +0 -1
- package/rows/ThreeColFlexStories/index.js +0 -2074
- package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
- package/rows/ThreeColFourteenStories/index.js +0 -1770
- package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/rows/ThreeColGrid/index.js +0 -2104
- package/rows/ThreeColGrid/styles.arrow.css +0 -1
- package/rows/ThreeColSevenStory/index.js +0 -1982
- package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
- package/rows/ThreeColSixStories/index.js +0 -1965
- package/rows/ThreeColSixStories/styles.arrow.css +0 -1
- package/rows/ThreeColTwelveStories/index.js +0 -1854
- package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStories/index.js +0 -1943
- package/rows/TwoColFourStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStoryHighlight/index.js +0 -1930
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
- package/rows/TwoColSevenStories/index.js +0 -1970
- package/rows/TwoColSevenStories/styles.arrow.css +0 -1
- package/rows/TwoColSixStories/index.js +0 -1963
- package/rows/TwoColSixStories/styles.arrow.css +0 -1
- package/rows/TwoColTenStoriesSidebar/index.js +0 -2029
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
- package/rows/TwoColThreeStories/index.js +0 -1916
- package/rows/TwoColThreeStories/styles.arrow.css +0 -1
- package/story-elements/AlsoRead/index.js +0 -320
- package/story-elements/AlsoRead/styles.arrow.css +0 -1
- package/story-elements/Attachment/index.js +0 -167
- package/story-elements/Attachment/styles.arrow.css +0 -1
- package/story-elements/BigFact/index.js +0 -137
- package/story-elements/BigFact/styles.arrow.css +0 -1
- package/story-elements/BlockQuote/index.js +0 -304
- package/story-elements/BlockQuote/styles.arrow.css +0 -1
- package/story-elements/Blurb/index.js +0 -189
- package/story-elements/Blurb/styles.arrow.css +0 -1
- package/story-elements/Image/index.js +0 -529
- package/story-elements/Image/styles.arrow.css +0 -1
- package/story-elements/ImageGallery/index.js +0 -462
- package/story-elements/ImageGallery/styles.arrow.css +0 -1
- package/story-elements/ImageSlideshow/index.js +0 -773
- package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
- package/story-elements/QuestionAnswer/index.js +0 -267
- package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
- package/story-elements/Quote/index.js +0 -166
- package/story-elements/Quote/styles.arrow.css +0 -1
- package/story-elements/Reference/index.js +0 -160
- package/story-elements/Reference/styles.arrow.css +0 -1
- package/story-elements/StoryElement/index.js +0 -75
- package/story-elements/Summary/index.js +0 -190
- package/story-elements/Summary/styles.arrow.css +0 -1
- package/story-elements/Text/index.js +0 -165
- package/story-elements/Text/styles.arrow.css +0 -1
- package/story-elements/Video/index.js +0 -81
- package/story-elements/Video/styles.arrow.css +0 -1
- package/story-templates/ListicleStoryTemplate/index.js +0 -5586
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +0 -5762
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/PhotoStoryTemplate/index.js +0 -5564
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/TextStoryTemplate/index.js +0 -5637
- package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/VideoStoryTemplate/index.js +0 -5496
- package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var reactRedux = require('react-redux');
|
|
8
|
-
var PropTypes = require('prop-types');
|
|
9
|
-
var components = require('@quintype/components');
|
|
10
|
-
var lodash = require('lodash');
|
|
11
|
-
require('@babel/runtime/helpers/asyncToGenerator');
|
|
12
|
-
require('@babel/runtime/helpers/typeof');
|
|
13
|
-
require('@babel/runtime/regenerator');
|
|
14
|
-
require('react-timeago');
|
|
15
|
-
require('date-fns-tz');
|
|
16
|
-
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
|
|
23
|
-
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
24
|
-
var useStateValue = function useStateValue() {
|
|
25
|
-
return React.useContext(StateContext);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
var hexToRGB = function hexToRGB(hex) {
|
|
29
|
-
var r = parseInt(hex.slice(1, 3), 16);
|
|
30
|
-
var g = parseInt(hex.slice(3, 5), 16);
|
|
31
|
-
var b = parseInt(hex.slice(5, 7), 16);
|
|
32
|
-
return {
|
|
33
|
-
r: r,
|
|
34
|
-
g: g,
|
|
35
|
-
b: b
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
var getLuminanceOfColor = function getLuminanceOfColor(hex) {
|
|
39
|
-
var _hexToRGB = hexToRGB(hex),
|
|
40
|
-
r = _hexToRGB.r,
|
|
41
|
-
g = _hexToRGB.g,
|
|
42
|
-
b = _hexToRGB.b;
|
|
43
|
-
|
|
44
|
-
return r * 0.299 + g * 0.587 + b * 0.114;
|
|
45
|
-
};
|
|
46
|
-
var rgbToHex = function rgbToHex() {
|
|
47
|
-
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
|
|
48
|
-
var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
|
|
49
|
-
return rgba && rgba.length === 4 ? "#" + ("0" + parseInt(rgba[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[3], 10).toString(16)).slice(-2) : color;
|
|
50
|
-
};
|
|
51
|
-
var clientWidths = {
|
|
52
|
-
mobile: 767,
|
|
53
|
-
tablet: 1024
|
|
54
|
-
};
|
|
55
|
-
var clientWidth = function clientWidth(device) {
|
|
56
|
-
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
57
|
-
|
|
58
|
-
if (foundDeviceWidth) {
|
|
59
|
-
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return false;
|
|
63
|
-
};
|
|
64
|
-
var getTextColor = function getTextColor() {
|
|
65
|
-
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
|
|
66
|
-
var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
|
|
67
|
-
var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
|
|
68
|
-
var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
|
|
69
|
-
return textColor;
|
|
70
|
-
};
|
|
71
|
-
var getSlug = function getSlug(collection) {
|
|
72
|
-
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
73
|
-
var _config$magazineSlug = config.magazineSlug,
|
|
74
|
-
magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
|
|
75
|
-
_config$isArchivePage = config.isArchivePage,
|
|
76
|
-
isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
|
|
77
|
-
|
|
78
|
-
if (isArchivePage) {
|
|
79
|
-
return "/magazine/archive/".concat(magazineSlug);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (magazineSlug) {
|
|
83
|
-
return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
var isSection = collection.template === "section";
|
|
87
|
-
|
|
88
|
-
if (isSection) {
|
|
89
|
-
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
90
|
-
var sections = config.sections;
|
|
91
|
-
var section = sections && sections.find(function (section) {
|
|
92
|
-
return section.id === sectionId;
|
|
93
|
-
});
|
|
94
|
-
return section ? section["section-url"] : "/";
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return "/collection/".concat(collection.slug);
|
|
98
|
-
};
|
|
99
|
-
PropTypes__default["default"].shape({
|
|
100
|
-
"sketches-host": PropTypes__default["default"].string,
|
|
101
|
-
"cdn-name": PropTypes__default["default"].string,
|
|
102
|
-
"cdn-image": PropTypes__default["default"].string
|
|
103
|
-
});
|
|
104
|
-
PropTypes__default["default"].shape({
|
|
105
|
-
headline: PropTypes__default["default"].string,
|
|
106
|
-
"last-published-at": PropTypes__default["default"].number,
|
|
107
|
-
subheadline: PropTypes__default["default"].string
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
var _styleModuleImportMap = {
|
|
111
|
-
"./collection-name.m.css": {
|
|
112
|
-
"collection": "collection-name-m_collection__JD6sx",
|
|
113
|
-
"collection-borderLeft": "collection-name-m_collection-borderLeft__3Dznk",
|
|
114
|
-
"border-left": "collection-name-m_border-left__3_pYw",
|
|
115
|
-
"collection-borderBottomFull": "collection-name-m_collection-borderBottomFull__Dkq3K",
|
|
116
|
-
"collection-borderBottom": "collection-name-m_collection-borderBottom__2rdQM",
|
|
117
|
-
"collection-crossLine": "collection-name-m_collection-crossLine__1sIpN",
|
|
118
|
-
"border-bottom": "collection-name-m_border-bottom__1MnlV",
|
|
119
|
-
"dark": "collection-name-m_dark__nMe5H",
|
|
120
|
-
"light": "collection-name-m_light__1vFDN"
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
124
|
-
var _ref$collectionNameBo = _ref.collectionNameBorderColor,
|
|
125
|
-
collectionNameBorderColor = _ref$collectionNameBo === void 0 ? "" : _ref$collectionNameBo,
|
|
126
|
-
collection = _ref.collection,
|
|
127
|
-
config = _ref.config,
|
|
128
|
-
collectionNameTemplate = _ref.collectionNameTemplate,
|
|
129
|
-
headerLevel = _ref.headerLevel,
|
|
130
|
-
_ref$customCollection = _ref.customCollectionName,
|
|
131
|
-
customCollectionName = _ref$customCollection === void 0 ? "" : _ref$customCollection,
|
|
132
|
-
_ref$navigate = _ref.navigate,
|
|
133
|
-
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
134
|
-
var collectionTitle = useStateValue() || {};
|
|
135
|
-
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
136
|
-
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
137
|
-
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
138
|
-
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
139
|
-
var collectionName = customCollectionName || collection.name || "";
|
|
140
|
-
var textColor = getTextColor(collectionTitle.theme);
|
|
141
|
-
var HeaderTag = "h" + headerLevel;
|
|
142
|
-
var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
|
|
143
|
-
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
144
|
-
|
|
145
|
-
var borderBottomStyle = function borderBottomStyle() {
|
|
146
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
147
|
-
className: "collection-name-m_border-bottom__1MnlV",
|
|
148
|
-
style: {
|
|
149
|
-
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
150
|
-
}
|
|
151
|
-
}) : "";
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
var isMobile = clientWidth("mobile");
|
|
155
|
-
|
|
156
|
-
var getBorderHeight = function getBorderHeight() {
|
|
157
|
-
if (isMobile) {
|
|
158
|
-
switch (headerLevel) {
|
|
159
|
-
case "1":
|
|
160
|
-
return "32px";
|
|
161
|
-
|
|
162
|
-
case "2":
|
|
163
|
-
return "24px";
|
|
164
|
-
|
|
165
|
-
case "3":
|
|
166
|
-
return "20px";
|
|
167
|
-
|
|
168
|
-
case "4":
|
|
169
|
-
return "18px";
|
|
170
|
-
|
|
171
|
-
case "5":
|
|
172
|
-
return "16px";
|
|
173
|
-
|
|
174
|
-
case "6":
|
|
175
|
-
return "16px";
|
|
176
|
-
|
|
177
|
-
default:
|
|
178
|
-
return "20px";
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
switch (headerLevel) {
|
|
183
|
-
case "1":
|
|
184
|
-
return "40px";
|
|
185
|
-
|
|
186
|
-
case "2":
|
|
187
|
-
return "32px";
|
|
188
|
-
|
|
189
|
-
case "3":
|
|
190
|
-
return "24px";
|
|
191
|
-
|
|
192
|
-
case "4":
|
|
193
|
-
return "20px";
|
|
194
|
-
|
|
195
|
-
case "5":
|
|
196
|
-
return "18px";
|
|
197
|
-
|
|
198
|
-
case "6":
|
|
199
|
-
return "16px";
|
|
200
|
-
|
|
201
|
-
default:
|
|
202
|
-
return "24px";
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
207
|
-
style: {
|
|
208
|
-
borderBottom: borderBottomFullStyle
|
|
209
|
-
},
|
|
210
|
-
"data-test-id": "collection-name",
|
|
211
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap)
|
|
212
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
213
|
-
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
214
|
-
style: {
|
|
215
|
-
color: CollectionNameBorderColor,
|
|
216
|
-
fontSize: getBorderHeight()
|
|
217
|
-
}
|
|
218
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
219
|
-
href: slug,
|
|
220
|
-
"aria-label": "collection-name"
|
|
221
|
-
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
222
|
-
};
|
|
223
|
-
CollectionNameBase.propTypes = {
|
|
224
|
-
/** Collection name border color */
|
|
225
|
-
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
226
|
-
|
|
227
|
-
/** The Collection Object from the API response */
|
|
228
|
-
collection: PropTypes.PropTypes.object,
|
|
229
|
-
|
|
230
|
-
/** The publisher config from the API response */
|
|
231
|
-
config: PropTypes.PropTypes.object,
|
|
232
|
-
|
|
233
|
-
/** The style template for the component */
|
|
234
|
-
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
235
|
-
|
|
236
|
-
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
237
|
-
headerLevel: PropTypes.PropTypes.string,
|
|
238
|
-
customCollectionName: PropTypes.PropTypes.string,
|
|
239
|
-
navigate: PropTypes.PropTypes.bool
|
|
240
|
-
};
|
|
241
|
-
CollectionNameBase.defaultProps = {
|
|
242
|
-
collectionNameTemplate: "",
|
|
243
|
-
headerLevel: "3"
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
function mapStateToProps(state) {
|
|
247
|
-
return {
|
|
248
|
-
config: lodash.get(state, ["qt", "config"], {})
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
253
|
-
|
|
254
|
-
exports.CollectionName = CollectionName;
|
|
255
|
-
exports.CollectionNameBase = CollectionNameBase;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.collection-name-m_collection__2xOPW{font-size:var(--arrow-fs-m);font-weight:var(--arrow-fw-bold);margin-bottom:var(--arrow-spacing-m)}@media (min-width:768px){.collection-name-m_collection__2xOPW{font-size:var(--arrow-fs-l);margin-bottom:var(--arrow-spacing-l)}}.collection-name-m_collection-borderLeft__sm2OQ{align-items:baseline;display:flex}.collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr{margin-right:var(--arrow-spacing-xs);min-width:5px;overflow:hidden;width:5px}.collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr:before{content:"I";font-family:var(--arrow-sans-serif)}.collection-name-m_collection-borderBottomFull__8-REi{display:inline-block}.collection-name-m_collection-borderBottom__QM0lv{display:block}.collection-name-m_collection-crossLine__gO4l0{align-items:center;display:flex}.collection-name-m_collection-crossLine__gO4l0:before{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-right:var(--arrow-spacing-l);position:relative}.collection-name-m_collection-crossLine__gO4l0:after{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-left:var(--arrow-spacing-l);position:relative}html[dir=rtl] .collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr{margin-left:var(--arrow-spacing-xs);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__gO4l0:before{margin-left:var(--arrow-spacing-l);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__gO4l0:after{margin-left:0;margin-right:var(--arrow-spacing-l)}.collection-name-m_border-bottom__i9Gqk{height:4px;margin-top:var(--arrow-spacing-xxs);width:20px}.collection-name-m_collection-crossLine__gO4l0 .collection-name-m_border-bottom__i9Gqk{visibility:hidden}.collection-name-m_dark__VlJO3 a,.collection-name-m_dark__VlJO3 h2,.collection-name-m_dark__VlJO3 h3,.collection-name-m_dark__VlJO3 h5{color:var(--arrow-c-mono2)}.collection-name-m_light__xsoWS a,.collection-name-m_light__xsoWS h2,.collection-name-m_light__xsoWS h3,.collection-name-m_light__xsoWS h5{color:var(--arrow-c-invert-mono2)}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var index = require('./index-93cb06d1.js');
|
|
6
|
-
var PropTypes = require('prop-types');
|
|
7
|
-
var lodash = require('lodash');
|
|
8
|
-
var index$1 = require('./index-142f015c.js');
|
|
9
|
-
var index$2 = require('./index-8462c597.js');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
-
|
|
17
|
-
var _styleModuleImportMap$1 = {
|
|
18
|
-
"./subheadline.m.css": {
|
|
19
|
-
"subheadline": "subheadline-m_subheadline__3fd7z",
|
|
20
|
-
"dark": "subheadline-m_dark__28u00",
|
|
21
|
-
"light": "subheadline-m_light__2YUOe"
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var Subheadline = function Subheadline(_ref) {
|
|
25
|
-
var story = _ref.story,
|
|
26
|
-
_ref$truncateChars = _ref.truncateChars,
|
|
27
|
-
truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
|
|
28
|
-
lineClamp = _ref.lineClamp,
|
|
29
|
-
_ref$clazzName = _ref.clazzName,
|
|
30
|
-
clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
|
|
31
|
-
forceShowAtom = _ref.forceShowAtom,
|
|
32
|
-
showFullContent = _ref.showFullContent;
|
|
33
|
-
var config = index.useStateValue() || {};
|
|
34
|
-
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
35
|
-
if (!subheadline) return null;
|
|
36
|
-
var textColor = index$1.getTextColor(config.theme);
|
|
37
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
38
|
-
style: {
|
|
39
|
-
WebkitLineClamp: lineClamp
|
|
40
|
-
},
|
|
41
|
-
"data-test-id": "subheadline",
|
|
42
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$1)
|
|
43
|
-
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : index$1.truncate(story.subheadline, truncateChars, true));
|
|
44
|
-
};
|
|
45
|
-
Subheadline.propTypes = {
|
|
46
|
-
/** The Story Object from the API response */
|
|
47
|
-
story: PropTypes__default["default"].object.isRequired,
|
|
48
|
-
// Restricts the number of lines for subheadline.
|
|
49
|
-
lineClamp: PropTypes__default["default"].number,
|
|
50
|
-
|
|
51
|
-
/** Number of characters to truncate the subheadline */
|
|
52
|
-
truncateChars: PropTypes__default["default"].number,
|
|
53
|
-
clazzName: PropTypes__default["default"].string,
|
|
54
|
-
forceShowAtom: PropTypes__default["default"].bool,
|
|
55
|
-
showFullContent: PropTypes__default["default"].bool
|
|
56
|
-
};
|
|
57
|
-
Subheadline.defaultProps = {
|
|
58
|
-
forceShowAtom: false,
|
|
59
|
-
showFullContent: false
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var _styleModuleImportMap = {
|
|
63
|
-
"./storycard.m.css": {
|
|
64
|
-
"author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
|
|
65
|
-
"default-card": "storycard-m_default-card__1-POn",
|
|
66
|
-
"horizontal-card": "storycard-m_horizontal-card___7afz",
|
|
67
|
-
"backgroung-img": "storycard-m_backgroung-img__1FMJT",
|
|
68
|
-
"content-overlap": "storycard-m_content-overlap__1yNHR",
|
|
69
|
-
"border-full": "storycard-m_border-full__1nhy7",
|
|
70
|
-
"light": "storycard-m_light__3EhXN",
|
|
71
|
-
"dark": "storycard-m_dark__2wCTq",
|
|
72
|
-
"border-bottom": "storycard-m_border-bottom__2_E-I",
|
|
73
|
-
"border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
|
|
74
|
-
"center-align": "storycard-m_center-align__1Sn8-",
|
|
75
|
-
"content-bottom": "storycard-m_content-bottom__1QHeC",
|
|
76
|
-
"content-full": "storycard-m_content-full__2zJmU",
|
|
77
|
-
"content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
|
|
78
|
-
"hero-image": "storycard-m_hero-image__1H3MB",
|
|
79
|
-
"right-padding": "storycard-m_right-padding__12-lQ",
|
|
80
|
-
"horizontal-mob": "storycard-m_horizontal-mob__17JG2",
|
|
81
|
-
"content": "storycard-m_content__1Q9vq",
|
|
82
|
-
"border-default": "storycard-m_border-default__PEZ1x",
|
|
83
|
-
"card": "storycard-m_card__KJwRa",
|
|
84
|
-
"horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
var StoryCard = function StoryCard(_ref) {
|
|
88
|
-
var story = _ref.story,
|
|
89
|
-
children = _ref.children,
|
|
90
|
-
isHorizontal = _ref.isHorizontal,
|
|
91
|
-
aspectRatio = _ref.aspectRatio,
|
|
92
|
-
border = _ref.border,
|
|
93
|
-
useImageAsBackground = _ref.useImageAsBackground,
|
|
94
|
-
bgImgContentOverlap = _ref.bgImgContentOverlap,
|
|
95
|
-
theme = _ref.theme,
|
|
96
|
-
borderColor = _ref.borderColor,
|
|
97
|
-
isHorizontalMobile = _ref.isHorizontalMobile,
|
|
98
|
-
centerAlign = _ref.centerAlign,
|
|
99
|
-
headerLevel = _ref.headerLevel,
|
|
100
|
-
hideAuthorImage = _ref.hideAuthorImage,
|
|
101
|
-
prefix = _ref.prefix,
|
|
102
|
-
config = _ref.config,
|
|
103
|
-
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
104
|
-
if (!story || index$1.isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
105
|
-
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
106
|
-
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
107
|
-
|
|
108
|
-
var horizontalCardStyle = "default-card";
|
|
109
|
-
if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
|
|
110
|
-
var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
|
|
111
|
-
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
112
|
-
var textColor = index$1.getTextColor(theme);
|
|
113
|
-
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
114
|
-
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
115
|
-
story: story,
|
|
116
|
-
aspectRatio: aspectRatio,
|
|
117
|
-
border: border,
|
|
118
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
119
|
-
isHorizontal: isHorizontal,
|
|
120
|
-
centerAlign: centerAlign,
|
|
121
|
-
headerLevel: headerLevel,
|
|
122
|
-
borderColor: borderColor,
|
|
123
|
-
hideAuthorImage: hideAuthorImage,
|
|
124
|
-
prefix: prefix,
|
|
125
|
-
config: config,
|
|
126
|
-
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
127
|
-
});
|
|
128
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
129
|
-
"data-test-id": "story-card",
|
|
130
|
-
style: {
|
|
131
|
-
backgroundColor: theme,
|
|
132
|
-
color: textColor
|
|
133
|
-
},
|
|
134
|
-
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
135
|
-
}, children || defaultStorycard);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
139
|
-
var story = _ref2.story;
|
|
140
|
-
_ref2.border;
|
|
141
|
-
var isHorizontal = _ref2.isHorizontal,
|
|
142
|
-
aspectRatio = _ref2.aspectRatio,
|
|
143
|
-
headerLevel = _ref2.headerLevel,
|
|
144
|
-
_ref2$isHorizontalMob = _ref2.isHorizontalMobile,
|
|
145
|
-
isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
|
|
146
|
-
_ref2$centerAlign = _ref2.centerAlign,
|
|
147
|
-
centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
|
|
148
|
-
borderColor = _ref2.borderColor,
|
|
149
|
-
hideAuthorImage = _ref2.hideAuthorImage,
|
|
150
|
-
prefix = _ref2.prefix,
|
|
151
|
-
isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
|
|
152
|
-
config = _ref2.config;
|
|
153
|
-
var alignment = centerAlign ? "center-align" : "";
|
|
154
|
-
var SectionTagborderColor = index$1.rgbToHex(borderColor);
|
|
155
|
-
var _config$localizationC = config.localizationConfig,
|
|
156
|
-
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
157
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
158
|
-
config: config,
|
|
159
|
-
story: story,
|
|
160
|
-
isHorizontal: true,
|
|
161
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
162
|
-
aspectRatio: aspectRatio
|
|
163
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
164
|
-
config: config,
|
|
165
|
-
story: story,
|
|
166
|
-
isHorizontalWithImageLast: true,
|
|
167
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
168
|
-
aspectRatio: aspectRatio
|
|
169
|
-
}) : /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
170
|
-
story: story,
|
|
171
|
-
config: config,
|
|
172
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
173
|
-
aspectRatio: aspectRatio
|
|
174
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
175
|
-
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap)
|
|
176
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$2.SectionTag, {
|
|
177
|
-
story: story,
|
|
178
|
-
borderColor: SectionTagborderColor
|
|
179
|
-
}), /*#__PURE__*/React__default["default"].createElement(index.Headline, {
|
|
180
|
-
story: story,
|
|
181
|
-
headerLevel: headerLevel,
|
|
182
|
-
premiumStoryIconConfig: config
|
|
183
|
-
}), /*#__PURE__*/React__default["default"].createElement(index.AuthorWithTime, {
|
|
184
|
-
config: localizationConfig,
|
|
185
|
-
story: story,
|
|
186
|
-
isBottom: true,
|
|
187
|
-
prefix: prefix,
|
|
188
|
-
hideAuthorImage: hideAuthorImage
|
|
189
|
-
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
190
|
-
story: story
|
|
191
|
-
})));
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
DefaultStoryCard.propTypes = {
|
|
195
|
-
story: PropTypes__default["default"].object.isRequired,
|
|
196
|
-
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
197
|
-
isBottom: PropTypes__default["default"].bool,
|
|
198
|
-
isHorizontal: PropTypes__default["default"].bool,
|
|
199
|
-
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
200
|
-
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
201
|
-
centerAlign: PropTypes__default["default"].bool,
|
|
202
|
-
headerLevel: PropTypes__default["default"].string,
|
|
203
|
-
borderColor: PropTypes__default["default"].string,
|
|
204
|
-
hideAuthorImage: PropTypes__default["default"].bool,
|
|
205
|
-
prefix: PropTypes__default["default"].string,
|
|
206
|
-
config: PropTypes__default["default"].object,
|
|
207
|
-
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
208
|
-
};
|
|
209
|
-
StoryCard.propTypes = {
|
|
210
|
-
/** The Story Object from the API response */
|
|
211
|
-
story: PropTypes__default["default"].object.isRequired,
|
|
212
|
-
children: PropTypes__default["default"].node,
|
|
213
|
-
|
|
214
|
-
/** Flip the Story Card to Horizonal mode */
|
|
215
|
-
isHorizontal: PropTypes__default["default"].bool,
|
|
216
|
-
|
|
217
|
-
/** Add border to the Story Card */
|
|
218
|
-
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
219
|
-
// story card with background image
|
|
220
|
-
useImageAsBackground: PropTypes__default["default"].bool,
|
|
221
|
-
// story card content overlap with image
|
|
222
|
-
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
223
|
-
|
|
224
|
-
/** add aspect ratio for hero image */
|
|
225
|
-
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
226
|
-
|
|
227
|
-
/** add theme(dark /light/custom color) for storycard */
|
|
228
|
-
theme: PropTypes__default["default"].string,
|
|
229
|
-
|
|
230
|
-
/** flip the story card mobile design horizontal */
|
|
231
|
-
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
232
|
-
// make content center align in desktop and left align in mobile
|
|
233
|
-
centerAlign: PropTypes__default["default"].bool,
|
|
234
|
-
headerLevel: PropTypes__default["default"].string,
|
|
235
|
-
borderColor: PropTypes__default["default"].string,
|
|
236
|
-
// handle author image through storycard
|
|
237
|
-
hideAuthorImage: PropTypes__default["default"].bool,
|
|
238
|
-
// handle author prefix through storycard
|
|
239
|
-
prefix: PropTypes__default["default"].string,
|
|
240
|
-
config: PropTypes__default["default"].object,
|
|
241
|
-
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
242
|
-
};
|
|
243
|
-
StoryCard.defaultProps = {
|
|
244
|
-
isHorizontal: false,
|
|
245
|
-
isHorizontalMobile: false,
|
|
246
|
-
border: "default",
|
|
247
|
-
theme: "",
|
|
248
|
-
centerAlign: false,
|
|
249
|
-
borderColor: "",
|
|
250
|
-
isHorizontalWithImageLast: false
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
exports.StoryCard = StoryCard;
|
|
254
|
-
exports.Subheadline = Subheadline;
|