Skip to content

Commit

Permalink
release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabriskie committed May 9, 2015
1 parent 1a51bf8 commit 48eed00
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 130 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v0.2.0 - Sat, 09 May 2015 05:16:40 GMT
--------------------------------------

- [f5fe537](../../commit/f5fe537) [added] Ability to specify style for the modal contents


v0.1.1 - Tue, 31 Mar 2015 15:56:47 GMT
--------------------------------------

Expand Down
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": "0.1.1",
"version": "0.2.0",
"homepage": "https://github.com/rackt/react-modal",
"authors": [
"Ryan Florence",
Expand Down
202 changes: 75 additions & 127 deletions dist/react-modal.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ReactModal=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null);
var ExecutionEnvironment = _dereq_('react/lib/ExecutionEnvironment');
var ModalPortal = React.createFactory(_dereq_('./ModalPortal'));
var ariaAppHider = _dereq_('../helpers/ariaAppHider');
var injectCSS = _dereq_('../helpers/injectCSS');

var SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {};

var Modal = module.exports = React.createClass({

displayName: 'Modal',
Expand All @@ -16,7 +19,7 @@ var Modal = module.exports = React.createClass({
propTypes: {
isOpen: React.PropTypes.bool.isRequired,
onRequestClose: React.PropTypes.func,
appElement: React.PropTypes.instanceOf(HTMLElement),
appElement: React.PropTypes.instanceOf(SafeHTMLElement),
closeTimeoutMS: React.PropTypes.number,
ariaHideApp: React.PropTypes.bool
},
Expand Down Expand Up @@ -65,12 +68,12 @@ function sanitizeProps(props) {
delete props.ref;
}

},{"../helpers/ariaAppHider":3,"../helpers/injectCSS":5,"./ModalPortal":2}],2:[function(_dereq_,module,exports){
},{"../helpers/ariaAppHider":3,"../helpers/injectCSS":5,"./ModalPortal":2,"react/lib/ExecutionEnvironment":10}],2:[function(_dereq_,module,exports){
var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null);
var div = React.DOM.div;
var focusManager = _dereq_('../helpers/focusManager');
var scopeTab = _dereq_('../helpers/scopeTab');
var cx = _dereq_('react/lib/cx');
var cx = _dereq_('classnames');

// so that our CSS is statically analyzable
var CLASS_NAMES = {
Expand Down Expand Up @@ -215,6 +218,7 @@ var ModalPortal = module.exports = React.createClass({
},
div({
ref: "content",
style: this.props.style,
className: cx(this.buildClassName('content'), this.props.className),
tabIndex: "-1",
onClick: stopPropagation,
Expand All @@ -227,7 +231,7 @@ var ModalPortal = module.exports = React.createClass({
}
});

},{"../helpers/focusManager":4,"../helpers/scopeTab":6,"react/lib/cx":9}],3:[function(_dereq_,module,exports){
},{"../helpers/focusManager":4,"../helpers/scopeTab":6,"classnames":9}],3:[function(_dereq_,module,exports){
var _element = null;

function setElement(element) {
Expand Down Expand Up @@ -280,6 +284,9 @@ function handleBlur(event) {
function handleFocus(event) {
if (needToFocus) {
needToFocus = false;
if (!modalElement) {
return;
}
// need to see how jQuery shims document.on('focusin') so we don't need the
// setTimeout, firefox doesn't support focusin, if it did, we could focus
// the the element outisde of a setTimeout. Side-effect of this
Expand Down Expand Up @@ -452,154 +459,95 @@ module.exports = _dereq_('./components/Modal');


},{"./components/Modal":1}],9:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule cx
*/

/**
* This function is used to mark string literals representing CSS class names
* so that they can be transformed statically. This allows for modularization
* and minification of CSS class names.
*
* In static_upstream, this function is actually implemented, but it should
* eventually be replaced with something more descriptive, and the transform
* that is used in the main stack should be ported for use elsewhere.
*
* @param string|object className to modularize, or an object of key/values.
* In the object case, the values are conditions that
* determine if the className keys should be included.
* @param [string ...] Variable list of classNames in the string case.
* @return string Renderable space-separated CSS className.
*/

'use strict';
var warning = _dereq_("./warning");

var warned = false;

function cx(classNames) {
if ("production" !== "production") {
("production" !== "production" ? warning(
warned,
'React.addons.classSet will be deprecated in a future version. See ' +
'http://fb.me/react-addons-classset'
) : null);
warned = true;
}

if (typeof classNames == 'object') {
return Object.keys(classNames).filter(function(className) {
return classNames[className];
}).join(' ');
} else {
return Array.prototype.join.call(arguments, ' ');
}
/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

function classNames() {
var classes = '';
var arg;

for (var i = 0; i < arguments.length; i++) {
arg = arguments[i];
if (!arg) {
continue;
}

if ('string' === typeof arg || 'number' === typeof arg) {
classes += ' ' + arg;
} else if (Object.prototype.toString.call(arg) === '[object Array]') {
classes += ' ' + classNames.apply(null, arg);
} else if ('object' === typeof arg) {
for (var key in arg) {
if (!arg.hasOwnProperty(key) || !arg[key]) {
continue;
}
classes += ' ' + key;
}
}
}
return classes.substr(1);
}

module.exports = cx;

},{"./warning":11}],10:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule emptyFunction
*/

function makeEmptyFunction(arg) {
return function() {
return arg;
};
// safely export classNames for node / browserify
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
}

/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
function emptyFunction() {}

emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function() { return this; };
emptyFunction.thatReturnsArgument = function(arg) { return arg; };

module.exports = emptyFunction;
// safely export classNames for RequireJS
if (typeof define !== 'undefined' && define.amd) {
define('classnames', [], function() {
return classNames;
});
}

},{}],11:[function(_dereq_,module,exports){
},{}],10:[function(_dereq_,module,exports){
/**
* Copyright 2014-2015, Facebook, Inc.
* Copyright 2013-2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule warning
* @providesModule ExecutionEnvironment
*/

/*jslint evil: true */

"use strict";

var emptyFunction = _dereq_("./emptyFunction");
var canUseDOM = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);

/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
* Simple, lightweight module assisting with the detection and context of
* Worker. Helps avoid circular dependencies and allows code to reason about
* whether or not they are in a Worker, even if they never include the main
* `ReactWorker` dependency.
*/
var ExecutionEnvironment = {

var warning = emptyFunction;
canUseDOM: canUseDOM,

if ("production" !== "production") {
warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);
if (format === undefined) {
throw new Error(
'`warning(condition, format, ...args)` requires a warning ' +
'message argument'
);
}
canUseWorkers: typeof Worker !== 'undefined',

if (format.length < 10 || /^[s\W]*$/.test(format)) {
throw new Error(
'The warning format should be able to uniquely identify this ' +
'warning. Please, use a more descriptive format than: ' + format
);
}
canUseEventListeners:
canUseDOM && !!(window.addEventListener || window.attachEvent),

if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
canUseViewport: canUseDOM && !!window.screen,

if (!condition) {
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];});
console.warn(message);
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch(x) {}
}
};
}
isInWorker: !canUseDOM // For now, this is true - might change in the future.

};

module.exports = warning;
module.exports = ExecutionEnvironment;

},{"./emptyFunction":10}]},{},[8])
},{}]},{},[8])
(8)
});
Loading

0 comments on commit 48eed00

Please sign in to comment.