New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-day-picker-substyled

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-day-picker-substyled - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

126

lib/DayPicker.js

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -11,21 +11,25 @@ Object.defineProperty(exports, "__esModule", {

var _react = require("react");
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _substyle2 = require("substyle");
var _radium = require('radium');
var _Helpers = require("./Helpers");
var _radium2 = _interopRequireDefault(_radium);
var _substyle2 = require('substyle');
var _Helpers = require('./Helpers');
var Helpers = _interopRequireWildcard(_Helpers);
var _DateUtils = require("./DateUtils");
var _DateUtils = require('./DateUtils');
var DateUtils = _interopRequireWildcard(_DateUtils);
var _LocaleUtils = require("./LocaleUtils");
var _LocaleUtils = require('./LocaleUtils');
var LocaleUtils = _interopRequireWildcard(_LocaleUtils);
var _defaultStyle = require("./defaultStyle");
var _defaultStyle = require('./defaultStyle');

@@ -57,3 +61,3 @@ var _defaultStyle2 = _interopRequireDefault(_defaultStyle);

var Caption = function Caption(_ref) {
var Caption = (0, _radium2.default)(function (_ref) {
var date = _ref.date;

@@ -64,10 +68,10 @@ var locale = _ref.locale;

var rest = _objectWithoutProperties(_ref, ["date", "locale", "localeUtils", "children"]);
var rest = _objectWithoutProperties(_ref, ['date', 'locale', 'localeUtils', 'children']);
return _react2.default.createElement(
"div",
'div',
_extends({}, rest, substyle(rest)),
children ? _react2.default.cloneElement(children, { date: date, locale: locale, localeUtils: localeUtils }) : localeUtils.formatMonthTitle(date, locale)
);
};
});

@@ -84,3 +88,3 @@ var Day = function (_Component) {

_createClass(Day, [{
key: "render",
key: 'render',
value: function render() {

@@ -101,5 +105,5 @@ var _props = this.props;

var rest = _objectWithoutProperties(_props, ["day", "month", "children", "enableOutsideDays", "modifiers", "onKeyDown", "onMouseEnter", "onMouseLeave", "onTouchTap", "onClick", "onFocus", "onBlur"]);
var rest = _objectWithoutProperties(_props, ['day', 'month', 'children', 'enableOutsideDays', 'modifiers', 'onKeyDown', 'onMouseEnter', 'onMouseLeave', 'onTouchTap', 'onClick', 'onFocus', 'onBlur']);
var key = "" + day.getFullYear() + day.getMonth() + day.getDate();
var key = '' + day.getFullYear() + day.getMonth() + day.getDate();

@@ -126,3 +130,3 @@ var isToday = DateUtils.isSameDay(day, new Date());

if (isOutside && !enableOutsideDays) {
return _react2.default.createElement("div", _extends({ key: "outside-" + key }, substyleProps));
return _react2.default.createElement('div', _extends({ key: 'outside-' + key }, substyleProps));
}

@@ -150,8 +154,8 @@

return _react2.default.createElement(
"div",
'div',
_extends({ key: key,
ref: "el"
ref: 'el'
}, substyleProps, {
tabIndex: tabIndex,
role: "gridcell"
role: 'gridcell'
}, handlers),

@@ -162,3 +166,3 @@ children

}, {
key: "focus",
key: 'focus',
value: function focus() {

@@ -172,2 +176,4 @@ this.refs.el.focus();

Day = (0, _radium2.default)(Day);
var emptyFunc = function emptyFunc() {};

@@ -191,3 +197,3 @@

_createClass(DayPicker, [{
key: "componentWillReceiveProps",
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {

@@ -201,3 +207,3 @@ if (this.props.initialMonth !== nextProps.initialMonth) {

}, {
key: "allowPreviousMonth",
key: 'allowPreviousMonth',
value: function allowPreviousMonth() {

@@ -214,3 +220,3 @@ var fromMonth = this.props.fromMonth;

}, {
key: "allowNextMonth",
key: 'allowNextMonth',
value: function allowNextMonth() {

@@ -229,3 +235,3 @@ var _props2 = this.props;

}, {
key: "allowMonth",
key: 'allowMonth',
value: function allowMonth(d) {

@@ -242,3 +248,3 @@ var _props3 = this.props;

}, {
key: "showMonth",
key: 'showMonth',
value: function showMonth(d) {

@@ -253,3 +259,3 @@ if (!this.allowMonth(d)) {

}, {
key: "showNextMonth",
key: 'showNextMonth',
value: function showNextMonth(callback) {

@@ -276,3 +282,3 @@ var _this3 = this;

}, {
key: "showPreviousMonth",
key: 'showPreviousMonth',
value: function showPreviousMonth(callback) {

@@ -299,3 +305,3 @@ var _this4 = this;

}, {
key: "focusPreviousDay",
key: 'focusPreviousDay',
value: function focusPreviousDay() {

@@ -325,3 +331,3 @@ var _this5 = this;

}, {
key: "focusNextDay",
key: 'focusNextDay',
value: function focusNextDay() {

@@ -354,3 +360,3 @@ var _this6 = this;

}, {
key: "handleKeyDown",
key: 'handleKeyDown',
value: function handleKeyDown(e) {

@@ -380,3 +386,3 @@ var _this7 = this;

}, {
key: "handleDayKeyDown",
key: 'handleDayKeyDown',
value: function handleDayKeyDown(e, day, modifiers) {

@@ -408,3 +414,3 @@ switch (e.keyCode) {

}, {
key: "handleNextMonthClick",
key: 'handleNextMonthClick',
value: function handleNextMonthClick() {

@@ -414,3 +420,3 @@ this.showNextMonth();

}, {
key: "handlePrevMonthClick",
key: 'handlePrevMonthClick',
value: function handlePrevMonthClick() {

@@ -420,3 +426,3 @@ this.showPreviousMonth();

}, {
key: "handleDayTouchTap",
key: 'handleDayTouchTap',
value: function handleDayTouchTap(e, day, modifiers) {

@@ -429,3 +435,3 @@ if (modifiers.indexOf("outside") > -1) {

}, {
key: "handleDayClick",
key: 'handleDayClick',
value: function handleDayClick(e, day, modifiers) {

@@ -439,3 +445,3 @@ if (modifiers.indexOf("outside") > -1) {

}, {
key: "handleOutsideDayPress",
key: 'handleOutsideDayPress',
value: function handleOutsideDayPress(day) {

@@ -453,3 +459,3 @@ var currentMonth = this.state.currentMonth;

}, {
key: "handleDayFocus",
key: 'handleDayFocus',
value: function handleDayFocus(e, day, modifiers) {

@@ -461,3 +467,3 @@ this.setState({

}, {
key: "handleDayBlur",
key: 'handleDayBlur',
value: function handleDayBlur(e, day, modifiers) {

@@ -469,3 +475,3 @@ this.setState({

}, {
key: "renderNavBar",
key: 'renderNavBar',
value: function renderNavBar() {

@@ -481,11 +487,11 @@ var isRTL = this.props.dir === "rtl";

return _react2.default.createElement(
"div",
'div',
substyle({ className: className, style: style }, 'nav-bar'),
leftButton && _react2.default.createElement("span", _extends({
key: "left"
leftButton && _react2.default.createElement('span', _extends({
key: 'left'
}, substyle({ className: className, style: style }, ['nav-button', 'nav-button-prev']), {
onClick: isRTL ? this.handleNextMonthClick.bind(this) : this.handlePrevMonthClick.bind(this)
})),
rightButton && _react2.default.createElement("span", _extends({
key: "right"
rightButton && _react2.default.createElement('span', _extends({
key: 'right'
}, substyle({ className: className, style: style }, ['nav-button', 'nav-button-next']), {

@@ -497,3 +503,3 @@ onClick: isRTL ? this.handlePrevMonthClick.bind(this) : this.handleNextMonthClick.bind(this)

}, {
key: "renderMonth",
key: 'renderMonth',
value: function renderMonth(date, i) {

@@ -511,3 +517,3 @@ var _props5 = this.props;

return _react2.default.createElement(
"div",
'div',
_extends({}, substyle({ className: className, style: style }, 'month'), {

@@ -524,6 +530,6 @@ key: i }),

_react2.default.createElement(
"div",
'div',
substyle({ className: className, style: style }, 'weekdays'),
_react2.default.createElement(
"div",
'div',
substyle({ className: className, style: style }, 'weekdays-row'),

@@ -534,3 +540,3 @@ this.renderWeekDays()

_react2.default.createElement(
"div",
'div',
substyle({ className: className, style: style }, 'body'),

@@ -542,3 +548,3 @@ this.renderWeeksInMonth(date)

}, {
key: "renderWeekDays",
key: 'renderWeekDays',
value: function renderWeekDays() {

@@ -554,6 +560,6 @@ var _props7 = this.props;

days.push(_react2.default.createElement(
"div",
'div',
_extends({ key: i }, substyle({ className: className, style: style }, 'weekday')),
_react2.default.createElement(
"abbr",
'abbr',
{ title: localeUtils.formatWeekdayLong(i, locale) },

@@ -567,3 +573,3 @@ localeUtils.formatWeekdayShort(i, locale)

}, {
key: "renderWeeksInMonth",
key: 'renderWeeksInMonth',
value: function renderWeeksInMonth(month) {

@@ -581,4 +587,4 @@ var _this8 = this;

return _react2.default.createElement(
"div",
_extends({ key: i }, substyle({ className: className, style: style }, 'week'), { role: "row" }),
'div',
_extends({ key: i }, substyle({ className: className, style: style }, 'week'), { role: 'row' }),
week.map(function (day) {

@@ -591,3 +597,3 @@ return _this8.renderDay(month, day);

}, {
key: "renderDay",
key: 'renderDay',
value: function renderDay(month, day) {

@@ -640,3 +646,3 @@ var _props9 = this.props;

}, {
key: "render",
key: 'render',
value: function render() {

@@ -653,3 +659,3 @@ var _substyle,

var attributes = _objectWithoutProperties(_props10, ["numberOfMonths", "locale", "canChangeMonth", "className", "style"]);
var attributes = _objectWithoutProperties(_props10, ['numberOfMonths', 'locale', 'canChangeMonth', 'className', 'style']);

@@ -669,5 +675,5 @@ var currentMonth = this.state.currentMonth;

return _react2.default.createElement(
"div",
'div',
_extends({
role: "widget",
role: 'widget',
tabIndex: canChangeMonth && attributes.tabIndex,

@@ -738,3 +744,3 @@ onKeyDown: function onKeyDown(e) {

};
exports.default = DayPicker;
exports.default = (0, _radium2.default)(DayPicker);
//# sourceMappingURL=DayPicker.js.map
{
"name": "react-day-picker-substyled",
"version": "2.1.1",
"version": "2.1.2",
"description": "Flexible date picker component for React",

@@ -28,3 +28,3 @@ "main": "DayPicker.js",

"type": "git",
"url": "https://github.com/jfschwarz/react-day-picker-substyled.git"
"url": "https://github.com/effektif/react-day-picker-substyled.git"
},

@@ -49,5 +49,5 @@ "keywords": [

"bugs": {
"url": "https://github.com/jschwarz/react-day-picker-substyled/issues"
"url": "https://github.com/effektif/react-day-picker-substyled/issues"
},
"homepage": "https://github.com/jschwarz/react-day-picker-substyled",
"homepage": "https://github.com/effektif/react-day-picker-substyled",
"peerDependencies": {

@@ -85,4 +85,5 @@ "react": "~0.13.x || ~0.14.x"

"dependencies": {
"radium": "^0.16.6",
"substyle": "^2.0.1"
}
}

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