@times-components/link 3.10.12 → 3.11.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 +11 -0
- package/babel.config.js +6 -5
- package/dist/link.js +81 -1
- package/dist/text-link-prop-types-base.js +24 -1
- package/dist/text-link-prop-types.js +31 -1
- package/dist/text-link.js +67 -1
- package/package.json +9 -16
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [3.11.0](https://github.com/newsuk/times-components/compare/@times-components/link@3.10.12...@times-components/link@3.11.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
|
+
|
|
6
17
|
## [3.10.12](https://github.com/newsuk/times-components/compare/@times-components/link@3.10.11...@times-components/link@3.10.12) (2022-08-05)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @times-components/link
|
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/link.js
CHANGED
|
@@ -1 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "TextLink", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _textLink["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports["default"] = void 0;
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
+
|
|
18
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
19
|
+
|
|
20
|
+
var _utils = require("@times-components/utils");
|
|
21
|
+
|
|
22
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
+
|
|
24
|
+
var _textLink = _interopRequireDefault(require("./text-link"));
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
+
|
|
28
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
var respStylesSelector = function respStylesSelector(selector) {
|
|
31
|
+
return function (_ref) {
|
|
32
|
+
var responsiveLinkStyles = _ref.responsiveLinkStyles;
|
|
33
|
+
return responsiveLinkStyles && responsiveLinkStyles[selector] || "";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var RespLink = _styledComponents["default"].a.withConfig({
|
|
38
|
+
displayName: "link__RespLink",
|
|
39
|
+
componentId: "sc-1ocvixa-0"
|
|
40
|
+
})(["text-decoration:", ";", ";@media (min-width:", "px){", ";}"], function (props) {
|
|
41
|
+
return props.underlined && props.responsiveLinkStyles ? "underline" : "none";
|
|
42
|
+
}, respStylesSelector("base"), _tsStyleguide.breakpoints.medium, respStylesSelector("medium"));
|
|
43
|
+
|
|
44
|
+
var Link = function Link(_ref2) {
|
|
45
|
+
var children = _ref2.children,
|
|
46
|
+
url = _ref2.url,
|
|
47
|
+
_ref2$onPress = _ref2.onPress,
|
|
48
|
+
onPress = _ref2$onPress === void 0 ? function () {} : _ref2$onPress,
|
|
49
|
+
_ref2$target = _ref2.target,
|
|
50
|
+
target = _ref2$target === void 0 ? null : _ref2$target,
|
|
51
|
+
_ref2$underlined = _ref2.underlined,
|
|
52
|
+
underlined = _ref2$underlined === void 0 ? true : _ref2$underlined,
|
|
53
|
+
_ref2$responsiveLinkS = _ref2.responsiveLinkStyles,
|
|
54
|
+
responsiveLinkStyles = _ref2$responsiveLinkS === void 0 ? null : _ref2$responsiveLinkS;
|
|
55
|
+
var props = {
|
|
56
|
+
underlined: underlined,
|
|
57
|
+
target: target,
|
|
58
|
+
responsiveLinkStyles: responsiveLinkStyles
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(RespLink, _extends({
|
|
61
|
+
onClick: function onClick(event) {
|
|
62
|
+
(0, _utils.handleOnClickScrollTo)(event, url);
|
|
63
|
+
onPress(event);
|
|
64
|
+
},
|
|
65
|
+
href: (0, _utils.handleHrefScrollTo)(url)
|
|
66
|
+
}, props), children);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Link.propTypes = {
|
|
70
|
+
children: _propTypes["default"].node.isRequired,
|
|
71
|
+
url: _propTypes["default"].string,
|
|
72
|
+
onPress: _propTypes["default"].func,
|
|
73
|
+
target: _propTypes["default"].string,
|
|
74
|
+
underlined: _propTypes["default"].bool,
|
|
75
|
+
responsiveLinkStyles: _propTypes["default"].shape({
|
|
76
|
+
base: _propTypes["default"].string,
|
|
77
|
+
medium: _propTypes["default"].string
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
var _default = Link;
|
|
81
|
+
exports["default"] = _default;
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.baseDefaultProps = exports.basePropTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var basePropTypes = {
|
|
13
|
+
children: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].element, _propTypes["default"].arrayOf(_propTypes["default"].string), _propTypes["default"].arrayOf(_propTypes["default"].element)]).isRequired,
|
|
14
|
+
onPress: _propTypes["default"].func.isRequired,
|
|
15
|
+
style: _propTypes["default"].object,
|
|
16
|
+
target: _propTypes["default"].string,
|
|
17
|
+
url: _propTypes["default"].string
|
|
18
|
+
};
|
|
19
|
+
exports.basePropTypes = basePropTypes;
|
|
20
|
+
var baseDefaultProps = {
|
|
21
|
+
style: {},
|
|
22
|
+
target: null
|
|
23
|
+
};
|
|
24
|
+
exports.baseDefaultProps = baseDefaultProps;
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultProps = exports.propTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _textLinkPropTypesBase = require("./text-link-prop-types-base");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var propTypes = _objectSpread(_objectSpread({}, _textLinkPropTypesBase.basePropTypes), {}, {
|
|
21
|
+
onPress: _propTypes["default"].func,
|
|
22
|
+
url: _propTypes["default"].string.isRequired
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.propTypes = propTypes;
|
|
26
|
+
|
|
27
|
+
var defaultProps = _objectSpread(_objectSpread({}, _textLinkPropTypesBase.baseDefaultProps), {}, {
|
|
28
|
+
onPress: function onPress() {}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
exports.defaultProps = defaultProps;
|
package/dist/text-link.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 _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _textLinkPropTypes = require("./text-link-prop-types");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
30
|
+
var styles = {
|
|
31
|
+
textLink: {
|
|
32
|
+
"text-decoration": "underline"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var LinkTextObj = (0, _styledComponents["default"])(_utils.TcTextLink).withConfig({
|
|
36
|
+
displayName: "text-link__LinkTextObj",
|
|
37
|
+
componentId: "xyehx2-0"
|
|
38
|
+
})(["", ";"], function (props) {
|
|
39
|
+
return props.style ? (0, _utils.checkStylesForUnits)(props.style) : "";
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
var TextLink = function TextLink(_ref) {
|
|
43
|
+
var children = _ref.children,
|
|
44
|
+
onPress = _ref.onPress,
|
|
45
|
+
style = _ref.style,
|
|
46
|
+
target = _ref.target,
|
|
47
|
+
url = _ref.url,
|
|
48
|
+
props = _objectWithoutProperties(_ref, ["children", "onPress", "style", "target", "url"]);
|
|
49
|
+
|
|
50
|
+
var linkStyles = _objectSpread(_objectSpread({}, styles.textLink), style);
|
|
51
|
+
|
|
52
|
+
var textProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
53
|
+
accessibilityRole: "link",
|
|
54
|
+
href: url,
|
|
55
|
+
onClick: onPress,
|
|
56
|
+
style: linkStyles
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
return target ? /*#__PURE__*/_react["default"].createElement(LinkTextObj, _extends({}, textProps, {
|
|
60
|
+
target: target
|
|
61
|
+
}), children) : /*#__PURE__*/_react["default"].createElement(LinkTextObj, textProps, children);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
TextLink.propTypes = _textLinkPropTypes.propTypes;
|
|
65
|
+
TextLink.defaultProps = _textLinkPropTypes.defaultProps;
|
|
66
|
+
var _default = TextLink;
|
|
67
|
+
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/link",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "component to handle links and navigation",
|
|
5
5
|
"main": "dist/link",
|
|
6
6
|
"dev": "src/link",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"prettier:diff": "prettier --list-different '**/*.*'",
|
|
10
10
|
"depcheck": "depcheck --ignores='@babel/*,babel-*,depcheck,eslint,jest,prettier,react-art,stylelint*,webpack*' --ignore-bin-package=false --skip-missing",
|
|
11
11
|
"lint": "eslint . && stylelint . && 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",
|
|
@@ -35,30 +35,23 @@
|
|
|
35
35
|
"@testing-library/jest-dom": "^5.12.0",
|
|
36
36
|
"@testing-library/react": "^12.1.2",
|
|
37
37
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
38
|
-
"@times-components/jest-configurator": "
|
|
39
|
-
"@times-components/storybook": "4.
|
|
40
|
-
"@times-components/webpack-configurator": "2.0
|
|
38
|
+
"@times-components/jest-configurator-web": "0.8.0",
|
|
39
|
+
"@times-components/storybook": "4.5.0",
|
|
40
|
+
"@times-components/webpack-configurator": "2.1.0",
|
|
41
41
|
"babel-jest": "24.8.0",
|
|
42
42
|
"babel-loader": "8.0.5",
|
|
43
|
-
"babel-plugin-add-react-displayname": "0.0.5",
|
|
44
|
-
"babel-plugin-styled-components": "1.10.6",
|
|
45
43
|
"depcheck": "0.6.9",
|
|
46
44
|
"eslint": "5.9.0",
|
|
47
45
|
"jest": "24.8.0",
|
|
48
46
|
"prettier": "1.14.3",
|
|
49
47
|
"react": "16.9.0",
|
|
50
|
-
"react-art": "16.6.3",
|
|
51
48
|
"react-dom": "16.9.0",
|
|
52
49
|
"stylelint": "9.4.0",
|
|
53
|
-
"
|
|
54
|
-
"stylelint-config-styled-components": "0.1.1",
|
|
55
|
-
"stylelint-processor-styled-components": "1.3.2",
|
|
56
|
-
"webpack": "4.30.0",
|
|
57
|
-
"webpack-cli": "3.3.1"
|
|
50
|
+
"webpack": "4.30.0"
|
|
58
51
|
},
|
|
59
52
|
"dependencies": {
|
|
60
|
-
"@times-components/ts-styleguide": "1.
|
|
61
|
-
"@times-components/utils": "6.
|
|
53
|
+
"@times-components/ts-styleguide": "1.37.0",
|
|
54
|
+
"@times-components/utils": "6.15.0",
|
|
62
55
|
"prop-types": "15.7.2",
|
|
63
56
|
"react": "16.9.0",
|
|
64
57
|
"react-dom": "16.9.0",
|
|
@@ -76,5 +69,5 @@
|
|
|
76
69
|
"@testing-library/jest-dom/extend-expect"
|
|
77
70
|
]
|
|
78
71
|
},
|
|
79
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "fe2f12b7448a88662c53f840772282cd97756c5c"
|
|
80
73
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var
|
|
1
|
+
module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=5)}([function(e,r){e.exports=require("prop-types")},function(e,r){e.exports=require("@times-components/utils/rnw")},function(e,r){e.exports=require("react")},function(e,r){e.exports=require("styled-components")},function(e,r){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,r,t){"use strict";t.r(r);var n=t(2),o=t.n(n),i=t(3),c=t.n(i),u=t(4),l=t(1),a=t(0),s=t.n(a);function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){y(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function y(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}p(p({},{children:s.a.oneOfType([s.a.string,s.a.element,s.a.arrayOf(s.a.string),s.a.arrayOf(s.a.element)]).isRequired,onPress:s.a.func.isRequired,style:s.a.object,target:s.a.string,url:s.a.string}),{},{onPress:s.a.func,url:s.a.string.isRequired});var b=p(p({},{style:{},target:null}),{},{onPress:function(){}});function O(){return(O=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?d(Object(t),!0).forEach((function(r){j(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function j(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function v(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var m={"text-decoration":"underline"},P=c()(l.TcTextLink).withConfig({displayName:"text-link__LinkTextObj",componentId:"xyehx2-0"})(["",";"],(function(e){return e.style?Object(l.checkStylesForUnits)(e.style):""})),h=function(e){var r=e.children,t=e.onPress,n=e.style,i=e.target,c=e.url,u=v(e,["children","onPress","style","target","url"]),l=g(g({},m),n),a=g(g({},u),{},{accessibilityRole:"link",href:c,onClick:t,style:l});return i?o.a.createElement(P,O({},a,{target:i}),r):o.a.createElement(P,a,r)};h.defaultProps=b;var w=h;function x(){return(x=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}t.d(r,"TextLink",(function(){return w}));var k=function(e){return function(r){var t=r.responsiveLinkStyles;return t&&t[e]||""}},S=c.a.a.withConfig({displayName:"link__RespLink",componentId:"sc-1ocvixa-0"})(["text-decoration:",";",";@media (min-width:","px){",";}"],(function(e){return e.underlined&&e.responsiveLinkStyles?"underline":"none"}),k("base"),u.breakpoints.medium,k("medium"));r.default=function(e){var r=e.children,t=e.url,n=e.onPress,i=void 0===n?function(){}:n,c=e.target,u=void 0===c?null:c,a=e.underlined,s=void 0===a||a,f=e.responsiveLinkStyles,p={underlined:s,target:u,responsiveLinkStyles:void 0===f?null:f};return o.a.createElement(S,x({onClick:function(e){Object(l.handleOnClickScrollTo)(e,t),i(e)},href:Object(l.handleHrefScrollTo)(t)},p),r)}}]);
|