@times-components/ts-styleguide 1.38.2 → 1.38.4
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.38.4](https://github.com/newsuk/times-components/compare/@times-components/ts-styleguide@1.38.3...@times-components/ts-styleguide@1.38.4) (2023-01-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @times-components/ts-styleguide
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.38.3](https://github.com/newsuk/times-components/compare/@times-components/ts-styleguide@1.38.2...@times-components/ts-styleguide@1.38.3) (2023-01-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **TDP-3095:** changed uppercase to none for style section heading in… ([#3222](https://github.com/newsuk/times-components/issues/3222)) ([6a719b8](https://github.com/newsuk/times-components/commit/6a719b8f2fd5fea63b7fa62b49bbfa83aafb0e30))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.38.2](https://github.com/newsuk/times-components/compare/@times-components/ts-styleguide@1.38.1...@times-components/ts-styleguide@1.38.2) (2023-01-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @times-components/ts-styleguide
|
|
@@ -16,7 +16,7 @@ describe('themeFactory()', () => {
|
|
|
16
16
|
headlineFont: 'styleMagazine',
|
|
17
17
|
pullQuoteFont: 'styleMagazine',
|
|
18
18
|
sectionColour: undefined,
|
|
19
|
-
headlineCase: '
|
|
19
|
+
headlineCase: 'none'
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
it('should return correct theme for a maincomment style page', () => {
|
|
@@ -38,4 +38,4 @@ describe('themeFactory()', () => {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWVGYWN0b3J5LnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3R5bGVndWlkZS9fX3Rlc3RzX18vdGhlbWVGYWN0b3J5LnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLFlBQVksTUFBTSxpQkFBaUIsQ0FBQztBQUUzQyxRQUFRLENBQUMsZ0JBQWdCLEVBQUUsR0FBRyxFQUFFO0lBQzlCLEVBQUUsQ0FBQyxtRUFBbUUsRUFBRSxHQUFHLEVBQUU7UUFDM0UsTUFBTSxDQUFDLFlBQVksRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDO1lBQzdCLFdBQVcsRUFBRSxTQUFTO1lBQ3RCLFlBQVksRUFBRSxJQUFJO1lBQ2xCLFlBQVksRUFBRSxVQUFVO1lBQ3hCLGFBQWEsRUFBRSxpQkFBaUI7WUFDaEMsYUFBYSxFQUFFLFNBQVM7U0FDekIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUM7SUFFSCxFQUFFLENBQUMsdURBQXVELEVBQUUsR0FBRyxFQUFFO1FBQy9ELE1BQU0sQ0FBQyxZQUFZLENBQUMsT0FBTyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDO1lBQy9DLFdBQVcsRUFBRSxlQUFlO1lBQzVCLFlBQVksRUFBRSxlQUFlO1lBQzdCLGFBQWEsRUFBRSxlQUFlO1lBQzlCLGFBQWEsRUFBRSxTQUFTO1lBQ3hCLFlBQVksRUFBRSxNQUFNO1NBQ3JCLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLDBEQUEwRCxFQUFFLEdBQUcsRUFBRTtRQUNsRSxNQUFNLENBQUMsWUFBWSxDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQztZQUNuRCxXQUFXLEVBQUUsU0FBUztZQUN0QixZQUFZLEVBQUUsVUFBVTtZQUN4QixhQUFhLEVBQUUsaUJBQWlCO1lBQ2hDLGFBQWEsRUFBRSxTQUFTO1lBQ3hCLFlBQVksRUFBRSxJQUFJO1NBQ25CLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLGlFQUFpRSxFQUFFLEdBQUcsRUFBRTtRQUN6RSxNQUFNLENBQUMsWUFBWSxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQztZQUNqRCxXQUFXLEVBQUUsaUJBQWlCO1lBQzlCLFlBQVksRUFBRSxpQkFBaUI7WUFDL0IsYUFBYSxFQUFFLGlCQUFpQjtZQUNoQyxhQUFhLEVBQUUsU0FBUztZQUN4QixZQUFZLEVBQUUsSUFBSTtTQUNuQixDQUFDLENBQUM7SUFDTCxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQyxDQUFDIn0=
|
|
@@ -43,7 +43,7 @@ const magazineFontPicker = (defaultFont, section, template) => {
|
|
|
43
43
|
const headlineCasePicker = (section, template) => section &&
|
|
44
44
|
section.toLowerCase() === 'style' &&
|
|
45
45
|
['indepth', 'magazinestandard', 'magazinecomment'].includes(template)
|
|
46
|
-
? '
|
|
46
|
+
? 'none'
|
|
47
47
|
: null;
|
|
48
48
|
export default (sectionParam, templateParam) => {
|
|
49
49
|
const section = sectionParam || 'default';
|
|
@@ -53,7 +53,7 @@ export default (sectionParam, templateParam) => {
|
|
|
53
53
|
headlineFont: magazineFontPicker('headline', section, template),
|
|
54
54
|
pullQuoteFont: magazineFontPicker('headlineRegular', section, template),
|
|
55
55
|
sectionColour: sectionColourPicker(section, template),
|
|
56
|
-
headlineCase: headlineCasePicker(section, template)
|
|
56
|
+
headlineCase: section.length ? headlineCasePicker(section, template) : null
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWVGYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0eWxlZ3VpZGUvdGhlbWVGYWN0b3J5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFNUUsTUFBTSx5QkFBeUIsR0FBMkM7SUFDeEUsT0FBTyxFQUFFLEVBQUU7SUFDWCxlQUFlLEVBQUU7UUFDZixHQUFHLGNBQWM7UUFDakIsR0FBRyx1QkFBdUI7S0FDM0I7SUFDRCxnQkFBZ0IsRUFBRTtRQUNoQixHQUFHLGNBQWM7UUFDakIsR0FBRyx1QkFBdUI7S0FDM0I7SUFDRCxXQUFXLEVBQUU7UUFDWCxHQUFHLGNBQWM7S0FDbEI7SUFDRCxZQUFZLEVBQUU7UUFDWixHQUFHLGNBQWM7S0FDbEI7SUFDRCxZQUFZLEVBQUUsRUFBRTtDQUNqQixDQUFDO0FBRUYsTUFBTSxnQkFBZ0IsR0FBMkI7SUFDL0MsT0FBTyxFQUFFLGlCQUFpQjtJQUMxQixPQUFPLEVBQUUsaUJBQWlCO0lBQzFCLEtBQUssRUFBRSxlQUFlO0lBQ3RCLEtBQUssRUFBRSxlQUFlO0lBQ3RCLDJCQUEyQixFQUFFLFlBQVk7SUFDekMsc0JBQXNCLEVBQUUsWUFBWTtJQUNwQywyQkFBMkIsRUFBRSxZQUFZO0NBQzFDLENBQUM7QUFFRixNQUFNLHNCQUFzQixHQUEyQztJQUNyRSxPQUFPLEVBQUUsZ0JBQWdCO0lBQ3pCLGVBQWUsRUFBRSxnQkFBZ0I7SUFDakMsZ0JBQWdCLEVBQUUsZ0JBQWdCO0lBQ2xDLFdBQVcsRUFBRSxFQUFFO0lBQ2YsWUFBWSxFQUFFLEVBQUU7SUFDaEIsWUFBWSxFQUFFLEVBQUU7Q0FDakIsQ0FBQztBQUlGLE1BQU0sbUJBQW1CLEdBQUcsQ0FDMUIsT0FBd0QsRUFDeEQsUUFBZ0QsRUFDaEQsRUFBRTtJQUNGLE9BQU8seUJBQXlCLENBQUMsUUFBUSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDdEQsQ0FBQyxDQUFDO0FBRUYsTUFBTSxrQkFBa0IsR0FBRyxDQUN6QixXQUFtQixFQUNuQixPQUF3RCxFQUN4RCxRQUE2QyxFQUM3QyxFQUFFO0lBQ0YsT0FBTyxzQkFBc0IsQ0FBQyxRQUFRLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxXQUFXLENBQUM7QUFDbEUsQ0FBQyxDQUFDO0FBRUYsTUFBTSxrQkFBa0IsR0FBRyxDQUN6QixPQUE0QyxFQUM1QyxRQUE2QyxFQUM3QyxFQUFFLENBQ0YsT0FBTztJQUNQLE9BQU8sQ0FBQyxXQUFXLEVBQUUsS0FBSyxPQUFPO0lBQ2pDLENBQUMsU0FBUyxFQUFFLGtCQUFrQixFQUFFLGlCQUFpQixDQUFDLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQztJQUNuRSxDQUFDLENBQUMsTUFBTTtJQUNSLENBQUMsQ0FBQyxJQUFJLENBQUM7QUFFWCxlQUFlLENBQ2IsWUFBa0QsRUFDbEQsYUFBbUQsRUFDbkQsRUFBRTtJQUNGLE1BQU0sT0FBTyxHQUFHLFlBQVksSUFBSSxTQUFTLENBQUM7SUFDMUMsTUFBTSxRQUFRLEdBQUcsYUFBYSxJQUFJLGNBQWMsQ0FBQztJQUVqRCxPQUFPO1FBQ0wsV0FBVyxFQUFFLGtCQUFrQixDQUFDLFNBQVMsRUFBRSxPQUFPLEVBQUUsUUFBUSxDQUFDO1FBQzdELFlBQVksRUFBRSxrQkFBa0IsQ0FBQyxVQUFVLEVBQUUsT0FBTyxFQUFFLFFBQVEsQ0FBQztRQUMvRCxhQUFhLEVBQUUsa0JBQWtCLENBQUMsaUJBQWlCLEVBQUUsT0FBTyxFQUFFLFFBQVEsQ0FBQztRQUN2RSxhQUFhLEVBQUUsbUJBQW1CLENBQUMsT0FBTyxFQUFFLFFBQVEsQ0FBQztRQUNyRCxZQUFZLEVBQUUsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsa0JBQWtCLENBQUMsT0FBTyxFQUFFLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJO0tBQzVFLENBQUM7QUFDSixDQUFDLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/ts-styleguide",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.4",
|
|
4
4
|
"description": "Reuseable Typescript React Components styleguide",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dev": "dist/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"node": ">=8.9"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@times-components/link": "3.11.
|
|
55
|
-
"@times-components/utils": "6.15.
|
|
54
|
+
"@times-components/link": "3.11.11",
|
|
55
|
+
"@times-components/utils": "6.15.11",
|
|
56
56
|
"react": "16.9.0",
|
|
57
57
|
"styled-components": "4.3.2"
|
|
58
58
|
},
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"@testing-library/jest-dom/extend-expect"
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "ec737e75af249f914d53d110c7d1a05cc70a7d6f"
|
|
85
85
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";n.r(t);n(1);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o={artsfeatures:"#622956",bricksmortar:"#006469",business:"#005B8D",comment:"#850029",culture:"#7B0046",default:"#1D1D1B",defcon:"#FF1D25",driving:"#C04605",focus:"#CC0000",gardening:"#00313B",home:"#8D724D",ireland:"#004E45",law:"#691D26",money:"#006A74",news:"#13354E",newsreview:"#004D6D",puzzle:"#C74600",register:"#6C6C69",saturdayreview:"#A31D24",scotland:"#00233E",sport:"#008347",style:"#BC3385",techgames:"#1A1F24",thedish:"#DB133B",thegame:"#006469",thesundaytimesmagazine:"#1D1D1D",thetimesmagazine:"#1D1D1D",times2:"#622956",todaysmagazines:"#1D1D1B",travel:"#2C79AD",weekend:"#05829A",world:"#636C17"},l={"Arts & Features":o.artsfeatures,"Bricks & Mortar":o.bricksmortar,Business:o.business,Comment:o.comment,Culture:o.culture,Driving:o.driving,Focus:o.focus,Gardening:o.gardening,Home:o.home,Ireland:o.ireland,Law:o.law,Money:o.money,News:o.news,"News Review":o.newsreview,Puzzles:o.puzzle,Register:o.register,"Saturday Review":o.saturdayreview,Scotland:o.scotland,Sport:o.sport,Style:o.style,"Tech & Games":o.techgames,"The Dish":o.thedish,"The Game":o.thegame,"The Sunday Times Magazine":o.thesundaytimesmagazine,"The Times Magazine":o.thetimesmagazine,Times2:o.times2,"Today's Magazines":o.todaysmagazines,Travel:o.travel,Weekend:o.weekend,World:o.world},d={thesundaytimesmagazine:"#F13D00"},s={"The Sunday Times Magazine":d.thesundaytimesmagazine},u=a(a({},o),l),c=a(a({},d),s);var g={functional:{action:"#006699",actionPressed:"#0077B3",articleFlagExclusive:"#C51D24",articleFlagNew:"#E34605",articleFlagUpdated:"#3C81BE",backgroundPrimary:"#F9F9F9",backgroundSecondary:"#EDEDED",black:"#000000",border:"#F0F0F0",brandColour:"#1D1D1B",bullet:"#103546",contrast:"#FFFFFF",darkSupplement:"#272D34",greyLabel:"#CCC",greyStickyBarBoxShadow:"#c9c7c7ed",greyStickyBarBorderBottom:"#ffffffdb",gutter:"#f0f0f0",keyline:"#DBDBDB",modalBackground:"#000000",newsletterPuffBackground:"#F9F8F3",overlayGradientEnd:"#00000000",overlayGradientFallback:"#000000B3",overlayGradientStart:"#000000E6",primary:"#333333",secondary:"#696969",tertiary:"#4D4D4D",transparentBlack:"rgba(0, 0, 0, 0.6)",transparentWhite:"rgba(255, 255, 255, 0.3)",white:"#FFFFFF",whiteGrey:"#F5F5F5"},secondarySectionColours:c,section:u},m=n(0),f=n.n(m),p=f.a.div.withConfig({displayName:"TsTcView",componentId:"sc-154dp5w-0"})(["border:0px solid black;box-sizing:border-box;display:flex;flex-direction:column;margin:",";border-bottom-color:",";border-bottom-width:",";border-radius:",";overflow:",";height:",";width:",";margin:0px;min-height:0px;min-width:0px;padding:0px;position:relative;z-index:0;"],e=>{let t=e.style;return t&&t.margin?t.margin:"0px"},e=>{let t=e.style;return t&&t.borderBottomColor?t.borderBottomColor:"black"},e=>{let t=e.style;return t&&t.borderBottomWidth?t.borderBottomWidth:"0px"},e=>{let t=e.style;return t&&t.borderRadius&&t.borderRadius},e=>{let t=e.style;return t&&t.overflow&&t.overflow},e=>{let t=e.style;return t&&t.height&&t.height},e=>{let t=e.style;return t&&t.width&&t.width});const b=Object(m.keyframes)(["from{opacity:0;}to{opacity:1;}"]);var y={FadeIn:f()(p).withConfig({displayName:"Animations__FadeIn",componentId:"w31u4-0"})(["animation:"," 0.3s ease-in-out;"],b)};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O={huge:"huge",medium:"medium",small:"small",wide:"wide"},v={huge:1366,medium:768,wide:1024},M=v.huge,D=e=>e<v.medium?O.small:e<v.wide?O.medium:e<v.huge?O.wide:O.huge;var z=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({editionBreakpoints:O,editionMaxWidth:M,editionBreakpointWidths:v,sliceContentMaxWidth:1180},{huge:1320,medium:768,nativeTablet:660,nativeTabletWide:1194,small:520,wide:1024});const j={body:{bodyMobile:30,puffLink:15,secondary:27,teaser:20,tertiary:26},bodyRegular:{infoSubText:23,infoTitle:30,pageComponentHeadline:25},bodyRegularSmallCaps:{cardMetaMobile:12,meta:14},cultureMagazine:{headline:35,pageHeadline:42},headline:{articleHeadline:45,commentsHeadline:29,headline:33,infoTitle:22,leadHeadline:26,pageComponentHeadline:27,pageHeadline:40,smallHeadline:27,tileLeadHeadline:35,heading2Mobile:26,heading3Mobile:26,heading4Mobile:26,heading5Mobile:26},headlineRegular:{pageComponentHeadline:30,smallestHeadline:26,strapline:24},stMagazine:{headline:35,pageHeadline:42},styleMagazine:{headline:35,pageHeadline:42},supporting:{button:16,caption:13,cardMeta:15,cardMetaMobile:14,keyFactsTitle:18,link:13,meta:14,pagingMeta:15,tertiary:17}};var F=e=>{let t=e.font,n=e.fontSize;return j[t][n]},S={body:"TimesDigitalW04",bodyRegular:"TimesDigitalW04-Regular",bodyRegularSmallCaps:"TimesDigitalW04-RegularSC",cultureMagazine:"TimesModern-Bold",dropCap:"TimesModern-Regular",headline:"TimesModern-Bold",headlineRegular:"TimesModern-Regular",stMagazine:"TimesModern-Bold",styleMagazine:"TimesModern-Bold",supporting:"GillSansMTStd-Medium"},T=e=>{let t=e.font,n=e.fontSize;return{fontFamily:Q().fonts[t],fontSize:P[n],lineHeight:F({font:t,fontSize:n})}},P={articleHeadline:45,articleMeta:15,body:18,bodyMobile:17,button:16,caption:13,cardHeadline:27,cardMeta:13,cardMetaMobile:12,commentsGuidelines:13,commentsHeadline:27,credits:9,headline:30,imageOverlayTextSmall:11,infoTitle:22,keyFactsTitle:24,leadHeadline:26,link:13,meta:14,newsletterPuffLabel:12,newsletterPuffHeadline:28,newsletterPuffCopy:15,pageComponentHeadline:25,pageHeadline:40,pageHeadlineLarge:50,pagingMeta:15,puffLink:11,secondary:16,sliceHeadline:32,smallestHeadline:20,smallHeadline:22,strapline:22,teaser:14,tertiary:15,tileLeadHeadline:35,heading2Mobile:25,heading3Mobile:22,heading4Mobile:19,heading5Mobile:17,infoSubText:18,heading2:28,heading3:24,heading4:20,heading5:19};function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x={indepth:{},magazinecomment:C(C({},u),c),magazinestandard:C(C({},u),c),maincomment:C({},u),mainstandard:C({},u),takeoverpage:{}},H={culture:"cultureMagazine",Culture:"cultureMagazine",style:"styleMagazine",Style:"styleMagazine","The Sunday Times Magazine":"stMagazine",thesundaytimesmagazine:"stMagazine","the sunday times magazine":"stMagazine"},E={indepth:H,magazinecomment:H,magazinestandard:H,maincomment:{},mainstandard:{},takeoverpage:{}},W=(e,t)=>x[t][e],R=(e,t,n)=>E[n][t]||e,A=(e,t)=>e&&"style"===e.toLowerCase()&&["indepth","magazinestandard","magazinecomment"].includes(t)?"uppercase":null;var G=(e,t)=>{const n=e||"default",r=t||"mainstandard";return{dropCapFont:R("dropCap",n,r),headlineFont:R("headline",n,r),pullQuoteFont:R("headlineRegular",n,r),sectionColour:W(n,r),headlineCase:A(n,r)}},L=Object.freeze({large:"large",medium:"medium",xlarge:"xlarge"});const _={tabletHeadline:{marginBottom:5},tabletTeaser:{marginTop:5}};var I=e=>"".concat((e=>5*e)(e),"px");const N=z.nativeTablet,q=z.nativeTabletWide;var Q=()=>({Animations:y,colours:g,fontFactory:T,fonts:S,fontSizes:P,lineHeight:F,spacing:I});n.d(t,"styleguide",(function(){return Q})),n.d(t,"Animations",(function(){return y})),n.d(t,"breakpoints",(function(){return z})),n.d(t,"colours",(function(){return g})),n.d(t,"editionBreakpoints",(function(){return O})),n.d(t,"editionBreakpointWidths",(function(){return v})),n.d(t,"editionMaxWidth",(function(){return M})),n.d(t,"sliceContentMaxWidth",(function(){return 1180})),n.d(t,"fonts",(function(){return S})),n.d(t,"fontFactory",(function(){return T})),n.d(t,"fontSizes",(function(){return P})),n.d(t,"getEditionBreakpoint",(function(){return D})),n.d(t,"lineHeight",(function(){return F})),n.d(t,"scales",(function(){return L})),n.d(t,"spacing",(function(){return I})),n.d(t,"globalSpacingStyles",(function(){return _})),n.d(t,"tabletRowPadding",(function(){return 20})),n.d(t,"tabletWidth",(function(){return N})),n.d(t,"tabletWidthMax",(function(){return q})),n.d(t,"themeFactory",(function(){return G}))}]);
|
|
1
|
+
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";n.r(t);n(1);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o={artsfeatures:"#622956",bricksmortar:"#006469",business:"#005B8D",comment:"#850029",culture:"#7B0046",default:"#1D1D1B",defcon:"#FF1D25",driving:"#C04605",focus:"#CC0000",gardening:"#00313B",home:"#8D724D",ireland:"#004E45",law:"#691D26",money:"#006A74",news:"#13354E",newsreview:"#004D6D",puzzle:"#C74600",register:"#6C6C69",saturdayreview:"#A31D24",scotland:"#00233E",sport:"#008347",style:"#BC3385",techgames:"#1A1F24",thedish:"#DB133B",thegame:"#006469",thesundaytimesmagazine:"#1D1D1D",thetimesmagazine:"#1D1D1D",times2:"#622956",todaysmagazines:"#1D1D1B",travel:"#2C79AD",weekend:"#05829A",world:"#636C17"},l={"Arts & Features":o.artsfeatures,"Bricks & Mortar":o.bricksmortar,Business:o.business,Comment:o.comment,Culture:o.culture,Driving:o.driving,Focus:o.focus,Gardening:o.gardening,Home:o.home,Ireland:o.ireland,Law:o.law,Money:o.money,News:o.news,"News Review":o.newsreview,Puzzles:o.puzzle,Register:o.register,"Saturday Review":o.saturdayreview,Scotland:o.scotland,Sport:o.sport,Style:o.style,"Tech & Games":o.techgames,"The Dish":o.thedish,"The Game":o.thegame,"The Sunday Times Magazine":o.thesundaytimesmagazine,"The Times Magazine":o.thetimesmagazine,Times2:o.times2,"Today's Magazines":o.todaysmagazines,Travel:o.travel,Weekend:o.weekend,World:o.world},d={thesundaytimesmagazine:"#F13D00"},u={"The Sunday Times Magazine":d.thesundaytimesmagazine},s=a(a({},o),l),c=a(a({},d),u);var g={functional:{action:"#006699",actionPressed:"#0077B3",articleFlagExclusive:"#C51D24",articleFlagNew:"#E34605",articleFlagUpdated:"#3C81BE",backgroundPrimary:"#F9F9F9",backgroundSecondary:"#EDEDED",black:"#000000",border:"#F0F0F0",brandColour:"#1D1D1B",bullet:"#103546",contrast:"#FFFFFF",darkSupplement:"#272D34",greyLabel:"#CCC",greyStickyBarBoxShadow:"#c9c7c7ed",greyStickyBarBorderBottom:"#ffffffdb",gutter:"#f0f0f0",keyline:"#DBDBDB",modalBackground:"#000000",newsletterPuffBackground:"#F9F8F3",overlayGradientEnd:"#00000000",overlayGradientFallback:"#000000B3",overlayGradientStart:"#000000E6",primary:"#333333",secondary:"#696969",tertiary:"#4D4D4D",transparentBlack:"rgba(0, 0, 0, 0.6)",transparentWhite:"rgba(255, 255, 255, 0.3)",white:"#FFFFFF",whiteGrey:"#F5F5F5"},secondarySectionColours:c,section:s},m=n(0),f=n.n(m),p=f.a.div.withConfig({displayName:"TsTcView",componentId:"sc-154dp5w-0"})(["border:0px solid black;box-sizing:border-box;display:flex;flex-direction:column;margin:",";border-bottom-color:",";border-bottom-width:",";border-radius:",";overflow:",";height:",";width:",";margin:0px;min-height:0px;min-width:0px;padding:0px;position:relative;z-index:0;"],e=>{let t=e.style;return t&&t.margin?t.margin:"0px"},e=>{let t=e.style;return t&&t.borderBottomColor?t.borderBottomColor:"black"},e=>{let t=e.style;return t&&t.borderBottomWidth?t.borderBottomWidth:"0px"},e=>{let t=e.style;return t&&t.borderRadius&&t.borderRadius},e=>{let t=e.style;return t&&t.overflow&&t.overflow},e=>{let t=e.style;return t&&t.height&&t.height},e=>{let t=e.style;return t&&t.width&&t.width});const b=Object(m.keyframes)(["from{opacity:0;}to{opacity:1;}"]);var y={FadeIn:f()(p).withConfig({displayName:"Animations__FadeIn",componentId:"w31u4-0"})(["animation:"," 0.3s ease-in-out;"],b)};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O={huge:"huge",medium:"medium",small:"small",wide:"wide"},v={huge:1366,medium:768,wide:1024},M=v.huge,D=e=>e<v.medium?O.small:e<v.wide?O.medium:e<v.huge?O.wide:O.huge;var z=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({editionBreakpoints:O,editionMaxWidth:M,editionBreakpointWidths:v,sliceContentMaxWidth:1180},{huge:1320,medium:768,nativeTablet:660,nativeTabletWide:1194,small:520,wide:1024});const j={body:{bodyMobile:30,puffLink:15,secondary:27,teaser:20,tertiary:26},bodyRegular:{infoSubText:23,infoTitle:30,pageComponentHeadline:25},bodyRegularSmallCaps:{cardMetaMobile:12,meta:14},cultureMagazine:{headline:35,pageHeadline:42},headline:{articleHeadline:45,commentsHeadline:29,headline:33,infoTitle:22,leadHeadline:26,pageComponentHeadline:27,pageHeadline:40,smallHeadline:27,tileLeadHeadline:35,heading2Mobile:26,heading3Mobile:26,heading4Mobile:26,heading5Mobile:26},headlineRegular:{pageComponentHeadline:30,smallestHeadline:26,strapline:24},stMagazine:{headline:35,pageHeadline:42},styleMagazine:{headline:35,pageHeadline:42},supporting:{button:16,caption:13,cardMeta:15,cardMetaMobile:14,keyFactsTitle:18,link:13,meta:14,pagingMeta:15,tertiary:17}};var F=e=>{let t=e.font,n=e.fontSize;return j[t][n]},S={body:"TimesDigitalW04",bodyRegular:"TimesDigitalW04-Regular",bodyRegularSmallCaps:"TimesDigitalW04-RegularSC",cultureMagazine:"TimesModern-Bold",dropCap:"TimesModern-Regular",headline:"TimesModern-Bold",headlineRegular:"TimesModern-Regular",stMagazine:"TimesModern-Bold",styleMagazine:"TimesModern-Bold",supporting:"GillSansMTStd-Medium"},T=e=>{let t=e.font,n=e.fontSize;return{fontFamily:Q().fonts[t],fontSize:P[n],lineHeight:F({font:t,fontSize:n})}},P={articleHeadline:45,articleMeta:15,body:18,bodyMobile:17,button:16,caption:13,cardHeadline:27,cardMeta:13,cardMetaMobile:12,commentsGuidelines:13,commentsHeadline:27,credits:9,headline:30,imageOverlayTextSmall:11,infoTitle:22,keyFactsTitle:24,leadHeadline:26,link:13,meta:14,newsletterPuffLabel:12,newsletterPuffHeadline:28,newsletterPuffCopy:15,pageComponentHeadline:25,pageHeadline:40,pageHeadlineLarge:50,pagingMeta:15,puffLink:11,secondary:16,sliceHeadline:32,smallestHeadline:20,smallHeadline:22,strapline:22,teaser:14,tertiary:15,tileLeadHeadline:35,heading2Mobile:25,heading3Mobile:22,heading4Mobile:19,heading5Mobile:17,infoSubText:18,heading2:28,heading3:24,heading4:20,heading5:19};function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x={indepth:{},magazinecomment:C(C({},s),c),magazinestandard:C(C({},s),c),maincomment:C({},s),mainstandard:C({},s),takeoverpage:{}},H={culture:"cultureMagazine",Culture:"cultureMagazine",style:"styleMagazine",Style:"styleMagazine","The Sunday Times Magazine":"stMagazine",thesundaytimesmagazine:"stMagazine","the sunday times magazine":"stMagazine"},E={indepth:H,magazinecomment:H,magazinestandard:H,maincomment:{},mainstandard:{},takeoverpage:{}},W=(e,t)=>x[t][e],R=(e,t,n)=>E[n][t]||e,A=(e,t)=>e&&"style"===e.toLowerCase()&&["indepth","magazinestandard","magazinecomment"].includes(t)?"none":null;var G=(e,t)=>{const n=e||"default",r=t||"mainstandard";return{dropCapFont:R("dropCap",n,r),headlineFont:R("headline",n,r),pullQuoteFont:R("headlineRegular",n,r),sectionColour:W(n,r),headlineCase:n.length?A(n,r):null}},L=Object.freeze({large:"large",medium:"medium",xlarge:"xlarge"});const _={tabletHeadline:{marginBottom:5},tabletTeaser:{marginTop:5}};var I=e=>"".concat((e=>5*e)(e),"px");const N=z.nativeTablet,q=z.nativeTabletWide;var Q=()=>({Animations:y,colours:g,fontFactory:T,fonts:S,fontSizes:P,lineHeight:F,spacing:I});n.d(t,"styleguide",(function(){return Q})),n.d(t,"Animations",(function(){return y})),n.d(t,"breakpoints",(function(){return z})),n.d(t,"colours",(function(){return g})),n.d(t,"editionBreakpoints",(function(){return O})),n.d(t,"editionBreakpointWidths",(function(){return v})),n.d(t,"editionMaxWidth",(function(){return M})),n.d(t,"sliceContentMaxWidth",(function(){return 1180})),n.d(t,"fonts",(function(){return S})),n.d(t,"fontFactory",(function(){return T})),n.d(t,"fontSizes",(function(){return P})),n.d(t,"getEditionBreakpoint",(function(){return D})),n.d(t,"lineHeight",(function(){return F})),n.d(t,"scales",(function(){return L})),n.d(t,"spacing",(function(){return I})),n.d(t,"globalSpacingStyles",(function(){return _})),n.d(t,"tabletRowPadding",(function(){return 20})),n.d(t,"tabletWidth",(function(){return N})),n.d(t,"tabletWidthMax",(function(){return q})),n.d(t,"themeFactory",(function(){return G}))}]);
|
|
@@ -62,7 +62,7 @@ const headlineCasePicker = (
|
|
|
62
62
|
section &&
|
|
63
63
|
section.toLowerCase() === 'style' &&
|
|
64
64
|
['indepth', 'magazinestandard', 'magazinecomment'].includes(template)
|
|
65
|
-
? '
|
|
65
|
+
? 'none'
|
|
66
66
|
: null;
|
|
67
67
|
|
|
68
68
|
export default (
|
|
@@ -77,6 +77,6 @@ export default (
|
|
|
77
77
|
headlineFont: magazineFontPicker('headline', section, template),
|
|
78
78
|
pullQuoteFont: magazineFontPicker('headlineRegular', section, template),
|
|
79
79
|
sectionColour: sectionColourPicker(section, template),
|
|
80
|
-
headlineCase: headlineCasePicker(section, template)
|
|
80
|
+
headlineCase: section.length ? headlineCasePicker(section, template) : null
|
|
81
81
|
};
|
|
82
82
|
};
|