@times-components/responsive 0.13.1 → 0.14.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 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
+ # [0.14.0](https://github.com/newsuk/times-components/compare/@times-components/responsive@0.13.3...@times-components/responsive@0.14.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
+ ## [0.13.3](https://github.com/newsuk/times-components/compare/@times-components/responsive@0.13.2...@times-components/responsive@0.13.3) (2022-08-05)
18
+
19
+ **Note:** Version bump only for package @times-components/responsive
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.13.2](https://github.com/newsuk/times-components/compare/@times-components/responsive@0.13.1...@times-components/responsive@0.13.2) (2022-07-19)
26
+
27
+ **Note:** Version bump only for package @times-components/responsive
28
+
29
+
30
+
31
+
32
+
6
33
  ## [0.13.1](https://github.com/newsuk/times-components/compare/@times-components/responsive@0.13.0...@times-components/responsive@0.13.1) (2022-07-18)
7
34
 
8
35
  **Note:** Version bump only for package @times-components/responsive
package/babel.config.js CHANGED
@@ -1,10 +1,18 @@
1
1
  module.exports = api => {
2
2
  api.cache(true);
3
3
  return {
4
- plugins: [
5
- "babel-plugin-styled-components",
6
- "@babel/plugin-transform-react-display-name"
7
- ],
8
- presets: ["module:metro-react-native-babel-preset"]
4
+ plugins: ["babel-plugin-styled-components"],
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
+ ]
9
17
  };
10
18
  };
package/dist/context.js CHANGED
@@ -1 +1,14 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=require("react");var _default=(0,_react.createContext)({isTablet:false});exports.default=_default;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _default = (0, _react.createContext)({
11
+ isTablet: false
12
+ });
13
+
14
+ exports.default = _default;
@@ -1 +1,48 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"ResponsiveContext",{enumerable:true,get:function get(){return _context.default;}});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _tsStyleguide=require("@times-components/ts-styleguide");var _utils=require("@times-components/utils");var _context=_interopRequireDefault(require("./context"));var _jsxFileName="/home/circleci/project/packages/responsive/src/responsive.js";var Responsive=function Responsive(_ref){var children=_ref.children;var _getDimensions=(0,_utils.getDimensions)(),width=_getDimensions.width;return _react.default.createElement(_context.default.Provider,{value:{editionBreakpoint:(0,_tsStyleguide.getEditionBreakpoint)(width),isTablet:false,screenWidth:width},__source:{fileName:_jsxFileName,lineNumber:11,columnNumber:5}},children);};Responsive.propTypes={children:_propTypes.default.node};Responsive.defaultProps={children:null};var _default=Responsive;exports.default=_default;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ResponsiveContext", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _context.default;
10
+ }
11
+ });
12
+ exports.default = void 0;
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+
18
+ var _tsStyleguide = require("@times-components/ts-styleguide");
19
+
20
+ var _utils = require("@times-components/utils");
21
+
22
+ var _context = _interopRequireDefault(require("./context"));
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
26
+ const Responsive = _ref => {
27
+ let children = _ref.children;
28
+
29
+ const _getDimensions = (0, _utils.getDimensions)(),
30
+ width = _getDimensions.width;
31
+
32
+ return /*#__PURE__*/_react.default.createElement(_context.default.Provider, {
33
+ value: {
34
+ editionBreakpoint: (0, _tsStyleguide.getEditionBreakpoint)(width),
35
+ isTablet: false,
36
+ screenWidth: width
37
+ }
38
+ }, children);
39
+ };
40
+
41
+ Responsive.propTypes = {
42
+ children: _propTypes.default.node
43
+ };
44
+ Responsive.defaultProps = {
45
+ children: null
46
+ };
47
+ var _default = Responsive;
48
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-components/responsive",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "Responsive",
5
5
  "main": "dist/responsive",
6
6
  "dev": "src/responsive",
@@ -9,7 +9,7 @@
9
9
  "fmt": "eslint . --fix && prettier --write '**/*.*'",
