@quintype/arrow 2.9.10 → 2.9.11-arrow-chunking.0
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/AlsoRead/index.js +1 -0
- package/AlsoRead/styles.arrow.css +1 -1
- package/AsideCollection/index.js +1 -0
- package/AsideCollection/styles.arrow.css +1 -1
- package/Attachment/index.js +1 -0
- package/Attachment/styles.arrow.css +1 -1
- package/Author/index.js +1 -0
- package/Author/styles.arrow.css +1 -1
- package/AuthorIntroductionCard/index.js +1 -0
- package/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/AuthorWithTime/index.js +1 -0
- package/AuthorWithTime/styles.arrow.css +1 -1
- package/AuthorsList/index.js +1 -0
- package/AuthorsList/styles.arrow.css +1 -1
- package/BigFact/index.js +1 -0
- package/BigFact/styles.arrow.css +1 -1
- package/BlockQuote/index.js +1 -0
- package/BlockQuote/styles.arrow.css +1 -1
- package/Blurb/index.js +1 -0
- package/Blurb/styles.arrow.css +1 -1
- package/CollectionFilter/index.js +1 -0
- package/CollectionFilter/styles.arrow.css +1 -1
- package/CollectionName/index.js +1 -0
- package/CollectionName/styles.arrow.css +1 -1
- package/ElevenStories/index.js +1 -0
- package/ElevenStories/styles.arrow.css +1 -1
- package/FourColFiveStories/index.js +1 -0
- package/FourColFiveStories/styles.arrow.css +1 -1
- package/FourColGrid/index.js +1 -0
- package/FourColGrid/styles.arrow.css +1 -1
- package/FourColSixteenStories/index.js +1 -0
- package/FourColSixteenStories/styles.arrow.css +1 -1
- package/FourColTwelveStories/index.js +1 -0
- package/FourColTwelveStories/styles.arrow.css +1 -1
- package/FourStorySlider/index.js +1 -0
- package/FourStorySlider/styles.arrow.css +1 -1
- package/FourTabbedBigStorySlider/index.js +1 -0
- package/FourTabbedBigStorySlider/styles.arrow.css +1 -0
- package/FullScreenSlider/index.js +1 -0
- package/FullScreenSlider/styles.arrow.css +1 -1
- package/HalfScreenSlider/index.js +1 -0
- package/HalfScreenSlider/styles.arrow.css +1 -1
- package/Headline/index.js +1 -0
- package/Headline/styles.arrow.css +1 -1
- package/HeroImage/index.js +1 -0
- package/HeroImage/styles.arrow.css +1 -1
- package/Image/index.js +1 -0
- package/Image/styles.arrow.css +1 -1
- package/ImageGallery/index.js +1 -0
- package/ImageGallery/styles.arrow.css +1 -1
- package/ImageSlideshow/index.js +1 -0
- package/ImageSlideshow/styles.arrow.css +1 -1
- package/KeyEvents/index.js +1 -0
- package/KeyEvents/styles.arrow.css +1 -1
- package/ListComponent/index.js +1 -0
- package/ListComponent/styles.arrow.css +1 -1
- package/ListicleStoryTemplate/index.js +1 -0
- package/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/LiveBlogStoryTemplate/index.js +1 -0
- package/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/LoadmoreButton/index.js +1 -0
- package/LoadmoreButton/styles.arrow.css +1 -1
- package/MagazineEditions/index.js +1 -0
- package/MagazineEditions/styles.arrow.css +1 -1
- package/MagazineHeaderCard/index.js +1 -0
- package/MagazineHeaderCard/styles.arrow.css +1 -1
- package/MagazineWidget/index.js +1 -0
- package/MagazineWidget/styles.arrow.css +1 -1
- package/OneColStoryList/index.js +1 -0
- package/OneColStoryList/styles.arrow.css +1 -1
- package/OpinionCollection/index.js +1 -0
- package/OpinionCollection/styles.arrow.css +1 -1
- package/PageIntroductionCard/index.js +1 -0
- package/PageIntroductionCard/styles.arrow.css +1 -1
- package/PhotoStoryTemplate/index.js +1 -0
- package/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/QuestionAnswer/index.js +1 -0
- package/QuestionAnswer/styles.arrow.css +1 -1
- package/Quote/index.js +1 -0
- package/Quote/styles.arrow.css +1 -1
- package/Reference/index.js +1 -0
- package/Reference/styles.arrow.css +1 -1
- package/ScrollSnap/index.js +1 -0
- package/ScrollSnap/styles.arrow.css +1 -1
- package/SectionTag/index.js +1 -0
- package/SectionTag/styles.arrow.css +1 -1
- package/SixColSixStories/index.js +1 -0
- package/SixColSixStories/styles.arrow.css +1 -1
- package/SocialShareTemplate/index.js +1 -0
- package/SocialShareTemplate/styles.arrow.css +1 -1
- package/StoryCard/index.js +1 -0
- package/StoryCard/styles.arrow.css +1 -1
- package/StoryCollection/index.js +1 -0
- package/StoryCollection/styles.arrow.css +1 -1
- package/StoryElement/index.js +1 -0
- package/StoryElementCard/index.js +1 -0
- package/StoryElementCard/styles.arrow.css +1 -1
- package/StorycardContent/index.js +1 -0
- package/StorycardContent/styles.arrow.css +1 -1
- package/Subheadline/index.js +1 -0
- package/Subheadline/styles.arrow.css +1 -1
- package/Summary/index.js +1 -0
- package/Summary/styles.arrow.css +1 -1
- package/TagIntroductionCard/index.js +1 -0
- package/TagIntroductionCard/styles.arrow.css +1 -1
- package/Text/index.js +1 -0
- package/Text/styles.arrow.css +1 -1
- package/TextStoryTemplate/index.js +1 -0
- package/TextStoryTemplate/styles.arrow.css +1 -1
- package/ThreeColFlexStories/index.js +1 -0
- package/ThreeColFlexStories/styles.arrow.css +1 -1
- package/ThreeColFourteenStories/index.js +1 -0
- package/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/ThreeColGrid/index.js +1 -0
- package/ThreeColGrid/styles.arrow.css +1 -1
- package/ThreeColSevenStory/index.js +1 -0
- package/ThreeColSevenStory/styles.arrow.css +1 -1
- package/ThreeColSixStories/index.js +1 -0
- package/ThreeColSixStories/styles.arrow.css +1 -1
- package/ThreeColTwelveStories/index.js +1 -0
- package/ThreeColTwelveStories/styles.arrow.css +1 -0
- package/TimeStamp/index.js +1 -0
- package/TwoColFourStories/index.js +1 -0
- package/TwoColFourStories/styles.arrow.css +1 -1
- package/TwoColFourStoryHighlight/index.js +1 -0
- package/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/TwoColSixStories/index.js +1 -0
- package/TwoColSixStories/styles.arrow.css +1 -1
- package/TwoColTenStoriesSidebar/index.js +1 -0
- package/TwoColTenStoriesSidebar/styles.arrow.css +1 -0
- package/TwoColThreeStories/index.js +1 -0
- package/TwoColThreeStories/styles.arrow.css +1 -1
- package/Video/index.js +1 -0
- package/VideoStoryTemplate/index.js +1 -0
- package/VideoStoryTemplate/styles.arrow.css +1 -1
- package/app.scss +6 -0
- package/cjs/index.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.headline-m_wrapper__3nUmh{margin-bottom:6px}.headline-m_headline__3_NhV{color:var(--arrow-c-mono2);font-weight:var(--arrow-fw-semi-bold);margin-bottom:var(--arrow-spacing-xxs)}@media (min-width:768px){.headline-m_headline__3_NhV{margin-bottom:var(--arrow-spacing-xs)}}.headline-m_wrapper__3nUmh .headline-m_headline__3_NhV{display:inline;margin-bottom:var(--arrow-spacing-xs)}.headline-m_dark__en3hW{color:var(--arrow-c-mono2)}.headline-m_light__3lKJB{color:var(--arrow-c-invert-mono2)}.section-m_section__2N4S3{margin-bottom:var(--arrow-spacing-xxs)}@media (min-width:768px){.section-m_section__2N4S3{margin-bottom:var(--arrow-spacing-xs)}}.section-m_section-borderBottomSml__2GNbo .section-m_border-bottom__3cRoD{height:2px;margin-top:var(--arrow-spacing-xxs);width:20px}.section-m_section-borderLeft__3hKVj{align-items:baseline;display:flex}.section-m_section-borderLeft__3hKVj .section-m_border-left__2oUyp{margin-right:var(--arrow-spacing-xs);max-width:3px;min-width:3px;overflow:hidden}.section-m_section-borderLeft__3hKVj .section-m_border-left__2oUyp:before{content:"I";font-family:var(--arrow-sans-serif)}html[dir=rtl] .section-m_border-left__2oUyp{margin-left:var(--arrow-spacing-xs);margin-right:0}.section-m_section-solid__1vB1Q{align-self:self-start;color:var(--arrow-c-light);display:inline-flex;padding:var(--arrow-spacing-xxs) var(--arrow-spacing-s)}@media (min-width:768px){.section-m_section-solid__1vB1Q{padding:var(--arrow-spacing-xs) var(--arrow-spacing-m)}}.section-m_dark__1r3C4{color:var(--arrow-c-mono2)}.section-m_light__306hW{color:var(--arrow-c-invert-mono2)}.timestamp-m_time__2v46i{display:flex;margin-bottom:2px}.timestamp-m_time-wrapper__3O2lM{margin-bottom:var(--arrow-spacing-xxs)}.timestamp-m_bottom-fix__1Zh8r{margin-top:auto}.timestamp-m_dark__2lk9E{color:var(--arrow-c-mono4)}.timestamp-m_light__2QlrI{color:var(--arrow-c-invert-mono4)}.author-m_author__WRuLm{align-items:center;color:var(--arrow-c-mono4);display:flex;margin-bottom:var(--arrow-spacing-xs)}.author-m_author-image__3q2oc{border-radius:100%;height:var(--arrow-spacing-l);margin-right:var(--arrow-spacing-xs);overflow:hidden;width:var(--arrow-spacing-l)}.author-m_author-image__3q2oc figure,.author-m_author-image__3q2oc img{height:100%;width:100%}.author-m_author-name__3WP-O{margin:auto var(--arrow-spacing-xs) auto 0}.author-m_bottom-fix__223TT{margin-top:auto}.author-m_prefix__YSInK{margin:auto var(--arrow-spacing-xxs) auto 0}.author-m_rtl-image__2nglD{display:none}html[dir=rtl] .author-m_author-name__3WP-O{margin-right:0}html[dir=rtl] .author-m_prefix__YSInK{margin-left:var(--arrow-spacing-xxs);margin-right:0}html[dir=rtl] .author-m_ltr-image__3bc0L{display:none}html[dir=rtl] .author-m_rtl-image__2nglD{display:block}.author-m_dark__2TTlp{color:var(--arrow-c-mono4)}.author-m_light__3y8_x{color:var(--arrow-c-invert-mono4)}.dot-m_dark__1Njxl{fill:var(--arrow-c-mono4)}.dot-m_light__27IA3{fill:var(--arrow-c-invert-mono4)}.divider-m_dark__26FRi{fill:var(--arrow-c-mono4)}.divider-m_light__w-7sy{fill:var(--arrow-c-invert-mono4)}.author-with-timestamp-m_author-time-wrapper__G7_eI{align-items:center;color:var(--arrow-c-mono2);display:flex;flex-wrap:wrap}.author-with-timestamp-m_author-image__24xrD{border-radius:100%;height:var(--arrow-spacing-l);margin-right:var(--arrow-spacing-xs);width:var(--arrow-spacing-l)}.author-with-timestamp-m_dot__1LHXD{margin-right:var(--arrow-spacing-xs);position:relative;top:-6px}.author-with-timestamp-m_bottom-fix__1rWGv{margin-top:auto}.author-with-timestamp-m_dash__2L5XC{margin-right:var(--arrow-spacing-xs);position:relative;top:-1px}@media (min-width:768px){.author-with-timestamp-m_dash__2L5XC{top:-3px}}html[dir=rtl] .author-with-timestamp-m_dot__1LHXD{margin-left:var(--arrow-spacing-xs)}html[dir=rtl] .author-with-timestamp-m_dash__2L5XC{padding-left:var(--arrow-spacing-xs)}.read-time-m_read-time-wrapper__3GyC_{display:flex;font-size:var(--arrow-fs-tiny);line-height:var(--arrow-lh-2)}.read-time-m_dot-indicator__3Sqh2{padding:0 var(--arrow-spacing-xs) var(--arrow-spacing-xs)}.read-time-m_dark__3yRaK{color:var(--arrow-c-mono4)}.read-time-m_light__1GAZu{color:var(--arrow-c-invert-mono4)}html[dir=rtl] .read-time-m_read-time-wrapper__3GyC_{margin-right:var(--arrow-spacing-xs)}.storycardContent-m_wrapper__TEmfA{flex-basis:70%}@media (min-width:768px){.storycardContent-m_wrapper__TEmfA{flex-basis:100%}}.storycardContent-m_horizontal-content-wrapper__NgpuC.storycardContent-m_border-full__2km37{padding:16px 16px 16px 0}@media (min-width:768px){.storycardContent-m_horizontal-content-wrapper__NgpuC.storycardContent-m_border-full__2km37{padding:0 16px 16px}}.storycardContent-m_border-full__2km37{padding:12px 0 0}@media (min-width:768px){.storycardContent-m_border-full__2km37{padding:0 16px 16px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import"react-timeago";var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){var e={exports:{}};return t(e,e.exports),e.exports}var u=a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),c=i(a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=u)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},u=a.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,l=a.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],u=i[1],c=r||n.default.handleMissingStyleName;return u?e[a]?e[a][u]?e[a][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+a,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,c)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}}))),l=Array.isArray,s="object"==typeof o&&o&&o.Object===Object&&o,h="object"==typeof self&&self&&self.Object===Object&&self,f=s||h||Function("return this")(),p=f.Symbol,v=Object.prototype,d=v.hasOwnProperty,y=v.toString,g=p?p.toStringTag:void 0;var m=function(t){var e=d.call(t,g),r=t[g];try{t[g]=void 0;var n=!0}catch(t){}var o=y.call(t);return n&&(e?t[g]=r:delete t[g]),o},_=Object.prototype.toString;var b=function(t){return _.call(t)},w=p?p.toStringTag:void 0;var j=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):b(t)};var O=function(t){return null!=t&&"object"==typeof t};var x=function(t){return"symbol"==typeof t||O(t)&&"[object Symbol]"==j(t)},S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;var L=function(t,e){if(l(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!x(t))||(E.test(t)||!S.test(t)||null!=e&&t in Object(e))};var N=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var C,k=function(t){if(!N(t))return!1;var e=j(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},z=f["__core-js_shared__"],F=(C=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var P=function(t){return!!F&&F in t},I=Function.prototype.toString;var T=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},A=/^\[object .+?Constructor\]$/,M=Function.prototype,$=Object.prototype,G=M.toString,R=$.hasOwnProperty,Y=RegExp("^"+G.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function(t){return!(!N(t)||P(t))&&(k(t)?Y:A).test(T(t))};var q=function(t,e){return null==t?void 0:t[e]};var W=function(t,e){var r=q(t,e);return U(r)?r:void 0},B=W(Object,"create");var D=function(){this.__data__=B?B(null):{},this.size=0};var H=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},J=Object.prototype.hasOwnProperty;var K=function(t){var e=this.__data__;if(B){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return J.call(e,t)?e[t]:void 0},Q=Object.prototype.hasOwnProperty;var V=function(t){var e=this.__data__;return B?void 0!==e[t]:Q.call(e,t)};var X=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=B&&void 0===e?"__lodash_hash_undefined__":e,this};function Z(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Z.prototype.clear=D,Z.prototype.delete=H,Z.prototype.get=K,Z.prototype.has=V,Z.prototype.set=X;var tt=Z;var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var it=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var ut=function(t){return nt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=et,lt.prototype.delete=it,lt.prototype.get=at,lt.prototype.has=ut,lt.prototype.set=ct;var st=lt,ht=W(f,"Map");var ft=function(){this.size=0,this.__data__={hash:new tt,map:new(ht||st),string:new tt}};var pt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var vt=function(t,e){var r=t.__data__;return pt(e)?r["string"==typeof e?"string":"hash"]:r.map};var dt=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e};var yt=function(t){return vt(this,t).get(t)};var gt=function(t){return vt(this,t).has(t)};var mt=function(t,e){var r=vt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function _t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_t.prototype.clear=ft,_t.prototype.delete=dt,_t.prototype.get=yt,_t.prototype.has=gt,_t.prototype.set=mt;var bt=_t;function wt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(wt.Cache||bt),r}wt.Cache=bt;var jt=wt;var Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xt=/\\(\\)?/g,St=function(t){var e=jt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,(function(t,r,n,o){e.push(n?o.replace(xt,"$1"):r||t)})),e}));var Et=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Lt=p?p.prototype:void 0,Nt=Lt?Lt.toString:void 0;var Ct=function t(e){if("string"==typeof e)return e;if(l(e))return Et(e,t)+"";if(x(e))return Nt?Nt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var kt=function(t){return null==t?"":Ct(t)};var zt=function(t,e){return l(t)?t:L(t,e)?[t]:St(kt(t))};var Ft=function(t){if("string"==typeof t||x(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Pt=function(t,e){for(var r=0,n=(e=zt(e,t)).length;null!=t&&r<n;)t=t[Ft(e[r++])];return r&&r==n?t:void 0};var It=function(t,e,r){var n=null==t?void 0:Pt(t,e);return void 0===n?r:n},Tt=r();a((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?v:f,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=v,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function y(){}function g(){}function m(){}var _={};c(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==r&&n.call(w,i)&&(_=w);var j=m.prototype=y.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,c(j,"constructor",m),c(m,"constructor",g),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),c(j,u,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var At=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Mt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var $t={"./subheadline.m.css":{subheadline:"subheadline-m_subheadline__3fd7z",dark:"subheadline-m_dark__28u00",light:"subheadline-m_light__2YUOe"}},Gt=function(r){var n=r.story,o=r.truncateChars,i=void 0===o?200:o,a=r.lineClamp,u=r.clazzName,l=void 0===u?"":u,s=r.forceShowAtom,h=r.showFullContent,f=e(Tt)||{};if(!(s||It(f,["showSubheadline"],!0)))return null;var p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Mt(t);return At(e)<155?"light":"dark"}(f.theme);return t.createElement("div",{style:{WebkitLineClamp:a},"data-test-id":"subheadline",className:("p-alt arr--sub-headline arrow-component ".concat(l)?"p-alt arr--sub-headline arrow-component ".concat(l)+" ":"")+c("subheadline ".concat(p),$t)},h||"number"==typeof a?n.subheadline:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,r=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?"":" ...";return"string"==typeof t&&t.length>e?t.substring(0,e)+r:t}(n.subheadline,i,!0))};Gt.propTypes={story:n.object.isRequired,lineClamp:n.number,truncateChars:n.number,clazzName:n.string,forceShowAtom:n.bool,showFullContent:n.bool},Gt.defaultProps={forceShowAtom:!1,showFullContent:!1};export{Gt as Subheadline};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.subheadline-m_subheadline__3fd7z{margin-bottom:var(--arrow-spacing-xxs);
|
|
1
|
+
.subheadline-m_subheadline__3fd7z{-webkit-box-orient:vertical;display:-webkit-box;margin-bottom:var(--arrow-spacing-xxs);overflow:hidden}@media (min-width:768px){.subheadline-m_subheadline__3fd7z{margin-bottom:var(--arrow-spacing-xs)}}.subheadline-m_dark__28u00{color:var(--arrow-c-mono4)}.subheadline-m_light__2YUOe{color:var(--arrow-c-invert-mono4)}
|
package/Summary/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import"react-timeago";function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function a(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t){var e={exports:{}};return t(e,e.exports),e.exports}var c=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),l=s(u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=c)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},s=i.handleMissingStyleName,u=void 0===s?n.default.handleMissingStyleName:s,c=i.autoResolveMultipleImports,l=void 0===c?n.default.autoResolveMultipleImports:c;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],s=a[1],u=r||n.default.handleMissingStyleName;return s?e[i]?e[i][s]?e[i][s]:o("CSS module does not exist: "+s,u):o("CSS module import does not exist: "+i,u):o("Invalid style name: "+t,u)}(t,e,u);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,u)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",u)})).filter((function(t){return t})).join(" "):""}}))),h=["element","render"],f=function(e){return function(r){var n=r.element,i=r.render,s=a(r,h);return n?i&&"function"==typeof i?i(r):t.createElement(e,o({},s,{element:n})):null}};f.propTypes={StoryElement:n.element},u((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),i=new N(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return P()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=E(i,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",y={};function v(){}function m(){}function g(){}var _={};u(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(k([])));w&&w!==r&&n.call(w,a)&&(_=w);var O=g.prototype=v.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,a,i,s){var u=l(t[o],t,a);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(h).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}return m.prototype=g,u(O,"constructor",g),u(g,"constructor",m),m.displayName=u(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},j(x.prototype),u(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(c(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var p="object"==typeof i&&i&&i.Object===Object&&i,d="object"==typeof self&&self&&self.Object===Object&&self,y=p||d||Function("return this")(),v=y.Symbol,m=Object.prototype,g=m.hasOwnProperty,_=m.toString,b=v?v.toStringTag:void 0;var w=function(t){var e=g.call(t,b),r=t[b];try{t[b]=void 0;var n=!0}catch(t){}var o=_.call(t);return n&&(e?t[b]=r:delete t[b]),o},O=Object.prototype.toString;var j=function(t){return O.call(t)},x=v?v.toStringTag:void 0;var E=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?w(t):j(t)};var S=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var L,N=function(t){if(!S(t))return!1;var e=E(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},k=y["__core-js_shared__"],P=(L=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var C=function(t){return!!P&&P in t},I=Function.prototype.toString;var T=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,F=Function.prototype,z=Object.prototype,G=F.toString,R=z.hasOwnProperty,$=RegExp("^"+G.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var A=function(t){return!(!S(t)||C(t))&&(N(t)?$:M).test(T(t))};var H=function(t,e){return null==t?void 0:t[e]};var Y=function(t,e){var r=H(t,e);return A(r)?r:void 0},B=Y(Object,"create");var U=function(){this.__data__=B?B(null):{},this.size=0};var J=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K=Object.prototype.hasOwnProperty;var V=function(t){var e=this.__data__;if(B){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return K.call(e,t)?e[t]:void 0},Z=Object.prototype.hasOwnProperty;var q=function(t){var e=this.__data__;return B?void 0!==e[t]:Z.call(e,t)};var D=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=B&&void 0===e?"__lodash_hash_undefined__":e,this};function Q(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Q.prototype.clear=U,Q.prototype.delete=J,Q.prototype.get=V,Q.prototype.has=q,Q.prototype.set=D;var W=Q;var X=function(){this.__data__=[],this.size=0};var tt=function(t,e){return t===e||t!=t&&e!=e};var et=function(t,e){for(var r=t.length;r--;)if(tt(t[r][0],e))return r;return-1},rt=Array.prototype.splice;var nt=function(t){var e=this.__data__,r=et(e,t);return!(r<0)&&(r==e.length-1?e.pop():rt.call(e,r,1),--this.size,!0)};var ot=function(t){var e=this.__data__,r=et(e,t);return r<0?void 0:e[r][1]};var at=function(t){return et(this.__data__,t)>-1};var it=function(t,e){var r=this.__data__,n=et(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function st(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}st.prototype.clear=X,st.prototype.delete=nt,st.prototype.get=ot,st.prototype.has=at,st.prototype.set=it;var ut=st,ct=Y(y,"Map");var lt=function(){this.size=0,this.__data__={hash:new W,map:new(ct||ut),string:new W}};var ht=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ft=function(t,e){var r=t.__data__;return ht(e)?r["string"==typeof e?"string":"hash"]:r.map};var pt=function(t){var e=ft(this,t).delete(t);return this.size-=e?1:0,e};var dt=function(t){return ft(this,t).get(t)};var yt=function(t){return ft(this,t).has(t)};var vt=function(t,e){var r=ft(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}mt.prototype.clear=lt,mt.prototype.delete=pt,mt.prototype.get=dt,mt.prototype.has=yt,mt.prototype.set=vt;var gt=mt;function _t(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(_t.Cache||gt),r}_t.Cache=gt;var bt=_t;var wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/\\(\\)?/g;(function(t){var e=bt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(wt,(function(t,r,n,o){e.push(n?o.replace(Ot,"$1"):r||t)})),e}));var jt=v?v.prototype:void 0;jt&&jt.toString;var xt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Et=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},St=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t),r=e?t:Et(t),n=xt(r)<155?"light":"dark";return n},Lt=n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),Nt=n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string}),kt=r(),Pt=["element","template","opts","css","story","config","render"],Ct={"./summary.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",headline:"summary-m_headline__30sie",summary:"summary-m_summary__3-CnO",content:"summary-m_content__37n8C","summary-header":"summary-m_summary-header__UKVHi","summary-border":"summary-m_summary-border__M9hrr",dark:"summary-m_dark__1ZuzR",light:"summary-m_light__2SYiC","heading-wrapper":"summary-m_heading-wrapper__23S51","content-border":"summary-m_content-border__3ilmJ"}},It=function(r){var n=r.element,i=r.template,s=void 0===i?"":i,u=r.opts,c=void 0===u?{}:u,h=r.css,f=void 0===h?{}:h;r.story,r.config,r.render;var p=a(r,Pt),d=e(kt)||{},y=St(d.theme),v=n.text;if(!v)return null;var m=f.headerBgColor,g=c.isExternalLink,_=void 0===g||g,b=c.headline,w=void 0===b?"Summary":b,O=c.hideHeadline,j=void 0!==O&&O,x=_&&function(t){var e=t,r=t.match(/(<a).*?(>)/g);return r&&r.forEach((function(t){/target=/g.test(t)||(e=e.replace(t,"<a aria-label='content' target='_blank'".concat(t.substring(2))))})),e}(v)||v,E=["header","border"].includes(s)?"summary-".concat(s):"summary",S=j?"content-border":"",L="header"===s||"border"===s,N=L?"".concat(m):"",k=L?St(m):"",P="header"===s?"":y;return t.createElement("div",o({"data-test-id":"summary"},p,{className:"arrow-component arr--summary-element arr-custom-style "+l(E,Ct)+" "+(p&&p.className||"")}),!j&&t.createElement("div",{"data-test-id":"summary-headline",className:l("heading-wrapper ".concat(y),Ct)},t.createElement("div",{style:{backgroundColor:N},className:l("headline ".concat(k," ").concat(y),Ct)},w)),t.createElement("div",{dangerouslySetInnerHTML:{__html:x},className:l("content ".concat(S," ").concat(P," ").concat(y),Ct)}))};It.propTypes={element:n.shape({text:n.string}),template:n.string,opts:n.shape({isExternalLink:n.bool,headline:n.string,hideHeadline:n.bool}),story:Nt,config:Lt,render:n.func,css:n.shape({headerBgColor:n.string})};var Tt=f(It);export{Tt as Summary};
|
package/Summary/styles.arrow.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.summary-m_headline__30sie{font-size:var(--arrow-fs-s);font-weight:var(--arrow-fw-bold)}@media (min-width:768px){.summary-m_headline__30sie{font-size:var(--arrow-fs-m)}}.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C p{font-style:italic}.summary-m_dark__1ZuzR,.summary-m_summary-border__M9hrr.arrow-component .summary-m_content__37n8C>p,.summary-m_summary-header__UKVHi.arrow-component .summary-m_content__37n8C>p,.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C>p{
|
|
1
|
+
.summary-m_headline__30sie{font-size:var(--arrow-fs-s);font-weight:var(--arrow-fw-bold)}@media (min-width:768px){.summary-m_headline__30sie{font-size:var(--arrow-fs-m)}}.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C p{font-style:italic}.summary-m_dark__1ZuzR,.summary-m_summary-border__M9hrr.arrow-component .summary-m_content__37n8C>p,.summary-m_summary-header__UKVHi.arrow-component .summary-m_content__37n8C>p,.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C>p{color:var(--arrow-c-dark);font-size:var(--arrow-fs-s)}@media (min-width:768px){.summary-m_dark__1ZuzR,.summary-m_summary-border__M9hrr.arrow-component .summary-m_content__37n8C>p,.summary-m_summary-header__UKVHi.arrow-component .summary-m_content__37n8C>p,.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C>p{font-size:var(--arrow-fs-m)}}.summary-m_summary-border__M9hrr.arrow-component .summary-m_content__37n8C.summary-m_light__2SYiC>p,.summary-m_summary-header__UKVHi.arrow-component .summary-m_content__37n8C.summary-m_light__2SYiC>p,.summary-m_summary__3-CnO.arrow-component .summary-m_content__37n8C.summary-m_light__2SYiC>p{color:var(--arrow-c-light)}.summary-m_dark__1ZuzR{color:var(--arrow-c-mono1)}.summary-m_light__2SYiC{color:var(--arrow-c-invert-mono1)}.summary-m_summary__3-CnO .summary-m_headline__30sie{font-size:var(--arrow-fs-s);margin-bottom:var(--arrow-spacing-xs)}@media (min-width:768px){.summary-m_summary__3-CnO .summary-m_headline__30sie{font-size:var(--arrow-fs-l)}}.summary-m_summary-header__UKVHi .summary-m_headline__30sie{background-color:var(--arrow-c-brand1);font-size:var(--arrow-fs-s);padding:var(--arrow-spacing-xs) var(--arrow-spacing-s)}@media (min-width:768px){.summary-m_summary-header__UKVHi .summary-m_headline__30sie{font-size:var(--arrow-fs-m);padding:var(--arrow-spacing-xs) var(--arrow-spacing-l)}}.summary-m_summary-header__UKVHi .summary-m_content__37n8C{background-color:var(--arrow-c-invert-mono7);padding:var(--arrow-spacing-s)}@media (min-width:768px){.summary-m_summary-header__UKVHi .summary-m_content__37n8C{padding:var(--arrow-spacing-l)}}.summary-m_summary-border__M9hrr .summary-m_heading-wrapper__23S51{display:flex;margin-bottom:-22px}.summary-m_summary-border__M9hrr .summary-m_heading-wrapper__23S51:before{align-self:center;border-top:1px solid var(--arrow-c-dark);content:" ";position:relative;width:var(--arrow-spacing-m)}.summary-m_summary-border__M9hrr .summary-m_heading-wrapper__23S51.summary-m_light__2SYiC:before{border-top:1px solid var(--arrow-c-light)}.summary-m_summary-border__M9hrr .summary-m_heading-wrapper__23S51:after{align-self:center;border-top:1px solid var(--arrow-c-dark);content:" ";flex:1 1 auto;margin-right:0;position:relative}.summary-m_summary-border__M9hrr .summary-m_heading-wrapper__23S51.summary-m_light__2SYiC:after{border-top:1px solid var(--arrow-c-light)}.summary-m_summary-border__M9hrr .summary-m_content__37n8C{border:1px solid var(--arrow-c-dark);border-top:none;padding:var(--arrow-spacing-l)}.summary-m_summary-border__M9hrr .summary-m_content__37n8C.summary-m_light__2SYiC{border:1px solid var(--arrow-c-light)}.summary-m_summary-border__M9hrr .summary-m_headline__30sie{background-color:var(--arrow-c-brand1);border-radius:2px;line-height:var(--arrow-lh-4);margin:0 var(--arrow-spacing-xs);padding:var(--arrow-spacing-xs) var(--arrow-spacing-l)}.summary-m_summary-border__M9hrr .summary-m_content-border__3ilmJ.summary-m_dark__1ZuzR{border:1px solid var(--arrow-c-mono5)}.summary-m_summary-border__M9hrr .summary-m_content-border__3ilmJ.summary-m_light__2SYiC{border:1px solid var(--arrow-c-invert-mono5)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import e from"prop-types";import"react-timeago";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(t){var e={exports:{}};return t(e,e.exports),e.exports}var i=o((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),a=n(o((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=i)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},c=a.handleMissingStyleName,u=void 0===c?n.default.handleMissingStyleName:c,s=a.autoResolveMultipleImports,l=void 0===s?n.default.autoResolveMultipleImports:s;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],c=i[1],u=r||n.default.handleMissingStyleName;return c?e[a]?e[a][c]?e[a][c]:o("CSS module does not exist: "+c,u):o("CSS module import does not exist: "+a,u):o("Invalid style name: "+t,u)}(t,e,u);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,u)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",u)})).filter((function(t){return t})).join(" "):""}})));o((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var _={};u(_,i,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,i)&&(_=b);var j=m.prototype=y.prototype=Object.create(_);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,u(j,"constructor",m),u(m,"constructor",g),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},x(O.prototype),u(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(j),u(j,c,"Generator"),u(j,i,(function(){return this})),u(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var c="object"==typeof r&&r&&r.Object===Object&&r,u="object"==typeof self&&self&&self.Object===Object&&self,s=c||u||Function("return this")(),l=s.Symbol,h=Object.prototype,f=h.hasOwnProperty,p=h.toString,d=l?l.toStringTag:void 0;var v=function(t){var e=f.call(t,d),r=t[d];try{t[d]=void 0;var n=!0}catch(t){}var o=p.call(t);return n&&(e?t[d]=r:delete t[d]),o},y=Object.prototype.toString;var g=function(t){return y.call(t)},m=l?l.toStringTag:void 0;var _=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":m&&m in Object(t)?v(t):g(t)};var w=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var b,j=function(t){if(!w(t))return!1;var e=_(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},x=s["__core-js_shared__"],O=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"";var E=function(t){return!!O&&O in t},N=Function.prototype.toString;var S=function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""},L=/^\[object .+?Constructor\]$/,P=Function.prototype,k=Object.prototype,I=P.toString,F=k.hasOwnProperty,T=RegExp("^"+I.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!w(t)||E(t))&&(j(t)?T:L).test(S(t))};var M=function(t,e){return null==t?void 0:t[e]};var C=function(t,e){var r=M(t,e);return z(r)?r:void 0},G=C(Object,"create");var $=function(){this.__data__=G?G(null):{},this.size=0};var R=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},A=Object.prototype.hasOwnProperty;var Y=function(t){var e=this.__data__;if(G){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return A.call(e,t)?e[t]:void 0},D=Object.prototype.hasOwnProperty;var B=function(t){var e=this.__data__;return G?void 0!==e[t]:D.call(e,t)};var H=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=G&&void 0===e?"__lodash_hash_undefined__":e,this};function K(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}K.prototype.clear=$,K.prototype.delete=R,K.prototype.get=Y,K.prototype.has=B,K.prototype.set=H;var U=K;var X=function(){this.__data__=[],this.size=0};var Z=function(t,e){return t===e||t!=t&&e!=e};var q=function(t,e){for(var r=t.length;r--;)if(Z(t[r][0],e))return r;return-1},J=Array.prototype.splice;var Q=function(t){var e=this.__data__,r=q(e,t);return!(r<0)&&(r==e.length-1?e.pop():J.call(e,r,1),--this.size,!0)};var V=function(t){var e=this.__data__,r=q(e,t);return r<0?void 0:e[r][1]};var W=function(t){return q(this.__data__,t)>-1};var tt=function(t,e){var r=this.__data__,n=q(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=X,et.prototype.delete=Q,et.prototype.get=V,et.prototype.has=W,et.prototype.set=tt;var rt=et,nt=C(s,"Map");var ot=function(){this.size=0,this.__data__={hash:new U,map:new(nt||rt),string:new U}};var it=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var at=function(t,e){var r=t.__data__;return it(e)?r["string"==typeof e?"string":"hash"]:r.map};var ct=function(t){var e=at(this,t).delete(t);return this.size-=e?1:0,e};var ut=function(t){return at(this,t).get(t)};var st=function(t){return at(this,t).has(t)};var lt=function(t,e){var r=at(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ht(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ht.prototype.clear=ot,ht.prototype.delete=ct,ht.prototype.get=ut,ht.prototype.has=st,ht.prototype.set=lt;var ft=ht;function pt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(pt.Cache||ft),r}pt.Cache=ft;var dt=pt;var vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yt=/\\(\\)?/g;(function(t){var e=dt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(vt,(function(t,r,n,o){e.push(n?o.replace(yt,"$1"):r||t)})),e}));var gt=l?l.prototype:void 0;gt&>.toString;var mt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},_t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};e.shape({"sketches-host":e.string,"cdn-name":e.string,"cdn-image":e.string}),e.shape({headline:e.string,"last-published-at":e.number,subheadline:e.string});var wt={"./tag-intro-card.module.css":{viewports:'"../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",description:"tag-intro-card-module_description__2PKNY",headline:"tag-intro-card-module_headline__D69tv",wrapper:"tag-intro-card-module_wrapper__2bz6X",dark:"tag-intro-card-module_dark__1IlHe",light:"tag-intro-card-module_light__3BSZP"}},bt=function(e){var r=e.data,n=e.config,o=(void 0===n?{}:n).theme,i=void 0===o?"":o,c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:_t(t);return mt(e)<155?"light":"dark"}(i),u=r.tagDescription,s=r.tagName;return t.createElement("div",{style:{backgroundColor:i,color:c},className:"full-width-with-padding arrow-component "+a("wrapper ".concat(c),wt)},t.createElement("h1",{className:a("headline ".concat(c),wt)},s),t.createElement("div",{className:a("description ".concat(c),wt)},u))};bt.propTypes={data:e.shape({tagName:e.string,tagDescription:e.string}),config:e.shape({theme:e.string})};export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tag-intro-card-module_description__2PKNY{font-size:var(--arrow-fs-xs);
|
|
1
|
+
.tag-intro-card-module_description__2PKNY{font-size:var(--arrow-fs-xs);line-height:var(--arrow-lh-5);margin-top:var(--arrow-spacing-xs)}@media (min-width:768px){.tag-intro-card-module_description__2PKNY{font-size:var(--arrow-fs-s)}}h1.tag-intro-card-module_headline__D69tv{font-size:var(--arrow-fs-m)}@media (min-width:768px){h1.tag-intro-card-module_headline__D69tv{font-size:var(--arrow-fs-l)}}.tag-intro-card-module_wrapper__2bz6X.tag-intro-card-module_dark__1IlHe{border-bottom:1px solid var(--dark-border)}.tag-intro-card-module_wrapper__2bz6X.tag-intro-card-module_light__3BSZP{border-bottom:1px solid var(--light-border)}.tag-intro-card-module_dark__1IlHe{color:var(--arrow-c-mono2)}.tag-intro-card-module_light__3BSZP{color:var(--arrow-c-invert-mono2)}
|
package/Text/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import"react-timeago";function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t){var e={exports:{}};return t(e,e.exports),e.exports}var c=s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),l=u(s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=c)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},u=a.handleMissingStyleName,s=void 0===u?n.default.handleMissingStyleName:u,c=a.autoResolveMultipleImports,l=void 0===c?n.default.autoResolveMultipleImports:c;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],u=i[1],s=r||n.default.handleMissingStyleName;return u?e[a]?e[a][u]?e[a][u]:o("CSS module does not exist: "+u,s):o("CSS module import does not exist: "+a,s):o("Invalid style name: "+t,s)}(t,e,s);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,s)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",s)})).filter((function(t){return t})).join(" "):""}}))),f=Array.isArray,h="object"==typeof a&&a&&a.Object===Object&&a,p="object"==typeof self&&self&&self.Object===Object&&self,v=h||p||Function("return this")(),y=v.Symbol,d=Object.prototype,g=d.hasOwnProperty,m=d.toString,_=y?y.toStringTag:void 0;var b=function(t){var e=g.call(t,_),r=t[_];try{t[_]=void 0;var n=!0}catch(t){}var o=m.call(t);return n&&(e?t[_]=r:delete t[_]),o},w=Object.prototype.toString;var x=function(t){return w.call(t)},j=y?y.toStringTag:void 0;var O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?b(t):x(t)};var E=function(t){return null!=t&&"object"==typeof t};var S=function(t){return"symbol"==typeof t||E(t)&&"[object Symbol]"==O(t)},L=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N=/^\w*$/;var k=function(t,e){if(f(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!S(t))||(N.test(t)||!L.test(t)||null!=e&&t in Object(e))};var P=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var I,M=function(t){if(!P(t))return!1;var e=O(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},T=v["__core-js_shared__"],C=(I=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var F=function(t){return!!C&&C in t},z=Function.prototype.toString;var A=function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""},$=/^\[object .+?Constructor\]$/,G=Function.prototype,R=Object.prototype,Y=G.toString,U=R.hasOwnProperty,H=RegExp("^"+Y.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(t){return!(!P(t)||F(t))&&(M(t)?H:$).test(A(t))};var q=function(t,e){return null==t?void 0:t[e]};var B=function(t,e){var r=q(t,e);return Q(r)?r:void 0},D=B(Object,"create");var J=function(){this.__data__=D?D(null):{},this.size=0};var K=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},V=Object.prototype.hasOwnProperty;var W=function(t){var e=this.__data__;if(D){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(e,t)?e[t]:void 0},X=Object.prototype.hasOwnProperty;var Z=function(t){var e=this.__data__;return D?void 0!==e[t]:X.call(e,t)};var tt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=D&&void 0===e?"__lodash_hash_undefined__":e,this};function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=J,et.prototype.delete=K,et.prototype.get=W,et.prototype.has=Z,et.prototype.set=tt;var rt=et;var nt=function(){this.__data__=[],this.size=0};var ot=function(t,e){return t===e||t!=t&&e!=e};var it=function(t,e){for(var r=t.length;r--;)if(ot(t[r][0],e))return r;return-1},at=Array.prototype.splice;var ut=function(t){var e=this.__data__,r=it(e,t);return!(r<0)&&(r==e.length-1?e.pop():at.call(e,r,1),--this.size,!0)};var st=function(t){var e=this.__data__,r=it(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return it(this.__data__,t)>-1};var lt=function(t,e){var r=this.__data__,n=it(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=nt,ft.prototype.delete=ut,ft.prototype.get=st,ft.prototype.has=ct,ft.prototype.set=lt;var ht=ft,pt=B(v,"Map");var vt=function(){this.size=0,this.__data__={hash:new rt,map:new(pt||ht),string:new rt}};var yt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var dt=function(t,e){var r=t.__data__;return yt(e)?r["string"==typeof e?"string":"hash"]:r.map};var gt=function(t){var e=dt(this,t).delete(t);return this.size-=e?1:0,e};var mt=function(t){return dt(this,t).get(t)};var _t=function(t){return dt(this,t).has(t)};var bt=function(t,e){var r=dt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function wt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}wt.prototype.clear=vt,wt.prototype.delete=gt,wt.prototype.get=mt,wt.prototype.has=_t,wt.prototype.set=bt;var xt=wt;function jt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jt.Cache||xt),r}jt.Cache=xt;var Ot=jt;var Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/\\(\\)?/g,Lt=function(t){var e=Ot(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Et,(function(t,r,n,o){e.push(n?o.replace(St,"$1"):r||t)})),e}));var Nt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},kt=y?y.prototype:void 0,Pt=kt?kt.toString:void 0;var It=function t(e){if("string"==typeof e)return e;if(f(e))return Nt(e,t)+"";if(S(e))return Pt?Pt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Mt=function(t){return null==t?"":It(t)};var Tt=function(t,e){return f(t)?t:k(t,e)?[t]:Lt(Mt(t))};var Ct=function(t){if("string"==typeof t||S(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Ft=function(t,e){for(var r=0,n=(e=Tt(e,t)).length;null!=t&&r<n;)t=t[Ct(e[r++])];return r&&r==n?t:void 0};var zt=function(t,e,r){var n=null==t?void 0:Ft(t,e);return void 0===n?r:n},At=["element","render"],$t=function(e){return function(r){var n=r.element,a=r.render,u=i(r,At);return n?a&&"function"==typeof a?a(r):t.createElement(e,o({},u,{element:n})):null}};$t.propTypes={StoryElement:n.element},s((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?v:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function d(){}function g(){}function m(){}var _={};s(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(k([])));w&&w!==r&&n.call(w,i)&&(_=w);var x=m.prototype=d.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:e,done:!0}}return g.prototype=m,s(x,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(O.prototype),s(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),s(x,u,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var Gt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Rt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Yt=n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),Ut=n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string}),Ht=r(),Qt=["element","opts","css","story","config"],qt={"./text.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",promotionalMessage:"text-m_promotionalMessage__CUsPM",textElement:"text-m_textElement__e3QEt",dark:"text-m_dark__1TC18",light:"text-m_light__2cRe8"}},Bt=function(r){var n=r.element,a=void 0===n?{}:n,u=r.opts,s=void 0===u?{}:u,c=r.css,f=void 0===c?{}:c;r.story,r.config;var h=i(r,Qt),p=a.text;if(!p)return null;var v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Rt(t);return Gt(e)<155?"light":"dark"}((e(Ht)||{}).theme),y=f.textColor,d=s.isExternalLink,g=(void 0===d||d)&&function(t){var e=t,r=t.match(/(<a).*?(>)/g);return r&&r.forEach((function(t){/target=/g.test(t)||(e=e.replace(t,"<a aria-label='content' target='_blank'".concat(t.substring(2))))})),e}(p)||p,m=zt(a,["metadata","promotional-message"],!1),_=m?"promotionalMessage":"textElement";return t.createElement("div",o({style:m?{}:{color:y},"data-test-id":m?"promotional-message":"text",dangerouslySetInnerHTML:{__html:g},id:"text-element"},h,{className:"arrow-component arr--text-element "+l("".concat(_," ").concat(v),qt)+" "+(h&&h.className||"")}))};Bt.propTypes={element:n.shape({text:n.string}),opts:n.shape({isExternalLink:n.bool}),css:n.shape({hyperlinkColor:n.string,textColor:n.string}),story:Ut,config:Yt};var Dt=$t(Bt);export{Dt as Text};
|
package/Text/styles.arrow.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.text-m_promotionalMessage__CUsPM p{font-size:var(--arrow-fs-tiny);padding-bottom:var(--arrow-spacing-xxs)}@media (min-width:768px){.text-m_promotionalMessage__CUsPM p{font-size:var(--arrow-fs-xs);padding-bottom:var(--arrow-spacing-xs)}}.text-m_dark__1TC18,.text-m_textElement__e3QEt p{
|
|
1
|
+
.text-m_promotionalMessage__CUsPM p{font-size:var(--arrow-fs-tiny);padding-bottom:var(--arrow-spacing-xxs)}@media (min-width:768px){.text-m_promotionalMessage__CUsPM p{font-size:var(--arrow-fs-xs);padding-bottom:var(--arrow-spacing-xs)}}.text-m_dark__1TC18,.text-m_textElement__e3QEt p{font-size:var(--arrow-fs-s);line-height:var(--arrow-lh-5)}@media (min-width:768px){.text-m_dark__1TC18,.text-m_textElement__e3QEt p{font-size:var(--arrow-fs-m)}}.text-m_promotionalMessage__CUsPM a,.text-m_textElement__e3QEt a{color:var(--textElementHyperlinkColor)}.text-m_textElement__e3QEt a:hover{border-bottom:1px solid var(--textElementHyperlinkColor);transition:border .3s ease}.text-m_textElement__e3QEt.text-m_light__2cRe8 p{color:var(--arrow-c-invert-mono2)}.text-m_promotionalMessage__CUsPM a:hover{border-bottom:1px solid;color:var(--arrow-c-brand1);padding-bottom:3px;transition:all .3s ease 0s}.text-m_promotionalMessage__CUsPM.text-m_dark__1TC18 p{color:var(--arrow-c-mono4)}.text-m_promotionalMessage__CUsPM.text-m_light__2cRe8 p{color:var(--arrow-c-invert-mono4)}
|