Socket
Socket
Sign inDemoInstall

@tds/core-text

Package Overview
Dependencies
Maintainers
6
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tds/core-text - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

LICENSE

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.0.5](https://github.com/telusdigital/tds/compare/@tds/core-text@1.0.4...@tds/core-text@1.0.5) (2019-02-06)
**Note:** Version bump only for package @tds/core-text
<a name="1.0.4"></a>

@@ -8,0 +16,0 @@ ## [1.0.4](https://github.com/telusdigital/tds/compare/@tds/core-text@1.0.3...@tds/core-text@1.0.4) (2018-12-19)

99

dist/index.cjs.js

@@ -8,27 +8,55 @@ 'use strict';

var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
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];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
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;
};
}
var objectWithoutProperties = function (obj, keys) {
var target = {};
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
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;
};
}

@@ -38,3 +66,4 @@ var safeRest = (function (_ref) {

className = _ref.className,
props = objectWithoutProperties(_ref, ["style", "className"]);
props = _objectWithoutProperties(_ref, ["style", "className"]);
return props;

@@ -44,3 +73,3 @@ });

var joinClassNames = function joinClassNames() {
for (var _len = arguments.length, classes = Array(_len), _key = 0; _key < _len; _key++) {
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
classes[_key] = arguments[_key];

@@ -54,3 +83,3 @@ }

var styles = { "wordBreak": "TDS_Typography-modules__wordBreak___3dmWU", "baseSupSubScripts": "TDS_Typography-modules__baseSupSubScripts___Y12Fl", "sup": "TDS_Typography-modules__sup___2XNsz TDS_Typography-modules__baseSupSubScripts___Y12Fl", "base": "TDS_Typography-modules__base___gCTVZ TDS_Typography-modules__wordBreak___3dmWU", "baseFont": "TDS_Typography-modules__baseFont___2g1ZX", "small": "TDS_Typography-modules__small___3H68Z TDS_Typography-modules__wordBreak___3dmWU", "smallFont": "TDS_Typography-modules__smallFont___XkTI5", "medium": "TDS_Typography-modules__medium___1DC1g TDS_Typography-modules__wordBreak___3dmWU", "mediumFont": "TDS_Typography-modules__mediumFont___2ULml", "large": "TDS_Typography-modules__large___3Z5sJ TDS_Typography-modules__wordBreak___3dmWU", "largeFont": "TDS_Typography-modules__largeFont___3fZLf TDS_Typography-modules__wordBreak___3dmWU", "boldFont": "TDS_Typography-modules__boldFont___2MqlI TDS_Typography-modules__wordBreak___3dmWU", "color": "TDS_Typography-modules__color___1Jt_W", "invertedColor": "TDS_Typography-modules__invertedColor___2axxL", "inheritColor": "TDS_Typography-modules__inheritColor___3YAyL", "blockText": "TDS_Typography-modules__blockText___2DsZN" };
var styles = {"wordBreak":"TDS_Typography-modules__wordBreak___3dmWU","baseSupSubScripts":"TDS_Typography-modules__baseSupSubScripts___Y12Fl","sup":"TDS_Typography-modules__sup___2XNsz TDS_Typography-modules__baseSupSubScripts___Y12Fl","base":"TDS_Typography-modules__base___gCTVZ TDS_Typography-modules__wordBreak___3dmWU","baseFont":"TDS_Typography-modules__baseFont___2g1ZX","small":"TDS_Typography-modules__small___3H68Z TDS_Typography-modules__wordBreak___3dmWU","smallFont":"TDS_Typography-modules__smallFont___XkTI5","medium":"TDS_Typography-modules__medium___1DC1g TDS_Typography-modules__wordBreak___3dmWU","mediumFont":"TDS_Typography-modules__mediumFont___2ULml","large":"TDS_Typography-modules__large___3Z5sJ TDS_Typography-modules__wordBreak___3dmWU","largeFont":"TDS_Typography-modules__largeFont___3fZLf TDS_Typography-modules__wordBreak___3dmWU","boldFont":"TDS_Typography-modules__boldFont___2MqlI TDS_Typography-modules__wordBreak___3dmWU","color":"TDS_Typography-modules__color___1Jt_W","invertedColor":"TDS_Typography-modules__invertedColor___2axxL","inheritColor":"TDS_Typography-modules__inheritColor___3YAyL","blockText":"TDS_Typography-modules__blockText___2DsZN"};

@@ -62,10 +91,10 @@ /**

*/
var TextSup = function TextSup(_ref) {
var children = _ref.children,
rest = objectWithoutProperties(_ref, ['children']);
return React.createElement(
'sup',
_extends({}, safeRest(rest), { className: styles.sup }),
children
);
rest = _objectWithoutProperties(_ref, ["children"]);
return React.createElement("sup", _extends({}, safeRest(rest), {
className: styles.sup
}), children);
};

@@ -79,3 +108,2 @@

};
TextSup.displayName = 'Text.Sup';

