Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hig/text-link

Package Overview
Dependencies
Maintainers
6
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/text-link - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

158

build/index.es.js

@@ -1,2 +0,2 @@

import React from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';

@@ -1643,71 +1643,95 @@ import ThemeContext from '@hig/theme-context';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var TextLink = function TextLink(props) {
var children = props.children,
link = props.link,
target = props.target,
onClick = props.onClick,
onBlur = props.onBlur,
onFocus = props.onFocus,
onMouseUp = props.onMouseUp,
onMouseDown = props.onMouseDown,
onMouseLeave = props.onMouseLeave,
onMouseEnter = props.onMouseEnter,
otherProps = _objectWithoutProperties(props, ["children", "link", "target", "onClick", "onBlur", "onFocus", "onMouseUp", "onMouseDown", "onMouseLeave", "onMouseEnter"]);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var className = otherProps.className;
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
var Element = link ? "a" : "span";
var linkProps = link ? {
href: link,
target: target
} : { role: "button" };
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
return React.createElement(
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
var TextLink = function (_Component) {
_inherits(TextLink, _Component);
function TextLink() {
_classCallCheck(this, TextLink);
return _possibleConstructorReturn(this, (TextLink.__proto__ || Object.getPrototypeOf(TextLink)).apply(this, arguments));
}
_createClass(TextLink, [{
key: "render",
value: function render() {
var _this2 = this;
var _props = this.props,
children = _props.children,
link = _props.link,
target = _props.target,
onClick = _props.onClick,
onBlur = _props.onBlur,
onFocus = _props.onFocus,
onMouseUp = _props.onMouseUp,
onMouseDown = _props.onMouseDown,
onMouseLeave = _props.onMouseLeave,
onMouseEnter = _props.onMouseEnter,
otherProps = _objectWithoutProperties(_props, ["children", "link", "target", "onClick", "onBlur", "onFocus", "onMouseUp", "onMouseDown", "onMouseLeave", "onMouseEnter"]);
var className = otherProps.className;
var Element = link ? "a" : "span";
var linkProps = link ? {
href: link,
target: target
} : { role: "button" };
return React.createElement(
ControlBehavior,
{
onBlur: onBlur,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp
},
function (_ref2) {
var hasFocus = _ref2.hasFocus,
hasHover = _ref2.hasHover,
isPressed = _ref2.isPressed,
handleBlur = _ref2.onBlur,
handleFocus = _ref2.onFocus,
handleMouseDown = _ref2.onMouseDown,
handleMouseEnter = _ref2.onMouseEnter,
handleMouseLeave = _ref2.onMouseLeave,
handleMouseUp = _ref2.onMouseUp;
var customStylesheet = props.stylesheet;
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
return React.createElement(
ControlBehavior,
{
onBlur: onBlur,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp
},
function (_ref2) {
var hasFocus = _ref2.hasFocus,
hasHover = _ref2.hasHover,
isPressed = _ref2.isPressed,
handleBlur = _ref2.onBlur,
handleFocus = _ref2.onFocus,
handleMouseDown = _ref2.onMouseDown,
handleMouseEnter = _ref2.onMouseEnter,
handleMouseLeave = _ref2.onMouseLeave,
handleMouseUp = _ref2.onMouseUp;
var customStylesheet = _this2.props.stylesheet;
var styles = stylesheet(_extends$1({
stylesheet: customStylesheet,
hasFocus: hasFocus,
hasHover: hasHover,
isPressed: isPressed
}, props), resolvedRoles);
return React.createElement(
Element,
_extends$1({}, linkProps, otherProps, {
className: cx(css(styles), className),
onBlur: handleBlur,
onFocus: handleFocus,
onMouseDown: handleMouseDown,
onMouseEnter: handleMouseEnter,
onMouseLeave: handleMouseLeave,
onMouseUp: handleMouseUp,
onClick: onClick
}),
children
var styles = stylesheet(_extends$1({
stylesheet: customStylesheet,
hasFocus: hasFocus,
hasHover: hasHover,
isPressed: isPressed
}, _this2.props), resolvedRoles);
return React.createElement(
Element,
_extends$1({}, linkProps, otherProps, {
className: cx(css(styles), className),
onBlur: handleBlur,
onFocus: handleFocus,
onMouseDown: handleMouseDown,
onMouseEnter: handleMouseEnter,
onMouseLeave: handleMouseLeave,
onMouseUp: handleMouseUp,
onClick: onClick
}),
children
);
}
);

@@ -1717,6 +1741,6 @@ }

}
);
};
}]);
TextLink.displayName = "TextLink";
return TextLink;
}(Component);

@@ -1782,3 +1806,3 @@ TextLink.propTypes = {

"required": false,
"description": "The href to link to. Note that this was previously 'href'\n in the version distributed with hig-react."
"description": "The href to link to. Note that this was previously 'href'\n in the version distributed with hig-react."
},

@@ -1785,0 +1809,0 @@ "onClick": {

@@ -7,3 +7,4 @@ 'use strict';

var React = _interopDefault(require('react'));
var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-types'));

@@ -1650,71 +1651,95 @@ var ThemeContext = _interopDefault(require('@hig/theme-context'));

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var TextLink = function TextLink(props) {
var children = props.children,
link = props.link,
target = props.target,
onClick = props.onClick,
onBlur = props.onBlur,
onFocus = props.onFocus,
onMouseUp = props.onMouseUp,
onMouseDown = props.onMouseDown,
onMouseLeave = props.onMouseLeave,
onMouseEnter = props.onMouseEnter,
otherProps = _objectWithoutProperties(props, ["children", "link", "target", "onClick", "onBlur", "onFocus", "onMouseUp", "onMouseDown", "onMouseLeave", "onMouseEnter"]);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var className = otherProps.className;
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
var Element = link ? "a" : "span";
var linkProps = link ? {
href: link,
target: target
} : { role: "button" };
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
return React.createElement(
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
return React.createElement(
behaviors.ControlBehavior,
{
onBlur: onBlur,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp
},
function (_ref2) {
var hasFocus = _ref2.hasFocus,
hasHover = _ref2.hasHover,
isPressed = _ref2.isPressed,
handleBlur = _ref2.onBlur,
handleFocus = _ref2.onFocus,
handleMouseDown = _ref2.onMouseDown,
handleMouseEnter = _ref2.onMouseEnter,
handleMouseLeave = _ref2.onMouseLeave,
handleMouseUp = _ref2.onMouseUp;
var customStylesheet = props.stylesheet;
var TextLink = function (_Component) {
_inherits(TextLink, _Component);
var styles = stylesheet(_extends$1({
stylesheet: customStylesheet,
hasFocus: hasFocus,
hasHover: hasHover,
isPressed: isPressed
}, props), resolvedRoles);
return React.createElement(
Element,
_extends$1({}, linkProps, otherProps, {
className: cx(css(styles), className),
onBlur: handleBlur,
onFocus: handleFocus,
onMouseDown: handleMouseDown,
onMouseEnter: handleMouseEnter,
onMouseLeave: handleMouseLeave,
onMouseUp: handleMouseUp,
onClick: onClick
}),
children
function TextLink() {
_classCallCheck(this, TextLink);
return _possibleConstructorReturn(this, (TextLink.__proto__ || Object.getPrototypeOf(TextLink)).apply(this, arguments));
}
_createClass(TextLink, [{
key: "render",
value: function render() {
var _this2 = this;
var _props = this.props,
children = _props.children,
link = _props.link,
target = _props.target,
onClick = _props.onClick,
onBlur = _props.onBlur,
onFocus = _props.onFocus,
onMouseUp = _props.onMouseUp,
onMouseDown = _props.onMouseDown,
onMouseLeave = _props.onMouseLeave,
onMouseEnter = _props.onMouseEnter,
otherProps = _objectWithoutProperties(_props, ["children", "link", "target", "onClick", "onBlur", "onFocus", "onMouseUp", "onMouseDown", "onMouseLeave", "onMouseEnter"]);
var className = otherProps.className;
var Element = link ? "a" : "span";
var linkProps = link ? {
href: link,
target: target
} : { role: "button" };
return React__default.createElement(
ThemeContext.Consumer,
null,
function (_ref) {
var resolvedRoles = _ref.resolvedRoles;
return React__default.createElement(
behaviors.ControlBehavior,
{
onBlur: onBlur,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp
},
function (_ref2) {
var hasFocus = _ref2.hasFocus,
hasHover = _ref2.hasHover,
isPressed = _ref2.isPressed,
handleBlur = _ref2.onBlur,
handleFocus = _ref2.onFocus,
handleMouseDown = _ref2.onMouseDown,
handleMouseEnter = _ref2.onMouseEnter,
handleMouseLeave = _ref2.onMouseLeave,
handleMouseUp = _ref2.onMouseUp;
var customStylesheet = _this2.props.stylesheet;
var styles = stylesheet(_extends$1({
stylesheet: customStylesheet,
hasFocus: hasFocus,
hasHover: hasHover,
isPressed: isPressed
}, _this2.props), resolvedRoles);
return React__default.createElement(
Element,
_extends$1({}, linkProps, otherProps, {
className: cx(css(styles), className),
onBlur: handleBlur,
onFocus: handleFocus,
onMouseDown: handleMouseDown,
onMouseEnter: handleMouseEnter,
onMouseLeave: handleMouseLeave,
onMouseUp: handleMouseUp,
onClick: onClick
}),
children
);
}
);

@@ -1724,6 +1749,6 @@ }

}
);
};
}]);
TextLink.displayName = "TextLink";
return TextLink;
}(React.Component);

@@ -1789,3 +1814,3 @@ TextLink.propTypes = {

"required": false,
"description": "The href to link to. Note that this was previously 'href'\n in the version distributed with hig-react."
"description": "The href to link to. Note that this was previously 'href'\n in the version distributed with hig-react."
},

@@ -1792,0 +1817,0 @@ "onClick": {

@@ -0,1 +1,13 @@

# [@hig/text-link-v1.2.2](https://github.com/Autodesk/hig/compare/@hig/text-link@1.2.1...@hig/text-link@1.2.2) (2022-01-12)
### Bug Fixes
* Forcing semantic release by editing readmes ([d39b61f](https://github.com/Autodesk/hig/commit/d39b61f))
### Reverts
* "Revert "Revert "feat : Migrate all repository to React v17.0 """ ([bf78986](https://github.com/Autodesk/hig/commit/bf78986))
# [@hig/text-link-v1.2.1](https://github.com/Autodesk/hig/compare/@hig/text-link@1.2.0...@hig/text-link@1.2.1) (2022-01-12)

@@ -2,0 +14,0 @@

{
"name": "@hig/text-link",
"version": "1.2.1",
"version": "1.2.2",
"description": "HIG Text Link",

@@ -20,3 +20,3 @@ "author": "Autodesk Inc.",

"dependencies": {
"@hig/behaviors": "^1.1.1",
"@hig/behaviors": "^1.1.2",
"prop-types": "^15.7.1",

@@ -26,5 +26,5 @@ "react-lifecycles-compat": "^3.0.4"

"peerDependencies": {
"@hig/theme-context": "^3.0.2",
"@hig/theme-context": "^3.0.3",
"@hig/theme-data": "^2.22.0",
"react": "^17.0.0"
"react": "^15.4.1 || ^16.3.2"
},

@@ -31,0 +31,0 @@ "devDependencies": {

@@ -7,2 +7,3 @@ # Text Link

## Getting started

@@ -9,0 +10,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc