Skip to content

Commit

Permalink
Release 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sawyerh committed Nov 9, 2017
1 parent 2783d9f commit f67518c
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 40 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"packages/*",
"packages/themes/*"
],
"version": "1.4.0"
"version": "1.5.0"
}
67 changes: 39 additions & 28 deletions packages/core/dist/components/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
});
exports.TextField = undefined;

var _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; };

var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _FormLabel = require('../FormLabel/FormLabel');
Expand All @@ -29,6 +31,8 @@ var _lodash2 = _interopRequireDefault(_lodash);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
Expand All @@ -38,7 +42,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
/**
* A `TextField` component renders an input field as well as supporting UI
* elements like a label, error message, and hint text.
*/
*/
var TextField = exports.TextField = function (_React$PureComponent) {
_inherits(TextField, _React$PureComponent);

Expand All @@ -54,46 +58,53 @@ var TextField = exports.TextField = function (_React$PureComponent) {
_createClass(TextField, [{
key: 'render',
value: function render() {
var FieldComponent = this.props.multiline ? 'textarea' : 'input';
var rows = this.props.multiline && this.props.rows ? this.props.rows : undefined;
var _props = this.props,
className = _props.className,
labelClassName = _props.labelClassName,
fieldClassName = _props.fieldClassName,
errorMessage = _props.errorMessage,
hint = _props.hint,
requirementLabel = _props.requirementLabel,
inversed = _props.inversed,
rows = _props.rows,
multiline = _props.multiline,
label = _props.label,
fieldRef = _props.fieldRef,
type = _props.type,
fieldProps = _objectWithoutProperties(_props, ['className', 'labelClassName', 'fieldClassName', 'errorMessage', 'hint', 'requirementLabel', 'inversed', 'rows', 'multiline', 'label', 'fieldRef', 'type']);

var FieldComponent = multiline ? 'textarea' : 'input';
var _rows = multiline && rows ? rows : undefined;

var classes = (0, _classnames2.default)('ds-u-clearfix', // fixes issue where the label's margin is collapsed
this.props.className);
className);
var fieldClasses = (0, _classnames2.default)('ds-c-field', {
'ds-c-field--error': typeof this.props.errorMessage === 'string',
'ds-c-field--inverse': this.props.inversed
}, this.props.fieldClassName);
'ds-c-field--error': typeof errorMessage === 'string',
'ds-c-field--inverse': inversed
}, fieldClassName);

return _react2.default.createElement(
'div',
{ className: classes },
_react2.default.createElement(
_FormLabel2.default,
{
className: this.props.labelClassName,
errorMessage: this.props.errorMessage,
className: labelClassName,
errorMessage: errorMessage,
fieldId: this.id,
hint: this.props.hint,
requirementLabel: this.props.requirementLabel,
inversed: this.props.inversed
hint: hint,
requirementLabel: requirementLabel,
inversed: inversed
},
this.props.label
label
),
_react2.default.createElement(FieldComponent, {
_react2.default.createElement(FieldComponent, _extends({
className: fieldClasses,
defaultValue: this.props.defaultValue,
disabled: this.props.disabled,
id: this.id,
max: this.props.max,
min: this.props.min,
name: this.props.name,
onChange: this.props.onChange,
onBlur: this.props.onBlur,
ref: this.props.fieldRef,
rows: rows,
type: this.props.multiline ? undefined : this.props.type,
value: this.props.value
})
ref: fieldRef,
rows: _rows,
type: multiline ? undefined : type
}, fieldProps))
);
}
}]);
Expand Down Expand Up @@ -122,8 +133,8 @@ TextField.propTypes = {
*/
fieldClassName: _propTypes2.default.string,
/**
* Access a reference to the `input` or `textarea` element
*/
* Access a reference to the `input` or `textarea` element
*/
fieldRef: _propTypes2.default.func,
/**
* Additional hint text to display
Expand Down
2 changes: 1 addition & 1 deletion packages/core/dist/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cmsgov/design-system-core",
"version": "1.4.0",
"version": "1.5.0",
"publishConfig": {
"access": "public"
},
Expand All @@ -9,7 +9,7 @@
"license": "SEE LICENSE IN LICENSE.md",
"main": "dist/index.js",
"dependencies": {
"@cmsgov/design-system-support": "^1.4.0",
"@cmsgov/design-system-support": "^1.5.0",
"classnames": "^2.2.5",
"core-js": "^2.5.1",
"ev-emitter": "^1.1.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@cmsgov/design-system-docs",
"version": "1.4.0",
"version": "1.5.0",
"private": true,
"description": "Design system's documentation website",
"repository": "CMSgov/design-system",
"dependencies": {
"@cmsgov/design-system-core": "^1.4.0",
"@cmsgov/design-system-layout": "^1.4.0",
"@cmsgov/design-system-support": "^1.4.0",
"@cmsgov/design-system-core": "^1.5.0",
"@cmsgov/design-system-layout": "^1.5.0",
"@cmsgov/design-system-support": "^1.5.0",
"classnames": "^2.2.5",
"core-js": "^2.5.1",
"lodash": "^4.17.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/dist/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@cmsgov/design-system-layout",
"version": "1.4.0",
"version": "1.5.0",
"publishConfig": {
"access": "public"
},
"description": "Responsive flexbox grid framework",
"repository": "CMSgov/design-system",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@cmsgov/design-system-support": "^1.4.0"
"@cmsgov/design-system-support": "^1.5.0"
}
}
2 changes: 1 addition & 1 deletion packages/support/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cmsgov/design-system-support",
"version": "1.4.0",
"version": "1.5.0",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit f67518c

Please sign in to comment.