@@ -88,2 +116,3 @@

*/
var Text = function Text(_ref, context) {

@@ -95,13 +124,9 @@ var block = _ref.block,

children = _ref.children,
rest = objectWithoutProperties(_ref, ['block', 'bold', 'size', 'invert', 'children']);
rest = _objectWithoutProperties(_ref, ["block", "bold", "size", "invert", "children"]);
var textColor = invert ? styles.invertedColor : styles.color;
var classes = joinClassNames(styles[size], bold ? styles.boldFont : styles[size + 'Font'], context.inheritColor ? styles.inheritColor : textColor, block ? styles.blockText : null);
return React.createElement(
'span',
_extends({}, safeRest(rest), { className: classes }),
children
);
var classes = joinClassNames(styles[size], bold ? styles.boldFont : styles["".concat(size, "Font")], context.inheritColor ? styles.inheritColor : textColor, block ? styles.blockText : null);
return React.createElement("span", _extends({}, safeRest(rest), {
className: classes
}), children);
};

@@ -115,2 +140,3 @@

block: PropTypes.bool,
/**

@@ -120,2 +146,3 @@ * Embolden text without conveying any special importance or relevance.

bold: PropTypes.bool,
/**

@@ -125,2 +152,3 @@ * The font size.

size: PropTypes.oneOf(['base', 'small', 'medium', 'large']),
/**

@@ -130,2 +158,3 @@ * Invert the text color to appear light on dark backgrounds.

invert: PropTypes.bool,
/**

@@ -136,3 +165,2 @@ * The content. Can be text, other components, or HTML elements.

};
Text.defaultProps = {

@@ -144,10 +172,7 @@ block: false,

};
Text.contextTypes = {
inheritColor: PropTypes.bool
};
Text.Sup = TextSup;
module.exports = Text;
//# sourceMappingURL=index.cjs.js.map
import React from 'react';
import PropTypes from 'prop-types';
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
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];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
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;
};
}
var objectWithoutProperties = function (obj, keys) {
var target = {};
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
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;
};
}

@@ -33,3 +61,4 @@ var safeRest = (function (_ref) {

className = _ref.className,
props = objectWithoutProperties(_ref, ["style", "className"]);
props = _objectWithoutProperties(_ref, ["style", "className"]);
return props;

@@ -39,3 +68,3 @@ });

var joinClassNames = function joinClassNames() {
for (var _len = arguments.length, classes = Array(_len), _key = 0; _key < _len; _key++) {
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
classes[_key] = arguments[_key];

@@ -49,3 +78,3 @@ }

var styles = { "wordBreak": "TDS_Typography-modules__wordBreak___3dmWU", "baseSupSubScripts": "TDS_Typography-modules__baseSupSubScripts___Y12Fl", "sup": "TDS_Typography-modules__sup___2XNsz TDS_Typography-modules__baseSupSubScripts___Y12Fl", "base": "TDS_Typography-modules__base___gCTVZ TDS_Typography-modules__wordBreak___3dmWU", "baseFont": "TDS_Typography-modules__baseFont___2g1ZX", "small": "TDS_Typography-modules__small___3H68Z TDS_Typography-modules__wordBreak___3dmWU", "smallFont": "TDS_Typography-modules__smallFont___XkTI5", "medium": "TDS_Typography-modules__medium___1DC1g TDS_Typography-modules__wordBreak___3dmWU", "mediumFont": "TDS_Typography-modules__mediumFont___2ULml", "large": "TDS_Typography-modules__large___3Z5sJ TDS_Typography-modules__wordBreak___3dmWU", "largeFont": "TDS_Typography-modules__largeFont___3fZLf TDS_Typography-modules__wordBreak___3dmWU", "boldFont": "TDS_Typography-modules__boldFont___2MqlI TDS_Typography-modules__wordBreak___3dmWU", "color": "TDS_Typography-modules__color___1Jt_W", "invertedColor": "TDS_Typography-modules__invertedColor___2axxL", "inheritColor": "TDS_Typography-modules__inheritColor___3YAyL", "blockText": "TDS_Typography-modules__blockText___2DsZN" };
var styles = {"wordBreak":"TDS_Typography-modules__wordBreak___3dmWU","baseSupSubScripts":"TDS_Typography-modules__baseSupSubScripts___Y12Fl","sup":"TDS_Typography-modules__sup___2XNsz TDS_Typography-modules__baseSupSubScripts___Y12Fl","base":"TDS_Typography-modules__base___gCTVZ TDS_Typography-modules__wordBreak___3dmWU","baseFont":"TDS_Typography-modules__baseFont___2g1ZX","small":"TDS_Typography-modules__small___3H68Z TDS_Typography-modules__wordBreak___3dmWU","smallFont":"TDS_Typography-modules__smallFont___XkTI5","medium":"TDS_Typography-modules__medium___1DC1g TDS_Typography-modules__wordBreak___3dmWU","mediumFont":"TDS_Typography-modules__mediumFont___2ULml","large":"TDS_Typography-modules__large___3Z5sJ TDS_Typography-modules__wordBreak___3dmWU","largeFont":"TDS_Typography-modules__largeFont___3fZLf TDS_Typography-modules__wordBreak___3dmWU","boldFont":"TDS_Typography-modules__boldFont___2MqlI TDS_Typography-modules__wordBreak___3dmWU","color":"TDS_Typography-modules__color___1Jt_W","invertedColor":"TDS_Typography-modules__invertedColor___2axxL","inheritColor":"TDS_Typography-modules__inheritColor___3YAyL","blockText":"TDS_Typography-modules__blockText___2DsZN"};

@@ -57,10 +86,10 @@ /**

*/
var TextSup = function TextSup(_ref) {
var children = _ref.children,
rest = objectWithoutProperties(_ref, ['children']);
return React.createElement(
'sup',
_extends({}, safeRest(rest), { className: styles.sup }),
children
);
rest = _objectWithoutProperties(_ref, ["children"]);
return React.createElement("sup", _extends({}, safeRest(rest), {
className: styles.sup
}), children);
};

