@times-components/article-label 2.9.6 → 2.10.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/CHANGELOG.md +27 -0
- package/babel.config.js +12 -1
- package/dist/article-label.js +16 -18
- package/dist/style/index.js +5 -5
- package/dist/style/shared.js +3 -3
- package/package.json +9 -15
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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
|
+
# [2.10.0](https://github.com/newsuk/times-components/compare/@times-components/article-label@2.9.8...@times-components/article-label@2.10.0) (2022-08-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **TDP-1712:** remove react-native foreverrrrr ([#3064](https://github.com/newsuk/times-components/issues/3064)) ([2a20cb5](https://github.com/newsuk/times-components/commit/2a20cb5abc10a4e7ca2d62487967f8fcf4eccb62)), closes [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3050](https://github.com/newsuk/times-components/issues/3050) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3057](https://github.com/newsuk/times-components/issues/3057) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3065](https://github.com/newsuk/times-components/issues/3065) [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3069](https://github.com/newsuk/times-components/issues/3069) [#3068](https://github.com/newsuk/times-components/issues/3068) [#3070](https://github.com/newsuk/times-components/issues/3070) [#3072](https://github.com/newsuk/times-components/issues/3072) [#3073](https://github.com/newsuk/times-components/issues/3073) [#3071](https://github.com/newsuk/times-components/issues/3071) [#3074](https://github.com/newsuk/times-components/issues/3074) [#3076](https://github.com/newsuk/times-components/issues/3076) [#3079](https://github.com/newsuk/times-components/issues/3079) [#3078](https://github.com/newsuk/times-components/issues/3078) [#3083](https://github.com/newsuk/times-components/issues/3083) [#3087](https://github.com/newsuk/times-components/issues/3087) [#3091](https://github.com/newsuk/times-components/issues/3091) [#3096](https://github.com/newsuk/times-components/issues/3096) [#3102](https://github.com/newsuk/times-components/issues/3102) [#3105](https://github.com/newsuk/times-components/issues/3105) [#3108](https://github.com/newsuk/times-components/issues/3108) [#3111](https://github.com/newsuk/times-components/issues/3111) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3113](https://github.com/newsuk/times-components/issues/3113) [#3114](https://github.com/newsuk/times-components/issues/3114) [#3120](https://github.com/newsuk/times-components/issues/3120) [#3119](https://github.com/newsuk/times-components/issues/3119) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3127](https://github.com/newsuk/times-components/issues/3127) [#3116](https://github.com/newsuk/times-components/issues/3116) [#3128](https://github.com/newsuk/times-components/issues/3128) [#3132](https://github.com/newsuk/times-components/issues/3132) [#3133](https://github.com/newsuk/times-components/issues/3133)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.9.8](https://github.com/newsuk/times-components/compare/@times-components/article-label@2.9.7...@times-components/article-label@2.9.8) (2022-08-12)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @times-components/article-label
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [2.9.7](https://github.com/newsuk/times-components/compare/@times-components/article-label@2.9.6...@times-components/article-label@2.9.7) (2022-08-05)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @times-components/article-label
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [2.9.6](https://github.com/newsuk/times-components/compare/@times-components/article-label@2.9.5...@times-components/article-label@2.9.6) (2022-07-26)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @times-components/article-label
|
package/babel.config.js
CHANGED
|
@@ -2,6 +2,17 @@ module.exports = api => {
|
|
|
2
2
|
api.cache(true);
|
|
3
3
|
return {
|
|
4
4
|
plugins: ["babel-plugin-styled-components"],
|
|
5
|
-
presets: [
|
|
5
|
+
presets: [
|
|
6
|
+
[
|
|
7
|
+
"@babel/preset-env",
|
|
8
|
+
{
|
|
9
|
+
targets: {
|
|
10
|
+
esmodules: true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"@babel/preset-react",
|
|
15
|
+
"@babel/preset-typescript"
|
|
16
|
+
]
|
|
6
17
|
};
|
|
7
18
|
};
|
package/dist/article-label.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _style = _interopRequireDefault(require("./style"));
|
|
15
15
|
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
19
|
|
|
@@ -21,33 +21,31 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
21
21
|
|
|
22
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
};
|
|
24
|
+
const articleStyle = color => _objectSpread(_objectSpread({}, (0, _utils.checkStylesForUnits)(_style.default.title)), {}, {
|
|
25
|
+
color: (0, _utils.gqlRgbaToHex)(color) || color
|
|
26
|
+
});
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const ArticleLabel = _ref => {
|
|
29
|
+
let color = _ref.color,
|
|
32
30
|
title = _ref.title;
|
|
33
|
-
return /*#__PURE__*/_react
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_utils.TcText, {
|
|
34
32
|
style: articleStyle(color)
|
|
35
33
|
}, title.toUpperCase());
|
|
36
34
|
};
|
|
37
35
|
|
|
38
36
|
ArticleLabel.propTypes = {
|
|
39
|
-
color: _propTypes
|
|
40
|
-
rgba: _propTypes
|
|
41
|
-
alpha: _propTypes
|
|
42
|
-
blue: _propTypes
|
|
43
|
-
green: _propTypes
|
|
44
|
-
red: _propTypes
|
|
37
|
+
color: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
|
38
|
+
rgba: _propTypes.default.shape({
|
|
39
|
+
alpha: _propTypes.default.number,
|
|
40
|
+
blue: _propTypes.default.number,
|
|
41
|
+
green: _propTypes.default.number,
|
|
42
|
+
red: _propTypes.default.number
|
|
45
43
|
})
|
|
46
44
|
})]),
|
|
47
|
-
title: _propTypes
|
|
45
|
+
title: _propTypes.default.string.isRequired
|
|
48
46
|
};
|
|
49
47
|
ArticleLabel.defaultProps = {
|
|
50
48
|
color: "black"
|
|
51
49
|
};
|
|
52
50
|
var _default = ArticleLabel;
|
|
53
|
-
exports
|
|
51
|
+
exports.default = _default;
|
package/dist/style/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _shared = _interopRequireDefault(require("./shared"));
|
|
9
9
|
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
13
|
|
|
@@ -15,12 +15,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
15
15
|
|
|
16
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
title: _objectSpread(_objectSpread({}, _shared
|
|
18
|
+
const styles = _objectSpread(_objectSpread({}, _shared.default), {}, {
|
|
19
|
+
title: _objectSpread(_objectSpread({}, _shared.default.title), {}, {
|
|
20
20
|
lineHeight: 12,
|
|
21
21
|
letterSpacing: 1
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
var _default = styles;
|
|
26
|
-
exports
|
|
26
|
+
exports.default = _default;
|
package/dist/style/shared.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
13
13
|
|
|
14
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const styles = {
|
|
17
17
|
title: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
18
18
|
font: "supporting",
|
|
19
19
|
fontSize: "cardMetaMobile"
|
|
@@ -26,4 +26,4 @@ var styles = {
|
|
|
26
26
|
})
|
|
27
27
|
};
|
|
28
28
|
var _default = styles;
|
|
29
|
-
exports
|
|
29
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/article-label",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "The article label",
|
|
5
5
|
"main": "dist/article-label",
|
|
6
6
|
"dev": "src/article-label",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"prettier:diff": "prettier --list-different '**/*.*'",
|
|
10
10
|
"depcheck": "depcheck --ignores='@babel/*,babel-*,depcheck,eslint,jest,prettier,react-art,webpack*' --ignore-bin-package=false --skip-missing",
|
|
11
11
|
"lint": "eslint . && yarn prettier:diff && yarn depcheck",
|
|
12
|
-
"test:web": "jest --config='./__tests__/
|
|
12
|
+
"test:web": "jest --config='./__tests__/jest.config.js'",
|
|
13
13
|
"prepublishOnly": "yarn transpile && yarn bundle",
|
|
14
14
|
"watch": "watch 'yarn bundle' ./src --ignoreDotFiles --ignoreUnreadable",
|
|
15
15
|
"cleanup-dist": "rm -rf dist",
|
|
@@ -31,33 +31,27 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/newsuk/times-components#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@times-components/ts-styleguide": "1.
|
|
35
|
-
"@times-components/utils": "6.
|
|
34
|
+
"@times-components/ts-styleguide": "1.37.0",
|
|
35
|
+
"@times-components/utils": "6.15.0",
|
|
36
36
|
"lodash.pick": "4.4.0",
|
|
37
37
|
"prop-types": "15.7.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@babel/core": "7.4.4",
|
|
41
|
-
"@babel/preset-env": "7.4.4",
|
|
42
|
-
"@babel/preset-react": "7.9.1",
|
|
43
41
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
44
|
-
"@times-components/jest-configurator-web": "0.
|
|
45
|
-
"@times-components/storybook": "4.
|
|
46
|
-
"@times-components/webpack-configurator": "2.0
|
|
42
|
+
"@times-components/jest-configurator-web": "0.8.0",
|
|
43
|
+
"@times-components/storybook": "4.5.0",
|
|
44
|
+
"@times-components/webpack-configurator": "2.1.0",
|
|
47
45
|
"babel-jest": "24.8.0",
|
|
48
46
|
"babel-loader": "8.0.5",
|
|
49
|
-
"babel-plugin-add-react-displayname": "0.0.5",
|
|
50
|
-
"babel-plugin-styled-components": "1.10.6",
|
|
51
47
|
"depcheck": "0.6.9",
|
|
52
48
|
"eslint": "5.9.0",
|
|
53
49
|
"jest": "24.8.0",
|
|
54
50
|
"prettier": "1.14.3",
|
|
55
51
|
"react": "16.9.0",
|
|
56
|
-
"react-art": "16.6.3",
|
|
57
52
|
"react-dom": "16.9.0",
|
|
58
53
|
"react-test-renderer": "16.9.0",
|
|
59
|
-
"webpack": "4.30.0"
|
|
60
|
-
"webpack-cli": "3.3.1"
|
|
54
|
+
"webpack": "4.30.0"
|
|
61
55
|
},
|
|
62
56
|
"resolutions": {
|
|
63
57
|
"react": "16.9.0",
|
|
@@ -70,5 +64,5 @@
|
|
|
70
64
|
"publishConfig": {
|
|
71
65
|
"access": "public"
|
|
72
66
|
},
|
|
73
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "fe2f12b7448a88662c53f840772282cd97756c5c"
|
|
74
68
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),c=r(0),i=(r(3),r(2));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function
|
|
1
|
+
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),c=r(0),i=(r(3),r(2));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f={title:l(l({},Object(i.fontFactory)({font:"supporting",fontSize:"cardMetaMobile"})),{},{fontWeight:"400",lineHeight:11,marginBottom:0,marginTop:-1,paddingTop:1})};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=b(b({},f),{},{title:b(b({},f.title),{},{lineHeight:12,letterSpacing:1})});function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const P=e=>j(j({},Object(c.checkStylesForUnits)(O.title)),{},{color:Object(c.gqlRgbaToHex)(e)||e}),d=e=>{let t=e.color,r=e.title;return o.a.createElement(c.TcText,{style:P(t)},r.toUpperCase())};d.defaultProps={color:"black"};t.default=d}]);
|