Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cmsgov/design-system

Package Overview
Dependencies
Maintainers
39
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cmsgov/design-system - npm Package Compare versions

Comparing version 2.0.0-beta.1 to 2.0.0-beta.2

dist/esnext/index.mjs

2

dist/components/Autocomplete/Autocomplete.js

@@ -143,3 +143,3 @@ "use strict";

};
return _react.default.cloneElement(child, getInputProps(propOverrides));
return /*#__PURE__*/_react.default.cloneElement(child, getInputProps(propOverrides));
}

@@ -146,0 +146,0 @@

@@ -66,2 +66,3 @@ "use strict";

_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
_this.handleUncheck = _this.handleUncheck.bind(_assertThisInitialized(_this));
_this.id = _this.props.id || (0, _lodash.default)("".concat(_this.props.type, "_").concat(_this.props.name, "_"));

@@ -80,3 +81,3 @@

_this.uncheckEventName = "".concat(_this.props.name, "-uncheck");
dsChoiceEmitter.on(_this.uncheckEventName, _this.handleUncheck.bind(_assertThisInitialized(_this)));
dsChoiceEmitter.on(_this.uncheckEventName, _this.handleUncheck);
}

@@ -91,2 +92,10 @@ } else {

_createClass(Choice, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
// Unbind event emitters are only relevant for uncontrolled radio buttons
if (!this.isControlled && this.props.type === 'radio') {
dsChoiceEmitter.off(this.uncheckEventName, this.handleUncheck);
}
}
}, {
key: "checked",

@@ -127,7 +136,7 @@ value: function checked() {

});
}
if (this.uncheckEventName && evt.target.checked) {
// Emit the uncheck event so other radio options update their state
dsChoiceEmitter.emitEvent(this.uncheckEventName, [this.id]);
if (this.props.type === 'radio' && evt.target.checked) {
// Emit the uncheck event so other radio options update their state
dsChoiceEmitter.emitEvent(this.uncheckEventName, [this.id]);
}
}

@@ -134,0 +143,0 @@ }

@@ -101,3 +101,3 @@ "use strict";