10
10
  "prettier:diff": "prettier --list-different '**/*.*'",
11
11
  "lint": "eslint . && yarn prettier:diff && yarn depcheck",
12
- "test:web": "jest --config='./__tests__/web/jest.config.js'",
12
+ "test:web": "jest --config='./__tests__/jest.config.js'",
13
13
  "prepublishOnly": "yarn transpile && yarn bundle",
14
14
  "cleanup-dist": "rm -rf dist",
15
15
  "transpile": "yarn cleanup-dist && babel src -d dist",
@@ -22,7 +22,6 @@
22
22
  },
23
23
  "keywords": [
24
24
  "react",
25
- "native",
26
25
  "responsive",
27
26
  "component"
28
27
  ],
@@ -32,25 +31,23 @@
32
31
  },
33
32
  "homepage": "https://github.com/newsuk/times-components#readme",
34
33
  "dependencies": {
35
- "@times-components/ts-styleguide": "1.36.7",
36
- "@times-components/utils": "6.14.2",
34
+ "@times-components/ts-styleguide": "1.37.0",
35
+ "@times-components/utils": "6.15.0",
37
36
  "prop-types": "15.7.2"
38
37
  },
39
38
  "devDependencies": {
40
39
  "@babel/core": "7.4.4",
41
40
  "@times-components/eslint-config-thetimes": "0.8.18",
42
- "@times-components/jest-configurator": "2.8.0",
43
- "@times-components/webpack-configurator": "2.0.29",
41
+ "@times-components/jest-configurator-web": "0.8.0",
42
+ "@times-components/webpack-configurator": "2.1.0",
44
43
  "babel-jest": "24.8.0",
45
44
  "eslint": "5.9.0",
46
45
  "jest": "24.8.0",
47
46
  "prettier": "1.14.3",
48
47
  "react": "16.9.0",
49
48
  "react-dom": "16.9.0",
50
- "react-native": "0.61.5",
51
49
  "react-test-renderer": "16.9.0",
52
- "webpack": "4.30.0",
53
- "webpack-cli": "3.3.1"
50
+ "webpack": "4.30.0"
54
51
  },
55
52
  "resolutions": {
56
53
  "react": "16.9.0",
@@ -58,12 +55,10 @@
58
55
  },
59
56
  "peerDependencies": {
60
57
  "react": ">=16.9",
61
- "react-dom": ">=16.9",
62
- "react-native": ">=0.59",
63
- "react-native-web": "0.11.4"
58
+ "react-dom": ">=16.9"
64
59
  },
65
60
  "publishConfig": {
66
61
  "access": "public"
67
62
  },
68
- "gitHead": "358bc4e3a3e654126c6b3af629dd1c6f074cc0cd"
63
+ "gitHead": "fe2f12b7448a88662c53f840772282cd97756c5c"
69
64
  }
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)}([function(e,t){e.exports=require("react")},function(e,t,r){var n=r(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ResponsiveContext",{enumerable:!0,get:function(){return l.default}}),t.default=void 0;var o=n(r(0)),u=(n(r(3)),r(4)),i=r(5),l=n(r(6)),f=function(e){var t=e.children,r=(0,i.getDimensions)().width;return o.default.createElement(l.default.Provider,{value:{editionBreakpoint:(0,u.getEditionBreakpoint)(r),isTablet:!1,screenWidth:r}},t)};f.defaultProps={children:null};var a=f;t.default=a},function(e,t){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).createContext)({isTablet:!1});t.default=n}]);
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("react")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("prop-types")},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=(r(3),r(1)),u=r(2),c=Object(n.createContext)({isTablet:!1});r.d(t,"ResponsiveContext",(function(){return c}));const l=e=>{let t=e.children;const r=Object(u.getDimensions)().width;return o.a.createElement(c.Provider,{value:{editionBreakpoint:Object(i.getEditionBreakpoint)(r),isTablet:!1,screenWidth:r}},t)};l.defaultProps={children:null};t.default=l}]);