Socket
Socket
Sign inDemoInstall

@paprika/radio

Package Overview
Dependencies
Maintainers
4
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/radio - npm Package Compare versions

Comparing version 0.1.28 to 0.1.29

lib/types.js

6

CHANGELOG.md

@@ -20,1 +20,7 @@ # Changelog

- Remove readonly true prop from input (fix safari focus) [@tristanjasper](https://github.com/tristanjasper).
## [0.1.29] - 2020-09-02
### Added
- Updated: Created and placed all constants into type.js file. [@kaan.darcey](https://github.com/KDarcey).

112

lib/Radio.js
"use strict";
var _interopRequireWildcard = require("@babel/runtime-corejs2/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");

@@ -25,6 +27,6 @@

var constants = _interopRequireWildcard(require("@paprika/constants/lib/Constants"));
var _Check = _interopRequireDefault(require("@paprika/icon/lib/Check"));
var _customPropTypes = require("@paprika/helpers/lib/customPropTypes");
var _Radio = _interopRequireDefault(require("./Radio.styles"));

@@ -34,54 +36,2 @@

var propTypes = {
/** Used for aria-label on the radio input */
a11yText: _propTypes["default"].string,
/** Used for aria-describedby on the radio input */
ariaDescribedBy: _propTypes["default"].string,
/** Describe if the radio started as selected or not */
canDeselect: _propTypes["default"].bool,
/** Used for label contents */
children: _propTypes["default"].node,
/* Controls if the radio is checked or not, never combine it with defaultIsChecked */
isChecked: _propTypes["default"].bool,
/** Describe if the radio is disabled or not */
isDisabled: _propTypes["default"].bool,
/** Describe if the radio started as checked or not */
defaultIsChecked: _propTypes["default"].bool,
/** Name provided for accessibility */
name: _propTypes["default"].string,
/** onClick provided by parent Group component */
onClick: function onClick() {},
/** Size provided by parent Group component */
size: _propTypes["default"].oneOf(_customPropTypes.ShirtSizes.DEFAULT),
/** Value for tabindex attribute to override the default of 0. */
tabIndex: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
/** Value applied to the input if needed. */
value: _propTypes["default"].string
};
var defaultProps = {
a11yText: null,
ariaDescribedBy: null,
canDeselect: false,
children: null,
defaultIsChecked: false,
isChecked: false,
isDisabled: false,
name: "",
onClick: function onClick() {},
size: _customPropTypes.ShirtSizes.MEDIUM,
tabIndex: 0,
value: ""
};
var _StyledDiv = (0, _styledComponents["default"])("div").withConfig({

@@ -161,2 +111,56 @@ displayName: "Radio___StyledDiv",

Radio.types = {
size: constants.defaultSize
};
var propTypes = {
/** Used for aria-label on the radio input */
a11yText: _propTypes["default"].string,
/** Used for aria-describedby on the radio input */
ariaDescribedBy: _propTypes["default"].string,
/** Describe if the radio started as selected or not */
canDeselect: _propTypes["default"].bool,
/** Used for label contents */
children: _propTypes["default"].node,
/* Controls if the radio is checked or not, never combine it with defaultIsChecked */
isChecked: _propTypes["default"].bool,
/** Describe if the radio is disabled or not */
isDisabled: _propTypes["default"].bool,
/** Describe if the radio started as checked or not */
defaultIsChecked: _propTypes["default"].bool,
/** Name provided for accessibility */
name: _propTypes["default"].string,
/** onClick provided by parent Group component */
onClick: function onClick() {},
/** Size provided by parent Group component */
size: _propTypes["default"].oneOf([Radio.types.size.SMALL, Radio.types.size.MEDIUM, Radio.types.size.LARGE]),
/** Value for tabindex attribute to override the default of 0. */
tabIndex: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
/** Value applied to the input if needed. */
value: _propTypes["default"].string
};
var defaultProps = {
a11yText: null,
ariaDescribedBy: null,
canDeselect: false,
children: null,
defaultIsChecked: false,
isChecked: false,
isDisabled: false,
name: "",
onClick: function onClick() {},
size: Radio.types.size.MEDIUM,
tabIndex: 0,
value: ""
};
Radio.displayName = "Radio";

@@ -163,0 +167,0 @@ Radio.propTypes = propTypes;

@@ -5,2 +5,4 @@ "use strict";

var _interopRequireWildcard = require("@babel/runtime-corejs2/helpers/interopRequireWildcard");
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");

@@ -22,6 +24,6 @@

var _customPropTypes = require("@paprika/helpers/lib/customPropTypes");
var _tokens = _interopRequireDefault(require("@paprika/tokens"));
var types = _interopRequireWildcard(require("./types"));
var _styles;

@@ -44,3 +46,3 @@

var largeRadioHalfSize = getHalfSizeCss(largeRadioSize);
var styles = (_styles = {}, (0, _defineProperty2["default"])(_styles, _customPropTypes.ShirtSizes.SMALL, {
var styles = (_styles = {}, (0, _defineProperty2["default"])(_styles, types.SMALL, {
baseFontSize: {

@@ -71,3 +73,3 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(-1), "px")

}
}), (0, _defineProperty2["default"])(_styles, _customPropTypes.ShirtSizes.MEDIUM, {
}), (0, _defineProperty2["default"])(_styles, types.MEDIUM, {
baseFontSize: {

@@ -98,3 +100,3 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(), "px")

}
}), (0, _defineProperty2["default"])(_styles, _customPropTypes.ShirtSizes.LARGE, {
}), (0, _defineProperty2["default"])(_styles, types.LARGE, {
baseFontSize: {

@@ -101,0 +103,0 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(), "px")

{
"name": "@paprika/radio",
"version": "0.1.28",
"version": "0.1.29",
"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",

@@ -18,6 +18,7 @@ "author": "@paprika",

"@babel/runtime-corejs2": "^7.3.1",
"@paprika/constants": "^0.1.1",
"@paprika/helpers": "^0.2.13",
"@paprika/icon": "^0.3.6",
"@paprika/stylers": "^0.2.8",
"@paprika/tokens": "^0.1.14",
"@paprika/icon": "^0.3.7",
"@paprika/stylers": "^0.2.9",
"@paprika/tokens": "^0.1.15",
"nanoid": "^2.1.7",

@@ -36,3 +37,3 @@ "prop-types": "^15.7.2"

},
"gitHead": "494ce26cb0a6c24a8f6abf2b154d97ddd4d7e343"
"gitHead": "2bd157d8d01dd451f63857c04209d3963a6dcbc0"
}
<!-- autogenerated don't modify -->
# @paprika/radio - 0.1.28
# @paprika/radio - 0.1.29

@@ -25,16 +25,16 @@ ## Description

| Prop | Type | required | default | Description |
| ---------------- | ------------------ | -------- | ----------------- | ---------------------------------------------------------- |
| a11yText | string | false | null | Used for aria-label on the radio input |
| ariaDescribedBy | string | false | null | Used for aria-describedby on the radio input |
| canDeselect | bool | false | false | Describe if the radio started as selected or not |
| children | node | false | null | Used for label contents |
| isChecked | bool | false | false | |
| isDisabled | bool | false | false | Describe if the radio is disabled or not |
| defaultIsChecked | bool | false | false | Describe if the radio started as checked or not |
| name | string | false | "" | Name provided for accessibility |
| onClick | custom | false | () => {} | onClick provided by parent Group component |
| size | ShirtSizes.DEFAULT | false | ShirtSizes.MEDIUM | Size provided by parent Group component |
| tabIndex | [number,string] | false | 0 | Value for tabindex attribute to override the default of 0. |
| value | string | false | "" | Value applied to the input if needed. |
| Prop | Type | required | default | Description |
| ---------------- | -------------------------------------------------------------------------- | -------- | ----------------------- | ---------------------------------------------------------- |
| a11yText | string | false | null | Used for aria-label on the radio input |
| ariaDescribedBy | string | false | null | Used for aria-describedby on the radio input |
| canDeselect | bool | false | false | Describe if the radio started as selected or not |
| children | node | false | null | Used for label contents |
| isChecked | bool | false | false | |
| isDisabled | bool | false | false | Describe if the radio is disabled or not |
| defaultIsChecked | bool | false | false | Describe if the radio started as checked or not |
| name | string | false | "" | Name provided for accessibility |
| onClick | custom | false | () => {} | onClick provided by parent Group component |
| size | [ Radio.types.size.SMALL, Radio.types.size.MEDIUM, Radio.types.size.LARGE] | false | Radio.types.size.MEDIUM | Size provided by parent Group component |
| tabIndex | [number,string] | false | 0 | Value for tabindex attribute to override the default of 0. |
| value | string | false | "" | Value applied to the input if needed. |

@@ -41,0 +41,0 @@ ### Radio.Group

Sorry, the diff of this file is not supported yet

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