return /*#__PURE__*/_react.default.createElement(_SubStep.default, _extends({
step: _objectSpread({}, s, {}, {
step: _objectSpread(_objectSpread({}, s), {
component: step.component || s.component

@@ -104,0 +104,0 @@ }),

@@ -36,3 +36,3 @@ "use strict";

return /*#__PURE__*/_react.default.createElement(_Step.default, _extends({
step: _objectSpread({}, step, {}, {
step: _objectSpread(_objectSpread({}, step), {
component: props.component || step.component

@@ -39,0 +39,0 @@ }),

@@ -196,3 +196,3 @@ "use strict";

// the Tab components
return _react.default.cloneElement(child, {
return /*#__PURE__*/_react.default.cloneElement(child, {
selected: _this2.state.selectedId === child.props.id,

@@ -199,0 +199,0 @@ tab: undefined,

@@ -310,3 +310,3 @@ "use strict";

var modifiedTextField = _react.default.cloneElement(field, {
var modifiedTextField = /*#__PURE__*/_react.default.cloneElement(field, {
defaultValue: undefined,

@@ -313,0 +313,0 @@ onBlur: function onBlur(evt) {

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

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]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -156,4 +154,3 @@

// wouldn't be a way to actually visit its URL
var item = _extends({}, this.props);
var item = Object.assign({}, this.props);
delete item.items;

@@ -160,0 +157,0 @@ return [item].concat(this.props.items);

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

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]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -111,6 +109,6 @@

if (this.LabelComponent === 'button') {
props = _extends(props, this.buttonProps());
props = Object.assign(props, this.buttonProps());
} else if (this.LabelComponent !== DEFAULT_COMPONENT_TYPE) {
// Apply href if <a> or custom component type
props = _extends(props, this.anchorProps());
props = Object.assign(props, this.anchorProps());
}

@@ -117,0 +115,0 @@

@@ -142,3 +142,3 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

};
return React.cloneElement(child, getInputProps(propOverrides));
return /*#__PURE__*/React.cloneElement(child, getInputProps(propOverrides));
}

@@ -145,0 +145,0 @@

@@ -51,2 +51,3 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
_this.handleUncheck = _this.handleUncheck.bind(_assertThisInitialized(_this));
_this.id = _this.props.id || uniqueId("".concat(_this.props.type, "_").concat(_this.props.name, "_"));

@@ -65,3 +66,3 @@

_this.uncheckEventName = "".concat(_this.props.name, "-uncheck");
dsChoiceEmitter.on(_this.uncheckEventName, _this.handleUncheck.bind(_assertThisInitialized(_this)));
dsChoiceEmitter.on(_this.uncheckEventName, _this.handleUncheck);
}

@@ -76,2 +77,10 @@ } else {

_createClass(Choice, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
// Unbind event emitters are only relevant for uncontrolled radio buttons
if (!this.isControlled && this.props.type === 'radio') {
dsChoiceEmitter.off(this.uncheckEventName, this.handleUncheck);
}
}
}, {
key: "checked",

@@ -112,7 +121,7 @@ value: function checked() {

});
}
if (this.uncheckEventName && evt.target.checked) {
// Emit the uncheck event so other radio options update their state
dsChoiceEmitter.emitEvent(this.uncheckEventName, [this.id]);
if (this.props.type === 'radio' && evt.target.checked) {
// Emit the uncheck event so other radio options update their state
dsChoiceEmitter.emitEvent(this.uncheckEventName, [this.id]);
}
}

@@ -119,0 +128,0 @@ }

@@ -86,3 +86,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

return /*#__PURE__*/React.createElement(SubStep, _extends({
step: _objectSpread({}, s, {}, {
step: _objectSpread(_objectSpread({}, s), {
component: step.component || s.component

@@ -89,0 +89,0 @@ }),

@@ -24,3 +24,3 @@ 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]; } } } return target; }; return _extends.apply(this, arguments); }

return /*#__PURE__*/React.createElement(Step, _extends({
step: _objectSpread({}, step, {}, {
step: _objectSpread(_objectSpread({}, step), {
component: props.component || step.component

@@ -27,0 +27,0 @@ }),

@@ -182,3 +182,3 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

// the Tab components
return React.cloneElement(child, {
return /*#__PURE__*/React.cloneElement(child, {
selected: _this2.state.selectedId === child.props.id,

@@ -185,0 +185,0 @@ tab: undefined,

@@ -293,3 +293,3 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var field = this.field();
var modifiedTextField = React.cloneElement(field, {
var modifiedTextField = /*#__PURE__*/React.cloneElement(field, {
defaultValue: undefined,

@@ -296,0 +296,0 @@ onBlur: function onBlur(evt) {

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -140,4 +138,3 @@

// wouldn't be a way to actually visit its URL
var item = _extends({}, this.props);
var item = Object.assign({}, this.props);
delete item.items;

@@ -144,0 +141,0 @@ return [item].concat(this.props.items);

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -97,6 +95,6 @@

if (this.LabelComponent === 'button') {
props = _extends(props, this.buttonProps());
props = Object.assign(props, this.buttonProps());
} else if (this.LabelComponent !== DEFAULT_COMPONENT_TYPE) {
// Apply href if <a> or custom component type
props = _extends(props, this.anchorProps());
props = Object.assign(props, this.anchorProps());
}

@@ -103,0 +101,0 @@

{
"name": "@cmsgov/design-system",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"publishConfig": {

@@ -12,5 +12,7 @@ "access": "public",

"main": "dist/components/index.js",
"module": "dist/esnext/index.esm.js",
"jsnext:main": "dist/esnext/index.esm.js",
"module": "dist/esnext/index.mjs",
"sideEffects": false,
"files": [
"dist"
],
"dependencies": {

@@ -17,0 +19,0 @@ "classnames": "^2.2.5",

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

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

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

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

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

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