@tds/core-checkbox
Advanced tools
Comparing version 1.1.14 to 1.1.15
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.1.15](https://github.com/telusdigital/tds/compare/@tds/core-checkbox@1.1.14...@tds/core-checkbox@1.1.15) (2019-04-11) | ||
**Note:** Version bump only for package @tds/core-checkbox | ||
## [1.1.14](https://github.com/telusdigital/tds/compare/@tds/core-checkbox@1.1.13...@tds/core-checkbox@1.1.14) (2019-03-28) | ||
@@ -8,0 +16,0 @@ |
@@ -13,41 +13,9 @@ 'use strict'; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
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); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
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; | ||
} | ||
var _extends_1 = createCommonjsModule(function (module) { | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
module.exports = _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -69,33 +37,5 @@ var source = arguments[i]; | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
module.exports = _extends; | ||
}); | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
@@ -116,7 +56,7 @@ if (source == null) return {}; | ||
var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose; | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
@@ -138,2 +78,50 @@ | ||
var objectWithoutProperties = _objectWithoutProperties; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
var classCallCheck = _classCallCheck; | ||
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); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var createClass = _createClass; | ||
var _typeof_1 = createCommonjsModule(function (module) { | ||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } | ||
function _typeof(obj) { | ||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return _typeof2(obj); | ||
}; | ||
} else { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); | ||
}; | ||
} | ||
return _typeof(obj); | ||
} | ||
module.exports = _typeof; | ||
}); | ||
function _assertThisInitialized(self) { | ||
@@ -147,10 +135,72 @@ if (self === void 0) { | ||
var assertThisInitialized = _assertThisInitialized; | ||
function _possibleConstructorReturn(self, call) { | ||
if (call && (typeof call === "object" || typeof call === "function")) { | ||
if (call && (_typeof_1(call) === "object" || typeof call === "function")) { | ||
return call; | ||
} | ||
return _assertThisInitialized(self); | ||
return assertThisInitialized(self); | ||
} | ||
var possibleConstructorReturn = _possibleConstructorReturn; | ||
var getPrototypeOf = createCommonjsModule(function (module) { | ||
function _getPrototypeOf(o) { | ||
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
module.exports = _getPrototypeOf; | ||
}); | ||
var setPrototypeOf = createCommonjsModule(function (module) { | ||
function _setPrototypeOf(o, p) { | ||
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
module.exports = _setPrototypeOf; | ||
}); | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
} | ||
var inherits = _inherits; | ||
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; | ||
} | ||
var defineProperty = _defineProperty; | ||
var safeRest = (function (_ref) { | ||
@@ -160,3 +210,3 @@ var style = _ref.style, | ||
as = _ref.as, | ||
props = _objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
props = objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
@@ -187,6 +237,6 @@ return props; | ||
children = _ref.children, | ||
rest = _objectWithoutProperties(_ref, ["direction", "justifyContent", "dangerouslyAddClassName", "children"]); | ||
rest = objectWithoutProperties(_ref, ["direction", "justifyContent", "dangerouslyAddClassName", "children"]); | ||
var classNames = joinClassNames(styles[direction], justifyContent && styles["justifyContent".concat(capitalize(justifyContent))], dangerouslyAddClassName); | ||
return React.createElement("div", _extends({}, safeRest(rest), { | ||
return React.createElement("div", _extends_1({}, safeRest(rest), { | ||
className: classNames | ||
@@ -210,11 +260,11 @@ }), children); | ||
function (_React$Component) { | ||
_inherits(ColoredTextProvider, _React$Component); | ||
inherits(ColoredTextProvider, _React$Component); | ||
function ColoredTextProvider() { | ||
_classCallCheck(this, ColoredTextProvider); | ||
classCallCheck(this, ColoredTextProvider); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(ColoredTextProvider).apply(this, arguments)); | ||
return possibleConstructorReturn(this, getPrototypeOf(ColoredTextProvider).apply(this, arguments)); | ||
} | ||
_createClass(ColoredTextProvider, [{ | ||
createClass(ColoredTextProvider, [{ | ||
key: "getChildContext", | ||
@@ -278,3 +328,3 @@ value: function getChildContext() { | ||
var styles$1 = {"alignCenter":"TDS_Choice-modules__alignCenter___1M8FG","alignFlexStart":"TDS_Choice-modules__alignFlexStart___1zDGw","flexOne":"TDS_Choice-modules__flexOne___1SrBe","fakeInput":"TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl","fakeCheckbox":"TDS_Choice-modules__fakeCheckbox___1Buqb TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__rounded___3df1Q","fakeRadio":"TDS_Choice-modules__fakeRadio___1H3I- TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__circular___OppHT","unchecked":"TDS_Choice-modules__unchecked___3Zyro","focused":"TDS_Choice-modules__focused___2KPRk","error":"TDS_Choice-modules__error___1Vlds","hiddenInput":"TDS_Choice-modules__hiddenInput___3S8As"}; | ||
var styles$1 = {"alignCenter":"TDS_Choice-modules__alignCenter___1M8FG","alignFlexStart":"TDS_Choice-modules__alignFlexStart___1zDGw","flexOne":"TDS_Choice-modules__flexOne___1SrBe","label":"TDS_Choice-modules__label___1S7Ir","fakeInput":"TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl","fakeCheckbox":"TDS_Choice-modules__fakeCheckbox___1Buqb TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__rounded___3df1Q","fakeRadio":"TDS_Choice-modules__fakeRadio___1H3I- TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__circular___OppHT","unchecked":"TDS_Choice-modules__unchecked___3Zyro","focused":"TDS_Choice-modules__focused___2KPRk","error":"TDS_Choice-modules__error___1Vlds","hiddenInput":"TDS_Choice-modules__hiddenInput___3S8As"}; | ||
@@ -351,3 +401,3 @@ var messagingStyles = {"default":"TDS_Messaging-modules__default___2B8Di","success":"TDS_Messaging-modules__success___3kyw2","error":"TDS_Messaging-modules__error___3NArF","errorText":"TDS_Messaging-modules__errorText___IDcbb","disabledText":"TDS_Messaging-modules__disabledText___1bjON"}; | ||
function (_React$Component) { | ||
_inherits(Choice, _React$Component); | ||
inherits(Choice, _React$Component); | ||
@@ -359,3 +409,3 @@ function Choice() { | ||
_classCallCheck(this, Choice); | ||
classCallCheck(this, Choice); | ||
@@ -366,5 +416,5 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Choice)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_this = possibleConstructorReturn(this, (_getPrototypeOf2 = getPrototypeOf(Choice)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { | ||
defineProperty(assertThisInitialized(_this), "state", { | ||
checked: _this.props.checked, | ||
@@ -374,3 +424,3 @@ focus: false | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onChange", function (event) { | ||
var onChange = _this.props.onChange; | ||
@@ -391,3 +441,3 @@ event.persist(); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onFocus", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onFocus", function (event) { | ||
var onFocus = _this.props.onFocus; | ||
@@ -404,3 +454,3 @@ | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onBlur", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onBlur", function (event) { | ||
var onBlur = _this.props.onBlur; | ||
@@ -420,3 +470,3 @@ | ||
_createClass(Choice, [{ | ||
createClass(Choice, [{ | ||
key: "componentWillReceiveProps", | ||
@@ -443,3 +493,3 @@ value: function componentWillReceiveProps(nextProps) { | ||
children = _this$props.children, | ||
rest = _objectWithoutProperties(_this$props, ["label", "name", "value", "description", "feedback", "error", "type", "inputTypeStyles", "children"]); | ||
rest = objectWithoutProperties(_this$props, ["label", "name", "value", "description", "feedback", "error", "type", "inputTypeStyles", "children"]); | ||
@@ -452,3 +502,4 @@ var choiceId = getId(rest.id, name, value); | ||
}, feedback === 'error' && error && renderError(error, errorId), React.createElement("label", { | ||
htmlFor: choiceId | ||
htmlFor: choiceId, | ||
className: styles$1.label | ||
}, React.createElement(Box, { | ||
@@ -462,3 +513,3 @@ tag: "span", | ||
"data-testid": "fake-input" | ||
}, React.createElement("input", _extends({}, safeRest(rest), { | ||
}, React.createElement("input", _extends_1({}, safeRest(rest), { | ||
id: choiceId, | ||
@@ -513,3 +564,3 @@ type: type, | ||
var Checkbox = function Checkbox(props) { | ||
return React.createElement(Choice, _extends({}, props, { | ||
return React.createElement(Choice, _extends_1({}, props, { | ||
type: "checkbox", | ||
@@ -516,0 +567,0 @@ inputTypeStyles: styles$2 |
@@ -9,41 +9,9 @@ import React from 'react'; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
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); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
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; | ||
} | ||
var _extends_1 = createCommonjsModule(function (module) { | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
module.exports = _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -65,33 +33,5 @@ var source = arguments[i]; | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
module.exports = _extends; | ||
}); | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
@@ -112,7 +52,7 @@ if (source == null) return {}; | ||
var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose; | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
@@ -134,2 +74,50 @@ | ||
var objectWithoutProperties = _objectWithoutProperties; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
var classCallCheck = _classCallCheck; | ||
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); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var createClass = _createClass; | ||
var _typeof_1 = createCommonjsModule(function (module) { | ||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } | ||
function _typeof(obj) { | ||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return _typeof2(obj); | ||
}; | ||
} else { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); | ||
}; | ||
} | ||
return _typeof(obj); | ||
} | ||
module.exports = _typeof; | ||
}); | ||
function _assertThisInitialized(self) { | ||
@@ -143,10 +131,72 @@ if (self === void 0) { | ||
var assertThisInitialized = _assertThisInitialized; | ||
function _possibleConstructorReturn(self, call) { | ||
if (call && (typeof call === "object" || typeof call === "function")) { | ||
if (call && (_typeof_1(call) === "object" || typeof call === "function")) { | ||
return call; | ||
} | ||
return _assertThisInitialized(self); | ||
return assertThisInitialized(self); | ||
} | ||
var possibleConstructorReturn = _possibleConstructorReturn; | ||
var getPrototypeOf = createCommonjsModule(function (module) { | ||
function _getPrototypeOf(o) { | ||
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
module.exports = _getPrototypeOf; | ||
}); | ||
var setPrototypeOf = createCommonjsModule(function (module) { | ||
function _setPrototypeOf(o, p) { | ||
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
module.exports = _setPrototypeOf; | ||
}); | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) setPrototypeOf(subClass, superClass); | ||
} | ||
var inherits = _inherits; | ||
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; | ||
} | ||
var defineProperty = _defineProperty; | ||
var safeRest = (function (_ref) { | ||
@@ -156,3 +206,3 @@ var style = _ref.style, | ||
as = _ref.as, | ||
props = _objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
props = objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
@@ -183,6 +233,6 @@ return props; | ||
children = _ref.children, | ||
rest = _objectWithoutProperties(_ref, ["direction", "justifyContent", "dangerouslyAddClassName", "children"]); | ||
rest = objectWithoutProperties(_ref, ["direction", "justifyContent", "dangerouslyAddClassName", "children"]); | ||
var classNames = joinClassNames(styles[direction], justifyContent && styles["justifyContent".concat(capitalize(justifyContent))], dangerouslyAddClassName); | ||
return React.createElement("div", _extends({}, safeRest(rest), { | ||
return React.createElement("div", _extends_1({}, safeRest(rest), { | ||
className: classNames | ||
@@ -206,11 +256,11 @@ }), children); | ||
function (_React$Component) { | ||
_inherits(ColoredTextProvider, _React$Component); | ||
inherits(ColoredTextProvider, _React$Component); | ||
function ColoredTextProvider() { | ||
_classCallCheck(this, ColoredTextProvider); | ||
classCallCheck(this, ColoredTextProvider); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(ColoredTextProvider).apply(this, arguments)); | ||
return possibleConstructorReturn(this, getPrototypeOf(ColoredTextProvider).apply(this, arguments)); | ||
} | ||
_createClass(ColoredTextProvider, [{ | ||
createClass(ColoredTextProvider, [{ | ||
key: "getChildContext", | ||
@@ -274,3 +324,3 @@ value: function getChildContext() { | ||
var styles$1 = {"alignCenter":"TDS_Choice-modules__alignCenter___1M8FG","alignFlexStart":"TDS_Choice-modules__alignFlexStart___1zDGw","flexOne":"TDS_Choice-modules__flexOne___1SrBe","fakeInput":"TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl","fakeCheckbox":"TDS_Choice-modules__fakeCheckbox___1Buqb TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__rounded___3df1Q","fakeRadio":"TDS_Choice-modules__fakeRadio___1H3I- TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__circular___OppHT","unchecked":"TDS_Choice-modules__unchecked___3Zyro","focused":"TDS_Choice-modules__focused___2KPRk","error":"TDS_Choice-modules__error___1Vlds","hiddenInput":"TDS_Choice-modules__hiddenInput___3S8As"}; | ||
var styles$1 = {"alignCenter":"TDS_Choice-modules__alignCenter___1M8FG","alignFlexStart":"TDS_Choice-modules__alignFlexStart___1zDGw","flexOne":"TDS_Choice-modules__flexOne___1SrBe","label":"TDS_Choice-modules__label___1S7Ir","fakeInput":"TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl","fakeCheckbox":"TDS_Choice-modules__fakeCheckbox___1Buqb TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__rounded___3df1Q","fakeRadio":"TDS_Choice-modules__fakeRadio___1H3I- TDS_Choice-modules__fakeInput___3I1CX TDS_Borders-modules__thin___1JHOl TDS_Borders-modules__circular___OppHT","unchecked":"TDS_Choice-modules__unchecked___3Zyro","focused":"TDS_Choice-modules__focused___2KPRk","error":"TDS_Choice-modules__error___1Vlds","hiddenInput":"TDS_Choice-modules__hiddenInput___3S8As"}; | ||
@@ -347,3 +397,3 @@ var messagingStyles = {"default":"TDS_Messaging-modules__default___2B8Di","success":"TDS_Messaging-modules__success___3kyw2","error":"TDS_Messaging-modules__error___3NArF","errorText":"TDS_Messaging-modules__errorText___IDcbb","disabledText":"TDS_Messaging-modules__disabledText___1bjON"}; | ||
function (_React$Component) { | ||
_inherits(Choice, _React$Component); | ||
inherits(Choice, _React$Component); | ||
@@ -355,3 +405,3 @@ function Choice() { | ||
_classCallCheck(this, Choice); | ||
classCallCheck(this, Choice); | ||
@@ -362,5 +412,5 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Choice)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_this = possibleConstructorReturn(this, (_getPrototypeOf2 = getPrototypeOf(Choice)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { | ||
defineProperty(assertThisInitialized(_this), "state", { | ||
checked: _this.props.checked, | ||
@@ -370,3 +420,3 @@ focus: false | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onChange", function (event) { | ||
var onChange = _this.props.onChange; | ||
@@ -387,3 +437,3 @@ event.persist(); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onFocus", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onFocus", function (event) { | ||
var onFocus = _this.props.onFocus; | ||
@@ -400,3 +450,3 @@ | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onBlur", function (event) { | ||
defineProperty(assertThisInitialized(_this), "onBlur", function (event) { | ||
var onBlur = _this.props.onBlur; | ||
@@ -416,3 +466,3 @@ | ||
_createClass(Choice, [{ | ||
createClass(Choice, [{ | ||
key: "componentWillReceiveProps", | ||
@@ -439,3 +489,3 @@ value: function componentWillReceiveProps(nextProps) { | ||
children = _this$props.children, | ||
rest = _objectWithoutProperties(_this$props, ["label", "name", "value", "description", "feedback", "error", "type", "inputTypeStyles", "children"]); | ||
rest = objectWithoutProperties(_this$props, ["label", "name", "value", "description", "feedback", "error", "type", "inputTypeStyles", "children"]); | ||
@@ -448,3 +498,4 @@ var choiceId = getId(rest.id, name, value); | ||
}, feedback === 'error' && error && renderError(error, errorId), React.createElement("label", { | ||
htmlFor: choiceId | ||
htmlFor: choiceId, | ||
className: styles$1.label | ||
}, React.createElement(Box, { | ||
@@ -458,3 +509,3 @@ tag: "span", | ||
"data-testid": "fake-input" | ||
}, React.createElement("input", _extends({}, safeRest(rest), { | ||
}, React.createElement("input", _extends_1({}, safeRest(rest), { | ||
id: choiceId, | ||
@@ -509,3 +560,3 @@ type: type, | ||
var Checkbox = function Checkbox(props) { | ||
return React.createElement(Choice, _extends({}, props, { | ||
return React.createElement(Choice, _extends_1({}, props, { | ||
type: "checkbox", | ||
@@ -512,0 +563,0 @@ inputTypeStyles: styles$2 |
{ | ||
"name": "@tds/core-checkbox", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"main": "index.cjs.js", | ||
@@ -36,5 +36,5 @@ "module": "index.es.js", | ||
"@tds/core-colours": "^1.1.1", | ||
"@tds/shared-choice": "^1.1.10" | ||
"@tds/shared-choice": "^1.1.11" | ||
}, | ||
"gitHead": "7eabb60776066c077b2ea3ae8f6b6a09d8b26f02" | ||
"gitHead": "fbf3603b1ffc5bf642c825b51c3c202d2e3d5bfc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
63323
1446
0