@times-components/video-label 2.6.6 → 2.7.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 +6 -5
- package/dist/style/index.js +40 -1
- package/dist/video-label.js +67 -1
- package/package.json +9 -13
- 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.7.0](https://github.com/newsuk/times-components/compare/@times-components/video-label@2.6.8...@times-components/video-label@2.7.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.6.8](https://github.com/newsuk/times-components/compare/@times-components/video-label@2.6.7...@times-components/video-label@2.6.8) (2022-08-05)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @times-components/video-label
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [2.6.7](https://github.com/newsuk/times-components/compare/@times-components/video-label@2.6.6...@times-components/video-label@2.6.7) (2022-07-19)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @times-components/video-label
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [2.6.6](https://github.com/newsuk/times-components/compare/@times-components/video-label@2.6.5...@times-components/video-label@2.6.6) (2022-07-18)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @times-components/video-label
|
package/babel.config.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
module.exports = api => {
|
|
2
2
|
api.cache(true);
|
|
3
3
|
return {
|
|
4
|
-
plugins: [
|
|
5
|
-
|
|
6
|
-
"@babel/
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
plugins: ["babel-plugin-styled-components"],
|
|
5
|
+
presets: [
|
|
6
|
+
"@babel/preset-env",
|
|
7
|
+
"@babel/preset-react",
|
|
8
|
+
"@babel/preset-typescript"
|
|
9
|
+
]
|
|
9
10
|
};
|
|
10
11
|
};
|
package/dist/style/index.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
9
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
+
|
|
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
|
+
|
|
16
|
+
var styles = {
|
|
17
|
+
container: {
|
|
18
|
+
alignItems: "flex-start",
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
marginTop: -1,
|
|
21
|
+
marginBottom: 1
|
|
22
|
+
},
|
|
23
|
+
iconContainer: {
|
|
24
|
+
alignSelf: "center",
|
|
25
|
+
paddingBottom: 2
|
|
26
|
+
},
|
|
27
|
+
title: _objectSpread(_objectSpread({}, (0, _tsStyleguide.fontFactory)({
|
|
28
|
+
font: "supporting",
|
|
29
|
+
fontSize: "cardMetaMobile"
|
|
30
|
+
})), {}, {
|
|
31
|
+
flex: -1,
|
|
32
|
+
fontWeight: "400",
|
|
33
|
+
letterSpacing: 1.2,
|
|
34
|
+
lineHeight: 12,
|
|
35
|
+
marginLeft: (0, _tsStyleguide.spacing)(1),
|
|
36
|
+
paddingTop: 1
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
var _default = styles;
|
|
40
|
+
exports["default"] = _default;
|
package/dist/video-label.js
CHANGED
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _utils = require("@times-components/utils");
|
|
11
|
+
|
|
12
|
+
var _icons = require("@times-components/icons");
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
+
|
|
18
|
+
var _style = _interopRequireDefault(require("./style"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
var VideoLabelText = (0, _styledComponents["default"])(_utils.TcText).withConfig({
|
|
29
|
+
displayName: "video-label__VideoLabelText",
|
|
30
|
+
componentId: "spiidi-0"
|
|
31
|
+
})(["", ";"], (0, _utils.checkStylesForUnits)(_style["default"].title));
|
|
32
|
+
var Container = (0, _styledComponents["default"])(_utils.TcView).withConfig({
|
|
33
|
+
displayName: "video-label__Container",
|
|
34
|
+
componentId: "spiidi-1"
|
|
35
|
+
})(["", ";"], (0, _utils.checkStylesForUnits)(_style["default"].container));
|
|
36
|
+
var IconContainer = (0, _styledComponents["default"])(_utils.TcView).withConfig({
|
|
37
|
+
displayName: "video-label__IconContainer",
|
|
38
|
+
componentId: "spiidi-2"
|
|
39
|
+
})(["", ";"], (0, _utils.checkStylesForUnits)(_style["default"].iconContainer));
|
|
40
|
+
|
|
41
|
+
var VideoLabel = function VideoLabel(_ref) {
|
|
42
|
+
var color = _ref.color,
|
|
43
|
+
title = _ref.title;
|
|
44
|
+
|
|
45
|
+
var textStyles = _objectSpread({}, _style["default"].title);
|
|
46
|
+
|
|
47
|
+
Object.assign(textStyles, {
|
|
48
|
+
color: color
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(IconContainer, null, /*#__PURE__*/_react["default"].createElement(_icons.IconVideo, {
|
|
51
|
+
fillColour: color,
|
|
52
|
+
height: 9
|
|
53
|
+
})), /*#__PURE__*/_react["default"].createElement(VideoLabelText, {
|
|
54
|
+
style: textStyles
|
|
55
|
+
}, title ? title.toUpperCase() : "VIDEO"));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
VideoLabel.propTypes = {
|
|
59
|
+
color: _propTypes["default"].string,
|
|
60
|
+
title: _propTypes["default"].string
|
|
61
|
+
};
|
|
62
|
+
VideoLabel.defaultProps = {
|
|
63
|
+
color: "black",
|
|
64
|
+
title: ""
|
|
65
|
+
};
|
|
66
|
+
var _default = VideoLabel;
|
|
67
|
+
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/video-label",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "A label for articles with videos",
|
|
5
5
|
"main": "dist/video-label",
|
|
6
6
|
"dev": "src/video-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,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/newsuk/times-components#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@times-components/icons": "2.
|
|
35
|
-
"@times-components/ts-styleguide": "1.
|
|
36
|
-
"@times-components/utils": "6.
|
|
34
|
+
"@times-components/icons": "2.19.0",
|
|
35
|
+
"@times-components/ts-styleguide": "1.37.0",
|
|
36
|
+
"@times-components/utils": "6.15.0",
|
|
37
37
|
"lodash.pick": "4.4.0",
|
|
38
38
|
"prop-types": "15.7.2",
|
|
39
39
|
"styled-components": "4.3.2"
|
|
@@ -43,20 +43,16 @@
|
|
|
43
43
|
"@testing-library/jest-dom": "^5.12.0",
|
|
44
44
|
"@testing-library/react": "^12.1.2",
|
|
45
45
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
46
|
-
"@times-components/jest-configurator": "
|
|
47
|
-
"@times-components/storybook": "4.
|
|
46
|
+
"@times-components/jest-configurator-web": "0.8.0",
|
|
47
|
+
"@times-components/storybook": "4.5.0",
|
|
48
48
|
"babel-jest": "24.8.0",
|
|
49
49
|
"babel-loader": "8.0.5",
|
|
50
|
-
"babel-plugin-add-react-displayname": "0.0.5",
|
|
51
|
-
"babel-plugin-styled-components": "1.10.6",
|
|
52
50
|
"depcheck": "0.6.9",
|
|
53
51
|
"eslint": "5.9.0",
|
|
54
52
|
"jest": "24.8.0",
|
|
55
53
|
"prettier": "1.14.3",
|
|
56
54
|
"react": "16.9.0",
|
|
57
|
-
"
|
|
58
|
-
"webpack": "4.30.0",
|
|
59
|
-
"webpack-cli": "3.3.1"
|
|
55
|
+
"webpack": "4.30.0"
|
|
60
56
|
},
|
|
61
57
|
"resolutions": {
|
|
62
58
|
"react": "16.9.0",
|
|
@@ -69,5 +65,5 @@
|
|
|
69
65
|
"publishConfig": {
|
|
70
66
|
"access": "public"
|
|
71
67
|
},
|
|
72
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "fe2f12b7448a88662c53f840772282cd97756c5c"
|
|
73
69
|
}
|
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=
|
|
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=6)}([function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/icons/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),i=r(0),c=r(4),l=(r(5),r(2)),u=r.n(l),a=r(3);function p(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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(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 b={container:{alignItems:"flex-start",flexDirection:"row",marginTop:-1,marginBottom:1},iconContainer:{alignSelf:"center",paddingBottom:2},title:f(f({},Object(a.fontFactory)({font:"supporting",fontSize:"cardMetaMobile"})),{},{flex:-1,fontWeight:"400",letterSpacing:1.2,lineHeight:12,marginLeft:Object(a.spacing)(1),paddingTop:1})};function O(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 y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=u()(i.TcText).withConfig({displayName:"video-label__VideoLabelText",componentId:"spiidi-0"})(["",";"],Object(i.checkStylesForUnits)(b.title)),g=u()(i.TcView).withConfig({displayName:"video-label__Container",componentId:"spiidi-1"})(["",";"],Object(i.checkStylesForUnits)(b.container)),m=u()(i.TcView).withConfig({displayName:"video-label__IconContainer",componentId:"spiidi-2"})(["",";"],Object(i.checkStylesForUnits)(b.iconContainer)),j=function(e){var t=e.color,r=e.title,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},b.title);return Object.assign(n,{color:t}),o.a.createElement(g,null,o.a.createElement(m,null,o.a.createElement(c.IconVideo,{fillColour:t,height:9})),o.a.createElement(d,{style:n},r?r.toUpperCase():"VIDEO"))};j.defaultProps={color:"black",title:""};t.default=j}]);
|