@paprika/radio
Advanced tools
Comparing version 0.1.22 to 0.1.23
@@ -41,3 +41,3 @@ "use strict"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { (0, _defineProperty3["default"])(target, key, source[key]); }); } else if (_getOwnPropertyDescriptors["default"]) { (0, _defineProperties["default"])(target, (0, _getOwnPropertyDescriptors["default"])(source)); } else { ownKeys(source).forEach(function (key) { (0, _defineProperty2["default"])(target, key, (0, _getOwnPropertyDescriptor["default"])(source, key)); }); } } return target; } | ||
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) { (0, _defineProperty3["default"])(target, key, source[key]); }); } else if (_getOwnPropertyDescriptors["default"]) { (0, _defineProperties["default"])(target, (0, _getOwnPropertyDescriptors["default"])(source)); } else { ownKeys(Object(source)).forEach(function (key) { (0, _defineProperty2["default"])(target, key, (0, _getOwnPropertyDescriptor["default"])(source, key)); }); } } return target; } | ||
@@ -107,3 +107,3 @@ var propTypes = { | ||
return _react["default"].createElement("div", { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
role: "radiogroup", | ||
@@ -117,3 +117,3 @@ "aria-labelledby": a11yText, | ||
}; | ||
return _react["default"].cloneElement(child, _objectSpread({ | ||
return /*#__PURE__*/_react["default"].cloneElement(child, _objectSpread(_objectSpread({ | ||
onClick: function onClick() { | ||
@@ -126,3 +126,3 @@ return handleRadioClick(index); | ||
name: child.props.name || name | ||
}, childKey, {}, moreGroupProps)); | ||
}, childKey), moreGroupProps)); | ||
} | ||
@@ -129,0 +129,0 @@ |
@@ -33,3 +33,2 @@ "use strict"; | ||
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ | ||
var propTypes = { | ||
@@ -87,3 +86,3 @@ /** Used for aria-label on the radio input */ | ||
var _StyledDiv = _styledComponents["default"].div.withConfig({ | ||
var _StyledDiv = (0, _styledComponents["default"])("div").withConfig({ | ||
displayName: "Radio___StyledDiv", | ||
@@ -147,13 +146,13 @@ componentId: "ihwmv2-0" | ||
if (a11yText) inputProps["aria-label"] = a11yText; | ||
return _react["default"].createElement(_StyledDiv, (0, _extends2["default"])({ | ||
return /*#__PURE__*/_react["default"].createElement(_StyledDiv, (0, _extends2["default"])({ | ||
"data-pka-anchor": "radio" | ||
}, styleProps, moreProps), _react["default"].createElement("input", inputProps), _react["default"].createElement("label", { | ||
}, styleProps, moreProps), /*#__PURE__*/_react["default"].createElement("input", inputProps), /*#__PURE__*/_react["default"].createElement("label", { | ||
onKeyUp: handleKeyUp, | ||
className: canDeselect ? "deselectable" : "", | ||
htmlFor: radioId | ||
}, children, canDeselect ? _react["default"].createElement(_Check["default"], { | ||
}, children, canDeselect ? /*#__PURE__*/_react["default"].createElement(_Check["default"], { | ||
className: "radio-icon", | ||
"aria-hidden": true, | ||
"data-pka-anchor": "radio.icon.check" | ||
}) : _react["default"].createElement("div", { | ||
}) : /*#__PURE__*/_react["default"].createElement("div", { | ||
className: "radio-icon radio-solid-background", | ||
@@ -160,0 +159,0 @@ "data-pka-anchor": "radio.icon.check" |
{ | ||
"name": "@paprika/radio", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"description": "Radio component displays a radio input and label text beside it. When clicked it selects the input and deselects any other radio input in its group", | ||
@@ -35,3 +35,3 @@ "author": "@paprika", | ||
}, | ||
"gitHead": "4bab05672b82a026c2f27f5343f83cd0ea1b47d8" | ||
"gitHead": "997cbbc21167f2f862b2e2f3b5f2fab7c81353f2" | ||
} |
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
47803
389