From 9e129b626f9d97ea6e5970b7bf02c700375b1851 Mon Sep 17 00:00:00 2001 From: Julian Steinwachs Date: Sat, 23 Jan 2016 11:30:48 +0100 Subject: [PATCH] Featured --- .gitignore | 1 + build/app-bundle.js | 60842 ++++++++++------ build/twister-lib.js | 21270 +++--- jsx/App.js | 3 + jsx/common/ContentEditable.js | 345 + jsx/common/TwistComposer.js | 45 + jsx/home/NewPostModalButton.js | 3 + jsx/other/Featured.js | 43 + node_modules/classnames/.editorconfig | 14 - node_modules/classnames/.npmignore | 26 - node_modules/classnames/LICENSE | 22 - node_modules/classnames/README.md | 58 - node_modules/classnames/bower.json | 33 - node_modules/classnames/index.js | 30 - node_modules/classnames/package.json | 55 - node_modules/classnames/tests.js | 60 - node_modules/react-bootstrap/.ackrc | 7 - node_modules/react-bootstrap/.editorconfig | 18 - node_modules/react-bootstrap/.eslintrc | 33 - node_modules/react-bootstrap/.npmignore | 11 - node_modules/react-bootstrap/CHANGELOG.md | 106 - node_modules/react-bootstrap/CONTRIBUTING.md | 63 - node_modules/react-bootstrap/LICENSE | 21 - node_modules/react-bootstrap/README.md | 79 - node_modules/react-bootstrap/amd/LICENSE | 21 - node_modules/react-bootstrap/amd/README.md | 11 - node_modules/react-bootstrap/amd/bower.json | 22 - .../react-bootstrap/amd/lib/Accordion.js | 25 - node_modules/react-bootstrap/amd/lib/Affix.js | 39 - .../react-bootstrap/amd/lib/AffixMixin.js | 137 - node_modules/react-bootstrap/amd/lib/Alert.js | 69 - node_modules/react-bootstrap/amd/lib/Badge.js | 40 - .../react-bootstrap/amd/lib/BootstrapMixin.js | 46 - .../react-bootstrap/amd/lib/Button.js | 96 - .../react-bootstrap/amd/lib/ButtonGroup.js | 46 - .../react-bootstrap/amd/lib/ButtonToolbar.js | 39 - .../react-bootstrap/amd/lib/Carousel.js | 284 - .../react-bootstrap/amd/lib/CarouselItem.js | 103 - node_modules/react-bootstrap/amd/lib/Col.js | 84 - .../amd/lib/CollapsableMixin.js | 172 - .../react-bootstrap/amd/lib/CollapsableNav.js | 120 - .../react-bootstrap/amd/lib/DropdownButton.js | 133 - .../react-bootstrap/amd/lib/DropdownMenu.js | 53 - .../amd/lib/DropdownStateMixin.js | 89 - .../react-bootstrap/amd/lib/FadeMixin.js | 80 - .../react-bootstrap/amd/lib/FormGroup.js | 62 - .../react-bootstrap/amd/lib/Glyphicon.js | 45 - node_modules/react-bootstrap/amd/lib/Grid.js | 40 - node_modules/react-bootstrap/amd/lib/Input.js | 244 - .../react-bootstrap/amd/lib/Interpolate.js | 88 - .../react-bootstrap/amd/lib/Jumbotron.js | 25 - node_modules/react-bootstrap/amd/lib/Label.js | 38 - .../react-bootstrap/amd/lib/ListGroup.js | 55 - .../react-bootstrap/amd/lib/ListGroupItem.js | 95 - .../react-bootstrap/amd/lib/MenuItem.js | 69 - node_modules/react-bootstrap/amd/lib/Modal.js | 186 - .../react-bootstrap/amd/lib/ModalTrigger.js | 66 - node_modules/react-bootstrap/amd/lib/Nav.js | 125 - .../react-bootstrap/amd/lib/NavItem.js | 87 - .../react-bootstrap/amd/lib/Navbar.js | 158 - .../react-bootstrap/amd/lib/OverlayMixin.js | 75 - .../react-bootstrap/amd/lib/OverlayTrigger.js | 231 - .../react-bootstrap/amd/lib/PageHeader.js | 29 - .../react-bootstrap/amd/lib/PageItem.js | 68 - node_modules/react-bootstrap/amd/lib/Pager.js | 43 - node_modules/react-bootstrap/amd/lib/Panel.js | 221 - .../react-bootstrap/amd/lib/PanelGroup.js | 100 - .../react-bootstrap/amd/lib/Popover.js | 84 - .../react-bootstrap/amd/lib/ProgressBar.js | 138 - node_modules/react-bootstrap/amd/lib/Row.js | 37 - .../react-bootstrap/amd/lib/SplitButton.js | 134 - .../react-bootstrap/amd/lib/SubNav.js | 151 - .../react-bootstrap/amd/lib/TabPane.js | 96 - .../react-bootstrap/amd/lib/TabbedArea.js | 150 - node_modules/react-bootstrap/amd/lib/Table.js | 46 - .../react-bootstrap/amd/lib/Tooltip.js | 73 - node_modules/react-bootstrap/amd/lib/Well.js | 37 - .../react-bootstrap/amd/lib/constants.js | 45 - node_modules/react-bootstrap/amd/lib/index.js | 158 - .../amd/lib/utils/CustomPropTypes.js | 57 - .../amd/lib/utils/EventListener.js | 58 - .../amd/lib/utils/Object.assign.js | 51 - .../amd/lib/utils/TransitionEvents.js | 113 - .../amd/lib/utils/ValidComponentChildren.js | 98 - .../amd/lib/utils/createChainedFunction.js | 35 - .../react-bootstrap/amd/lib/utils/domUtils.js | 126 - .../react-bootstrap/amd/react-bootstrap.js | 5962 -- .../amd/react-bootstrap.min.js | 4 - node_modules/react-bootstrap/appveyor.yml.tmp | 28 - .../react-bootstrap/dist/react-bootstrap.js | 5962 -- .../dist/react-bootstrap.min.js | 4 - node_modules/react-bootstrap/ie8/.eslintrc | 5 - node_modules/react-bootstrap/ie8/README.md | 13 - .../react-bootstrap/ie8/assets/carousel.png | Bin 3699 -> 0 bytes node_modules/react-bootstrap/ie8/index.html | 28 - node_modules/react-bootstrap/ie8/package.json | 14 - node_modules/react-bootstrap/ie8/server.js | 41 - node_modules/react-bootstrap/ie8/src.js | 209 - node_modules/react-bootstrap/lib/Accordion.js | 23 - node_modules/react-bootstrap/lib/Affix.js | 37 - .../react-bootstrap/lib/AffixMixin.js | 135 - node_modules/react-bootstrap/lib/Alert.js | 67 - node_modules/react-bootstrap/lib/Badge.js | 38 - .../react-bootstrap/lib/BootstrapMixin.js | 44 - node_modules/react-bootstrap/lib/Button.js | 94 - .../react-bootstrap/lib/ButtonGroup.js | 44 - .../react-bootstrap/lib/ButtonToolbar.js | 37 - node_modules/react-bootstrap/lib/Carousel.js | 284 - .../react-bootstrap/lib/CarouselItem.js | 101 - node_modules/react-bootstrap/lib/Col.js | 82 - .../react-bootstrap/lib/CollapsableMixin.js | 170 - .../react-bootstrap/lib/CollapsableNav.js | 120 - .../react-bootstrap/lib/DropdownButton.js | 133 - .../react-bootstrap/lib/DropdownMenu.js | 53 - .../react-bootstrap/lib/DropdownStateMixin.js | 87 - node_modules/react-bootstrap/lib/FadeMixin.js | 78 - node_modules/react-bootstrap/lib/FormGroup.js | 60 - node_modules/react-bootstrap/lib/Glyphicon.js | 43 - node_modules/react-bootstrap/lib/Grid.js | 38 - node_modules/react-bootstrap/lib/Input.js | 242 - .../react-bootstrap/lib/Interpolate.js | 86 - node_modules/react-bootstrap/lib/Jumbotron.js | 23 - node_modules/react-bootstrap/lib/Label.js | 36 - node_modules/react-bootstrap/lib/ListGroup.js | 55 - .../react-bootstrap/lib/ListGroupItem.js | 95 - node_modules/react-bootstrap/lib/MenuItem.js | 67 - node_modules/react-bootstrap/lib/Modal.js | 184 - .../react-bootstrap/lib/ModalTrigger.js | 66 - node_modules/react-bootstrap/lib/Nav.js | 125 - node_modules/react-bootstrap/lib/NavItem.js | 85 - node_modules/react-bootstrap/lib/Navbar.js | 158 - .../react-bootstrap/lib/OverlayMixin.js | 73 - .../react-bootstrap/lib/OverlayTrigger.js | 231 - .../react-bootstrap/lib/PageHeader.js | 27 - node_modules/react-bootstrap/lib/PageItem.js | 66 - node_modules/react-bootstrap/lib/Pager.js | 43 - node_modules/react-bootstrap/lib/Panel.js | 221 - .../react-bootstrap/lib/PanelGroup.js | 100 - node_modules/react-bootstrap/lib/Popover.js | 82 - .../react-bootstrap/lib/ProgressBar.js | 138 - node_modules/react-bootstrap/lib/Row.js | 35 - .../react-bootstrap/lib/SplitButton.js | 132 - node_modules/react-bootstrap/lib/SubNav.js | 151 - node_modules/react-bootstrap/lib/TabPane.js | 94 - .../react-bootstrap/lib/TabbedArea.js | 150 - node_modules/react-bootstrap/lib/Table.js | 44 - node_modules/react-bootstrap/lib/Tooltip.js | 71 - node_modules/react-bootstrap/lib/Well.js | 35 - node_modules/react-bootstrap/lib/constants.js | 43 - node_modules/react-bootstrap/lib/index.js | 156 - .../lib/utils/CustomPropTypes.js | 55 - .../lib/utils/EventListener.js | 56 - .../lib/utils/Object.assign.js | 49 - .../lib/utils/TransitionEvents.js | 111 - .../lib/utils/ValidComponentChildren.js | 96 - .../lib/utils/createChainedFunction.js | 33 - .../react-bootstrap/lib/utils/domUtils.js | 124 - .../node_modules/classnames/.editorconfig | 14 - .../node_modules/classnames/.npmignore | 26 - .../node_modules/classnames/LICENSE | 22 - .../node_modules/classnames/README.md | 58 - .../node_modules/classnames/bower.json | 33 - .../node_modules/classnames/index.js | 30 - .../node_modules/classnames/package.json | 54 - .../node_modules/classnames/tests.js | 60 - node_modules/react-bootstrap/package.json | 118 - .../react-bootstrap/register-babel.js | 4 - node_modules/react-bootstrap/run-babel | 9 - node_modules/react-bootstrap/src/Accordion.js | 14 - node_modules/react-bootstrap/src/Affix.js | 26 - .../react-bootstrap/src/AffixMixin.js | 127 - node_modules/react-bootstrap/src/Alert.js | 57 - node_modules/react-bootstrap/src/Badge.js | 32 - .../react-bootstrap/src/BootstrapMixin.js | 39 - node_modules/react-bootstrap/src/Button.js | 89 - .../react-bootstrap/src/ButtonGroup.js | 35 - .../react-bootstrap/src/ButtonToolbar.js | 28 - node_modules/react-bootstrap/src/Carousel.js | 288 - .../react-bootstrap/src/CarouselItem.js | 95 - node_modules/react-bootstrap/src/Col.js | 72 - .../react-bootstrap/src/CollapsableMixin.js | 168 - .../react-bootstrap/src/CollapsableNav.js | 111 - .../react-bootstrap/src/DropdownButton.js | 119 - .../react-bootstrap/src/DropdownMenu.js | 43 - .../react-bootstrap/src/DropdownStateMixin.js | 83 - node_modules/react-bootstrap/src/FadeMixin.js | 72 - node_modules/react-bootstrap/src/FormGroup.js | 33 - node_modules/react-bootstrap/src/Glyphicon.js | 32 - node_modules/react-bootstrap/src/Grid.js | 30 - node_modules/react-bootstrap/src/Input.js | 252 - .../react-bootstrap/src/Interpolate.js | 82 - node_modules/react-bootstrap/src/Jumbotron.js | 14 - node_modules/react-bootstrap/src/Label.js | 26 - node_modules/react-bootstrap/src/ListGroup.js | 24 - .../react-bootstrap/src/ListGroupItem.js | 83 - node_modules/react-bootstrap/src/MenuItem.js | 58 - node_modules/react-bootstrap/src/Modal.js | 171 - .../react-bootstrap/src/ModalTrigger.js | 61 - node_modules/react-bootstrap/src/Nav.js | 112 - node_modules/react-bootstrap/src/NavItem.js | 69 - .../react-bootstrap/src/NavItem.js.orig | 73 - node_modules/react-bootstrap/src/Navbar.js | 142 - .../react-bootstrap/src/OverlayMixin.js | 69 - .../react-bootstrap/src/OverlayTrigger.js | 231 - .../react-bootstrap/src/PageHeader.js | 14 - node_modules/react-bootstrap/src/PageItem.js | 57 - node_modules/react-bootstrap/src/Pager.js | 34 - node_modules/react-bootstrap/src/Panel.js | 208 - .../react-bootstrap/src/PanelGroup.js | 89 - node_modules/react-bootstrap/src/Popover.js | 59 - .../react-bootstrap/src/ProgressBar.js | 129 - node_modules/react-bootstrap/src/Row.js | 26 - .../react-bootstrap/src/SplitButton.js | 109 - node_modules/react-bootstrap/src/SubNav.js | 129 - node_modules/react-bootstrap/src/TabPane.js | 87 - .../react-bootstrap/src/TabbedArea.js | 140 - node_modules/react-bootstrap/src/Table.js | 35 - node_modules/react-bootstrap/src/Tooltip.js | 50 - node_modules/react-bootstrap/src/Well.js | 25 - node_modules/react-bootstrap/src/constants.js | 301 - node_modules/react-bootstrap/src/index.js | 103 - .../src/utils/CustomPropTypes.js | 60 - .../src/utils/EventListener.js | 54 - .../src/utils/Object.assign.js | 47 - .../src/utils/TransitionEvents.js | 113 - .../src/utils/ValidComponentChildren.js | 90 - .../src/utils/createChainedFunction.js | 25 - .../react-bootstrap/src/utils/domUtils.js | 122 - .../react-bootstrap/webpack.config.js | 5 - node_modules/react-bootstrap/webpack.docs.js | 4 - .../react-bootstrap/webpack/docs.config.js | 2 - .../webpack/strategies/development.js | 13 - .../webpack/strategies/docs.js | 55 - .../react-bootstrap/webpack/strategies/ie8.js | 26 - .../webpack/strategies/index.js | 13 - .../webpack/strategies/optimize.js | 15 - .../webpack/strategies/test.js | 18 - .../react-bootstrap/webpack/test.config.js | 3 - .../react-bootstrap/webpack/webpack.config.js | 63 - .../react-mixin-safe-state-change/LICENSE | 22 - .../react-mixin-safe-state-change/README.md | 35 - .../react-mixin-safe-state-change/index.js | 89 - .../package.json | 49 - node_modules/react-router-bootstrap/README.md | 117 - .../react-router-bootstrap/lib/ButtonLink.js | 38 - .../react-router-bootstrap/lib/LinkMixin.js | 78 - .../lib/ListGroupItemLink.js | 38 - .../lib/MenuItemLink.js | 43 - .../react-router-bootstrap/lib/NavItemLink.js | 38 - .../lib/ReactRouterBootstrap.js | 449 - .../lib/ReactRouterBootstrap.min.js | 1 - .../react-router-bootstrap/lib/helpers.js | 18 - .../react-router-bootstrap/lib/index.js | 11 - .../react-router-bootstrap/package.json | 97 - node_modules/react-router/README.md | 136 - node_modules/react-router/lib/Cancellation.js | 9 - node_modules/react-router/lib/History.js | 30 - node_modules/react-router/lib/Match.js | 75 - node_modules/react-router/lib/Navigation.js | 70 - node_modules/react-router/lib/PathUtils.js | 153 - node_modules/react-router/lib/PropTypes.js | 29 - node_modules/react-router/lib/Redirect.js | 12 - node_modules/react-router/lib/Route.js | 202 - .../react-router/lib/ScrollHistory.js | 75 - node_modules/react-router/lib/State.js | 74 - node_modules/react-router/lib/TestUtils.js | 171 - node_modules/react-router/lib/Transition.js | 75 - .../lib/actions/LocationActions.js | 25 - .../lib/behaviors/ImitateBrowserBehavior.js | 29 - .../lib/behaviors/ScrollToTopBehavior.js | 15 - .../lib/components/ActiveHandler.js | 108 - .../lib/components/ContextWrapper.js | 38 - .../lib/components/DefaultRoute.js | 47 - .../react-router/lib/components/Link.js | 135 - .../lib/components/NotFoundRoute.js | 48 - .../react-router/lib/components/Redirect.js | 43 - .../react-router/lib/components/Route.js | 91 - .../lib/components/RouteHandler.js | 108 - node_modules/react-router/lib/createRouter.js | 512 - .../lib/createRoutesFromReactChildren.js | 81 - .../lib/getWindowScrollPosition.js | 18 - node_modules/react-router/lib/index.js | 31 - .../react-router/lib/isReactChildren.js | 13 - .../lib/locations/HashLocation.js | 111 - .../lib/locations/HistoryLocation.js | 84 - .../lib/locations/RefreshLocation.js | 31 - .../lib/locations/StaticLocation.js | 49 - .../lib/locations/TestLocation.js | 90 - node_modules/react-router/lib/runRouter.js | 50 - .../react-router/lib/supportsHistory.js | 16 - node_modules/react-router/lib/warning.js | 59 - .../node_modules/can-use-dom/.npmignore | 28 - .../node_modules/can-use-dom/LICENSE | 22 - .../node_modules/can-use-dom/index.js | 7 - .../node_modules/can-use-dom/package.json | 51 - .../node_modules/can-use-dom/test.js | 20 - .../node_modules/invariant/CHANGELOG.md | 33 - .../node_modules/invariant/README.md | 35 - .../node_modules/invariant/browser.js | 51 - .../node_modules/invariant/invariant.js | 53 - .../node_modules/loose-envify/.npmignore | 3 - .../node_modules/loose-envify/README.md | 45 - .../node_modules/loose-envify/custom.js | 2 - .../node_modules/loose-envify/index.js | 1 - .../node_modules/loose-envify/loose-envify.js | 36 - .../node_modules/js-tokens/LICENSE | 21 - .../node_modules/js-tokens/changelog.md | 65 - .../node_modules/js-tokens/index.js | 19 - .../node_modules/js-tokens/package.json | 61 - .../node_modules/js-tokens/readme.md | 204 - .../node_modules/loose-envify/package.json | 60 - .../node_modules/loose-envify/replace.js | 65 - .../node_modules/invariant/package.json | 64 - .../node_modules/object-assign/index.js | 26 - .../node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 67 - .../node_modules/object-assign/readme.md | 51 - .../node_modules/qs/.jshintignore | 1 - .../react-router/node_modules/qs/.jshintrc | 10 - .../react-router/node_modules/qs/.npmignore | 18 - .../react-router/node_modules/qs/.travis.yml | 6 - .../react-router/node_modules/qs/CHANGELOG.md | 68 - .../node_modules/qs/CONTRIBUTING.md | 1 - .../react-router/node_modules/qs/LICENSE | 28 - .../react-router/node_modules/qs/Makefile | 8 - .../react-router/node_modules/qs/README.md | 233 - .../react-router/node_modules/qs/index.js | 1 - .../react-router/node_modules/qs/lib/index.js | 15 - .../react-router/node_modules/qs/lib/parse.js | 161 - .../node_modules/qs/lib/stringify.js | 97 - .../react-router/node_modules/qs/lib/utils.js | 132 - .../react-router/node_modules/qs/package.json | 58 - .../node_modules/qs/test/parse.js | 413 - .../node_modules/qs/test/stringify.js | 209 - node_modules/react-router/package.json | 66 - node_modules/react-router/umd/ReactRouter.js | 3306 - .../react-router/umd/ReactRouter.min.js | 7 - node_modules/react/README.md | 20 - node_modules/react/addons.js | 1 - node_modules/react/dist/JSXTransformer.js | 15919 ---- node_modules/react/dist/react-with-addons.js | 21598 ------ .../react/dist/react-with-addons.min.js | 17 - node_modules/react/dist/react.js | 19562 ----- node_modules/react/dist/react.min.js | 15 - node_modules/react/lib/AutoFocusMixin.js | 25 - .../react/lib/BeforeInputEventPlugin.js | 493 - node_modules/react/lib/CSSCore.js | 108 - node_modules/react/lib/CSSProperty.js | 123 - .../react/lib/CSSPropertyOperations.js | 178 - node_modules/react/lib/CallbackQueue.js | 96 - node_modules/react/lib/ChangeEventPlugin.js | 380 - .../react/lib/ClientReactRootIndex.js | 23 - .../react/lib/DOMChildrenOperations.js | 134 - node_modules/react/lib/DOMProperty.js | 295 - .../react/lib/DOMPropertyOperations.js | 188 - node_modules/react/lib/Danger.js | 183 - .../react/lib/DefaultEventPluginOrder.js | 37 - .../react/lib/EnterLeaveEventPlugin.js | 138 - node_modules/react/lib/EventConstants.js | 70 - node_modules/react/lib/EventListener.js | 86 - node_modules/react/lib/EventPluginHub.js | 274 - node_modules/react/lib/EventPluginRegistry.js | 276 - node_modules/react/lib/EventPluginUtils.js | 217 - node_modules/react/lib/EventPropagators.js | 138 - .../react/lib/ExecutionEnvironment.js | 42 - .../react/lib/FallbackCompositionState.js | 89 - .../react/lib/HTMLDOMPropertyConfig.js | 209 - node_modules/react/lib/LinkedStateMixin.js | 39 - node_modules/react/lib/LinkedValueUtils.js | 152 - node_modules/react/lib/LocalEventTrapMixin.js | 53 - .../react/lib/MobileSafariClickEventPlugin.js | 56 - node_modules/react/lib/Object.assign.js | 47 - node_modules/react/lib/PooledClass.js | 112 - node_modules/react/lib/React.js | 148 - .../react/lib/ReactBrowserComponentMixin.js | 29 - .../react/lib/ReactBrowserEventEmitter.js | 351 - .../react/lib/ReactCSSTransitionGroup.js | 68 - .../react/lib/ReactCSSTransitionGroupChild.js | 144 - .../react/lib/ReactChildReconciler.js | 125 - node_modules/react/lib/ReactChildren.js | 149 - node_modules/react/lib/ReactClass.js | 942 - node_modules/react/lib/ReactComponent.js | 132 - .../lib/ReactComponentBrowserEnvironment.js | 45 - .../react/lib/ReactComponentEnvironment.js | 57 - .../lib/ReactComponentWithPureRenderMixin.js | 47 - .../react/lib/ReactCompositeComponent.js | 894 - node_modules/react/lib/ReactContext.js | 74 - node_modules/react/lib/ReactCurrentOwner.js | 32 - node_modules/react/lib/ReactDOM.js | 174 - node_modules/react/lib/ReactDOMButton.js | 62 - node_modules/react/lib/ReactDOMComponent.js | 504 - node_modules/react/lib/ReactDOMForm.js | 47 - .../react/lib/ReactDOMIDOperations.js | 164 - node_modules/react/lib/ReactDOMIframe.js | 43 - node_modules/react/lib/ReactDOMImg.js | 44 - node_modules/react/lib/ReactDOMInput.js | 173 - node_modules/react/lib/ReactDOMOption.js | 48 - node_modules/react/lib/ReactDOMSelect.js | 176 - node_modules/react/lib/ReactDOMSelection.js | 211 - .../react/lib/ReactDOMTextComponent.js | 115 - node_modules/react/lib/ReactDOMTextarea.js | 136 - .../react/lib/ReactDefaultBatchingStrategy.js | 71 - .../react/lib/ReactDefaultInjection.js | 155 - node_modules/react/lib/ReactDefaultPerf.js | 264 - .../react/lib/ReactDefaultPerfAnalysis.js | 204 - node_modules/react/lib/ReactElement.js | 304 - .../react/lib/ReactElementValidator.js | 461 - node_modules/react/lib/ReactEmptyComponent.js | 91 - node_modules/react/lib/ReactErrorUtils.js | 30 - .../react/lib/ReactEventEmitterMixin.js | 48 - node_modules/react/lib/ReactEventListener.js | 181 - node_modules/react/lib/ReactFragment.js | 181 - node_modules/react/lib/ReactInjection.js | 40 - node_modules/react/lib/ReactInputSelection.js | 133 - .../react/lib/ReactInstanceHandles.js | 332 - node_modules/react/lib/ReactInstanceMap.js | 47 - node_modules/react/lib/ReactLifeCycle.js | 35 - node_modules/react/lib/ReactLink.js | 71 - node_modules/react/lib/ReactMarkupChecksum.js | 46 - node_modules/react/lib/ReactMount.js | 887 - node_modules/react/lib/ReactMultiChild.js | 428 - .../react/lib/ReactMultiChildUpdateTypes.js | 31 - .../react/lib/ReactNativeComponent.js | 103 - node_modules/react/lib/ReactOwner.js | 108 - node_modules/react/lib/ReactPerf.js | 100 - node_modules/react/lib/ReactPropTransferer.js | 108 - .../react/lib/ReactPropTypeLocationNames.js | 24 - .../react/lib/ReactPropTypeLocations.js | 22 - node_modules/react/lib/ReactPropTypes.js | 347 - .../react/lib/ReactPutListenerQueue.js | 54 - .../react/lib/ReactReconcileTransaction.js | 174 - node_modules/react/lib/ReactReconciler.js | 120 - node_modules/react/lib/ReactRef.js | 69 - node_modules/react/lib/ReactRootIndex.js | 29 - .../react/lib/ReactServerRendering.js | 78 - .../lib/ReactServerRenderingTransaction.js | 111 - node_modules/react/lib/ReactStateSetters.js | 104 - node_modules/react/lib/ReactTestUtils.js | 508 - .../react/lib/ReactTransitionChildMapping.js | 103 - .../react/lib/ReactTransitionEvents.js | 109 - .../react/lib/ReactTransitionGroup.js | 228 - node_modules/react/lib/ReactUpdateQueue.js | 295 - node_modules/react/lib/ReactUpdates.js | 278 - node_modules/react/lib/ReactWithAddons.js | 52 - .../react/lib/SVGDOMPropertyConfig.js | 90 - node_modules/react/lib/SelectEventPlugin.js | 193 - .../react/lib/ServerReactRootIndex.js | 29 - node_modules/react/lib/SimpleEventPlugin.js | 424 - .../react/lib/SyntheticClipboardEvent.js | 43 - .../react/lib/SyntheticCompositionEvent.js | 43 - node_modules/react/lib/SyntheticDragEvent.js | 37 - node_modules/react/lib/SyntheticEvent.js | 164 - node_modules/react/lib/SyntheticFocusEvent.js | 37 - node_modules/react/lib/SyntheticInputEvent.js | 44 - .../react/lib/SyntheticKeyboardEvent.js | 85 - node_modules/react/lib/SyntheticMouseEvent.js | 79 - node_modules/react/lib/SyntheticTouchEvent.js | 46 - node_modules/react/lib/SyntheticUIEvent.js | 60 - node_modules/react/lib/SyntheticWheelEvent.js | 59 - node_modules/react/lib/Transaction.js | 237 - node_modules/react/lib/ViewportMetrics.js | 27 - node_modules/react/lib/accumulateInto.js | 62 - node_modules/react/lib/adler32.js | 32 - node_modules/react/lib/camelize.js | 30 - node_modules/react/lib/camelizeStyleName.js | 40 - node_modules/react/lib/cloneWithProps.js | 55 - node_modules/react/lib/containsNode.js | 42 - .../react/lib/createArrayFromMixed.js | 84 - .../react/lib/createFullPageComponent.js | 58 - .../react/lib/createNodesFromMarkup.js | 86 - node_modules/react/lib/cx.js | 52 - node_modules/react/lib/dangerousStyleValue.js | 56 - node_modules/react/lib/emptyFunction.js | 32 - node_modules/react/lib/emptyObject.js | 20 - .../react/lib/escapeTextContentForBrowser.js | 38 - node_modules/react/lib/findDOMNode.js | 69 - node_modules/react/lib/flattenChildren.js | 54 - node_modules/react/lib/focusNode.js | 27 - node_modules/react/lib/forEachAccumulated.js | 29 - node_modules/react/lib/getActiveElement.js | 27 - node_modules/react/lib/getEventCharCode.js | 50 - node_modules/react/lib/getEventKey.js | 103 - .../react/lib/getEventModifierState.js | 45 - node_modules/react/lib/getEventTarget.js | 29 - node_modules/react/lib/getIteratorFn.js | 42 - node_modules/react/lib/getMarkupWrap.js | 113 - .../react/lib/getNodeForCharacterOffset.js | 73 - .../lib/getReactRootElementInContainer.js | 33 - .../react/lib/getTextContentAccessor.js | 35 - .../react/lib/getUnboundedScrollPosition.js | 38 - node_modules/react/lib/hyphenate.js | 31 - node_modules/react/lib/hyphenateStyleName.js | 39 - .../react/lib/instantiateReactComponent.js | 134 - node_modules/react/lib/invariant.js | 53 - node_modules/react/lib/isEventSupported.js | 63 - node_modules/react/lib/isNode.js | 25 - node_modules/react/lib/isTextInputElement.js | 41 - node_modules/react/lib/isTextNode.js | 23 - node_modules/react/lib/joinClasses.js | 39 - node_modules/react/lib/keyMirror.js | 51 - node_modules/react/lib/keyOf.js | 34 - node_modules/react/lib/mapObject.js | 51 - node_modules/react/lib/memoizeStringOnly.js | 31 - node_modules/react/lib/onlyChild.js | 36 - node_modules/react/lib/performance.js | 26 - node_modules/react/lib/performanceNow.js | 26 - .../lib/quoteAttributeValueForBrowser.js | 26 - node_modules/react/lib/setInnerHTML.js | 87 - node_modules/react/lib/setTextContent.js | 40 - node_modules/react/lib/shallowEqual.js | 42 - .../react/lib/shouldUpdateReactComponent.js | 100 - node_modules/react/lib/toArray.js | 68 - node_modules/react/lib/traverseAllChildren.js | 249 - node_modules/react/lib/update.js | 167 - node_modules/react/lib/warning.js | 59 - node_modules/react/node_modules/.bin/envify | 1 - .../react/node_modules/envify/.npmignore | 2 - .../react/node_modules/envify/README.md | 145 - .../react/node_modules/envify/bin/envify | 17 - .../react/node_modules/envify/custom.js | 38 - .../react/node_modules/envify/index.js | 1 - .../envify/node_modules/jstransform/.jshintrc | 28 - .../node_modules/jstransform/.npmignore | 4 - .../node_modules/jstransform/.travis.yml | 8 - .../envify/node_modules/jstransform/LICENSE | 201 - .../envify/node_modules/jstransform/README.md | 98 - .../jstransform/jestEnvironment.js | 1 - .../jstransform/jestPreprocessor.js | 13 - .../jstransform/node_modules/.bin/esparse | 1 - .../jstransform/node_modules/.bin/esvalidate | 1 - .../node_modules/base62/.travis.yml | 4 - .../jstransform/node_modules/base62/LICENSE | 20 - .../jstransform/node_modules/base62/Readme.md | 30 - .../jstransform/node_modules/base62/base62.js | 27 - .../node_modules/base62/package.json | 47 - .../node_modules/base62/test/test.js | 14 - .../node_modules/esprima-fb/README.md | 32 - .../node_modules/esprima-fb/bin/esparse.js | 117 - .../node_modules/esprima-fb/bin/esvalidate.js | 199 - .../node_modules/esprima-fb/esprima.js | 7704 -- .../node_modules/esprima-fb/package.json | 94 - .../node_modules/esprima-fb/test/compat.js | 244 - .../node_modules/esprima-fb/test/reflect.js | 421 - .../node_modules/esprima-fb/test/run.js | 66 - .../node_modules/esprima-fb/test/runner.js | 515 - .../node_modules/esprima-fb/test/test.js | 23151 ------ .../node_modules/source-map/.npmignore | 2 - .../node_modules/source-map/.travis.yml | 4 - .../node_modules/source-map/CHANGELOG.md | 112 - .../node_modules/source-map/LICENSE | 28 - .../source-map/Makefile.dryice.js | 166 - .../node_modules/source-map/README.md | 434 - .../source-map/build/assert-shim.js | 56 - .../source-map/build/mini-require.js | 152 - .../source-map/build/prefix-source-map.jsm | 20 - .../source-map/build/prefix-utils.jsm | 18 - .../source-map/build/suffix-browser.js | 8 - .../source-map/build/suffix-source-map.jsm | 6 - .../source-map/build/suffix-utils.jsm | 21 - .../source-map/build/test-prefix.js | 8 - .../source-map/build/test-suffix.js | 3 - .../node_modules/source-map/lib/source-map.js | 8 - .../source-map/lib/source-map/array-set.js | 97 - .../source-map/lib/source-map/base64-vlq.js | 144 - .../source-map/lib/source-map/base64.js | 42 - .../lib/source-map/binary-search.js | 81 - .../lib/source-map/source-map-consumer.js | 477 - .../lib/source-map/source-map-generator.js | 380 - .../source-map/lib/source-map/source-node.js | 371 - .../source-map/lib/source-map/util.js | 205 - .../source-map/node_modules/amdefine/LICENSE | 58 - .../node_modules/amdefine/README.md | 171 - .../node_modules/amdefine/amdefine.js | 299 - .../node_modules/amdefine/intercept.js | 36 - .../node_modules/amdefine/package.json | 54 - .../node_modules/source-map/package.json | 130 - .../node_modules/source-map/test/run-tests.js | 71 - .../source-map/test/source-map/test-api.js | 26 - .../test/source-map/test-array-set.js | 104 - .../test/source-map/test-base64-vlq.js | 24 - .../source-map/test/source-map/test-base64.js | 35 - .../test/source-map/test-binary-search.js | 54 - .../test/source-map/test-dog-fooding.js | 72 - .../source-map/test-source-map-consumer.js | 451 - .../source-map/test-source-map-generator.js | 417 - .../test/source-map/test-source-node.js | 365 - .../source-map/test/source-map/util.js | 161 - .../node_modules/jstransform/package.json | 89 - .../jstransform/polyfill/Object.es6.js | 52 - .../src/__tests__/jstransform-test.js | 481 - .../src/__tests__/jstransform-utils-test.js | 66 - .../node_modules/jstransform/src/docblock.js | 86 - .../jstransform/src/jstransform.js | 299 - .../node_modules/jstransform/src/utils.js | 708 - .../es6-arrow-function-visitors-test.js | 239 - .../es6-call-spread-visitors-test.js | 96 - .../__tests__/es6-class-visitors-test.js | 1515 - .../es6-destructuring-visitors-test.js | 279 - .../es6-es7-object-integration-test.js | 62 - ...es6-object-concise-method-visitors-test.js | 133 - ...es6-object-short-notation-visitors-test.js | 119 - .../__tests__/es6-rest-param-visitors-test.js | 328 - .../__tests__/es6-template-visitors-test.js | 208 - .../es7-rest-property-helpers-test.js | 97 - .../es7-spread-property-visitors-test.js | 160 - .../gen/generate-type-syntax-test.js | 52 - .../__tests__/gen/type-syntax-test.rec.js | 846 - .../visitors/__tests__/reserved-words-test.js | 74 - .../__tests__/type-alias-syntax-test.js | 83 - .../__tests__/type-class-syntax-test.js | 298 - .../__tests__/type-function-syntax-test.js | 298 - .../__tests__/type-interface-syntax-test.js | 72 - .../type-object-method-syntax-test.js | 186 - .../__tests__/type-pattern-syntax-test.js | 91 - .../visitors/__tests__/type-syntax-test.js | 194 - .../type-variable-declaration-syntax-test.js | 208 - .../visitors/es6-arrow-function-visitors.js | 158 - .../visitors/es6-call-spread-visitors.js | 107 - .../visitors/es6-class-visitors.js | 588 - .../visitors/es6-destructuring-visitors.js | 280 - .../es6-object-concise-method-visitors.js | 69 - .../es6-object-short-notation-visitors.js | 53 - .../visitors/es6-rest-param-visitors.js | 106 - .../visitors/es6-template-visitors.js | 156 - .../visitors/es7-rest-property-helpers.js | 80 - .../visitors/es7-spread-property-visitors.js | 108 - .../visitors/reserved-words-helper.js | 74 - .../visitors/reserved-words-visitors.js | 68 - .../jstransform/visitors/type-syntax.js | 172 - .../envify/node_modules/through/.travis.yml | 5 - .../node_modules/through/LICENSE.APACHE2 | 15 - .../envify/node_modules/through/LICENSE.MIT | 24 - .../envify/node_modules/through/index.js | 108 - .../envify/node_modules/through/package.json | 65 - .../node_modules/through/readme.markdown | 64 - .../envify/node_modules/through/test/async.js | 28 - .../node_modules/through/test/auto-destroy.js | 30 - .../node_modules/through/test/buffering.js | 71 - .../envify/node_modules/through/test/end.js | 45 - .../envify/node_modules/through/test/index.js | 133 - .../react/node_modules/envify/package.json | 68 - .../react/node_modules/envify/visitors.js | 49 - node_modules/react/package.json | 70 - node_modules/react/react.js | 1 - package.json | 13 +- 645 files changed, 48468 insertions(+), 200993 deletions(-) create mode 100644 jsx/common/ContentEditable.js create mode 100644 jsx/common/TwistComposer.js create mode 100644 jsx/other/Featured.js delete mode 100755 node_modules/classnames/.editorconfig delete mode 100755 node_modules/classnames/.npmignore delete mode 100755 node_modules/classnames/LICENSE delete mode 100755 node_modules/classnames/README.md delete mode 100755 node_modules/classnames/bower.json delete mode 100755 node_modules/classnames/index.js delete mode 100755 node_modules/classnames/package.json delete mode 100755 node_modules/classnames/tests.js delete mode 100755 node_modules/react-bootstrap/.ackrc delete mode 100755 node_modules/react-bootstrap/.editorconfig delete mode 100755 node_modules/react-bootstrap/.eslintrc delete mode 100755 node_modules/react-bootstrap/.npmignore delete mode 100755 node_modules/react-bootstrap/CHANGELOG.md delete mode 100755 node_modules/react-bootstrap/CONTRIBUTING.md delete mode 100755 node_modules/react-bootstrap/LICENSE delete mode 100755 node_modules/react-bootstrap/README.md delete mode 100755 node_modules/react-bootstrap/amd/LICENSE delete mode 100755 node_modules/react-bootstrap/amd/README.md delete mode 100755 node_modules/react-bootstrap/amd/bower.json delete mode 100755 node_modules/react-bootstrap/amd/lib/Accordion.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Affix.js delete mode 100755 node_modules/react-bootstrap/amd/lib/AffixMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Alert.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Badge.js delete mode 100755 node_modules/react-bootstrap/amd/lib/BootstrapMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Button.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ButtonGroup.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ButtonToolbar.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Carousel.js delete mode 100755 node_modules/react-bootstrap/amd/lib/CarouselItem.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Col.js delete mode 100755 node_modules/react-bootstrap/amd/lib/CollapsableMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/CollapsableNav.js delete mode 100755 node_modules/react-bootstrap/amd/lib/DropdownButton.js delete mode 100755 node_modules/react-bootstrap/amd/lib/DropdownMenu.js delete mode 100755 node_modules/react-bootstrap/amd/lib/DropdownStateMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/FadeMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/FormGroup.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Glyphicon.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Grid.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Input.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Interpolate.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Jumbotron.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Label.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ListGroup.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ListGroupItem.js delete mode 100755 node_modules/react-bootstrap/amd/lib/MenuItem.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Modal.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ModalTrigger.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Nav.js delete mode 100755 node_modules/react-bootstrap/amd/lib/NavItem.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Navbar.js delete mode 100755 node_modules/react-bootstrap/amd/lib/OverlayMixin.js delete mode 100755 node_modules/react-bootstrap/amd/lib/OverlayTrigger.js delete mode 100755 node_modules/react-bootstrap/amd/lib/PageHeader.js delete mode 100755 node_modules/react-bootstrap/amd/lib/PageItem.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Pager.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Panel.js delete mode 100755 node_modules/react-bootstrap/amd/lib/PanelGroup.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Popover.js delete mode 100755 node_modules/react-bootstrap/amd/lib/ProgressBar.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Row.js delete mode 100755 node_modules/react-bootstrap/amd/lib/SplitButton.js delete mode 100755 node_modules/react-bootstrap/amd/lib/SubNav.js delete mode 100755 node_modules/react-bootstrap/amd/lib/TabPane.js delete mode 100755 node_modules/react-bootstrap/amd/lib/TabbedArea.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Table.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Tooltip.js delete mode 100755 node_modules/react-bootstrap/amd/lib/Well.js delete mode 100755 node_modules/react-bootstrap/amd/lib/constants.js delete mode 100755 node_modules/react-bootstrap/amd/lib/index.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/CustomPropTypes.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/EventListener.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/Object.assign.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/TransitionEvents.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/ValidComponentChildren.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/createChainedFunction.js delete mode 100755 node_modules/react-bootstrap/amd/lib/utils/domUtils.js delete mode 100755 node_modules/react-bootstrap/amd/react-bootstrap.js delete mode 100755 node_modules/react-bootstrap/amd/react-bootstrap.min.js delete mode 100755 node_modules/react-bootstrap/appveyor.yml.tmp delete mode 100755 node_modules/react-bootstrap/dist/react-bootstrap.js delete mode 100755 node_modules/react-bootstrap/dist/react-bootstrap.min.js delete mode 100755 node_modules/react-bootstrap/ie8/.eslintrc delete mode 100755 node_modules/react-bootstrap/ie8/README.md delete mode 100755 node_modules/react-bootstrap/ie8/assets/carousel.png delete mode 100755 node_modules/react-bootstrap/ie8/index.html delete mode 100755 node_modules/react-bootstrap/ie8/package.json delete mode 100755 node_modules/react-bootstrap/ie8/server.js delete mode 100755 node_modules/react-bootstrap/ie8/src.js delete mode 100755 node_modules/react-bootstrap/lib/Accordion.js delete mode 100755 node_modules/react-bootstrap/lib/Affix.js delete mode 100755 node_modules/react-bootstrap/lib/AffixMixin.js delete mode 100755 node_modules/react-bootstrap/lib/Alert.js delete mode 100755 node_modules/react-bootstrap/lib/Badge.js delete mode 100755 node_modules/react-bootstrap/lib/BootstrapMixin.js delete mode 100755 node_modules/react-bootstrap/lib/Button.js delete mode 100755 node_modules/react-bootstrap/lib/ButtonGroup.js delete mode 100755 node_modules/react-bootstrap/lib/ButtonToolbar.js delete mode 100755 node_modules/react-bootstrap/lib/Carousel.js delete mode 100755 node_modules/react-bootstrap/lib/CarouselItem.js delete mode 100755 node_modules/react-bootstrap/lib/Col.js delete mode 100755 node_modules/react-bootstrap/lib/CollapsableMixin.js delete mode 100755 node_modules/react-bootstrap/lib/CollapsableNav.js delete mode 100755 node_modules/react-bootstrap/lib/DropdownButton.js delete mode 100755 node_modules/react-bootstrap/lib/DropdownMenu.js delete mode 100755 node_modules/react-bootstrap/lib/DropdownStateMixin.js delete mode 100755 node_modules/react-bootstrap/lib/FadeMixin.js delete mode 100755 node_modules/react-bootstrap/lib/FormGroup.js delete mode 100755 node_modules/react-bootstrap/lib/Glyphicon.js delete mode 100755 node_modules/react-bootstrap/lib/Grid.js delete mode 100755 node_modules/react-bootstrap/lib/Input.js delete mode 100755 node_modules/react-bootstrap/lib/Interpolate.js delete mode 100755 node_modules/react-bootstrap/lib/Jumbotron.js delete mode 100755 node_modules/react-bootstrap/lib/Label.js delete mode 100755 node_modules/react-bootstrap/lib/ListGroup.js delete mode 100755 node_modules/react-bootstrap/lib/ListGroupItem.js delete mode 100755 node_modules/react-bootstrap/lib/MenuItem.js delete mode 100755 node_modules/react-bootstrap/lib/Modal.js delete mode 100755 node_modules/react-bootstrap/lib/ModalTrigger.js delete mode 100755 node_modules/react-bootstrap/lib/Nav.js delete mode 100755 node_modules/react-bootstrap/lib/NavItem.js delete mode 100755 node_modules/react-bootstrap/lib/Navbar.js delete mode 100755 node_modules/react-bootstrap/lib/OverlayMixin.js delete mode 100755 node_modules/react-bootstrap/lib/OverlayTrigger.js delete mode 100755 node_modules/react-bootstrap/lib/PageHeader.js delete mode 100755 node_modules/react-bootstrap/lib/PageItem.js delete mode 100755 node_modules/react-bootstrap/lib/Pager.js delete mode 100755 node_modules/react-bootstrap/lib/Panel.js delete mode 100755 node_modules/react-bootstrap/lib/PanelGroup.js delete mode 100755 node_modules/react-bootstrap/lib/Popover.js delete mode 100755 node_modules/react-bootstrap/lib/ProgressBar.js delete mode 100755 node_modules/react-bootstrap/lib/Row.js delete mode 100755 node_modules/react-bootstrap/lib/SplitButton.js delete mode 100755 node_modules/react-bootstrap/lib/SubNav.js delete mode 100755 node_modules/react-bootstrap/lib/TabPane.js delete mode 100755 node_modules/react-bootstrap/lib/TabbedArea.js delete mode 100755 node_modules/react-bootstrap/lib/Table.js delete mode 100755 node_modules/react-bootstrap/lib/Tooltip.js delete mode 100755 node_modules/react-bootstrap/lib/Well.js delete mode 100755 node_modules/react-bootstrap/lib/constants.js delete mode 100755 node_modules/react-bootstrap/lib/index.js delete mode 100755 node_modules/react-bootstrap/lib/utils/CustomPropTypes.js delete mode 100755 node_modules/react-bootstrap/lib/utils/EventListener.js delete mode 100755 node_modules/react-bootstrap/lib/utils/Object.assign.js delete mode 100755 node_modules/react-bootstrap/lib/utils/TransitionEvents.js delete mode 100755 node_modules/react-bootstrap/lib/utils/ValidComponentChildren.js delete mode 100755 node_modules/react-bootstrap/lib/utils/createChainedFunction.js delete mode 100755 node_modules/react-bootstrap/lib/utils/domUtils.js delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/.editorconfig delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/.npmignore delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/LICENSE delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/README.md delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/bower.json delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/index.js delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/package.json delete mode 100755 node_modules/react-bootstrap/node_modules/classnames/tests.js delete mode 100755 node_modules/react-bootstrap/package.json delete mode 100755 node_modules/react-bootstrap/register-babel.js delete mode 100755 node_modules/react-bootstrap/run-babel delete mode 100755 node_modules/react-bootstrap/src/Accordion.js delete mode 100755 node_modules/react-bootstrap/src/Affix.js delete mode 100755 node_modules/react-bootstrap/src/AffixMixin.js delete mode 100755 node_modules/react-bootstrap/src/Alert.js delete mode 100755 node_modules/react-bootstrap/src/Badge.js delete mode 100755 node_modules/react-bootstrap/src/BootstrapMixin.js delete mode 100755 node_modules/react-bootstrap/src/Button.js delete mode 100755 node_modules/react-bootstrap/src/ButtonGroup.js delete mode 100755 node_modules/react-bootstrap/src/ButtonToolbar.js delete mode 100755 node_modules/react-bootstrap/src/Carousel.js delete mode 100755 node_modules/react-bootstrap/src/CarouselItem.js delete mode 100755 node_modules/react-bootstrap/src/Col.js delete mode 100755 node_modules/react-bootstrap/src/CollapsableMixin.js delete mode 100755 node_modules/react-bootstrap/src/CollapsableNav.js delete mode 100755 node_modules/react-bootstrap/src/DropdownButton.js delete mode 100755 node_modules/react-bootstrap/src/DropdownMenu.js delete mode 100755 node_modules/react-bootstrap/src/DropdownStateMixin.js delete mode 100755 node_modules/react-bootstrap/src/FadeMixin.js delete mode 100755 node_modules/react-bootstrap/src/FormGroup.js delete mode 100755 node_modules/react-bootstrap/src/Glyphicon.js delete mode 100755 node_modules/react-bootstrap/src/Grid.js delete mode 100755 node_modules/react-bootstrap/src/Input.js delete mode 100755 node_modules/react-bootstrap/src/Interpolate.js delete mode 100755 node_modules/react-bootstrap/src/Jumbotron.js delete mode 100755 node_modules/react-bootstrap/src/Label.js delete mode 100755 node_modules/react-bootstrap/src/ListGroup.js delete mode 100755 node_modules/react-bootstrap/src/ListGroupItem.js delete mode 100755 node_modules/react-bootstrap/src/MenuItem.js delete mode 100755 node_modules/react-bootstrap/src/Modal.js delete mode 100755 node_modules/react-bootstrap/src/ModalTrigger.js delete mode 100755 node_modules/react-bootstrap/src/Nav.js delete mode 100755 node_modules/react-bootstrap/src/NavItem.js delete mode 100755 node_modules/react-bootstrap/src/NavItem.js.orig delete mode 100755 node_modules/react-bootstrap/src/Navbar.js delete mode 100755 node_modules/react-bootstrap/src/OverlayMixin.js delete mode 100755 node_modules/react-bootstrap/src/OverlayTrigger.js delete mode 100755 node_modules/react-bootstrap/src/PageHeader.js delete mode 100755 node_modules/react-bootstrap/src/PageItem.js delete mode 100755 node_modules/react-bootstrap/src/Pager.js delete mode 100755 node_modules/react-bootstrap/src/Panel.js delete mode 100755 node_modules/react-bootstrap/src/PanelGroup.js delete mode 100755 node_modules/react-bootstrap/src/Popover.js delete mode 100755 node_modules/react-bootstrap/src/ProgressBar.js delete mode 100755 node_modules/react-bootstrap/src/Row.js delete mode 100755 node_modules/react-bootstrap/src/SplitButton.js delete mode 100755 node_modules/react-bootstrap/src/SubNav.js delete mode 100755 node_modules/react-bootstrap/src/TabPane.js delete mode 100755 node_modules/react-bootstrap/src/TabbedArea.js delete mode 100755 node_modules/react-bootstrap/src/Table.js delete mode 100755 node_modules/react-bootstrap/src/Tooltip.js delete mode 100755 node_modules/react-bootstrap/src/Well.js delete mode 100755 node_modules/react-bootstrap/src/constants.js delete mode 100755 node_modules/react-bootstrap/src/index.js delete mode 100755 node_modules/react-bootstrap/src/utils/CustomPropTypes.js delete mode 100755 node_modules/react-bootstrap/src/utils/EventListener.js delete mode 100755 node_modules/react-bootstrap/src/utils/Object.assign.js delete mode 100755 node_modules/react-bootstrap/src/utils/TransitionEvents.js delete mode 100755 node_modules/react-bootstrap/src/utils/ValidComponentChildren.js delete mode 100755 node_modules/react-bootstrap/src/utils/createChainedFunction.js delete mode 100755 node_modules/react-bootstrap/src/utils/domUtils.js delete mode 100755 node_modules/react-bootstrap/webpack.config.js delete mode 100755 node_modules/react-bootstrap/webpack.docs.js delete mode 100755 node_modules/react-bootstrap/webpack/docs.config.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/development.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/docs.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/ie8.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/index.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/optimize.js delete mode 100755 node_modules/react-bootstrap/webpack/strategies/test.js delete mode 100755 node_modules/react-bootstrap/webpack/test.config.js delete mode 100755 node_modules/react-bootstrap/webpack/webpack.config.js delete mode 100755 node_modules/react-mixin-safe-state-change/LICENSE delete mode 100755 node_modules/react-mixin-safe-state-change/README.md delete mode 100755 node_modules/react-mixin-safe-state-change/index.js delete mode 100755 node_modules/react-mixin-safe-state-change/package.json delete mode 100755 node_modules/react-router-bootstrap/README.md delete mode 100755 node_modules/react-router-bootstrap/lib/ButtonLink.js delete mode 100755 node_modules/react-router-bootstrap/lib/LinkMixin.js delete mode 100755 node_modules/react-router-bootstrap/lib/ListGroupItemLink.js delete mode 100755 node_modules/react-router-bootstrap/lib/MenuItemLink.js delete mode 100755 node_modules/react-router-bootstrap/lib/NavItemLink.js delete mode 100755 node_modules/react-router-bootstrap/lib/ReactRouterBootstrap.js delete mode 100755 node_modules/react-router-bootstrap/lib/ReactRouterBootstrap.min.js delete mode 100755 node_modules/react-router-bootstrap/lib/helpers.js delete mode 100755 node_modules/react-router-bootstrap/lib/index.js delete mode 100755 node_modules/react-router-bootstrap/package.json delete mode 100644 node_modules/react-router/README.md delete mode 100644 node_modules/react-router/lib/Cancellation.js delete mode 100644 node_modules/react-router/lib/History.js delete mode 100644 node_modules/react-router/lib/Match.js delete mode 100644 node_modules/react-router/lib/Navigation.js delete mode 100644 node_modules/react-router/lib/PathUtils.js delete mode 100644 node_modules/react-router/lib/PropTypes.js delete mode 100644 node_modules/react-router/lib/Redirect.js delete mode 100644 node_modules/react-router/lib/Route.js delete mode 100644 node_modules/react-router/lib/ScrollHistory.js delete mode 100644 node_modules/react-router/lib/State.js delete mode 100644 node_modules/react-router/lib/TestUtils.js delete mode 100644 node_modules/react-router/lib/Transition.js delete mode 100644 node_modules/react-router/lib/actions/LocationActions.js delete mode 100644 node_modules/react-router/lib/behaviors/ImitateBrowserBehavior.js delete mode 100644 node_modules/react-router/lib/behaviors/ScrollToTopBehavior.js delete mode 100644 node_modules/react-router/lib/components/ActiveHandler.js delete mode 100644 node_modules/react-router/lib/components/ContextWrapper.js delete mode 100644 node_modules/react-router/lib/components/DefaultRoute.js delete mode 100644 node_modules/react-router/lib/components/Link.js delete mode 100644 node_modules/react-router/lib/components/NotFoundRoute.js delete mode 100644 node_modules/react-router/lib/components/Redirect.js delete mode 100644 node_modules/react-router/lib/components/Route.js delete mode 100644 node_modules/react-router/lib/components/RouteHandler.js delete mode 100644 node_modules/react-router/lib/createRouter.js delete mode 100644 node_modules/react-router/lib/createRoutesFromReactChildren.js delete mode 100644 node_modules/react-router/lib/getWindowScrollPosition.js delete mode 100644 node_modules/react-router/lib/index.js delete mode 100644 node_modules/react-router/lib/isReactChildren.js delete mode 100644 node_modules/react-router/lib/locations/HashLocation.js delete mode 100644 node_modules/react-router/lib/locations/HistoryLocation.js delete mode 100644 node_modules/react-router/lib/locations/RefreshLocation.js delete mode 100644 node_modules/react-router/lib/locations/StaticLocation.js delete mode 100644 node_modules/react-router/lib/locations/TestLocation.js delete mode 100644 node_modules/react-router/lib/runRouter.js delete mode 100644 node_modules/react-router/lib/supportsHistory.js delete mode 100644 node_modules/react-router/lib/warning.js delete mode 100644 node_modules/react-router/node_modules/can-use-dom/.npmignore delete mode 100644 node_modules/react-router/node_modules/can-use-dom/LICENSE delete mode 100644 node_modules/react-router/node_modules/can-use-dom/index.js delete mode 100644 node_modules/react-router/node_modules/can-use-dom/package.json delete mode 100644 node_modules/react-router/node_modules/can-use-dom/test.js delete mode 100644 node_modules/react-router/node_modules/invariant/CHANGELOG.md delete mode 100644 node_modules/react-router/node_modules/invariant/README.md delete mode 100644 node_modules/react-router/node_modules/invariant/browser.js delete mode 100644 node_modules/react-router/node_modules/invariant/invariant.js delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/.npmignore delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/README.md delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/custom.js delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/index.js delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/loose-envify.js delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/LICENSE delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/changelog.md delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/index.js delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/package.json delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/readme.md delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/package.json delete mode 100644 node_modules/react-router/node_modules/invariant/node_modules/loose-envify/replace.js delete mode 100644 node_modules/react-router/node_modules/invariant/package.json delete mode 100644 node_modules/react-router/node_modules/object-assign/index.js delete mode 100644 node_modules/react-router/node_modules/object-assign/license delete mode 100644 node_modules/react-router/node_modules/object-assign/package.json delete mode 100644 node_modules/react-router/node_modules/object-assign/readme.md delete mode 100644 node_modules/react-router/node_modules/qs/.jshintignore delete mode 100644 node_modules/react-router/node_modules/qs/.jshintrc delete mode 100644 node_modules/react-router/node_modules/qs/.npmignore delete mode 100644 node_modules/react-router/node_modules/qs/.travis.yml delete mode 100644 node_modules/react-router/node_modules/qs/CHANGELOG.md delete mode 100644 node_modules/react-router/node_modules/qs/CONTRIBUTING.md delete mode 100755 node_modules/react-router/node_modules/qs/LICENSE delete mode 100644 node_modules/react-router/node_modules/qs/Makefile delete mode 100755 node_modules/react-router/node_modules/qs/README.md delete mode 100644 node_modules/react-router/node_modules/qs/index.js delete mode 100755 node_modules/react-router/node_modules/qs/lib/index.js delete mode 100755 node_modules/react-router/node_modules/qs/lib/parse.js delete mode 100755 node_modules/react-router/node_modules/qs/lib/stringify.js delete mode 100755 node_modules/react-router/node_modules/qs/lib/utils.js delete mode 100644 node_modules/react-router/node_modules/qs/package.json delete mode 100755 node_modules/react-router/node_modules/qs/test/parse.js delete mode 100755 node_modules/react-router/node_modules/qs/test/stringify.js delete mode 100644 node_modules/react-router/package.json delete mode 100644 node_modules/react-router/umd/ReactRouter.js delete mode 100644 node_modules/react-router/umd/ReactRouter.min.js delete mode 100755 node_modules/react/README.md delete mode 100755 node_modules/react/addons.js delete mode 100755 node_modules/react/dist/JSXTransformer.js delete mode 100755 node_modules/react/dist/react-with-addons.js delete mode 100755 node_modules/react/dist/react-with-addons.min.js delete mode 100755 node_modules/react/dist/react.js delete mode 100755 node_modules/react/dist/react.min.js delete mode 100755 node_modules/react/lib/AutoFocusMixin.js delete mode 100755 node_modules/react/lib/BeforeInputEventPlugin.js delete mode 100755 node_modules/react/lib/CSSCore.js delete mode 100755 node_modules/react/lib/CSSProperty.js delete mode 100755 node_modules/react/lib/CSSPropertyOperations.js delete mode 100755 node_modules/react/lib/CallbackQueue.js delete mode 100755 node_modules/react/lib/ChangeEventPlugin.js delete mode 100755 node_modules/react/lib/ClientReactRootIndex.js delete mode 100755 node_modules/react/lib/DOMChildrenOperations.js delete mode 100755 node_modules/react/lib/DOMProperty.js delete mode 100755 node_modules/react/lib/DOMPropertyOperations.js delete mode 100755 node_modules/react/lib/Danger.js delete mode 100755 node_modules/react/lib/DefaultEventPluginOrder.js delete mode 100755 node_modules/react/lib/EnterLeaveEventPlugin.js delete mode 100755 node_modules/react/lib/EventConstants.js delete mode 100755 node_modules/react/lib/EventListener.js delete mode 100755 node_modules/react/lib/EventPluginHub.js delete mode 100755 node_modules/react/lib/EventPluginRegistry.js delete mode 100755 node_modules/react/lib/EventPluginUtils.js delete mode 100755 node_modules/react/lib/EventPropagators.js delete mode 100755 node_modules/react/lib/ExecutionEnvironment.js delete mode 100755 node_modules/react/lib/FallbackCompositionState.js delete mode 100755 node_modules/react/lib/HTMLDOMPropertyConfig.js delete mode 100755 node_modules/react/lib/LinkedStateMixin.js delete mode 100755 node_modules/react/lib/LinkedValueUtils.js delete mode 100755 node_modules/react/lib/LocalEventTrapMixin.js delete mode 100755 node_modules/react/lib/MobileSafariClickEventPlugin.js delete mode 100755 node_modules/react/lib/Object.assign.js delete mode 100755 node_modules/react/lib/PooledClass.js delete mode 100755 node_modules/react/lib/React.js delete mode 100755 node_modules/react/lib/ReactBrowserComponentMixin.js delete mode 100755 node_modules/react/lib/ReactBrowserEventEmitter.js delete mode 100755 node_modules/react/lib/ReactCSSTransitionGroup.js delete mode 100755 node_modules/react/lib/ReactCSSTransitionGroupChild.js delete mode 100755 node_modules/react/lib/ReactChildReconciler.js delete mode 100755 node_modules/react/lib/ReactChildren.js delete mode 100755 node_modules/react/lib/ReactClass.js delete mode 100755 node_modules/react/lib/ReactComponent.js delete mode 100755 node_modules/react/lib/ReactComponentBrowserEnvironment.js delete mode 100755 node_modules/react/lib/ReactComponentEnvironment.js delete mode 100755 node_modules/react/lib/ReactComponentWithPureRenderMixin.js delete mode 100755 node_modules/react/lib/ReactCompositeComponent.js delete mode 100755 node_modules/react/lib/ReactContext.js delete mode 100755 node_modules/react/lib/ReactCurrentOwner.js delete mode 100755 node_modules/react/lib/ReactDOM.js delete mode 100755 node_modules/react/lib/ReactDOMButton.js delete mode 100755 node_modules/react/lib/ReactDOMComponent.js delete mode 100755 node_modules/react/lib/ReactDOMForm.js delete mode 100755 node_modules/react/lib/ReactDOMIDOperations.js delete mode 100755 node_modules/react/lib/ReactDOMIframe.js delete mode 100755 node_modules/react/lib/ReactDOMImg.js delete mode 100755 node_modules/react/lib/ReactDOMInput.js delete mode 100755 node_modules/react/lib/ReactDOMOption.js delete mode 100755 node_modules/react/lib/ReactDOMSelect.js delete mode 100755 node_modules/react/lib/ReactDOMSelection.js delete mode 100755 node_modules/react/lib/ReactDOMTextComponent.js delete mode 100755 node_modules/react/lib/ReactDOMTextarea.js delete mode 100755 node_modules/react/lib/ReactDefaultBatchingStrategy.js delete mode 100755 node_modules/react/lib/ReactDefaultInjection.js delete mode 100755 node_modules/react/lib/ReactDefaultPerf.js delete mode 100755 node_modules/react/lib/ReactDefaultPerfAnalysis.js delete mode 100755 node_modules/react/lib/ReactElement.js delete mode 100755 node_modules/react/lib/ReactElementValidator.js delete mode 100755 node_modules/react/lib/ReactEmptyComponent.js delete mode 100755 node_modules/react/lib/ReactErrorUtils.js delete mode 100755 node_modules/react/lib/ReactEventEmitterMixin.js delete mode 100755 node_modules/react/lib/ReactEventListener.js delete mode 100755 node_modules/react/lib/ReactFragment.js delete mode 100755 node_modules/react/lib/ReactInjection.js delete mode 100755 node_modules/react/lib/ReactInputSelection.js delete mode 100755 node_modules/react/lib/ReactInstanceHandles.js delete mode 100755 node_modules/react/lib/ReactInstanceMap.js delete mode 100755 node_modules/react/lib/ReactLifeCycle.js delete mode 100755 node_modules/react/lib/ReactLink.js delete mode 100755 node_modules/react/lib/ReactMarkupChecksum.js delete mode 100755 node_modules/react/lib/ReactMount.js delete mode 100755 node_modules/react/lib/ReactMultiChild.js delete mode 100755 node_modules/react/lib/ReactMultiChildUpdateTypes.js delete mode 100755 node_modules/react/lib/ReactNativeComponent.js delete mode 100755 node_modules/react/lib/ReactOwner.js delete mode 100755 node_modules/react/lib/ReactPerf.js delete mode 100755 node_modules/react/lib/ReactPropTransferer.js delete mode 100755 node_modules/react/lib/ReactPropTypeLocationNames.js delete mode 100755 node_modules/react/lib/ReactPropTypeLocations.js delete mode 100755 node_modules/react/lib/ReactPropTypes.js delete mode 100755 node_modules/react/lib/ReactPutListenerQueue.js delete mode 100755 node_modules/react/lib/ReactReconcileTransaction.js delete mode 100755 node_modules/react/lib/ReactReconciler.js delete mode 100755 node_modules/react/lib/ReactRef.js delete mode 100755 node_modules/react/lib/ReactRootIndex.js delete mode 100755 node_modules/react/lib/ReactServerRendering.js delete mode 100755 node_modules/react/lib/ReactServerRenderingTransaction.js delete mode 100755 node_modules/react/lib/ReactStateSetters.js delete mode 100755 node_modules/react/lib/ReactTestUtils.js delete mode 100755 node_modules/react/lib/ReactTransitionChildMapping.js delete mode 100755 node_modules/react/lib/ReactTransitionEvents.js delete mode 100755 node_modules/react/lib/ReactTransitionGroup.js delete mode 100755 node_modules/react/lib/ReactUpdateQueue.js delete mode 100755 node_modules/react/lib/ReactUpdates.js delete mode 100755 node_modules/react/lib/ReactWithAddons.js delete mode 100755 node_modules/react/lib/SVGDOMPropertyConfig.js delete mode 100755 node_modules/react/lib/SelectEventPlugin.js delete mode 100755 node_modules/react/lib/ServerReactRootIndex.js delete mode 100755 node_modules/react/lib/SimpleEventPlugin.js delete mode 100755 node_modules/react/lib/SyntheticClipboardEvent.js delete mode 100755 node_modules/react/lib/SyntheticCompositionEvent.js delete mode 100755 node_modules/react/lib/SyntheticDragEvent.js delete mode 100755 node_modules/react/lib/SyntheticEvent.js delete mode 100755 node_modules/react/lib/SyntheticFocusEvent.js delete mode 100755 node_modules/react/lib/SyntheticInputEvent.js delete mode 100755 node_modules/react/lib/SyntheticKeyboardEvent.js delete mode 100755 node_modules/react/lib/SyntheticMouseEvent.js delete mode 100755 node_modules/react/lib/SyntheticTouchEvent.js delete mode 100755 node_modules/react/lib/SyntheticUIEvent.js delete mode 100755 node_modules/react/lib/SyntheticWheelEvent.js delete mode 100755 node_modules/react/lib/Transaction.js delete mode 100755 node_modules/react/lib/ViewportMetrics.js delete mode 100755 node_modules/react/lib/accumulateInto.js delete mode 100755 node_modules/react/lib/adler32.js delete mode 100755 node_modules/react/lib/camelize.js delete mode 100755 node_modules/react/lib/camelizeStyleName.js delete mode 100755 node_modules/react/lib/cloneWithProps.js delete mode 100755 node_modules/react/lib/containsNode.js delete mode 100755 node_modules/react/lib/createArrayFromMixed.js delete mode 100755 node_modules/react/lib/createFullPageComponent.js delete mode 100755 node_modules/react/lib/createNodesFromMarkup.js delete mode 100755 node_modules/react/lib/cx.js delete mode 100755 node_modules/react/lib/dangerousStyleValue.js delete mode 100755 node_modules/react/lib/emptyFunction.js delete mode 100755 node_modules/react/lib/emptyObject.js delete mode 100755 node_modules/react/lib/escapeTextContentForBrowser.js delete mode 100755 node_modules/react/lib/findDOMNode.js delete mode 100755 node_modules/react/lib/flattenChildren.js delete mode 100755 node_modules/react/lib/focusNode.js delete mode 100755 node_modules/react/lib/forEachAccumulated.js delete mode 100755 node_modules/react/lib/getActiveElement.js delete mode 100755 node_modules/react/lib/getEventCharCode.js delete mode 100755 node_modules/react/lib/getEventKey.js delete mode 100755 node_modules/react/lib/getEventModifierState.js delete mode 100755 node_modules/react/lib/getEventTarget.js delete mode 100755 node_modules/react/lib/getIteratorFn.js delete mode 100755 node_modules/react/lib/getMarkupWrap.js delete mode 100755 node_modules/react/lib/getNodeForCharacterOffset.js delete mode 100755 node_modules/react/lib/getReactRootElementInContainer.js delete mode 100755 node_modules/react/lib/getTextContentAccessor.js delete mode 100755 node_modules/react/lib/getUnboundedScrollPosition.js delete mode 100755 node_modules/react/lib/hyphenate.js delete mode 100755 node_modules/react/lib/hyphenateStyleName.js delete mode 100755 node_modules/react/lib/instantiateReactComponent.js delete mode 100755 node_modules/react/lib/invariant.js delete mode 100755 node_modules/react/lib/isEventSupported.js delete mode 100755 node_modules/react/lib/isNode.js delete mode 100755 node_modules/react/lib/isTextInputElement.js delete mode 100755 node_modules/react/lib/isTextNode.js delete mode 100755 node_modules/react/lib/joinClasses.js delete mode 100755 node_modules/react/lib/keyMirror.js delete mode 100755 node_modules/react/lib/keyOf.js delete mode 100755 node_modules/react/lib/mapObject.js delete mode 100755 node_modules/react/lib/memoizeStringOnly.js delete mode 100755 node_modules/react/lib/onlyChild.js delete mode 100755 node_modules/react/lib/performance.js delete mode 100755 node_modules/react/lib/performanceNow.js delete mode 100755 node_modules/react/lib/quoteAttributeValueForBrowser.js delete mode 100755 node_modules/react/lib/setInnerHTML.js delete mode 100755 node_modules/react/lib/setTextContent.js delete mode 100755 node_modules/react/lib/shallowEqual.js delete mode 100755 node_modules/react/lib/shouldUpdateReactComponent.js delete mode 100755 node_modules/react/lib/toArray.js delete mode 100755 node_modules/react/lib/traverseAllChildren.js delete mode 100755 node_modules/react/lib/update.js delete mode 100755 node_modules/react/lib/warning.js delete mode 120000 node_modules/react/node_modules/.bin/envify delete mode 100755 node_modules/react/node_modules/envify/.npmignore delete mode 100755 node_modules/react/node_modules/envify/README.md delete mode 100755 node_modules/react/node_modules/envify/bin/envify delete mode 100755 node_modules/react/node_modules/envify/custom.js delete mode 100755 node_modules/react/node_modules/envify/index.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/.jshintrc delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/.npmignore delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/.travis.yml delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/LICENSE delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/README.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/jestEnvironment.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/jestPreprocessor.js delete mode 120000 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/.bin/esparse delete mode 120000 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/.bin/esvalidate delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/.travis.yml delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/LICENSE delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/Readme.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/base62.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62/test/test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/README.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/bin/esparse.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/bin/esvalidate.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/esprima.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/test/compat.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/test/reflect.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/test/run.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/test/runner.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb/test/test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/.npmignore delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/.travis.yml delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/CHANGELOG.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/LICENSE delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/Makefile.dryice.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/README.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/assert-shim.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/mini-require.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/prefix-source-map.jsm delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/prefix-utils.jsm delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/suffix-browser.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/suffix-source-map.jsm delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/suffix-utils.jsm delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/test-prefix.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/build/test-suffix.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/array-set.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/base64-vlq.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/base64.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/binary-search.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/source-map-consumer.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/source-map-generator.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/source-node.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/lib/source-map/util.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/LICENSE delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/README.md delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/intercept.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/run-tests.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-api.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-array-set.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-base64-vlq.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-base64.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-binary-search.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-dog-fooding.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-source-map-consumer.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-source-map-generator.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/test-source-node.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/test/source-map/util.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/polyfill/Object.es6.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/src/__tests__/jstransform-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/src/__tests__/jstransform-utils-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/src/docblock.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/src/jstransform.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/src/utils.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-arrow-function-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-call-spread-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-class-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-destructuring-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-es7-object-integration-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-object-concise-method-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-object-short-notation-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-rest-param-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es6-template-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es7-rest-property-helpers-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/es7-spread-property-visitors-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/gen/generate-type-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/gen/type-syntax-test.rec.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/reserved-words-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-alias-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-class-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-function-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-interface-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-object-method-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-pattern-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/__tests__/type-variable-declaration-syntax-test.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-arrow-function-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-call-spread-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-class-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-destructuring-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-object-concise-method-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-object-short-notation-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-rest-param-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es6-template-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es7-rest-property-helpers.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/es7-spread-property-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/reserved-words-helper.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/reserved-words-visitors.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/jstransform/visitors/type-syntax.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/.travis.yml delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/LICENSE.APACHE2 delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/LICENSE.MIT delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/index.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/package.json delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/readme.markdown delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/test/async.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/test/auto-destroy.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/test/buffering.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/test/end.js delete mode 100755 node_modules/react/node_modules/envify/node_modules/through/test/index.js delete mode 100755 node_modules/react/node_modules/envify/package.json delete mode 100755 node_modules/react/node_modules/envify/visitors.js delete mode 100755 node_modules/react/package.json delete mode 100755 node_modules/react/react.js diff --git a/.gitignore b/.gitignore index e42edcd..af53e14 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /build-buffer +node_modules \ No newline at end of file diff --git a/build/app-bundle.js b/build/app-bundle.js index fe850c3..f972f30 100644 --- a/build/app-bundle.js +++ b/build/app-bundle.js @@ -40,6 +40,7 @@ var Conversation = require('./other/Conversation.js'); var Hashtag = require('./other/Hashtag.js'); var Settings = require('./other/Settings.js'); var Accounts = require('./other/Accounts.js'); +var Featured = require('./other/Featured.js'); var AppSettingsMixin = require('./common/AppSettingsMixin.js'); App = React.createClass({displayName: "App", @@ -227,6 +228,7 @@ App = React.createClass({displayName: "App", React.createElement(MenuItem, {href: "#/search"}, "Search"), React.createElement(MenuItem, {href: "#/settings"}, "Settings"), React.createElement(MenuItem, {href: "#/accounts"}, "Accounts"), + React.createElement(MenuItem, {href: "#/featured"}, "Featured"), React.createElement(MenuItem, {href: "#/howtofollow"}, "How to Follow"), React.createElement(MenuItem, {href: "#/trendinghashtags"}, "Trending Hashtags") ) @@ -263,6 +265,7 @@ var routes = ( React.createElement(Route, {name: "hashtag", path: "/hashtag/:hashtag", handler: Hashtag}), React.createElement(Route, {name: "settings", path: "/settings", handler: Settings}), React.createElement(Route, {name: "accounts", path: "/accounts", handler: Accounts}), + React.createElement(Route, {name: "featured", path: "/featured", handler: Featured}), React.createElement(DefaultRoute, {name: "home", handler: Home}) ) ); @@ -370,7 +373,7 @@ setInterval(function(){ },1000); -},{"./common/AppSettingsMixin.js":2,"./common/SafeStateChangeMixin.js":13,"./common/SetIntervalMixin.js":14,"./home/Home.js":16,"./other/Accounts.js":18,"./other/Conversation.js":19,"./other/Hashtag.js":20,"./other/Settings.js":22,"./profile/Followings.js":25,"./profile/Mentions.js":26,"./profile/Profile.js":27,"./profile/Timeline.js":28,"react":303,"react-bootstrap":80,"react-router":113}],2:[function(require,module,exports){ +},{"./common/AppSettingsMixin.js":2,"./common/SafeStateChangeMixin.js":14,"./common/SetIntervalMixin.js":15,"./home/Home.js":18,"./other/Accounts.js":20,"./other/Conversation.js":21,"./other/Featured.js":22,"./other/Hashtag.js":23,"./other/Settings.js":25,"./profile/Followings.js":28,"./profile/Mentions.js":29,"./profile/Profile.js":30,"./profile/Timeline.js":31,"react":511,"react-bootstrap":106,"react-router":306}],2:[function(require,module,exports){ module.exports = AppSettingsMixin = { getInitialState: function() { @@ -412,6 +415,352 @@ module.exports = AppSettingsMixin = { }; },{}],3:[function(require,module,exports){ +var React = require('react') +var ReactDOM = require('react-dom') +var classNames = require('classnames') +var escapeHTML = require('escape-html') +var isServer = typeof window === 'undefined' + +if (!isServer) { + var selectionRange = require('selection-range') +} + +var noop = function(){} + +/** + * Make a contenteditable element + */ + +var ContentEditable = React.createClass({displayName: "ContentEditable", + + propTypes: { + editing: React.PropTypes.bool, + html: React.PropTypes.string, + onChange: React.PropTypes.func.isRequired, + placeholder: React.PropTypes.bool, + placeholderText: React.PropTypes.string, + tagName: React.PropTypes.string, + onEnterKey: React.PropTypes.func, + onEscapeKey: React.PropTypes.func, + preventStyling: React.PropTypes.bool, + noLinebreaks: React.PropTypes.bool, + onBlur: React.PropTypes.func, + onFocus: React.PropTypes.func, + onBold: React.PropTypes.func, + onItalic: React.PropTypes.func, + onKeyDown: React.PropTypes.func, + onKeyPress: React.PropTypes.func, + placeholderStyle: React.PropTypes.object + }, + + getDefaultProps: function() { + return { + html: '', + placeholder: false, + placeholderText: '', + onBold: noop, + onItalic: noop, + onKeyDown: noop, + onKeyPress: noop + }; + }, + + getInitialState: function(){ + return {}; + }, + + shouldComponentUpdate: function(nextProps) { + var el = ReactDOM.findDOMNode(this) + if (nextProps.html !== el.innerHTML) { + if (nextProps.html && document.activeElement === el) { + this._range = selectionRange(el) + } + return true + } + + if (nextProps.placeholder !== this.props.placeholder) { + return true + } + + if (nextProps.editing !== this.props.editing) { + return true + } + + return false + }, + + componentWillReceiveProps: function (nextProps) { + if (!this.props.editing && nextProps.editing) { + if (this.contentIsEmpty(nextProps.html)) { + this.props.onChange('', true) + } + } + }, + + componentDidUpdate: function() { + if (!this.props.editing && !this.props.html) { + this.props.onChange('') + } + + if (this._range) { + selectionRange(ReactDOM.findDOMNode(this), this._range) + delete this._range + } + }, + + autofocus: function(){ + ReactDOM.findDOMNode(this).focus(); + }, + + render: function() { + + // todo: use destructuring + var editing = this.props.editing; + var className = this.props.className; + var tagName = this.props.tagName; + + // setup our classes + var classes = { + ContentEditable: true + }; + + var placeholderStyle = this.props.placeholderStyle || { + color: '#bbbbbb' + } + + if (className) { + classes[className] = true; + } + + // set 'div' as our default tagname + tagName = tagName || 'div'; + + var content = this.props.html; + + // return our newly created element + return React.createElement(tagName, { + tabIndex: 0, + key: '0', + className: classNames(classes), + contentEditable: editing, + onBlur: this.onBlur, + onFocus: this.onFocus, + onKeyDown: this.onKeyDown, + onPaste: this.onPaste, + onMouseDown: this.onMouseDown, + 'aria-label': this.props.placeholderText, + onTouchStart: this.onMouseDown, + style: this.props.placeholder ? placeholderStyle : this.props.style || {}, + onKeyPress: this.onKeyPress, + onInput: this.onInput, + onKeyUp: this.onKeyUp, + dangerouslySetInnerHTML: { + __html : this.props.placeholder ? this.props.placeholderText : content + } + }); + }, + + unsetPlaceholder: function(){ + this.props.onChange('', false, '') + }, + + setCursorToStart: function(){ + ReactDOM.findDOMNode(this).focus(); + var sel = window.getSelection(); + var range = document.createRange(); + range.setStart(ReactDOM.findDOMNode(this), 0); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + }, + + contentIsEmpty: function (content) { + + if (this.state.placeholder) { + return true + } + + if (!content) { + return true + } + + if (content === '
') { + return true + } + + if (!content.trim().length) { + return true + } + + return false + }, + + + onMouseDown: function(e) { + // prevent cursor placement if placeholder is set + if (this.contentIsEmpty(this.props.html)) { + this.setCursorToStart() + e.preventDefault() + } + }, + + onKeyDown: function(e) { + var self = this + this.props.onKeyDown(e) + + function prev () { + e.preventDefault(); + e.stopPropagation(); + self.stop = true + } + + var key = e.keyCode; + + // bold & italic styling + if (e.metaKey) { + + // bold + if (key === 66) { + this.props.onBold(e) + if (this.props.preventStyling) { + return prev() + } + + // italic + } else if (key === 73) { + this.props.onItalic(e) + if (this.props.preventStyling) { + return prev() + } + //paste + } else if (key === 86) { + return; + } + } + + // prevent linebreaks + if (this.props.noLinebreaks && (key === 13)) { + return prev() + } + + // placeholder behaviour + if (this.contentIsEmpty(this.props.html)) { // If no text + + if (e.metaKey || (e.shiftKey && (key === 16))) { + return prev() + } + + switch (key) { + case 46: // 'Delete' key + case 8: // 'Backspace' key + case 9: // 'Tab' key + case 39: // 'Arrow right' key + case 37: // 'Arrow left' key + case 40: // 'Arrow left' key + case 38: // 'Arrow left' key + prev(); + break; + + case 13: + // 'Enter' key + prev(); + if (this.props.onEnterKey) { + this.props.onEnterKey(); + } + break; + + case 27: + // 'Escape' key + prev(); + if (this.props.onEscapeKey) { + this.props.onEscapeKey(); + } + break; + + default: + this.unsetPlaceholder(); + break; + } + } + }, + + _replaceCurrentSelection: function(data) { + var selection = window.getSelection(); + var range = selection.getRangeAt(0); + range.deleteContents(); + var fragment = range.createContextualFragment(''); + fragment.textContent = data; + var replacementEnd = fragment.lastChild; + range.insertNode(fragment); + // Set cursor at the end of the replaced content, just like browsers do. + range.setStartAfter(replacementEnd); + range.collapse(true); + selection.removeAllRanges(); + selection.addRange(range); + }, + + onPaste: function(e){ + // handle paste manually to ensure we unset our placeholder + e.preventDefault(); + var data = e.clipboardData.getData('text/plain') + this._replaceCurrentSelection(data); + var target = ReactDOM.findDOMNode(this) + this.props.onChange(target.textContent, false, target.innerHTML) + }, + + onKeyPress: function(e){ + this.props.onKeyPress(e) + }, + + onKeyUp: function(e) { + if (this._supportsInput) return + if (this.stop) { + this.stop = false + return + } + + var target = ReactDOM.findDOMNode(this) + var self = this + + if (!target.textContent.trim().length) { + this.props.onChange('', true, '') + setTimeout(function(){ + self.setCursorToStart() + }, 1) + } else { + this.props.onChange(target.textContent, false, target.innerHTML) + } + + }, + + onInput: function(e) { + this._supportsInput = true + var val = e.target.innerHTML + var text = e.target.textContent.trim() + if (!text) { + this.props.onChange('', true, '') + return + } + + this.props.onChange(escapeHTML(e.target.textContent), false, e.target.innerHTML) + }, + + onBlur: function(e) { + if (this.props.onBlur) { + this.props.onBlur(e); + } + }, + + onFocus: function(e) { + if (this.props.onFocus) { + this.props.onFocus(e); + } + } + +}); + +module.exports = ContentEditable; +},{"classnames":33,"escape-html":34,"react":511,"react-dom":278,"selection-range":512}],4:[function(require,module,exports){ module.exports = EventListenerMixin = function (eventtype) { return { @@ -424,7 +773,7 @@ module.exports = EventListenerMixin = function (eventtype) { } } -},{}],4:[function(require,module,exports){ +},{}],5:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -505,7 +854,7 @@ module.exports = FollowButton = React.createClass({displayName: "FollowButton", ); } }); -},{"../common/SafeStateChangeMixin.js":13,"react":303,"react-bootstrap":80}],5:[function(require,module,exports){ +},{"../common/SafeStateChangeMixin.js":14,"react":511,"react-bootstrap":106}],6:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , Grid = ReactBootstrap.Grid @@ -548,7 +897,7 @@ module.exports = MiniProfile = React.createClass({displayName: "MiniProfile", ); } }); -},{"../common/ProfileMixin.js":10,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],6:[function(require,module,exports){ +},{"../common/ProfileMixin.js":11,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],7:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , Grid = ReactBootstrap.Grid @@ -789,7 +1138,7 @@ module.exports = Post = React.createClass({displayName: "Post",
*/ -},{"../common/EventListenerMixin.js":3,"../common/PostContent.js":7,"../common/ReplyModalButton.js":11,"../common/RetwistModalButton.js":12,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],7:[function(require,module,exports){ +},{"../common/EventListenerMixin.js":4,"../common/PostContent.js":8,"../common/ReplyModalButton.js":12,"../common/RetwistModalButton.js":13,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],8:[function(require,module,exports){ var React = require('react'); @@ -997,7 +1346,7 @@ module.exports = Post = React.createClass({displayName: "Post",
*/ -},{"react":303}],8:[function(require,module,exports){ +},{"react":511}],9:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , NavItem = ReactBootstrap.NavItem @@ -1044,7 +1393,7 @@ module.exports = Postboard = React.createClass({displayName: "Postboard", ); } }); -},{"../common/Post.js":6,"react-bootstrap":80,"react/addons":131}],9:[function(require,module,exports){ +},{"../common/Post.js":7,"react-bootstrap":106,"react/addons":337}],10:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , NavItem = ReactBootstrap.NavItem @@ -1091,7 +1440,7 @@ module.exports = ProfileBoard = React.createClass({displayName: "ProfileBoard", ); } }); -},{"../common/Post.js":6,"react-bootstrap":80,"react/addons":131}],10:[function(require,module,exports){ +},{"../common/Post.js":7,"react-bootstrap":106,"react/addons":337}],11:[function(require,module,exports){ var AppSettingsMixin = require('../common/AppSettingsMixin.js'); var EventListenerMixin = require('../common/EventListenerMixin.js'); @@ -1195,7 +1544,7 @@ module.exports = ProfileMixin = { } }; -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3}],11:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4}],12:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -1280,7 +1629,7 @@ module.exports = ReplyModalButton = React.createClass({displayName: "ReplyModalB } }); -},{"../common/PostContent.js":7,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],12:[function(require,module,exports){ +},{"../common/PostContent.js":8,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],13:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -1355,7 +1704,7 @@ module.exports = RetwistModalButton = React.createClass({displayName: "RetwistMo } }); -},{"../common/PostContent.js":7,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],13:[function(require,module,exports){ +},{"../common/PostContent.js":8,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],14:[function(require,module,exports){ function isValidLifeCycleForReplaceState(instance) { // See function validateLifeCycleOnReplaceState(instance) in // ReactCompositeComponent.js @@ -1418,7 +1767,7 @@ var safeStateChangeMixin = { }; module.exports = safeStateChangeMixin; -},{}],14:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ module.exports = SetIntervalMixin = { componentWillMount: function() { this.intervals = []; @@ -1434,7 +1783,7 @@ module.exports = SetIntervalMixin = { this.intervals.map(clearInterval); } }; -},{}],15:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ module.exports = StreamMixin = { addPost: function(post) { @@ -1477,7 +1826,53 @@ module.exports = StreamMixin = { } } -},{}],16:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ +var React = require('react'); +var ContentEditable = require('../common/ContentEditable.js'); + +module.exports = TwistComposer = React.createClass({ displayName: "TwistComposer", + + getInitialState: function () { + return { + html: 'default text', + placeholder: true, + editing: true + }; + }, + + render: function () { + return React.createElement("div", null, React.createElement(ContentEditable, { + tagName: "textarea", + onChange: this.onChange, + html: this.state.html, + preventStyling: true, + noLinebreaks: true, + placeholder: this.state.placeholder, + placeholderText: "Your Name", + editing: this.state.editing }), React.createElement("button", { onClick: this.enableEditing }, "Enable Editing")); + }, + + onChange: function (textContent, setPlaceholder) { + if (setPlaceholder) { + this.setState({ + placeholder: true, + html: '' + }); + } else { + this.setState({ + placeholder: false, + html: textContent + }); + } + }, + + enableEditing: function () { + // set your contenteditable field into editing mode. + this.setState({ editing: true }); + } + +}); +},{"../common/ContentEditable.js":3,"react":511}],18:[function(require,module,exports){ var React = require('react'); var Postboard = require("../common/Postboard.js"); var NewPostModalButton = require("../home/NewPostModalButton.js"); @@ -1667,7 +2062,7 @@ module.exports = Home = React.createClass({displayName: "Home", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/Postboard.js":8,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"../home/NewPostModalButton.js":17,"react":303,"react-bootstrap":80}],17:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/Postboard.js":9,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"../home/NewPostModalButton.js":19,"react":511,"react-bootstrap":106}],19:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -1681,6 +2076,7 @@ var React = require('react'); var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); +var TwistComposer = require("../common/TwistComposer.js"); module.exports = NewPostModalButton = React.createClass({displayName: "NewPostModalButton", mixins: [OverlayMixin], @@ -1731,6 +2127,8 @@ module.exports = NewPostModalButton = React.createClass({displayName: "NewPostMo if (!this.state.isModalOpen) { return React.createElement("span", null); } + /* + */ return ( React.createElement(Modal, {bsStyle: "primary", title: React.createElement(Glyphicon, {glyph: "pencil"}), onRequestHide: this.handleToggle}, @@ -1745,7 +2143,7 @@ module.exports = NewPostModalButton = React.createClass({displayName: "NewPostMo } }); -},{"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],18:[function(require,module,exports){ +},{"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/TwistComposer.js":17,"react":511,"react-bootstrap":106}],20:[function(require,module,exports){ var React = require('react'); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); @@ -1798,7 +2196,7 @@ module.exports = Accounts = React.createClass({displayName: "Accounts", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../other/ImportAccountModalButton.js":21,"react":303,"react-bootstrap":80}],19:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../other/ImportAccountModalButton.js":24,"react":511,"react-bootstrap":106}],21:[function(require,module,exports){ var React = require('react'); var Postboard = require("../common/Postboard.js"); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); @@ -1911,7 +2309,51 @@ module.exports = Conversation = React.createClass({displayName: "Conversation", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/Postboard.js":8,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"react":303,"react-bootstrap":80}],20:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/Postboard.js":9,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react":511,"react-bootstrap":106}],22:[function(require,module,exports){ + +var React = require('react/addons'); + +var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup; + +var MiniProfile = require("../common/MiniProfile.js"); +var ProfileBoard = require("../common/ProfileBoard.js"); +var SetIntervalMixin = require("../common/SetIntervalMixin.js"); +var StreamMixin = require("../common/StreamMixin.js"); +var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); +var EventListenerMixin = require('../common/EventListenerMixin.js'); +var AppSettingsMixin = require('../common/AppSettingsMixin.js'); + +var ReactBootstrap = require('react-bootstrap'), + NavItem = ReactBootstrap.NavItem, + Nav = ReactBootstrap.Nav, + ListGroup = ReactBootstrap.ListGroup, + ListGroupItem = ReactBootstrap.ListGroupItem, + Panel = ReactBootstrap.Panel, + Glyphicon = ReactBootstrap.Glyphicon, + Button = ReactBootstrap.Button; + +module.exports = Featured = React.createClass({ displayName: "Featured", + + mixins: [AppSettingsMixin, SetIntervalMixin, SafeStateChangeMixin], + contextTypes: { + router: React.PropTypes.func + }, + getInitialState: function () { + return { + usernames: ["twister", "mfreitas", "letstwist ", "newusers", "blockhash", "userstats", "calm_client", "theme_nin", "hn", "bbc_world", "intercept", "colossal", "rt_com", "lgbt", "soltempore", "fourtwenty", "torrentfreak_com", "schneier_sec", "smashingmag", "manliness", "meduza_en"] + }; + }, + render: function () { + + return React.createElement(ProfileBoard, { + header: React.createElement(ListGroupItem, null, "Featured"), + + loading: false, + data: this.state.usernames }); + } + +}); +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/MiniProfile.js":6,"../common/ProfileBoard.js":10,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react-bootstrap":106,"react/addons":337}],23:[function(require,module,exports){ var React = require('react'); var Postboard = require("../common/Postboard.js"); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); @@ -1992,7 +2434,7 @@ module.exports = Hashtag = React.createClass({displayName: "Hashtag", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/Postboard.js":8,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"react":303,"react-bootstrap":80}],21:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/Postboard.js":9,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react":511,"react-bootstrap":106}],24:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -2085,7 +2527,7 @@ module.exports = ImportAccountModalButton = React.createClass({displayName: "Imp } }); -},{"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],22:[function(require,module,exports){ +},{"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],25:[function(require,module,exports){ var React = require('react'); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); @@ -2159,7 +2601,7 @@ module.exports = Settings = React.createClass({displayName: "Settings", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../other/ImportAccountModalButton.js":21,"react":303,"react-bootstrap":80}],23:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../other/ImportAccountModalButton.js":24,"react":511,"react-bootstrap":106}],26:[function(require,module,exports){ @@ -2305,7 +2747,7 @@ module.exports = EditAvatarModalButton = React.createClass({displayName: "EditAv } }); -},{"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],24:[function(require,module,exports){ +},{"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],27:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , OverlayMixin = ReactBootstrap.OverlayMixin @@ -2430,7 +2872,7 @@ module.exports = EditProfileModalButton = React.createClass({displayName: "EditP } }); -},{"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"react":303,"react-bootstrap":80}],25:[function(require,module,exports){ +},{"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"react":511,"react-bootstrap":106}],28:[function(require,module,exports){ var React = require('react/addons'); @@ -2515,7 +2957,7 @@ module.exports = Followings = React.createClass({displayName: "Followings", } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/MiniProfile.js":5,"../common/ProfileBoard.js":9,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"react-bootstrap":80,"react/addons":131}],26:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/MiniProfile.js":6,"../common/ProfileBoard.js":10,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react-bootstrap":106,"react/addons":337}],29:[function(require,module,exports){ var React = require('react'); var MiniProfile = require("../common/MiniProfile.js"); var Postboard = require("../common/Postboard.js"); @@ -2571,7 +3013,7 @@ module.exports = Mentions = React.createClass({displayName: "Mentions", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/MiniProfile.js":5,"../common/Postboard.js":8,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"react":303}],27:[function(require,module,exports){ +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/MiniProfile.js":6,"../common/Postboard.js":9,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react":511}],30:[function(require,module,exports){ var ReactBootstrap = require('react-bootstrap') , Grid = ReactBootstrap.Grid @@ -2673,7 +3115,7 @@ module.exports = Post = React.createClass({displayName: "Post", ); } }); -},{"../common/FollowButton.js":4,"../common/ProfileMixin.js":10,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../profile/EditAvatarModalButton.js":23,"../profile/EditProfileModalButton.js":24,"react":303,"react-bootstrap":80,"react-router":113}],28:[function(require,module,exports){ +},{"../common/FollowButton.js":5,"../common/ProfileMixin.js":11,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../profile/EditAvatarModalButton.js":26,"../profile/EditProfileModalButton.js":27,"react":511,"react-bootstrap":106,"react-router":306}],31:[function(require,module,exports){ var React = require('react'); var Postboard = require("../common/Postboard.js"); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); @@ -2775,257 +3217,338 @@ module.exports = Timeline = React.createClass({displayName: "Timeline", ); } }); -},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/Postboard.js":8,"../common/SafeStateChangeMixin.js":13,"../common/SetIntervalMixin.js":14,"../common/StreamMixin.js":15,"react":303,"react-bootstrap":80}],29:[function(require,module,exports){ -"use strict"; - -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var React = _interopRequire(require("react")); - -var PanelGroup = _interopRequire(require("./PanelGroup")); - -var Accordion = React.createClass({ - displayName: "Accordion", - - render: function render() { - return React.createElement( - PanelGroup, - _extends({}, this.props, { accordion: true }), - this.props.children - ); - } -}); - -module.exports = Accordion; -},{"./PanelGroup":68,"react":303}],30:[function(require,module,exports){ -"use strict"; - -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":4,"../common/Postboard.js":9,"../common/SafeStateChangeMixin.js":14,"../common/SetIntervalMixin.js":15,"../common/StreamMixin.js":16,"react":511,"react-bootstrap":106}],32:[function(require,module,exports){ +// shim for using process in browser -var React = _interopRequire(require("react")); +var process = module.exports = {}; +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; -var classNames = _interopRequire(require("classnames")); +function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} -var AffixMixin = _interopRequire(require("./AffixMixin")); +function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; -var domUtils = _interopRequire(require("./utils/domUtils")); + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); +} -var Affix = React.createClass({ - displayName: "Affix", +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } +}; - statics: { - domUtils: domUtils - }, +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; - mixins: [AffixMixin], +function noop() {} - render: function render() { - var holderStyle = { top: this.state.affixPositionTop }; +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; - return React.createElement( - "div", - _extends({}, this.props, { - className: classNames(this.props.className, this.state.affixClass), - style: holderStyle }), - this.props.children - ); - } -}); +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; -module.exports = Affix; -},{"./AffixMixin":31,"./utils/domUtils":87,"classnames":88,"react":303}],31:[function(require,module,exports){ -"use strict"; +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +},{}],33:[function(require,module,exports){ +/*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ -var React = _interopRequire(require("react")); +(function () { + 'use strict'; -var domUtils = _interopRequire(require("./utils/domUtils")); + var hasOwn = {}.hasOwnProperty; -var EventListener = _interopRequire(require("./utils/EventListener")); + function classNames () { + var classes = []; -var AffixMixin = { - propTypes: { - offset: React.PropTypes.number, - offsetTop: React.PropTypes.number, - offsetBottom: React.PropTypes.number - }, + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; - getInitialState: function getInitialState() { - return { - affixClass: "affix-top" - }; - }, + var argType = typeof arg; - getPinnedOffset: function getPinnedOffset(DOMNode) { - if (this.pinnedOffset) { - return this.pinnedOffset; - } + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + classes.push(classNames.apply(null, arg)); + } else if (argType === 'object') { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } + } - DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, ""); - DOMNode.className += DOMNode.className.length ? " affix" : "affix"; + return classes.join(' '); + } - this.pinnedOffset = domUtils.getOffset(DOMNode).top - window.pageYOffset; + if (typeof module !== 'undefined' && module.exports) { + module.exports = classNames; + } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { + // register as 'classnames', consistent with npm package name + define('classnames', [], function () { + return classNames; + }); + } else { + window.classNames = classNames; + } +}()); - return this.pinnedOffset; - }, +},{}],34:[function(require,module,exports){ +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */ - checkPosition: function checkPosition() { - var DOMNode = undefined, - scrollHeight = undefined, - scrollTop = undefined, - position = undefined, - offsetTop = undefined, - offsetBottom = undefined, - affix = undefined, - affixType = undefined, - affixPositionTop = undefined; +'use strict'; - // TODO: or not visible - if (!this.isMounted()) { - return; - } +/** + * Module variables. + * @private + */ - DOMNode = React.findDOMNode(this); - scrollHeight = document.documentElement.offsetHeight; - scrollTop = window.pageYOffset; - position = domUtils.getOffset(DOMNode); +var matchHtmlRegExp = /["'&<>]/; - if (this.affixed === "top") { - position.top += scrollTop; - } +/** + * Module exports. + * @public + */ - offsetTop = this.props.offsetTop != null ? this.props.offsetTop : this.props.offset; - offsetBottom = this.props.offsetBottom != null ? this.props.offsetBottom : this.props.offset; +module.exports = escapeHtml; - if (offsetTop == null && offsetBottom == null) { - return; - } - if (offsetTop == null) { - offsetTop = 0; - } - if (offsetBottom == null) { - offsetBottom = 0; - } +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ - if (this.unpin != null && scrollTop + this.unpin <= position.top) { - affix = false; - } else if (offsetBottom != null && position.top + DOMNode.offsetHeight >= scrollHeight - offsetBottom) { - affix = "bottom"; - } else if (offsetTop != null && scrollTop <= offsetTop) { - affix = "top"; - } else { - affix = false; - } +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); - if (this.affixed === affix) { - return; + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: // " + escape = '"'; + break; + case 38: // & + escape = '&'; + break; + case 39: // ' + escape = '''; + break; + case 60: // < + escape = '<'; + break; + case 62: // > + escape = '>'; + break; + default: + continue; } - if (this.unpin != null) { - DOMNode.style.top = ""; + if (lastIndex !== index) { + html += str.substring(lastIndex, index); } - affixType = "affix" + (affix ? "-" + affix : ""); + lastIndex = index + 1; + html += escape; + } - this.affixed = affix; - this.unpin = affix === "bottom" ? this.getPinnedOffset(DOMNode) : null; + return lastIndex !== index + ? html + str.substring(lastIndex, index) + : html; +} - if (affix === "bottom") { - DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, "affix-bottom"); - affixPositionTop = scrollHeight - offsetBottom - DOMNode.offsetHeight - domUtils.getOffset(DOMNode).top; - } +},{}],35:[function(require,module,exports){ +'use strict'; - this.setState({ - affixClass: affixType, - affixPositionTop: affixPositionTop - }); - }, +var _extends = require('babel-runtime/helpers/extends')['default']; - checkPositionWithEventLoop: function checkPositionWithEventLoop() { - setTimeout(this.checkPosition, 0); - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - componentDidMount: function componentDidMount() { - this._onWindowScrollListener = EventListener.listen(window, "scroll", this.checkPosition); - this._onDocumentClickListener = EventListener.listen(domUtils.ownerDocument(this), "click", this.checkPositionWithEventLoop); - }, +exports.__esModule = true; - componentWillUnmount: function componentWillUnmount() { - if (this._onWindowScrollListener) { - this._onWindowScrollListener.remove(); - } +var _react = require('react'); - if (this._onDocumentClickListener) { - this._onDocumentClickListener.remove(); - } - }, +var _react2 = _interopRequireDefault(_react); - componentDidUpdate: function componentDidUpdate(prevProps, prevState) { - if (prevState.affixClass === this.state.affixClass) { - this.checkPositionWithEventLoop(); - } +var _PanelGroup = require('./PanelGroup'); + +var _PanelGroup2 = _interopRequireDefault(_PanelGroup); + +var Accordion = _react2['default'].createClass({ + displayName: 'Accordion', + + render: function render() { + return _react2['default'].createElement( + _PanelGroup2['default'], + _extends({}, this.props, { accordion: true }), + this.props.children + ); } -}; +}); -module.exports = AffixMixin; -},{"./utils/EventListener":82,"./utils/domUtils":87,"react":303}],32:[function(require,module,exports){ -"use strict"; +exports['default'] = Accordion; +module.exports = exports['default']; +},{"./PanelGroup":91,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"react":511}],36:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; -var React = _interopRequire(require("react")); +var _react = require('react'); -var classNames = _interopRequire(require("classnames")); +var _react2 = _interopRequireDefault(_react); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _classnames = require('classnames'); -var Alert = React.createClass({ - displayName: "Alert", +var _classnames2 = _interopRequireDefault(_classnames); - mixins: [BootstrapMixin], +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); + +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var _styleMaps = require('./styleMaps'); + +var Alert = _react2['default'].createClass({ + displayName: 'Alert', propTypes: { - onDismiss: React.PropTypes.func, - dismissAfter: React.PropTypes.number + onDismiss: _react2['default'].PropTypes.func, + dismissAfter: _react2['default'].PropTypes.number, + closeLabel: _react2['default'].PropTypes.string }, getDefaultProps: function getDefaultProps() { return { - bsClass: "alert", - bsStyle: "info" + closeLabel: 'Close Alert' }; }, renderDismissButton: function renderDismissButton() { - return React.createElement( - "button", + return _react2['default'].createElement( + 'button', { - type: "button", - className: "close", + type: 'button', + className: 'close', onClick: this.props.onDismiss, - "aria-hidden": "true" }, - "×" + 'aria-hidden': 'true', + tabIndex: '-1' }, + _react2['default'].createElement( + 'span', + null, + '×' + ) + ); + }, + + renderSrOnlyDismissButton: function renderSrOnlyDismissButton() { + return _react2['default'].createElement( + 'button', + { + type: 'button', + className: 'close sr-only', + onClick: this.props.onDismiss }, + this.props.closeLabel ); }, render: function render() { - var classes = this.getBsClassSet(); + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); var isDismissable = !!this.props.onDismiss; - classes["alert-dismissable"] = isDismissable; + classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'dismissable')] = isDismissable; - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { role: 'alert', className: _classnames2['default'](this.props.className, classes) }), isDismissable ? this.renderDismissButton() : null, - this.props.children + this.props.children, + isDismissable ? this.renderSrOnlyDismissButton() : null ); }, @@ -3040,168 +3563,336 @@ var Alert = React.createClass({ } }); -module.exports = Alert; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],33:[function(require,module,exports){ -"use strict"; +exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _styleMaps.State.INFO, _utilsBootstrapUtils.bsClass('alert', Alert)); +module.exports = exports['default']; +},{"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],37:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); + +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); + +var _classnames = require('classnames'); -var React = _interopRequire(require("react")); +var _classnames2 = _interopRequireDefault(_classnames); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); -var classNames = _interopRequire(require("classnames")); +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); -var Badge = React.createClass({ - displayName: "Badge", +var Badge = _react2['default'].createClass({ + displayName: 'Badge', propTypes: { - pullRight: React.PropTypes.bool + pullRight: _react2['default'].PropTypes.bool + }, + + getDefaultProps: function getDefaultProps() { + return { + pullRight: false, + bsClass: 'badge' + }; }, hasContent: function hasContent() { - return ValidComponentChildren.hasValidComponent(this.props.children) || typeof this.props.children === "string" || typeof this.props.children === "number"; + return _utilsValidComponentChildren2['default'].hasValidComponent(this.props.children) || _react2['default'].Children.count(this.props.children) > 1 || typeof this.props.children === 'string' || typeof this.props.children === 'number'; }, render: function render() { - var classes = { - "pull-right": this.props.pullRight, - badge: this.hasContent() - }; - return React.createElement( - "span", + var _classes; + + var classes = (_classes = { + 'pull-right': this.props.pullRight + }, _classes[_utilsBootstrapUtils2['default'].prefix(this.props)] = this.hasContent(), _classes); + return _react2['default'].createElement( + 'span', _extends({}, this.props, { - className: classNames(this.props.className, classes) }), + className: _classnames2['default'](this.props.className, classes) }), this.props.children ); } }); -module.exports = Badge; -},{"./utils/ValidComponentChildren":85,"classnames":88,"react":303}],34:[function(require,module,exports){ -"use strict"; +exports['default'] = Badge; +module.exports = exports['default']; +},{"./utils/ValidComponentChildren":110,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],38:[function(require,module,exports){ +'use strict'; + +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; + +var _extends = require('babel-runtime/helpers/extends')['default']; + +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _classnames = require('classnames'); -var React = _interopRequire(require("react")); +var _classnames2 = _interopRequireDefault(_classnames); -var constants = _interopRequire(require("./constants")); +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); + +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); + +var Breadcrumb = _react2['default'].createClass({ + displayName: 'Breadcrumb', -var BootstrapMixin = { propTypes: { - bsClass: React.PropTypes.oneOf(Object.keys(constants.CLASSES)), - bsStyle: React.PropTypes.oneOf(Object.keys(constants.STYLES)), - bsSize: React.PropTypes.oneOf(Object.keys(constants.SIZES)) + /** + * bootstrap className + * @private + */ + bsClass: _react2['default'].PropTypes.string }, - getBsClassSet: function getBsClassSet() { - var classes = {}; + getDefaultProps: function getDefaultProps() { + return { + bsClass: 'breadcrumb' + }; + }, - var bsClass = this.props.bsClass && constants.CLASSES[this.props.bsClass]; - if (bsClass) { - classes[bsClass] = true; + render: function render() { + var _props = this.props; + var className = _props.className; - var prefix = bsClass + "-"; + var props = _objectWithoutProperties(_props, ['className']); - var bsSize = this.props.bsSize && constants.SIZES[this.props.bsSize]; - if (bsSize) { - classes[prefix + bsSize] = true; - } + return _react2['default'].createElement( + 'ol', + _extends({}, props, { + role: 'navigation', + 'aria-label': 'breadcrumbs', + className: _classnames2['default'](className, this.props.bsClass) }), + _utilsValidComponentChildren2['default'].map(this.props.children, this.renderBreadcrumbItem) + ); + }, - var bsStyle = this.props.bsStyle && constants.STYLES[this.props.bsStyle]; - if (this.props.bsStyle) { - classes[prefix + bsStyle] = true; - } - } + renderBreadcrumbItem: function renderBreadcrumbItem(child, index) { + return _react.cloneElement(child, { key: child.key || index }); + } +}); - return classes; +exports['default'] = Breadcrumb; +module.exports = exports['default']; +},{"./utils/ValidComponentChildren":110,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"react":511}],39:[function(require,module,exports){ +'use strict'; + +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; + +var _extends = require('babel-runtime/helpers/extends')['default']; + +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _SafeAnchor = require('./SafeAnchor'); + +var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); + +var BreadcrumbItem = _react2['default'].createClass({ + displayName: 'BreadcrumbItem', + + propTypes: { + /** + * If set to true, renders `span` instead of `a` + */ + active: _react2['default'].PropTypes.bool, + /** + * HTML id for the wrapper `li` element + */ + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + /** + * HTML id for the inner `a` element + */ + linkId: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + /** + * `href` attribute for the inner `a` element + */ + href: _react2['default'].PropTypes.string, + /** + * `title` attribute for the inner `a` element + */ + title: _react2['default'].PropTypes.node, + /** + * `target` attribute for the inner `a` element + */ + target: _react2['default'].PropTypes.string + }, + + getDefaultProps: function getDefaultProps() { + return { + active: false + }; }, - prefixClass: function prefixClass(subClass) { - return constants.CLASSES[this.props.bsClass] + "-" + subClass; + render: function render() { + var _props = this.props; + var active = _props.active; + var className = _props.className; + var id = _props.id; + var linkId = _props.linkId; + var children = _props.children; + var href = _props.href; + var title = _props.title; + var target = _props.target; + + var props = _objectWithoutProperties(_props, ['active', 'className', 'id', 'linkId', 'children', 'href', 'title', 'target']); + + var linkProps = { + href: href, + title: title, + target: target, + id: linkId + }; + + return _react2['default'].createElement( + 'li', + { id: id, className: _classnames2['default'](className, { active: active }) }, + active ? _react2['default'].createElement( + 'span', + props, + children + ) : _react2['default'].createElement( + _SafeAnchor2['default'], + _extends({}, props, linkProps), + children + ) + ); } -}; +}); -module.exports = BootstrapMixin; -},{"./constants":79,"react":303}],35:[function(require,module,exports){ -"use strict"; +exports['default'] = BreadcrumbItem; +module.exports = exports['default']; +},{"./SafeAnchor":96,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"react":511}],40:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _classnames = require('classnames'); -var React = _interopRequire(require("react")); +var _classnames2 = _interopRequireDefault(_classnames); -var classNames = _interopRequire(require("classnames")); +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); -var Button = React.createClass({ - displayName: "Button", +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - mixins: [BootstrapMixin], +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var _styleMaps = require('./styleMaps'); + +var types = ['button', 'reset', 'submit']; + +var ButtonStyles = _styleMaps.State.values().concat(_styleMaps.DEFAULT, _styleMaps.PRIMARY, _styleMaps.LINK); + +var Button = _react2['default'].createClass({ + displayName: 'Button', propTypes: { - active: React.PropTypes.bool, - disabled: React.PropTypes.bool, - block: React.PropTypes.bool, - navItem: React.PropTypes.bool, - navDropdown: React.PropTypes.bool, - componentClass: React.PropTypes.node, - href: React.PropTypes.string, - target: React.PropTypes.string + active: _react2['default'].PropTypes.bool, + disabled: _react2['default'].PropTypes.bool, + block: _react2['default'].PropTypes.bool, + navItem: _react2['default'].PropTypes.bool, + navDropdown: _react2['default'].PropTypes.bool, + /** + * You can use a custom element for this component + */ + componentClass: _reactPropTypesLibElementType2['default'], + href: _react2['default'].PropTypes.string, + target: _react2['default'].PropTypes.string, + /** + * Defines HTML button type Attribute + * @type {("button"|"reset"|"submit")} + * @defaultValue 'button' + */ + type: _react2['default'].PropTypes.oneOf(types) }, getDefaultProps: function getDefaultProps() { return { - bsClass: "button", - bsStyle: "default", - type: "button" + active: false, + block: false, + disabled: false, + navItem: false, + navDropdown: false }; }, render: function render() { - var classes = this.props.navDropdown ? {} : this.getBsClassSet(); + var _extends2; + + var classes = this.props.navDropdown ? {} : _utilsBootstrapUtils2['default'].getClassSet(this.props); var renderFuncName = undefined; - classes = _extends({ - active: this.props.active, - "btn-block": this.props.block }, classes); + var blockClass = _utilsBootstrapUtils2['default'].prefix(this.props, 'block'); + + classes = _extends((_extends2 = { + active: this.props.active + }, _extends2[blockClass] = this.props.block, _extends2), classes); if (this.props.navItem) { return this.renderNavItem(classes); } - renderFuncName = this.props.href || this.props.target || this.props.navDropdown ? "renderAnchor" : "renderButton"; + renderFuncName = this.props.href || this.props.target || this.props.navDropdown ? 'renderAnchor' : 'renderButton'; return this[renderFuncName](classes); }, renderAnchor: function renderAnchor(classes) { - - var Component = this.props.componentClass || "a"; - var href = this.props.href || "#"; + var Component = this.props.componentClass || 'a'; + var href = this.props.href || '#'; classes.disabled = this.props.disabled; - return React.createElement( + return _react2['default'].createElement( Component, _extends({}, this.props, { href: href, - className: classNames(this.props.className, classes), - role: "button" }), + className: _classnames2['default'](this.props.className, classes), + role: 'button' }), this.props.children ); }, renderButton: function renderButton(classes) { - var Component = this.props.componentClass || "button"; + var Component = this.props.componentClass || 'button'; - return React.createElement( + return _react2['default'].createElement( Component, _extends({}, this.props, { - className: classNames(this.props.className, classes) }), + type: this.props.type || 'button', + className: _classnames2['default'](this.props.className, classes) }), this.props.children ); }, @@ -3211,144 +3902,295 @@ var Button = React.createClass({ active: this.props.active }; - return React.createElement( - "li", - { className: classNames(liClasses) }, + return _react2['default'].createElement( + 'li', + { className: _classnames2['default'](liClasses) }, this.renderAnchor(classes) ); } }); -module.exports = Button; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],36:[function(require,module,exports){ -"use strict"; +Button.types = types; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +exports['default'] = _utilsBootstrapUtils.bsStyles(ButtonStyles, _styleMaps.DEFAULT, _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL, _styleMaps.Sizes.XSMALL], _utilsBootstrapUtils.bsClass('btn', Button))); +module.exports = exports['default']; +},{"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-prop-types/lib/elementType":271}],41:[function(require,module,exports){ +'use strict'; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var React = _interopRequire(require("react")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var classNames = _interopRequire(require("classnames")); +exports.__esModule = true; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _react = require('react'); -var ButtonGroup = React.createClass({ - displayName: "ButtonGroup", +var _react2 = _interopRequireDefault(_react); - mixins: [BootstrapMixin], +var _classnames = require('classnames'); - propTypes: { - vertical: React.PropTypes.bool, - justified: React.PropTypes.bool - }, +var _classnames2 = _interopRequireDefault(_classnames); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "button-group" - }; - }, +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - render: function render() { - var classes = this.getBsClassSet(); - classes["btn-group"] = !this.props.vertical; - classes["btn-group-vertical"] = this.props.vertical; - classes["btn-group-justified"] = this.props.justified; +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - return React.createElement( - "div", - _extends({}, this.props, { - className: classNames(this.props.className, classes) }), +var _reactPropTypesLibAll = require('react-prop-types/lib/all'); + +var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); + +var _Button = require('./Button'); + +var _Button2 = _interopRequireDefault(_Button); + +var ButtonGroup = _react2['default'].createClass({ + displayName: 'ButtonGroup', + + propTypes: { + vertical: _react2['default'].PropTypes.bool, + justified: _react2['default'].PropTypes.bool, + /** + * Display block buttons, only useful when used with the "vertical" prop. + * @type {bool} + */ + block: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) { + if (props.block && !props.vertical) { + return new Error('The block property requires the vertical property to be set to have any effect'); + } + }) + }, + + getDefaultProps: function getDefaultProps() { + return { + block: false, + justified: false, + vertical: false + }; + }, + + render: function render() { + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); + + classes[_utilsBootstrapUtils2['default'].prefix(this.props)] = !this.props.vertical; + classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'vertical')] = this.props.vertical; + classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'justified')] = this.props.justified; + + // this is annoying, since the class is `btn-block` not `btn-group-block` + classes[_utilsBootstrapUtils2['default'].prefix(_Button2['default'].defaultProps, 'block')] = this.props.block; + + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, classes) }), this.props.children ); } }); -module.exports = ButtonGroup; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],37:[function(require,module,exports){ -"use strict"; +exports['default'] = _utilsBootstrapUtils.bsClass('btn-group', ButtonGroup); +module.exports = exports['default']; +},{"./Button":40,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-prop-types/lib/all":268}],42:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; + +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; + +var _extends = require('babel-runtime/helpers/extends')['default']; + +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _Button = require('./Button'); + +var _Button2 = _interopRequireDefault(_Button); + +var _FormGroup = require('./FormGroup'); + +var _FormGroup2 = _interopRequireDefault(_FormGroup); + +var _InputBase2 = require('./InputBase'); + +var _InputBase3 = _interopRequireDefault(_InputBase2); + +var _utilsChildrenValueInputValidation = require('./utils/childrenValueInputValidation'); + +var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation); + +var ButtonInput = (function (_InputBase) { + _inherits(ButtonInput, _InputBase); + + function ButtonInput() { + _classCallCheck(this, ButtonInput); + + _InputBase.apply(this, arguments); + } + + ButtonInput.prototype.renderFormGroup = function renderFormGroup(children) { + var _props = this.props; + var bsStyle = _props.bsStyle; + var value = _props.value; + + var other = _objectWithoutProperties(_props, ['bsStyle', 'value']); + + return _react2['default'].createElement( + _FormGroup2['default'], + other, + children + ); + }; + + ButtonInput.prototype.renderInput = function renderInput() { + var _props2 = this.props; + var children = _props2.children; + var value = _props2.value; + + var other = _objectWithoutProperties(_props2, ['children', 'value']); + + var val = children ? children : value; + return _react2['default'].createElement(_Button2['default'], _extends({}, other, { componentClass: 'input', ref: 'input', key: 'input', value: val })); + }; + + return ButtonInput; +})(_InputBase3['default']); + +ButtonInput.types = _Button2['default'].types; + +ButtonInput.defaultProps = { + type: 'button' +}; + +ButtonInput.propTypes = { + type: _react2['default'].PropTypes.oneOf(ButtonInput.types), + bsStyle: function bsStyle() { + // defer to Button propTypes of bsStyle + return null; + }, + children: _utilsChildrenValueInputValidation2['default'], + value: _utilsChildrenValueInputValidation2['default'] +}; + +exports['default'] = ButtonInput; +module.exports = exports['default']; +},{"./Button":40,"./FormGroup":56,"./InputBase":61,"./utils/childrenValueInputValidation":113,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"react":511}],43:[function(require,module,exports){ +'use strict'; -var React = _interopRequire(require("react")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var classNames = _interopRequire(require("classnames")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +exports.__esModule = true; -var ButtonToolbar = React.createClass({ - displayName: "ButtonToolbar", +var _react = require('react'); - mixins: [BootstrapMixin], +var _react2 = _interopRequireDefault(_react); + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); + +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); + +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var _Button = require('./Button'); + +var _Button2 = _interopRequireDefault(_Button); + +var ButtonToolbar = _react2['default'].createClass({ + displayName: 'ButtonToolbar', + + propTypes: { + bsSize: _Button2['default'].propTypes.bsSize + }, getDefaultProps: function getDefaultProps() { return { - bsClass: "button-toolbar" + bsClass: 'btn-toolbar' }; }, render: function render() { - var classes = this.getBsClassSet(); + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); - return React.createElement( - "div", + return _react2['default'].createElement( + 'div', _extends({}, this.props, { - role: "toolbar", - className: classNames(this.props.className, classes) }), + role: 'toolbar', + className: _classnames2['default'](this.props.className, classes) }), this.props.children ); } }); -module.exports = ButtonToolbar; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],38:[function(require,module,exports){ -"use strict"; +exports['default'] = ButtonToolbar; +module.exports = exports['default']; +},{"./Button":40,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],44:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); -var _react = require("react"); +var _classnames = require('classnames'); -var React = _interopRequire(_react); +var _classnames2 = _interopRequireDefault(_classnames); -var cloneElement = _react.cloneElement; +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); -var classNames = _interopRequire(require("classnames")); +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _Glyphicon = require('./Glyphicon'); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _Glyphicon2 = _interopRequireDefault(_Glyphicon); -var Carousel = React.createClass({ - displayName: "Carousel", +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - mixins: [BootstrapMixin], +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var Carousel = _react2['default'].createClass({ + displayName: 'Carousel', propTypes: { - slide: React.PropTypes.bool, - indicators: React.PropTypes.bool, - interval: React.PropTypes.number, - controls: React.PropTypes.bool, - pauseOnHover: React.PropTypes.bool, - wrap: React.PropTypes.bool, - onSelect: React.PropTypes.func, - onSlideEnd: React.PropTypes.func, - activeIndex: React.PropTypes.number, - defaultActiveIndex: React.PropTypes.number, - direction: React.PropTypes.oneOf(["prev", "next"]) + slide: _react2['default'].PropTypes.bool, + indicators: _react2['default'].PropTypes.bool, + interval: _react2['default'].PropTypes.number, + controls: _react2['default'].PropTypes.bool, + pauseOnHover: _react2['default'].PropTypes.bool, + wrap: _react2['default'].PropTypes.bool, + onSelect: _react2['default'].PropTypes.func, + onSlideEnd: _react2['default'].PropTypes.func, + activeIndex: _react2['default'].PropTypes.number, + defaultActiveIndex: _react2['default'].PropTypes.number, + direction: _react2['default'].PropTypes.oneOf(['prev', 'next']), + prevIcon: _react2['default'].PropTypes.node, + nextIcon: _react2['default'].PropTypes.node }, getDefaultProps: function getDefaultProps() { return { + bsClass: 'carousel', slide: true, interval: 5000, pauseOnHover: true, wrap: true, indicators: true, - controls: true + controls: true, + prevIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-left' }), + nextIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-right' }) }; }, @@ -3365,7 +4207,7 @@ var Carousel = React.createClass({ return null; } - return prevIndex > index ? "prev" : "next"; + return prevIndex > index ? 'prev' : 'next'; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { @@ -3394,7 +4236,7 @@ var Carousel = React.createClass({ } var index = this.getActiveIndex() + 1; - var count = ValidComponentChildren.numberOf(this.props.children); + var count = _utilsValidComponentChildren2['default'].numberOf(this.props.children); if (index > count - 1) { if (!this.props.wrap) { @@ -3403,7 +4245,7 @@ var Carousel = React.createClass({ index = 0; } - this.handleSelect(index, "next"); + this.handleSelect(index, 'next'); }, prev: function prev(e) { @@ -3417,10 +4259,10 @@ var Carousel = React.createClass({ if (!this.props.wrap) { return; } - index = ValidComponentChildren.numberOf(this.props.children) - 1; + index = _utilsValidComponentChildren2['default'].numberOf(this.props.children) - 1; } - this.handleSelect(index, "prev"); + this.handleSelect(index, 'prev'); }, pause: function pause() { @@ -3452,47 +4294,53 @@ var Carousel = React.createClass({ }, render: function render() { - var classes = { - carousel: true, - slide: this.props.slide - }; + var _classes; + + var classes = (_classes = {}, _classes[_utilsBootstrapUtils2['default'].prefix(this.props)] = true, _classes.slide = this.props.slide, _classes); - return React.createElement( - "div", + return _react2['default'].createElement( + 'div', _extends({}, this.props, { - className: classNames(this.props.className, classes), + className: _classnames2['default'](this.props.className, classes), onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }), this.props.indicators ? this.renderIndicators() : null, - React.createElement( - "div", - { className: "carousel-inner", ref: "inner" }, - ValidComponentChildren.map(this.props.children, this.renderItem) + _react2['default'].createElement( + 'div', + { + ref: 'inner', + className: _utilsBootstrapUtils2['default'].prefix(this.props, 'inner') + }, + _utilsValidComponentChildren2['default'].map(this.props.children, this.renderItem) ), this.props.controls ? this.renderControls() : null ); }, renderPrev: function renderPrev() { - return React.createElement( - "a", - { className: "left carousel-control", href: "#prev", key: 0, onClick: this.prev }, - React.createElement("span", { className: "glyphicon glyphicon-chevron-left" }) + var classes = 'left ' + _utilsBootstrapUtils2['default'].prefix(this.props, 'control'); + + return _react2['default'].createElement( + 'a', + { className: classes, href: '#prev', key: 0, onClick: this.prev }, + this.props.prevIcon ); }, renderNext: function renderNext() { - return React.createElement( - "a", - { className: "right carousel-control", href: "#next", key: 1, onClick: this.next }, - React.createElement("span", { className: "glyphicon glyphicon-chevron-right" }) + var classes = 'right ' + _utilsBootstrapUtils2['default'].prefix(this.props, 'control'); + + return _react2['default'].createElement( + 'a', + { className: classes, href: '#next', key: 1, onClick: this.next }, + this.props.nextIcon ); }, renderControls: function renderControls() { if (!this.props.wrap) { var activeIndex = this.getActiveIndex(); - var count = ValidComponentChildren.numberOf(this.props.children); + var count = _utilsValidComponentChildren2['default'].numberOf(this.props.children); return [activeIndex !== 0 ? this.renderPrev() : null, activeIndex !== count - 1 ? this.renderNext() : null]; } @@ -3501,27 +4349,29 @@ var Carousel = React.createClass({ }, renderIndicator: function renderIndicator(child, index) { - var className = index === this.getActiveIndex() ? "active" : null; + var className = index === this.getActiveIndex() ? 'active' : null; - return React.createElement("li", { + return _react2['default'].createElement('li', { key: index, className: className, onClick: this.handleSelect.bind(this, index, null) }); }, renderIndicators: function renderIndicators() { + var _this = this; + var indicators = []; - ValidComponentChildren.forEach(this.props.children, function (child, index) { - indicators.push(this.renderIndicator(child, index), + _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child, index) { + indicators.push(_this.renderIndicator(child, index), // Force whitespace between indicator elements, bootstrap // requires this for correct spacing of elements. - " "); + ' '); }, this); - return React.createElement( - "ol", - { className: "carousel-indicators" }, + return _react2['default'].createElement( + 'ol', + { className: _utilsBootstrapUtils2['default'].prefix(this.props, 'indicators') }, indicators ); }, @@ -3531,14 +4381,16 @@ var Carousel = React.createClass({ }, handleItemAnimateOutEnd: function handleItemAnimateOutEnd() { + var _this2 = this; + this.setState({ previousActiveIndex: null, direction: null }, function () { - this.waitForNext(); + _this2.waitForNext(); - if (this.props.onSlideEnd) { - this.props.onSlideEnd(); + if (_this2.props.onSlideEnd) { + _this2.props.onSlideEnd(); } }); }, @@ -3548,7 +4400,7 @@ var Carousel = React.createClass({ var isActive = index === activeIndex; var isPreviousActive = this.state.previousActiveIndex != null && this.state.previousActiveIndex === index && this.props.slide; - return cloneElement(child, { + return _react.cloneElement(child, { active: isActive, ref: child.ref, key: child.key ? child.key : index, @@ -3563,55 +4415,74 @@ var Carousel = React.createClass({ handleSelect: function handleSelect(index, direction) { clearTimeout(this.timeout); - var previousActiveIndex = this.getActiveIndex(); - direction = direction || this.getDirection(previousActiveIndex, index); - - if (this.props.onSelect) { - this.props.onSelect(index, direction); - } + if (this.isMounted()) { + var previousActiveIndex = this.getActiveIndex(); + direction = direction || this.getDirection(previousActiveIndex, index); - if (this.props.activeIndex == null && index !== previousActiveIndex) { - if (this.state.previousActiveIndex != null) { - // If currently animating don't activate the new index. - // TODO: look into queuing this canceled call and - // animating after the current animation has ended. - return; + if (this.props.onSelect) { + this.props.onSelect(index, direction); } - this.setState({ - activeIndex: index, - previousActiveIndex: previousActiveIndex, - direction: direction - }); + if (this.props.activeIndex == null && index !== previousActiveIndex) { + if (this.state.previousActiveIndex != null) { + // If currently animating don't activate the new index. + // TODO: look into queuing this canceled call and + // animating after the current animation has ended. + return; + } + + this.setState({ + activeIndex: index, + previousActiveIndex: previousActiveIndex, + direction: direction + }); + } } } }); -module.exports = Carousel; -},{"./BootstrapMixin":34,"./utils/ValidComponentChildren":85,"classnames":88,"react":303}],39:[function(require,module,exports){ -"use strict"; +exports['default'] = Carousel; +module.exports = exports['default']; +},{"./Glyphicon":57,"./utils/ValidComponentChildren":110,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],45:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); -var React = _interopRequire(require("react")); +var _reactDom = require('react-dom'); -var classNames = _interopRequire(require("classnames")); +var _reactDom2 = _interopRequireDefault(_reactDom); -var TransitionEvents = _interopRequire(require("./utils/TransitionEvents")); +var _utilsTransitionEvents = require('./utils/TransitionEvents'); -var CarouselItem = React.createClass({ - displayName: "CarouselItem", +var _utilsTransitionEvents2 = _interopRequireDefault(_utilsTransitionEvents); + +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); + +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var CarouselItem = _react2['default'].createClass({ + displayName: 'CarouselItem', propTypes: { - direction: React.PropTypes.oneOf(["prev", "next"]), - onAnimateOutEnd: React.PropTypes.func, - active: React.PropTypes.bool, - animateIn: React.PropTypes.bool, - animateOut: React.PropTypes.bool, - caption: React.PropTypes.node, - index: React.PropTypes.number + direction: _react2['default'].PropTypes.oneOf(['prev', 'next']), + onAnimateOutEnd: _react2['default'].PropTypes.func, + active: _react2['default'].PropTypes.bool, + animateIn: _react2['default'].PropTypes.bool, + animateOut: _react2['default'].PropTypes.bool, + caption: _react2['default'].PropTypes.node, + index: _react2['default'].PropTypes.number }, getInitialState: function getInitialState() { @@ -3622,7 +4493,10 @@ var CarouselItem = React.createClass({ getDefaultProps: function getDefaultProps() { return { - animation: true + bsStyle: 'carousel', + active: false, + animateIn: false, + animateOut: false }; }, @@ -3642,7 +4516,7 @@ var CarouselItem = React.createClass({ componentDidUpdate: function componentDidUpdate(prevProps) { if (!this.props.active && prevProps.active) { - TransitionEvents.addEndEventListener(React.findDOMNode(this), this.handleAnimateOutEnd); + _utilsTransitionEvents2['default'].addEndEventListener(_reactDom2['default'].findDOMNode(this), this.handleAnimateOutEnd); } if (this.props.active !== prevProps.active) { @@ -3656,7 +4530,7 @@ var CarouselItem = React.createClass({ } this.setState({ - direction: this.props.direction === "prev" ? "right" : "left" + direction: this.props.direction === 'prev' ? 'right' : 'left' }); }, @@ -3664,361 +4538,602 @@ var CarouselItem = React.createClass({ var classes = { item: true, active: this.props.active && !this.props.animateIn || this.props.animateOut, - next: this.props.active && this.props.animateIn && this.props.direction === "next", - prev: this.props.active && this.props.animateIn && this.props.direction === "prev" + next: this.props.active && this.props.animateIn && this.props.direction === 'next', + prev: this.props.active && this.props.animateIn && this.props.direction === 'prev' }; if (this.state.direction && (this.props.animateIn || this.props.animateOut)) { classes[this.state.direction] = true; } - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), this.props.children, this.props.caption ? this.renderCaption() : null ); }, renderCaption: function renderCaption() { - return React.createElement( - "div", - { className: "carousel-caption" }, + var classes = _utilsBootstrapUtils2['default'].prefix(this.props, 'caption'); + + return _react2['default'].createElement( + 'div', + { className: classes }, this.props.caption ); } }); -module.exports = CarouselItem; -},{"./utils/TransitionEvents":84,"classnames":88,"react":303}],40:[function(require,module,exports){ -"use strict"; +exports['default'] = CarouselItem; +module.exports = exports['default']; +},{"./utils/TransitionEvents":109,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-dom":278}],46:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _Object$keys = require('babel-runtime/core-js/object/keys')['default']; + +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; + +exports.__esModule = true; + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); -var React = _interopRequire(require("react")); +var _styleMaps = require('./styleMaps'); -var classNames = _interopRequire(require("classnames")); +var _styleMaps2 = _interopRequireDefault(_styleMaps); -var constants = _interopRequire(require("./constants")); +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); -var Col = React.createClass({ - displayName: "Col", +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); + +var Col = _react2['default'].createClass({ + displayName: 'Col', propTypes: { - xs: React.PropTypes.number, - sm: React.PropTypes.number, - md: React.PropTypes.number, - lg: React.PropTypes.number, - xsOffset: React.PropTypes.number, - smOffset: React.PropTypes.number, - mdOffset: React.PropTypes.number, - lgOffset: React.PropTypes.number, - xsPush: React.PropTypes.number, - smPush: React.PropTypes.number, - mdPush: React.PropTypes.number, - lgPush: React.PropTypes.number, - xsPull: React.PropTypes.number, - smPull: React.PropTypes.number, - mdPull: React.PropTypes.number, - lgPull: React.PropTypes.number, - componentClass: React.PropTypes.node.isRequired + /** + * The number of columns you wish to span + * + * for Extra small devices Phones (<768px) + * + * class-prefix `col-xs-` + */ + xs: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Small devices Tablets (≥768px) + * + * class-prefix `col-sm-` + */ + sm: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Medium devices Desktops (≥992px) + * + * class-prefix `col-md-` + */ + md: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Large devices Desktops (≥1200px) + * + * class-prefix `col-lg-` + */ + lg: _react2['default'].PropTypes.number, + /** + * Hide column + * + * on Extra small devices Phones + * + * adds class `hidden-xs` + */ + xsHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Small devices Tablets + * + * adds class `hidden-sm` + */ + smHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Medium devices Desktops + * + * adds class `hidden-md` + */ + mdHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Large devices Desktops + * + * adds class `hidden-lg` + */ + lgHidden: _react2['default'].PropTypes.bool, + /** + * Move columns to the right + * + * for Extra small devices Phones + * + * class-prefix `col-xs-offset-` + */ + xsOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Small devices Tablets + * + * class-prefix `col-sm-offset-` + */ + smOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Medium devices Desktops + * + * class-prefix `col-md-offset-` + */ + mdOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Large devices Desktops + * + * class-prefix `col-lg-offset-` + */ + lgOffset: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Extra small devices Phones + * + * class-prefix `col-xs-push-` + */ + xsPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Small devices Tablets + * + * class-prefix `col-sm-push-` + */ + smPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Medium devices Desktops + * + * class-prefix `col-md-push-` + */ + mdPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Large devices Desktops + * + * class-prefix `col-lg-push-` + */ + lgPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Extra small devices Phones + * + * class-prefix `col-xs-pull-` + */ + xsPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Small devices Tablets + * + * class-prefix `col-sm-pull-` + */ + smPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Medium devices Desktops + * + * class-prefix `col-md-pull-` + */ + mdPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Large devices Desktops + * + * class-prefix `col-lg-pull-` + */ + lgPull: _react2['default'].PropTypes.number, + /** + * You can use a custom element for this component + */ + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { return { - componentClass: "div" + componentClass: 'div' }; }, render: function render() { + var _this = this; + var ComponentClass = this.props.componentClass; var classes = {}; - Object.keys(constants.SIZES).forEach(function (key) { - var size = constants.SIZES[key]; + _Object$keys(_styleMaps2['default'].SIZES).forEach(function (key) { + var size = _styleMaps2['default'].SIZES[key]; var prop = size; - var classPart = size + "-"; + var classPart = size + '-'; - if (this.props[prop]) { - classes["col-" + classPart + this.props[prop]] = true; + if (_this.props[prop]) { + classes['col-' + classPart + _this.props[prop]] = true; } - prop = size + "Offset"; - classPart = size + "-offset-"; - if (this.props[prop] >= 0) { - classes["col-" + classPart + this.props[prop]] = true; + classes['hidden-' + size] = _this.props[size + 'Hidden']; + + prop = size + 'Offset'; + classPart = size + '-offset-'; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } - prop = size + "Push"; - classPart = size + "-push-"; - if (this.props[prop] >= 0) { - classes["col-" + classPart + this.props[prop]] = true; + prop = size + 'Push'; + classPart = size + '-push-'; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } - prop = size + "Pull"; - classPart = size + "-pull-"; - if (this.props[prop] >= 0) { - classes["col-" + classPart + this.props[prop]] = true; + prop = size + 'Pull'; + classPart = size + '-pull-'; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } }, this); - return React.createElement( + return _react2['default'].createElement( ComponentClass, - _extends({}, this.props, { className: classNames(this.props.className, classes) }), + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), this.props.children ); } }); -module.exports = Col; -},{"./constants":79,"classnames":88,"react":303}],41:[function(require,module,exports){ -"use strict"; +exports['default'] = Col; +module.exports = exports['default']; +},{"./styleMaps":107,"babel-runtime/core-js/object/keys":119,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-prop-types/lib/elementType":271}],47:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var React = _interopRequire(require("react")); +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var TransitionEvents = _interopRequire(require("react/lib/ReactTransitionEvents")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var CollapsableMixin = { +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - propTypes: { - defaultExpanded: React.PropTypes.bool, - expanded: React.PropTypes.bool - }, +exports.__esModule = true; - getInitialState: function getInitialState() { - var defaultExpanded = this.props.defaultExpanded != null ? this.props.defaultExpanded : this.props.expanded != null ? this.props.expanded : false; +var _domHelpersStyle = require('dom-helpers/style'); - return { - expanded: defaultExpanded, - collapsing: false - }; - }, +var _domHelpersStyle2 = _interopRequireDefault(_domHelpersStyle); - componentWillUpdate: function componentWillUpdate(nextProps, nextState) { - var willExpanded = nextProps.expanded != null ? nextProps.expanded : nextState.expanded; - if (willExpanded === this.isExpanded()) { - return; - } +var _react = require('react'); - // if the expanded state is being toggled, ensure node has a dimension value - // this is needed for the animation to work and needs to be set before - // the collapsing class is applied (after collapsing is applied the in class - // is removed and the node's dimension will be wrong) +var _react2 = _interopRequireDefault(_react); - var node = this.getCollapsableDOMNode(); - var dimension = this.dimension(); - var value = "0"; +var _classnames = require('classnames'); - if (!willExpanded) { - value = this.getCollapsableDimensionValue(); - } +var _classnames2 = _interopRequireDefault(_classnames); - node.style[dimension] = value + "px"; +var _reactOverlaysLibTransition = require('react-overlays/lib/Transition'); - this._afterWillUpdate(); - }, +var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition); - componentDidUpdate: function componentDidUpdate(prevProps, prevState) { - // check if expanded is being toggled; if so, set collapsing - this._checkToggleCollapsing(prevProps, prevState); +var _reactPropTypesLibDeprecated = require('react-prop-types/lib/deprecated'); - // check if collapsing was turned on; if so, start animation - this._checkStartAnimation(); - }, +var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); - // helps enable test stubs - _afterWillUpdate: function _afterWillUpdate() {}, +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); - _checkStartAnimation: function _checkStartAnimation() { - if (!this.state.collapsing) { - return; - } +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var node = this.getCollapsableDOMNode(); - var dimension = this.dimension(); - var value = this.getCollapsableDimensionValue(); +var capitalize = function capitalize(str) { + return str[0].toUpperCase() + str.substr(1); +}; - // setting the dimension here starts the transition animation - var result = undefined; - if (this.isExpanded()) { - result = value + "px"; - } else { - result = "0px"; - } - node.style[dimension] = result; - }, +// reading a dimension prop will cause the browser to recalculate, +// which will let our animations work +var triggerBrowserReflow = function triggerBrowserReflow(node) { + return node.offsetHeight; +}; - _checkToggleCollapsing: function _checkToggleCollapsing(prevProps, prevState) { - var wasExpanded = prevProps.expanded != null ? prevProps.expanded : prevState.expanded; - var isExpanded = this.isExpanded(); - if (wasExpanded !== isExpanded) { - if (wasExpanded) { - this._handleCollapse(); - } else { - this._handleExpand(); - } - } - }, +var MARGINS = { + height: ['marginTop', 'marginBottom'], + width: ['marginLeft', 'marginRight'] +}; - _handleExpand: function _handleExpand() { - var _this = this; +function getDimensionValue(dimension, elem) { + var value = elem['offset' + capitalize(dimension)]; + var margins = MARGINS[dimension]; + + return value + parseInt(_domHelpersStyle2['default'](elem, margins[0]), 10) + parseInt(_domHelpersStyle2['default'](elem, margins[1]), 10); +} + +var Collapse = (function (_React$Component) { + _inherits(Collapse, _React$Component); + + function Collapse(props, context) { + _classCallCheck(this, Collapse); + + _React$Component.call(this, props, context); + + this.onEnterListener = this.handleEnter.bind(this); + this.onEnteringListener = this.handleEntering.bind(this); + this.onEnteredListener = this.handleEntered.bind(this); + this.onExitListener = this.handleExit.bind(this); + this.onExitingListener = this.handleExiting.bind(this); + } + + // Explicitly copied from Transition for doc generation. + // TODO: Remove duplication once #977 is resolved. + + Collapse.prototype.render = function render() { + var enter = _utilsCreateChainedFunction2['default'](this.onEnterListener, this.props.onEnter); + var entering = _utilsCreateChainedFunction2['default'](this.onEnteringListener, this.props.onEntering); + var entered = _utilsCreateChainedFunction2['default'](this.onEnteredListener, this.props.onEntered); + var exit = _utilsCreateChainedFunction2['default'](this.onExitListener, this.props.onExit); + var exiting = _utilsCreateChainedFunction2['default'](this.onExitingListener, this.props.onExiting); + + return _react2['default'].createElement( + _reactOverlaysLibTransition2['default'], + _extends({ + ref: 'transition' + }, this.props, { + 'aria-expanded': this.props.role ? this.props['in'] : null, + className: _classnames2['default'](this.props.className, { width: this._dimension() === 'width' }), + exitedClassName: 'collapse', + exitingClassName: 'collapsing', + enteredClassName: 'collapse in', + enteringClassName: 'collapsing', + onEnter: enter, + onEntering: entering, + onEntered: entered, + onExit: exit, + onExiting: exiting, + onExited: this.props.onExited + }), + this.props.children + ); + }; - var node = this.getCollapsableDOMNode(); - var dimension = this.dimension(); + /* -- Expanding -- */ - var complete = function () { - _this._removeEndEventListener(node, complete); - // remove dimension value - this ensures the collapsable item can grow - // in dimension after initial display (such as an image loading) - node.style[dimension] = ""; - _this.setState({ - collapsing: false - }); - }; + Collapse.prototype.handleEnter = function handleEnter(elem) { + var dimension = this._dimension(); + elem.style[dimension] = '0'; + }; - this._addEndEventListener(node, complete); + Collapse.prototype.handleEntering = function handleEntering(elem) { + var dimension = this._dimension(); - this.setState({ - collapsing: true - }); - }, + elem.style[dimension] = this._getScrollDimensionValue(elem, dimension); + }; - _handleCollapse: function _handleCollapse() { - var _this = this; + Collapse.prototype.handleEntered = function handleEntered(elem) { + var dimension = this._dimension(); + elem.style[dimension] = null; + }; - var node = this.getCollapsableDOMNode(); + /* -- Collapsing -- */ - var complete = function () { - _this._removeEndEventListener(node, complete); - _this.setState({ - collapsing: false - }); - }; + Collapse.prototype.handleExit = function handleExit(elem) { + var dimension = this._dimension(); - this._addEndEventListener(node, complete); + elem.style[dimension] = this.props.getDimensionValue(dimension, elem) + 'px'; + }; - this.setState({ - collapsing: true - }); - }, + Collapse.prototype.handleExiting = function handleExiting(elem) { + var dimension = this._dimension(); - // helps enable test stubs - _addEndEventListener: function _addEndEventListener(node, complete) { - TransitionEvents.addEndEventListener(node, complete); - }, + triggerBrowserReflow(elem); + elem.style[dimension] = '0'; + }; - // helps enable test stubs - _removeEndEventListener: function _removeEndEventListener(node, complete) { - TransitionEvents.removeEndEventListener(node, complete); - }, + Collapse.prototype._dimension = function _dimension() { + return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension; + }; - dimension: function dimension() { - return typeof this.getCollapsableDimension === "function" ? this.getCollapsableDimension() : "height"; - }, + // for testing - isExpanded: function isExpanded() { - return this.props.expanded != null ? this.props.expanded : this.state.expanded; - }, + Collapse.prototype._getTransitionInstance = function _getTransitionInstance() { + return this.refs.transition; + }; - getCollapsableClassSet: function getCollapsableClassSet(className) { - var classes = {}; + Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) { + return elem['scroll' + capitalize(dimension)] + 'px'; + }; - if (typeof className === "string") { - className.split(" ").forEach(function (subClasses) { - if (subClasses) { - classes[subClasses] = true; - } - }); - } + return Collapse; +})(_react2['default'].Component); - classes.collapsing = this.state.collapsing; - classes.collapse = !this.state.collapsing; - classes["in"] = this.isExpanded() && !this.state.collapsing; +Collapse.propTypes = { + /** + * Show the component; triggers the expand or collapse animation + */ + 'in': _react2['default'].PropTypes.bool, - return classes; - } + /** + * Unmount the component (remove it from the DOM) when it is collapsed + */ + unmountOnExit: _react2['default'].PropTypes.bool, + + /** + * Run the expand animation when the component mounts, if it is initially + * shown + */ + transitionAppear: _react2['default'].PropTypes.bool, + + /** + * Duration of the collapse animation in milliseconds, to ensure that + * finishing callbacks are fired even if the original browser transition end + * events are canceled + */ + timeout: _react2['default'].PropTypes.number, + + /** + * duration + * @private + */ + duration: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.number, 'Use `timeout`.'), + + /** + * Callback fired before the component expands + */ + onEnter: _react2['default'].PropTypes.func, + /** + * Callback fired after the component starts to expand + */ + onEntering: _react2['default'].PropTypes.func, + /** + * Callback fired after the component has expanded + */ + onEntered: _react2['default'].PropTypes.func, + /** + * Callback fired before the component collapses + */ + onExit: _react2['default'].PropTypes.func, + /** + * Callback fired after the component starts to collapse + */ + onExiting: _react2['default'].PropTypes.func, + /** + * Callback fired after the component has collapsed + */ + onExited: _react2['default'].PropTypes.func, + + /** + * The dimension used when collapsing, or a function that returns the + * dimension + * + * _Note: Bootstrap only partially supports 'width'! + * You will need to supply your own CSS animation for the `.width` CSS class._ + */ + dimension: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.oneOf(['height', 'width']), _react2['default'].PropTypes.func]), + + /** + * Function that returns the height or width of the animating DOM node + * + * Allows for providing some custom logic for how much the Collapse component + * should animate in its specified dimension. Called with the current + * dimension prop value and the DOM node. + */ + getDimensionValue: _react2['default'].PropTypes.func, + + /** + * ARIA role of collapsible element + */ + role: _react2['default'].PropTypes.string }; -module.exports = CollapsableMixin; -},{"react":303,"react/lib/ReactTransitionEvents":227}],42:[function(require,module,exports){ -"use strict"; +Collapse.defaultProps = { + 'in': false, + timeout: 300, + unmountOnExit: false, + transitionAppear: false, -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + dimension: 'height', + getDimensionValue: getDimensionValue +}; -var _react = require("react"); +exports['default'] = Collapse; +module.exports = exports['default']; +},{"./utils/createChainedFunction":114,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"dom-helpers/style":169,"react":511,"react-overlays/lib/Transition":256,"react-prop-types/lib/deprecated":270}],48:[function(require,module,exports){ +'use strict'; -var React = _interopRequire(_react); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var cloneElement = _react.cloneElement; +exports.__esModule = true; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _react = require('react'); -var CollapsableMixin = _interopRequire(require("./CollapsableMixin")); +var _react2 = _interopRequireDefault(_react); -var classNames = _interopRequire(require("classnames")); +var _Collapse = require('./Collapse'); -var domUtils = _interopRequire(require("./utils/domUtils")); +var _Collapse2 = _interopRequireDefault(_Collapse); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _classnames = require('classnames'); -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _classnames2 = _interopRequireDefault(_classnames); -var CollapsableNav = React.createClass({ - displayName: "CollapsableNav", +var _utilsDeprecationWarning = require('./utils/deprecationWarning'); - mixins: [BootstrapMixin, CollapsableMixin], +var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - propTypes: { - onSelect: React.PropTypes.func, - activeHref: React.PropTypes.string, - activeKey: React.PropTypes.any, - collapsable: React.PropTypes.bool, - expanded: React.PropTypes.bool, - eventKey: React.PropTypes.any - }, +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); - getCollapsableDOMNode: function getCollapsableDOMNode() { - return this.getDOMNode(); - }, +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - getCollapsableDimensionValue: function getCollapsableDimensionValue() { - var height = 0; - var nodes = this.refs; - for (var key in nodes) { - if (nodes.hasOwnProperty(key)) { +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); - var n = nodes[key].getDOMNode(), - h = n.offsetHeight, - computedStyles = domUtils.getComputedStyles(n); +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - height += h + parseInt(computedStyles.marginTop, 10) + parseInt(computedStyles.marginBottom, 10); - } - } - return height; +var CollapsibleNav = _react2['default'].createClass({ + displayName: 'CollapsibleNav', + + propTypes: { + onSelect: _react2['default'].PropTypes.func, + activeHref: _react2['default'].PropTypes.string, + activeKey: _react2['default'].PropTypes.any, + collapsible: _react2['default'].PropTypes.bool, + expanded: _react2['default'].PropTypes.bool, + eventKey: _react2['default'].PropTypes.any + }, + + getDefaultProps: function getDefaultProps() { + return { + collapsible: false, + expanded: false + }; }, render: function render() { /* - * this.props.collapsable is set in NavBar when a eventKey is supplied. + * this.props.collapsible is set in NavBar when an eventKey is supplied. */ - var classes = this.props.collapsable ? this.getCollapsableClassSet() : {}; - /* - * prevent duplicating navbar-collapse call if passed as prop. kind of overkill... good cadidate to have check implemented as a util that can - * also be used elsewhere. - */ - if (this.props.className === undefined || this.props.className.split(" ").indexOf("navbar-collapse") === -2) { - classes["navbar-collapse"] = this.props.collapsable; - } + var classes = this.props.collapsible ? 'navbar-collapse' : null; + var renderChildren = this.props.collapsible ? this.renderCollapsibleNavChildren : this.renderChildren; - return React.createElement( - "div", - { eventKey: this.props.eventKey, className: classNames(this.props.className, classes) }, - ValidComponentChildren.map(this.props.children, this.props.collapsable ? this.renderCollapsableNavChildren : this.renderChildren) + var nav = _react2['default'].createElement( + 'div', + { eventKey: this.props.eventKey, className: _classnames2['default'](this.props.className, classes) }, + _utilsValidComponentChildren2['default'].map(this.props.children, renderChildren) ); + + if (this.props.collapsible) { + return _react2['default'].createElement( + _Collapse2['default'], + { 'in': this.props.expanded }, + nav + ); + } + return nav; }, getChildActiveProp: function getChildActiveProp(child) { @@ -4041,11663 +5156,8931 @@ var CollapsableNav = React.createClass({ renderChildren: function renderChildren(child, index) { var key = child.key ? child.key : index; - return cloneElement(child, { + return _react.cloneElement(child, { activeKey: this.props.activeKey, activeHref: this.props.activeHref, - ref: "nocollapse_" + key, + ref: 'nocollapse_' + key, key: key, navItem: true }); }, - renderCollapsableNavChildren: function renderCollapsableNavChildren(child, index) { + renderCollapsibleNavChildren: function renderCollapsibleNavChildren(child, index) { var key = child.key ? child.key : index; - return cloneElement(child, { + return _react.cloneElement(child, { active: this.getChildActiveProp(child), activeKey: this.props.activeKey, activeHref: this.props.activeHref, - onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), - ref: "collapsable_" + key, + onSelect: _utilsCreateChainedFunction2['default'](child.props.onSelect, this.props.onSelect), + ref: 'collapsible_' + key, key: key, navItem: true }); } }); -module.exports = CollapsableNav; -},{"./BootstrapMixin":34,"./CollapsableMixin":41,"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"./utils/domUtils":87,"classnames":88,"react":303}],43:[function(require,module,exports){ -"use strict"; +exports['default'] = _utilsDeprecationWarning2['default'].wrapper(CollapsibleNav, 'CollapsibleNav', 'Navbar.Collapse', 'http://react-bootstrap.github.io/components.html#navbars'); +module.exports = exports['default']; +},{"./Collapse":47,"./utils/ValidComponentChildren":110,"./utils/createChainedFunction":114,"./utils/deprecationWarning":116,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],49:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var _react = require("react"); +var _extends = require('babel-runtime/helpers/extends')['default']; -var React = _interopRequire(_react); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var cloneElement = _react.cloneElement; +exports.__esModule = true; -var classNames = _interopRequire(require("classnames")); +var _classnames = require('classnames'); -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _classnames2 = _interopRequireDefault(_classnames); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _domHelpersActiveElement = require('dom-helpers/activeElement'); -var DropdownStateMixin = _interopRequire(require("./DropdownStateMixin")); +var _domHelpersActiveElement2 = _interopRequireDefault(_domHelpersActiveElement); -var Button = _interopRequire(require("./Button")); +var _domHelpersQueryContains = require('dom-helpers/query/contains'); -var ButtonGroup = _interopRequire(require("./ButtonGroup")); +var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains); -var DropdownMenu = _interopRequire(require("./DropdownMenu")); +var _keycode = require('keycode'); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _keycode2 = _interopRequireDefault(_keycode); -var DropdownButton = React.createClass({ - displayName: "DropdownButton", +var _lodashCompatCollectionFind = require('lodash-compat/collection/find'); - mixins: [BootstrapMixin, DropdownStateMixin], +var _lodashCompatCollectionFind2 = _interopRequireDefault(_lodashCompatCollectionFind); - propTypes: { - pullRight: React.PropTypes.bool, - dropup: React.PropTypes.bool, - title: React.PropTypes.node, - href: React.PropTypes.string, - onClick: React.PropTypes.func, - onSelect: React.PropTypes.func, - navItem: React.PropTypes.bool, - noCaret: React.PropTypes.bool - }, +var _lodashCompatObjectOmit = require('lodash-compat/object/omit'); - render: function render() { - var renderMethod = this.props.navItem ? "renderNavItem" : "renderButtonGroup"; +var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit); - var caret = this.props.noCaret ? null : React.createElement("span", { className: "caret" }); +var _react = require('react'); - return this[renderMethod]([React.createElement( - Button, - _extends({}, this.props, { - ref: "dropdownButton", - className: "dropdown-toggle", - onClick: this.handleDropdownClick, - key: 0, - navDropdown: this.props.navItem, - navItem: null, - title: null, - pullRight: null, - dropup: null }), - this.props.title, - " ", - caret - ), React.createElement( - DropdownMenu, - { - ref: "menu", - "aria-labelledby": this.props.id, - pullRight: this.props.pullRight, - key: 1 }, - ValidComponentChildren.map(this.props.children, this.renderMenuItem) - )]); - }, - - renderButtonGroup: function renderButtonGroup(children) { - var groupClasses = { - open: this.state.open, - dropup: this.props.dropup - }; +var _react2 = _interopRequireDefault(_react); - return React.createElement( - ButtonGroup, - { - bsSize: this.props.bsSize, - className: classNames(this.props.className, groupClasses) }, - children - ); - }, +var _reactDom = require('react-dom'); - renderNavItem: function renderNavItem(children) { - var classes = { - dropdown: true, - open: this.state.open, - dropup: this.props.dropup - }; +var _reactDom2 = _interopRequireDefault(_reactDom); - return React.createElement( - "li", - { className: classNames(this.props.className, classes) }, - children - ); - }, +var _reactPropTypesLibAll = require('react-prop-types/lib/all'); - renderMenuItem: function renderMenuItem(child, index) { - // Only handle the option selection if an onSelect prop has been set on the - // component or it's child, this allows a user not to pass an onSelect - // handler and have the browser preform the default action. - var handleOptionSelect = this.props.onSelect || child.props.onSelect ? this.handleOptionSelect : null; +var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); - return cloneElement(child, { - // Capture onSelect events - onSelect: createChainedFunction(child.props.onSelect, handleOptionSelect), - key: child.key ? child.key : index - }); - }, +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); - handleDropdownClick: function handleDropdownClick(e) { - e.preventDefault(); +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - this.setDropdownState(!this.state.open); - }, +var _reactPropTypesLibIsRequiredForA11y = require('react-prop-types/lib/isRequiredForA11y'); - handleOptionSelect: function handleOptionSelect(key) { - if (this.props.onSelect) { - this.props.onSelect(key); - } +var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y); - this.setDropdownState(false); - } -}); +var _uncontrollable = require('uncontrollable'); -module.exports = DropdownButton; -},{"./BootstrapMixin":34,"./Button":35,"./ButtonGroup":36,"./DropdownMenu":44,"./DropdownStateMixin":45,"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"classnames":88,"react":303}],44:[function(require,module,exports){ -"use strict"; +var _uncontrollable2 = _interopRequireDefault(_uncontrollable); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); -var _react = require("react"); +var _ButtonGroup = require('./ButtonGroup'); -var React = _interopRequire(_react); +var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup); -var cloneElement = _react.cloneElement; +var _DropdownMenu = require('./DropdownMenu'); -var classNames = _interopRequire(require("classnames")); +var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu); -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _DropdownToggle = require('./DropdownToggle'); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle); -var DropdownMenu = React.createClass({ - displayName: "DropdownMenu", +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); - propTypes: { - pullRight: React.PropTypes.bool, - onSelect: React.PropTypes.func - }, +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - render: function render() { - var classes = { - "dropdown-menu": true, - "dropdown-menu-right": this.props.pullRight - }; +var _utilsCustomPropTypes = require('./utils/CustomPropTypes'); - return React.createElement( - "ul", - _extends({}, this.props, { - className: classNames(this.props.className, classes), - role: "menu" }), - ValidComponentChildren.map(this.props.children, this.renderMenuItem) - ); - }, +var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); - renderMenuItem: function renderMenuItem(child, index) { - return cloneElement(child, { - // Capture onSelect events - onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); - // Force special props to be transferred - key: child.key ? child.key : index - }); - } -}); +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); -module.exports = DropdownMenu; -},{"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"classnames":88,"react":303}],45:[function(require,module,exports){ -"use strict"; +var TOGGLE_REF = 'toggle-btn'; +var TOGGLE_ROLE = _DropdownToggle2['default'].defaultProps.bsRole; +var MENU_ROLE = _DropdownMenu2['default'].defaultProps.bsRole; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var Dropdown = (function (_React$Component) { + _inherits(Dropdown, _React$Component); -var React = _interopRequire(require("react")); + function Dropdown(props) { + _classCallCheck(this, Dropdown); -var domUtils = _interopRequire(require("./utils/domUtils")); + _React$Component.call(this, props); -var EventListener = _interopRequire(require("./utils/EventListener")); + this.Toggle = _DropdownToggle2['default']; -/** - * Checks whether a node is within - * a root nodes tree - * - * @param {DOMElement} node - * @param {DOMElement} root - * @returns {boolean} - */ -function isNodeInRoot(node, root) { - while (node) { - if (node === root) { - return true; - } - node = node.parentNode; - } + this.toggleOpen = this.toggleOpen.bind(this); + this.handleClick = this.handleClick.bind(this); + this.handleKeyDown = this.handleKeyDown.bind(this); + this.handleClose = this.handleClose.bind(this); + this.extractChildren = this.extractChildren.bind(this); - return false; -} + this.refineMenu = this.refineMenu.bind(this); + this.refineToggle = this.refineToggle.bind(this); -var DropdownStateMixin = { - getInitialState: function getInitialState() { - return { - open: false - }; - }, + this.childExtractors = [{ + key: 'toggle', + matches: function matches(child) { + return child.props.bsRole === TOGGLE_ROLE; + }, + refine: this.refineToggle + }, { + key: 'menu', + exclusive: true, + matches: function matches(child) { + return child.props.bsRole === MENU_ROLE; + }, + refine: this.refineMenu + }]; - setDropdownState: function setDropdownState(newState, onStateChangeComplete) { - if (newState) { - this.bindRootCloseHandlers(); - } else { - this.unbindRootCloseHandlers(); - } + this.state = {}; - this.setState({ - open: newState - }, onStateChangeComplete); - }, + this.lastOpenEventType = null; + } - handleDocumentKeyUp: function handleDocumentKeyUp(e) { - if (e.keyCode === 27) { - this.setDropdownState(false); - } - }, + Dropdown.prototype.componentDidMount = function componentDidMount() { + this.focusNextOnOpen(); + }; - handleDocumentClick: function handleDocumentClick(e) { - // If the click originated from within this component - // don't do anything. - if (isNodeInRoot(e.target, React.findDOMNode(this))) { - return; + Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) { + if (!nextProps.open && this.props.open) { + this._focusInDropdown = _domHelpersQueryContains2['default'](_reactDom2['default'].findDOMNode(this.refs.menu), _domHelpersActiveElement2['default'](document)); } + }; - this.setDropdownState(false); - }, - - bindRootCloseHandlers: function bindRootCloseHandlers() { - var doc = domUtils.ownerDocument(this); - - this._onDocumentClickListener = EventListener.listen(doc, "click", this.handleDocumentClick); - this._onDocumentKeyupListener = EventListener.listen(doc, "keyup", this.handleDocumentKeyUp); - }, - - unbindRootCloseHandlers: function unbindRootCloseHandlers() { - if (this._onDocumentClickListener) { - this._onDocumentClickListener.remove(); + Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { + if (this.props.open && !prevProps.open) { + this.focusNextOnOpen(); } - if (this._onDocumentKeyupListener) { - this._onDocumentKeyupListener.remove(); + if (!this.props.open && prevProps.open) { + // if focus hasn't already moved from the menu lets return it + // to the toggle + if (this._focusInDropdown) { + this._focusInDropdown = false; + this.focus(); + } } - }, + }; - componentWillUnmount: function componentWillUnmount() { - this.unbindRootCloseHandlers(); - } -}; + Dropdown.prototype.render = function render() { + var _rootClasses; -module.exports = DropdownStateMixin; -},{"./utils/EventListener":82,"./utils/domUtils":87,"react":303}],46:[function(require,module,exports){ -"use strict"; + var children = this.extractChildren(); + var Component = this.props.componentClass; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + var props = _lodashCompatObjectOmit2['default'](this.props, ['id', 'bsClass', 'role']); + var className = _utilsBootstrapUtils2['default'].prefix(this.props); -var React = _interopRequire(require("react")); + var rootClasses = (_rootClasses = { + open: this.props.open, + disabled: this.props.disabled + }, _rootClasses[className] = !this.props.dropup, _rootClasses.dropup = this.props.dropup, _rootClasses); -var domUtils = _interopRequire(require("./utils/domUtils")); + return _react2['default'].createElement( + Component, + _extends({}, props, { + tabIndex: '-1', + className: _classnames2['default'](this.props.className, rootClasses) + }), + children + ); + }; -// TODO: listen for onTransitionEnd to remove el -function getElementsAndSelf(root, classes) { - var els = root.querySelectorAll("." + classes.join(".")); + Dropdown.prototype.toggleOpen = function toggleOpen() { + var eventType = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; - els = [].map.call(els, function (e) { - return e; - }); + var open = !this.props.open; - for (var i = 0; i < classes.length; i++) { - if (!root.className.match(new RegExp("\\b" + classes[i] + "\\b"))) { - return els; + if (open) { + this.lastOpenEventType = eventType; } - } - els.unshift(root); - return els; -} - -module.exports = { - _fadeIn: function _fadeIn() { - var els = undefined; - - if (this.isMounted()) { - els = getElementsAndSelf(React.findDOMNode(this), ["fade"]); - if (els.length) { - els.forEach(function (el) { - el.className += " in"; - }); - } + if (this.props.onToggle) { + this.props.onToggle(open); } - }, - - _fadeOut: function _fadeOut() { - var els = getElementsAndSelf(this._fadeOutEl, ["fade", "in"]); + }; - if (els.length) { - els.forEach(function (el) { - el.className = el.className.replace(/\bin\b/, ""); - }); + Dropdown.prototype.handleClick = function handleClick() { + if (this.props.disabled) { + return; } - setTimeout(this._handleFadeOutEnd, 300); - }, + this.toggleOpen('click'); + }; - _handleFadeOutEnd: function _handleFadeOutEnd() { - if (this._fadeOutEl && this._fadeOutEl.parentNode) { - this._fadeOutEl.parentNode.removeChild(this._fadeOutEl); + Dropdown.prototype.handleKeyDown = function handleKeyDown(event) { + if (this.props.disabled) { + return; } - }, - componentDidMount: function componentDidMount() { - if (document.querySelectorAll) { - // Firefox needs delay for transition to be triggered - setTimeout(this._fadeIn, 20); + switch (event.keyCode) { + case _keycode2['default'].codes.down: + if (!this.props.open) { + this.toggleOpen('keydown'); + } else if (this.refs.menu.focusNext) { + this.refs.menu.focusNext(); + } + event.preventDefault(); + break; + case _keycode2['default'].codes.esc: + case _keycode2['default'].codes.tab: + this.handleClose(event); + break; + default: } - }, - - componentWillUnmount: function componentWillUnmount() { - var els = getElementsAndSelf(React.findDOMNode(this), ["fade"]), - container = this.props.container && React.findDOMNode(this.props.container) || domUtils.ownerDocument(this).body; + }; - if (els.length) { - this._fadeOutEl = document.createElement("div"); - container.appendChild(this._fadeOutEl); - this._fadeOutEl.appendChild(React.findDOMNode(this).cloneNode(true)); - // Firefox needs delay for transition to be triggered - setTimeout(this._fadeOut, 20); + Dropdown.prototype.handleClose = function handleClose() { + if (!this.props.open) { + return; } - } -}; -},{"./utils/domUtils":87,"react":303}],47:[function(require,module,exports){ -"use strict"; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + this.toggleOpen(); + }; -var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() { + var menu = this.refs.menu; -var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + if (!menu.focusNext) { + return; + } -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') { + menu.focusNext(); + } + }; -var React = _interopRequire(require("react")); + Dropdown.prototype.focus = function focus() { + var toggle = _reactDom2['default'].findDOMNode(this.refs[TOGGLE_REF]); -var classNames = _interopRequire(require("classnames")); + if (toggle && toggle.focus) { + toggle.focus(); + } + }; -var FormGroup = (function (_React$Component) { - function FormGroup() { - _classCallCheck(this, FormGroup); + Dropdown.prototype.extractChildren = function extractChildren() { + var _this = this; - if (_React$Component != null) { - _React$Component.apply(this, arguments); - } - } + var open = !!this.props.open; + var seen = {}; - _inherits(FormGroup, _React$Component); + return _utilsValidComponentChildren2['default'].map(this.props.children, function (child) { + var extractor = _lodashCompatCollectionFind2['default'](_this.childExtractors, function (x) { + return x.matches(child); + }); - _createClass(FormGroup, { - render: { - value: function render() { - var classes = { - "form-group": !this.props.standalone, - "has-feedback": this.props.hasFeedback, - "has-success": this.props.bsStyle === "success", - "has-warning": this.props.bsStyle === "warning", - "has-error": this.props.bsStyle === "error" - }; + if (extractor) { + if (seen[extractor.key]) { + return false; + } - return React.createElement( - "div", - { className: classNames(classes, this.props.groupClassName) }, - this.props.children - ); + seen[extractor.key] = extractor.exclusive; + child = extractor.refine(child, open); } - } - }); - return FormGroup; -})(React.Component); + return child; + }); + }; -FormGroup.defaultProps = { - standalone: false -}; + Dropdown.prototype.refineMenu = function refineMenu(menu, open) { + var menuProps = { + ref: 'menu', + open: open, + labelledBy: this.props.id, + pullRight: this.props.pullRight, + bsClass: this.props.bsClass + }; -FormGroup.propTypes = { - standalone: React.PropTypes.bool, - hasFeedback: React.PropTypes.bool, - bsStyle: React.PropTypes.oneOf(["success", "warning", "error"]), - groupClassName: React.PropTypes.string -}; + menuProps.onClose = _utilsCreateChainedFunction2['default'](menu.props.onClose, this.props.onClose, this.handleClose); -module.exports = FormGroup; -},{"classnames":88,"react":303}],48:[function(require,module,exports){ -"use strict"; + menuProps.onSelect = _utilsCreateChainedFunction2['default'](menu.props.onSelect, this.props.onSelect, this.handleClose); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + return _react.cloneElement(menu, menuProps, menu.props.children); + }; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + Dropdown.prototype.refineToggle = function refineToggle(toggle, open) { + var toggleProps = { + open: open, + id: this.props.id, + ref: TOGGLE_REF, + role: this.props.role + }; -var React = _interopRequire(require("react")); + toggleProps.onClick = _utilsCreateChainedFunction2['default'](toggle.props.onClick, this.handleClick); -var classNames = _interopRequire(require("classnames")); + toggleProps.onKeyDown = _utilsCreateChainedFunction2['default'](toggle.props.onKeyDown, this.handleKeyDown); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + return _react.cloneElement(toggle, toggleProps, toggle.props.children); + }; -var constants = _interopRequire(require("./constants")); + return Dropdown; +})(_react2['default'].Component); -var Glyphicon = React.createClass({ - displayName: "Glyphicon", +Dropdown.Toggle = _DropdownToggle2['default']; - mixins: [BootstrapMixin], +Dropdown.TOGGLE_REF = TOGGLE_REF; +Dropdown.TOGGLE_ROLE = TOGGLE_ROLE; +Dropdown.MENU_ROLE = MENU_ROLE; - propTypes: { - glyph: React.PropTypes.oneOf(constants.GLYPHS).isRequired - }, +Dropdown.defaultProps = { + componentClass: _ButtonGroup2['default'], + bsClass: 'dropdown' +}; - getDefaultProps: function getDefaultProps() { - return { - bsClass: "glyphicon" - }; - }, +Dropdown.propTypes = { - render: function render() { - var classes = this.getBsClassSet(); + bsClass: _react2['default'].PropTypes.string, - classes["glyphicon-" + this.props.glyph] = true; + /** + * The menu will open above the dropdown button, instead of below it. + */ + dropup: _react2['default'].PropTypes.bool, - return React.createElement( - "span", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.props.children - ); - } -}); + /** + * An html id attribute, necessary for assistive technologies, such as screen readers. + * @type {string|number} + * @required + */ + id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), -module.exports = Glyphicon; -},{"./BootstrapMixin":34,"./constants":79,"classnames":88,"react":303}],49:[function(require,module,exports){ -"use strict"; + componentClass: _reactPropTypesLibElementType2['default'], -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + /** + * The children of a Dropdown may be a `` or a ``. + * @type {node} + */ + children: _reactPropTypesLibAll2['default'](_utilsCustomPropTypes2['default'].requiredRoles(TOGGLE_ROLE, MENU_ROLE), _utilsCustomPropTypes2['default'].exclusiveRoles(MENU_ROLE)), -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + /** + * Whether or not component is disabled. + */ + disabled: _react2['default'].PropTypes.bool, -var React = _interopRequire(require("react")); + /** + * Align the menu to the right side of the Dropdown toggle + */ + pullRight: _react2['default'].PropTypes.bool, -var classNames = _interopRequire(require("classnames")); + /** + * Whether or not the Dropdown is visible. + * + * @controllable onToggle + */ + open: _react2['default'].PropTypes.bool, -var Grid = React.createClass({ - displayName: "Grid", + /** + * A callback fired when the Dropdown closes. + */ + onClose: _react2['default'].PropTypes.func, - propTypes: { - fluid: React.PropTypes.bool, - componentClass: React.PropTypes.node.isRequired - }, + /** + * A callback fired when the Dropdown wishes to change visibility. Called with the requested + * `open` value. + * + * ```js + * function(Boolean isOpen) {} + * ``` + * @controllable open + */ + onToggle: _react2['default'].PropTypes.func, - getDefaultProps: function getDefaultProps() { - return { - componentClass: "div" - }; - }, + /** + * A callback fired when a menu item is selected. + * + * ```js + * function(Object event, Any eventKey) + * ``` + */ + onSelect: _react2['default'].PropTypes.func, - render: function render() { - var ComponentClass = this.props.componentClass; - var className = this.props.fluid ? "container-fluid" : "container"; + /** + * If `'menuitem'`, causes the dropdown to behave like a menu item rather than + * a menu button. + */ + role: _react2['default'].PropTypes.string +}; - return React.createElement( - ComponentClass, - _extends({}, this.props, { - className: classNames(this.props.className, className) }), - this.props.children - ); - } -}); +Dropdown = _uncontrollable2['default'](Dropdown, { open: 'onToggle' }); -module.exports = Grid; -},{"classnames":88,"react":303}],50:[function(require,module,exports){ -"use strict"; +Dropdown.Toggle = _DropdownToggle2['default']; +Dropdown.Menu = _DropdownMenu2['default']; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +exports['default'] = Dropdown; +module.exports = exports['default']; +},{"./ButtonGroup":41,"./DropdownMenu":51,"./DropdownToggle":52,"./utils/CustomPropTypes":108,"./utils/ValidComponentChildren":110,"./utils/bootstrapUtils":111,"./utils/createChainedFunction":114,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"dom-helpers/activeElement":150,"dom-helpers/query/contains":160,"keycode":180,"lodash-compat/collection/find":182,"lodash-compat/object/omit":244,"react":511,"react-dom":278,"react-prop-types/lib/all":268,"react-prop-types/lib/elementType":271,"react-prop-types/lib/isRequiredForA11y":272,"uncontrollable":275}],50:[function(require,module,exports){ +'use strict'; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var React = _interopRequire(require("react")); +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var classNames = _interopRequire(require("classnames")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var Button = _interopRequire(require("./Button")); +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; -var FormGroup = _interopRequire(require("./FormGroup")); +var _Object$keys = require('babel-runtime/core-js/object/keys')['default']; -var Input = React.createClass({ - displayName: "Input", +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - propTypes: { - type: React.PropTypes.string, - label: React.PropTypes.node, - help: React.PropTypes.node, - addonBefore: React.PropTypes.node, - addonAfter: React.PropTypes.node, - buttonBefore: React.PropTypes.node, - buttonAfter: React.PropTypes.node, - bsSize: React.PropTypes.oneOf(["small", "medium", "large"]), - bsStyle: function bsStyle(props) { - if (props.type === "submit") { - // Return early if `type=submit` as the `Button` component - // it transfers these props to has its own propType checks. - return null; - } +exports.__esModule = true; - return React.PropTypes.oneOf(["success", "warning", "error"]).apply(null, arguments); - }, - hasFeedback: React.PropTypes.bool, - id: React.PropTypes.string, - groupClassName: React.PropTypes.string, - wrapperClassName: React.PropTypes.string, - labelClassName: React.PropTypes.string, - multiple: React.PropTypes.bool, - disabled: React.PropTypes.bool, - value: React.PropTypes.any - }, +var _react = require('react'); - getInputDOMNode: function getInputDOMNode() { - return React.findDOMNode(this.refs.input); - }, +var _react2 = _interopRequireDefault(_react); - getValue: function getValue() { - if (this.props.type === "static") { - return this.props.value; - } else if (this.props.type) { - if (this.props.type === "select" && this.props.multiple) { - return this.getSelectedOptions(); - } else { - return this.getInputDOMNode().value; - } - } else { - throw "Cannot use getValue without specifying input type."; - } - }, +var _Dropdown = require('./Dropdown'); - getChecked: function getChecked() { - return this.getInputDOMNode().checked; - }, +var _Dropdown2 = _interopRequireDefault(_Dropdown); - getSelectedOptions: function getSelectedOptions() { - var values = []; +var _lodashCompatObjectOmit = require('lodash-compat/object/omit'); - Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName("option"), function (option) { - if (option.selected) { - var value = option.getAttribute("value") || option.innerHTML; +var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit); - values.push(value); - } - }); +var _lodashCompatObjectPick = require('lodash-compat/object/pick'); - return values; - }, +var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick); - isCheckboxOrRadio: function isCheckboxOrRadio() { - return this.props.type === "radio" || this.props.type === "checkbox"; - }, +var _Button = require('./Button'); - isFile: function isFile() { - return this.props.type === "file"; - }, +var _Button2 = _interopRequireDefault(_Button); - renderInput: function renderInput() { - var input = null; +var DropdownButton = (function (_React$Component) { + _inherits(DropdownButton, _React$Component); - if (!this.props.type) { - return this.props.children; - } + function DropdownButton() { + _classCallCheck(this, DropdownButton); - switch (this.props.type) { - case "select": - input = React.createElement( - "select", - _extends({}, this.props, { className: classNames(this.props.className, "form-control"), ref: "input", key: "input" }), - this.props.children - ); - break; - case "textarea": - input = React.createElement("textarea", _extends({}, this.props, { className: classNames(this.props.className, "form-control"), ref: "input", key: "input" })); - break; - case "static": - input = React.createElement( - "p", - _extends({}, this.props, { className: classNames(this.props.className, "form-control-static"), ref: "input", key: "input" }), - this.props.value - ); - break; - case "submit": - input = React.createElement(Button, _extends({}, this.props, { componentClass: "input", ref: "input", key: "input" })); - break; - default: - var className = this.isCheckboxOrRadio() || this.isFile() ? "" : "form-control"; - input = React.createElement("input", _extends({}, this.props, { className: classNames(this.props.className, className), ref: "input", key: "input" })); - } + _React$Component.apply(this, arguments); + } - return input; - }, + DropdownButton.prototype.render = function render() { + var _props = this.props; + var bsStyle = _props.bsStyle; + var bsSize = _props.bsSize; + var disabled = _props.disabled; + var _props2 = this.props; + var title = _props2.title; + var children = _props2.children; - renderInputGroup: function renderInputGroup(children) { - var addonBefore = this.props.addonBefore ? React.createElement( - "span", - { className: "input-group-addon", key: "addonBefore" }, - this.props.addonBefore - ) : null; + var props = _objectWithoutProperties(_props2, ['title', 'children']); - var addonAfter = this.props.addonAfter ? React.createElement( - "span", - { className: "input-group-addon", key: "addonAfter" }, - this.props.addonAfter - ) : null; + var dropdownProps = _lodashCompatObjectPick2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes)); + var toggleProps = _lodashCompatObjectOmit2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes)); - var buttonBefore = this.props.buttonBefore ? React.createElement( - "span", - { className: "input-group-btn" }, - this.props.buttonBefore - ) : null; + return _react2['default'].createElement( + _Dropdown2['default'], + _extends({}, dropdownProps, { + bsSize: bsSize, + bsStyle: bsStyle + }), + _react2['default'].createElement( + _Dropdown2['default'].Toggle, + _extends({}, toggleProps, { + disabled: disabled + }), + title + ), + _react2['default'].createElement( + _Dropdown2['default'].Menu, + null, + children + ) + ); + }; - var buttonAfter = this.props.buttonAfter ? React.createElement( - "span", - { className: "input-group-btn" }, - this.props.buttonAfter - ) : null; + return DropdownButton; +})(_react2['default'].Component); - var inputGroupClassName = undefined; - switch (this.props.bsSize) { - case "small": - inputGroupClassName = "input-group-sm";break; - case "large": - inputGroupClassName = "input-group-lg";break; - } +DropdownButton.propTypes = _extends({ + disabled: _react2['default'].PropTypes.bool, + bsStyle: _Button2['default'].propTypes.bsStyle, + bsSize: _Button2['default'].propTypes.bsSize, - return addonBefore || addonAfter || buttonBefore || buttonAfter ? React.createElement( - "div", - { className: classNames(inputGroupClassName, "input-group"), key: "input-group" }, - addonBefore, - buttonBefore, - children, - addonAfter, - buttonAfter - ) : children; - }, + /** + * When used with the `title` prop, the noCaret option will not render a caret icon, in the toggle element. + */ + noCaret: _react2['default'].PropTypes.bool, + title: _react2['default'].PropTypes.node.isRequired - renderIcon: function renderIcon() { - var classes = { - glyphicon: true, - "form-control-feedback": true, - "glyphicon-ok": this.props.bsStyle === "success", - "glyphicon-warning-sign": this.props.bsStyle === "warning", - "glyphicon-remove": this.props.bsStyle === "error" - }; +}, _Dropdown2['default'].propTypes); - return this.props.hasFeedback ? React.createElement("span", { className: classNames(classes), key: "icon" }) : null; - }, +DropdownButton.defaultProps = { + disabled: false, + pullRight: false, + dropup: false, + navItem: false, + noCaret: false +}; - renderHelp: function renderHelp() { - return this.props.help ? React.createElement( - "span", - { className: "help-block", key: "help" }, - this.props.help - ) : null; - }, +exports['default'] = DropdownButton; +module.exports = exports['default']; +},{"./Button":40,"./Dropdown":49,"babel-runtime/core-js/object/keys":119,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"lodash-compat/object/omit":244,"lodash-compat/object/pick":246,"react":511}],51:[function(require,module,exports){ +'use strict'; - renderCheckboxandRadioWrapper: function renderCheckboxandRadioWrapper(children) { - var classes = { - checkbox: this.props.type === "checkbox", - radio: this.props.type === "radio" - }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; - return React.createElement( - "div", - { className: classNames(classes), key: "checkboxRadioWrapper" }, - children - ); - }, +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - renderWrapper: function renderWrapper(children) { - return this.props.wrapperClassName ? React.createElement( - "div", - { className: this.props.wrapperClassName, key: "wrapper" }, - children - ) : children; - }, +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; - renderLabel: function renderLabel(children) { - var classes = { - "control-label": !this.isCheckboxOrRadio() - }; - classes[this.props.labelClassName] = this.props.labelClassName; +var _extends = require('babel-runtime/helpers/extends')['default']; - return this.props.label ? React.createElement( - "label", - { htmlFor: this.props.id, className: classNames(classes), key: "label" }, - children, - this.props.label - ) : children; - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - render: function render() { - var children = undefined; +exports.__esModule = true; - if (this.isCheckboxOrRadio()) { - children = this.renderWrapper([this.renderCheckboxandRadioWrapper(this.renderLabel(this.renderInput())), this.renderHelp()]); - } else { - children = [this.renderLabel(), this.renderWrapper([this.renderInputGroup(this.renderInput()), this.renderIcon(), this.renderHelp()])]; - } +var _keycode = require('keycode'); - return React.createElement( - FormGroup, - this.props, - children - ); - } -}); +var _keycode2 = _interopRequireDefault(_keycode); -module.exports = Input; -},{"./Button":35,"./FormGroup":47,"classnames":88,"react":303}],51:[function(require,module,exports){ -"use strict"; +var _react = require('react'); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _react2 = _interopRequireDefault(_react); -// https://www.npmjs.org/package/react-interpolate-component -// TODO: Drop this in favor of es6 string interpolation +var _reactDom = require('react-dom'); -var React = _interopRequire(require("react")); +var _reactDom2 = _interopRequireDefault(_reactDom); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _classnames = require('classnames'); -var assign = _interopRequire(require("./utils/Object.assign")); +var _classnames2 = _interopRequireDefault(_classnames); -var REGEXP = /\%\((.+?)\)s/; +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); -var Interpolate = React.createClass({ - displayName: "Interpolate", +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - propTypes: { - format: React.PropTypes.string - }, +var _reactOverlaysLibRootCloseWrapper = require('react-overlays/lib/RootCloseWrapper'); - getDefaultProps: function getDefaultProps() { - return { component: "span" }; - }, +var _reactOverlaysLibRootCloseWrapper2 = _interopRequireDefault(_reactOverlaysLibRootCloseWrapper); - render: function render() { - var format = ValidComponentChildren.hasValidComponent(this.props.children) || typeof this.props.children === "string" ? this.props.children : this.props.format; - var parent = this.props.component; - var unsafe = this.props.unsafe === true; - var props = assign({}, this.props); +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); - delete props.children; - delete props.format; - delete props.component; - delete props.unsafe; +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - if (unsafe) { - var content = format.split(REGEXP).reduce(function (memo, match, index) { - var html = undefined; +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); - if (index % 2 === 0) { - html = match; - } else { - html = props[match]; - delete props[match]; - } +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - if (React.isValidElement(html)) { - throw new Error("cannot interpolate a React component into unsafe text"); - } +var DropdownMenu = (function (_React$Component) { + _inherits(DropdownMenu, _React$Component); - memo += html; + function DropdownMenu(props) { + _classCallCheck(this, DropdownMenu); - return memo; - }, ""); + _React$Component.call(this, props); - props.dangerouslySetInnerHTML = { __html: content }; + this.focusNext = this.focusNext.bind(this); + this.focusPrevious = this.focusPrevious.bind(this); + this.getFocusableMenuItems = this.getFocusableMenuItems.bind(this); + this.getItemsAndActiveIndex = this.getItemsAndActiveIndex.bind(this); - return React.createElement(parent, props); - } else { - var kids = format.split(REGEXP).reduce(function (memo, match, index) { - var child = undefined; + this.handleKeyDown = this.handleKeyDown.bind(this); + } - if (index % 2 === 0) { - if (match.length === 0) { - return memo; - } + DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) { + switch (event.keyCode) { + case _keycode2['default'].codes.down: + this.focusNext(); + event.preventDefault(); + break; + case _keycode2['default'].codes.up: + this.focusPrevious(); + event.preventDefault(); + break; + case _keycode2['default'].codes.esc: + case _keycode2['default'].codes.tab: + this.props.onClose(event); + break; + default: + } + }; - child = match; - } else { - child = props[match]; - delete props[match]; - } + DropdownMenu.prototype.focusNext = function focusNext() { + var _getItemsAndActiveIndex = this.getItemsAndActiveIndex(); - memo.push(child); + var items = _getItemsAndActiveIndex.items; + var activeItemIndex = _getItemsAndActiveIndex.activeItemIndex; - return memo; - }, []); + if (items.length === 0) { + return; + } - return React.createElement(parent, props, kids); + if (activeItemIndex === items.length - 1) { + items[0].focus(); + return; } - } -}); -module.exports = Interpolate; -},{"./utils/Object.assign":83,"./utils/ValidComponentChildren":85,"react":303}],52:[function(require,module,exports){ -"use strict"; + items[activeItemIndex + 1].focus(); + }; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + DropdownMenu.prototype.focusPrevious = function focusPrevious() { + var _getItemsAndActiveIndex2 = this.getItemsAndActiveIndex(); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var items = _getItemsAndActiveIndex2.items; + var activeItemIndex = _getItemsAndActiveIndex2.activeItemIndex; -var React = _interopRequire(require("react")); + if (activeItemIndex === 0) { + items[items.length - 1].focus(); + return; + } -var classNames = _interopRequire(require("classnames")); + items[activeItemIndex - 1].focus(); + }; -var Jumbotron = React.createClass({ - displayName: "Jumbotron", + DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() { + var items = this.getFocusableMenuItems(); + var activeElement = document.activeElement; + var activeItemIndex = items.indexOf(activeElement); - render: function render() { - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, "jumbotron") }), - this.props.children - ); - } -}); + return { items: items, activeItemIndex: activeItemIndex }; + }; -module.exports = Jumbotron; -},{"classnames":88,"react":303}],53:[function(require,module,exports){ -"use strict"; + DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() { + var menuNode = _reactDom2['default'].findDOMNode(this); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + if (menuNode === undefined) { + return []; + } -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + return [].slice.call(menuNode.querySelectorAll('[tabIndex="-1"]'), 0); + }; -var React = _interopRequire(require("react")); + DropdownMenu.prototype.render = function render() { + var _classes, + _this = this; -var classNames = _interopRequire(require("classnames")); + var _props = this.props; + var children = _props.children; + var onSelect = _props.onSelect; + var pullRight = _props.pullRight; + var className = _props.className; + var labelledBy = _props.labelledBy; + var open = _props.open; + var onClose = _props.onClose; + + var props = _objectWithoutProperties(_props, ['children', 'onSelect', 'pullRight', 'className', 'labelledBy', 'open', 'onClose']); + + var items = _utilsValidComponentChildren2['default'].map(children, function (child) { + var childProps = child.props || {}; + + return _react2['default'].cloneElement(child, { + onKeyDown: _utilsCreateChainedFunction2['default'](childProps.onKeyDown, _this.handleKeyDown), + onSelect: _utilsCreateChainedFunction2['default'](childProps.onSelect, onSelect) + }, childProps.children); + }); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + var classes = (_classes = {}, _classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'menu')] = true, _classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'menu-right')] = pullRight, _classes); -var Label = React.createClass({ - displayName: "Label", + var list = _react2['default'].createElement( + 'ul', + _extends({ + className: _classnames2['default'](className, classes), + role: 'menu', + 'aria-labelledby': labelledBy + }, props), + items + ); - mixins: [BootstrapMixin], + if (open) { + list = _react2['default'].createElement( + _reactOverlaysLibRootCloseWrapper2['default'], + { noWrap: true, onRootClose: onClose }, + list + ); + } - getDefaultProps: function getDefaultProps() { - return { - bsClass: "label", - bsStyle: "default" - }; - }, + return list; + }; - render: function render() { - var classes = this.getBsClassSet(); + return DropdownMenu; +})(_react2['default'].Component); - return React.createElement( - "span", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.props.children - ); - } -}); +DropdownMenu.defaultProps = { + bsRole: 'menu', + bsClass: 'dropdown', + pullRight: false +}; -module.exports = Label; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],54:[function(require,module,exports){ -"use strict"; +DropdownMenu.propTypes = { + open: _react2['default'].PropTypes.bool, + pullRight: _react2['default'].PropTypes.bool, + onClose: _react2['default'].PropTypes.func, + labelledBy: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + onSelect: _react2['default'].PropTypes.func +}; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +exports['default'] = DropdownMenu; +module.exports = exports['default']; +},{"./utils/ValidComponentChildren":110,"./utils/bootstrapUtils":111,"./utils/createChainedFunction":114,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"keycode":180,"react":511,"react-dom":278,"react-overlays/lib/RootCloseWrapper":255}],52:[function(require,module,exports){ +'use strict'; -var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var _react = require("react"); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var React = _interopRequire(_react); +exports.__esModule = true; -var cloneElement = _react.cloneElement; +var _react = require('react'); -var classNames = _interopRequire(require("classnames")); +var _react2 = _interopRequireDefault(_react); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _classnames = require('classnames'); -var ListGroup = (function (_React$Component) { - function ListGroup() { - _classCallCheck(this, ListGroup); +var _classnames2 = _interopRequireDefault(_classnames); - if (_React$Component != null) { - _React$Component.apply(this, arguments); - } - } +var _Button = require('./Button'); - _inherits(ListGroup, _React$Component); +var _Button2 = _interopRequireDefault(_Button); - _createClass(ListGroup, { - render: { - value: function render() { - var items = ValidComponentChildren.map(this.props.children, function (item, index) { - return cloneElement(item, { key: item.key ? item.key : index }); - }); +var _SafeAnchor = require('./SafeAnchor'); - return React.createElement( - "div", - { className: classNames(this.props.className, "list-group") }, - items - ); - } - } - }); +var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); - return ListGroup; -})(React.Component); +var CARET = _react2['default'].createElement( + 'span', + null, + ' ', + _react2['default'].createElement('span', { className: 'caret' }) +); -ListGroup.propTypes = { - className: React.PropTypes.string -}; +var DropdownToggle = (function (_React$Component) { + _inherits(DropdownToggle, _React$Component); -module.exports = ListGroup; -},{"./utils/ValidComponentChildren":85,"classnames":88,"react":303}],55:[function(require,module,exports){ -"use strict"; + function DropdownToggle() { + _classCallCheck(this, DropdownToggle); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + _React$Component.apply(this, arguments); + } -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + DropdownToggle.prototype.render = function render() { + var caret = this.props.noCaret ? null : CARET; -var _react = require("react"); + var classes = { + 'dropdown-toggle': true + }; -var React = _interopRequire(_react); + var Component = this.props.useAnchor ? _SafeAnchor2['default'] : _Button2['default']; -var cloneElement = _react.cloneElement; + return _react2['default'].createElement( + Component, + _extends({}, this.props, { + className: _classnames2['default'](classes, this.props.className), + type: 'button', + 'aria-haspopup': true, + 'aria-expanded': this.props.open }), + this.props.children || this.props.title, + caret + ); + }; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + return DropdownToggle; +})(_react2['default'].Component); -var classNames = _interopRequire(require("classnames")); +exports['default'] = DropdownToggle; -var ListGroupItem = React.createClass({ - displayName: "ListGroupItem", +DropdownToggle.defaultProps = { + open: false, + useAnchor: false, + bsRole: 'toggle' +}; - mixins: [BootstrapMixin], +DropdownToggle.propTypes = { + bsRole: _react2['default'].PropTypes.string, + noCaret: _react2['default'].PropTypes.bool, + open: _react2['default'].PropTypes.bool, + title: _react2['default'].PropTypes.string, + useAnchor: _react2['default'].PropTypes.bool +}; - propTypes: { - bsStyle: React.PropTypes.oneOf(["danger", "info", "success", "warning"]), - active: React.PropTypes.any, - disabled: React.PropTypes.any, - header: React.PropTypes.node, - onClick: React.PropTypes.func, - eventKey: React.PropTypes.any, - href: React.PropTypes.string, - target: React.PropTypes.string - }, +DropdownToggle.isToggle = true; +DropdownToggle.titleProp = 'title'; +DropdownToggle.onClickProp = 'onClick'; +module.exports = exports['default']; +},{"./Button":40,"./SafeAnchor":96,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],53:[function(require,module,exports){ +'use strict'; - getDefaultProps: function getDefaultProps() { - return { - bsClass: "list-group-item" - }; - }, +var _inherits = require('babel-runtime/helpers/inherits')['default']; - render: function render() { - var classes = this.getBsClassSet(); +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - classes.active = this.props.active; - classes.disabled = this.props.disabled; +var _extends = require('babel-runtime/helpers/extends')['default']; - if (this.props.href || this.props.target || this.props.onClick) { - return this.renderAnchor(classes); - } else { - return this.renderSpan(classes); - } - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - renderSpan: function renderSpan(classes) { - return React.createElement( - "span", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.props.header ? this.renderStructuredContent() : this.props.children - ); - }, +exports.__esModule = true; - renderAnchor: function renderAnchor(classes) { - return React.createElement( - "a", - _extends({}, this.props, { - className: classNames(this.props.className, classes) - }), - this.props.header ? this.renderStructuredContent() : this.props.children - ); - }, +var _react = require('react'); - renderStructuredContent: function renderStructuredContent() { - var header = undefined; - if (React.isValidElement(this.props.header)) { - header = cloneElement(this.props.header, { - key: "header", - className: classNames(this.props.header.props.className, "list-group-item-heading") - }); - } else { - header = React.createElement( - "h4", - { key: "header", className: "list-group-item-heading" }, - this.props.header - ); - } +var _react2 = _interopRequireDefault(_react); - var content = React.createElement( - "p", - { key: "content", className: "list-group-item-text" }, - this.props.children - ); +var _classnames = require('classnames'); - return [header, content]; - } -}); +var _classnames2 = _interopRequireDefault(_classnames); -module.exports = ListGroupItem; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],56:[function(require,module,exports){ -"use strict"; +var _reactOverlaysLibTransition = require('react-overlays/lib/Transition'); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _reactPropTypesLibDeprecated = require('react-prop-types/lib/deprecated'); -var React = _interopRequire(require("react")); +var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); -var classNames = _interopRequire(require("classnames")); +var Fade = (function (_React$Component) { + _inherits(Fade, _React$Component); -var MenuItem = React.createClass({ - displayName: "MenuItem", + function Fade() { + _classCallCheck(this, Fade); - propTypes: { - header: React.PropTypes.bool, - divider: React.PropTypes.bool, - href: React.PropTypes.string, - title: React.PropTypes.string, - target: React.PropTypes.string, - onSelect: React.PropTypes.func, - eventKey: React.PropTypes.any - }, + _React$Component.apply(this, arguments); + } - getDefaultProps: function getDefaultProps() { - return { - href: "#" - }; - }, + // Explicitly copied from Transition for doc generation. + // TODO: Remove duplication once #977 is resolved. - handleClick: function handleClick(e) { - if (this.props.onSelect) { - e.preventDefault(); - this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); - } - }, + Fade.prototype.render = function render() { + var timeout = this.props.timeout || this.props.duration; - renderAnchor: function renderAnchor() { - return React.createElement( - "a", - { onClick: this.handleClick, href: this.props.href, target: this.props.target, title: this.props.title, tabIndex: "-1" }, + return _react2['default'].createElement( + _reactOverlaysLibTransition2['default'], + _extends({}, this.props, { + timeout: timeout, + className: _classnames2['default'](this.props.className, 'fade'), + enteredClassName: 'in', + enteringClassName: 'in' + }), this.props.children ); - }, + }; - render: function render() { - var classes = { - "dropdown-header": this.props.header, - divider: this.props.divider - }; + return Fade; +})(_react2['default'].Component); - var children = null; - if (this.props.header) { - children = this.props.children; - } else if (!this.props.divider) { - children = this.renderAnchor(); - } +Fade.propTypes = { + /** + * Show the component; triggers the fade in or fade out animation + */ + 'in': _react2['default'].PropTypes.bool, - return React.createElement( - "li", - _extends({}, this.props, { role: "presentation", title: null, href: null, - className: classNames(this.props.className, classes) }), - children - ); - } -}); + /** + * Unmount the component (remove it from the DOM) when it is faded out + */ + unmountOnExit: _react2['default'].PropTypes.bool, -module.exports = MenuItem; -},{"classnames":88,"react":303}],57:[function(require,module,exports){ -"use strict"; + /** + * Run the fade in animation when the component mounts, if it is initially + * shown + */ + transitionAppear: _react2['default'].PropTypes.bool, -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + /** + * Duration of the fade animation in milliseconds, to ensure that finishing + * callbacks are fired even if the original browser transition end events are + * canceled + */ + timeout: _react2['default'].PropTypes.number, -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + /** + * duration + * @private + */ + duration: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.number, 'Use `timeout`.'), -var React = _interopRequire(require("react")); + /** + * Callback fired before the component fades in + */ + onEnter: _react2['default'].PropTypes.func, + /** + * Callback fired after the component starts to fade in + */ + onEntering: _react2['default'].PropTypes.func, + /** + * Callback fired after the has component faded in + */ + onEntered: _react2['default'].PropTypes.func, + /** + * Callback fired before the component fades out + */ + onExit: _react2['default'].PropTypes.func, + /** + * Callback fired after the component starts to fade out + */ + onExiting: _react2['default'].PropTypes.func, + /** + * Callback fired after the component has faded out + */ + onExited: _react2['default'].PropTypes.func +}; -var classNames = _interopRequire(require("classnames")); +Fade.defaultProps = { + 'in': false, + timeout: 300, + unmountOnExit: false, + transitionAppear: false +}; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +exports['default'] = Fade; +module.exports = exports['default']; +},{"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-overlays/lib/Transition":256,"react-prop-types/lib/deprecated":270}],54:[function(require,module,exports){ +'use strict'; -var FadeMixin = _interopRequire(require("./FadeMixin")); +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var domUtils = _interopRequire(require("./utils/domUtils")); +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var EventListener = _interopRequire(require("./utils/EventListener")); +var _extends = require('babel-runtime/helpers/extends')['default']; -// TODO: -// - aria-labelledby -// - Add `modal-body` div if only one child passed in that doesn't already have it -// - Tests +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var Modal = React.createClass({ - displayName: "Modal", +exports.__esModule = true; - mixins: [BootstrapMixin, FadeMixin], +var _react = require('react'); - propTypes: { - title: React.PropTypes.node, - backdrop: React.PropTypes.oneOf(["static", true, false]), - keyboard: React.PropTypes.bool, - closeButton: React.PropTypes.bool, - animation: React.PropTypes.bool, - onRequestHide: React.PropTypes.func.isRequired - }, +var _react2 = _interopRequireDefault(_react); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "modal", - backdrop: true, - keyboard: true, - animation: true, - closeButton: true - }; - }, +var _classnames = require('classnames'); - render: function render() { - var modalStyle = { display: "block" }; - var dialogClasses = this.getBsClassSet(); - delete dialogClasses.modal; - dialogClasses["modal-dialog"] = true; +var _classnames2 = _interopRequireDefault(_classnames); - var classes = { - modal: true, - fade: this.props.animation, - "in": !this.props.animation || !document.querySelectorAll - }; +var _InputBase2 = require('../InputBase'); - var modal = React.createElement( - "div", - _extends({}, this.props, { - title: null, - tabIndex: "-1", - role: "dialog", - style: modalStyle, - className: classNames(this.props.className, classes), - onClick: this.props.backdrop === true ? this.handleBackdropClick : null, - ref: "modal" }), - React.createElement( - "div", - { className: classNames(dialogClasses) }, - React.createElement( - "div", - { className: "modal-content", style: { overflow: "hidden" } }, - this.props.title ? this.renderHeader() : null, - this.props.children - ) - ) - ); +var _InputBase3 = _interopRequireDefault(_InputBase2); - return this.props.backdrop ? this.renderBackdrop(modal) : modal; - }, +var _utilsChildrenValueInputValidation = require('../utils/childrenValueInputValidation'); - renderBackdrop: function renderBackdrop(modal) { - var classes = { - "modal-backdrop": true, - fade: this.props.animation - }; +var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation); - classes["in"] = !this.props.animation || !document.querySelectorAll; +var Static = (function (_InputBase) { + _inherits(Static, _InputBase); - var onClick = this.props.backdrop === true ? this.handleBackdropClick : null; + function Static() { + _classCallCheck(this, Static); - return React.createElement( - "div", - null, - React.createElement("div", { className: classNames(classes), ref: "backdrop", onClick: onClick }), - modal + _InputBase.apply(this, arguments); + } + + Static.prototype.getValue = function getValue() { + var _props = this.props; + var children = _props.children; + var value = _props.value; + + return children ? children : value; + }; + + Static.prototype.renderInput = function renderInput() { + return _react2['default'].createElement( + 'p', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control-static'), ref: 'input', key: 'input' }), + this.getValue() ); - }, + }; - renderHeader: function renderHeader() { - var closeButton = undefined; - if (this.props.closeButton) { - closeButton = React.createElement( - "button", - { type: "button", className: "close", "aria-hidden": "true", onClick: this.props.onRequestHide }, - "×" - ); - } + return Static; +})(_InputBase3['default']); - var style = this.props.bsStyle; - var classes = { - "modal-header": true - }; - classes["bg-" + style] = style; - classes["text-" + style] = style; +Static.propTypes = { + value: _utilsChildrenValueInputValidation2['default'], + children: _utilsChildrenValueInputValidation2['default'] +}; - var className = classNames(classes); +exports['default'] = Static; +module.exports = exports['default']; +},{"../InputBase":61,"../utils/childrenValueInputValidation":113,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],55:[function(require,module,exports){ +'use strict'; - return React.createElement( - "div", - { className: className }, - closeButton, - this.renderTitle() - ); - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - renderTitle: function renderTitle() { - return React.isValidElement(this.props.title) ? this.props.title : React.createElement( - "h4", - { className: "modal-title" }, - this.props.title - ); - }, +exports.__esModule = true; - iosClickHack: function iosClickHack() { - // IOS only allows click events to be delegated to the document on elements - // it considers 'clickable' - anchors, buttons, etc. We fake a click handler on the - // DOM nodes themselves. Remove if handled by React: https://github.com/facebook/react/issues/1169 - React.findDOMNode(this.refs.modal).onclick = function () {}; - React.findDOMNode(this.refs.backdrop).onclick = function () {}; - }, +var _Static2 = require('./Static'); - componentDidMount: function componentDidMount() { - this._onDocumentKeyupListener = EventListener.listen(domUtils.ownerDocument(this), "keyup", this.handleDocumentKeyUp); +var _Static3 = _interopRequireDefault(_Static2); - var container = this.props.container && React.findDOMNode(this.props.container) || domUtils.ownerDocument(this).body; - container.className += container.className.length ? " modal-open" : "modal-open"; +exports.Static = _Static3['default']; +},{"./Static":54,"babel-runtime/helpers/interop-require-default":124}],56:[function(require,module,exports){ +'use strict'; - if (this.props.backdrop) { - this.iosClickHack(); - } - }, +var _inherits = require('babel-runtime/helpers/inherits')['default']; - componentDidUpdate: function componentDidUpdate(prevProps) { - if (this.props.backdrop && this.props.backdrop !== prevProps.backdrop) { - this.iosClickHack(); - } - }, +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - componentWillUnmount: function componentWillUnmount() { - this._onDocumentKeyupListener.remove(); - var container = this.props.container && React.findDOMNode(this.props.container) || domUtils.ownerDocument(this).body; - container.className = container.className.replace(/ ?modal-open/, ""); - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - handleBackdropClick: function handleBackdropClick(e) { - if (e.target !== e.currentTarget) { - return; - } +exports.__esModule = true; - this.props.onRequestHide(); - }, +var _react = require('react'); - handleDocumentKeyUp: function handleDocumentKeyUp(e) { - if (this.props.keyboard && e.keyCode === 27) { - this.props.onRequestHide(); - } - } -}); +var _react2 = _interopRequireDefault(_react); -module.exports = Modal; -},{"./BootstrapMixin":34,"./FadeMixin":46,"./utils/EventListener":82,"./utils/domUtils":87,"classnames":88,"react":303}],58:[function(require,module,exports){ -"use strict"; +var _classnames = require('classnames'); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _classnames2 = _interopRequireDefault(_classnames); -var _react = require("react"); +var FormGroup = (function (_React$Component) { + _inherits(FormGroup, _React$Component); -var React = _interopRequire(_react); + function FormGroup() { + _classCallCheck(this, FormGroup); -var cloneElement = _react.cloneElement; + _React$Component.apply(this, arguments); + } -var OverlayMixin = _interopRequire(require("./OverlayMixin")); + FormGroup.prototype.render = function render() { + var classes = { + 'form-group': !this.props.standalone, + 'form-group-lg': !this.props.standalone && this.props.bsSize === 'large', + 'form-group-sm': !this.props.standalone && this.props.bsSize === 'small', + 'has-feedback': this.props.hasFeedback, + 'has-success': this.props.bsStyle === 'success', + 'has-warning': this.props.bsStyle === 'warning', + 'has-error': this.props.bsStyle === 'error' + }; -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); + return _react2['default'].createElement( + 'div', + { className: _classnames2['default'](classes, this.props.groupClassName) }, + this.props.children + ); + }; -var ModalTrigger = React.createClass({ - displayName: "ModalTrigger", + return FormGroup; +})(_react2['default'].Component); - mixins: [OverlayMixin], +FormGroup.defaultProps = { + hasFeedback: false, + standalone: false +}; - propTypes: { - modal: React.PropTypes.node.isRequired - }, +FormGroup.propTypes = { + standalone: _react2['default'].PropTypes.bool, + hasFeedback: _react2['default'].PropTypes.bool, + bsSize: function bsSize(props) { + if (props.standalone && props.bsSize !== undefined) { + return new Error('bsSize will not be used when `standalone` is set.'); + } - getInitialState: function getInitialState() { - return { - isOverlayShown: false - }; + return _react2['default'].PropTypes.oneOf(['small', 'medium', 'large']).apply(null, arguments); }, + bsStyle: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']), + groupClassName: _react2['default'].PropTypes.string +}; - show: function show() { - this.setState({ - isOverlayShown: true - }); - }, +exports['default'] = FormGroup; +module.exports = exports['default']; +},{"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],57:[function(require,module,exports){ +'use strict'; - hide: function hide() { - this.setState({ - isOverlayShown: false - }); - }, +var _extends = require('babel-runtime/helpers/extends')['default']; - toggle: function toggle() { - this.setState({ - isOverlayShown: !this.state.isOverlayShown - }); - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - renderOverlay: function renderOverlay() { - if (!this.state.isOverlayShown) { - return React.createElement("span", null); - } +exports.__esModule = true; - return cloneElement(this.props.modal, { - onRequestHide: this.hide - }); +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); + +var Glyphicon = _react2['default'].createClass({ + displayName: 'Glyphicon', + + propTypes: { + /** + * bootstrap className + * @private + */ + bsClass: _react2['default'].PropTypes.string, + /** + * An icon name. See e.g. http://getbootstrap.com/components/#glyphicons + */ + glyph: _react2['default'].PropTypes.string.isRequired, + /** + * Adds 'form-control-feedback' class + * @private + */ + formControlFeedback: _react2['default'].PropTypes.bool }, - render: function render() { - var child = React.Children.only(this.props.children); - return cloneElement(child, { - onClick: createChainedFunction(child.props.onClick, this.toggle) - }); - } -}); + getDefaultProps: function getDefaultProps() { + return { + bsClass: 'glyphicon', + formControlFeedback: false + }; + }, -module.exports = ModalTrigger; -},{"./OverlayMixin":62,"./utils/createChainedFunction":86,"react":303}],59:[function(require,module,exports){ -"use strict"; + render: function render() { + var _classNames; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + var className = _classnames2['default'](this.props.className, (_classNames = {}, _classNames[this.props.bsClass] = true, _classNames['glyphicon-' + this.props.glyph] = true, _classNames['form-control-feedback'] = this.props.formControlFeedback, _classNames)); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + return _react2['default'].createElement( + 'span', + _extends({}, this.props, { className: className }), + this.props.children + ); + } +}); -var _react = require("react"); +exports['default'] = Glyphicon; +module.exports = exports['default']; +},{"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],58:[function(require,module,exports){ +'use strict'; -var React = _interopRequire(_react); +var _extends = require('babel-runtime/helpers/extends')['default']; -var cloneElement = _react.cloneElement; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +exports.__esModule = true; -var CollapsableMixin = _interopRequire(require("./CollapsableMixin")); +var _react = require('react'); -var classNames = _interopRequire(require("classnames")); +var _react2 = _interopRequireDefault(_react); -var domUtils = _interopRequire(require("./utils/domUtils")); +var _classnames = require('classnames'); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _classnames2 = _interopRequireDefault(_classnames); -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); -var Nav = React.createClass({ - displayName: "Nav", +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - mixins: [BootstrapMixin, CollapsableMixin], +var Grid = _react2['default'].createClass({ + displayName: 'Grid', propTypes: { - activeHref: React.PropTypes.string, - activeKey: React.PropTypes.any, - bsStyle: React.PropTypes.oneOf(["tabs", "pills"]), - stacked: React.PropTypes.bool, - justified: React.PropTypes.bool, - onSelect: React.PropTypes.func, - collapsable: React.PropTypes.bool, - expanded: React.PropTypes.bool, - navbar: React.PropTypes.bool, - eventKey: React.PropTypes.any, - pullRight: React.PropTypes.bool, - right: React.PropTypes.bool + /** + * Turn any fixed-width grid layout into a full-width layout by this property. + * + * Adds `container-fluid` class. + */ + fluid: _react2['default'].PropTypes.bool, + /** + * You can use a custom element for this component + */ + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { return { - bsClass: "nav" + componentClass: 'div', + fluid: false }; }, - getCollapsableDOMNode: function getCollapsableDOMNode() { - return React.findDOMNode(this); - }, + render: function render() { + var ComponentClass = this.props.componentClass; + var className = this.props.fluid ? 'container-fluid' : 'container'; - getCollapsableDimensionValue: function getCollapsableDimensionValue() { - var node = React.findDOMNode(this.refs.ul), - height = node.offsetHeight, - computedStyles = domUtils.getComputedStyles(node); + return _react2['default'].createElement( + ComponentClass, + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, className) }), + this.props.children + ); + } +}); - return height + parseInt(computedStyles.marginTop, 10) + parseInt(computedStyles.marginBottom, 10); - }, +exports['default'] = Grid; +module.exports = exports['default']; +},{"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-prop-types/lib/elementType":271}],59:[function(require,module,exports){ +'use strict'; - render: function render() { - var classes = this.props.collapsable ? this.getCollapsableClassSet() : {}; +var _extends = require('babel-runtime/helpers/extends')['default']; - classes["navbar-collapse"] = this.props.collapsable; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - if (this.props.navbar && !this.props.collapsable) { - return this.renderUl(); - } +exports.__esModule = true; - return React.createElement( - "nav", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.renderUl() - ); - }, +var _react = require('react'); - renderUl: function renderUl() { - var classes = this.getBsClassSet(); +var _react2 = _interopRequireDefault(_react); - classes["nav-stacked"] = this.props.stacked; - classes["nav-justified"] = this.props.justified; - classes["navbar-nav"] = this.props.navbar; - classes["pull-right"] = this.props.pullRight; - classes["navbar-right"] = this.props.right; +var _classnames = require('classnames'); - return React.createElement( - "ul", - _extends({}, this.props, { className: classNames(this.props.className, classes), ref: "ul" }), - ValidComponentChildren.map(this.props.children, this.renderNavItem) - ); - }, +var _classnames2 = _interopRequireDefault(_classnames); - getChildActiveProp: function getChildActiveProp(child) { - if (child.props.active) { - return true; - } - if (this.props.activeKey != null) { - if (child.props.eventKey === this.props.activeKey) { - return true; - } - } - if (this.props.activeHref != null) { - if (child.props.href === this.props.activeHref) { - return true; - } - } - - return child.props.active; - }, - - renderNavItem: function renderNavItem(child, index) { - return cloneElement(child, { - active: this.getChildActiveProp(child), - activeKey: this.props.activeKey, - activeHref: this.props.activeHref, - onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), - key: child.key ? child.key : index, - navItem: true - }); - } -}); - -module.exports = Nav; -},{"./BootstrapMixin":34,"./CollapsableMixin":41,"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"./utils/domUtils":87,"classnames":88,"react":303}],60:[function(require,module,exports){ -"use strict"; - -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var Image = _react2['default'].createClass({ + displayName: 'Image', -var _objectWithoutProperties = function (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 _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var React = _interopRequire(require("react")); - -var classNames = _interopRequire(require("classnames")); + propTypes: { -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + /** + * Sets image as responsive image + */ + responsive: _react2['default'].PropTypes.bool, -var NavItem = React.createClass({ - displayName: "NavItem", + /** + * Sets image shape as rounded + */ + rounded: _react2['default'].PropTypes.bool, - mixins: [BootstrapMixin], + /** + * Sets image shape as circle + */ + circle: _react2['default'].PropTypes.bool, - propTypes: { - onSelect: React.PropTypes.func, - active: React.PropTypes.bool, - disabled: React.PropTypes.bool, - href: React.PropTypes.string, - title: React.PropTypes.node, - eventKey: React.PropTypes.any, - target: React.PropTypes.string + /** + * Sets image shape as thumbnail + */ + thumbnail: _react2['default'].PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { - href: "#" + responsive: false, + rounded: false, + circle: false, + thumbnail: false }; }, render: function render() { - var _props = this.props; - var disabled = _props.disabled; - var active = _props.active; - var href = _props.href; - var title = _props.title; - var target = _props.target; - var children = _props.children; - - var props = _objectWithoutProperties(_props, ["disabled", "active", "href", "title", "target", "children"]); - var classes = { - active: active, - disabled: disabled - }; - var linkProps = { - href: href, - title: title, - target: target, - onClick: this.handleClick, - ref: "anchor" + 'img-responsive': this.props.responsive, + 'img-rounded': this.props.rounded, + 'img-circle': this.props.circle, + 'img-thumbnail': this.props.thumbnail }; - if (href === "#") { - linkProps.role = "button"; - } - - return React.createElement( - "li", - _extends({}, props, { className: classNames(props.className, classes) }), - React.createElement( - "a", - linkProps, - children - ) - ); - }, - - handleClick: function handleClick(e) { - if (this.props.onSelect) { - e.preventDefault(); - - if (!this.props.disabled) { - this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); - } - } + return _react2['default'].createElement('img', _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) })); } }); -module.exports = NavItem; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],61:[function(require,module,exports){ -"use strict"; +exports['default'] = Image; +module.exports = exports['default']; +},{"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],60:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var _react = require("react"); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var React = _interopRequire(_react); +var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; -var cloneElement = _react.cloneElement; +exports.__esModule = true; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _react = require('react'); -var classNames = _interopRequire(require("classnames")); +var _react2 = _interopRequireDefault(_react); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _InputBase2 = require('./InputBase'); -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _InputBase3 = _interopRequireDefault(_InputBase2); -var Navbar = React.createClass({ - displayName: "Navbar", +var _FormControls = require('./FormControls'); - mixins: [BootstrapMixin], +var FormControls = _interopRequireWildcard(_FormControls); - propTypes: { - fixedTop: React.PropTypes.bool, - fixedBottom: React.PropTypes.bool, - staticTop: React.PropTypes.bool, - inverse: React.PropTypes.bool, - fluid: React.PropTypes.bool, - role: React.PropTypes.string, - componentClass: React.PropTypes.node.isRequired, - brand: React.PropTypes.node, - toggleButton: React.PropTypes.node, - toggleNavKey: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]), - onToggle: React.PropTypes.func, - navExpanded: React.PropTypes.bool, - defaultNavExpanded: React.PropTypes.bool - }, +var _utilsDeprecationWarning = require('./utils/deprecationWarning'); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "navbar", - bsStyle: "default", - role: "navigation", - componentClass: "Nav" - }; - }, +var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - getInitialState: function getInitialState() { - return { - navExpanded: this.props.defaultNavExpanded - }; - }, +var Input = (function (_InputBase) { + _inherits(Input, _InputBase); - shouldComponentUpdate: function shouldComponentUpdate() { - // Defer any updates to this component during the `onSelect` handler. - return !this._isChanging; - }, + function Input() { + _classCallCheck(this, Input); - handleToggle: function handleToggle() { - if (this.props.onToggle) { - this._isChanging = true; - this.props.onToggle(); - this._isChanging = false; + _InputBase.apply(this, arguments); + } + + Input.prototype.render = function render() { + if (this.props.type === 'static') { + _utilsDeprecationWarning2['default']('Input type=static', 'FormControls.Static'); + return _react2['default'].createElement(FormControls.Static, this.props); } - this.setState({ - navExpanded: !this.state.navExpanded - }); - }, + return _InputBase.prototype.render.call(this); + }; - isNavExpanded: function isNavExpanded() { - return this.props.navExpanded != null ? this.props.navExpanded : this.state.navExpanded; - }, + return Input; +})(_InputBase3['default']); - render: function render() { - var classes = this.getBsClassSet(); - var ComponentClass = this.props.componentClass; +Input.propTypes = { + type: _react2['default'].PropTypes.string +}; - classes["navbar-fixed-top"] = this.props.fixedTop; - classes["navbar-fixed-bottom"] = this.props.fixedBottom; - classes["navbar-static-top"] = this.props.staticTop; - classes["navbar-inverse"] = this.props.inverse; +exports['default'] = Input; +module.exports = exports['default']; +},{"./FormControls":55,"./InputBase":61,"./utils/deprecationWarning":116,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/interop-require-wildcard":125,"react":511}],61:[function(require,module,exports){ +'use strict'; - return React.createElement( - ComponentClass, - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - React.createElement( - "div", - { className: this.props.fluid ? "container-fluid" : "container" }, - this.props.brand || this.props.toggleButton || this.props.toggleNavKey != null ? this.renderHeader() : null, - ValidComponentChildren.map(this.props.children, this.renderChild) - ) - ); - }, +var _inherits = require('babel-runtime/helpers/inherits')['default']; - renderChild: function renderChild(child, index) { - return cloneElement(child, { - navbar: true, - collapsable: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey, - expanded: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey && this.isNavExpanded(), - key: child.key ? child.key : index - }); - }, +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - renderHeader: function renderHeader() { - var brand = undefined; +var _extends = require('babel-runtime/helpers/extends')['default']; - if (this.props.brand) { - if (React.isValidElement(this.props.brand)) { - brand = cloneElement(this.props.brand, { - className: classNames(this.props.brand.props.className, "navbar-brand") - }); - } else { - brand = React.createElement( - "span", - { className: "navbar-brand" }, - this.props.brand - ); - } - } +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - return React.createElement( - "div", - { className: "navbar-header" }, - brand, - this.props.toggleButton || this.props.toggleNavKey != null ? this.renderToggleButton() : null - ); - }, +exports.__esModule = true; - renderToggleButton: function renderToggleButton() { - var children = undefined; +var _classnames = require('classnames'); - if (React.isValidElement(this.props.toggleButton)) { +var _classnames2 = _interopRequireDefault(_classnames); - return cloneElement(this.props.toggleButton, { - className: classNames(this.props.toggleButton.props.className, "navbar-toggle"), - onClick: createChainedFunction(this.handleToggle, this.props.toggleButton.props.onClick) - }); - } +var _react = require('react'); - children = this.props.toggleButton != null ? this.props.toggleButton : [React.createElement( - "span", - { className: "sr-only", key: 0 }, - "Toggle navigation" - ), React.createElement("span", { className: "icon-bar", key: 1 }), React.createElement("span", { className: "icon-bar", key: 2 }), React.createElement("span", { className: "icon-bar", key: 3 })]; +var _react2 = _interopRequireDefault(_react); - return React.createElement( - "button", - { className: "navbar-toggle", type: "button", onClick: this.handleToggle }, - children - ); - } -}); +var _FormGroup = require('./FormGroup'); -module.exports = Navbar; -},{"./BootstrapMixin":34,"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"classnames":88,"react":303}],62:[function(require,module,exports){ -"use strict"; +var _FormGroup2 = _interopRequireDefault(_FormGroup); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _Glyphicon = require('./Glyphicon'); -var React = _interopRequire(require("react")); +var _Glyphicon2 = _interopRequireDefault(_Glyphicon); -var CustomPropTypes = _interopRequire(require("./utils/CustomPropTypes")); +var InputBase = (function (_React$Component) { + _inherits(InputBase, _React$Component); -var domUtils = _interopRequire(require("./utils/domUtils")); + function InputBase() { + _classCallCheck(this, InputBase); -module.exports = { - propTypes: { - container: CustomPropTypes.mountable - }, + _React$Component.apply(this, arguments); + } - componentWillUnmount: function componentWillUnmount() { - this._unrenderOverlay(); - if (this._overlayTarget) { - this.getContainerDOMNode().removeChild(this._overlayTarget); - this._overlayTarget = null; + InputBase.prototype.getInputDOMNode = function getInputDOMNode() { + return this.refs.input; + }; + + InputBase.prototype.getValue = function getValue() { + if (this.props.type === 'static') { + return this.props.value; + } else if (this.props.type) { + if (this.props.type === 'select' && this.props.multiple) { + return this.getSelectedOptions(); + } + return this.getInputDOMNode().value; } - }, + throw new Error('Cannot use getValue without specifying input type.'); + }; - componentDidUpdate: function componentDidUpdate() { - this._renderOverlay(); - }, + InputBase.prototype.getChecked = function getChecked() { + return this.getInputDOMNode().checked; + }; - componentDidMount: function componentDidMount() { - this._renderOverlay(); - }, + InputBase.prototype.getSelectedOptions = function getSelectedOptions() { + var values = []; - _mountOverlayTarget: function _mountOverlayTarget() { - this._overlayTarget = document.createElement("div"); - this.getContainerDOMNode().appendChild(this._overlayTarget); - }, + Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName('option'), function (option) { + if (option.selected) { + var value = option.getAttribute('value') || option.innerHtml; + values.push(value); + } + }); - _renderOverlay: function _renderOverlay() { - if (!this._overlayTarget) { - this._mountOverlayTarget(); + return values; + }; + + InputBase.prototype.isCheckboxOrRadio = function isCheckboxOrRadio() { + return this.props.type === 'checkbox' || this.props.type === 'radio'; + }; + + InputBase.prototype.isFile = function isFile() { + return this.props.type === 'file'; + }; + + InputBase.prototype.renderInputGroup = function renderInputGroup(children) { + var addonBefore = this.props.addonBefore ? _react2['default'].createElement( + 'span', + { className: 'input-group-addon', key: 'addonBefore' }, + this.props.addonBefore + ) : null; + + var addonAfter = this.props.addonAfter ? _react2['default'].createElement( + 'span', + { className: 'input-group-addon', key: 'addonAfter' }, + this.props.addonAfter + ) : null; + + var buttonBefore = this.props.buttonBefore ? _react2['default'].createElement( + 'span', + { className: 'input-group-btn' }, + this.props.buttonBefore + ) : null; + + var buttonAfter = this.props.buttonAfter ? _react2['default'].createElement( + 'span', + { className: 'input-group-btn' }, + this.props.buttonAfter + ) : null; + + var inputGroupClassName = undefined; + switch (this.props.bsSize) { + case 'small': + inputGroupClassName = 'input-group-sm';break; + case 'large': + inputGroupClassName = 'input-group-lg';break; + default: } - var overlay = this.renderOverlay(); + return addonBefore || addonAfter || buttonBefore || buttonAfter ? _react2['default'].createElement( + 'div', + { className: _classnames2['default'](inputGroupClassName, 'input-group'), key: 'input-group' }, + addonBefore, + buttonBefore, + children, + addonAfter, + buttonAfter + ) : children; + }; + + InputBase.prototype.renderIcon = function renderIcon() { + if (this.props.hasFeedback) { + if (this.props.feedbackIcon) { + return _react2['default'].cloneElement(this.props.feedbackIcon, { formControlFeedback: true }); + } - // Save reference to help testing - if (overlay !== null) { - this._overlayInstance = React.render(overlay, this._overlayTarget); + switch (this.props.bsStyle) { + case 'success': + return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'ok', key: 'icon' }); + case 'warning': + return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'warning-sign', key: 'icon' }); + case 'error': + return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'remove', key: 'icon' }); + default: + return _react2['default'].createElement('span', { className: 'form-control-feedback', key: 'icon' }); + } } else { - // Unrender if the component is null for transitions to null - this._unrenderOverlay(); + return null; } - }, + }; - _unrenderOverlay: function _unrenderOverlay() { - React.unmountComponentAtNode(this._overlayTarget); - this._overlayInstance = null; - }, + InputBase.prototype.renderHelp = function renderHelp() { + return this.props.help ? _react2['default'].createElement( + 'span', + { className: 'help-block', key: 'help' }, + this.props.help + ) : null; + }; - getOverlayDOMNode: function getOverlayDOMNode() { - if (!this.isMounted()) { - throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node."); - } + InputBase.prototype.renderCheckboxAndRadioWrapper = function renderCheckboxAndRadioWrapper(children) { + var classes = { + 'checkbox': this.props.type === 'checkbox', + 'radio': this.props.type === 'radio' + }; - if (this._overlayInstance) { - return React.findDOMNode(this._overlayInstance); - } + return _react2['default'].createElement( + 'div', + { className: _classnames2['default'](classes), key: 'checkboxRadioWrapper' }, + children + ); + }; - return null; - }, + InputBase.prototype.renderWrapper = function renderWrapper(children) { + return this.props.wrapperClassName ? _react2['default'].createElement( + 'div', + { className: this.props.wrapperClassName, key: 'wrapper' }, + children + ) : children; + }; - getContainerDOMNode: function getContainerDOMNode() { - return React.findDOMNode(this.props.container) || domUtils.ownerDocument(this).body; - } -}; -},{"./utils/CustomPropTypes":81,"./utils/domUtils":87,"react":303}],63:[function(require,module,exports){ -"use strict"; + InputBase.prototype.renderLabel = function renderLabel(children) { + var classes = { + 'control-label': !this.isCheckboxOrRadio() + }; + classes[this.props.labelClassName] = this.props.labelClassName; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + return this.props.label ? _react2['default'].createElement( + 'label', + { htmlFor: this.props.id, className: _classnames2['default'](classes), key: 'label' }, + children, + this.props.label + ) : children; + }; -var _react = require("react"); + InputBase.prototype.renderInput = function renderInput() { + if (!this.props.type) { + return this.props.children; + } -var React = _interopRequire(_react); + switch (this.props.type) { + case 'select': + return _react2['default'].createElement( + 'select', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control'), ref: 'input', key: 'input' }), + this.props.children + ); + case 'textarea': + return _react2['default'].createElement('textarea', _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control'), ref: 'input', key: 'input' })); + case 'static': + return _react2['default'].createElement( + 'p', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control-static'), ref: 'input', key: 'input' }), + this.props.value + ); + default: + var className = this.isCheckboxOrRadio() || this.isFile() ? '' : 'form-control'; + return _react2['default'].createElement('input', _extends({}, this.props, { className: _classnames2['default'](this.props.className, className), ref: 'input', key: 'input' })); + } + }; -var cloneElement = _react.cloneElement; + InputBase.prototype.renderFormGroup = function renderFormGroup(children) { + return _react2['default'].createElement( + _FormGroup2['default'], + this.props, + children + ); + }; -var OverlayMixin = _interopRequire(require("./OverlayMixin")); + InputBase.prototype.renderChildren = function renderChildren() { + return !this.isCheckboxOrRadio() ? [this.renderLabel(), this.renderWrapper([this.renderInputGroup(this.renderInput()), this.renderIcon(), this.renderHelp()])] : this.renderWrapper([this.renderCheckboxAndRadioWrapper(this.renderLabel(this.renderInput())), this.renderHelp()]); + }; -var domUtils = _interopRequire(require("./utils/domUtils")); + InputBase.prototype.render = function render() { + var children = this.renderChildren(); + return this.renderFormGroup(children); + }; -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); + return InputBase; +})(_react2['default'].Component); + +InputBase.propTypes = { + type: _react2['default'].PropTypes.string, + label: _react2['default'].PropTypes.node, + help: _react2['default'].PropTypes.node, + addonBefore: _react2['default'].PropTypes.node, + addonAfter: _react2['default'].PropTypes.node, + buttonBefore: _react2['default'].PropTypes.node, + buttonAfter: _react2['default'].PropTypes.node, + bsSize: _react2['default'].PropTypes.oneOf(['small', 'medium', 'large']), + bsStyle: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']), + hasFeedback: _react2['default'].PropTypes.bool, + feedbackIcon: _react2['default'].PropTypes.node, + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + groupClassName: _react2['default'].PropTypes.string, + wrapperClassName: _react2['default'].PropTypes.string, + labelClassName: _react2['default'].PropTypes.string, + multiple: _react2['default'].PropTypes.bool, + disabled: _react2['default'].PropTypes.bool, + value: _react2['default'].PropTypes.any +}; -var assign = _interopRequire(require("./utils/Object.assign")); +InputBase.defaultProps = { + disabled: false, + hasFeedback: false, + multiple: false +}; -/** - * Check if value one is inside or equal to the of value - * - * @param {string} one - * @param {string|array} of - * @returns {boolean} - */ -function isOneOf(one, of) { - if (Array.isArray(of)) { - return of.indexOf(one) >= 0; - } - return one === of; -} - -var OverlayTrigger = React.createClass({ - displayName: "OverlayTrigger", - - mixins: [OverlayMixin], +exports['default'] = InputBase; +module.exports = exports['default']; +},{"./FormGroup":56,"./Glyphicon":57,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],62:[function(require,module,exports){ +// https://www.npmjs.org/package/react-interpolate-component +// TODO: Drop this in favor of es6 string interpolation - propTypes: { - trigger: React.PropTypes.oneOfType([React.PropTypes.oneOf(["manual", "click", "hover", "focus"]), React.PropTypes.arrayOf(React.PropTypes.oneOf(["click", "hover", "focus"]))]), - placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), - delay: React.PropTypes.number, - delayShow: React.PropTypes.number, - delayHide: React.PropTypes.number, - defaultOverlayShown: React.PropTypes.bool, - overlay: React.PropTypes.node.isRequired - }, +'use strict'; - getDefaultProps: function getDefaultProps() { - return { - placement: "right", - trigger: ["hover", "focus"] - }; - }, +var _extends = require('babel-runtime/helpers/extends')['default']; - getInitialState: function getInitialState() { - return { - isOverlayShown: this.props.defaultOverlayShown == null ? false : this.props.defaultOverlayShown, - overlayLeft: null, - overlayTop: null - }; - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - show: function show() { - this.setState({ - isOverlayShown: true - }, function () { - this.updateOverlayPosition(); - }); - }, +exports.__esModule = true; - hide: function hide() { - this.setState({ - isOverlayShown: false - }); - }, +var _react = require('react'); - toggle: function toggle() { - if (this.state.isOverlayShown) { - this.hide(); - } else { - this.show(); - } - }, +var _react2 = _interopRequireDefault(_react); - renderOverlay: function renderOverlay() { - if (!this.state.isOverlayShown) { - return React.createElement("span", null); - } +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); - return cloneElement(this.props.overlay, { - onRequestHide: this.hide, - placement: this.props.placement, - positionLeft: this.state.overlayLeft, - positionTop: this.state.overlayTop - }); - }, +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - render: function render() { - if (this.props.trigger === "manual") { - return React.Children.only(this.props.children); - } +var REGEXP = /\%\((.+?)\)s/; - var props = {}; +var Interpolate = _react2['default'].createClass({ + displayName: 'Interpolate', - if (isOneOf("click", this.props.trigger)) { - props.onClick = createChainedFunction(this.toggle, this.props.onClick); - } + propTypes: { + component: _react2['default'].PropTypes.node, + format: _react2['default'].PropTypes.string, + unsafe: _react2['default'].PropTypes.bool + }, - if (isOneOf("hover", this.props.trigger)) { - props.onMouseOver = createChainedFunction(this.handleDelayedShow, this.props.onMouseOver); - props.onMouseOut = createChainedFunction(this.handleDelayedHide, this.props.onMouseOut); - } + getDefaultProps: function getDefaultProps() { + return { + component: 'span', + unsafe: false + }; + }, - if (isOneOf("focus", this.props.trigger)) { - props.onFocus = createChainedFunction(this.handleDelayedShow, this.props.onFocus); - props.onBlur = createChainedFunction(this.handleDelayedHide, this.props.onBlur); - } + render: function render() { + var format = _utilsValidComponentChildren2['default'].hasValidComponent(this.props.children) || typeof this.props.children === 'string' ? this.props.children : this.props.format; + var parent = this.props.component; + var unsafe = this.props.unsafe === true; + var props = _extends({}, this.props); - return cloneElement(React.Children.only(this.props.children), props); - }, + delete props.children; + delete props.format; + delete props.component; + delete props.unsafe; - componentWillUnmount: function componentWillUnmount() { - clearTimeout(this._hoverDelay); - }, + if (unsafe) { + var content = format.split(REGEXP).reduce(function (memo, match, index) { + var html = undefined; - componentDidMount: function componentDidMount() { - if (this.props.defaultOverlayShown) { - this.updateOverlayPosition(); - } - }, + if (index % 2 === 0) { + html = match; + } else { + html = props[match]; + delete props[match]; + } - handleDelayedShow: function handleDelayedShow() { - if (this._hoverDelay != null) { - clearTimeout(this._hoverDelay); - this._hoverDelay = null; - return; - } + if (_react2['default'].isValidElement(html)) { + throw new Error('cannot interpolate a React component into unsafe text'); + } - var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay; + memo += html; - if (!delay) { - this.show(); - return; - } + return memo; + }, ''); - this._hoverDelay = setTimeout((function () { - this._hoverDelay = null; - this.show(); - }).bind(this), delay); - }, + props.dangerouslySetInnerHTML = { __html: content }; - handleDelayedHide: function handleDelayedHide() { - if (this._hoverDelay != null) { - clearTimeout(this._hoverDelay); - this._hoverDelay = null; - return; + return _react2['default'].createElement(parent, props); } + var kids = format.split(REGEXP).reduce(function (memo, match, index) { + var child = undefined; - var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay; + if (index % 2 === 0) { + if (match.length === 0) { + return memo; + } - if (!delay) { - this.hide(); - return; - } + child = match; + } else { + child = props[match]; + delete props[match]; + } - this._hoverDelay = setTimeout((function () { - this._hoverDelay = null; - this.hide(); - }).bind(this), delay); - }, + memo.push(child); - updateOverlayPosition: function updateOverlayPosition() { - if (!this.isMounted()) { - return; - } + return memo; + }, []); - var pos = this.calcOverlayPosition(); + return _react2['default'].createElement(parent, props, kids); + } +}); - this.setState({ - overlayLeft: pos.left, - overlayTop: pos.top - }); - }, +exports['default'] = Interpolate; +module.exports = exports['default']; +},{"./utils/ValidComponentChildren":110,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"react":511}],63:[function(require,module,exports){ +'use strict'; - calcOverlayPosition: function calcOverlayPosition() { - var childOffset = this.getPosition(); +var _extends = require('babel-runtime/helpers/extends')['default']; - var overlayNode = this.getOverlayDOMNode(); - var overlayHeight = overlayNode.offsetHeight; - var overlayWidth = overlayNode.offsetWidth; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - switch (this.props.placement) { - case "right": - return { - top: childOffset.top + childOffset.height / 2 - overlayHeight / 2, - left: childOffset.left + childOffset.width - }; - case "left": - return { - top: childOffset.top + childOffset.height / 2 - overlayHeight / 2, - left: childOffset.left - overlayWidth - }; - case "top": - return { - top: childOffset.top - overlayHeight, - left: childOffset.left + childOffset.width / 2 - overlayWidth / 2 - }; - case "bottom": - return { - top: childOffset.top + childOffset.height, - left: childOffset.left + childOffset.width / 2 - overlayWidth / 2 - }; - default: - throw new Error("calcOverlayPosition(): No such placement of \"" + this.props.placement + "\" found."); - } - }, +exports.__esModule = true; - getPosition: function getPosition() { - var node = React.findDOMNode(this); - var container = this.getContainerDOMNode(); +var _react = require('react'); - var offset = container.tagName === "BODY" ? domUtils.getOffset(node) : domUtils.getPosition(node, container); +var _react2 = _interopRequireDefault(_react); - return assign({}, offset, { - height: node.offsetHeight, - width: node.offsetWidth - }); - } -}); +var _classnames = require('classnames'); -module.exports = OverlayTrigger; -},{"./OverlayMixin":62,"./utils/Object.assign":83,"./utils/createChainedFunction":86,"./utils/domUtils":87,"react":303}],64:[function(require,module,exports){ -"use strict"; +var _classnames2 = _interopRequireDefault(_classnames); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); -var React = _interopRequire(require("react")); +var Jumbotron = _react2['default'].createClass({ + displayName: 'Jumbotron', -var classNames = _interopRequire(require("classnames")); + propTypes: { + /** + * You can use a custom element for this component + */ + componentClass: _reactPropTypesLibElementType2['default'] + }, -var PageHeader = React.createClass({ - displayName: "PageHeader", + getDefaultProps: function getDefaultProps() { + return { componentClass: 'div' }; + }, render: function render() { - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, "page-header") }), - React.createElement( - "h1", - null, - this.props.children - ) + var ComponentClass = this.props.componentClass; + + return _react2['default'].createElement( + ComponentClass, + _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'jumbotron') }), + this.props.children ); } }); -module.exports = PageHeader; -},{"classnames":88,"react":303}],65:[function(require,module,exports){ -"use strict"; +exports['default'] = Jumbotron; +module.exports = exports['default']; +},{"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511,"react-prop-types/lib/elementType":271}],64:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var React = _interopRequire(require("react")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var classNames = _interopRequire(require("classnames")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var PageItem = React.createClass({ - displayName: "PageItem", +exports.__esModule = true; - propTypes: { - href: React.PropTypes.string, - target: React.PropTypes.string, - title: React.PropTypes.string, - disabled: React.PropTypes.bool, - previous: React.PropTypes.bool, - next: React.PropTypes.bool, - onSelect: React.PropTypes.func, - eventKey: React.PropTypes.any - }, +var _react = require('react'); - getDefaultProps: function getDefaultProps() { - return { - href: "#" - }; - }, +var _react2 = _interopRequireDefault(_react); - render: function render() { - var classes = { - disabled: this.props.disabled, - previous: this.props.previous, - next: this.props.next - }; +var _classnames = require('classnames'); - return React.createElement( - "li", - _extends({}, this.props, { - className: classNames(this.props.className, classes) }), - React.createElement( - "a", - { - href: this.props.href, - title: this.props.title, - target: this.props.target, - onClick: this.handleSelect, - ref: "anchor" }, - this.props.children - ) - ); - }, +var _classnames2 = _interopRequireDefault(_classnames); - handleSelect: function handleSelect(e) { - if (this.props.onSelect) { - e.preventDefault(); +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - if (!this.props.disabled) { - this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); - } - } - } -}); +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); -module.exports = PageItem; -},{"classnames":88,"react":303}],66:[function(require,module,exports){ -"use strict"; +var _styleMaps = require('./styleMaps'); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var Label = (function (_React$Component) { + _inherits(Label, _React$Component); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + function Label() { + _classCallCheck(this, _Label); -var _react = require("react"); + _React$Component.apply(this, arguments); + } -var React = _interopRequire(_react); + Label.prototype.render = function render() { + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); -var cloneElement = _react.cloneElement; + return _react2['default'].createElement( + 'span', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + this.props.children + ); + }; -var classNames = _interopRequire(require("classnames")); + var _Label = Label; + Label = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values().concat(_styleMaps.DEFAULT, _styleMaps.PRIMARY), _styleMaps.DEFAULT)(Label) || Label; + Label = _utilsBootstrapUtils.bsClass('label')(Label) || Label; + return Label; +})(_react2['default'].Component); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +exports['default'] = Label; +module.exports = exports['default']; +},{"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],65:[function(require,module,exports){ +'use strict'; -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var Pager = React.createClass({ - displayName: "Pager", +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - propTypes: { - onSelect: React.PropTypes.func - }, +var _extends = require('babel-runtime/helpers/extends')['default']; - render: function render() { - return React.createElement( - "ul", - _extends({}, this.props, { - className: classNames(this.props.className, "pager") }), - ValidComponentChildren.map(this.props.children, this.renderPageItem) - ); - }, +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - renderPageItem: function renderPageItem(child, index) { - return cloneElement(child, { - onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), - key: child.key ? child.key : index - }); - } -}); +exports.__esModule = true; -module.exports = Pager; -},{"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"classnames":88,"react":303}],67:[function(require,module,exports){ -"use strict"; +var _react = require('react'); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _react2 = _interopRequireDefault(_react); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _ListGroupItem = require('./ListGroupItem'); -var _react = require("react"); +var _ListGroupItem2 = _interopRequireDefault(_ListGroupItem); -var React = _interopRequire(_react); +var _classnames = require('classnames'); -var cloneElement = _react.cloneElement; +var _classnames2 = _interopRequireDefault(_classnames); -var classNames = _interopRequire(require("classnames")); +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); -var CollapsableMixin = _interopRequire(require("./CollapsableMixin")); +var ListGroup = (function (_React$Component) { + _inherits(ListGroup, _React$Component); -var Panel = React.createClass({ - displayName: "Panel", + function ListGroup() { + _classCallCheck(this, ListGroup); - mixins: [BootstrapMixin, CollapsableMixin], + _React$Component.apply(this, arguments); + } - propTypes: { - collapsable: React.PropTypes.bool, - onSelect: React.PropTypes.func, - header: React.PropTypes.node, - id: React.PropTypes.string, - footer: React.PropTypes.node, - eventKey: React.PropTypes.any - }, + ListGroup.prototype.render = function render() { + var _this = this; - getDefaultProps: function getDefaultProps() { - return { - bsClass: "panel", - bsStyle: "default" - }; - }, + var items = _utilsValidComponentChildren2['default'].map(this.props.children, function (item, index) { + return _react.cloneElement(item, { key: item.key ? item.key : index }); + }); - handleSelect: function handleSelect(e) { - e.selected = true; + if (this.areCustomChildren(items)) { + var Component = this.props.componentClass; + return _react2['default'].createElement( + Component, + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, 'list-group') }), + items + ); + } - if (this.props.onSelect) { - this.props.onSelect(e, this.props.eventKey); + var shouldRenderDiv = false; + + if (!this.props.children) { + shouldRenderDiv = true; } else { - e.preventDefault(); + _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child) { + if (_this.isAnchorOrButton(child.props)) { + shouldRenderDiv = true; + } + }); } - if (e.selected) { - this.handleToggle(); - } - }, + return shouldRenderDiv ? this.renderDiv(items) : this.renderUL(items); + }; - handleToggle: function handleToggle() { - this.setState({ expanded: !this.state.expanded }); - }, + ListGroup.prototype.isAnchorOrButton = function isAnchorOrButton(props) { + return props.href || props.onClick; + }; - getCollapsableDimensionValue: function getCollapsableDimensionValue() { - return React.findDOMNode(this.refs.panel).scrollHeight; - }, + ListGroup.prototype.areCustomChildren = function areCustomChildren(children) { + var customChildren = false; - getCollapsableDOMNode: function getCollapsableDOMNode() { - if (!this.isMounted() || !this.refs || !this.refs.panel) { - return null; - } + _utilsValidComponentChildren2['default'].forEach(children, function (child) { + if (child.type !== _ListGroupItem2['default']) { + customChildren = true; + } + }, this); - return React.findDOMNode(this.refs.panel); - }, + return customChildren; + }; - render: function render() { - var classes = this.getBsClassSet(); + ListGroup.prototype.renderUL = function renderUL(items) { + var listItems = _utilsValidComponentChildren2['default'].map(items, function (item) { + return _react.cloneElement(item, { listItem: true }); + }); - return React.createElement( - "div", + return _react2['default'].createElement( + 'ul', _extends({}, this.props, { - className: classNames(this.props.className, classes), - id: this.props.collapsable ? null : this.props.id, onSelect: null }), - this.renderHeading(), - this.props.collapsable ? this.renderCollapsableBody() : this.renderBody(), - this.renderFooter() + className: _classnames2['default'](this.props.className, 'list-group') }), + listItems ); - }, - - renderCollapsableBody: function renderCollapsableBody() { - var collapseClass = this.prefixClass("collapse"); + }; - return React.createElement( - "div", - { - className: classNames(this.getCollapsableClassSet(collapseClass)), - id: this.props.id, - ref: "panel", - "aria-expanded": this.isExpanded() ? "true" : "false" }, - this.renderBody() + ListGroup.prototype.renderDiv = function renderDiv(items) { + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, 'list-group') }), + items ); - }, + }; - renderBody: function renderBody() { - var allChildren = this.props.children; - var bodyElements = []; - var panelBodyChildren = []; - var bodyClass = this.prefixClass("body"); + return ListGroup; +})(_react2['default'].Component); - function getProps() { - return { key: bodyElements.length }; - } - - function addPanelChild(child) { - bodyElements.push(cloneElement(child, getProps())); - } +ListGroup.defaultProps = { + componentClass: 'div' +}; - function addPanelBody(children) { - bodyElements.push(React.createElement( - "div", - _extends({ className: bodyClass }, getProps()), - children - )); - } +ListGroup.propTypes = { + className: _react2['default'].PropTypes.string, + /** + * The element for ListGroup if children are + * user-defined custom components. + * @type {("ul"|"div")} + */ + componentClass: _react2['default'].PropTypes.oneOf(['ul', 'div']), + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]) +}; - function maybeRenderPanelBody() { - if (panelBodyChildren.length === 0) { - return; - } +exports['default'] = ListGroup; +module.exports = exports['default']; +},{"./ListGroupItem":66,"./utils/ValidComponentChildren":110,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],66:[function(require,module,exports){ +'use strict'; - addPanelBody(panelBodyChildren); - panelBodyChildren = []; - } +var _inherits = require('babel-runtime/helpers/inherits')['default']; - // Handle edge cases where we should not iterate through children. - if (!Array.isArray(allChildren) || allChildren.length === 0) { - if (this.shouldRenderFill(allChildren)) { - addPanelChild(allChildren); - } else { - addPanelBody(allChildren); - } - } else { +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - allChildren.forEach((function (child) { - if (this.shouldRenderFill(child)) { - maybeRenderPanelBody(); +var _extends = require('babel-runtime/helpers/extends')['default']; - // Separately add the filled element. - addPanelChild(child); - } else { - panelBodyChildren.push(child); - } - }).bind(this)); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - maybeRenderPanelBody(); - } +exports.__esModule = true; - return bodyElements; - }, +var _react = require('react'); - shouldRenderFill: function shouldRenderFill(child) { - return React.isValidElement(child) && child.props.fill != null; - }, +var _react2 = _interopRequireDefault(_react); - renderHeading: function renderHeading() { - var header = this.props.header; +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - if (!header) { - return null; - } +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - if (!React.isValidElement(header) || Array.isArray(header)) { - header = this.props.collapsable ? this.renderCollapsableTitle(header) : header; - } else if (this.props.collapsable) { +var _styleMaps = require('./styleMaps'); - header = cloneElement(header, { - className: classNames(this.prefixClass("title")), - children: this.renderAnchor(header.props.children) - }); - } else { +var _classnames = require('classnames'); - header = cloneElement(header, { - className: classNames(this.prefixClass("title")) - }); - } +var _classnames2 = _interopRequireDefault(_classnames); - return React.createElement( - "div", - { className: this.prefixClass("heading") }, - header - ); - }, +var ListGroupItem = (function (_React$Component) { + _inherits(ListGroupItem, _React$Component); - renderAnchor: function renderAnchor(header) { - return React.createElement( - "a", - { - href: "#" + (this.props.id || ""), - className: this.isExpanded() ? null : "collapsed", - "aria-expanded": this.isExpanded() ? "true" : "false", - onClick: this.handleSelect }, - header - ); - }, + function ListGroupItem() { + _classCallCheck(this, ListGroupItem); - renderCollapsableTitle: function renderCollapsableTitle(header) { - return React.createElement( - "h4", - { className: this.prefixClass("title") }, - this.renderAnchor(header) - ); - }, + _React$Component.apply(this, arguments); + } - renderFooter: function renderFooter() { - if (!this.props.footer) { - return null; - } + ListGroupItem.prototype.render = function render() { + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); - return React.createElement( - "div", - { className: this.prefixClass("footer") }, - this.props.footer - ); - } -}); + classes.active = this.props.active; + classes.disabled = this.props.disabled; -module.exports = Panel; -},{"./BootstrapMixin":34,"./CollapsableMixin":41,"classnames":88,"react":303}],68:[function(require,module,exports){ -"use strict"; + if (this.props.href) { + return this.renderAnchor(classes); + } else if (this.props.onClick) { + return this.renderButton(classes); + } else if (this.props.listItem) { + return this.renderLi(classes); + } -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + return this.renderSpan(classes); + }; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + ListGroupItem.prototype.renderLi = function renderLi(classes) { + return _react2['default'].createElement( + 'li', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + this.props.header ? this.renderStructuredContent() : this.props.children + ); + }; -/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsStyle"]}]*/ -/* BootstrapMixin contains `bsStyle` type validation */ + ListGroupItem.prototype.renderAnchor = function renderAnchor(classes) { + return _react2['default'].createElement( + 'a', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, classes) + }), + this.props.header ? this.renderStructuredContent() : this.props.children + ); + }; -var _react = require("react"); + ListGroupItem.prototype.renderButton = function renderButton(classes) { + return _react2['default'].createElement( + 'button', + _extends({ + type: 'button' + }, this.props, { + className: _classnames2['default'](this.props.className, classes) }), + this.props.header ? this.renderStructuredContent() : this.props.children + ); + }; -var React = _interopRequire(_react); + ListGroupItem.prototype.renderSpan = function renderSpan(classes) { + return _react2['default'].createElement( + 'span', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + this.props.header ? this.renderStructuredContent() : this.props.children + ); + }; -var cloneElement = _react.cloneElement; + ListGroupItem.prototype.renderStructuredContent = function renderStructuredContent() { + var header = undefined; + var headingClass = _utilsBootstrapUtils2['default'].prefix(this.props, 'heading'); -var classNames = _interopRequire(require("classnames")); + if (_react2['default'].isValidElement(this.props.header)) { + header = _react.cloneElement(this.props.header, { + key: 'header', + className: _classnames2['default'](this.props.header.props.className, headingClass) + }); + } else { + header = _react2['default'].createElement( + 'h4', + { key: 'header', className: headingClass }, + this.props.header + ); + } -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + var content = _react2['default'].createElement( + 'p', + { key: 'content', className: _utilsBootstrapUtils2['default'].prefix(this.props, 'text') }, + this.props.children + ); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); + return [header, content]; + }; -var PanelGroup = React.createClass({ - displayName: "PanelGroup", + return ListGroupItem; +})(_react2['default'].Component); + +ListGroupItem.propTypes = { + className: _react2['default'].PropTypes.string, + active: _react2['default'].PropTypes.any, + disabled: _react2['default'].PropTypes.any, + header: _react2['default'].PropTypes.node, + listItem: _react2['default'].PropTypes.bool, + onClick: _react2['default'].PropTypes.func, + eventKey: _react2['default'].PropTypes.any, + href: _react2['default'].PropTypes.string, + target: _react2['default'].PropTypes.string +}; - mixins: [BootstrapMixin], +ListGroupItem.defaultTypes = { + listItem: false +}; - propTypes: { - collapsable: React.PropTypes.bool, - accordion: React.PropTypes.bool, - activeKey: React.PropTypes.any, - defaultActiveKey: React.PropTypes.any, - onSelect: React.PropTypes.func - }, +exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _utilsBootstrapUtils.bsClass('list-group-item', ListGroupItem)); +module.exports = exports['default']; +},{"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],67:[function(require,module,exports){ +'use strict'; - getDefaultProps: function getDefaultProps() { - return { - bsClass: "panel-group" - }; - }, +var _inherits = require('babel-runtime/helpers/inherits')['default']; - getInitialState: function getInitialState() { - var defaultActiveKey = this.props.defaultActiveKey; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - return { - activeKey: defaultActiveKey - }; - }, +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; - render: function render() { - var classes = this.getBsClassSet(); - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes), onSelect: null }), - ValidComponentChildren.map(this.props.children, this.renderPanel) - ); - }, +var _extends = require('babel-runtime/helpers/extends')['default']; - renderPanel: function renderPanel(child, index) { - var activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - var props = { - bsStyle: child.props.bsStyle || this.props.bsStyle, - key: child.key ? child.key : index, - ref: child.ref - }; +exports.__esModule = true; - if (this.props.accordion) { - props.collapsable = true; - props.expanded = child.props.eventKey === activeKey; - props.onSelect = this.handleSelect; - } +var _classnames = require('classnames'); - return cloneElement(child, props); - }, +var _classnames2 = _interopRequireDefault(_classnames); - shouldComponentUpdate: function shouldComponentUpdate() { - // Defer any updates to this component during the `onSelect` handler. - return !this._isChanging; - }, +var _react = require('react'); - handleSelect: function handleSelect(e, key) { - e.preventDefault(); +var _react2 = _interopRequireDefault(_react); - if (this.props.onSelect) { - this._isChanging = true; - this.props.onSelect(key); - this._isChanging = false; - } +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - if (this.state.activeKey === key) { - key = null; - } +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - this.setState({ - activeKey: key - }); - } -}); +var _reactPropTypesLibAll = require('react-prop-types/lib/all'); -module.exports = PanelGroup; -},{"./BootstrapMixin":34,"./utils/ValidComponentChildren":85,"classnames":88,"react":303}],69:[function(require,module,exports){ -"use strict"; +var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _SafeAnchor = require('./SafeAnchor'); -var _defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }; +var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); -var React = _interopRequire(require("react")); +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); -var classNames = _interopRequire(require("classnames")); +var MenuItem = (function (_React$Component) { + _inherits(MenuItem, _React$Component); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + function MenuItem(props) { + _classCallCheck(this, MenuItem); -var Popover = React.createClass({ - displayName: "Popover", + _React$Component.call(this, props); - mixins: [BootstrapMixin], + this.handleClick = this.handleClick.bind(this); + } - propTypes: { - placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), - positionLeft: React.PropTypes.number, - positionTop: React.PropTypes.number, - arrowOffsetLeft: React.PropTypes.number, - arrowOffsetTop: React.PropTypes.number, - title: React.PropTypes.node - }, + MenuItem.prototype.handleClick = function handleClick(event) { + if (!this.props.href || this.props.disabled) { + event.preventDefault(); + } - getDefaultProps: function getDefaultProps() { - return { - placement: "right" - }; - }, + if (this.props.disabled) { + return; + } - render: function render() { - var _this = this; + if (this.props.onSelect) { + this.props.onSelect(event, this.props.eventKey); + } + }; - var classes = (function () { - var _classes = { - popover: true }; + MenuItem.prototype.render = function render() { + var headerClass = _utilsBootstrapUtils2['default'].prefix(this.props, 'header'); - _defineProperty(_classes, _this.props.placement, true); + if (this.props.divider) { + return _react2['default'].createElement('li', { role: 'separator', className: 'divider' }); + } - _defineProperty(_classes, "in", _this.props.positionLeft != null || _this.props.positionTop != null); + if (this.props.header) { + return _react2['default'].createElement( + 'li', + { role: 'heading', className: headerClass }, + this.props.children + ); + } - return _classes; - })(); + var _props = this.props; + var className = _props.className; + var style = _props.style; + var onClick = _props.onClick; - var style = { - left: this.props.positionLeft, - top: this.props.positionTop, - display: "block" - }; + var props = _objectWithoutProperties(_props, ['className', 'style', 'onClick']); - var arrowStyle = { - left: this.props.arrowOffsetLeft, - top: this.props.arrowOffsetTop + var classes = { + disabled: this.props.disabled, + active: this.props.active }; - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes), style: style, title: null }), - React.createElement("div", { className: "arrow", style: arrowStyle }), - this.props.title ? this.renderTitle() : null, - React.createElement( - "div", - { className: "popover-content" }, - this.props.children - ) + return _react2['default'].createElement( + 'li', + { role: 'presentation', + className: _classnames2['default'](className, classes), + style: style + }, + _react2['default'].createElement(_SafeAnchor2['default'], _extends({}, props, { + role: 'menuitem', + tabIndex: '-1', + onClick: _utilsCreateChainedFunction2['default'](onClick, this.handleClick) + })) ); - }, + }; - renderTitle: function renderTitle() { - return React.createElement( - "h3", - { className: "popover-title" }, - this.props.title - ); - } -}); + return MenuItem; +})(_react2['default'].Component); + +MenuItem.propTypes = { + active: _react2['default'].PropTypes.bool, + disabled: _react2['default'].PropTypes.bool, + divider: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) { + if (props.divider && props.children) { + return new Error('Children will not be rendered for dividers'); + } + }), + eventKey: _react2['default'].PropTypes.any, + header: _react2['default'].PropTypes.bool, + href: _react2['default'].PropTypes.string, + target: _react2['default'].PropTypes.string, + title: _react2['default'].PropTypes.string, + onClick: _react2['default'].PropTypes.func, + onKeyDown: _react2['default'].PropTypes.func, + onSelect: _react2['default'].PropTypes.func, + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]) +}; -module.exports = Popover; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],70:[function(require,module,exports){ -"use strict"; +MenuItem.defaultProps = { + divider: false, + disabled: false, + header: false +}; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +exports['default'] = _utilsBootstrapUtils.bsClass('dropdown', MenuItem); +module.exports = exports['default']; +},{"./SafeAnchor":96,"./utils/bootstrapUtils":111,"./utils/createChainedFunction":114,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"react":511,"react-prop-types/lib/all":268}],68:[function(require,module,exports){ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/* eslint-disable react/prop-types */ +'use strict'; -var _react = require("react"); +var _extends = require('babel-runtime/helpers/extends')['default']; -var React = _interopRequire(_react); +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; -var cloneElement = _react.cloneElement; +var _Object$keys = require('babel-runtime/core-js/object/keys')['default']; -var Interpolate = _interopRequire(require("./Interpolate")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +exports.__esModule = true; -var classNames = _interopRequire(require("classnames")); +var _classnames = require('classnames'); -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _classnames2 = _interopRequireDefault(_classnames); -var ProgressBar = React.createClass({ - displayName: "ProgressBar", +var _react = require('react'); - propTypes: { - min: React.PropTypes.number, - now: React.PropTypes.number, - max: React.PropTypes.number, - label: React.PropTypes.node, - srOnly: React.PropTypes.bool, - striped: React.PropTypes.bool, - active: React.PropTypes.bool - }, +var _react2 = _interopRequireDefault(_react); - mixins: [BootstrapMixin], +var _reactDom = require('react-dom'); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "progress-bar", - min: 0, - max: 100 - }; - }, +var _reactDom2 = _interopRequireDefault(_reactDom); - getPercentage: function getPercentage(now, min, max) { - return Math.ceil((now - min) / (max - min) * 100); - }, +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - render: function render() { - var classes = { - progress: true - }; +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - if (this.props.active) { - classes["progress-striped"] = true; - classes.active = true; - } else if (this.props.striped) { - classes["progress-striped"] = true; - } +var _styleMaps = require('./styleMaps'); - if (!ValidComponentChildren.hasValidComponent(this.props.children)) { - if (!this.props.isChild) { - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.renderProgressBar() - ); - } else { - return this.renderProgressBar(); - } - } else { - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - ValidComponentChildren.map(this.props.children, this.renderChildBar) - ); - } - }, +var _domHelpersUtilScrollbarSize = require('dom-helpers/util/scrollbarSize'); - renderChildBar: function renderChildBar(child, index) { - return cloneElement(child, { - isChild: true, - key: child.key ? child.key : index - }); - }, +var _domHelpersUtilScrollbarSize2 = _interopRequireDefault(_domHelpersUtilScrollbarSize); - renderProgressBar: function renderProgressBar() { - var percentage = this.getPercentage(this.props.now, this.props.min, this.props.max); +var _domHelpersUtilInDOM = require('dom-helpers/util/inDOM'); - var label = undefined; +var _domHelpersUtilInDOM2 = _interopRequireDefault(_domHelpersUtilInDOM); - if (typeof this.props.label === "string") { - label = this.renderLabel(percentage); - } else if (this.props.label) { - label = this.props.label; - } +var _domHelpersOwnerDocument = require('dom-helpers/ownerDocument'); - if (this.props.srOnly) { - label = this.renderScreenReaderOnlyLabel(label); - } +var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument); - var classes = this.getBsClassSet(); +var _domHelpersEvents = require('dom-helpers/events'); - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes), role: "progressbar", - style: { width: percentage + "%" }, - "aria-valuenow": this.props.now, - "aria-valuemin": this.props.min, - "aria-valuemax": this.props.max }), - label - ); - }, +var _domHelpersEvents2 = _interopRequireDefault(_domHelpersEvents); - renderLabel: function renderLabel(percentage) { - var InterpolateClass = this.props.interpolateClass || Interpolate; +var _reactPropTypesLibElementType = require('react-prop-types/lib/elementType'); - return React.createElement( - InterpolateClass, - { - now: this.props.now, - min: this.props.min, - max: this.props.max, - percent: percentage, - bsStyle: this.props.bsStyle }, - this.props.label - ); - }, +var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - renderScreenReaderOnlyLabel: function renderScreenReaderOnlyLabel(label) { - return React.createElement( - "span", - { className: "sr-only" }, - label - ); - } -}); +var _Fade = require('./Fade'); -module.exports = ProgressBar; -},{"./BootstrapMixin":34,"./Interpolate":51,"./utils/ValidComponentChildren":85,"classnames":88,"react":303}],71:[function(require,module,exports){ -"use strict"; +var _Fade2 = _interopRequireDefault(_Fade); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _ModalDialog = require('./ModalDialog'); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _ModalDialog2 = _interopRequireDefault(_ModalDialog); -var React = _interopRequire(require("react")); +var _ModalBody = require('./ModalBody'); -var classNames = _interopRequire(require("classnames")); +var _ModalBody2 = _interopRequireDefault(_ModalBody); -var Row = React.createClass({ - displayName: "Row", +var _ModalHeader = require('./ModalHeader'); - propTypes: { - componentClass: React.PropTypes.node.isRequired - }, +var _ModalHeader2 = _interopRequireDefault(_ModalHeader); - getDefaultProps: function getDefaultProps() { - return { - componentClass: "div" - }; - }, +var _ModalTitle = require('./ModalTitle'); - render: function render() { - var ComponentClass = this.props.componentClass; +var _ModalTitle2 = _interopRequireDefault(_ModalTitle); - return React.createElement( - ComponentClass, - _extends({}, this.props, { className: classNames(this.props.className, "row") }), - this.props.children - ); - } -}); +var _ModalFooter = require('./ModalFooter'); -module.exports = Row; -},{"classnames":88,"react":303}],72:[function(require,module,exports){ -"use strict"; +var _ModalFooter2 = _interopRequireDefault(_ModalFooter); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _reactOverlaysLibModal = require('react-overlays/lib/Modal'); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _reactOverlaysLibModal2 = _interopRequireDefault(_reactOverlaysLibModal); -/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsSize"]}]*/ -/* BootstrapMixin contains `bsSize` type validation */ +var _reactOverlaysLibUtilsIsOverflowing = require('react-overlays/lib/utils/isOverflowing'); -var React = _interopRequire(require("react")); +var _reactOverlaysLibUtilsIsOverflowing2 = _interopRequireDefault(_reactOverlaysLibUtilsIsOverflowing); -var classNames = _interopRequire(require("classnames")); +var _lodashCompatObjectPick = require('lodash-compat/object/pick'); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick); -var DropdownStateMixin = _interopRequire(require("./DropdownStateMixin")); +var Modal = _react2['default'].createClass({ + displayName: 'Modal', -var Button = _interopRequire(require("./Button")); + propTypes: _extends({}, _reactOverlaysLibModal2['default'].propTypes, _ModalDialog2['default'].propTypes, { -var ButtonGroup = _interopRequire(require("./ButtonGroup")); + /** + * Include a backdrop component. Specify 'static' for a backdrop that doesn't trigger an "onHide" when clicked. + */ + backdrop: _react2['default'].PropTypes.oneOf(['static', true, false]), + + /** + * Close the modal when escape key is pressed + */ + keyboard: _react2['default'].PropTypes.bool, + + /** + * Open and close the Modal with a slide and fade animation. + */ + animation: _react2['default'].PropTypes.bool, -var DropdownMenu = _interopRequire(require("./DropdownMenu")); + /** + * A Component type that provides the modal content Markup. This is a useful prop when you want to use your own + * styles and markup to create a custom modal component. + */ + dialogComponent: _reactPropTypesLibElementType2['default'], -var SplitButton = React.createClass({ - displayName: "SplitButton", + /** + * When `true` The modal will automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. + * Generally this should never be set to false as it makes the Modal less accessible to assistive technologies, like screen-readers. + */ + autoFocus: _react2['default'].PropTypes.bool, - mixins: [BootstrapMixin, DropdownStateMixin], + /** + * When `true` The modal will prevent focus from leaving the Modal while open. + * Consider leaving the default value here, as it is necessary to make the Modal work well with assistive technologies, + * such as screen readers. + */ + enforceFocus: _react2['default'].PropTypes.bool, - propTypes: { - pullRight: React.PropTypes.bool, - title: React.PropTypes.node, - href: React.PropTypes.string, - id: React.PropTypes.string, - target: React.PropTypes.string, - dropdownTitle: React.PropTypes.node, - dropup: React.PropTypes.bool, - onClick: React.PropTypes.func, - onSelect: React.PropTypes.func, - disabled: React.PropTypes.bool + /** + * Hide this from automatic props documentation generation. + * @private + */ + bsStyle: _react2['default'].PropTypes.string, + + /** + * When `true` The modal will show itself. + */ + show: _react2['default'].PropTypes.bool, + + /** + * A callback fired when the header closeButton or non-static backdrop is + * clicked. Required if either are specified. + */ + onHide: _react2['default'].PropTypes.func + }), + + childContextTypes: { + '$bs_onModalHide': _react2['default'].PropTypes.func }, getDefaultProps: function getDefaultProps() { + return _extends({}, _reactOverlaysLibModal2['default'].defaultProps, { + bsClass: 'modal', + animation: true, + dialogComponent: _ModalDialog2['default'] + }); + }, + + getInitialState: function getInitialState() { return { - dropdownTitle: "Toggle dropdown" + modalStyles: {} }; }, - render: function render() { - var groupClasses = { - open: this.state.open, - dropup: this.props.dropup + getChildContext: function getChildContext() { + return { + $bs_onModalHide: this.props.onHide }; + }, - var button = React.createElement( - Button, - _extends({}, this.props, { - ref: "button", - onClick: this.handleButtonClick, - title: null, - id: null }), - this.props.title + componentWillUnmount: function componentWillUnmount() { + _domHelpersEvents2['default'].off(window, 'resize', this.handleWindowResize); + }, + + render: function render() { + var _this = this; + + var _props = this.props; + var className = _props.className; + var children = _props.children; + var dialogClassName = _props.dialogClassName; + var animation = _props.animation; + + var props = _objectWithoutProperties(_props, ['className', 'children', 'dialogClassName', 'animation']); + + var modalStyles = this.state.modalStyles; + + var inClass = { 'in': props.show && !animation }; + var Dialog = props.dialogComponent; + + var parentProps = _lodashCompatObjectPick2['default'](props, _Object$keys(_reactOverlaysLibModal2['default'].propTypes).concat(['onExit', 'onExiting', 'onEnter', 'onEntered']) // the rest are fired in _onHide() and _onShow() ); - var dropdownButton = React.createElement( - Button, - _extends({}, this.props, { - ref: "dropdownButton", - className: classNames(this.props.className, "dropdown-toggle"), - onClick: this.handleDropdownClick, - title: null, - href: null, - target: null, - id: null }), - React.createElement( - "span", - { className: "sr-only" }, - this.props.dropdownTitle - ), - React.createElement("span", { className: "caret" }), - React.createElement( - "span", - { style: { letterSpacing: "-.3em" } }, - " " - ) + var modal = _react2['default'].createElement( + Dialog, + _extends({ + key: 'modal', + ref: function (ref) { + return _this._modal = ref; + } + }, props, { + style: modalStyles, + className: _classnames2['default'](className, inClass), + dialogClassName: dialogClassName, + onClick: props.backdrop === true ? this.handleDialogClick : null + }), + this.props.children ); - return React.createElement( - ButtonGroup, - { - bsSize: this.props.bsSize, - className: classNames(groupClasses), - id: this.props.id }, - button, - dropdownButton, - React.createElement( - DropdownMenu, - { - ref: "menu", - onSelect: this.handleOptionSelect, - "aria-labelledby": this.props.id, - pullRight: this.props.pullRight }, - this.props.children - ) + return _react2['default'].createElement( + _reactOverlaysLibModal2['default'], + _extends({}, parentProps, { + show: props.show, + ref: function (ref) { + _this._wrapper = ref && ref.refs.modal; + _this._backdrop = ref && ref.refs.backdrop; + }, + onEntering: this._onShow, + onExited: this._onHide, + backdropClassName: _classnames2['default'](_utilsBootstrapUtils2['default'].prefix(props, 'backdrop'), inClass), + containerClassName: _utilsBootstrapUtils2['default'].prefix(props, 'open'), + transition: animation ? _Fade2['default'] : undefined, + dialogTransitionTimeout: Modal.TRANSITION_DURATION, + backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION + }), + modal ); }, - handleButtonClick: function handleButtonClick(e) { - if (this.state.open) { - this.setDropdownState(false); + _onShow: function _onShow() { + _domHelpersEvents2['default'].on(window, 'resize', this.handleWindowResize); + + this.setState(this._getStyles()); + + if (this.props.onEntering) { + var _props2; + + (_props2 = this.props).onEntering.apply(_props2, arguments); } + }, + + _onHide: function _onHide() { + _domHelpersEvents2['default'].off(window, 'resize', this.handleWindowResize); + + if (this.props.onExited) { + var _props3; - if (this.props.onClick) { - this.props.onClick(e, this.props.href, this.props.target); + (_props3 = this.props).onExited.apply(_props3, arguments); } }, - handleDropdownClick: function handleDropdownClick(e) { - e.preventDefault(); + handleDialogClick: function handleDialogClick(e) { + if (e.target !== e.currentTarget) { + return; + } - this.setDropdownState(!this.state.open); + this.props.onHide(); }, - handleOptionSelect: function handleOptionSelect(key) { - if (this.props.onSelect) { - this.props.onSelect(key); + handleWindowResize: function handleWindowResize() { + this.setState(this._getStyles()); + }, + + _getStyles: function _getStyles() { + if (!_domHelpersUtilInDOM2['default']) { + return {}; } - this.setDropdownState(false); + var node = _reactDom2['default'].findDOMNode(this._modal); + var doc = _domHelpersOwnerDocument2['default'](node); + + var scrollHt = node.scrollHeight; + var bodyIsOverflowing = _reactOverlaysLibUtilsIsOverflowing2['default'](_reactDom2['default'].findDOMNode(this.props.container || doc.body)); + var modalIsOverflowing = scrollHt > doc.documentElement.clientHeight; + + return { + modalStyles: { + paddingRight: bodyIsOverflowing && !modalIsOverflowing ? _domHelpersUtilScrollbarSize2['default']() : void 0, + paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? _domHelpersUtilScrollbarSize2['default']() : void 0 + } + }; } }); -module.exports = SplitButton; -},{"./BootstrapMixin":34,"./Button":35,"./ButtonGroup":36,"./DropdownMenu":44,"./DropdownStateMixin":45,"classnames":88,"react":303}],73:[function(require,module,exports){ -"use strict"; +Modal.Body = _ModalBody2['default']; +Modal.Header = _ModalHeader2['default']; +Modal.Title = _ModalTitle2['default']; +Modal.Footer = _ModalFooter2['default']; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +Modal.Dialog = _ModalDialog2['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +Modal.TRANSITION_DURATION = 300; +Modal.BACKDROP_TRANSITION_DURATION = 150; -var _react = require("react"); +exports['default'] = _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], _utilsBootstrapUtils.bsClass('modal', Modal)); +module.exports = exports['default']; +},{"./Fade":53,"./ModalBody":69,"./ModalDialog":70,"./ModalFooter":71,"./ModalHeader":72,"./ModalTitle":73,"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/core-js/object/keys":119,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"dom-helpers/events":156,"dom-helpers/ownerDocument":159,"dom-helpers/util/inDOM":177,"dom-helpers/util/scrollbarSize":178,"lodash-compat/object/pick":246,"react":511,"react-dom":278,"react-overlays/lib/Modal":250,"react-overlays/lib/utils/isOverflowing":261,"react-prop-types/lib/elementType":271}],69:[function(require,module,exports){ +'use strict'; -var React = _interopRequire(_react); +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var cloneElement = _react.cloneElement; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var classNames = _interopRequire(require("classnames")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var createChainedFunction = _interopRequire(require("./utils/createChainedFunction")); +exports.__esModule = true; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _react = require('react'); -var SubNav = React.createClass({ - displayName: "SubNav", +var _react2 = _interopRequireDefault(_react); - mixins: [BootstrapMixin], +var _classnames = require('classnames'); - propTypes: { - onSelect: React.PropTypes.func, - active: React.PropTypes.bool, - activeHref: React.PropTypes.string, - activeKey: React.PropTypes.any, - disabled: React.PropTypes.bool, - eventKey: React.PropTypes.any, - href: React.PropTypes.string, - title: React.PropTypes.string, - text: React.PropTypes.node, - target: React.PropTypes.string - }, +var _classnames2 = _interopRequireDefault(_classnames); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "nav" - }; - }, +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - handleClick: function handleClick(e) { - if (this.props.onSelect) { - e.preventDefault(); +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - if (!this.props.disabled) { - this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); - } - } - }, +var ModalBody = (function (_React$Component) { + _inherits(ModalBody, _React$Component); - isActive: function isActive() { - return this.isChildActive(this); - }, + function ModalBody() { + _classCallCheck(this, ModalBody); - isChildActive: function isChildActive(child) { - var _this = this; + _React$Component.apply(this, arguments); + } - if (child.props.active) { - return true; - } + ModalBody.prototype.render = function render() { + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, _utilsBootstrapUtils2['default'].prefix(this.props, 'body')) }), + this.props.children + ); + }; - if (this.props.activeKey != null && this.props.activeKey === child.props.eventKey) { - return true; - } + return ModalBody; +})(_react2['default'].Component); - if (this.props.activeHref != null && this.props.activeHref === child.props.href) { - return true; - } +exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalBody); +module.exports = exports['default']; +},{"./utils/bootstrapUtils":111,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],70:[function(require,module,exports){ +/* eslint-disable react/prop-types */ +'use strict'; - if (child.props.children) { - var _ret = (function () { - var isActive = false; +var _extends = require('babel-runtime/helpers/extends')['default']; - ValidComponentChildren.forEach(child.props.children, function (grandchild) { - if (this.isChildActive(grandchild)) { - isActive = true; - } - }, _this); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - return { - v: isActive - }; - })(); +exports.__esModule = true; - if (typeof _ret === "object") { - return _ret.v; - } - } +var _react = require('react'); - return false; - }, +var _react2 = _interopRequireDefault(_react); - getChildActiveProp: function getChildActiveProp(child) { - if (child.props.active) { - return true; - } - if (this.props.activeKey != null) { - if (child.props.eventKey === this.props.activeKey) { - return true; - } - } - if (this.props.activeHref != null) { - if (child.props.href === this.props.activeHref) { - return true; - } - } +var _classnames = require('classnames'); - return child.props.active; +var _classnames2 = _interopRequireDefault(_classnames); + +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); + +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var _styleMaps = require('./styleMaps'); + +var ModalDialog = _react2['default'].createClass({ + displayName: 'ModalDialog', + + propTypes: { + /** + * A css class to apply to the Modal dialog DOM node. + */ + dialogClassName: _react2['default'].PropTypes.string }, render: function render() { - var classes = { - active: this.isActive(), - disabled: this.props.disabled - }; + var modalStyle = _extends({ + display: 'block' + }, this.props.style); + var prefix = _utilsBootstrapUtils2['default'].prefix(this.props); + var dialogClasses = _utilsBootstrapUtils2['default'].getClassSet(this.props); - return React.createElement( - "li", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - React.createElement( - "a", - { - href: this.props.href, - title: this.props.title, - target: this.props.target, - onClick: this.handleClick, - ref: "anchor" }, - this.props.text - ), - React.createElement( - "ul", - { className: "nav" }, - ValidComponentChildren.map(this.props.children, this.renderNavItem) + delete dialogClasses[prefix]; + dialogClasses[_utilsBootstrapUtils2['default'].prefix(this.props, 'dialog')] = true; + + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { + title: null, + tabIndex: '-1', + role: 'dialog', + style: modalStyle, + className: _classnames2['default'](this.props.className, prefix) + }), + _react2['default'].createElement( + 'div', + { className: _classnames2['default'](this.props.dialogClassName, dialogClasses) }, + _react2['default'].createElement( + 'div', + { className: _utilsBootstrapUtils2['default'].prefix(this.props, 'content'), role: 'document' }, + this.props.children + ) ) ); - }, - - renderNavItem: function renderNavItem(child, index) { - return cloneElement(child, { - active: this.getChildActiveProp(child), - onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), - key: child.key ? child.key : index - }); } }); -module.exports = SubNav; -},{"./BootstrapMixin":34,"./utils/ValidComponentChildren":85,"./utils/createChainedFunction":86,"classnames":88,"react":303}],74:[function(require,module,exports){ -"use strict"; - -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +exports['default'] = _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], _utilsBootstrapUtils.bsClass('modal', ModalDialog)); +module.exports = exports['default']; +},{"./styleMaps":107,"./utils/bootstrapUtils":111,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],71:[function(require,module,exports){ +'use strict'; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var React = _interopRequire(require("react")); +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var classNames = _interopRequire(require("classnames")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var TransitionEvents = _interopRequire(require("./utils/TransitionEvents")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var TabPane = React.createClass({ - displayName: "TabPane", +exports.__esModule = true; - propTypes: { - active: React.PropTypes.bool, - animation: React.PropTypes.bool, - onAnimateOutEnd: React.PropTypes.func - }, +var _react = require('react'); - getDefaultProps: function getDefaultProps() { - return { - animation: true - }; - }, +var _react2 = _interopRequireDefault(_react); - getInitialState: function getInitialState() { - return { - animateIn: false, - animateOut: false - }; - }, +var _classnames = require('classnames'); - componentWillReceiveProps: function componentWillReceiveProps(nextProps) { - if (this.props.animation) { - if (!this.state.animateIn && nextProps.active && !this.props.active) { - this.setState({ - animateIn: true - }); - } else if (!this.state.animateOut && !nextProps.active && this.props.active) { - this.setState({ - animateOut: true - }); - } - } - }, +var _classnames2 = _interopRequireDefault(_classnames); - componentDidUpdate: function componentDidUpdate() { - if (this.state.animateIn) { - setTimeout(this.startAnimateIn, 0); - } - if (this.state.animateOut) { - TransitionEvents.addEndEventListener(React.findDOMNode(this), this.stopAnimateOut); - } - }, +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - startAnimateIn: function startAnimateIn() { - if (this.isMounted()) { - this.setState({ - animateIn: false - }); - } - }, +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - stopAnimateOut: function stopAnimateOut() { - if (this.isMounted()) { - this.setState({ - animateOut: false - }); +var ModalFooter = (function (_React$Component) { + _inherits(ModalFooter, _React$Component); - if (this.props.onAnimateOutEnd) { - this.props.onAnimateOutEnd(); - } - } - }, + function ModalFooter() { + _classCallCheck(this, ModalFooter); - render: function render() { - var classes = { - "tab-pane": true, - fade: true, - active: this.props.active || this.state.animateOut, - "in": this.props.active && !this.state.animateIn - }; + _React$Component.apply(this, arguments); + } - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), + ModalFooter.prototype.render = function render() { + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, _utilsBootstrapUtils2['default'].prefix(this.props, 'footer')) }), this.props.children ); - } -}); + }; -module.exports = TabPane; -},{"./utils/TransitionEvents":84,"classnames":88,"react":303}],75:[function(require,module,exports){ -"use strict"; + return ModalFooter; +})(_react2['default'].Component); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +ModalFooter.propTypes = { + /** + * A css class applied to the Component + */ + bsClass: _react2['default'].PropTypes.string +}; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +ModalFooter.defaultProps = { + bsClass: 'modal' +}; -var _react = require("react"); +exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalFooter); +module.exports = exports['default']; +},{"./utils/bootstrapUtils":111,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],72:[function(require,module,exports){ +'use strict'; -var React = _interopRequire(_react); +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var cloneElement = _react.cloneElement; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; -var ValidComponentChildren = _interopRequire(require("./utils/ValidComponentChildren")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var Nav = _interopRequire(require("./Nav")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var NavItem = _interopRequire(require("./NavItem")); +exports.__esModule = true; -function getDefaultActiveKeyFromChildren(children) { - var defaultActiveKey = undefined; +var _react = require('react'); - ValidComponentChildren.forEach(children, function (child) { - if (defaultActiveKey == null) { - defaultActiveKey = child.props.eventKey; - } - }); +var _react2 = _interopRequireDefault(_react); - return defaultActiveKey; -} +var _classnames = require('classnames'); -var TabbedArea = React.createClass({ - displayName: "TabbedArea", +var _classnames2 = _interopRequireDefault(_classnames); - mixins: [BootstrapMixin], +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - propTypes: { - activeKey: React.PropTypes.any, - defaultActiveKey: React.PropTypes.any, - bsStyle: React.PropTypes.oneOf(["tabs", "pills"]), - animation: React.PropTypes.bool, - id: React.PropTypes.string, - onSelect: React.PropTypes.func - }, +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - getDefaultProps: function getDefaultProps() { - return { - bsStyle: "tabs", - animation: true - }; - }, +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); - getInitialState: function getInitialState() { - var defaultActiveKey = this.props.defaultActiveKey != null ? this.props.defaultActiveKey : getDefaultActiveKeyFromChildren(this.props.children); +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - // TODO: In __DEV__ mode warn via `console.warn` if no `defaultActiveKey` has - // been set by this point, invalid children or missing key properties are likely the cause. +var ModalHeader = (function (_React$Component) { + _inherits(ModalHeader, _React$Component); - return { - activeKey: defaultActiveKey, - previousActiveKey: null - }; - }, + function ModalHeader() { + _classCallCheck(this, ModalHeader); - componentWillReceiveProps: function componentWillReceiveProps(nextProps) { - if (nextProps.activeKey != null && nextProps.activeKey !== this.props.activeKey) { - this.setState({ - previousActiveKey: this.props.activeKey - }); - } - }, + _React$Component.apply(this, arguments); + } - handlePaneAnimateOutEnd: function handlePaneAnimateOutEnd() { - this.setState({ - previousActiveKey: null - }); - }, + ModalHeader.prototype.render = function render() { + var _props = this.props; + var label = _props['aria-label']; - render: function render() { - var activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; + var props = _objectWithoutProperties(_props, ['aria-label']); - function renderTabIfSet(child) { - return child.props.tab != null ? this.renderTab(child) : null; - } + var onHide = _utilsCreateChainedFunction2['default'](this.context.$bs_onModalHide, this.props.onHide); - var nav = React.createElement( - Nav, - _extends({}, this.props, { activeKey: activeKey, onSelect: this.handleSelect, ref: "tabs" }), - ValidComponentChildren.map(this.props.children, renderTabIfSet, this) + return _react2['default'].createElement( + 'div', + _extends({}, props, { + className: _classnames2['default'](this.props.className, _utilsBootstrapUtils2['default'].prefix(this.props, 'header')) + }), + this.props.closeButton && _react2['default'].createElement( + 'button', + { + type: 'button', + className: 'close', + 'aria-label': label, + onClick: onHide }, + _react2['default'].createElement( + 'span', + { 'aria-hidden': 'true' }, + '×' + ) + ), + this.props.children ); + }; - return React.createElement( - "div", - null, - nav, - React.createElement( - "div", - { id: this.props.id, className: "tab-content", ref: "panes" }, - ValidComponentChildren.map(this.props.children, this.renderPane) - ) - ); - }, + return ModalHeader; +})(_react2['default'].Component); - getActiveKey: function getActiveKey() { - return this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; - }, +ModalHeader.propTypes = { + /** + * The 'aria-label' attribute provides an accessible label for the close button. + * It is used for Assistive Technology when the label text is not readable. + */ + 'aria-label': _react2['default'].PropTypes.string, - renderPane: function renderPane(child, index) { - var activeKey = this.getActiveKey(); + bsClass: _react2['default'].PropTypes.string, - return cloneElement(child, { - active: child.props.eventKey === activeKey && (this.state.previousActiveKey == null || !this.props.animation), - key: child.key ? child.key : index, - animation: this.props.animation, - onAnimateOutEnd: this.state.previousActiveKey != null && child.props.eventKey === this.state.previousActiveKey ? this.handlePaneAnimateOutEnd : null - }); - }, + /** + * Specify whether the Component should contain a close button + */ + closeButton: _react2['default'].PropTypes.bool, - renderTab: function renderTab(child) { - var key = child.props.eventKey; - return React.createElement( - NavItem, - { - ref: "tab" + key, - eventKey: key }, - child.props.tab - ); - }, + /** + * A Callback fired when the close button is clicked. If used directly inside a Modal component, the onHide will automatically + * be propagated up to the parent Modal `onHide`. + */ + onHide: _react2['default'].PropTypes.func +}; - shouldComponentUpdate: function shouldComponentUpdate() { - // Defer any updates to this component during the `onSelect` handler. - return !this._isChanging; - }, +ModalHeader.contextTypes = { + '$bs_onModalHide': _react2['default'].PropTypes.func +}; - handleSelect: function handleSelect(key) { - if (this.props.onSelect) { - this._isChanging = true; - this.props.onSelect(key); - this._isChanging = false; - } else if (key !== this.getActiveKey()) { - this.setState({ - activeKey: key, - previousActiveKey: this.getActiveKey() - }); - } - } -}); +ModalHeader.defaultProps = { + 'aria-label': 'Close', + closeButton: false +}; -module.exports = TabbedArea; -},{"./BootstrapMixin":34,"./Nav":59,"./NavItem":60,"./utils/ValidComponentChildren":85,"react":303}],76:[function(require,module,exports){ -"use strict"; +exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalHeader); +module.exports = exports['default']; +},{"./utils/bootstrapUtils":111,"./utils/createChainedFunction":114,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"babel-runtime/helpers/object-without-properties":126,"classnames":33,"react":511}],73:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var React = _interopRequire(require("react")); +var _extends = require('babel-runtime/helpers/extends')['default']; -var classNames = _interopRequire(require("classnames")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var Table = React.createClass({ - displayName: "Table", +exports.__esModule = true; - propTypes: { - striped: React.PropTypes.bool, - bordered: React.PropTypes.bool, - condensed: React.PropTypes.bool, - hover: React.PropTypes.bool, - responsive: React.PropTypes.bool - }, +var _react = require('react'); - render: function render() { - var classes = { - table: true, - "table-striped": this.props.striped, - "table-bordered": this.props.bordered, - "table-condensed": this.props.condensed, - "table-hover": this.props.hover - }; - var table = React.createElement( - "table", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), +var _react2 = _interopRequireDefault(_react); + +var _classnames = require('classnames'); + +var _classnames2 = _interopRequireDefault(_classnames); + +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); + +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); + +var ModalTitle = (function (_React$Component) { + _inherits(ModalTitle, _React$Component); + + function ModalTitle() { + _classCallCheck(this, ModalTitle); + + _React$Component.apply(this, arguments); + } + + ModalTitle.prototype.render = function render() { + return _react2['default'].createElement( + 'h4', + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, _utilsBootstrapUtils2['default'].prefix(this.props, 'title')) }), this.props.children ); + }; - return this.props.responsive ? React.createElement( - "div", - { className: "table-responsive" }, - table - ) : table; - } -}); + return ModalTitle; +})(_react2['default'].Component); -module.exports = Table; -},{"classnames":88,"react":303}],77:[function(require,module,exports){ -"use strict"; +exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalTitle); +module.exports = exports['default']; +},{"./utils/bootstrapUtils":111,"babel-runtime/helpers/class-call-check":121,"babel-runtime/helpers/extends":122,"babel-runtime/helpers/inherits":123,"babel-runtime/helpers/interop-require-default":124,"classnames":33,"react":511}],74:[function(require,module,exports){ +'use strict'; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _inherits = require('babel-runtime/helpers/inherits')['default']; -var _defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }; +var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = require('babel-runtime/helpers/extends')['default']; -var React = _interopRequire(require("react")); +var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; -var classNames = _interopRequire(require("classnames")); +exports.__esModule = true; -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); +var _react = require('react'); -var Tooltip = React.createClass({ - displayName: "Tooltip", +var _react2 = _interopRequireDefault(_react); - mixins: [BootstrapMixin], +var _classnames = require('classnames'); - propTypes: { - placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), - positionLeft: React.PropTypes.number, - positionTop: React.PropTypes.number, - arrowOffsetLeft: React.PropTypes.number, - arrowOffsetTop: React.PropTypes.number - }, +var _classnames2 = _interopRequireDefault(_classnames); - getDefaultProps: function getDefaultProps() { - return { - placement: "right" - }; - }, +var _reactPropTypesLibAll = require('react-prop-types/lib/all'); - render: function render() { - var _this = this; +var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); - var classes = (function () { - var _classes = { - tooltip: true }; +var _reactPropTypesLibDeprecated = require('react-prop-types/lib/deprecated'); - _defineProperty(_classes, _this.props.placement, true); +var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); - _defineProperty(_classes, "in", _this.props.positionLeft != null || _this.props.positionTop != null); +var _utilsBootstrapUtils = require('./utils/bootstrapUtils'); - return _classes; - })(); +var _utilsBootstrapUtils2 = _interopRequireDefault(_utilsBootstrapUtils); - var style = { - left: this.props.positionLeft, - top: this.props.positionTop - }; +var _utilsValidComponentChildren = require('./utils/ValidComponentChildren'); - var arrowStyle = { - left: this.props.arrowOffsetLeft, - top: this.props.arrowOffsetTop - }; +var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes), style: style }), - React.createElement("div", { className: "tooltip-arrow", style: arrowStyle }), - React.createElement( - "div", - { className: "tooltip-inner" }, - this.props.children - ) - ); - } -}); +var _utilsCreateChainedFunction = require('./utils/createChainedFunction'); -module.exports = Tooltip; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],78:[function(require,module,exports){ -"use strict"; +var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; +var _Collapse = require('./Collapse'); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _Collapse2 = _interopRequireDefault(_Collapse); -var React = _interopRequire(require("react")); +var Nav = (function (_React$Component) { + _inherits(Nav, _React$Component); -var classNames = _interopRequire(require("classnames")); + function Nav() { + _classCallCheck(this, Nav); -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + _React$Component.apply(this, arguments); + } -var Well = React.createClass({ - displayName: "Well", + Nav.prototype.render = function render() { + var _props = this.props; + var className = _props.className; + var ulClassName = _props.ulClassName; + var id = _props.id; + var ulId = _props.ulId; - mixins: [BootstrapMixin], + var isNavbar = this.props.navbar != null ? this.props.navbar : this.context.$bs_navbar; + var classes = _utilsBootstrapUtils2['default'].getClassSet(this.props); - getDefaultProps: function getDefaultProps() { - return { - bsClass: "well" - }; - }, + classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'stacked')] = this.props.stacked; + classes[_utilsBootstrapUtils2['default'].prefix(this.props, 'justified')] = this.props.justified; - render: function render() { - var classes = this.getBsClassSet(); + if (isNavbar) { + var bsClass = this.context.$bs_navbar_bsClass || 'navbar'; + var navbarRight = this.props.right != null ? this.props.right : this.props.pullRight; - return React.createElement( - "div", - _extends({}, this.props, { className: classNames(this.props.className, classes) }), - this.props.children + classes[_utilsBootstrapUtils2['default'].prefix({ bsClass: bsClass }, 'nav')] = true; + classes[_utilsBootstrapUtils2['default'].prefix({ bsClass: bsClass }, 'right')] = navbarRight; + classes[_utilsBootstrapUtils2['default'].prefix({ bsClass: bsClass }, 'left')] = this.props.pullLeft; + } else { + classes['pull-right'] = this.props.pullRight; + classes['pull-left'] = this.props.pullLeft; + } + + var list = _react2['default'].createElement( + 'ul', + _extends({ ref: 'ul' + }, this.props, { + id: ulId || id, + role: this.props.bsStyle === 'tabs' ? 'tablist' : null, + className: _classnames2['default'](className, ulClassName, classes) + }), + _utilsValidComponentChildren2['default'].map(this.props.children, this.renderNavItem, this) ); - } -}); -module.exports = Well; -},{"./BootstrapMixin":34,"classnames":88,"react":303}],79:[function(require,module,exports){ -"use strict"; + // TODO remove in 0.29 + if (this.context.$bs_deprecated_navbar && this.props.collapsible) { + list = _react2['default'].createElement( + _Collapse2['default'], + { + 'in': this.props.expanded, + className: isNavbar ? 'navbar-collapse' : void 0 + }, + _react2['default'].createElement( + 'div', + null, + list + ) + ); + } -module.exports = { - CLASSES: { - alert: "alert", - button: "btn", - "button-group": "btn-group", - "button-toolbar": "btn-toolbar", - column: "col", - "input-group": "input-group", - form: "form", - glyphicon: "glyphicon", - label: "label", - "list-group-item": "list-group-item", - panel: "panel", - "panel-group": "panel-group", - "progress-bar": "progress-bar", - nav: "nav", - navbar: "navbar", - modal: "modal", - row: "row", - well: "well" - }, - STYLES: { - "default": "default", - primary: "primary", - success: "success", - info: "info", - warning: "warning", - danger: "danger", - link: "link", - inline: "inline", - tabs: "tabs", - pills: "pills" - }, - SIZES: { - large: "lg", - medium: "md", - small: "sm", - xsmall: "xs" - }, - GLYPHS: ["asterisk", "plus", "euro", "eur", "minus", "cloud", "envelope", "pencil", "glass", "music", "search", "heart", "star", "star-empty", "user", "film", "th-large", "th", "th-list", "ok", "remove", "zoom-in", "zoom-out", "off", "signal", "cog", "trash", "home", "file", "time", "road", "download-alt", "download", "upload", "inbox", "play-circle", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "indent-left", "indent-right", "facetime-video", "picture", "map-marker", "adjust", "tint", "edit", "share", "check", "move", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-sign", "minus-sign", "remove-sign", "ok-sign", "question-sign", "info-sign", "screenshot", "remove-circle", "ok-circle", "ban-circle", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "share-alt", "resize-full", "resize-small", "exclamation-sign", "gift", "leaf", "fire", "eye-open", "eye-close", "warning-sign", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder-close", "folder-open", "resize-vertical", "resize-horizontal", "hdd", "bullhorn", "bell", "certificate", "thumbs-up", "thumbs-down", "hand-right", "hand-left", "hand-up", "hand-down", "circle-arrow-right", "circle-arrow-left", "circle-arrow-up", "circle-arrow-down", "globe", "wrench", "tasks", "filter", "briefcase", "fullscreen", "dashboard", "paperclip", "heart-empty", "link", "phone", "pushpin", "usd", "gbp", "sort", "sort-by-alphabet", "sort-by-alphabet-alt", "sort-by-order", "sort-by-order-alt", "sort-by-attributes", "sort-by-attributes-alt", "unchecked", "expand", "collapse-down", "collapse-up", "log-in", "flash", "log-out", "new-window", "record", "save", "open", "saved", "import", "export", "send", "floppy-disk", "floppy-saved", "floppy-remove", "floppy-save", "floppy-open", "credit-card", "transfer", "cutlery", "header", "compressed", "earphone", "phone-alt", "tower", "stats", "sd-video", "hd-video", "subtitles", "sound-stereo", "sound-dolby", "sound-5-1", "sound-6-1", "sound-7-1", "copyright-mark", "registration-mark", "cloud-download", "cloud-upload", "tree-conifer", "tree-deciduous", "cd", "save-file", "open-file", "level-up", "copy", "paste", "alert", "equalizer", "king", "queen", "pawn", "bishop", "knight", "baby-formula", "tent", "blackboard", "bed", "apple", "erase", "hourglass", "lamp", "duplicate", "piggy-bank", "scissors", "bitcoin", "yen", "ruble", "scale", "ice-lolly", "ice-lolly-tasted", "education", "option-horizontal", "option-vertical", "menu-hamburger", "modal-window", "oil", "grain", "sunglasses", "text-size", "text-color", "text-background", "object-align-top", "object-align-bottom", "object-align-horizontal", "object-align-left", "object-align-vertical", "object-align-right", "triangle-right", "triangle-left", "triangle-bottom", "triangle-top", "console", "superscript", "subscript", "menu-left", "menu-right", "menu-down", "menu-up"] -}; -},{}],80:[function(require,module,exports){ -"use strict"; + return list; + }; -var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + Nav.prototype.getChildActiveProp = function getChildActiveProp(child) { + if (child.props.active) { + return true; + } + if (this.props.activeKey != null) { + if (child.props.eventKey === this.props.activeKey) { + return true; + } + } + if (this.props.activeHref != null) { + if (child.props.href === this.props.activeHref) { + return true; + } + } -var Accordion = _interopRequire(require("./Accordion")); + return child.props.active; + }; -var Affix = _interopRequire(require("./Affix")); + Nav.prototype.renderNavItem = function renderNavItem(child, index) { + return _react.cloneElement(child, { + role: this.props.bsStyle === 'tabs' ? 'tab' : null, + active: this.getChildActiveProp(child), + activeKey: this.props.activeKey, + activeHref: this.props.activeHref, + onSelect: _utilsCreateChainedFunction2['default'](child.props.onSelect, this.props.onSelect), + key: child.key ? child.key : index, + navItem: true + }); + }; -var AffixMixin = _interopRequire(require("./AffixMixin")); + return Nav; +})(_react2['default'].Component); -var Alert = _interopRequire(require("./Alert")); +Nav.propTypes = { + activeHref: _react2['default'].PropTypes.string, + activeKey: _react2['default'].PropTypes.any, -var BootstrapMixin = _interopRequire(require("./BootstrapMixin")); + stacked: _react2['default'].PropTypes.bool, + justified: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (_ref) { + var justified = _ref.justified; + var navbar = _ref.navbar; + return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null; + }), + onSelect: _react2['default'].PropTypes.func, -var Badge = _interopRequire(require("./Badge")); + /** + * CSS classes for the wrapper `nav` element + */ + className: _react2['default'].PropTypes.string, + /** + * HTML id for the wrapper `nav` element + */ + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + /** + * CSS classes for the inner `ul` element + * + * @deprecated + */ + ulClassName: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.string, 'The wrapping `