diff --git a/dist/DateRangePicker.js b/dist/DateRangePicker.js index d01b85e7..9b9eb0f3 100644 --- a/dist/DateRangePicker.js +++ b/dist/DateRangePicker.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _moment = require('moment'); @@ -52,45 +52,46 @@ var _utilsIsMomentRange = require('./utils/isMomentRange'); var _utilsIsMomentRange2 = _interopRequireDefault(_utilsIsMomentRange); -var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin; +var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin'); + +var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + var absoluteMinimum = (0, _moment2['default'])(new Date(-8640000000000000 / 2)).startOf('day'); var absoluteMaximum = (0, _moment2['default'])(new Date(8640000000000000 / 2)).startOf('day'); -_reactAddons2['default'].initializeTouchEvents(true); - function noop() {} -var DateRangePicker = _reactAddons2['default'].createClass({ +var DateRangePicker = _react2['default'].createClass({ displayName: 'DateRangePicker', - mixins: [_utilsBemMixin2['default'], PureRenderMixin], + mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']], propTypes: { - bemBlock: _reactAddons2['default'].PropTypes.string, - bemNamespace: _reactAddons2['default'].PropTypes.string, - dateStates: _reactAddons2['default'].PropTypes.array, // an array of date ranges and their states - defaultState: _reactAddons2['default'].PropTypes.string, - disableNavigation: _reactAddons2['default'].PropTypes.bool, - firstOfWeek: _reactAddons2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]), - helpMessage: _reactAddons2['default'].PropTypes.string, - initialDate: _reactAddons2['default'].PropTypes.instanceOf(Date), - initialFromValue: _reactAddons2['default'].PropTypes.bool, - initialMonth: _reactAddons2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange - initialRange: _reactAddons2['default'].PropTypes.object, - initialYear: _reactAddons2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange - maximumDate: _reactAddons2['default'].PropTypes.instanceOf(Date), - minimumDate: _reactAddons2['default'].PropTypes.instanceOf(Date), - numberOfCalendars: _reactAddons2['default'].PropTypes.number, - onHighlightDate: _reactAddons2['default'].PropTypes.func, // triggered when a date is highlighted (hovered) - onHighlightRange: _reactAddons2['default'].PropTypes.func, // triggered when a range is highlighted (hovered) - onSelect: _reactAddons2['default'].PropTypes.func, // triggered when a date or range is selectec - onSelectStart: _reactAddons2['default'].PropTypes.func, // triggered when the first date in a range is selected - paginationArrowComponent: _reactAddons2['default'].PropTypes.func, - selectedLabel: _reactAddons2['default'].PropTypes.string, - selectionType: _reactAddons2['default'].PropTypes.oneOf(['single', 'range']), - singleDateRange: _reactAddons2['default'].PropTypes.bool, - showLegend: _reactAddons2['default'].PropTypes.bool, - stateDefinitions: _reactAddons2['default'].PropTypes.object, + bemBlock: _react2['default'].PropTypes.string, + bemNamespace: _react2['default'].PropTypes.string, + dateStates: _react2['default'].PropTypes.array, // an array of date ranges and their states + defaultState: _react2['default'].PropTypes.string, + disableNavigation: _react2['default'].PropTypes.bool, + firstOfWeek: _react2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]), + helpMessage: _react2['default'].PropTypes.string, + initialDate: _react2['default'].PropTypes.instanceOf(Date), + initialFromValue: _react2['default'].PropTypes.bool, + initialMonth: _react2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange + initialRange: _react2['default'].PropTypes.object, + initialYear: _react2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange + maximumDate: _react2['default'].PropTypes.instanceOf(Date), + minimumDate: _react2['default'].PropTypes.instanceOf(Date), + numberOfCalendars: _react2['default'].PropTypes.number, + onHighlightDate: _react2['default'].PropTypes.func, // triggered when a date is highlighted (hovered) + onHighlightRange: _react2['default'].PropTypes.func, // triggered when a range is highlighted (hovered) + onSelect: _react2['default'].PropTypes.func, // triggered when a date or range is selectec + onSelectStart: _react2['default'].PropTypes.func, // triggered when the first date in a range is selected + paginationArrowComponent: _react2['default'].PropTypes.func, + selectedLabel: _react2['default'].PropTypes.string, + selectionType: _react2['default'].PropTypes.oneOf(['single', 'range']), + singleDateRange: _react2['default'].PropTypes.bool, + showLegend: _react2['default'].PropTypes.bool, + stateDefinitions: _react2['default'].PropTypes.object, value: _utilsCustomPropTypes2['default'].momentOrMomentRange }, @@ -553,7 +554,7 @@ var DateRangePicker = _reactAddons2['default'].createClass({ dateComponent: _calendarCalendarDate2['default'] }; - return _reactAddons2['default'].createElement(_calendarCalendarMonth2['default'], props); + return _react2['default'].createElement(_calendarCalendarMonth2['default'], props); }, render: function render() { @@ -567,18 +568,18 @@ var DateRangePicker = _reactAddons2['default'].createClass({ var calendars = _immutable2['default'].Range(0, numberOfCalendars).map(this.renderCalendar); - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'div', { className: this.cx({ element: null }) }, - _reactAddons2['default'].createElement(PaginationArrowComponent, { direction: 'previous', onTrigger: this.moveBack, disabled: !this.canMoveBack() }), + _react2['default'].createElement(PaginationArrowComponent, { direction: 'previous', onTrigger: this.moveBack, disabled: !this.canMoveBack() }), calendars.toJS(), - _reactAddons2['default'].createElement(PaginationArrowComponent, { direction: 'next', onTrigger: this.moveForward, disabled: !this.canMoveForward() }), - helpMessage ? _reactAddons2['default'].createElement( + _react2['default'].createElement(PaginationArrowComponent, { direction: 'next', onTrigger: this.moveForward, disabled: !this.canMoveForward() }), + helpMessage ? _react2['default'].createElement( 'span', { className: this.cx({ element: 'HelpMessage' }) }, helpMessage ) : null, - showLegend ? _reactAddons2['default'].createElement(_Legend2['default'], { stateDefinitions: stateDefinitions, selectedLabel: selectedLabel }) : null + showLegend ? _react2['default'].createElement(_Legend2['default'], { stateDefinitions: stateDefinitions, selectedLabel: selectedLabel }) : null ); } }); diff --git a/dist/Legend.js b/dist/Legend.js index 5bcb3cd7..d7b76a63 100644 --- a/dist/Legend.js +++ b/dist/Legend.js @@ -6,24 +6,26 @@ Object.defineProperty(exports, '__esModule', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _utilsBemMixin = require('./utils/BemMixin'); var _utilsBemMixin2 = _interopRequireDefault(_utilsBemMixin); -var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin; +var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin'); -var Legend = _reactAddons2['default'].createClass({ +var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + +var Legend = _react2['default'].createClass({ displayName: 'Legend', - mixins: [_utilsBemMixin2['default'], PureRenderMixin], + mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']], propTypes: { - selectedLabel: _reactAddons2['default'].PropTypes.string.isRequired, - stateDefinitions: _reactAddons2['default'].PropTypes.object.isRequired + selectedLabel: _react2['default'].PropTypes.string.isRequired, + stateDefinitions: _react2['default'].PropTypes.object.isRequired }, render: function render() { @@ -42,11 +44,11 @@ var Legend = _reactAddons2['default'].createClass({ style = { backgroundColor: def.color }; - items.push(_reactAddons2['default'].createElement( + items.push(_react2['default'].createElement( 'li', { className: this.cx({ element: 'LegendItem' }), key: name }, - _reactAddons2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor' }), style: style }), - _reactAddons2['default'].createElement( + _react2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor' }), style: style }), + _react2['default'].createElement( 'span', { className: this.cx({ element: 'LegendItemLabel' }) }, def.label @@ -55,14 +57,14 @@ var Legend = _reactAddons2['default'].createClass({ } } - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'ul', { className: this.cx() }, - _reactAddons2['default'].createElement( + _react2['default'].createElement( 'li', { className: this.cx({ element: 'LegendItem' }) }, - _reactAddons2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor', modifiers: { 'selection': true } }) }), - _reactAddons2['default'].createElement( + _react2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor', modifiers: { 'selection': true } }) }), + _react2['default'].createElement( 'span', { className: this.cx({ element: 'LegendItemLabel' }) }, selectedLabel diff --git a/dist/PaginationArrow.js b/dist/PaginationArrow.js index e9e11f7e..1ba5655b 100644 --- a/dist/PaginationArrow.js +++ b/dist/PaginationArrow.js @@ -12,25 +12,27 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _utilsBemMixin = require('./utils/BemMixin'); var _utilsBemMixin2 = _interopRequireDefault(_utilsBemMixin); -var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin; +var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin'); -var PaginationArrow = _reactAddons2['default'].createClass({ +var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + +var PaginationArrow = _react2['default'].createClass({ displayName: 'PaginationArrow', - mixins: [_utilsBemMixin2['default'], PureRenderMixin], + mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']], propTypes: { - disabled: _reactAddons2['default'].PropTypes.bool, - onTrigger: _reactAddons2['default'].PropTypes.func, - direction: _reactAddons2['default'].PropTypes.oneOf(['next', 'previous']) + disabled: _react2['default'].PropTypes.bool, + onTrigger: _react2['default'].PropTypes.func, + direction: _react2['default'].PropTypes.oneOf(['next', 'previous']) }, getDefaultProps: function getDefaultProps() { @@ -61,10 +63,10 @@ var PaginationArrow = _reactAddons2['default'].createClass({ states: states }; - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'div', _extends({ className: this.cx(elementOpts) }, props, { onClick: onTrigger }), - _reactAddons2['default'].createElement('div', { className: this.cx(iconOpts) }) + _react2['default'].createElement('div', { className: this.cx(iconOpts) }) ); } }); diff --git a/dist/calendar/CalendarDate.js b/dist/calendar/CalendarDate.js index ac7f0fb1..b2ea024d 100644 --- a/dist/calendar/CalendarDate.js +++ b/dist/calendar/CalendarDate.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _immutable = require('immutable'); @@ -42,7 +42,7 @@ var _CalendarSelection = require('./CalendarSelection'); var _CalendarSelection2 = _interopRequireDefault(_CalendarSelection); -var CalendarDate = _reactAddons2['default'].createClass({ +var CalendarDate = _react2['default'].createClass({ displayName: 'CalendarDate', mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']], @@ -50,27 +50,27 @@ var CalendarDate = _reactAddons2['default'].createClass({ propTypes: { date: _utilsCustomPropTypes2['default'].moment, - firstOfMonth: _reactAddons2['default'].PropTypes.object.isRequired, + firstOfMonth: _react2['default'].PropTypes.object.isRequired, - isSelectedDate: _reactAddons2['default'].PropTypes.bool, - isSelectedRangeStart: _reactAddons2['default'].PropTypes.bool, - isSelectedRangeEnd: _reactAddons2['default'].PropTypes.bool, - isInSelectedRange: _reactAddons2['default'].PropTypes.bool, + isSelectedDate: _react2['default'].PropTypes.bool, + isSelectedRangeStart: _react2['default'].PropTypes.bool, + isSelectedRangeEnd: _react2['default'].PropTypes.bool, + isInSelectedRange: _react2['default'].PropTypes.bool, - isHighlightedDate: _reactAddons2['default'].PropTypes.bool, - isHighlightedRangeStart: _reactAddons2['default'].PropTypes.bool, - isHighlightedRangeEnd: _reactAddons2['default'].PropTypes.bool, - isInHighlightedRange: _reactAddons2['default'].PropTypes.bool, + isHighlightedDate: _react2['default'].PropTypes.bool, + isHighlightedRangeStart: _react2['default'].PropTypes.bool, + isHighlightedRangeEnd: _react2['default'].PropTypes.bool, + isInHighlightedRange: _react2['default'].PropTypes.bool, - highlightedDate: _reactAddons2['default'].PropTypes.object, - dateStates: _reactAddons2['default'].PropTypes.instanceOf(_immutable2['default'].List), - isDisabled: _reactAddons2['default'].PropTypes.bool, - isToday: _reactAddons2['default'].PropTypes.bool, + highlightedDate: _react2['default'].PropTypes.object, + dateStates: _react2['default'].PropTypes.instanceOf(_immutable2['default'].List), + isDisabled: _react2['default'].PropTypes.bool, + isToday: _react2['default'].PropTypes.bool, - dateRangesForDate: _reactAddons2['default'].PropTypes.func, - onHighlightDate: _reactAddons2['default'].PropTypes.func, - onUnHighlightDate: _reactAddons2['default'].PropTypes.func, - onSelectDate: _reactAddons2['default'].PropTypes.func + dateRangesForDate: _react2['default'].PropTypes.func, + onHighlightDate: _react2['default'].PropTypes.func, + onUnHighlightDate: _react2['default'].PropTypes.func, + onSelectDate: _react2['default'].PropTypes.func }, getInitialState: function getInitialState() { @@ -234,7 +234,7 @@ var CalendarDate = _reactAddons2['default'].createClass({ } } - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'td', { className: this.cx({ element: 'Date', modifiers: bemModifiers, states: bemStates }), style: cellStyle, @@ -242,20 +242,20 @@ var CalendarDate = _reactAddons2['default'].createClass({ onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave, onMouseDown: this.mouseDown }, - numStates > 1 && _reactAddons2['default'].createElement( + numStates > 1 && _react2['default'].createElement( 'div', { className: this.cx({ element: "HalfDateStates" }) }, - _reactAddons2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'am', color: amColor }), - _reactAddons2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'pm', color: pmColor }) + _react2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'am', color: amColor }), + _react2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'pm', color: pmColor }) ), - numStates === 1 && _reactAddons2['default'].createElement('div', { className: this.cx({ element: "FullDateStates" }), style: style }), - _reactAddons2['default'].createElement( + numStates === 1 && _react2['default'].createElement('div', { className: this.cx({ element: "FullDateStates" }), style: style }), + _react2['default'].createElement( 'span', { className: this.cx({ element: "DateLabel" }) }, date.format('D') ), - selectionModifier ? _reactAddons2['default'].createElement(_CalendarSelection2['default'], { modifier: selectionModifier, pending: pending }) : null, - highlightModifier ? _reactAddons2['default'].createElement(_CalendarHighlight2['default'], { modifier: highlightModifier }) : null + selectionModifier ? _react2['default'].createElement(_CalendarSelection2['default'], { modifier: selectionModifier, pending: pending }) : null, + highlightModifier ? _react2['default'].createElement(_CalendarHighlight2['default'], { modifier: highlightModifier }) : null ); } }); diff --git a/dist/calendar/CalendarDatePeriod.js b/dist/calendar/CalendarDatePeriod.js index dfa494f2..af995986 100644 --- a/dist/calendar/CalendarDatePeriod.js +++ b/dist/calendar/CalendarDatePeriod.js @@ -8,9 +8,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _utilsBemMixin = require('../utils/BemMixin'); @@ -20,14 +20,14 @@ var _utilsPureRenderMixin = require('../utils/PureRenderMixin'); var _utilsPureRenderMixin2 = _interopRequireDefault(_utilsPureRenderMixin); -var CalendarDatePeriod = _reactAddons2['default'].createClass({ +var CalendarDatePeriod = _react2['default'].createClass({ displayName: 'CalendarDatePeriod', mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']], propTypes: { - color: _reactAddons2['default'].PropTypes.string, - period: _reactAddons2['default'].PropTypes.string + color: _react2['default'].PropTypes.string, + period: _react2['default'].PropTypes.string }, render: function render() { @@ -42,7 +42,7 @@ var CalendarDatePeriod = _reactAddons2['default'].createClass({ style = { backgroundColor: color }; } - return _reactAddons2['default'].createElement('div', { style: style, className: this.cx({ modifiers: modifiers }) }); + return _react2['default'].createElement('div', { style: style, className: this.cx({ modifiers: modifiers }) }); } }); diff --git a/dist/calendar/CalendarHighlight.js b/dist/calendar/CalendarHighlight.js index b1b1399b..bbfee72d 100644 --- a/dist/calendar/CalendarHighlight.js +++ b/dist/calendar/CalendarHighlight.js @@ -8,9 +8,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _utilsBemMixin = require('../utils/BemMixin'); @@ -20,13 +20,13 @@ var _utilsPureRenderMixin = require('../utils/PureRenderMixin'); var _utilsPureRenderMixin2 = _interopRequireDefault(_utilsPureRenderMixin); -var CalendarHighlight = _reactAddons2['default'].createClass({ +var CalendarHighlight = _react2['default'].createClass({ displayName: 'CalendarHighlight', mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']], propTypes: { - modifier: _reactAddons2['default'].PropTypes.string + modifier: _react2['default'].PropTypes.string }, render: function render() { @@ -35,7 +35,7 @@ var CalendarHighlight = _reactAddons2['default'].createClass({ var modifiers = _defineProperty({}, modifier, true); var states = {}; - return _reactAddons2['default'].createElement('div', { className: this.cx({ states: states, modifiers: modifiers }) }); + return _react2['default'].createElement('div', { className: this.cx({ states: states, modifiers: modifiers }) }); } }); diff --git a/dist/calendar/CalendarMonth.js b/dist/calendar/CalendarMonth.js index 89bcd2e1..2657cd52 100644 --- a/dist/calendar/CalendarMonth.js +++ b/dist/calendar/CalendarMonth.js @@ -10,9 +10,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd 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; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _moment = require('moment'); @@ -49,22 +49,22 @@ var lang = (0, _moment2['default'])().localeData(); var WEEKDAYS = _immutable2['default'].List(lang._weekdays).zip(_immutable2['default'].List(lang._weekdaysShort)); var MONTHS = _immutable2['default'].List(lang._months); -var CalendarMonth = _reactAddons2['default'].createClass({ +var CalendarMonth = _react2['default'].createClass({ displayName: 'CalendarMonth', mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']], propTypes: { - dateComponent: _reactAddons2['default'].PropTypes.func, - disableNavigation: _reactAddons2['default'].PropTypes.bool, + dateComponent: _react2['default'].PropTypes.func, + disableNavigation: _react2['default'].PropTypes.bool, enabledRange: _utilsCustomPropTypes2['default'].momentRange, firstOfMonth: _utilsCustomPropTypes2['default'].moment, - firstOfWeek: _reactAddons2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]), - hideSelection: _reactAddons2['default'].PropTypes.bool, - highlightedDate: _reactAddons2['default'].PropTypes.object, - highlightedRange: _reactAddons2['default'].PropTypes.object, - onMonthChange: _reactAddons2['default'].PropTypes.func, - onYearChange: _reactAddons2['default'].PropTypes.func, + firstOfWeek: _react2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]), + hideSelection: _react2['default'].PropTypes.bool, + highlightedDate: _react2['default'].PropTypes.object, + highlightedRange: _react2['default'].PropTypes.object, + onMonthChange: _react2['default'].PropTypes.func, + onYearChange: _react2['default'].PropTypes.func, value: _utilsCustomPropTypes2['default'].momentOrMomentRange }, @@ -95,7 +95,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ isSelectedRangeEnd = value.end.isSame(d, 'day'); } - return _reactAddons2['default'].createElement(CalendarDate, _extends({ + return _react2['default'].createElement(CalendarDate, _extends({ key: i, isToday: d.isSame((0, _moment2['default'])(), 'day'), isDisabled: !enabledRange.contains(d), @@ -113,7 +113,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ renderWeek: function renderWeek(dates, i) { var days = dates.map(this.renderDay); - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'tr', { className: this.cx({ element: 'Week' }), key: i }, days.toJS() @@ -127,10 +127,10 @@ var CalendarMonth = _reactAddons2['default'].createClass({ var headers = indices.map((function (index) { var weekday = WEEKDAYS.get(index); - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'th', { className: this.cx({ element: 'WeekdayHeading' }), key: weekday, scope: 'col' }, - _reactAddons2['default'].createElement( + _react2['default'].createElement( 'abbr', { title: weekday[0] }, weekday[1] @@ -138,7 +138,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ ); }).bind(this)); - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'tr', { className: this.cx({ element: 'Weekdays' }) }, headers.toJS() @@ -160,7 +160,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ return null; } - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'option', { key: year, value: year }, year @@ -175,11 +175,11 @@ var CalendarMonth = _reactAddons2['default'].createClass({ var choices = years.map(this.renderYearChoice); var modifiers = { year: true }; - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'span', { className: this.cx({ element: 'MonthHeaderLabel', modifiers: modifiers }) }, firstOfMonth.format('YYYY'), - this.props.disableNavigation ? null : _reactAddons2['default'].createElement( + this.props.disableNavigation ? null : _react2['default'].createElement( 'select', { className: this.cx({ element: 'MonthHeaderSelect' }), value: y, onChange: this.handleYearChange }, choices.toJS() @@ -207,7 +207,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ disabled = true; } - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'option', { key: month, value: i, disabled: disabled ? 'disabled' : null }, month @@ -220,11 +220,11 @@ var CalendarMonth = _reactAddons2['default'].createClass({ var choices = MONTHS.map(this.renderMonthChoice); var modifiers = { month: true }; - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'span', { className: this.cx({ element: 'MonthHeaderLabel', modifiers: modifiers }) }, firstOfMonth.format('MMMM'), - this.props.disableNavigation ? null : _reactAddons2['default'].createElement( + this.props.disableNavigation ? null : _react2['default'].createElement( 'select', { className: this.cx({ element: 'MonthHeaderSelect' }), value: firstOfMonth.month(), onChange: this.handleMonthChange }, choices.toJS() @@ -233,7 +233,7 @@ var CalendarMonth = _reactAddons2['default'].createClass({ }, renderHeader: function renderHeader() { - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'div', { className: this.cx({ element: 'MonthHeader' }) }, this.renderHeaderMonth(), @@ -251,19 +251,19 @@ var CalendarMonth = _reactAddons2['default'].createClass({ var monthDates = _immutable2['default'].fromJS(cal.monthDates(firstOfMonth.year(), firstOfMonth.month())); var weeks = monthDates.map(this.renderWeek); - return _reactAddons2['default'].createElement( + return _react2['default'].createElement( 'div', { className: this.cx({ element: 'Month' }) }, this.renderHeader(), - _reactAddons2['default'].createElement( + _react2['default'].createElement( 'table', { className: this.cx({ element: 'MonthDates' }) }, - _reactAddons2['default'].createElement( + _react2['default'].createElement( 'thead', null, this.renderDayHeaders() ), - _reactAddons2['default'].createElement( + _react2['default'].createElement( 'tbody', null, weeks.toJS() diff --git a/dist/calendar/CalendarSelection.js b/dist/calendar/CalendarSelection.js index c48c08b5..979591e0 100644 --- a/dist/calendar/CalendarSelection.js +++ b/dist/calendar/CalendarSelection.js @@ -8,9 +8,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _reactAddons = require('react/addons'); +var _react = require('react'); -var _reactAddons2 = _interopRequireDefault(_reactAddons); +var _react2 = _interopRequireDefault(_react); var _utilsBemMixin = require('../utils/BemMixin'); @@ -20,14 +20,14 @@ var _utilsPureRenderMixin = require('../utils/PureRenderMixin'); var _utilsPureRenderMixin2 = _interopRequireDefault(_utilsPureRenderMixin); -var CalendarSelection = _reactAddons2['default'].createClass({ +var CalendarSelection = _react2['default'].createClass({ displayName: 'CalendarSelection', mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']], propTypes: { - modifier: _reactAddons2['default'].PropTypes.string, - pending: _reactAddons2['default'].PropTypes.bool.isRequired + modifier: _react2['default'].PropTypes.string, + pending: _react2['default'].PropTypes.bool.isRequired }, render: function render() { @@ -40,7 +40,7 @@ var CalendarSelection = _reactAddons2['default'].createClass({ pending: pending }; - return _reactAddons2['default'].createElement('div', { className: this.cx({ states: states, modifiers: modifiers }) }); + return _react2['default'].createElement('div', { className: this.cx({ states: states, modifiers: modifiers }) }); } });