Skip to content

Commit

Permalink
Release v2.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jun 16, 2017
1 parent 435ab91 commit af3d146
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 48 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-modal",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/reactjs/react-modal",
"authors": [
"Ryan Florence",
Expand Down
145 changes: 100 additions & 45 deletions dist/react-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,25 @@ return /******/ (function(modules) { // webpackBootstrap
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

'use strict';

module.exports = __webpack_require__(1);
Object.defineProperty(exports, "__esModule", {
value: true
});

var _Modal = __webpack_require__(1);

var _Modal2 = _interopRequireDefault(_Modal);

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

/***/ },
exports.default = _Modal2.default;

/***/ }),
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

'use strict';

Expand Down Expand Up @@ -312,21 +322,21 @@ return /******/ (function(modules) { // webpackBootstrap
};
exports.default = Modal;

/***/ },
/***/ }),
/* 2 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_2__;

/***/ },
/***/ }),
/* 3 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_3__;

/***/ },
/***/ }),
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright 2013-present, Facebook, Inc.
Expand Down Expand Up @@ -360,9 +370,9 @@ return /******/ (function(modules) { // webpackBootstrap
}


/***/ },
/***/ }),
/* 5 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright 2013-present, Facebook, Inc.
Expand Down Expand Up @@ -514,6 +524,7 @@ return /******/ (function(modules) { // webpackBootstrap
function createChainableTypeChecker(validate) {
if ((undefined) !== 'production') {
var manualPropTypeCallCache = {};
var manualPropTypeWarningCount = 0;
}
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS;
Expand All @@ -531,7 +542,11 @@ return /******/ (function(modules) { // webpackBootstrap
} else if ((undefined) !== 'production' && typeof console !== 'undefined') {
// Old behavior for people using React.PropTypes
var cacheKey = componentName + ':' + propName;
if (!manualPropTypeCallCache[cacheKey]) {
if (
!manualPropTypeCallCache[cacheKey] &&
// Avoid spamming the console because they are often not actionable except for lib authors
manualPropTypeWarningCount < 3
) {
warning(
false,
'You are manually calling a React.PropTypes validation ' +
Expand All @@ -543,6 +558,7 @@ return /******/ (function(modules) { // webpackBootstrap
componentName
);
manualPropTypeCallCache[cacheKey] = true;
manualPropTypeWarningCount++;
}
}
}
Expand Down Expand Up @@ -680,6 +696,20 @@ return /******/ (function(modules) { // webpackBootstrap
return emptyFunction.thatReturnsNull;
}

for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (typeof checker !== 'function') {
warning(
false,
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
'received %s at index %s.',
getPostfixForTypeWarning(checker),
i
);
return emptyFunction.thatReturnsNull;
}
}

function validate(props, propName, componentName, location, propFullName) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
Expand Down Expand Up @@ -812,6 +842,9 @@ return /******/ (function(modules) { // webpackBootstrap
// This handles more types than `getPropType`. Only used for error messages.
// See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) {
if (typeof propValue === 'undefined' || propValue === null) {
return '' + propValue;
}
var propType = getPropType(propValue);
if (propType === 'object') {
if (propValue instanceof Date) {
Expand All @@ -823,6 +856,23 @@ return /******/ (function(modules) { // webpackBootstrap
return propType;
}

// Returns a string that is postfixed to a warning about an invalid type.
// For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) {
var type = getPreciseType(value);
switch (type) {
case 'array':
case 'object':
return 'an ' + type;
case 'boolean':
case 'date':
case 'regexp':
return 'a ' + type;
default:
return type;
}
}

// Returns class name of the object, if any.
function getClassName(propValue) {
if (!propValue.constructor || !propValue.constructor.name) {
Expand All @@ -838,9 +888,9 @@ return /******/ (function(modules) { // webpackBootstrap
};


/***/ },
/***/ }),
/* 6 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

"use strict";

Expand Down Expand Up @@ -881,9 +931,9 @@ return /******/ (function(modules) { // webpackBootstrap

module.exports = emptyFunction;

/***/ },
/***/ }),
/* 7 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright (c) 2013-present, Facebook, Inc.
Expand Down Expand Up @@ -941,9 +991,9 @@ return /******/ (function(modules) { // webpackBootstrap

module.exports = invariant;

/***/ },
/***/ }),
/* 8 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright 2014-2015, Facebook, Inc.
Expand Down Expand Up @@ -1012,9 +1062,9 @@ return /******/ (function(modules) { // webpackBootstrap

module.exports = warning;

/***/ },
/***/ }),
/* 9 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

/**
* Copyright 2013-present, Facebook, Inc.
Expand All @@ -1032,9 +1082,9 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = ReactPropTypesSecret;


/***/ },
/***/ }),
/* 10 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright 2013-present, Facebook, Inc.
Expand Down Expand Up @@ -1099,9 +1149,9 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = checkPropTypes;


/***/ },
/***/ }),
/* 11 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

/**
* Copyright 2013-present, Facebook, Inc.
Expand All @@ -1116,11 +1166,14 @@ return /******/ (function(modules) { // webpackBootstrap

var emptyFunction = __webpack_require__(6);
var invariant = __webpack_require__(7);
var ReactPropTypesSecret = __webpack_require__(9);

module.exports = function() {
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
function shim() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
Expand All @@ -1132,6 +1185,8 @@ return /******/ (function(modules) { // webpackBootstrap
function getShim() {
return shim;
};
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bool: shim,
Expand Down Expand Up @@ -1159,9 +1214,9 @@ return /******/ (function(modules) { // webpackBootstrap
};


/***/ },
/***/ }),
/* 12 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2015 Jed Watson.
Expand Down Expand Up @@ -1204,9 +1259,9 @@ return /******/ (function(modules) { // webpackBootstrap
}());


/***/ },
/***/ }),
/* 13 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

module.exports = function(opts) {
return new ElementClass(opts)
Expand Down Expand Up @@ -1269,9 +1324,9 @@ return /******/ (function(modules) { // webpackBootstrap
}


/***/ },
/***/ }),
/* 14 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

'use strict';

Expand Down Expand Up @@ -1558,9 +1613,9 @@ return /******/ (function(modules) { // webpackBootstrap
};
exports.default = ModalPortal;

/***/ },
/***/ }),
/* 15 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

'use strict';

Expand Down Expand Up @@ -1650,9 +1705,9 @@ return /******/ (function(modules) { // webpackBootstrap
}
}

/***/ },
/***/ }),
/* 16 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

'use strict';

Expand Down Expand Up @@ -1705,9 +1760,9 @@ return /******/ (function(modules) { // webpackBootstrap
return [].slice.call(element.querySelectorAll('*'), 0).filter(tabbable);
}

/***/ },
/***/ }),
/* 17 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {

'use strict';

Expand Down Expand Up @@ -1738,9 +1793,9 @@ return /******/ (function(modules) { // webpackBootstrap
target.focus();
}

/***/ },
/***/ }),
/* 18 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

'use strict';

Expand Down Expand Up @@ -1790,9 +1845,9 @@ return /******/ (function(modules) { // webpackBootstrap
globalElement = document.body;
}

/***/ },
/***/ }),
/* 19 */
/***/ function(module, exports) {
/***/ (function(module, exports) {

"use strict";

Expand Down Expand Up @@ -1822,7 +1877,7 @@ return /******/ (function(modules) { // webpackBootstrap
return modals.length;
}

/***/ }
/***/ })
/******/ ])
});
;
Loading

0 comments on commit af3d146

Please sign in to comment.