@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
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/atoms/Author/index.js +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
require('react-timeago');
|
|
8
|
+
require('date-fns-tz');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
5
14
|
|
|
6
15
|
function _extends() {
|
|
7
16
|
_extends = Object.assign || function (target) {
|
|
@@ -2193,15 +2202,15 @@ var getTextColor = function getTextColor() {
|
|
|
2193
2202
|
var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
|
|
2194
2203
|
return textColor;
|
|
2195
2204
|
};
|
|
2196
|
-
var shapeConfig =
|
|
2197
|
-
"sketches-host":
|
|
2198
|
-
"cdn-name":
|
|
2199
|
-
"cdn-image":
|
|
2205
|
+
var shapeConfig = PropTypes__default["default"].shape({
|
|
2206
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2207
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2208
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2200
2209
|
});
|
|
2201
|
-
var shapeStory =
|
|
2202
|
-
headline:
|
|
2203
|
-
"last-published-at":
|
|
2204
|
-
subheadline:
|
|
2210
|
+
var shapeStory = PropTypes__default["default"].shape({
|
|
2211
|
+
headline: PropTypes__default["default"].string,
|
|
2212
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2213
|
+
subheadline: PropTypes__default["default"].string
|
|
2205
2214
|
});
|
|
2206
2215
|
|
|
2207
2216
|
var _excluded$1 = ["element", "render"];
|
|
@@ -2213,13 +2222,13 @@ var withElementWrapper = function withElementWrapper(StoryElement) {
|
|
|
2213
2222
|
|
|
2214
2223
|
if (!element) return null;
|
|
2215
2224
|
if (render && typeof render === "function") return render(props);
|
|
2216
|
-
return /*#__PURE__*/
|
|
2225
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends({}, restProps, {
|
|
2217
2226
|
element: element
|
|
2218
2227
|
}));
|
|
2219
2228
|
};
|
|
2220
2229
|
};
|
|
2221
2230
|
withElementWrapper.propTypes = {
|
|
2222
|
-
StoryElement:
|
|
2231
|
+
StoryElement: PropTypes__default["default"].element
|
|
2223
2232
|
};
|
|
2224
2233
|
|
|
2225
2234
|
var CurveIcon = function CurveIcon(_ref) {
|
|
@@ -2229,27 +2238,27 @@ var CurveIcon = function CurveIcon(_ref) {
|
|
|
2229
2238
|
opacity = _ref.opacity;
|
|
2230
2239
|
var lightColor = color === "light" && "#ffffff";
|
|
2231
2240
|
var darkColor = color === "dark" && "#0d0d0d";
|
|
2232
|
-
return /*#__PURE__*/
|
|
2241
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2233
2242
|
className: "icon-m_curve-wrapper__3-sLV",
|
|
2234
2243
|
style: {
|
|
2235
2244
|
fill: "".concat(lightColor || darkColor || color)
|
|
2236
2245
|
}
|
|
2237
|
-
}, /*#__PURE__*/
|
|
2246
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2238
2247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2239
2248
|
width: width,
|
|
2240
2249
|
height: height,
|
|
2241
2250
|
viewBox: "0 0 64 64"
|
|
2242
|
-
}, /*#__PURE__*/
|
|
2251
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2243
2252
|
fill: "inherit",
|
|
2244
2253
|
opacity: opacity,
|
|
2245
2254
|
d: "M61 44.702c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067-2.638-2.712-3.956-6.704-3.956-11.976 0-4.971.716-9.227 2.147-12.767 1.432-3.54 3.165-6.553 5.2-9.039 2.034-2.485 4.144-4.481 6.33-5.988 2.184-1.506 4.106-2.56 5.763-3.163l5.652 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.035 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.007 3.163C60.171 39.13 61 41.69 61 44.702zm-33.004 0c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067C3.319 49.22 2 45.229 2 39.957c0-4.971.716-9.227 2.148-12.767 1.431-3.54 3.164-6.553 5.199-9.039 2.034-2.485 4.144-4.481 6.33-5.988C17.86 10.657 19.782 9.603 21.44 9l5.651 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.034 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.008 3.163 1.657 2.11 2.486 4.67 2.486 7.683z"
|
|
2246
2255
|
})));
|
|
2247
2256
|
};
|
|
2248
2257
|
CurveIcon.propTypes = {
|
|
2249
|
-
width:
|
|
2250
|
-
height:
|
|
2251
|
-
color:
|
|
2252
|
-
opacity:
|
|
2258
|
+
width: PropTypes__default["default"].string,
|
|
2259
|
+
height: PropTypes__default["default"].string,
|
|
2260
|
+
color: PropTypes__default["default"].string,
|
|
2261
|
+
opacity: PropTypes__default["default"].string
|
|
2253
2262
|
};
|
|
2254
2263
|
|
|
2255
2264
|
var EdgeIcon = function EdgeIcon(_ref) {
|
|
@@ -2259,32 +2268,32 @@ var EdgeIcon = function EdgeIcon(_ref) {
|
|
|
2259
2268
|
opacity = _ref.opacity;
|
|
2260
2269
|
var lightColor = color === "light" && "#ffffff";
|
|
2261
2270
|
var darkColor = color === "dark" && "#0d0d0d";
|
|
2262
|
-
return /*#__PURE__*/
|
|
2271
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2263
2272
|
className: "icon-m_edge-wrapper__xUOdp",
|
|
2264
2273
|
style: {
|
|
2265
2274
|
fill: "".concat(lightColor || darkColor || color)
|
|
2266
2275
|
}
|
|
2267
|
-
}, /*#__PURE__*/
|
|
2276
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2268
2277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2269
2278
|
width: width,
|
|
2270
2279
|
height: height,
|
|
2271
2280
|
viewBox: "0 0 64 64"
|
|
2272
|
-
}, /*#__PURE__*/
|
|
2281
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2273
2282
|
fill: "inherit",
|
|
2274
2283
|
opacity: opacity,
|
|
2275
2284
|
d: "M16.858 29.836v4.727H28V60H4V29.836c0-9.6 2.606-16.727 7.746-21.187C15.3 5.564 19.8 4 25.122 4v13.627c-2.888 0-8.264 0-8.264 12.209zm40.264-12.21V4c-5.32 0-9.82 1.564-13.376 4.65C38.606 13.108 36 20.236 36 29.835V60h24V34.563H48.857v-4.727c0-12.21 5.377-12.21 8.265-12.21z"
|
|
2276
2285
|
})));
|
|
2277
2286
|
};
|
|
2278
2287
|
EdgeIcon.propTypes = {
|
|
2279
|
-
width:
|
|
2280
|
-
height:
|
|
2281
|
-
color:
|
|
2282
|
-
opacity:
|
|
2288
|
+
width: PropTypes__default["default"].string,
|
|
2289
|
+
height: PropTypes__default["default"].string,
|
|
2290
|
+
color: PropTypes__default["default"].string,
|
|
2291
|
+
opacity: PropTypes__default["default"].string
|
|
2283
2292
|
};
|
|
2284
2293
|
|
|
2285
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2294
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2286
2295
|
var useStateValue = function useStateValue() {
|
|
2287
|
-
return useContext(StateContext);
|
|
2296
|
+
return React.useContext(StateContext);
|
|
2288
2297
|
};
|
|
2289
2298
|
|
|
2290
2299
|
var _excluded = ["element", "template", "css", "story", "config", "render"];
|
|
@@ -2314,7 +2323,7 @@ var SelectionOfIcon = function SelectionOfIcon(iconType, template, blockQuoteCol
|
|
|
2314
2323
|
|
|
2315
2324
|
if (template === "withBackground") {
|
|
2316
2325
|
if (iconType === "edgeIcon") {
|
|
2317
|
-
return /*#__PURE__*/
|
|
2326
|
+
return /*#__PURE__*/React__default["default"].createElement(EdgeIcon, {
|
|
2318
2327
|
width: dimension,
|
|
2319
2328
|
height: dimension,
|
|
2320
2329
|
color: quoteColor,
|
|
@@ -2322,7 +2331,7 @@ var SelectionOfIcon = function SelectionOfIcon(iconType, template, blockQuoteCol
|
|
|
2322
2331
|
});
|
|
2323
2332
|
}
|
|
2324
2333
|
|
|
2325
|
-
return /*#__PURE__*/
|
|
2334
|
+
return /*#__PURE__*/React__default["default"].createElement(CurveIcon, {
|
|
2326
2335
|
width: dimension,
|
|
2327
2336
|
height: dimension,
|
|
2328
2337
|
color: quoteColor,
|
|
@@ -2332,14 +2341,14 @@ var SelectionOfIcon = function SelectionOfIcon(iconType, template, blockQuoteCol
|
|
|
2332
2341
|
|
|
2333
2342
|
if (template !== "withBackground") {
|
|
2334
2343
|
if (iconType === "edgeIcon") {
|
|
2335
|
-
return /*#__PURE__*/
|
|
2344
|
+
return /*#__PURE__*/React__default["default"].createElement(EdgeIcon, {
|
|
2336
2345
|
width: dimension,
|
|
2337
2346
|
height: dimension,
|
|
2338
2347
|
color: blockQuoteColor
|
|
2339
2348
|
});
|
|
2340
2349
|
}
|
|
2341
2350
|
|
|
2342
|
-
return /*#__PURE__*/
|
|
2351
|
+
return /*#__PURE__*/React__default["default"].createElement(CurveIcon, {
|
|
2343
2352
|
width: dimension,
|
|
2344
2353
|
height: dimension,
|
|
2345
2354
|
color: blockQuoteColor
|
|
@@ -2375,38 +2384,38 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
2375
2384
|
var textInvertColor = getTextColor(isBackground ? theme.backgroundColor : configData.theme);
|
|
2376
2385
|
|
|
2377
2386
|
var updateStructure = function updateStructure() {
|
|
2378
|
-
return template === "withBorder" ? /*#__PURE__*/
|
|
2387
|
+
return template === "withBorder" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2379
2388
|
className: "block-quote-m_icon-border__2xQQY"
|
|
2380
|
-
}, /*#__PURE__*/
|
|
2389
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2381
2390
|
className: "block-quote-m_icon__m-EIZ"
|
|
2382
|
-
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor)), /*#__PURE__*/
|
|
2391
|
+
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2383
2392
|
className: "block-quote-m_border__1ZTPR",
|
|
2384
2393
|
style: blockQuoteColor && {
|
|
2385
2394
|
backgroundColor: blockQuoteColor
|
|
2386
2395
|
}
|
|
2387
|
-
})) : /*#__PURE__*/
|
|
2396
|
+
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2388
2397
|
className: "block-quote-m_icon__m-EIZ"
|
|
2389
2398
|
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor));
|
|
2390
2399
|
};
|
|
2391
2400
|
|
|
2392
|
-
return /*#__PURE__*/
|
|
2401
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
2393
2402
|
"data-test-id": "blockquote",
|
|
2394
2403
|
style: theme
|
|
2395
2404
|
}, restProps, {
|
|
2396
2405
|
className: "arrow-component arr--block-quote " + _getClassName("".concat(templateStyle, " ").concat(textColor), _styleModuleImportMap) + (" " + (restProps ? restProps.className || "" : ""))
|
|
2397
|
-
}), /*#__PURE__*/
|
|
2406
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2398
2407
|
className: "block-quote-m_quote-wrapper__83bEy"
|
|
2399
|
-
}, updateStructure(), /*#__PURE__*/
|
|
2408
|
+
}, updateStructure(), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2400
2409
|
className: "block-quote-m_wrapper__2KEhw",
|
|
2401
2410
|
style: blockQuoteColor && {
|
|
2402
2411
|
borderColor: blockQuoteColor
|
|
2403
2412
|
}
|
|
2404
|
-
}, /*#__PURE__*/
|
|
2413
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2405
2414
|
dangerouslySetInnerHTML: {
|
|
2406
2415
|
__html: content
|
|
2407
2416
|
},
|
|
2408
2417
|
className: _getClassName("content ".concat(textInvertColor), _styleModuleImportMap)
|
|
2409
|
-
}), /*#__PURE__*/
|
|
2418
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2410
2419
|
dangerouslySetInnerHTML: {
|
|
2411
2420
|
__html: attribution
|
|
2412
2421
|
},
|
|
@@ -2414,18 +2423,19 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
2414
2423
|
}))));
|
|
2415
2424
|
};
|
|
2416
2425
|
BlockQuoteBase.propTypes = {
|
|
2417
|
-
element:
|
|
2418
|
-
metadata:
|
|
2419
|
-
content:
|
|
2420
|
-
attribution:
|
|
2426
|
+
element: PropTypes__default["default"].shape({
|
|
2427
|
+
metadata: PropTypes__default["default"].shape({
|
|
2428
|
+
content: PropTypes__default["default"].string,
|
|
2429
|
+
attribution: PropTypes__default["default"].string
|
|
2421
2430
|
})
|
|
2422
2431
|
}),
|
|
2423
|
-
template:
|
|
2432
|
+
template: PropTypes__default["default"].string,
|
|
2424
2433
|
story: shapeStory,
|
|
2425
2434
|
config: shapeConfig,
|
|
2426
|
-
render:
|
|
2427
|
-
css:
|
|
2435
|
+
render: PropTypes__default["default"].func,
|
|
2436
|
+
css: PropTypes__default["default"].object
|
|
2428
2437
|
};
|
|
2429
2438
|
var BlockQuote = withElementWrapper(BlockQuoteBase);
|
|
2430
2439
|
|
|
2431
|
-
|
|
2440
|
+
exports.BlockQuote = BlockQuote;
|
|
2441
|
+
exports.BlockQuoteBase = BlockQuoteBase;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
require('react-timeago');
|
|
8
|
+
require('date-fns-tz');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
5
14
|
|
|
6
15
|
function _extends() {
|
|
7
16
|
_extends = Object.assign || function (target) {
|
|
@@ -276,13 +285,13 @@ var withElementWrapper = function withElementWrapper(StoryElement) {
|
|
|
276
285
|
|
|
277
286
|
if (!element) return null;
|
|
278
287
|
if (render && typeof render === "function") return render(props);
|
|
279
|
-
return /*#__PURE__*/
|
|
288
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends({}, restProps, {
|
|
280
289
|
element: element
|
|
281
290
|
}));
|
|
282
291
|
};
|
|
283
292
|
};
|
|
284
293
|
withElementWrapper.propTypes = {
|
|
285
|
-
StoryElement:
|
|
294
|
+
StoryElement: PropTypes__default["default"].element
|
|
286
295
|
};
|
|
287
296
|
|
|
288
297
|
/**
|
|
@@ -1990,20 +1999,20 @@ var updateContentLinks = function updateContentLinks(content) {
|
|
|
1990
1999
|
});
|
|
1991
2000
|
return updatedContent;
|
|
1992
2001
|
};
|
|
1993
|
-
var shapeConfig =
|
|
1994
|
-
"sketches-host":
|
|
1995
|
-
"cdn-name":
|
|
1996
|
-
"cdn-image":
|
|
2002
|
+
var shapeConfig = PropTypes__default["default"].shape({
|
|
2003
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2004
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2005
|
+
"cdn-image": PropTypes__default["default"].string
|
|
1997
2006
|
});
|
|
1998
|
-
var shapeStory =
|
|
1999
|
-
headline:
|
|
2000
|
-
"last-published-at":
|
|
2001
|
-
subheadline:
|
|
2007
|
+
var shapeStory = PropTypes__default["default"].shape({
|
|
2008
|
+
headline: PropTypes__default["default"].string,
|
|
2009
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2010
|
+
subheadline: PropTypes__default["default"].string
|
|
2002
2011
|
});
|
|
2003
2012
|
|
|
2004
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2013
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2005
2014
|
var useStateValue = function useStateValue() {
|
|
2006
|
-
return useContext(StateContext);
|
|
2015
|
+
return React.useContext(StateContext);
|
|
2007
2016
|
};
|
|
2008
2017
|
|
|
2009
2018
|
var _excluded = ["element", "template", "opts", "css", "story", "config", "render"];
|
|
@@ -2040,13 +2049,13 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2040
2049
|
borderLeft: "solid 2px ".concat(borderColor)
|
|
2041
2050
|
};
|
|
2042
2051
|
|
|
2043
|
-
var _useState = useState(initBorderDirection),
|
|
2052
|
+
var _useState = React.useState(initBorderDirection),
|
|
2044
2053
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2045
2054
|
borderDirection = _useState2[0],
|
|
2046
2055
|
setBorderDirection = _useState2[1];
|
|
2047
2056
|
|
|
2048
2057
|
if (!content) return null;
|
|
2049
|
-
useEffect(function () {
|
|
2058
|
+
React.useEffect(function () {
|
|
2050
2059
|
var htmlElement = document.getElementsByTagName("HTML");
|
|
2051
2060
|
|
|
2052
2061
|
if (htmlElement && htmlElement.length) {
|
|
@@ -2063,7 +2072,7 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2063
2072
|
var templateStyle = template ? "blurb-".concat(template) : "blurb";
|
|
2064
2073
|
var configData = useStateValue() || {};
|
|
2065
2074
|
var textInvertColor = getTextColor(configData.theme);
|
|
2066
|
-
return /*#__PURE__*/
|
|
2075
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
2067
2076
|
"data-test-id": "blurb",
|
|
2068
2077
|
style: borderColor && borderDirection,
|
|
2069
2078
|
dangerouslySetInnerHTML: {
|
|
@@ -2075,20 +2084,20 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2075
2084
|
};
|
|
2076
2085
|
|
|
2077
2086
|
BlurbBase.propTypes = {
|
|
2078
|
-
element:
|
|
2079
|
-
text:
|
|
2087
|
+
element: PropTypes__default["default"].shape({
|
|
2088
|
+
text: PropTypes__default["default"].string
|
|
2080
2089
|
}),
|
|
2081
2090
|
|
|
2082
2091
|
/** templates can be either default or withBorder */
|
|
2083
|
-
template:
|
|
2084
|
-
opts:
|
|
2085
|
-
isExternalLink:
|
|
2092
|
+
template: PropTypes__default["default"].string,
|
|
2093
|
+
opts: PropTypes__default["default"].shape({
|
|
2094
|
+
isExternalLink: PropTypes__default["default"].bool
|
|
2086
2095
|
}),
|
|
2087
2096
|
story: shapeStory,
|
|
2088
2097
|
config: shapeConfig,
|
|
2089
|
-
render:
|
|
2090
|
-
css:
|
|
2098
|
+
render: PropTypes__default["default"].func,
|
|
2099
|
+
css: PropTypes__default["default"].object
|
|
2091
2100
|
};
|
|
2092
2101
|
var Blurb = withElementWrapper(BlurbBase);
|
|
2093
2102
|
|
|
2094
|
-
|
|
2103
|
+
exports.Blurb = Blurb;
|