@@ -74,3 +103,2 @@

};
TextSup.displayName = 'Text.Sup';

@@ -83,2 +111,3 @@

*/
var Text = function Text(_ref, context) {

@@ -90,13 +119,9 @@ var block = _ref.block,

children = _ref.children,
rest = objectWithoutProperties(_ref, ['block', 'bold', 'size', 'invert', 'children']);
rest = _objectWithoutProperties(_ref, ["block", "bold", "size", "invert", "children"]);
var textColor = invert ? styles.invertedColor : styles.color;
var classes = joinClassNames(styles[size], bold ? styles.boldFont : styles[size + 'Font'], context.inheritColor ? styles.inheritColor : textColor, block ? styles.blockText : null);
return React.createElement(
'span',
_extends({}, safeRest(rest), { className: classes }),
children
);
var classes = joinClassNames(styles[size], bold ? styles.boldFont : styles["".concat(size, "Font")], context.inheritColor ? styles.inheritColor : textColor, block ? styles.blockText : null);
return React.createElement("span", _extends({}, safeRest(rest), {
className: classes
}), children);
};

@@ -110,2 +135,3 @@

block: PropTypes.bool,
/**

@@ -115,2 +141,3 @@ * Embolden text without conveying any special importance or relevance.

bold: PropTypes.bool,
/**

@@ -120,2 +147,3 @@ * The font size.

size: PropTypes.oneOf(['base', 'small', 'medium', 'large']),
/**

@@ -125,2 +153,3 @@ * Invert the text color to appear light on dark backgrounds.

invert: PropTypes.bool,
/**

@@ -131,3 +160,2 @@ * The content. Can be text, other components, or HTML elements.

};
Text.defaultProps = {

@@ -139,10 +167,7 @@ block: false,

};
Text.contextTypes = {
inheritColor: PropTypes.bool
};
Text.Sup = TextSup;
export default Text;
//# sourceMappingURL=index.es.js.map
{
"name": "@tds/core-text",
"version": "1.0.4",
"version": "1.0.5",
"description": "Inline text",

@@ -31,5 +31,6 @@ "main": "index.cjs.js",

"devDependencies": {
"@tds/core-colours": "^1.0.0",
"@tds/shared-typography": "^1.1.0"
}
"@tds/core-colours": "^1.0.1",
"@tds/shared-typography": "^1.1.1"
},
"gitHead": "79839daf9cc90e531bdfe4e5202edfd4b7348342"
}

Sorry, the diff of this file is not supported yet

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