@paprika/radio
Advanced tools
Comparing version 0.1.33 to 0.1.34
@@ -37,3 +37,3 @@ "use strict"; | ||
var _customPropTypes = require("@paprika/helpers/lib/customPropTypes"); | ||
var _types = _interopRequireDefault(require("../../types")); | ||
@@ -61,3 +61,3 @@ function ownKeys(object, enumerableOnly) { var keys = (0, _keys["default"])(object); if (_getOwnPropertySymbols["default"]) { var symbols = (0, _getOwnPropertySymbols["default"])(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return (0, _getOwnPropertyDescriptor["default"])(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
/** The size for all radio components. */ | ||
size: _propTypes["default"].oneOf(_customPropTypes.ShirtSizes.DEFAULT) | ||
size: _propTypes["default"].oneOf([_types["default"].size.SMALL, _types["default"].size.MEDIUM, _types["default"].size.LARGE]) | ||
}; | ||
@@ -69,3 +69,3 @@ var defaultProps = { | ||
isDisabled: false, | ||
size: _customPropTypes.ShirtSizes.MEDIUM | ||
size: _types["default"].size.MEDIUM | ||
}; | ||
@@ -72,0 +72,0 @@ |
@@ -31,2 +31,3 @@ export default Radio; | ||
} | ||
declare namespace Radio { | ||
@@ -47,4 +48,23 @@ function Group(props: GroupProps): JSX.Element; | ||
/** The size for all radio components. */ | ||
size?: ShirtSizes.DEFAULT; | ||
size?: Radio.types.size.SMALL | Radio.types.size.MEDIUM | Radio.types.size.LARGE; | ||
} | ||
} | ||
declare namespace Radio { | ||
namespace types { | ||
namespace size { | ||
const SMALL: any; | ||
const MEDIUM: any; | ||
const LARGE: any; | ||
} | ||
} | ||
} | ||
declare namespace Radio { | ||
namespace types { | ||
namespace size { | ||
const SMALL: any; | ||
const MEDIUM: any; | ||
const LARGE: any; | ||
} | ||
} | ||
} |
@@ -25,4 +25,2 @@ "use strict"; | ||
var constants = _interopRequireWildcard(require("@paprika/constants/lib/Constants")); | ||
var _Check = _interopRequireDefault(require("@paprika/icon/lib/Check")); | ||
@@ -34,2 +32,4 @@ | ||
var _types = _interopRequireDefault(require("./types")); | ||
function Radio(props) { | ||
@@ -104,5 +104,3 @@ var a11yText = props.a11yText, | ||
Radio.types = { | ||
size: constants.defaultSize | ||
}; | ||
Radio.types = _types["default"]; | ||
var propTypes = { | ||
@@ -109,0 +107,0 @@ /** Used for aria-label on the radio input */ |
@@ -25,3 +25,3 @@ "use strict"; | ||
var types = _interopRequireWildcard(require("./types")); | ||
var _types = _interopRequireDefault(require("./types")); | ||
@@ -45,3 +45,3 @@ var _styles; | ||
var largeRadioHalfSize = getHalfSizeCss(largeRadioSize); | ||
var styles = (_styles = {}, (0, _defineProperty2["default"])(_styles, types.SMALL, { | ||
var styles = (_styles = {}, (0, _defineProperty2["default"])(_styles, _types["default"].size.SMALL, { | ||
baseFontSize: { | ||
@@ -72,3 +72,3 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(-1), "px") | ||
} | ||
}), (0, _defineProperty2["default"])(_styles, types.MEDIUM, { | ||
}), (0, _defineProperty2["default"])(_styles, _types["default"].size.MEDIUM, { | ||
baseFontSize: { | ||
@@ -99,3 +99,3 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(), "px") | ||
} | ||
}), (0, _defineProperty2["default"])(_styles, types.LARGE, { | ||
}), (0, _defineProperty2["default"])(_styles, _types["default"].size.LARGE, { | ||
baseFontSize: { | ||
@@ -102,0 +102,0 @@ fontSize: "".concat((0, _helpers.fontSizeValue)(), "px") |
@@ -11,12 +11,14 @@ "use strict"; | ||
exports.LARGE = exports.MEDIUM = exports.SMALL = void 0; | ||
exports["default"] = void 0; | ||
var constants = _interopRequireWildcard(require("@paprika/constants/lib/Constants")); | ||
var SMALL = constants.size.SMALL; | ||
exports.SMALL = SMALL; | ||
var MEDIUM = constants.size.MEDIUM; | ||
exports.MEDIUM = MEDIUM; | ||
var LARGE = constants.size.LARGE; | ||
exports.LARGE = LARGE; | ||
var _default = { | ||
size: { | ||
SMALL: constants.size.SMALL, | ||
MEDIUM: constants.size.MEDIUM, | ||
LARGE: constants.size.LARGE | ||
} | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@paprika/radio", | ||
"version": "0.1.33", | ||
"version": "0.1.34", | ||
"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", | ||
@@ -21,3 +21,3 @@ "author": "@paprika", | ||
"@paprika/helpers": "^0.2.13", | ||
"@paprika/icon": "^0.3.9", | ||
"@paprika/icon": "^0.3.10", | ||
"@paprika/stylers": "^0.2.11", | ||
@@ -38,3 +38,3 @@ "@paprika/tokens": "^0.1.17", | ||
}, | ||
"gitHead": "fdb94071d18f52f162f0eee37ef69ba1966258a8" | ||
"gitHead": "6f98d55ed2bbe050be935b822b470a97e7560c4a" | ||
} |
<!-- autogenerated don't modify --> | ||
# @paprika/radio - 0.1.33 | ||
# @paprika/radio - 0.1.34 | ||
@@ -42,10 +42,10 @@ ## Description | ||
| Prop | Type | required | default | Description | | ||
| ----------- | ------------------ | -------- | ----------------- | ---------------------------------------------------- | | ||
| a11yText | string | false | "" | aria-labelledby prop on the containing group element | | ||
| canDeselect | bool | false | false | Can deselect any radio | | ||
| children | node | false | null | The individual radio items. | | ||
| isDisabled | bool | false | false | Are all radios disabled | | ||
| onChange | func | true | - | On change of radio selection. | | ||
| size | ShirtSizes.DEFAULT | false | ShirtSizes.MEDIUM | The size for all radio components. | | ||
| Prop | Type | required | default | Description | | ||
| ----------- | -------------------------------------------------------------------------- | -------- | ----------------------- | ---------------------------------------------------- | | ||
| a11yText | string | false | "" | aria-labelledby prop on the containing group element | | ||
| canDeselect | bool | false | false | Can deselect any radio | | ||
| children | node | false | null | The individual radio items. | | ||
| isDisabled | bool | false | false | Are all radios disabled | | ||
| onChange | func | true | - | On change of radio selection. | | ||
| size | [ Radio.types.size.SMALL, Radio.types.size.MEDIUM, Radio.types.size.LARGE] | false | Radio.types.size.MEDIUM | The size for all radio components. | | ||
@@ -52,0 +52,0 @@ <!-- autogenerated don't modify --> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
52602
454
Updated@paprika/icon@^0.3.10