Skip to content

Commit

Permalink
Release v1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sawyerh committed Jan 31, 2018
1 parent ab5b02e commit 674600f
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 27 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"packages/*",
"packages/themes/*"
],
"version": "1.10.0"
"version": "1.11.0"
}
2 changes: 2 additions & 0 deletions packages/core/dist/components/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument

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; }; }();

require('core-js/fn/array/find');

var _Button = require('../Button/Button');

var _Button2 = _interopRequireDefault(_Button);
Expand Down
65 changes: 52 additions & 13 deletions packages/core/dist/components/MonthPicker/MonthPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ var _createClass = function () { function defineProperties(target, props) { for

exports.getMonthNames = getMonthNames;

require('core-js/fn/array/includes');

var _Button = require('../Button/Button');

var _Button2 = _interopRequireDefault(_Button);
Expand All @@ -33,6 +35,10 @@ var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _lodash = require('lodash.uniqueid');

var _lodash2 = _interopRequireDefault(_lodash);

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

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand Down Expand Up @@ -74,6 +80,8 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {

var _this = _possibleConstructorReturn(this, (MonthPicker.__proto__ || Object.getPrototypeOf(MonthPicker)).call(this, props));

_this.hintId = (0, _lodash2.default)('monthpicker_hint_');
_this.labelId = (0, _lodash2.default)('monthpicker_label_');
_this.months = getMonthNames(props.locale);
_this.monthsLong = getMonthNames(props.locale, false);

Expand Down Expand Up @@ -169,16 +177,17 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {
_react2.default.createElement(
_Choice2.default,
{
name: name,
value: i + 1,
'aria-describedby': _this2.props.hint ? _this2.hintId : null,
'aria-label': _this2.monthsLong[i],
checked: selectedMonths.includes(i + 1),
onChange: function onChange(e) {
return _this2.handleChange(e);
},
className: 'ds-c-month-picker__month',
disabled: disabledMonths.includes(i + 1),
inversed: inversed,
'aria-label': _this2.monthsLong[i]
onChange: function onChange(e) {
return _this2.handleChange(e);
},
name: name,
value: i + 1
},
month
)
Expand All @@ -192,6 +201,7 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {
return _react2.default.createElement(
_Button2.default,
{
'aria-describedby': this.labelId,
size: 'small',
className: 'ds-u-margin-right--1',
onClick: onClick,
Expand All @@ -208,10 +218,10 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {
return _react2.default.createElement(
_FormLabel2.default,
{
className: 'ds-u-visibility--screen-reader',
labelClassName: classes,
component: 'legend',
errorMessage: this.props.errorMessage,
hint: this.props.hint,
requirementLabel: this.props.requirementLabel,
inversed: this.props.inversed
},
Expand All @@ -227,14 +237,34 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {
selectAllText = _props2.selectAllText,
clearAllText = _props2.clearAllText;

var Heading = this.props.headingLevel ? 'h' + this.props.headingLevel : 'h4';
var classes = (0, _classnames2.default)('ds-c-month-picker', 'ds-c-fieldset', 'ds-u-margin-y--3', this.props.className);
return _react2.default.createElement(
'fieldset',
'div',
{ className: classes },
this.renderLabel(),
_react2.default.createElement(
'div',
{ className: 'ds-u-margin-y--3' },
null,
_react2.default.createElement(
Heading,
{
className: 'ds-c-label ds-u-font-weight--bold ds-u-margin--0',
id: this.labelId
},
this.props.label
),
this.props.hint ? _react2.default.createElement(
'p',
{
className: 'ds-c-label ds-c-field__hint ds-u-margin--0',
id: this.hintId
},
this.props.hint
) : null
),
_react2.default.createElement(
'div',
{ className: 'ds-u-margin-top--3' },
this.renderButton(selectAllText, function () {
return _this3.handleSelectAll();
}),
Expand All @@ -243,9 +273,14 @@ var MonthPicker = exports.MonthPicker = function (_React$PureComponent) {
})
),
_react2.default.createElement(
'div',
{ className: 'ds-c-month-picker__months' },
this.renderMonths()
'fieldset',
{ className: 'ds-c-fieldset' },
this.renderLabel(),
_react2.default.createElement(
'div',
{ className: 'ds-c-month-picker__months' },
this.renderMonths()
)
)
);
}
Expand Down Expand Up @@ -295,6 +330,10 @@ MonthPicker.propTypes = {
* Additional hint text to display
*/
hint: _propTypes2.default.node,
/**
* Heading type to override default `<h4>` in title block
*/
headingLevel: _propTypes2.default.number,
/**
* Text showing the requirement ("Required", "Optional", etc.). See [Required and Optional Fields]({{root}}/guidelines/forms/#required-and-optional-fields).
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/core/dist/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/dist/utilities/border.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/dist/utilities/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.10.0",
"version": "1.11.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.10.0",
"@cmsgov/design-system-support": "^1.11.0",
"classnames": "^2.2.5",
"core-js": "^2.5.1",
"downshift": "^1.22.5",
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.10.0",
"version": "1.11.0",
"private": true,
"description": "Design system's documentation website",
"repository": "CMSgov/design-system",
"dependencies": {
"@cmsgov/design-system-core": "^1.10.0",
"@cmsgov/design-system-layout": "^1.10.0",
"@cmsgov/design-system-support": "^1.10.0",
"@cmsgov/design-system-core": "^1.11.0",
"@cmsgov/design-system-layout": "^1.11.0",
"@cmsgov/design-system-support": "^1.11.0",
"classnames": "^2.2.5",
"core-js": "^2.5.3",
"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.10.0",
"version": "1.11.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.10.0"
"@cmsgov/design-system-support": "^1.11.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.10.0",
"version": "1.11.0",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit 674600f

Please sign in to comment.