path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/routes/MetaCoin/components/HeaderComponent.js
trixyrabbit/Exile
import React from 'react' export const Header = () => { return ( <div> <h2>MetaCoin Example Webpack react-redux Example!</h2> </div> ) } Header.propTypes = { } export default Header
app/app.js
SergejKasper/churchfathers
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ // Needed for redux-saga es6 generator support import 'babel-polyfill'; // Import all the third party stuff import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { applyRouterMiddleware, Router, browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { useScroll } from 'react-router-scroll'; import 'sanitize.css/sanitize.css'; // Import root app import App from 'containers/App'; // Import selector for `syncHistoryWithStore` import { makeSelectLocationState } from 'containers/App/selectors'; // Import Language Provider import LanguageProvider from 'containers/LanguageProvider'; // Load the favicon, the manifest.json file and the .htaccess file /* eslint-disable import/no-unresolved, import/extensions */ import '!file-loader?name=[name].[ext]!./favicon.ico'; import '!file-loader?name=[name].[ext]!./manifest.json'; import 'file-loader?name=[name].[ext]!./.htaccess'; /* eslint-enable import/no-unresolved, import/extensions */ import configureStore from './store'; // Import i18n messages import { translationMessages } from './i18n'; // Import CSS reset and Global Styles import './global-styles'; // Import root routes import createRoutes from './routes'; // Create redux store with history // this uses the singleton browserHistory provided by react-router // Optionally, this could be changed to leverage a created history // e.g. `const browserHistory = useRouterHistory(createBrowserHistory)();` const initialState = {}; const store = configureStore(initialState, browserHistory); // Sync history and store, as the react-router-redux reducer // is under the non-default key ("routing"), selectLocationState // must be provided for resolving how to retrieve the "route" in the state const history = syncHistoryWithStore(browserHistory, store, { selectLocationState: makeSelectLocationState(), }); // Set up the router, wrapping all Routes in the App component const rootRoute = { component: App, childRoutes: createRoutes(store), }; const render = (messages) => { ReactDOM.render( <Provider store={store}> <LanguageProvider messages={messages}> <Router history={history} routes={rootRoute} render={ // Scroll to top when going to a new page, imitating default browser // behaviour applyRouterMiddleware(useScroll()) } /> </LanguageProvider> </Provider>, document.getElementById('app') ); }; // Hot reloadable translation json files if (module.hot) { // modules.hot.accept does not accept dynamic dependencies, // have to be constants at compile-time module.hot.accept('./i18n', () => { render(translationMessages); }); } // Chunked polyfill for browsers without Intl support if (!window.Intl) { (new Promise((resolve) => { resolve(import('intl')); })) .then(() => Promise.all([ import('intl/locale-data/jsonp/en.js'), ])) .then(() => render(translationMessages)) .catch((err) => { throw err; }); } else { render(translationMessages); } // Install ServiceWorker and AppCache in the end since // it's not most important operation and if main code fails, // we do not want it installed if (process.env.NODE_ENV === 'production') { require('offline-plugin/runtime').install(); // eslint-disable-line global-require }
src/components/svg/Logo.js
ryanabragg/VanguardLARP
import React from 'react'; import PropTypes from 'prop-types'; const Logo = (props) => { return ( <svg width={props.width} height={props.height} viewBox="0 0 648 360" xmlns="http://www.w3.org/2000/svg"> <path id="compass" fill={props.colorCompass} d="m 201.279,15.5 c 21.06,-0.791 41.549,2.187 61.91,9.451 -0.107,0.155 -0.212,0.301 -0.321,0.452 0.899,-0.129 1.817,-0.201 2.749,-0.201 h 16.343 c -0.627,-0.294 -1.251,-0.588 -1.879,-0.876 -1.362,-0.62 -1.975,-1.383 -1.618,-3.003 0.692,-3.145 1.194,-6.338 1.767,-9.521 0.705,-3.938 1.408,-7.869 2.108,-11.801 -1.441,0.885 -2.359,1.993 -3.205,3.153 -3.357,4.632 -6.721,9.271 -10.041,13.939 -1.036,1.454 -2.128,2.028 -3.938,1.252 -2.038,-0.868 -4.187,-1.47 -6.31,-2.112 -22.741,-6.885 -45.9,-9.172 -69.562,-6.636 -13.937,1.494 -27.485,4.551 -40.634,9.29 -5.203,1.881 -10.258,3.992 -15.18,6.315 h 17.994 c 16.18,-5.896 32.736,-9.06 49.817,-9.702 z m 145.173,74.429 c 5.822,8.729 9.936,16.733 12.478,23.001 -5.736,0.971 -11.159,1.942 -16.611,2.798 -3.161,0.491 -6.904,1.998 -9.375,0.855 -0.601,-0.275 -1.115,-0.747 -1.576,-1.334 -1.085,2.374 -2.196,4.92 -3.333,7.653 2.032,-0.306 4.06,-0.607 6.089,-0.913 0.085,0.306 0.17,0.619 0.262,0.934 -2.606,1.183 -5.204,2.402 -7.814,3.581 -1.253,3.141 -2.529,6.504 -3.833,10.112 0.697,-0.125 1.409,-0.183 2.108,-0.183 3.542,0 6.829,1.579 9.255,4.45 1.085,1.291 2.43,3.464 2.695,6.537 1.137,-2.058 2.813,-4.054 5.03,-5.979 0.154,-0.138 0.318,-0.264 0.475,-0.402 -0.698,-2.269 -1.445,-4.522 -2.268,-6.762 -0.786,-2.126 -0.145,-3.212 1.438,-4.397 5.466,-4.098 10.887,-8.273 16.317,-12.434 2.31,-1.768 2.908,-1.744 3.887,1.08 1.182,3.375 2.389,6.745 3.556,10.132 0.134,-0.007 0.264,-0.026 0.397,-0.026 h 2.076 c 1.162,0 2.312,0.259 3.362,0.759 0.762,0.364 1.472,0.762 2.16,1.176 -1.062,-3.427 -2.221,-6.834 -3.496,-10.218 -4.73,-12.572 -10.729,-24.411 -18.115,-35.362 -1.423,1.054 -3.16,2.622 -5.164,4.942 z m -122.536,33.419 c -0.704,-0.235 -1.412,-0.444 -2.134,-0.638 0.594,1.64 1.208,3.341 1.852,5.104 4.166,1.252 8.19,2.988 11.982,5.181 2.979,-1.616 5.295,-2.773 7.06,-3.537 2.337,-1.005 5.238,-1.691 8.869,-2.099 0.381,-0.042 0.766,-0.059 1.151,-0.043 3.636,0.123 6.443,0.553 8.684,1.352 2.092,-2.289 4.155,-4.56 6.208,-6.808 0.871,-2.514 1.639,-4.755 2.325,-6.75 -3.062,3.349 -6.127,6.695 -9.187,10.046 -0.099,0.119 -0.325,0.119 -1.159,0.391 0.11,-1.204 0.219,-2.066 0.272,-2.919 0.526,-8.707 4.179,-16.03 9.516,-22.78 2.643,-3.346 5.106,-6.826 7.508,-10.352 0.022,-0.724 0.035,-1.506 0.035,-2.37 v -2.859 c -4.198,6.021 -8.292,11.891 -12.371,17.749 -0.196,-0.084 -0.393,-0.164 -0.595,-0.249 1.384,-7.522 2.771,-15.051 4.215,-22.895 -6.552,-2.648 -11.692,-7.211 -14.881,-13.396 -0.139,-0.132 -0.271,-0.268 -0.407,-0.407 -7.971,18.609 -15.948,37.216 -23.817,55.872 -1.167,2.763 -2.342,3.342 -5.126,2.407 z m 1.848,-42.62 h -2.877 c -0.61,0.846 -1.219,1.69 -1.835,2.538 -0.317,-0.109 -0.641,-0.2 -0.962,-0.302 0.052,-0.746 0.098,-1.488 0.147,-2.236 h -2.712 c -0.234,2.471 -0.48,4.941 -0.734,7.413 -0.137,1.328 -1.279,2.594 -2.105,3.779 -0.747,1.065 -1.506,2.117 -2.261,3.17 0.644,2.102 1.394,4.474 2.277,7.177 5.122,-7.325 10.241,-14.651 15.353,-21.979 -1.379,0.285 -2.819,0.44 -4.291,0.44 z m 146.927,123.356 c -1.488,10.903 -3.839,21.635 -7.865,32.53 -3.897,-2.573 -7.429,-4.896 -10.938,-7.23 -3.08,-2.052 -6.107,-4.174 -9.219,-6.165 -1.539,-0.988 -1.973,-2.01 -1.437,-3.889 1.98,-7.03 3.361,-14.12 4.182,-21.259 -2.021,2.626 -4.036,5.169 -6.015,7.602 -3.872,4.739 -7.162,8.724 -9.77,11.839 -0.323,0.392 -0.653,0.783 -0.996,1.17 11.946,7.966 23.861,15.912 35.782,23.852 -0.139,0.287 -0.277,0.583 -0.414,0.885 -2.511,-0.885 -5.05,-1.673 -7.509,-2.661 -11.812,-4.746 -23.612,-9.498 -35.417,-14.249 -0.552,0.521 -1.109,1.036 -1.688,1.564 -4.511,4.146 -8.021,6.707 -11.036,8.068 -2.556,1.143 -5.083,1.927 -7.521,2.326 4.851,0.885 9.751,1.764 14.747,2.672 -2.667,4.311 -5.124,8.276 -7.817,12.622 -7.724,-5.436 -15.204,-10.697 -22.664,-15.944 -0.337,0.958 -0.676,1.909 -1.016,2.856 6.52,4.596 13.048,9.192 19.563,13.804 0.733,0.516 1.388,1.123 2.327,1.906 -2.792,3.371 -5.46,6.595 -8.284,10.017 -5.785,-5.261 -11.499,-10.462 -17.184,-15.65 -0.381,1.075 -0.759,2.133 -1.135,3.176 5.382,4.904 10.755,9.806 16.182,14.746 -3.921,3.618 -7.546,6.945 -11.401,10.477 -3.36,-4.124 -6.5,-7.922 -9.58,-11.741 -0.382,1.065 -0.76,2.122 -1.131,3.166 2.739,3.403 5.515,6.848 8.346,10.355 -5.239,3.396 -10.272,6.655 -15.692,10.164 -3.894,10.831 -7.154,19.84 -9.79,27.035 3.795,5.068 7.745,10.039 11.628,15.05 0.494,0.631 0.931,1.306 1.613,2.258 -21.124,8.85 -42.855,12.913 -65.35,12.7 -19.596,-0.188 -38.663,-3.549 -57.415,-10.942 4.187,-5.828 7.971,-11.276 11.921,-16.59 3.724,-5.006 3.792,-4.912 9.902,-3.28 10.616,2.861 21.361,4.526 32.216,4.929 -0.833,-1.638 -1.687,-3.518 -2.599,-5.737 -1.18,-2.869 -2.46,-6.333 -3.87,-10.432 -0.065,0 -0.129,-0.006 -0.195,-0.021 -2.292,-0.146 -1.504,-1.975 -1.378,-3.183 0.04,-0.366 0.081,-0.736 0.122,-1.106 -0.697,-2.12 -1.422,-4.383 -2.181,-6.793 -0.38,3.466 -0.762,6.959 -1.154,10.527 -5.667,-1.134 -11.168,-2.233 -17.324,-3.471 4.799,-6.694 9.388,-13.096 13.918,-19.418 -0.642,-1.684 -1.375,-3.61 -2.203,-5.821 -14.341,20.103 -28.566,40.044 -42.795,59.986 -0.282,-0.15 -0.565,-0.291 -0.846,-0.436 11.351,-28.285 22.703,-56.592 34.118,-85.058 -3.339,-8.998 -7.373,-19.894 -12.25,-33.114 -8.716,-10.354 -13.217,-23.145 -13.278,-36.027 -1.086,-2.958 -2.209,-6.004 -3.354,-9.118 -0.349,1.936 -0.681,3.882 -1.045,5.816 -0.129,0.687 -0.227,1.385 -0.423,2.56 -31.489,-20.463 -62.617,-40.674 -93.749,-60.902 0.151,-0.29 0.301,-0.574 0.447,-0.862 2.112,0.797 4.237,1.549 6.327,2.394 27.304,11.064 54.608,22.143 81.904,33.223 -4.049,-11.008 -8.419,-22.902 -13.135,-35.746 -4.131,-0.836 -8.09,-2.341 -11.572,-5.67 -2.492,-2.396 -5.613,-4.134 -8.839,-6.45 3.272,-3.592 6.331,-6.937 9.437,-10.356 1.358,1.236 2.728,2.485 4.092,3.727 -0.761,-2.065 -1.529,-4.161 -2.306,-6.275 -0.055,-0.048 -0.109,-0.101 -0.162,-0.149 0.027,-0.026 0.053,-0.054 0.082,-0.075 -0.994,-2.697 -1.993,-5.427 -3.011,-8.199 -1.292,-2.826 -2.708,-4.452 -5.917,-5.059 -2.72,2.68 -5.329,5.49 -7.822,8.438 -5.752,6.816 -10.529,14.461 -15.593,21.846 -1.107,1.628 -1.998,2.426 -4.136,2.084 -7.01,-1.122 -14.068,-1.997 -21.102,-2.977 -0.901,-0.116 -1.78,-0.329 -3.567,-0.674 3.536,-6.169 6.584,-11.955 10.078,-17.464 4.85,-7.65 10.287,-14.855 16.323,-21.57 -1.242,-1.395 -2.391,-2.926 -3.416,-4.577 -0.06,-0.098 -0.116,-0.194 -0.17,-0.284 -0.23,-0.245 -0.438,-0.498 -0.652,-0.755 -11.284,12.361 -20.56,26.167 -27.845,41.344 -0.89,1.856 -1.848,2.643 -4.02,2.272 -4.902,-0.852 -9.855,-1.46 -14.79,-2.139 -2.948,-0.402 -5.905,-0.762 -8.854,-1.132 0.187,0.89 0.491,1.241 0.853,1.484 6.319,4.178 12.635,8.355 18.984,12.481 1.146,0.75 1.694,1.447 1.157,2.928 -5.627,15.252 -8.933,30.99 -10.063,47.236 -1.023,14.715 -0.213,29.312 2.453,43.798 3.046,16.535 8.418,32.289 16.101,47.291 8.814,17.198 20.13,32.489 34.042,45.873 12.209,11.749 25.833,21.531 40.88,29.334 2.255,1.156 5.558,2.002 6.342,3.853 0.887,2.091 -0.506,5.149 -0.951,7.788 -0.69,4.176 -1.408,8.343 -2.119,12.515 3.693,-4.46 7.021,-9.005 10.246,-13.615 2.396,-3.418 2.326,-3.435 6.174,-2.012 19.861,7.38 40.431,10.844 61.57,10.588 24.134,-0.275 47.247,-5.379 69.318,-15.264 18.861,-8.45 35.617,-19.974 50.297,-34.415 15.369,-15.137 27.607,-32.565 36.359,-52.318 1.248,-2.819 2.616,-3.104 5.209,-2.561 5.917,1.238 11.896,2.234 17.838,3.322 0.06,-0.144 0.119,-0.306 0.164,-0.452 -0.572,-0.522 -1.095,-1.135 -1.736,-1.572 -4.526,-3.027 -9.01,-6.123 -13.635,-9.007 -2.035,-1.26 -2.59,-2.462 -1.883,-4.91 2.372,-8.249 4.865,-16.508 6.489,-24.918 0.79,-4.081 1.389,-8.173 1.833,-12.278 h -6.918 c -0.128,1.163 -0.265,2.328 -0.424,3.495 z M 105.879,109.937 c 3.517,2.444 6.844,4.759 10.17,7.081 -0.058,0.2 -0.117,0.404 -0.17,0.606 -4.459,-0.641 -8.913,-1.278 -13.798,-1.971 1.448,-2.176 2.498,-3.76 3.798,-5.716 z m 45.7,127.502 c -9.835,10.273 -19.729,20.485 -29.496,30.817 -1.695,1.787 -2.776,1.946 -4.357,0.025 -2.632,-3.202 -5.426,-6.263 -8.441,-9.723 3.414,-2.693 6.626,-5.267 9.872,-7.777 5.977,-4.649 11.939,-9.304 17.99,-13.85 1.031,-0.768 2.455,-1.249 3.757,-1.403 4.079,-0.515 8.18,-0.811 13.067,-1.249 -1.117,1.482 -1.671,2.406 -2.392,3.16 z m 0.794,4.249 c -1.777,6.973 -0.98,14.538 -6.145,20.727 -4.539,5.463 -8.464,11.441 -12.67,17.177 -0.317,0.438 -0.721,0.805 -1.342,1.481 -3.304,-3.016 -6.479,-5.899 -10.016,-9.132 9.703,-10.147 19.502,-20.404 29.299,-30.663 0.29,0.141 0.585,0.274 0.874,0.41 z m -44.857,14.451 c -3.5,-5.552 -6.812,-10.795 -10.504,-16.639 12.159,-1.074 23.59,-2.073 35.016,-3.071 0.06,0.226 0.113,0.446 0.167,0.673 -8.084,6.234 -16.168,12.472 -24.679,19.037 z m 42.568,-50.835 c 5.017,7.379 9.702,14.252 14.592,21.446 -26.982,2.698 -54.107,5.413 -81.232,8.134 -0.105,-0.364 -0.221,-0.721 -0.322,-1.077 22.492,-9.576 44.981,-19.152 66.962,-28.503 z m -66.947,-6.1 c 0.362,-5.224 0.683,-9.826 1.039,-14.887 13.274,-0.239 27.574,-0.5 42.558,-0.782 -0.786,1.044 -1.015,1.522 -1.38,1.816 -2.477,1.937 -5.139,3.655 -7.43,5.784 -3.032,2.812 -6.623,3.678 -10.535,4.225 -7.657,1.071 -15.273,2.405 -24.252,3.844 z m 24.082,-0.262 c -6.412,4.953 -12.832,9.914 -19.852,15.326 -0.946,-4.401 -1.77,-8.237 -2.672,-12.426 7.598,-1.208 14.91,-2.375 22.219,-3.537 0.104,0.208 0.202,0.425 0.305,0.637 z M 87.341,148.823 c 9.46,6.31 18.509,12.333 27.543,18.364 -0.054,0.213 -0.117,0.417 -0.177,0.629 -10.024,-1.203 -20.041,-2.413 -30.456,-3.678 1.027,-5.087 1.987,-9.844 3.09,-15.315 z m -3.661,18.169 c 9.415,1.141 18.289,2.221 27.171,3.304 0.457,0.059 0.912,0.136 1.376,0.171 9.978,0.879 12.054,1.753 20.869,8.987 -1.378,0.527 -2.447,1.268 -3.534,1.302 -14.787,0.341 -29.581,0.617 -44.37,0.803 -0.759,0.011 -2.207,-0.975 -2.203,-1.478 0.078,-4.23 0.41,-8.456 0.691,-13.089 z m -41.185,33.844 c -3.979,-32.747 3.625,-63.599 9.37,-76 7.005,4.685 13.85,9.208 20.603,13.873 0.548,0.377 0.853,1.767 0.641,2.508 -4.745,16.401 -6.658,33.089 -5.47,50.134 0.711,10.174 2.283,20.182 5.392,29.899 0.814,2.557 0.604,4.052 -1.771,5.731 -5.568,3.95 -10.848,8.3 -16.263,12.486 -0.643,0.492 -1.36,0.889 -2.527,1.651 -5.273,-13.146 -8.31,-26.544 -9.975,-40.282 z m 98.255,107.818 c -1.496,7.596 -2.737,15.253 -4.11,23.104 -28.55,-8.333 -77.343,-60.386 -83.054,-88.599 4.583,-0.466 9.138,-0.938 13.69,-1.365 3.588,-0.344 7.19,-0.537 10.762,-0.965 1.861,-0.233 2.567,0.646 3.278,2.142 5.835,12.386 13.546,23.54 22.724,33.653 10.021,11.031 21.591,20.186 34.62,27.428 2.083,1.161 2.544,2.307 2.09,4.602 z m -5.967,-25.845 c 4.34,-5.943 8.46,-11.592 12.583,-17.241 0.195,0.09 0.394,0.168 0.589,0.258 -1.309,7.452 -2.618,14.919 -4.042,23.011 -3.287,-2.174 -6.014,-3.969 -9.13,-6.028 z m 137.154,52.644 c -0.421,-3.202 -0.755,-5.884 -1.127,-8.551 -0.715,-5.222 -1.39,-10.438 -2.235,-15.633 -0.32,-1.968 0.275,-2.89 2.087,-3.788 12.799,-6.274 24.388,-14.377 34.566,-24.333 11.022,-10.8 20.509,-22.854 27.408,-36.76 1.041,-2.101 2.17,-2.506 4.319,-2.079 6.792,1.36 13.623,2.531 20.44,3.784 0.778,0.139 1.545,0.408 2.829,0.76 -18.629,39.899 -47.541,68.661 -88.287,86.6 z" /> <path id="text" fill={props.colorText} d="m 289.792,189.791 c -0.634,-0.245 -1.238,-0.528 -1.805,-0.871 -0.751,-0.445 -1.755,-1.207 -2.639,-2.377 -12.075,33.934 -18.435,51.378 -19.066,52.335 -16.407,48.536 -25.173,72.812 -26.294,72.812 h -2.023 l -3.373,-0.68 c 2.025,3.15 4.27,4.722 6.744,4.722 h 3.369 c 5.641,-14.836 20.669,-56.822 45.087,-125.941 z m -78.793,94.985 c 6.512,21.146 10.851,31.725 13.015,31.725 h 4.071 l 1.624,-0.816 c 18.976,-54.576 29.011,-82.504 30.095,-83.765 8.189,-24.223 15.48,-45.414 21.875,-63.588 -1.439,0.752 -3.046,1.39 -4.849,1.925 -1.999,0.603 -3.789,1.021 -5.396,1.267 -6.56,18.718 -14.505,41.288 -23.833,67.708 h -1.624 l -26.843,-74.831 c -18.432,-47.713 -27.65,-75.912 -27.65,-84.587 l 0.814,-4.062 c 2.345,-9.76 9.12,-14.637 20.33,-14.637 h 14.644 c 1.084,0 1.625,-0.543 1.625,-1.63 v -4.071 c 0,-3.252 -1.625,-5.96 -4.884,-8.131 H 223.2 l 0.814,4.071 v 4.061 l -4.065,0.816 H 206.935 C 193.379,57.588 186.6,63.554 186.6,74.126 v 4.879 c 0,6.234 19.521,61.538 58.562,165.926 l -0.809,3.252 h -0.815 l -30.91,-87.027 C 193.107,111.72 183.342,82.441 183.342,73.313 c 0,-13.557 6.783,-20.336 20.341,-20.336 h 15.451 c 1.086,0 1.628,-0.544 1.628,-1.622 v -6.511 c -0.813,0 -1.897,-0.542 -3.252,-1.629 H 93.881 v 6.511 l 1.625,2.438 c 13.466,0 23.229,3.527 29.278,10.576 v 0.816 l -9.759,-6.51 C 104.629,56.502 98.946,55.691 97.952,54.607 v 0.81 c 2.346,3.796 5.603,5.701 9.761,5.701 12.915,0 21.865,5.69 26.833,17.075 49.889,135.912 75.373,204.776 76.453,206.583 z m -1.629,-16.263 v -1.627 c 16.007,-16.719 24.406,-25.119 25.22,-25.212 h 0.809 v 0.816 c -16.625,17.344 -25.299,26.023 -26.029,26.023 z m 2.445,4.876 h -0.816 v -0.801 c 16.542,-17.176 25.213,-25.849 26.03,-26.027 v 1.62 c -16.178,16.806 -24.58,25.208 -25.214,25.208 z m 10.572,30.912 v -2.44 c 2.99,-3.787 4.886,-5.697 5.698,-5.697 0,2.615 -1.905,5.341 -5.698,8.137 z m -0.808,-5.696 -1.63,-0.815 11.389,-12.198 h 0.808 c -0.363,1.811 -3.886,6.152 -10.567,13.013 z m -1.63,-4.879 c -0.903,0 -1.447,-0.544 -1.623,-1.622 10.656,-11.393 16.353,-17.084 17.072,-17.084 v 0.816 c 0,1.627 -5.147,7.59 -15.449,17.89 z m -3.25,-4.874 v -1.627 l 21.954,-22.781 h 0.82 c 0,2.263 -7.596,10.397 -22.774,24.408 z m -1.626,-4.887 v -1.621 c 17.344,-17.993 26.562,-27.203 27.651,-27.655 0,2.344 -9.215,12.111 -27.651,29.276 z m -0.815,-5.687 -1.629,-0.815 25.216,-26.028 1.627,0.816 -25.214,26.027 z m 19.517,-40.674 c -16.628,17.351 -25.304,26.023 -26.024,26.023 v -1.622 l 24.395,-25.207 1.629,0.806 z m -2.437,-4.064 c -16.181,16.807 -24.588,25.219 -25.216,25.219 0,-0.551 -0.268,-1.36 -0.81,-2.443 l 26.026,-25.214 v 2.438 z m -3.253,-10.571 c -16.628,17.351 -25.308,26.023 -26.027,26.023 v -2.432 l 24.396,-25.219 c 1.088,0.001 1.631,0.54 1.631,1.628 z m -5.698,-16.268 v 0.81 c -16.178,16.812 -24.58,25.224 -25.213,25.224 h -0.812 v -0.814 c 16,-16.72 24.402,-25.132 25.218,-25.219 h 0.807 z m -1.624,-4.07 c -16.625,17.356 -25.302,26.029 -26.027,26.029 v -2.438 l 24.399,-25.212 c 1.086,0.001 1.628,0.538 1.628,1.621 z M 187.415,111.54 c -16.628,17.352 -25.301,26.025 -26.027,26.025 0,-0.541 -0.274,-1.351 -0.815,-2.439 16.809,-16.179 25.216,-24.586 25.216,-25.212 1.084,-0.001 1.626,0.536 1.626,1.626 z M 188.228,48.097 145.12,91.2 h -0.814 v -0.804 c 26.661,-27.294 40.762,-41.395 42.295,-42.299 h 1.627 z m -11.387,17.077 v 1.631 c -19.34,20.062 -29.37,30.094 -30.089,30.094 V 95.272 C 166.086,75.204 176.118,65.174 176.841,65.174 z M 166.269,48.097 h 1.624 C 149.099,67.617 139.338,77.38 138.616,77.38 v -1.629 c 17.353,-17.981 26.57,-27.204 27.653,-27.654 z m 6.508,0 h 2.437 c -21.688,22.414 -33.077,33.799 -34.164,34.155 0,-0.54 -0.266,-1.351 -0.807,-2.439 L 172.777,48.097 z M 142.679,85.513 C 166.904,60.571 179.37,48.097 180.094,48.097 h 1.628 C 156.874,73.668 143.856,86.68 142.679,87.138 v -1.625 z m 18.709,-37.416 c -15.637,16.269 -23.765,24.401 -24.399,24.401 h -0.812 v -1.631 c 14.547,-15.179 22.135,-22.77 22.771,-22.77 h 2.44 z m -22.772,0 h 1.628 c -6.777,7.591 -10.578,11.387 -11.391,11.387 h -0.812 v -0.817 c 6.237,-7.044 9.76,-10.57 10.575,-10.57 z m -20.336,2.442 c -1.08,-0.544 -1.897,-0.815 -2.441,-0.815 0,-0.903 0.544,-1.446 1.63,-1.626 h 2.439 l -1.628,2.441 z m 4.071,2.436 -1.625,-0.813 c 1.983,-2.708 3.336,-4.064 4.059,-4.064 h 1.63 c -0.001,0.272 -1.359,1.896 -4.064,4.877 z m 1.627,2.439 c 4.151,-4.875 6.594,-7.316 7.315,-7.316 h 2.446 c -4.701,5.425 -7.412,8.132 -8.135,8.132 l -1.626,-0.816 z m 6.501,6.508 14.641,-13.825 h 2.441 c -10.122,10.844 -15.541,16.269 -16.269,16.269 0,-0.542 -0.265,-1.357 -0.813,-2.444 z m 3.259,5.695 v -0.812 c 11.744,-12.471 17.979,-18.708 18.705,-18.708 h 1.623 c -12.284,13.017 -18.796,19.52 -19.52,19.52 h -0.808 z m 14.64,32.534 C 165.726,82.17 174.942,72.948 176.032,72.498 v 1.626 c -17.355,17.984 -26.574,27.204 -27.654,27.653 v -1.626 z m 1.628,6.512 v -0.816 c 17.075,-17.713 26.026,-26.66 26.835,-26.843 v 1.631 c -16.628,17.347 -25.304,26.029 -26.026,26.029 h -0.809 z m 1.624,4.877 v -0.817 c 17.08,-17.707 26.026,-26.654 26.842,-26.837 v 1.628 c -16.627,17.349 -25.311,26.026 -26.029,26.026 h -0.813 z m 1.627,3.25 c 16.811,-16.169 25.215,-24.58 25.215,-25.211 1.08,0 1.622,0.539 1.622,1.622 -16.628,17.356 -25.303,26.032 -26.028,26.032 0,-0.545 -0.266,-1.357 -0.809,-2.443 z m 2.437,7.32 v -1.628 c 16.542,-17.166 25.213,-25.845 26.028,-26.025 v 1.625 c -16.626,17.355 -25.304,26.028 -26.028,26.028 z m 1.623,4.876 v -1.623 c 16.542,-17.17 25.222,-25.842 26.025,-26.026 v 2.439 c -16.174,16.811 -24.574,25.209 -25.212,25.209 h -0.813 z m 26.844,-21.959 1.629,0.819 -25.216,26.027 -1.625,-0.814 25.212,-26.032 z m -21.142,35.791 c 16.534,-17.171 25.209,-25.843 26.027,-26.028 v 1.633 c -16.632,17.347 -25.31,26.024 -26.027,26.024 v -1.629 z m 1.621,4.883 c 16.541,-17.173 25.214,-25.844 26.028,-26.029 0,0.539 0.272,1.354 0.816,2.438 -16.725,16 -25.125,24.4 -25.216,25.215 -0.903,0 -1.443,-0.546 -1.628,-1.624 z m 1.629,5.688 25.216,-26.025 1.623,0.816 -25.215,26.023 -1.624,-0.814 z m 2.441,4.071 c 15.993,-16.722 24.397,-25.127 25.208,-25.214 h 0.817 v 1.627 c -16.627,17.35 -25.304,26.026 -26.026,26.026 v -2.439 z m 1.62,6.506 v -0.812 c 16.542,-17.174 25.221,-25.845 26.031,-26.028 v 1.624 c -16.178,16.811 -24.581,25.216 -25.217,25.216 h -0.814 z m 1.631,4.063 c 16.541,-17.164 25.212,-25.842 26.028,-26.028 0,0.539 0.273,1.357 0.812,2.446 -16.718,15.998 -25.124,24.398 -25.216,25.211 -0.902,0 -1.445,-0.541 -1.624,-1.629 z m 2.44,4.883 24.4,-25.211 1.628,0.809 c -16.627,17.351 -25.305,26.023 -26.029,26.023 v -1.621 z m 1.631,6.506 v -1.627 c 15.996,-16.714 24.398,-25.121 25.211,-25.214 h 0.814 v 1.626 c -16.179,16.81 -24.587,25.215 -25.217,25.215 h -0.808 z m 1.624,4.881 v -0.811 c 16.537,-17.171 25.21,-25.847 26.028,-26.028 v 1.627 c -16.179,16.812 -24.583,25.212 -25.212,25.212 h -0.816 z m 1.628,3.248 26.028,-25.21 c 0,0.545 0.273,1.36 0.81,2.439 l -26.028,25.215 c 0,-0.545 -0.266,-1.356 -0.81,-2.444 z m 2.438,5.702 c 15.994,-16.724 24.4,-25.125 25.213,-25.22 h 0.816 v 0.816 c -16.628,17.353 -25.306,26.025 -26.029,26.025 v -1.621 z m 1.621,6.508 v -1.633 c 16.007,-16.715 24.409,-25.122 25.221,-25.212 h 0.806 v 1.621 c -16.175,16.816 -24.577,25.224 -25.209,25.224 h -0.818 z m 27.656,-21.966 v 1.627 l -24.398,25.213 -1.627,-0.811 c 16.544,-17.171 25.213,-25.849 26.025,-26.029 z m -24.398,30.094 c 16.81,-16.17 25.215,-24.577 25.215,-25.21 1.085,0 1.627,0.539 1.627,1.625 -16.625,17.352 -25.309,26.029 -26.027,26.029 -0.001,-0.546 -0.274,-1.355 -0.815,-2.444 z m 2.445,5.696 c 15.995,-16.72 24.396,-25.125 25.212,-25.211 h 0.814 v 0.809 c -16.633,17.352 -25.312,26.03 -26.027,26.03 v -1.628 z m 1.622,4.88 c 16.535,-17.17 25.213,-25.848 26.03,-26.027 v 2.437 l -24.399,25.218 c -0.909,-0.001 -1.443,-0.545 -1.631,-1.628 z m 27.658,-20.337 v 1.633 l -24.408,25.212 -1.619,-0.815 c 16.537,-17.172 25.212,-25.85 26.027,-26.03 z m 5.688,14.647 v 2.438 l -24.398,25.211 c -0.906,0 -1.449,-0.549 -1.627,-1.621 16.54,-17.176 25.211,-25.855 26.025,-26.028 z m -23.584,30.903 24.4,-25.213 1.624,0.815 c -16.623,17.347 -25.306,26.025 -26.024,26.025 v -1.627 z m 3.254,11.393 v -0.816 c 16.537,-17.171 25.214,-25.844 26.025,-26.028 v 1.622 c -16.178,16.805 -24.58,25.223 -25.212,25.223 h -0.813 z M 622.179,183.73 c 0.005,-0.475 0.054,-0.834 0.142,-1.089 0.087,-0.246 0.218,-0.421 0.407,-0.509 0.196,-0.088 0.436,-0.117 0.735,-0.088 0.293,0.033 0.511,0.531 0.663,1.498 0.62,-0.122 1.153,-0.299 1.605,-0.521 0.457,-0.229 0.887,-0.445 1.284,-0.66 0.402,-0.21 0.887,-0.434 1.431,-0.67 0.544,-0.234 1.05,-0.492 1.528,-0.781 0.468,-0.284 0.827,-0.564 1.066,-0.841 0.229,-0.277 0.414,-0.554 0.528,-0.843 0.124,-0.283 0.315,-0.455 0.604,-0.525 0.331,0.005 0.576,0.076 0.723,0.204 0.158,0.127 0.25,0.427 0.295,0.9 -0.018,0.213 -0.072,0.414 -0.164,0.615 -0.087,0.196 -0.271,0.435 -0.571,0.712 -0.306,0.278 -0.62,0.502 -0.958,0.673 -0.337,0.175 -0.708,0.389 -1.115,0.64 -0.413,0.25 -0.827,0.587 -1.234,1.006 -0.409,0.421 -0.702,0.835 -0.882,1.226 -0.179,0.392 -0.364,0.757 -0.561,1.078 -0.196,0.319 -0.489,0.582 -0.876,0.783 -0.397,0.201 -0.996,0.331 -1.818,0.386 -0.549,-0.022 -0.979,-0.088 -1.283,-0.212 -0.31,-0.131 -0.642,-0.501 -0.974,-1.121 -0.337,-0.62 -0.525,-1.24 -0.575,-1.861 z m 3.091,1.54 c 0.423,-0.065 0.805,-0.212 1.158,-0.439 0.342,-0.224 0.707,-0.561 1.061,-1.008 0.364,-0.447 0.522,-0.752 0.484,-0.908 -0.876,0.629 -1.561,1.051 -2.062,1.257 -0.495,0.212 -0.996,0.396 -1.503,0.555 0.148,0.429 0.437,0.608 0.862,0.543 z m -17.206,-1.497 c 0.294,-0.135 0.745,-0.464 1.351,-0.985 0.608,-0.528 1.322,-0.995 2.144,-1.415 0.811,-0.424 1.457,-0.739 1.92,-0.952 0.469,-0.218 0.975,-0.34 1.519,-0.369 0.489,0.179 0.783,0.466 0.881,0.875 0.093,0.407 0.055,0.844 -0.12,1.306 -0.169,0.469 -0.788,1.252 -1.844,2.362 1.682,-0.997 2.846,-1.677 3.487,-2.052 0.638,-0.376 1.153,-0.609 1.551,-0.691 0.392,-0.092 0.729,0.027 1.012,0.359 0.277,0.332 0.277,0.816 0,1.448 -0.283,0.642 -0.375,1.116 -0.283,1.427 0.104,0.31 0.806,0.276 2.133,-0.094 1.317,-0.37 2.312,-0.706 2.977,-1.018 -0.044,0.577 -0.196,0.985 -0.457,1.229 -0.255,0.245 -1.055,0.582 -2.405,1.018 -1.36,0.441 -2.366,0.561 -3.024,0.381 -0.67,-0.186 -1.094,-0.474 -1.273,-0.864 -0.18,-0.392 -0.191,-0.812 -0.06,-1.258 0.136,-0.439 -0.262,-0.336 -1.165,0.31 -0.908,0.654 -1.708,1.165 -2.388,1.53 -0.669,0.369 -1.182,0.631 -1.518,0.777 -0.457,0 -0.816,-0.075 -1.078,-0.233 -0.261,-0.152 -0.402,-0.431 -0.43,-0.827 -0.037,-0.402 0.164,-0.768 0.588,-1.11 0.413,-0.343 0.827,-0.69 1.213,-1.066 0.387,-0.364 0.637,-0.741 0.725,-1.127 0.081,-0.384 -0.137,-0.506 -0.675,-0.364 -0.544,0.141 -1.284,0.533 -2.215,1.186 -0.941,0.654 -1.567,1.058 -1.865,1.221 -0.306,0.156 -0.72,0.261 -1.247,0.311 0.068,-0.742 0.249,-1.178 0.546,-1.315 z m -8.874,0.735 c 0.235,0.354 0.529,0.539 0.871,0.55 0.349,0.017 0.676,-0.081 0.996,-0.282 0.305,-0.208 0.669,-0.403 1.094,-0.594 0.414,-0.18 0.826,-0.413 1.235,-0.686 0.393,-0.271 0.586,-0.619 0.586,-1.029 0,-0.414 -0.151,-0.734 -0.461,-0.963 -0.305,-0.229 -0.441,-0.522 -0.397,-0.877 0.065,-0.353 0.229,-0.598 0.5,-0.729 0.272,-0.133 0.729,-0.212 1.361,-0.22 0.658,0.127 1.071,0.459 1.213,0.996 0.152,0.53 0.141,1.025 -0.022,1.482 -0.18,0.461 0.038,0.871 0.626,1.244 0.593,0.368 1.115,0.488 1.583,0.363 0.457,-0.127 0.729,0.016 0.79,0.435 -0.083,0.44 -0.201,0.707 -0.365,0.794 -0.174,0.094 -0.517,0.174 -1.033,0.245 -0.517,0.076 -1.144,-0.081 -1.861,-0.479 -0.729,-0.387 -1.234,-0.468 -1.556,-0.234 -0.306,0.239 -0.773,0.544 -1.398,0.925 -0.61,0.377 -1.225,0.675 -1.816,0.897 -0.6,0.218 -1.284,0.333 -2.052,0.333 -0.713,-0.24 -1.214,-0.605 -1.514,-1.095 -0.293,-0.499 -0.445,-1.043 -0.445,-1.632 0.082,-0.414 0.38,-0.871 0.924,-1.361 0.539,-0.494 1.062,-0.908 1.552,-1.246 0.489,-0.326 1.001,-0.571 1.507,-0.729 0.512,-0.155 0.876,-0.13 1.088,0.065 0.206,0.202 0.36,0.446 0.419,0.735 0.065,0.288 0.038,0.517 -0.081,0.695 -0.132,0.175 -0.315,0.295 -0.561,0.354 -0.245,0.057 -0.581,0.135 -1.012,0.234 -0.419,0.098 -0.888,0.331 -1.388,0.707 -0.49,0.383 -0.61,0.743 -0.383,1.102 z m -11.332,-2 c 0.55,-0.711 1.169,-1.228 1.876,-1.543 0.708,-0.315 1.274,-0.642 1.698,-0.991 0.436,-0.348 0.85,-0.464 1.234,-0.353 0.393,0.109 0.578,0.359 0.572,0.74 0,0.386 -0.229,0.709 -0.658,0.979 -0.435,0.262 -0.762,0.551 -0.979,0.852 -0.212,0.302 -0.387,0.637 -0.517,1.008 -0.142,0.367 -0.142,0.732 -0.012,1.107 0.132,0.37 0.359,0.609 0.718,0.725 0.36,0.109 0.909,0.162 1.666,0.151 0.745,-0.01 1.41,-0.087 1.98,-0.233 0.564,-0.146 1.066,-0.354 1.49,-0.609 0.435,-0.262 0.789,-0.35 1.094,-0.271 l 0.131,0.526 c -0.196,0.311 -0.474,0.571 -0.832,0.784 -0.365,0.218 -0.72,0.397 -1.077,0.544 -0.354,0.146 -0.865,0.299 -1.513,0.447 -0.665,0.146 -1.404,0.271 -2.252,0.374 l -0.926,0.044 c -0.762,-0.088 -1.306,-0.234 -1.648,-0.431 -0.338,-0.201 -0.609,-0.467 -0.827,-0.811 -0.212,-0.343 -0.326,-0.68 -0.337,-1.022 -0.028,-0.337 0.026,-0.669 0.113,-1.008 0.099,-0.338 -0.005,-0.326 -0.304,0.026 -0.3,0.355 -0.713,0.683 -1.235,0.981 -0.522,0.306 -0.963,0.544 -1.322,0.734 -0.359,0.175 -0.61,-0.103 -0.74,-0.854 1.188,-0.549 2.063,-1.187 2.607,-1.896 z m 10.757,-8.714 -0.393,-0.111 c -0.402,-0.458 -0.713,-0.79 -0.914,-0.998 0.19,-0.412 0.561,-0.782 1.104,-1.107 l 0.425,-0.024 c 0.353,0.167 0.539,0.379 0.555,0.645 0.011,0.266 0.207,0.514 0.55,0.753 l -0.153,0.378 c -0.357,0.224 -0.745,0.376 -1.174,0.464 z m -20.392,10.377 c 0.142,-0.397 0.354,-0.817 0.604,-1.257 0.272,-0.447 0.86,-1.09 1.79,-1.933 0.925,-0.844 1.616,-1.594 2.058,-2.259 -0.681,0.087 -1.133,0.134 -1.36,0.145 -0.229,0.008 -0.364,-0.128 -0.408,-0.41 -0.043,-0.284 0.021,-0.485 0.2,-0.621 0.175,-0.133 0.522,-0.233 1.041,-0.296 0.516,-0.065 1.049,-0.155 1.615,-0.256 0.984,-0.93 1.796,-1.673 2.427,-2.238 0.625,-0.562 1.294,-1.169 2.013,-1.818 0.724,-0.648 1.393,-1.19 2.04,-1.624 0.647,-0.443 1.202,-0.667 1.671,-0.68 0.287,0.367 0.022,0.91 -0.778,1.63 -0.815,0.715 -1.454,1.31 -1.92,1.782 -0.474,0.47 -0.932,0.928 -1.366,1.363 -0.436,0.435 -0.936,0.957 -1.49,1.562 0.723,-0.087 1.806,-0.212 3.236,-0.375 1.441,-0.161 2.922,-0.316 4.429,-0.455 1.502,-0.142 3.025,-0.264 4.554,-0.368 1.523,-0.103 3.02,-0.168 4.494,-0.201 1.47,-0.021 2.998,-0.021 4.588,0.014 1.582,0.039 2.877,0.106 3.867,0.199 1.001,0.098 1.796,0.408 2.389,0.925 -0.61,0.19 -1.159,0.25 -1.66,0.188 -0.499,-0.073 -1.043,-0.119 -1.621,-0.157 -0.576,-0.035 -1.267,-0.044 -2.072,-0.024 -0.794,0.024 -1.779,0.052 -2.916,0.092 -1.148,0.036 -2.372,0.06 -3.673,0.076 -1.295,0.016 -2.618,0.076 -3.95,0.188 -1.344,0.115 -2.61,0.231 -3.819,0.351 -1.202,0.13 -2.448,0.245 -3.754,0.349 -1.289,0.101 -2.214,0.173 -2.77,0.211 -0.539,0.036 -0.995,0.077 -1.349,0.12 -0.359,0.043 -0.647,0.122 -0.871,0.229 -0.233,0.114 -0.479,0.278 -0.729,0.503 -0.261,0.223 -0.582,0.528 -0.968,0.92 -0.387,0.389 -0.844,0.902 -1.367,1.531 -0.521,0.62 -0.983,1.161 -1.397,1.616 -0.402,0.446 -0.69,0.871 -0.87,1.258 -0.186,0.392 -0.196,0.745 -0.064,1.045 0.135,0.305 0.381,0.484 0.75,0.555 0.376,0.065 1.071,-0.081 2.134,-0.446 1.038,-0.359 1.795,-0.68 2.229,-0.963 0.452,-0.283 0.784,-0.457 1.013,-0.533 0.224,-0.076 0.402,-0.027 0.532,0.147 0.121,0.168 -0.054,0.462 -0.544,0.87 -0.489,0.414 -0.925,0.734 -1.306,0.958 -0.386,0.218 -0.82,0.43 -1.322,0.619 -0.494,0.186 -1.05,0.332 -1.67,0.42 -0.402,0.059 -0.773,0.087 -1.133,0.087 -0.222,0 -0.439,-0.005 -0.641,-0.016 -0.561,-0.06 -1.001,-0.191 -1.316,-0.393 -0.321,-0.196 -0.523,-0.462 -0.632,-0.784 -0.12,-0.298 -0.179,-0.56 -0.179,-0.799 0,-0.017 0.005,-0.038 0.021,-0.07 -0.003,-0.249 0.068,-0.575 0.22,-0.977 z m -1.807,-4.044 c 0.066,0.142 0.049,0.293 -0.043,0.445 -0.104,0.155 -0.233,0.311 -0.419,0.462 -0.191,0.158 -0.293,0.349 -0.326,0.577 -0.027,0.234 -0.175,0.364 -0.414,0.399 -0.261,0.036 -0.533,0.004 -0.821,-0.094 -0.299,-0.109 -0.55,-0.143 -0.772,-0.115 -0.212,0.027 -0.462,0.201 -0.735,0.52 -0.282,0.319 -0.527,0.621 -0.739,0.911 -0.223,0.283 -0.376,0.573 -0.468,0.861 -0.098,0.288 -0.071,0.555 0.064,0.79 0.142,0.232 0.343,0.385 0.594,0.462 0.267,0.07 0.647,0.087 1.148,0.032 0.5,-0.05 1.006,-0.152 1.523,-0.311 0.521,-0.152 1.027,-0.315 1.517,-0.495 0.502,-0.179 0.86,-0.332 1.078,-0.457 0.218,-0.126 0.43,-0.017 0.62,0.321 -0.055,0.326 -0.19,0.549 -0.407,0.669 -0.224,0.114 -0.512,0.262 -0.894,0.44 -0.374,0.18 -0.771,0.333 -1.197,0.468 -0.412,0.126 -0.887,0.261 -1.397,0.387 -0.522,0.12 -1.088,0.218 -1.682,0.278 h -0.468 c -0.282,-0.033 -0.555,-0.071 -0.826,-0.126 -0.262,-0.055 -0.527,-0.179 -0.794,-0.386 -0.262,-0.207 -0.491,-0.528 -0.681,-0.952 l -0.049,-0.426 c 0.026,-0.407 0.146,-0.837 0.369,-1.278 0.229,-0.447 0.512,-0.874 0.865,-1.291 0.354,-0.412 0.757,-0.764 1.203,-1.062 0.445,-0.291 0.837,-0.508 1.18,-0.65 0.343,-0.142 0.576,-0.267 0.691,-0.381 0.109,-0.109 0.315,-0.218 0.614,-0.332 0.306,-0.11 0.583,-0.165 0.833,-0.165 0.213,0.017 0.381,0.063 0.521,0.153 0.138,0.095 0.242,0.205 0.312,0.346 z m -21.877,3.449 c 1.115,-1.053 1.964,-1.866 2.568,-2.448 0.609,-0.587 1.061,-0.99 1.37,-1.208 0.301,-0.226 0.567,-0.364 0.807,-0.424 0.261,0.046 0.457,0.098 0.577,0.158 0.113,0.06 0.26,0.195 0.424,0.42 0.174,0.221 0.137,0.58 -0.109,1.083 -0.239,0.504 -0.631,0.924 -1.159,1.266 -0.533,0.336 -0.983,0.637 -1.365,0.896 -0.38,0.26 -0.707,0.514 -1.007,0.764 -0.293,0.256 -0.43,0.483 -0.402,0.696 0.033,0.218 0.213,0.326 0.539,0.326 0.343,0 0.772,-0.098 1.299,-0.293 0.529,-0.191 1.214,-0.507 2.03,-0.941 0.815,-0.438 1.567,-0.796 2.236,-1.084 0.675,-0.288 1.214,-0.539 1.605,-0.753 0.397,-0.217 0.701,-0.494 0.893,-0.831 0.19,-0.337 0.413,-0.568 0.663,-0.686 0.255,-0.117 0.446,-0.06 0.604,0.178 0.158,0.234 0.195,0.607 0.12,1.118 -0.081,0.509 -0.277,0.897 -0.565,1.164 -0.283,0.267 -0.572,0.534 -0.866,0.796 -0.298,0.268 -0.462,0.496 -0.517,0.686 -0.043,0.196 0.012,0.426 0.147,0.697 0.142,0.277 0.724,0.31 1.725,0.103 1.012,-0.206 1.753,-0.419 2.21,-0.631 0.461,-0.218 1.061,-0.392 1.815,-0.544 l 0.377,0.44 c -0.131,0.326 -0.519,0.648 -1.154,0.969 -0.631,0.315 -1.495,0.609 -2.601,0.877 -1.104,0.265 -2.045,0.396 -2.824,0.396 -0.794,0 -1.364,-0.093 -1.682,-0.277 -0.33,-0.185 -0.521,-0.44 -0.576,-0.777 -0.043,-0.332 0.233,-0.921 0.839,-1.758 -0.958,0.527 -1.796,0.952 -2.487,1.263 -0.708,0.31 -1.408,0.61 -2.094,0.897 -0.702,0.288 -1.432,0.463 -2.199,0.539 -0.206,0.021 -0.407,0.027 -0.604,0.027 -0.494,0 -0.909,-0.071 -1.234,-0.208 -0.452,-0.185 -0.691,-0.505 -0.713,-0.946 -0.017,0 -0.022,-0.011 -0.022,-0.026 -10e-4,-0.426 0.445,-1.067 1.332,-1.924 z m -2.535,-4.189 c 0.408,-0.604 0.762,-1.066 1.066,-1.382 0.299,-0.321 0.707,-0.735 1.196,-1.251 0.512,-0.517 1.035,-1.037 1.579,-1.553 0.544,-0.516 1.061,-0.909 1.539,-1.173 0.484,-0.266 0.838,-0.415 1.077,-0.446 0.343,0.072 0.566,0.167 0.675,0.28 0.103,0.11 0.207,0.313 0.282,0.608 -0.156,0.488 -0.457,1.002 -0.925,1.538 -0.461,0.542 -0.963,1.088 -1.496,1.643 -0.526,0.55 -0.974,0.955 -1.344,1.203 -0.375,0.252 -0.75,0.462 -1.12,0.63 -0.381,0.171 -0.789,0.496 -1.236,0.977 -0.435,0.483 -0.918,0.998 -1.42,1.55 -0.5,0.555 -0.848,1.016 -1.06,1.389 -0.207,0.368 -0.431,0.684 -0.681,0.95 -0.234,0.267 -0.358,0.5 -0.358,0.696 0,0.207 0.129,0.332 0.385,0.392 0.262,0.061 0.544,-0.043 0.866,-0.298 0.321,-0.263 0.768,-0.442 1.35,-0.546 0.587,-0.103 1.028,-0.249 1.327,-0.445 0.305,-0.19 0.489,-0.163 0.555,0.087 0.07,0.234 0.114,0.436 0.141,0.587 0.038,0.158 -0.168,0.354 -0.625,0.588 -0.457,0.24 -0.87,0.407 -1.251,0.507 -0.387,0.092 -0.729,0.201 -1.033,0.315 -0.301,0.119 -0.724,0.238 -1.279,0.369 -0.544,0.12 -1.022,0.142 -1.447,0.061 -0.413,-0.082 -0.675,-0.262 -0.74,-0.55 -0.076,-0.287 -0.146,-0.669 -0.218,-1.143 -0.331,0.25 -0.696,0.505 -1.099,0.768 -0.414,0.256 -0.794,0.483 -1.153,0.674 -0.359,0.191 -0.74,0.402 -1.131,0.631 -0.393,0.224 -0.703,0.408 -0.941,0.545 -0.24,0.13 -0.715,0.213 -1.442,0.239 -0.507,-0.06 -0.897,-0.272 -1.147,-0.636 -0.163,-0.268 -0.251,-0.55 -0.251,-0.845 0.109,-0.521 0.331,-0.979 0.648,-1.376 0.331,-0.397 0.679,-0.826 1.065,-1.295 0.381,-0.469 0.778,-0.888 1.182,-1.264 0.402,-0.377 0.81,-0.743 1.207,-1.1 0.396,-0.353 0.844,-0.663 1.338,-0.93 0.501,-0.26 0.986,-0.457 1.464,-0.577 0.479,-0.12 0.876,-0.154 1.176,-0.12 0.298,0.039 0.57,0.163 0.788,0.389 0.229,0.221 0.343,0.452 0.37,0.689 0.021,0.234 0.055,0.484 0.104,0.75 0.054,0.268 0.205,0.279 0.466,0.033 0.256,-0.244 0.479,-0.512 0.665,-0.805 0.184,-0.291 0.484,-0.743 0.886,-1.353 z m -8.907,6.633 c 0.137,0.143 0.55,0.045 1.225,-0.293 0.681,-0.348 1.334,-0.712 1.959,-1.109 0.614,-0.397 1.066,-0.8 1.35,-1.196 0.282,-0.399 0.457,-0.808 0.528,-1.229 0.081,-0.421 0.037,-0.703 -0.121,-0.852 -0.151,-0.146 -0.402,-0.141 -0.745,0.033 -0.343,0.164 -0.761,0.474 -1.257,0.902 -0.506,0.436 -0.969,0.877 -1.393,1.322 -0.413,0.443 -0.815,0.927 -1.186,1.438 -0.382,0.518 -0.501,0.844 -0.36,0.984 z m -10.674,-1.512 c 0.233,0.354 0.527,0.539 0.87,0.55 0.343,0.017 0.675,-0.081 0.985,-0.282 0.304,-0.208 0.68,-0.403 1.099,-0.594 0.418,-0.18 0.827,-0.413 1.229,-0.686 0.402,-0.271 0.599,-0.619 0.599,-1.029 0,-0.414 -0.151,-0.734 -0.468,-0.963 -0.311,-0.229 -0.44,-0.522 -0.382,-0.877 0.045,-0.353 0.213,-0.598 0.479,-0.729 0.278,-0.133 0.734,-0.212 1.36,-0.22 0.675,0.127 1.071,0.459 1.224,0.996 0.147,0.53 0.142,1.025 -0.026,1.482 -0.175,0.461 0.032,0.871 0.631,1.244 0.588,0.368 1.115,0.488 1.577,0.363 0.463,-0.127 0.729,0.016 0.784,0.435 -0.071,0.44 -0.19,0.707 -0.365,0.794 -0.163,0.094 -0.506,0.174 -1.027,0.245 -0.517,0.076 -1.138,-0.081 -1.861,-0.479 -0.718,-0.387 -1.24,-0.468 -1.556,-0.234 -0.3,0.239 -0.768,0.544 -1.393,0.925 -0.62,0.377 -1.225,0.675 -1.828,0.897 -0.594,0.218 -1.279,0.333 -2.051,0.333 -0.702,-0.24 -1.203,-0.605 -1.502,-1.095 -0.294,-0.499 -0.447,-1.043 -0.447,-1.632 0.076,-0.414 0.387,-0.871 0.926,-1.361 0.539,-0.494 1.055,-0.908 1.544,-1.246 0.497,-0.326 1.002,-0.571 1.519,-0.729 0.506,-0.155 0.86,-0.13 1.071,0.065 0.219,0.202 0.36,0.446 0.436,0.735 0.055,0.288 0.027,0.517 -0.103,0.695 -0.114,0.175 -0.305,0.295 -0.544,0.354 -0.245,0.057 -0.582,0.135 -1.007,0.234 -0.436,0.098 -0.897,0.331 -1.387,0.707 -0.505,0.383 -0.625,0.743 -0.386,1.102 z m -11.969,-0.113 c 0.973,-0.539 1.984,-1.375 3.024,-2.493 1.051,-1.116 1.85,-1.779 2.426,-1.992 0.576,-0.215 1.208,-0.321 1.905,-0.321 0.266,0.013 0.494,0.071 0.685,0.177 0.196,0.101 0.316,0.278 0.359,0.517 0.038,0.248 0.033,0.52 -0.026,0.813 -0.055,0.293 -0.229,0.652 -0.528,1.071 -0.294,0.425 -0.648,0.776 -1.057,1.066 -0.396,0.283 -0.684,0.546 -0.843,0.785 -0.152,0.234 -0.167,0.469 -0.026,0.696 0.131,0.229 0.646,0.256 1.539,0.065 0.898,-0.186 1.556,-0.348 1.986,-0.506 0.43,-0.158 0.881,-0.349 1.371,-0.565 l 0.267,0.995 c -1.082,0.5 -2.04,0.931 -2.879,1.284 -0.848,0.358 -1.729,0.588 -2.66,0.712 -0.626,0 -1.094,-0.027 -1.426,-0.075 -0.32,-0.055 -0.62,-0.191 -0.892,-0.414 -0.272,-0.223 -0.435,-0.494 -0.506,-0.815 -0.076,-0.327 -0.028,-0.643 0.163,-0.958 0.18,-0.311 0.44,-0.604 0.795,-0.883 0.357,-0.283 0.728,-0.51 1.136,-0.681 0.397,-0.168 0.74,-0.407 1.029,-0.718 0.283,-0.305 0.354,-0.55 0.207,-0.707 -0.148,-0.163 -0.366,-0.213 -0.648,-0.146 -0.277,0.07 -0.941,0.625 -1.991,1.675 -1.05,1.052 -2.095,1.798 -3.145,2.238 l -0.265,-0.82 z m -14.272,-5.263 c 0.779,-0.743 1.442,-1.355 2.014,-1.828 0.571,-0.471 1.219,-0.969 1.959,-1.483 0.734,-0.514 1.609,-1.106 2.595,-1.773 1.001,-0.663 1.779,-1.12 2.334,-1.37 0.55,-0.255 1.066,-0.636 1.534,-1.143 0.479,-0.508 0.914,-0.903 1.295,-1.187 0.396,-0.281 0.724,-0.502 0.985,-0.663 0.251,-0.162 0.538,-0.396 0.837,-0.697 0.301,-0.303 0.539,-0.504 0.697,-0.613 0.163,-0.098 0.402,-0.189 0.707,-0.26 0.381,0.07 0.654,0.176 0.806,0.316 0.146,0.143 0.293,0.333 0.446,0.569 0.163,0.234 0.37,0.434 0.653,0.597 0.271,0.164 0.706,0.232 1.315,0.211 0.62,-0.023 1.153,0.034 1.615,0.166 0.451,0.13 0.898,0.319 1.334,0.572 0.424,0.252 0.729,0.557 0.925,0.909 0.163,0.343 0.239,0.689 0.239,1.041 v 0.065 c -0.011,0.39 -0.147,0.857 -0.397,1.412 -0.256,0.55 -0.733,1.255 -1.44,2.101 -0.708,0.849 -1.671,1.861 -2.891,3.025 -1.219,1.167 -2.279,2.166 -3.176,2.992 -0.904,0.827 -1.639,1.418 -2.193,1.765 -0.565,0.343 -1.084,0.49 -1.567,0.44 -0.479,-0.055 -0.864,-0.185 -1.175,-0.397 -0.299,-0.211 -0.506,-0.485 -0.631,-0.801 -0.115,-0.318 -0.164,-0.635 -0.158,-0.952 0.017,-0.318 0.082,-0.608 0.18,-0.876 0.104,-0.268 0.271,-0.489 0.5,-0.674 0.234,-0.186 0.491,-0.284 0.789,-0.3 0.3,-0.014 0.626,0.163 0.969,0.533 0.359,0.37 0.724,0.555 1.105,0.555 0.374,0 0.863,-0.215 1.457,-0.642 0.604,-0.43 1.273,-1.028 2.029,-1.798 0.751,-0.77 1.464,-1.537 2.127,-2.315 0.67,-0.772 1.12,-1.39 1.371,-1.85 0.263,-0.459 0.469,-0.961 0.643,-1.514 0.185,-0.558 0.185,-0.937 0,-1.147 -0.174,-0.204 -0.512,-0.337 -1.012,-0.396 -0.513,-0.061 -0.865,-0.118 -1.072,-0.188 -0.201,-0.068 -0.43,-0.037 -0.68,0.086 -0.261,0.128 -0.544,0.272 -0.876,0.433 -0.338,0.164 -0.724,0.532 -1.159,1.1 -0.452,0.566 -0.902,1.091 -1.376,1.582 -0.474,0.485 -0.941,0.969 -1.415,1.442 -0.458,0.471 -0.925,0.958 -1.388,1.461 -0.468,0.502 -0.936,1 -1.409,1.494 -0.479,0.495 -1.056,1.071 -1.752,1.727 -0.691,0.655 -1.376,1.26 -2.04,1.795 -0.657,0.541 -1.365,1.125 -2.122,1.751 -0.762,0.631 -1.61,1.257 -2.585,1.882 -0.962,0.632 -1.875,1.213 -2.72,1.752 -0.849,0.538 -1.616,0.985 -2.297,1.339 -0.68,0.358 -1.299,0.561 -1.859,0.62 -0.534,-0.044 -0.865,-0.152 -1.007,-0.316 -0.147,-0.173 -0.218,-0.489 -0.239,-0.946 0,-0.386 0.055,-0.745 0.158,-1.071 0.103,-0.331 0.223,-0.658 0.353,-0.975 0.142,-0.319 0.502,-0.871 1.105,-1.658 0.598,-0.795 1.137,-1.465 1.626,-2.021 0.479,-0.558 1.072,-1.153 1.758,-1.796 0.69,-0.642 1.414,-1.339 2.176,-2.083 z m -1.398,3.669 c -1.234,1.359 -2.041,2.24 -2.417,2.648 -0.374,0.403 -0.805,0.871 -1.294,1.393 -0.484,0.523 -0.681,0.904 -0.594,1.137 0.099,0.241 0.35,0.312 0.763,0.213 0.396,-0.092 0.962,-0.414 1.692,-0.963 0.739,-0.544 1.648,-1.181 2.736,-1.915 1.083,-0.729 2.23,-1.557 3.416,-2.471 1.204,-0.915 2.379,-1.932 3.526,-3.047 1.154,-1.116 1.926,-1.911 2.328,-2.389 0.397,-0.484 0.877,-1.05 1.453,-1.708 0.566,-0.659 1.033,-1.156 1.388,-1.509 0.363,-0.343 0.526,-0.606 0.472,-0.772 -0.037,-0.166 -0.238,-0.148 -0.586,0.068 -0.359,0.216 -0.773,0.477 -1.252,0.795 -0.468,0.318 -1.077,0.852 -1.827,1.608 -0.763,0.756 -1.465,1.488 -2.128,2.204 -0.669,0.717 -1.464,1.523 -2.384,2.425 -0.924,0.902 -1.778,1.638 -2.535,2.215 -0.767,0.573 -1.24,1.002 -1.409,1.274 -0.168,0.271 -0.331,0.354 -0.483,0.245 -0.153,-0.108 -0.245,-0.321 -0.268,-0.614 -0.027,-0.293 0.278,-0.645 0.909,-1.037 0.626,-0.404 1.502,-1.113 2.616,-2.14 1.133,-1.026 1.698,-1.676 1.709,-1.948 0.022,-0.274 -0.142,-0.356 -0.484,-0.242 -0.338,0.108 -0.681,0.257 -1.007,0.451 -0.331,0.194 -0.832,0.577 -1.49,1.163 -0.673,0.587 -1.62,1.558 -2.85,2.916 z m -24.309,-0.043 c 0.196,-0.413 0.501,-0.84 0.936,-1.287 0.441,-0.446 0.871,-0.827 1.307,-1.154 0.439,-0.32 0.882,-0.549 1.338,-0.663 l 0.512,-0.023 c 0.462,0.017 0.858,0.137 1.196,0.376 0.343,0.237 0.484,0.65 0.436,1.25 -0.055,0.6 -0.353,1.117 -0.892,1.552 -0.539,0.435 -1.148,0.751 -1.823,0.942 -0.68,0.195 -1.044,0.364 -1.099,0.522 -0.055,0.158 0.055,0.32 0.332,0.506 0.272,0.19 0.882,0.306 1.845,0.36 0.946,0.053 1.724,0 2.327,-0.159 0.61,-0.158 1.1,-0.326 1.469,-0.501 0.382,-0.174 0.681,-0.293 0.893,-0.354 0.213,-0.059 0.392,0.055 0.522,0.332 -0.381,0.55 -0.805,0.952 -1.261,1.208 -0.459,0.261 -1.034,0.495 -1.721,0.703 -0.681,0.2 -1.522,0.33 -2.508,0.374 h -0.608 c -1.072,-0.103 -1.796,-0.251 -2.177,-0.435 -0.371,-0.181 -0.664,-0.402 -0.877,-0.653 -0.206,-0.251 -0.358,-0.625 -0.44,-1.132 -0.001,-0.765 0.096,-1.353 0.293,-1.764 z m 1.653,0.306 c 0.903,-0.296 1.508,-0.576 1.808,-0.844 0.304,-0.266 0.435,-0.508 0.385,-0.732 -0.037,-0.219 -0.293,-0.208 -0.75,0.025 -0.457,0.237 -0.767,0.475 -0.937,0.719 -0.173,0.247 -0.337,0.526 -0.506,0.832 z m -17.508,0.753 c 0.707,-0.306 1.497,-0.826 2.367,-1.558 0.859,-0.723 1.97,-1.475 3.323,-2.236 1.355,-0.762 2.362,-1.496 3.031,-2.188 0.681,-0.69 1.104,-1.087 1.284,-1.186 0.19,-0.093 0.343,-0.142 0.463,-0.142 0.113,0 0.25,0.049 0.419,0.142 0.162,0.098 0.196,0.375 0.108,0.824 -0.104,0.448 -0.501,1.066 -1.202,1.853 -0.686,0.795 -1.354,1.425 -1.998,1.901 -0.641,0.471 -1.512,1.295 -2.6,2.48 1.485,-0.648 2.693,-1.193 3.607,-1.629 0.914,-0.435 1.735,-0.768 2.481,-0.984 0.739,-0.223 1.371,-0.378 1.897,-0.457 0.518,-0.082 0.909,0.016 1.148,0.288 0.245,0.272 0.283,0.696 0.108,1.265 -0.168,0.566 -0.494,1.086 -0.957,1.551 -0.474,0.467 -0.778,0.825 -0.909,1.081 -0.135,0.263 0.109,0.388 0.724,0.376 0.62,-0.012 1.117,-0.093 1.502,-0.25 0.382,-0.159 0.762,-0.387 1.121,-0.703 0.364,-0.32 0.632,-0.26 0.811,0.159 -0.082,0.718 -0.43,1.271 -1.028,1.659 -0.615,0.387 -1.393,0.636 -2.334,0.74 -0.941,0.109 -1.676,0.125 -2.182,0.049 -0.512,-0.071 -0.859,-0.32 -1.061,-0.729 -0.201,-0.419 -0.152,-0.837 0.142,-1.263 0.288,-0.429 0.603,-0.832 0.919,-1.223 0.315,-0.383 0.643,-0.715 1.001,-0.997 0.349,-0.278 0.419,-0.447 0.218,-0.496 -0.201,-0.048 -0.561,0.011 -1.066,0.185 -0.527,0.18 -1.322,0.501 -2.389,0.969 -1.071,0.465 -2.089,0.98 -3.046,1.552 -0.964,0.566 -2.105,1.371 -3.439,2.416 -1.344,1.034 -2.394,1.926 -3.166,2.666 -0.768,0.74 -1.709,1.638 -2.824,2.704 -1.11,1.061 -2.122,1.893 -3.014,2.491 -0.893,0.599 -1.475,1.008 -1.736,1.23 -0.255,0.189 -0.521,0.288 -0.806,0.288 h -0.082 c -0.326,-0.017 -0.526,-0.18 -0.604,-0.489 v -0.087 c 0,-0.3 0.295,-0.665 0.887,-1.109 0.665,-0.484 1.491,-1.192 2.466,-2.101 0.974,-0.921 2.284,-2.067 3.933,-3.444 1.649,-1.383 2.896,-2.448 3.744,-3.205 0.849,-0.756 1.556,-1.408 2.122,-1.958 0.57,-0.556 1.495,-1.452 2.785,-2.689 -1.388,0.631 -2.552,1.279 -3.482,1.948 -0.93,0.659 -1.734,1.231 -2.41,1.704 -0.685,0.474 -1.12,0.401 -1.321,-0.213 -0.015,-0.478 0.337,-0.875 1.045,-1.185 z m -12.236,-1.335 c 0.784,-0.744 1.496,-1.303 2.166,-1.664 0.664,-0.363 1.18,-0.626 1.556,-0.79 0.381,-0.163 0.903,-0.28 1.567,-0.35 0.871,0.03 1.457,0.141 1.763,0.34 0.299,0.201 0.494,0.43 0.598,0.686 0.093,0.26 0.131,0.549 0.109,0.875 -0.022,0.326 0.12,0.451 0.419,0.375 0.311,-0.074 0.463,0.074 0.473,0.436 0.022,0.361 -0.125,0.737 -0.424,1.126 -0.31,0.398 -0.544,0.665 -0.719,0.823 -0.184,0.157 -0.238,0.332 -0.163,0.521 0.076,0.191 0.277,0.332 0.615,0.421 0.327,0.086 0.74,0.069 1.225,-0.062 0.479,-0.13 0.897,-0.315 1.256,-0.554 0.355,-0.24 0.675,-0.371 0.964,-0.388 0.283,-0.021 0.474,0.093 0.561,0.327 -0.005,0.435 -0.164,0.794 -0.474,1.07 -0.321,0.272 -0.767,0.497 -1.349,0.676 -0.577,0.169 -1.04,0.267 -1.393,0.282 -0.36,0.012 -0.572,0.018 -0.644,0.018 -0.837,0 -1.468,-0.119 -1.909,-0.37 -0.484,-0.268 -0.849,-0.615 -1.083,-1.045 -0.609,0.163 -1.147,0.375 -1.632,0.643 -0.474,0.261 -0.941,0.467 -1.397,0.592 -0.452,0.137 -0.947,0.208 -1.497,0.208 -0.37,0 -0.762,-0.181 -1.164,-0.523 -0.402,-0.348 -0.604,-1 -0.604,-1.958 0.01,-0.39 0.407,-0.964 1.18,-1.715 z m 2.122,0.319 c -0.549,0.455 -0.898,0.864 -1.045,1.229 -0.146,0.358 -0.103,0.643 0.137,0.832 0.233,0.191 0.608,0.207 1.127,0.044 0.516,-0.162 1.055,-0.392 1.604,-0.669 0.556,-0.293 1.062,-0.6 1.502,-0.916 0.441,-0.314 0.701,-0.614 0.772,-0.887 0.077,-0.271 0.05,-0.555 -0.076,-0.854 -0.124,-0.294 -0.425,-0.422 -0.887,-0.376 -0.462,0.044 -0.974,0.207 -1.507,0.487 -0.539,0.282 -1.083,0.654 -1.627,1.11 z m -13.46,0.294 c 0.435,-0.688 1.452,-1.616 3.051,-2.788 1.602,-1.175 2.711,-2.062 3.33,-2.661 0.615,-0.604 0.653,-1.192 0.109,-1.755 -0.549,-0.562 -0.925,-1.15 -1.138,-1.751 -0.223,-0.605 -0.31,-1.127 -0.282,-1.554 0.039,-0.425 0.196,-0.847 0.489,-1.253 0.3,-0.404 0.675,-0.72 1.138,-0.939 0.463,-0.225 1.115,-0.36 1.959,-0.42 0.843,-0.059 2.546,0.318 5.114,1.14 1.436,-0.822 2.557,-1.41 3.367,-1.774 0.812,-0.359 1.519,-0.818 2.117,-1.372 0.592,-0.554 1.021,-0.877 1.289,-0.978 0.256,-0.102 0.495,-0.153 0.702,-0.153 0.32,0 0.718,0.1 1.186,0.297 0.469,0.19 0.777,0.429 0.953,0.714 0.174,0.278 0.256,0.588 0.256,0.926 0,0.341 -0.104,0.746 -0.289,1.212 -0.195,0.462 -0.544,0.979 -1.056,1.549 -0.505,0.566 -1.143,0.978 -1.905,1.229 -0.761,0.249 -1.512,0.385 -2.268,0.4 -0.751,0.013 -1.959,-0.09 -3.635,-0.313 -1.033,0.667 -1.92,1.299 -2.666,1.901 -0.74,0.604 -1.202,1.088 -1.376,1.45 -0.186,0.368 -0.202,0.634 -0.061,0.803 0.152,0.174 0.393,0.236 0.719,0.199 0.314,-0.036 0.615,-0.118 0.881,-0.253 0.273,-0.13 0.484,-0.152 0.653,-0.054 0.169,0.098 0.256,0.255 0.256,0.479 0,0.22 -0.142,0.486 -0.435,0.808 -0.289,0.318 -0.644,0.541 -1.078,0.672 -0.424,0.132 -0.838,0.182 -1.234,0.152 -0.397,-0.036 -0.729,-0.185 -0.996,-0.455 -0.268,-0.269 -0.436,-0.486 -0.506,-0.644 -0.06,-0.153 -0.251,-0.049 -0.571,0.321 -0.31,0.375 -0.854,0.816 -1.6,1.341 -0.756,0.511 -1.578,1.197 -2.459,2.059 -0.882,0.854 -1.442,1.643 -1.688,2.368 -0.239,0.724 0.022,1.12 0.783,1.181 0.763,0.06 1.915,-0.087 3.444,-0.441 1.534,-0.358 3.053,-0.811 4.549,-1.336 -0.452,0.929 -1.099,1.57 -1.953,1.913 -0.86,0.349 -1.971,0.761 -3.347,1.234 -1.37,0.479 -2.676,0.719 -3.912,0.719 -0.939,-0.021 -1.588,-0.239 -1.958,-0.658 -0.37,-0.408 -0.566,-0.806 -0.588,-1.18 0.003,-0.878 0.22,-1.657 0.656,-2.335 z m 9.313,-8.322 c 0.437,-0.602 1.339,-1.416 2.716,-2.453 -1.552,-0.268 -2.656,-0.44 -3.302,-0.528 -0.638,-0.082 -1.128,0.1 -1.442,0.551 -0.321,0.459 -0.393,0.909 -0.196,1.347 0.191,0.449 0.506,0.887 0.936,1.33 0.419,0.439 0.854,0.357 1.288,-0.247 z m 6.851,-3.085 c 0.892,0.067 1.627,0.056 2.209,-0.031 0.582,-0.091 1.143,-0.29 1.66,-0.607 0.516,-0.312 0.842,-0.642 0.956,-0.986 0.132,-0.343 0.012,-0.577 -0.342,-0.7 -0.349,-0.128 -0.838,0.051 -1.437,0.526 -0.608,0.486 -1.191,0.831 -1.741,1.033 -0.548,0.209 -0.989,0.462 -1.305,0.765 z m -21.19,7.699 c 0.407,-0.604 0.761,-1.066 1.06,-1.382 0.306,-0.321 0.702,-0.735 1.208,-1.251 0.5,-0.517 1.027,-1.037 1.573,-1.553 0.549,-0.517 1.061,-0.909 1.539,-1.173 0.484,-0.266 0.843,-0.415 1.072,-0.446 0.343,0.072 0.565,0.167 0.68,0.28 0.108,0.11 0.207,0.313 0.272,0.608 -0.143,0.488 -0.452,1.002 -0.914,1.538 -0.464,0.542 -0.969,1.088 -1.497,1.643 -0.533,0.55 -0.979,0.955 -1.355,1.203 -0.363,0.252 -0.739,0.462 -1.114,0.63 -0.381,0.171 -0.789,0.496 -1.229,0.977 -0.447,0.483 -0.914,0.998 -1.415,1.55 -0.505,0.555 -0.86,1.016 -1.066,1.389 -0.213,0.368 -0.435,0.684 -0.68,0.95 -0.239,0.267 -0.365,0.5 -0.365,0.696 0,0.207 0.137,0.332 0.393,0.392 0.25,0.061 0.544,-0.043 0.858,-0.298 0.316,-0.263 0.769,-0.442 1.351,-0.546 0.587,-0.103 1.033,-0.249 1.333,-0.445 0.299,-0.19 0.49,-0.163 0.55,0.087 0.07,0.234 0.119,0.436 0.146,0.587 0.033,0.158 -0.18,0.354 -0.631,0.588 -0.447,0.24 -0.866,0.407 -1.247,0.507 -0.386,0.092 -0.733,0.201 -1.033,0.315 -0.299,0.119 -0.729,0.238 -1.268,0.369 -0.549,0.12 -1.039,0.142 -1.458,0.061 -0.425,-0.082 -0.664,-0.262 -0.74,-0.55 -0.071,-0.287 -0.152,-0.669 -0.223,-1.143 -0.333,0.25 -0.69,0.505 -1.1,0.768 -0.402,0.256 -0.788,0.483 -1.147,0.674 -0.364,0.19 -0.74,0.402 -1.133,0.631 -0.39,0.224 -0.7,0.408 -0.94,0.545 -0.234,0.13 -0.718,0.213 -1.441,0.239 -0.512,-0.06 -0.898,-0.272 -1.153,-0.636 -0.164,-0.268 -0.239,-0.55 -0.239,-0.845 0.097,-0.521 0.311,-0.979 0.636,-1.376 0.332,-0.397 0.686,-0.826 1.066,-1.295 0.387,-0.469 0.778,-0.888 1.192,-1.264 0.402,-0.377 0.799,-0.743 1.202,-1.1 0.402,-0.353 0.849,-0.663 1.339,-0.93 0.494,-0.26 0.983,-0.457 1.463,-0.577 0.483,-0.12 0.871,-0.154 1.175,-0.12 0.305,0.039 0.566,0.163 0.778,0.389 0.229,0.221 0.354,0.452 0.37,0.689 0.027,0.234 0.064,0.484 0.114,0.75 0.049,0.268 0.207,0.279 0.468,0.033 0.256,-0.244 0.479,-0.512 0.664,-0.805 0.182,-0.291 0.476,-0.743 0.886,-1.353 z m -8.913,6.633 c 0.146,0.143 0.554,0.045 1.229,-0.293 0.68,-0.348 1.333,-0.712 1.952,-1.109 0.621,-0.397 1.071,-0.8 1.355,-1.196 0.277,-0.399 0.451,-0.808 0.526,-1.229 0.076,-0.421 0.034,-0.703 -0.125,-0.852 -0.151,-0.146 -0.401,-0.141 -0.733,0.033 -0.348,0.164 -0.762,0.474 -1.268,0.902 -0.501,0.436 -0.963,0.877 -1.388,1.322 -0.419,0.443 -0.816,0.927 -1.192,1.438 -0.378,0.518 -0.492,0.844 -0.356,0.984 z m -10.022,-3.262 c 0.19,-0.413 0.511,-0.84 0.941,-1.287 0.435,-0.446 0.875,-0.827 1.312,-1.154 0.435,-0.32 0.875,-0.549 1.326,-0.663 l 0.523,-0.023 c 0.457,0.017 0.854,0.137 1.19,0.376 0.337,0.237 0.491,0.65 0.437,1.25 -0.055,0.6 -0.349,1.117 -0.887,1.552 -0.539,0.435 -1.149,0.751 -1.829,0.942 -0.681,0.195 -1.05,0.364 -1.093,0.522 -0.05,0.158 0.055,0.32 0.332,0.506 0.267,0.19 0.88,0.306 1.833,0.36 0.958,0.053 1.735,0 2.339,-0.159 0.61,-0.158 1.095,-0.326 1.476,-0.501 0.374,-0.174 0.669,-0.293 0.881,-0.354 0.218,-0.059 0.392,0.055 0.526,0.332 -0.385,0.55 -0.809,0.952 -1.261,1.208 -0.458,0.261 -1.033,0.495 -1.719,0.703 -0.692,0.2 -1.53,0.33 -2.515,0.374 H 420.3 c -1.083,-0.103 -1.812,-0.251 -2.181,-0.435 -0.382,-0.181 -0.676,-0.402 -0.877,-0.653 -0.206,-0.251 -0.353,-0.625 -0.445,-1.132 0,-0.765 0.098,-1.353 0.288,-1.764 z m 1.659,0.306 c 0.902,-0.296 1.507,-0.576 1.812,-0.844 0.305,-0.266 0.43,-0.508 0.386,-0.732 -0.043,-0.219 -0.293,-0.208 -0.756,0.025 -0.45,0.237 -0.772,0.475 -0.941,0.719 -0.17,0.247 -0.332,0.526 -0.501,0.832 z m -6.545,-11.121 c 0.435,-0.325 0.913,-0.715 1.426,-1.172 0.499,-0.459 1.137,-0.938 1.888,-1.44 0.751,-0.504 1.507,-0.949 2.258,-1.34 0.756,-0.392 1.371,-0.666 1.855,-0.818 0.479,-0.156 1.175,-0.266 2.089,-0.324 0.816,0.295 1.306,0.686 1.474,1.165 0.17,0.481 0.234,0.991 0.186,1.537 -0.037,0.548 -0.201,0.982 -0.473,1.3 -0.272,0.312 -0.638,0.739 -1.083,1.26 -0.451,0.525 -1.055,1.027 -1.823,1.51 -0.757,0.479 -1.681,0.934 -2.763,1.369 -1.089,0.436 -1.829,1.05 -2.216,1.847 -0.396,0.803 -0.767,1.693 -1.114,2.674 -0.343,0.979 -0.626,2.002 -0.849,3.057 -0.224,1.06 -0.436,2.013 -0.658,2.862 -0.213,0.847 -0.403,1.811 -0.583,2.888 -0.179,1.078 -0.202,2.16 -0.065,3.248 0.136,1.083 0.468,2.096 1.012,3.042 0.533,0.945 1.122,1.686 1.747,2.214 0.626,0.534 1.393,0.822 2.284,0.855 0.887,0.037 1.818,-0.071 2.775,-0.321 0.963,-0.251 1.807,-0.725 2.535,-1.415 0.734,-0.697 0.952,-1.388 0.659,-2.073 -0.3,-0.685 -0.288,-1.214 0.033,-1.583 0.314,-0.369 0.75,-0.364 1.306,0.021 0.549,0.386 0.826,1.176 0.826,2.366 -0.725,1.388 -1.376,2.319 -1.954,2.775 -0.586,0.457 -1.245,0.832 -1.964,1.121 -0.723,0.282 -1.822,0.582 -3.302,0.893 l -1.883,-0.017 c -0.837,-0.256 -1.551,-0.582 -2.128,-0.99 -0.57,-0.413 -1.103,-0.893 -1.594,-1.453 -0.49,-0.562 -0.93,-1.137 -1.316,-1.725 -0.393,-0.593 -0.681,-1.458 -0.864,-2.606 -0.186,-1.143 -0.234,-2.42 -0.159,-3.829 0.087,-1.415 0.343,-3.068 0.779,-4.968 0.435,-1.896 1.011,-3.511 1.729,-4.85 0.712,-1.338 0.876,-2.296 0.489,-2.88 -0.396,-0.585 -0.229,-1.053 0.49,-1.418 0.729,-0.359 1.322,-0.67 1.791,-0.917 0.461,-0.251 0.941,-0.45 1.425,-0.601 0.495,-0.148 1.061,-0.447 1.725,-0.895 0.669,-0.449 1.273,-0.981 1.806,-1.588 0.544,-0.605 0.714,-1.05 0.512,-1.34 -0.195,-0.288 -0.419,-0.453 -0.653,-0.498 -0.239,-0.045 -0.674,0.084 -1.316,0.377 -0.642,0.296 -1.387,0.68 -2.226,1.154 -0.843,0.471 -1.702,1.019 -2.567,1.637 -0.876,0.625 -1.584,1.162 -2.121,1.63 -0.545,0.465 -1.16,1.155 -1.867,2.074 -0.712,0.912 -1.431,1.804 -2.155,2.677 -0.723,0.871 -1.457,1.818 -2.213,2.846 -0.752,1.026 -1.365,1.823 -1.823,2.396 -0.469,0.565 -0.995,1.114 -1.583,1.648 -0.594,0.533 -1.072,0.914 -1.431,1.143 -0.364,0.233 -0.784,0.338 -1.251,0.332 -0.479,-0.005 -0.876,-0.266 -1.203,-0.762 l 0.021,-1.197 c 0.523,-0.267 0.946,-0.439 1.278,-0.511 0.333,-0.076 0.74,-0.288 1.22,-0.642 0.479,-0.355 0.913,-0.811 1.315,-1.357 0.402,-0.544 0.832,-1.202 1.296,-1.98 0.462,-0.773 0.512,-1.052 0.142,-0.828 -0.365,0.221 -0.898,0.583 -1.589,1.083 -0.697,0.503 -1.366,0.865 -2.009,1.085 -0.641,0.227 -0.723,0.035 -0.243,-0.555 0.483,-0.591 1.103,-1.184 1.859,-1.782 0.762,-0.595 1.513,-1.24 2.247,-1.926 0.74,-0.688 1.59,-1.469 2.547,-2.339 0.947,-0.872 1.821,-1.823 2.616,-2.858 0.795,-1.035 1.41,-1.84 1.834,-2.424 0.419,-0.585 0.729,-1.053 0.941,-1.41 0.201,-0.354 0.473,-0.582 0.806,-0.687 0.326,-0.102 0.625,-0.073 0.87,0.094 0.256,0.157 0.402,0.417 0.468,0.771 0.06,0.354 -0.157,0.83 -0.663,1.432 -0.502,0.598 -0.839,0.998 -1.008,1.214 -0.174,0.215 -0.294,0.473 -0.375,0.766 -0.075,0.297 0.094,0.28 0.528,-0.044 z m -41.148,11.754 c 0.381,-0.303 0.963,-0.72 1.735,-1.252 0.779,-0.527 1.601,-1.057 2.459,-1.573 0.868,-0.518 1.66,-0.903 2.383,-1.147 0.414,-0.137 0.765,-0.203 1.062,-0.203 0.241,0 0.435,0.033 0.604,0.109 0.38,0.191 0.636,0.443 0.762,0.751 0.125,0.313 0.049,0.699 -0.246,1.164 -0.288,0.465 -0.74,0.916 -1.349,1.355 -0.615,0.432 -1.17,0.801 -1.662,1.105 -0.492,0.299 -0.743,0.56 -0.743,0.768 0,0.201 0.213,0.391 0.646,0.549 0.422,0.164 1.08,0.175 1.967,0.033 0.887,-0.137 1.648,-0.359 2.296,-0.664 0.645,-0.306 1.17,-0.522 1.58,-0.652 0.42,-0.131 0.661,0 0.734,0.396 0.074,0.402 -0.014,0.887 -0.267,1.453 -0.247,0.571 -0.736,1.1 -1.449,1.584 -0.72,0.489 -1.557,1.048 -2.517,1.68 -0.96,0.643 -1.902,1.219 -2.821,1.757 -0.927,0.528 -1.684,1.165 -2.27,1.91 -0.592,0.751 -0.662,0.996 -0.212,0.746 0.447,-0.25 1.031,-0.593 1.747,-1.008 0.718,-0.424 1.534,-0.945 2.448,-1.577 0.913,-0.625 2.378,-1.703 4.388,-3.231 2.008,-1.529 3.516,-2.547 4.508,-3.058 0.996,-0.512 1.616,-0.74 1.878,-0.696 0.151,0.032 0.239,0.126 0.239,0.289 0,0.086 -0.022,0.194 -0.065,0.331 -0.3,0.25 -0.844,0.631 -1.642,1.131 -0.796,0.502 -1.884,1.229 -3.268,2.193 -1.381,0.958 -2.728,1.947 -4.03,2.981 -1.306,1.022 -2.595,1.893 -3.868,2.611 -1.269,0.712 -2.372,1.377 -3.3,1.98 -0.4,0.163 -0.748,0.245 -1.045,0.245 -0.18,0 -0.329,-0.033 -0.46,-0.093 -0.369,-0.157 -0.381,-0.631 -0.026,-1.414 0.358,-0.778 0.838,-1.492 1.432,-2.128 0.598,-0.631 1.239,-1.207 1.93,-1.725 0.686,-0.517 1.388,-0.975 2.114,-1.376 0.724,-0.397 1.407,-0.822 2.06,-1.263 0.647,-0.44 1.063,-0.826 1.24,-1.153 0.18,-0.321 0.033,-0.43 -0.431,-0.321 -0.468,0.114 -1.09,0.229 -1.87,0.338 -0.784,0.109 -1.47,0.152 -2.041,0.13 -0.576,-0.021 -1.082,-0.185 -1.507,-0.473 -0.431,-0.3 -0.582,-0.697 -0.457,-1.187 0.131,-0.501 0.405,-0.951 0.832,-1.365 0.424,-0.413 0.952,-0.812 1.578,-1.198 0.614,-0.381 1.038,-0.681 1.263,-0.897 0.218,-0.213 0.343,-0.4 0.374,-0.564 0.028,-0.16 -0.246,-0.105 -0.832,0.166 -0.578,0.275 -1.224,0.621 -1.917,1.051 -0.694,0.432 -1.462,1.03 -2.315,1.797 -0.85,0.767 -2.089,1.284 -3.728,1.551 0.288,-0.724 0.62,-1.154 0.969,-1.284 0.357,-0.129 0.726,-0.347 1.11,-0.652 z m -12.389,-0.021 c 0.283,-0.42 0.884,-1.059 1.801,-1.916 0.915,-0.861 1.779,-1.551 2.601,-2.074 0.815,-0.522 1.61,-1.251 2.384,-2.181 0.767,-0.934 1.428,-1.67 1.99,-2.226 0.561,-0.555 1.144,-0.999 1.739,-1.319 0.602,-0.324 1.109,-0.504 1.543,-0.532 0.456,0.089 0.722,0.347 0.793,0.774 -0.144,0.429 -0.462,0.919 -0.952,1.463 -0.487,0.547 -0.981,1.012 -1.484,1.393 -0.502,0.387 -1.028,0.772 -1.585,1.165 -0.552,0.394 -1.158,0.837 -1.8,1.333 -0.653,0.492 -1.281,0.933 -1.888,1.328 -0.604,0.392 -1.377,0.995 -2.318,1.806 -0.933,0.811 -1.417,1.355 -1.45,1.64 -0.027,0.283 0.079,0.511 0.325,0.686 0.243,0.179 0.581,0.239 1.022,0.168 0.435,-0.065 0.908,-0.223 1.426,-0.468 0.516,-0.244 0.987,-0.462 1.408,-0.646 0.416,-0.196 0.809,-0.409 1.169,-0.627 0.363,-0.225 0.403,-0.431 0.112,-0.621 -0.285,-0.19 -0.416,-0.451 -0.383,-0.775 0.027,-0.323 0.207,-0.64 0.53,-0.938 0.321,-0.306 0.672,-0.528 1.036,-0.67 0.37,-0.137 0.705,-0.185 0.998,-0.142 0.297,0.049 0.591,0.153 0.879,0.31 0.286,0.161 0.458,0.387 0.506,0.674 0.049,0.294 0.033,0.61 -0.064,0.952 -0.099,0.348 -0.24,0.594 -0.431,0.735 -0.19,0.136 -0.217,0.29 -0.065,0.462 0.146,0.168 0.388,0.306 0.73,0.414 0.339,0.104 0.676,0.137 1.017,0.1 0.343,-0.033 0.675,-0.071 1.013,-0.088 0.328,-0.027 0.533,0.186 0.604,0.625 -0.719,0.506 -1.322,0.789 -1.804,0.844 -0.479,0.055 -0.95,0.022 -1.396,-0.108 -0.452,-0.13 -0.811,-0.365 -1.072,-0.702 -0.267,-0.332 -0.524,-0.445 -0.767,-0.343 -0.242,0.108 -0.502,0.262 -0.783,0.468 -0.283,0.212 -0.744,0.463 -1.377,0.767 -0.631,0.3 -1.274,0.567 -1.912,0.795 -0.646,0.229 -1.329,0.419 -2.054,0.565 l -0.909,0.022 c -0.985,-0.267 -1.513,-0.811 -1.572,-1.643 0.016,-0.562 0.163,-1.051 0.44,-1.47 z m 8.912,-1.242 c 0.189,-0.185 0.244,-0.375 0.163,-0.576 -0.082,-0.201 -0.259,-0.281 -0.531,-0.245 -0.271,0.038 -0.442,0.163 -0.497,0.364 -0.06,0.207 0.021,0.381 0.238,0.523 0.225,0.142 0.437,0.119 0.627,-0.066 z m 253.032,-74.007 c -1.007,0.128 -2.536,0.756 -4.575,1.885 -2.047,1.132 -4.223,2.797 -6.546,4.996 -2.329,2.203 -4.554,4.401 -6.697,6.596 -2.138,2.202 -3.841,3.978 -5.13,5.331 -1.291,1.352 -2.803,3.317 -4.527,5.887 -1.73,2.582 -2.993,4.498 -3.776,5.752 -0.784,1.258 -1.726,2.406 -2.818,3.439 -1.109,1.035 -1.769,0.99 -1.986,-0.137 -0.217,-1.132 -0.364,-2.198 -0.468,-3.208 -0.098,-1.005 -0.614,-1.983 -1.556,-2.921 -0.946,-0.944 -2.062,-1.49 -3.346,-1.651 -1.285,-0.158 -2.954,0.016 -5.005,0.52 -2.041,0.506 -4.109,1.322 -6.215,2.451 -2.105,1.137 -3.998,2.449 -5.706,3.957 -1.692,1.509 -3.406,3.067 -5.126,4.667 -1.735,1.602 -3.411,3.394 -5.055,5.381 -0.06,0.071 -0.119,0.144 -0.179,0.216 -2.003,0.906 -3.896,1.677 -5.659,2.321 -1.822,0.661 -4.641,1.384 -8.438,2.167 -3.804,0.785 -5.979,0.693 -6.557,-0.28 -0.565,-0.975 -0.517,-1.961 0.142,-2.969 0.664,-1.008 1.855,-2.119 3.591,-3.35 1.724,-1.22 3.216,-2.728 4.473,-4.522 1.256,-1.793 2.018,-3.315 2.263,-4.567 0.251,-1.264 0.277,-2.407 0.098,-3.445 -0.185,-1.039 -0.696,-1.774 -1.519,-2.213 -0.81,-0.443 -1.789,-0.692 -2.915,-0.755 -2.955,0 -5.659,0.458 -8.112,1.367 -2.448,0.909 -5.887,3.741 -10.315,8.479 -4.429,4.746 -8.722,8.285 -12.867,10.608 l 0.288,0.879 c -0.142,0.088 -0.282,0.178 -0.43,0.275 -1.508,1.021 -3.287,1.809 -5.349,2.357 -2.062,0.55 -3.792,0.64 -5.206,0.26 -1.415,-0.376 -2.28,-0.975 -2.596,-1.79 -0.31,-0.816 -0.099,-1.558 0.658,-2.218 0.762,-0.654 1.778,-1.82 3.068,-3.482 1.284,-1.667 1.898,-3.275 1.834,-4.811 -0.055,-1.542 -0.73,-2.15 -2.02,-1.836 -1.293,0.312 -1.887,-0.216 -1.795,-1.608 0.092,-1.38 -0.07,-2.618 -0.468,-3.721 -0.414,-1.098 -1.262,-2.073 -2.552,-2.92 -1.289,-0.851 -3.787,-1.333 -7.491,-1.464 -2.824,0.317 -5.043,0.821 -6.649,1.512 -1.594,0.688 -3.814,1.808 -6.643,3.344 -2.823,1.541 -5.893,3.905 -9.189,7.096 -3.188,3.083 -4.854,5.442 -5.017,7.102 -2.562,0.571 -4.69,1.245 -6.344,2.015 -1.942,0.913 -5.071,1.808 -9.38,2.688 -4.304,0.884 -6.752,0.744 -7.345,-0.422 -0.599,-1.164 -0.806,-2.154 -0.62,-2.971 0.189,-0.816 0.913,-1.794 2.165,-2.921 1.267,-1.134 2.504,-2.261 3.728,-3.391 1.229,-1.133 2.012,-2.785 2.35,-4.949 0.354,-2.169 0.196,-3.754 -0.463,-4.764 -0.657,-1.007 -1.518,-1.255 -2.595,-0.757 -1.066,0.504 -2.008,1.48 -2.828,2.927 -0.816,1.443 -2.068,2.619 -3.767,3.535 -1.697,0.907 -3.976,1.98 -6.833,3.202 -2.861,1.226 -6.034,2.77 -9.526,4.62 -3.482,1.854 -6.355,3.188 -8.617,4.006 -2.265,0.821 -4.104,1.222 -5.518,1.222 -1.415,0 -2.183,-0.453 -2.312,-1.364 -0.119,-0.911 0.44,-1.898 1.703,-2.964 1.257,-1.071 2.682,-2.158 4.287,-3.257 1.599,-1.101 3.53,-2.369 5.8,-3.817 2.258,-1.447 3.906,-3.234 4.939,-5.371 1.04,-2.136 1.198,-3.681 0.479,-4.62 -0.728,-0.944 -1.338,-1.54 -1.844,-1.791 -0.5,-0.25 -1.316,-0.471 -2.454,-0.663 -0.995,0.255 -2.143,0.852 -3.433,1.791 -1.29,0.945 -3.221,2.658 -5.794,5.141 -2.221,2.135 -5.24,5.014 -9.049,8.626 -1.67,0 -3.28,0.38 -4.81,1.126 -3.079,1.511 -6.063,2.638 -8.954,3.394 -2.894,0.756 -4.653,0.77 -5.279,0.051 -0.631,-0.725 -0.549,-1.823 0.229,-3.301 0.795,-1.476 1.231,-3.061 1.323,-4.764 0.092,-1.698 -0.343,-3.482 -1.323,-5.37 -0.969,-1.887 -2.714,-3.424 -5.228,-4.615 h -2.073 c -4.338,2.195 -7.866,3.985 -10.604,5.371 -2.731,1.379 -5.419,3.217 -8.063,5.512 -2.634,2.292 -3.999,4.43 -4.098,6.409 -0.026,0.641 0.02,1.268 0.129,1.87 -2.026,0.683 -4.355,1.396 -7.01,2.134 -5.628,1.574 -8.637,1.7 -9.052,0.381 -0.4,-1.317 -0.012,-3.332 1.184,-6.034 1.19,-2.699 1.19,-4.76 0,-6.17 -1.195,-1.417 -2.629,-1.936 -4.293,-1.555 -1.665,0.369 -3.867,1.363 -6.595,2.965 -2.736,1.6 -7.686,4.513 -14.847,8.72 4.521,-4.712 7.148,-8.063 7.869,-10.04 0.726,-1.98 0.876,-3.836 0.471,-5.562 -0.408,-1.724 -1.646,-2.967 -3.721,-3.724 -2.325,0.129 -4.474,0.641 -6.458,1.557 -1.979,0.916 -4.709,2.259 -8.197,4.056 -3.493,1.784 -6.521,3.8 -9.1,6.028 -2.579,2.234 -4.497,3.627 -5.752,4.196 -0.871,0.389 -1.51,1.417 -1.926,3.052 -0.397,0.212 -0.806,0.454 -1.231,0.74 -1.51,1.021 -3.287,1.809 -5.347,2.357 -2.062,0.55 -3.793,0.64 -5.21,0.26 -1.411,-0.376 -2.276,-0.975 -2.589,-1.79 -0.316,-0.816 -0.093,-1.558 0.659,-2.218 0.753,-0.654 1.778,-1.82 3.061,-3.482 1.288,-1.667 1.904,-3.275 1.839,-4.811 -0.06,-1.542 -0.735,-2.15 -2.024,-1.836 -1.29,0.312 -1.884,-0.216 -1.79,-1.608 0.091,-1.38 -0.061,-2.618 -0.472,-3.721 -0.408,-1.098 -1.258,-2.073 -2.547,-2.92 -1.29,-0.851 -3.786,-1.333 -7.492,-1.464 -2.83,0.317 -5.042,0.821 -6.644,1.512 -1.605,0.688 -3.818,1.808 -6.648,3.344 -2.826,1.541 -5.889,3.905 -9.19,7.096 -3.297,3.188 -4.983,5.615 -5.039,7.279 0,4.083 0.854,6.866 2.565,8.341 1.712,1.483 3.371,2.218 4.973,2.218 2.326,0 4.445,-0.286 6.363,-0.849 1.919,-0.567 3.897,-1.415 5.94,-2.544 2.04,-1.132 4.351,-2.044 6.931,-2.735 1.001,1.822 2.541,3.3 4.614,4.427 1.886,1.071 4.586,1.606 8.11,1.606 0.311,0 1.223,-0.027 2.729,-0.097 1.503,-0.061 3.495,-0.459 5.959,-1.201 2.465,-0.733 4.369,-1.698 5.708,-2.872 1.208,-1.068 1.877,-2.415 2.016,-4.034 1.383,-0.789 3.895,-2.447 7.572,-4.994 3.994,-2.761 7.137,-4.448 9.427,-5.042 2.295,-0.596 3.251,-0.075 2.875,1.559 -0.376,1.628 -1.399,3.234 -3.063,4.804 -1.665,1.572 -3.394,3.078 -5.181,4.525 -1.794,1.442 -2.63,3.019 -2.5,4.712 0.124,1.702 0.733,2.872 1.836,3.536 1.099,0.662 2.627,0.987 4.575,0.987 1.445,-0.627 3.613,-1.732 6.504,-3.294 2.889,-1.575 6.265,-3.746 10.131,-6.509 3.866,-2.767 5.514,-3.206 4.944,-1.319 -0.562,1.887 -0.47,3.662 0.286,5.329 0.757,1.664 2.546,2.888 5.376,3.671 2.824,0.789 7.113,0.256 12.865,-1.603 4.031,-1.294 6.909,-2.393 8.656,-3.292 1.24,1.235 2.977,1.893 5.196,1.974 2.551,0.097 5.798,0.21 9.761,0.332 -4.151,1.506 -8.03,3.236 -11.638,5.185 -3.619,1.953 -7.929,4.323 -12.92,7.119 -4.993,2.793 -9.501,5.59 -13.525,8.386 -4.021,2.801 -7.855,5.597 -11.501,8.389 -3.644,2.802 -8.888,7.965 -15.741,15.501 -3.142,4.407 -5.086,8.492 -5.846,12.258 0.379,3.209 1.211,5.744 2.502,7.594 1.287,1.851 3.786,3.314 7.489,4.381 h 2.078 c 1.95,-0.251 4,-0.865 6.173,-1.844 2.169,-0.97 5.152,-3.194 8.954,-6.688 3.8,-3.482 6.975,-6.752 9.518,-9.805 2.547,-3.046 5.783,-6.97 9.71,-11.779 3.933,-4.808 7.9,-9.978 11.924,-15.51 4.024,-5.533 7.683,-9.867 10.977,-13.005 3.309,-3.145 6.089,-5.406 8.347,-6.786 2.264,-1.386 5.244,-2.764 8.961,-4.151 3.593,-1.339 6.654,-2.413 9.19,-3.224 -0.351,0.715 -0.519,1.355 -0.519,1.901 0,0.067 0.027,0.101 0.087,0.101 0.068,1.885 1.077,3.23 3.018,4.051 1.385,0.563 3.143,0.849 5.28,0.849 0.816,0 1.671,-0.034 2.546,-0.094 3.271,-0.312 6.383,-1.082 9.331,-2.307 2.954,-1.224 5.925,-2.499 8.911,-3.82 2.982,-1.317 6.523,-3.113 10.6,-5.374 -2.574,3.58 -3.754,6.082 -3.532,7.495 0.218,1.415 1.023,2.517 2.406,3.297 1.376,0.79 3.765,1.181 7.154,1.181 3.335,0 7.339,-0.569 12.024,-1.698 4.679,-1.129 8.373,-2.373 11.077,-3.722 0.876,-0.438 1.632,-0.881 2.279,-1.325 0.413,1.862 1.132,3.251 2.171,4.148 1.713,1.483 3.374,2.218 4.973,2.218 2.329,0 4.445,-0.286 6.36,-0.849 1.916,-0.567 3.9,-1.415 5.946,-2.544 2.036,-1.132 4.343,-2.044 6.927,-2.735 1.001,1.822 2.546,3.3 4.613,4.427 1.888,1.071 4.593,1.606 8.112,1.606 0.315,0 1.219,-0.027 2.731,-0.097 1.513,-0.061 3.492,-0.459 5.968,-1.201 2.466,-0.733 4.358,-1.698 5.696,-2.872 1.334,-1.182 2.014,-2.694 2.052,-4.553 -0.032,-0.056 -0.05,-0.105 -0.077,-0.163 2.743,-1.769 5.48,-4.021 8.222,-6.76 4.467,-4.465 7.297,-6.833 8.489,-7.118 1.189,-0.286 2.109,-0.077 2.741,0.612 0.625,0.691 0.321,1.699 -0.903,3.012 -1.219,1.321 -2.688,2.346 -4.386,3.063 -1.698,0.723 -3.285,1.683 -4.804,2.877 -1.514,1.195 -2.639,2.451 -3.396,3.77 -0.757,1.32 -0.99,2.672 -0.708,4.054 0.283,1.383 1.008,2.545 2.178,3.49 1.164,0.945 2.427,1.52 3.813,1.745 1.388,0.219 3.39,0.328 6.028,0.328 3.96,-0.501 7.731,-1.511 11.307,-3.017 1.637,-0.685 3.377,-1.441 5.211,-2.264 -0.62,1.166 -1.071,2.422 -1.344,3.77 0,1.263 0.354,2.454 1.04,3.582 1.065,1.579 2.709,2.483 4.907,2.74 3.073,-0.132 5.119,-0.473 6.12,-1.042 1.008,-0.566 2.346,-1.337 4.011,-2.312 1.665,-0.975 3.265,-1.864 4.804,-2.682 1.54,-0.82 3.177,-1.775 4.901,-2.875 1.731,-1.104 3.287,-2.184 4.68,-3.255 0.305,2.008 0.615,3.635 0.931,4.859 0.314,1.225 1.365,2.006 3.155,2.352 1.79,0.35 3.853,0.252 6.181,-0.284 2.312,-0.529 4.129,-1.052 5.408,-1.549 1.295,-0.51 2.754,-0.958 4.391,-1.371 1.633,-0.403 3.406,-1.117 5.332,-2.117 1.91,-1.006 2.807,-1.84 2.688,-2.496 -0.133,-0.67 -0.338,-1.508 -0.622,-2.548 -0.287,-1.039 -1.07,-1.148 -2.355,-0.331 -1.289,0.815 -3.177,1.445 -5.657,1.884 -2.481,0.439 -4.397,1.209 -5.746,2.307 -1.355,1.103 -2.579,1.524 -3.678,1.272 -1.104,-0.249 -1.648,-0.796 -1.648,-1.646 0,-0.852 0.527,-1.836 1.556,-2.969 1.034,-1.129 1.991,-2.482 2.873,-4.059 0.876,-1.564 2.383,-3.534 4.521,-5.894 2.139,-2.352 4.152,-4.554 6.039,-6.59 1.889,-2.048 3.635,-3.426 5.225,-4.148 1.616,-0.723 3.193,-1.622 4.76,-2.685 1.577,-1.073 3.493,-2.782 5.745,-5.143 2.275,-2.355 4.396,-4.678 6.372,-6.974 1.975,-2.288 3.285,-4.477 3.916,-6.552 -0.31,-1.256 -0.712,-2.122 -1.18,-2.588 -0.476,-0.47 -1.434,-0.864 -2.876,-1.178 z m -366.015,41.427 c -1.883,1.352 -4.006,2.639 -6.363,3.868 -2.356,1.223 -4.636,2.177 -6.834,2.876 -2.2,0.689 -3.8,0.624 -4.804,-0.191 -1.008,-0.816 -1.196,-1.994 -0.573,-3.535 0.631,-1.538 2.111,-3.283 4.431,-5.234 2.327,-1.947 4.637,-3.519 6.931,-4.71 2.295,-1.194 4.43,-1.884 6.408,-2.073 1.983,-0.188 3.237,0.348 3.773,1.597 0.535,1.261 0.644,2.472 0.328,3.629 -0.314,1.169 -1.412,2.422 -3.297,3.773 z m 83.607,37.897 c -4.836,6.312 -8.981,11.622 -12.442,15.931 -3.457,4.304 -7.004,8.149 -10.652,11.551 -3.644,3.395 -6.452,5.701 -8.435,6.921 -1.976,1.224 -3.958,2.034 -5.941,2.403 -1.978,0.382 -3.135,-0.429 -3.487,-2.403 -0.344,-1.976 0.115,-4.212 1.375,-6.692 1.254,-2.476 3.01,-5.038 5.274,-7.683 2.262,-2.639 5.609,-6.213 10.039,-10.746 4.431,-4.526 8.86,-8.389 13.291,-11.588 4.432,-3.212 8.813,-6.117 13.151,-8.726 4.33,-2.606 8.443,-5.037 12.344,-7.307 -4.837,5.911 -9.68,12.022 -14.517,18.339 z m 27.953,-34.787 c -1.352,1.728 -3.201,2.861 -5.565,3.393 -2.354,0.537 -4.274,0.255 -5.743,-0.843 -1.48,-1.101 -1.668,-2.599 -0.569,-4.479 1.103,-1.888 2.522,-3.55 4.288,-4.998 1.76,-1.447 3.632,-2.481 5.607,-3.109 1.982,-0.629 3.145,0.453 3.486,3.252 0.355,2.796 -0.157,5.062 -1.504,6.784 z m 121.832,-6.883 c -0.312,1.169 -1.416,2.422 -3.304,3.773 -1.882,1.352 -4.004,2.639 -6.365,3.868 -2.351,1.223 -4.63,2.177 -6.828,2.876 -2.198,0.689 -3.803,0.624 -4.809,-0.191 -1.008,-0.816 -1.191,-1.994 -0.561,-3.535 0.62,-1.538 2.105,-3.283 4.428,-5.234 2.323,-1.947 4.631,-3.519 6.933,-4.71 2.279,-1.194 4.423,-1.884 6.403,-2.073 1.979,-0.188 3.237,0.348 3.77,1.597 0.529,1.26 0.637,2.471 0.333,3.629 z m 88.792,-1.035 c -0.315,1.794 -1.066,3.536 -2.263,5.23 -1.192,1.699 -3.107,3.394 -5.746,5.095 -2.644,1.692 -5.407,3.264 -8.303,4.71 -2.888,1.447 -4.636,1.874 -5.229,1.271 -0.592,-0.596 -0.093,-1.995 1.508,-4.192 1.6,-2.198 3.296,-4.245 5.087,-6.126 1.795,-1.888 3.76,-3.761 5.897,-5.608 2.138,-1.852 3.929,-3.142 5.375,-3.862 1.442,-0.725 2.498,-0.773 3.15,-0.144 0.666,0.627 0.835,1.836 0.524,3.626 z M 358.222,55.414 c -10.849,2.536 -18.442,6.058 -22.774,10.578 -10.304,7.771 -19.525,21.596 -27.659,41.477 -2.775,7.86 -5.417,15.337 -7.941,22.454 2.249,-0.906 4.645,-1.478 7.149,-1.715 12.505,-34.282 25.777,-55.026 39.835,-62.215 10.846,-3.611 16.27,-5.78 16.27,-6.507 v -4.071 c 0,-3.252 -1.629,-5.96 -4.88,-8.131 h -0.816 l 0.816,1.628 v 6.502 z m -82.966,-1.626 c 4.881,0.363 9.76,3.075 14.639,8.134 h -0.811 c -6.603,-4.335 -12.565,-6.508 -17.896,-6.508 1.897,4.34 6.232,6.508 13.013,6.508 8.678,2.353 13.013,9.133 13.013,20.331 v 4.071 c 0,8.133 -0.805,13.828 -2.435,17.081 0,0.734 -4.02,12.674 -12.061,35.816 2.3,-1.685 4.826,-3.234 7.557,-4.635 1.579,-0.811 3.025,-1.543 4.341,-2.195 8.012,-21.635 13.763,-35.64 17.242,-41.994 5.422,-13.561 14.637,-24.679 27.655,-33.353 10.301,-2.799 15.452,-4.695 15.452,-5.69 v -5.702 c 0,-1.259 -1.628,-2.069 -4.879,-2.439 h -82.961 v 6.511 c 10e-4,1.715 2.711,3.074 8.131,4.064 z m 26.84,32.536 v -1.628 l 5.692,-6.506 h 0.814 c -1.539,3.798 -3.706,6.505 -6.506,8.134 z m 35.789,-38.227 h 2.441 v 0.813 c -0.906,0 -2.265,0.543 -4.069,1.628 l 1.628,-2.441 z m -4.068,0 c -20.425,21.143 -30.997,31.716 -31.721,31.716 0,-0.54 -0.268,-1.357 -0.812,-2.433 l 30.093,-29.283 h 2.44 z m -7.321,0 C 310.317,64.901 301.911,73.31 301.284,73.31 h -0.819 v -0.812 c 15.64,-16.269 23.777,-24.401 24.409,-24.401 h 1.622 z m -6.508,0 c -12.831,13.551 -19.608,20.33 -20.327,20.33 h -0.815 V 66.804 C 310.591,54.333 316.825,48.096 317.55,48.096 h 2.438 z m -8.945,0 h 1.629 l -14.641,15.456 -1.623,-0.816 c 9.032,-9.762 13.909,-14.64 14.635,-14.64 z m -7.323,0 h 2.45 c -6.782,7.591 -10.574,11.387 -11.39,11.387 l -1.627,-0.817 c 6.235,-7.044 9.76,-10.57 10.567,-10.57 z m -6.506,0 h 1.631 c -4.159,4.877 -6.601,7.316 -7.323,7.316 h -0.82 v -0.81 c 3.621,-4.338 5.793,-6.506 6.512,-6.506 z m -7.318,0 h 2.44 l -4.065,4.877 c -0.903,0 -1.444,-0.544 -1.624,-1.622 1.351,-2.173 2.438,-3.255 3.249,-3.255 z m -7.318,0 h 2.438 c 0,1.082 -0.542,1.626 -1.625,1.626 h -0.813 v -1.626 z" /> </svg> ); }; Logo.defaultProps = { colorCompass: '#ffcc00', colorText: '#660729', width: undefined, height: undefined }; Logo.propTypes = { colorCompass: PropTypes.string, colorText: PropTypes.string, width: PropTypes.string, height: PropTypes.string }; export default Logo;
src/higherOrders/Transition.js
lenxeon/react-ui
import React from 'react' import PropTypes from '../utils/proptypes' function childrenToItems (children) { if (!children) { return {} } let items = {} if (!Array.isArray(children)) { children = [children] } children.forEach((child) => { items[child.key] = child }) return items } function itemsToChildren (items) { return Object.keys(items).map((key) => { return items[key] }) } export default function (Component) { class Transition extends React.Component { constructor (props) { super(props) this.state = { items: childrenToItems(props.children) } } render () { return <Component {...this.props}>{itemsToChildren(this.state.items)}</Component> } } Transition.propTypes = { children: PropTypes.element_array } return Transition }
node_modules/react-bootstrap/es/PagerItem.js
caughtclean/but-thats-wrong-blog
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import classNames from 'classnames'; import React from 'react'; import SafeAnchor from './SafeAnchor'; import createChainedFunction from './utils/createChainedFunction'; var propTypes = { disabled: React.PropTypes.bool, previous: React.PropTypes.bool, next: React.PropTypes.bool, onClick: React.PropTypes.func, onSelect: React.PropTypes.func, eventKey: React.PropTypes.any }; var defaultProps = { disabled: false, previous: false, next: false }; var PagerItem = function (_React$Component) { _inherits(PagerItem, _React$Component); function PagerItem(props, context) { _classCallCheck(this, PagerItem); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleSelect = _this.handleSelect.bind(_this); return _this; } PagerItem.prototype.handleSelect = function handleSelect(e) { var _props = this.props, disabled = _props.disabled, onSelect = _props.onSelect, eventKey = _props.eventKey; if (onSelect || disabled) { e.preventDefault(); } if (disabled) { return; } if (onSelect) { onSelect(eventKey, e); } }; PagerItem.prototype.render = function render() { var _props2 = this.props, disabled = _props2.disabled, previous = _props2.previous, next = _props2.next, onClick = _props2.onClick, className = _props2.className, style = _props2.style, props = _objectWithoutProperties(_props2, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']); delete props.onSelect; delete props.eventKey; return React.createElement( 'li', { className: classNames(className, { disabled: disabled, previous: previous, next: next }), style: style }, React.createElement(SafeAnchor, _extends({}, props, { disabled: disabled, onClick: createChainedFunction(onClick, this.handleSelect) })) ); }; return PagerItem; }(React.Component); PagerItem.propTypes = propTypes; PagerItem.defaultProps = defaultProps; export default PagerItem;
src/helpers/Html.js
hasibsahibzada/quran.com-frontend
/* eslint-disable global-require, quotes, max-len */ import PropTypes from 'prop-types'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Helmet from 'react-helmet'; import serialize from 'serialize-javascript'; const Html = ({ store, component, assets }) => { const content = component ? ReactDOM.renderToString(component) : ''; const head = Helmet.rewind(); return ( <html lang="en"> <head> {head.base.toComponent()} {head.title.toComponent()} {head.meta.toComponent()} {head.link.toComponent()} {head.script.toComponent()} {head.style.toComponent()} {Object.keys(assets.styles).map((style, i) => <link href={assets.styles[style]} key={i} rel="stylesheet" type="text/css" /> )} {Object.keys(assets.styles).length === 0 ? <style dangerouslySetInnerHTML={{ __html: require('../../src/styles/bootstrap.config') }} /> : null} </head> <body> <div id="app" dangerouslySetInnerHTML={{ __html: content }} /> <style dangerouslySetInnerHTML={{ __html: '.async-hide { opacity: 0 !important}' }} /> <script dangerouslySetInnerHTML={{ __html: `(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; })(window,document.documentElement,'async-hide','dataLayer',4000, {'GTM-PNMFTW3':true});` }} /> <script dangerouslySetInnerHTML={{ __html: `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-8496014-1', 'auto'); ga('require', 'GTM-PNMFTW3'); ` }} charSet="UTF-8" /> <script dangerouslySetInnerHTML={{ __html: `if ('serviceWorker' in navigator) {navigator.serviceWorker.register('/quran-service-worker.js', {scope: './'}).then(function(registration) {}).catch(function(error) {});}` }} charSet="UTF-8" /> <script dangerouslySetInnerHTML={{ __html: `window.reduxData=${serialize(store.getState())};` }} charSet="UTF-8" /> {process.env.NODE_ENV === 'production' && <script dangerouslySetInnerHTML={{ __html: `/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","quran.zendesk.com");/*]]>*/` }} />} {process.env.NODE_ENV === 'production' && <script dangerouslySetInnerHTML={{ __html: ` (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\\/\\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);mixpanel.init("d3f9b2f15c4bf0509e85845b56921034"); ` }} />} {process.env.NODE_ENV === 'production' && <script src="https://cdn.ravenjs.com/3.0.4/raven.min.js" />} {Object.keys(assets.javascript) .filter(script => !assets.javascript[script].includes('-chunk')) .map((script, i) => <script src={assets.javascript[script]} key={i} /> )} </body> </html> ); }; Html.propTypes = { store: PropTypes.object, // eslint-disable-line assets: PropTypes.object, // eslint-disable-line component: PropTypes.element }; export default Html;
src/Component/React/ReactAdapter/index.js
Kitware/paraviewweb
import React from 'react'; import ReactDOM from 'react-dom'; export default class ReactContainer { constructor(reactClass, reactProps) { this.props = reactProps; this.reactClass = reactClass; this.container = null; this.component = null; } setContainer(el) { if (this.container && this.container !== el) { ReactDOM.unmountComponentAtNode(this.container); this.component = null; } this.container = el; if (this.container) { const View = this.reactClass; this.component = ReactDOM.render( <View {...this.props} />, this.container ); } } resize() { this.render(); } render() { if (this.component) { this.component.forceUpdate(); } else if (this.container) { const View = this.reactClass; ReactDOM.render(<View {...this.props} />, this.container); } } destroy() { this.setContainer(null); this.reactClass = null; this.props = null; this.component = null; } }
test/specs/ReactPlayer.js
SkinyMonkey/react-player
/* eslint-disable no-unused-expressions */ import React from 'react' import { render, unmountComponentAtNode } from 'react-dom' import ReactPlayer from '../../src/ReactPlayer' const { describe, it, expect, beforeEach, afterEach } = window const TEST_URLS = [ { name: 'YouTube', url: 'https://www.youtube.com/watch?v=M7lc1UVf-VE', error: 'https://www.youtube.com/watch?v=xxxxxxxxxxx' }, { name: 'SoundCloud', url: 'https://soundcloud.com/miami-nights-1984/accelerated', error: 'https://soundcloud.com/xxxxxxxxxxx/xxxxxxxxxxx' }, { name: 'Facebook', url: 'https://www.facebook.com/facebook/videos/10153231379946729/' }, { name: 'Vimeo', url: 'https://vimeo.com/90509568', error: 'http://vimeo.com/00000000', seek: true }, { name: 'Twitch', url: 'https://www.twitch.tv/videos/106400740' }, { name: 'Streamable', url: 'https://streamable.com/moo' }, { name: 'Vidme', url: 'https://vid.me/yvi' }, { name: 'Wistia', url: 'https://home.wistia.com/medias/e4a27b971d', seek: true }, { name: 'DailyMotion', url: 'http://www.dailymotion.com/video/x2buxsr', seek: true }, { name: 'FilePlayer', url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv', error: 'http://example.com/error.ogv', seek: true }, { name: 'FilePlayer (multiple sources)', url: [ { src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4', type: 'video/mp4' }, { src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv', type: 'video/ogv' }, { src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm', type: 'video/webm' } ] }, { name: 'FilePlayer (HLS)', url: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8' }, { name: 'FilePlayer (DASH)', url: 'http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd' } ] describe('ReactPlayer', () => { let div beforeEach(() => { div = document.createElement('div') document.body.appendChild(div) }) afterEach(() => { unmountComponentAtNode(div) document.body.removeChild(div) }) for (let test of TEST_URLS) { const desc = test.skip ? describe.skip : describe desc(test.name, () => { it('canPlay', () => { expect(ReactPlayer.canPlay(test.url)).to.be.true }) it('onReady, onStart, onPlay, onDuration, onProgress', done => { // Use a count object to ensure everything is called at least once let count = {} const bump = key => { count[key] = count[key] || 0 count[key]++ if (Object.keys(count).length === 5) { done() } } let player render( <ReactPlayer ref={p => { player = p || player }} url={test.url} playing onReady={() => bump('onReady')} onStart={() => bump('onStart')} onPlay={() => bump('onPlay')} onDuration={secs => bump('onDuration')} onProgress={progress => bump('onProgress')} />, div) }) it('onPause', done => { const onPause = () => done() const pausePlayer = () => { render( <ReactPlayer url={test.url} playing={false} onPause={onPause} />, div) } render( <ReactPlayer url={test.url} playing onPause={onPause} onProgress={p => { if (p.playedSeconds >= 3) { pausePlayer() } }} />, div) }) if (test.error) { it('onError', done => { render( <ReactPlayer url={test.error} playing onError={() => done()} />, div) }) } if (test.seek) { it('seekTo, onSeek', done => { let player render( <ReactPlayer ref={p => { player = p || player }} url={test.url} playing onProgress={p => { if (p.playedSeconds >= 3) { player.seekTo(10) } }} onSeek={() => done()} />, div) }) } if (test.name === 'Vidme') { it('plays a specific format', done => { render( <ReactPlayer url='https://vid.me/GGho' config={{ vidme: { format: '240p' } }} onReady={() => done()} />, div) }) it('ignores an unknown format', done => { render( <ReactPlayer url='https://vid.me/GGho' config={{ vidme: { format: 'test-unknown-format' } }} onReady={() => done()} />, div) }) } }) } describe('switching players', () => { it('switches players', done => { const switchPlayer = () => { render( <ReactPlayer url='https://soundcloud.com/miami-nights-1984/accelerated' playing onPlay={() => done()} />, div) } render( <ReactPlayer url='https://www.youtube.com/watch?v=M7lc1UVf-VE' playing onProgress={p => { if (p.playedSeconds >= 3) { switchPlayer() } }} />, div) }) }) describe('instance methods', () => { let player beforeEach(done => { render( <ReactPlayer ref={p => { player = p || player }} url='http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4' onReady={() => done()} />, div) }) it('returns correctly', () => { expect(player.getInternalPlayer()).to.exist expect(player.getCurrentTime()).to.be.a('number') expect(player.getDuration()).to.be.a('number') }) }) describe('preloading', () => { let player beforeEach(done => { render( <ReactPlayer ref={p => { if (p) { player = p done() } }} url={null} config={{ youtube: { preload: true }, vimeo: { preload: true }, dailymotion: { preload: true } }} />, div) }) it('renders with preload config', () => { expect(player.wrapper).to.be.a('HTMLDivElement') expect(player.wrapper.childNodes).to.have.length(3) for (let node of player.wrapper.childNodes) { expect(node).to.be.a('HTMLDivElement') expect(node.style.display).to.equal('none') } }) }) it('canPlay returns false', () => { expect(ReactPlayer.canPlay('http://example.com')).to.be.false expect(ReactPlayer.canPlay('file.txt')).to.be.false }) })
core/src/app.js
syon/gaiyas
/* @type */ import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import { fetchPosts, makeRanking } from './actions' import Main from './components/Main.jsx' import configureStore from './store/configureStore' import './css/app.css' const defaultUrl = new URL(location.href); // Stop to load automatically if insertElement has data-lazy attribute when it has following param // ?chrome-extension-gaiyas=<URL> // Instead of it, wait for `postMessage({ type: 'gaiyas::fetch', url: <url> }, '*')` const isPopupEmbed = defaultUrl.searchParams.has('chrome-extension-gaiyas'); // Wait for starting if insertElement is not found // <div id='chrome-extension-gaiyas' /> // It should wait for `postMessage({ type: 'gaiyas::fetch', url: <url> }, '*')` const insertElement = document.getElementById('chrome-extension-gaiyas'); const store = configureStore const startLoad = (url) => { store.dispatch(fetchPosts(url)).then(() => { // console.log('store.dispatch(fetchPosts())', store.getState()) const state = store.getState() if (!state.waiting.isWaiting) { store.dispatch(makeRanking(state.hatebu.hatena)) } else { // console.log('Waiting...', store.getState()) } }) }; if (isPopupEmbed || !insertElement) { // wait for message to start manually window.addEventListener('message', function(event) { const insertElement = document.getElementById('chrome-extension-gaiyas'); if (event.data.type === 'gaiyas::fetch' && insertElement) { // popup.js send url or ?chrome-extension-gaiyas=<url> const url = event.data.url || defaultUrl.searchParams.get('chrome-extension-gaiyas'); startLoad(url); ReactDOM.render( <Provider store={store}> <Main manual={isPopupEmbed}/> </Provider>, insertElement, ) } }); } else { // start to load automatically startLoad(defaultUrl.toString()); ReactDOM.render( <Provider store={store}> <Main manual={isPopupEmbed}/> </Provider>, insertElement, ); }
app/src/common/hoc/withBackButton.js
BlackBoxVision/react-native-redux-todo
import React from 'react'; import PropTypes from 'prop-types'; import { BackAndroid, Platform } from 'react-native'; import connect from 'react-redux/lib/connect/connect'; export default function withBackButton() { return ReactComponent => { const mapStateToProps = state => ({ index: state.navigate.index }); @connect(mapStateToProps) class BackButtonComponent extends React.Component { static propTypes = { index: PropTypes.number.isRequired }; constructor(props, context) { super(props, context); } componentDidMount() { Platform.OS === 'android' && BackAndroid.addEventListener('hardwareBackPress', this.handleBackPress); } componentWillUnmount() { Platform.OS === 'android' && BackAndroid.removeEventListener('hardwareBackPress', this.handleBackPress); } render() { return <ReactComponent {...this.context} {...this.props} />; } handleBackPress = () => { if (this.props.index) { this.props.navigation.goBack(); return true; } else { return false; } }; } return BackButtonComponent; }; }
src/components/organisms/Hero/index.js
DimensionLab/narc
import React from 'react' import styled from 'styled-components' import { palette, size } from 'styled-theme' import { Block, Paragraph, IconLink, IconButton, LogoImage, PreformattedText, Heading, Tooltip, } from 'components' const Wrapper = styled(Block)` display: flex; justify-content: center; padding: 2rem; box-sizing: border-box; @media screen and (max-width: 640px) { padding-left: 0.25rem; padding-right: 0.25rem; } ` const InnerWrapper = styled.div` display: flex; width: 100%; max-width: ${size('maxWidth')}; @media screen and (max-width: 640px) { flex-wrap: wrap; } ` const Section = styled.section` display: flex; flex-direction: column; align-items: center; padding: 2rem; box-sizing: border-box; &:first-child { flex: none; } @media screen and (max-width: 640px) { padding: 0.25rem; width: 100%; } ` const Text = styled(Paragraph)` color: ${palette('grayscale', 3, true)}; font-weight: 300; font-size: 1.35rem; line-height: 1.35em; width: 100%; letter-spacing: 0.05em; @media screen and (max-width: 640px) { text-align: center; font-size: 1rem; } ` const ButtonGroup = styled.div` margin-top: 2rem; display: flex; > :not(:first-child) { margin-left: 0.5rem; } ` const Instructions = styled.div` width: 100%; margin-top: 2rem; @media screen and (max-width: 640px) { margin-top: 1rem; } ` const Hero = (props) => { return ( <Wrapper opaque reverse {...props}> <InnerWrapper> <Section> <LogoImage height={265} /> <ButtonGroup> <Tooltip reverse data-title="Just a fancy tooltip 😄"> <IconButton icon="github" href="https://github.com/diegohaz/arc">GitHub</IconButton> </Tooltip> <Tooltip reverse data-title="Another tooltip aligned differently" align="end" position="bottom"> <IconButton icon="docs" href="https://github.com/diegohaz/arc/wiki">Docs</IconButton> </Tooltip> </ButtonGroup> </Section> <Section> <Text> <strong>ARc</strong> is a <IconLink reverse icon="react" href="https://facebook.github.io/react/">React</IconLink> starter kit based on the <IconLink reverse icon="atomic-design" href="http://bradfrost.com/blog/post/atomic-web-design/">Atomic Design</IconLink> methodology. It&apos;s <strong>progressive</strong>, which means that you can start with the basic boilerplate and try the other features when you are comfortable. </Text> <Instructions> <Heading level={2} reverse>Install</Heading> <PreformattedText block reverse wrapped> git clone -b master https://github.com/diegohaz/arc my-app </PreformattedText> <IconLink icon="docs" right reverse href="https://github.com/diegohaz/arc/wiki/Setup" > Learn more </IconLink> </Instructions> </Section> </InnerWrapper> </Wrapper> ) } export default Hero
src/index.js
Gab-Metzger/react-boilerplate
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
src/components/shared/GoBack.js
juandjara/open-crono
import React from 'react' import { browserHistory } from 'react-router' import Button from 'react-toolbox/lib/button/Button'; const NotFound = () => { return ( <Button primary onClick={() => browserHistory.goBack()} label="Volver atr&aacute;s" /> ) } export default NotFound
src/components/CatalogList/CatalogList.js
pustovitDmytro/maysternya
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import cx from 'classnames'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './CatalogList.css'; const items =[ { id: 1, src: "img/1.jpg", text: "Портрети", alt: "portret" }, { id: 2, src: "img/2.jpg", text: "Скульптури", alt: "skulpture" }, { id: 3, src: "img/3.jpg", text: "Каміни", alt: "kamin" }, { id: 4, src: "img/4.jpg", text: "Столешні", alt: "stoleshnya" }, ]; class CatalogList extends React.Component { render() { return ( <div className={s.bigmenu}> { items.map(elem => <div className="s.item"> <img src="{elem.src}"/> </div> ) } </div> ); } } export default withStyles(s)(CatalogList);
src/components/NavsFigure.js
yuhaogo/study-mk-photos
import React from 'react'; class NavsFigure extends React.Component{ handleClick=(e)=>{ const {isCenter}=this.props.arrange; if(isCenter){ this.props.inverse(); }else{ this.props.center(); } e.stopPropagation(); e.preventDefault(); } render(){ const {isCenter,inverse}=this.props.arrange; var navsClassName='small-dot'; navsClassName+=isCenter?' is-center tmfont tm-icon-refresh2':''; navsClassName+=inverse?' is-inverse tmfont tm-icon-refresh2':''; return( <div className={navsClassName} onClick={this.handleClick}></div> ) } } export default NavsFigure;
src/js/ui/chunk-row.js
SpaceHexagon/pylon
import React from 'react'; import ChunkMenu from './chunk-menu.js'; export default class ChunkRow extends React.Component { constructor() { super(); this.state = {filterText: ''} } render () { return ( <div className={"chunk-row "+this.props.offset}> {this.props.chunks.map(function (chunk, i) { return <ChunkMenu key={i} cells={chunk.cells} coords={chunk.coords} />; })} </div> ); } } ChunkRow.defaultProps = { chunks: [], offset: "" }
src/interface/Portal.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import PortalTarget from './PortalTarget'; class Portal extends React.PureComponent { static propTypes = { children: PropTypes.node.isRequired, }; state = { elem: null, }; componentDidMount() { this.setState({ elem: PortalTarget.newElement(), }); } componentWillUnmount() { PortalTarget.remove(this.state.elem); } render() { if (!this.state.elem) { return null; } return ReactDOM.createPortal( this.props.children, this.state.elem, ); } } export default Portal;
src/svg-icons/maps/flight.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsFlight = (props) => ( <SvgIcon {...props}> <path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/> </SvgIcon> ); MapsFlight = pure(MapsFlight); MapsFlight.displayName = 'MapsFlight'; MapsFlight.muiName = 'SvgIcon'; export default MapsFlight;
src/screen/ScreenPreviewer.js
RoyalIcing/gateau
import R from 'ramda' import React from 'react' import seeds, { Seed } from 'react-seeds' import Frame from 'react-frame-component' import Button from '../ui/Button' import Choice from '../ui/Choice' import * as stylers from '../stylers' import destinations from '../destinations' const catchRenderErrors = false const iframeStyler = seeds({ height: 600, border: 'none' }) function DestinationChoice({ destinationID, destinationDevice, destinations, onChange, onPhoneDestination, onFullDestination }) { const items = R.pipe( R.toPairs, R.map(R.converge(R.merge, [ R.pipe( R.prop(0), R.objOf('value') ), R.pipe( R.prop(1), R.pick(['title']) ) ])) )(destinations) return ( <Seed row width='100%'> <Choice value={ destinationID } items={ items } width='100%' minHeight={ 32 } grow={ 1 } border='none' //maxWidth='20em' onChange={ onChange } styler={ stylers.masterButton } /> <Button onClick={ onPhoneDestination } children='Phone' selected={ destinationDevice == 'phone' } styler={ stylers.masterButton } /> <Button onClick={ onFullDestination } children='Full' selected={ destinationDevice == 'full' } styler={ stylers.masterButton } /> </Seed> ) } export default function PreviewSection({ contentTree, ingredients, destinationID, destinationDevice, onChangeDestination, onPhoneDestination, onFullDestination }) { const { head: renderHead, Preview } = destinations[destinationID] return ( <Seed column alignItems='center' { ...stylers.previewColumn({ destinationDevice }) } > <Seed key={ destinationID } column grow={ 1 } width='100%' > { !!contentTree ? ( false ? ( R.tryCatch( (contentTree) => ( <Preview ingredients={ ingredients } contentTree={ contentTree } /> ), (error, contentTree) => console.error('Invalid tree', error, contentTree) )(contentTree) ) : ( <Frame head={ renderHead() } { ...iframeStyler } > <Preview ingredients={ ingredients } contentTree={ contentTree } /> </Frame> ) ) : null } </Seed> <DestinationChoice destinationID={ destinationID } destinationDevice={ destinationDevice } destinations={ destinations } onChange={ onChangeDestination } onPhoneDestination={ onPhoneDestination } onFullDestination={ onFullDestination } /> </Seed> ) }
src/routes/contact/index.js
mcfa77y/isla_de_pescua
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Contact from './Contact'; export const path = '/contact'; export const action = async (state) => { const title = 'Contact Us'; state.context.onSetTitle(title); return <Contact title={title} />; };
webclient/home/index.js
souravDutta123/Cognitive-Assistant
import Introduction from './introduction.js'; import Navbar from './navBar.js'; import React from 'react'; import Paper from 'material-ui/Paper'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; const styles = { }; export {Introduction,Navbar} ;
cms/cms.js
GeniusWigga/irmua
import React from 'react' import CMS from 'netlify-cms' // CMS.registerPreviewStyle('/styles.css') // CMS.registerPreviewTemplate('blog', BlogPostPreview)
src/renderer/components/Frame/FrameControls.js
MovieCast/moviecast-desktop
import { remote } from 'electron'; import React, { Component } from 'react'; import classNames from 'classnames'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import Minimize from './Controls/Minimize'; import Maximize from './Controls/Maximize'; import Close from './Controls/Close'; const styles = theme => ({ root: { WebkitAppRegion: 'drag', height: 23, width: '100%', backgroundColor: theme.palette.primary[800], display: 'flex', alignItems: 'center', paddingLeft: 10, flex: '0 0 auto' }, resizeBar: { WebkitAppRegion: 'no-drag', position: 'absolute', height: 3, width: '100%', top: 0, left: 0 }, title: { flexGrow: 1, }, controls: { height: '100%', display: 'flex' }, controlButton: { WebkitAppRegion: 'no-drag', height: '100%', width: 45, '&.svg': { display: 'block' }, '&:hover': { backgroundColor: 'rgba(255,255,255, 0.1)' }, '&:last-of-type': { '&:hover': { backgroundColor: '#dd3333' } } }, }); class FrameControls extends Component { render() { const { classes, electron, minimize, maximize, close } = this.props; return ( <div className={classes.root}> <div className={classes.resizeBar} /> <Typography className={classes.title}>{this.props.title}</Typography> <div className={classes.controls}> <div role="presentation" onClick={minimize} className={classes.controlButton}> <Minimize /> </div> <div role="presentation" onClick={maximize} className={classes.controlButton}> <Maximize isMaximized={electron.maximized} /> </div> <div role="presentation" onClick={close} className={classes.controlButton}> <Close /> </div> </div> </div> ); } } /* eslint-disable react/forbid-prop-types */ FrameControls.propTypes = { classes: PropTypes.object.isRequired, transparent: PropTypes.bool, visible: PropTypes.bool }; /* eslint-enable react/forbid-prop-types */ FrameControls.defaultProps = { transparent: false, visible: true }; export default withStyles(styles)(FrameControls);
ui/js/layout.js
beni55/spigo
'use strict'; import React from 'react'; import Header from 'header'; export default React.createClass({ render () { return ( <section id="app"> <Header /> {this.props.children} </section> ); } });
app/components/Github/Repos.js
joshuar500/repository-notes
import React from 'react'; class Repos extends React.Component { render(){ var repos = this.props.repos.map(function(repo, index){ // funny way to do if then statement with && return ( <li className="list-group-item" key={index}> {repo.html_url && <h4><a href="repo.html_url">{repo.name}</a></h4>} {repo.description && <p>{repo.description}</p>} </li> ) }) return ( <div> <h3>User Repos</h3> <ul className="list-group"> {repos} </ul> </div> ) } } Repos.propTypes = { username: React.PropTypes.string.isRequired, repos: React.PropTypes.array.isRequired } export default Repos;
templates/rubix/demo/src/routes/Messengerjs.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import React from 'react'; import { Row, Col, Grid, Panel, Table, Button, PanelBody, PanelHeader, PanelContainer, } from '@sketchpixy/rubix'; export default class Messengerjs extends React.Component { componentDidMount() { // configuring default options for Messenger Messenger.options = { theme: 'flat' }; } basicNotification() { Messenger().post('Absolutely basic notification'); } errorNotification() { Messenger().post({ id: 'error', type: 'error', singleton: true, message: 'Whoops! we encountered an error!', showCloseButton: true }); } infoNotification() { Messenger().post({ id: 'info', type: 'info', singleton: true, message: 'Just send us a mail at <a href="mailto:support@sketchpixy.com">support@sketchpixy.com</a> if you have any queries!', showCloseButton: true }); } successNotification() { Messenger().post({ id: 'success', type: 'success', singleton: false, message: 'Congratulations! You are now a registered Rubixian!', showCloseButton: true }); } updatingNotification() { var msg = Messenger().post({ id: 'info2', type: 'info', singleton: false, message: 'Please wait while we process your request', showCloseButton: true }); setTimeout(function() { msg.update({ type: 'error', message: 'Whoops! we encountered an error!' }); }, 5000); } actionNotification() { var msg; msg = Messenger().post({ message: 'Launching thermonuclear war...', type: 'info', actions: { cancel: { label: 'cancel launch', action:() => { return msg.update({ message: 'Thermonuclear war averted', type: 'success', actions: false }); } } } }); } actionRetryNotification() { var msg; msg = Messenger().post({ message: "This is your last chance. After this, there is no turning back. You take the blue pill—the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill—you stay in Wonderland, and I show you how deep the rabbit hole goes. Remember, all I'm offering is the truth—nothing more.", singleton: false, id: 'neo', hideAfter: 10000000000, actions: { blue: { label: 'take blue pill', action: () => { return msg.update({ message: 'Welcome to the Matrix!', type: 'success', hideAfter: 5, actions: false }); } }, red: { label: 'take red pill', action: () => { return msg.update({ message: 'We will wait for a newer and better version of yourself! Until then goodbye and good luck Neo!', type: 'error', hideAfter: 5, actions: false }); } } } }); } notificationDirection(dir1, dir2) { var classes = 'messenger-fixed'; if(typeof dir1 === 'string') classes += ' messenger-on-'+dir1+' '; if(typeof dir2 === 'string') classes += ' messenger-on-'+dir2+' '; classes = classes.trim(); Messenger({ extraClasses: classes }).post({ singleton: false, showCloseButton: true, id: 'messenger-layout', message: classes }); } render() { return ( <Row> <Col sm={12}> <PanelContainer> <PanelHeader className='bg-blue fg-white'> <Grid> <Row> <Col xs={12}> <h3>HubSpot Messenger : Powerful Growl-like notification system</h3> </Col> </Row> </Grid> </PanelHeader> <PanelBody> <Grid> <Row> <Col xs={12}> <Table bordered striped> <thead> <tr> <th>Type</th> <th className='text-right'>Call to action</th> </tr> </thead> <tbody> <tr> <td> <div>Basic notification</div> <ul> <li>Timeout after 10 seconds (default)</li> <li>Fixed at bottom-right (default)</li> </ul> </td> <td className='text-right'> <Button outlined onClick={::this.basicNotification}> Trigger basic </Button> </td> </tr> <tr> <td> <div>Info and Error notification</div> <ul> <li>Includes a close button</li> <li>Singleton (triggered only once)</li> </ul> </td> <td className='text-right'> <Button bsStyle='info' outlined onClick={::this.infoNotification}> Trigger info </Button>{' '} <Button bsStyle='danger' outlined onClick={::this.errorNotification}> Trigger error </Button> </td> </tr> <tr> <td> <div>Success notification</div> <ul> <li>Includes a close button</li> <li>Triggers only 1 notification at a time</li> </ul> </td> <td className='text-right'> <Button bsStyle='success' outlined onClick={::this.successNotification}> Trigger success </Button> </td> </tr> <tr> <td> <div>Updating notification</div> <ul> <li>Changes notification message after specified duration (5 seconds)</li> <li>Changes state from info to error</li> <li>Triggers only 1 notification at a time</li> </ul> </td> <td className='text-right'> <Button bsStyle='darkgreen45' outlined onClick={::this.updatingNotification}> Trigger notification </Button> </td> </tr> <tr> <td> <div>Taking actions</div> </td> <td className='text-right'> <Button bsStyle='purple' outlined onClick={::this.actionNotification}> Trigger launch </Button> </td> </tr> <tr> <td> <div>Taking actions [custom buttons]</div> </td> <td className='text-right'> <Button bsStyle='desaturateddarkblue' outlined onClick={::this.actionRetryNotification}> Make a choice Neo! </Button> </td> </tr> </tbody> </Table> </Col> </Row> </Grid> </PanelBody> </PanelContainer> <PanelContainer> <PanelHeader className='bg-darkgreen45 fg-white'> <Grid> <Row> <Col xs={12}> <h3>Notification layout</h3> </Col> </Row> </Grid> </PanelHeader> <PanelBody> <Grid> <Row> <Col xs={12}> <Table bordered> <tbody> <tr> <td> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'top', 'left')}> Top Left </Button> </td> <td className='text-center'> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'top')}> Top </Button> </td> <td className='text-right'> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'top', 'right')}> Top Right </Button> </td> </tr> <tr> <td> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'bottom', 'left')}> Bottom Left </Button> </td> <td className='text-center'> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'bottom')}> Bottom </Button> </td> <td className='text-right'> <Button bsStyle='green' outlined onClick={this.notificationDirection.bind(this, 'bottom', 'right')}> Bottom Right </Button> </td> </tr> </tbody> </Table> </Col> </Row> </Grid> </PanelBody> </PanelContainer> </Col> </Row> ); } }
public/js/cat_source/es6/components/segments/Segment.js
Ostico/MateCat
/** /** * React Component for the editarea. */ import SegmentCommentsContainer from './SegmentCommentsContainer' import SegmentsCommentsIcon from './SegmentsCommentsIcon' import React from 'react' import SegmentStore from '../../stores/SegmentStore' import SegmentActions from '../../actions/SegmentActions' import SegmentConstants from '../../constants/SegmentConstants' import SegmentHeader from './SegmentHeader' import SegmentFooter from './SegmentFooter' import IssuesContainer from './footer-tab-issues/SegmentFooterTabIssues' import ReviewExtendedPanel from '../review_extended/ReviewExtendedPanel' import TagUtils from '../../utils/tagUtils' import SegmentUtils from '../../utils/segmentUtils' import SegmentFilter from '../header/cattol/segment_filter/segment_filter' import Speech2Text from '../../utils/speech2text' import CommentsStore from '../../stores/CommentsStore' import Immutable from 'immutable' class Segment extends React.Component { constructor(props) { super(props) this.segmentStatus = { approved: 'APPROVED', translated: 'TRANSLATED', draft: 'DRAFT', new: 'NEW', rejected: 'REJECTED', } this.reviewExtendedFooter = 'extended-footer' this.createSegmentClasses = this.createSegmentClasses.bind(this) this.hightlightEditarea = this.hightlightEditarea.bind(this) this.addClass = this.addClass.bind(this) this.removeClass = this.removeClass.bind(this) this.setAsAutopropagated = this.setAsAutopropagated.bind(this) this.setSegmentStatus = this.setSegmentStatus.bind(this) this.handleChangeBulk = this.handleChangeBulk.bind(this) this.openSegment = this.openSegment.bind(this) this.openSegmentFromAction = this.openSegmentFromAction.bind(this) this.checkIfCanOpenSegment = this.checkIfCanOpenSegment.bind(this) this.handleKeyDown = this.handleKeyDown.bind(this) this.forceUpdateSegment = this.forceUpdateSegment.bind(this) let readonly = UI.isReadonlySegment(this.props.segment) this.secondPassLocked = this.props.segment.status.toUpperCase() === this.segmentStatus.approved && this.props.segment.revision_number === 2 && config.revisionNumber !== 2 this.state = { segment_classes: [], autopropagated: this.props.segment.autopropagated_from != 0, unlocked: SegmentUtils.isUnlockedSegment(this.props.segment), readonly: readonly, inBulk: false, tagProjectionEnabled: this.props.enableTagProjection && (this.props.segment.status.toLowerCase() === 'draft' || this.props.segment.status.toLowerCase() === 'new') && !TagUtils.checkXliffTagsInText(this.props.segment.translation) && TagUtils.removeAllTags(this.props.segment.segment) !== '', selectedTextObj: null, showActions: false, } this.timeoutScroll } openSegment() { if (!this.$section.length) return if (!this.checkIfCanOpenSegment()) { if (UI.projectStats && UI.projectStats.TRANSLATED_PERC_FORMATTED === 0) { alertNoTranslatedSegments() } else { alertNotTranslatedYet(this.props.segment.sid) } } else { if (this.props.segment.translation.length !== 0) { UI.segmentQA(this.$section) } // TODO Remove this block /**************************/ //From EditAreaClick if (UI.warningStopped) { UI.warningStopped = false UI.checkWarnings(false) } // start old cache UI.cacheObjects(this.$section) //end old cache UI.evalNextSegment() $('html').trigger('open') // used by ui.review to open tab Revise in the footer next-unapproved //Used by Segment Filter, Comments, Footer, Review extended setTimeout(() => $(document).trigger('segmentOpened', { segmentId: this.props.segment.original_sid, }), ) /************/ UI.editStart = new Date() SegmentActions.getGlossaryForSegment( this.props.segment.sid, this.props.fid, this.props.segment.segment, ) // window.location.hash = this.props.segment.sid; history.replaceState( null, null, document.location.pathname + '#' + this.props.segment.sid, ) } } openSegmentFromAction(sid) { sid = sid + '' // clearTimeout(this.openSegmentTimeOut); if ( (sid === this.props.segment.sid || (this.props.segment.original_sid === sid && this.props.segment.firstOfSplit)) && !this.props.segment.opened ) { this.openSegment() // this.openSegmentTimeOut = setTimeout( () => { // this.openSegment(); // }); } } createSegmentClasses() { let classes = [] let splitGroup = this.props.segment.split_group || [] let readonly = this.state.readonly if (readonly) { classes.push('readonly') } if ( (this.props.segment.ice_locked === '1' && !readonly) || this.secondPassLocked ) { if (this.props.segment.unlocked) { classes.push('ice-unlocked') } else { classes.push('readonly') classes.push('ice-locked') } } if (this.props.segment.status) { classes.push('status-' + this.props.segment.status.toLowerCase()) } else { classes.push('status-new') } if (this.props.segment.sid == splitGroup[0]) { classes.push('splitStart') } else if (this.props.segment.sid == splitGroup[splitGroup.length - 1]) { classes.push('splitEnd') } else if (splitGroup.length) { classes.push('splitInner') } if (this.state.tagProjectionEnabled && !this.props.segment.tagged) { classes.push('enableTP') this.dataAttrTagged = 'nottagged' } else { this.dataAttrTagged = 'tagged' } if (this.props.segment.edit_area_locked) { classes.push('editAreaLocked') } if (this.props.segment.inBulk) { classes.push('segment-selected-inBulk') } if (this.props.segment.muted) { classes.push('muted') } if ( this.props.segment.status.toUpperCase() === this.segmentStatus.approved && this.props.segment.revision_number ) { classes.push('approved-step-' + this.props.segment.revision_number) } if (this.props.segment.opened && this.checkIfCanOpenSegment()) { classes.push('editor') classes.push('opened') classes.push('shadow-1') } if ( this.props.segment.modified || this.props.segment.autopropagated_from !== '0' ) { classes.push('modified') } if (this.props.sideOpen) { classes.push('slide-right') } if (this.props.segment.openSplit) { classes.push('split-action') } if (this.props.segment.selected) { classes.push('segment-selected') } return classes } hightlightEditarea(sid) { if (this.props.segment.sid == sid) { /* TODO REMOVE THIS CODE * The segment must know about his classes */ let classes = this.state.segment_classes.slice() if (!!classes.indexOf('modified')) { classes.push('modified') this.setState({ segment_classes: classes, }) } } } addClass(sid, newClass) { if ( this.props.segment.sid == sid || sid === -1 || sid.split('-')[0] == this.props.segment.sid ) { let self = this let classes = this.state.segment_classes.slice() if (newClass.indexOf(' ') > 0) { let self = this let classesSplit = newClass.split(' ') _.forEach(classesSplit, function (item) { if (classes.indexOf(item) < 0) { classes.push(item) } }) } else { if (classes.indexOf(newClass) < 0) { classes.push(newClass) } } this.setState({ segment_classes: classes, }) } } removeClass(sid, className) { if ( this.props.segment.sid == sid || sid === -1 || sid.indexOf(this.props.segment.sid) !== -1 ) { let classes = this.state.segment_classes.slice() let removeFn = function (item) { let index = classes.indexOf(item) if (index > -1) { classes.splice(index, 1) } } if (className.indexOf(' ') > 0) { let self = this let classesSplit = className.split(' ') _.forEach(classesSplit, function (item) { removeFn(item) }) } else { removeFn(className) } this.setState({ segment_classes: classes, }) } } setAsAutopropagated(sid, propagation) { if (this.props.segment.sid == sid) { this.setState({ autopropagated: propagation, }) } } setSegmentStatus(sid, status) { if (this.props.segment.sid == sid) { let classes = this.state.segment_classes.slice(0) let index = classes.findIndex(function (item) { return item.indexOf('status-') > -1 }) if (index >= 0) { classes.splice(index, 1) } this.setState({ segment_classes: classes, status: status, }) } } checkSegmentStatus(classes) { if (classes.length === 0) return classes // TODO: remove this //To fix a problem: sometimes the section segment has two different status let statusMatches = classes.join(' ').match(/status-/g) if (statusMatches && statusMatches.length > 1) { let index = classes.findIndex(function (item) { return item.indexOf('status-new') > -1 }) if (index >= 0) { classes.splice(index, 1) } } return classes } isSplitted() { return !_.isUndefined(this.props.segment.split_group) } isFirstOfSplit() { return ( !_.isUndefined(this.props.segment.split_group) && this.props.segment.split_group.indexOf(this.props.segment.sid) === 0 ) } getTranslationIssues() { if ( ((this.props.sideOpen && (!this.props.segment.opened || !this.props.segment.openIssues)) || !this.props.sideOpen) && !(this.props.segment.readonly === 'true') && (!this.isSplitted() || (this.isSplitted() && this.isFirstOfSplit())) ) { return ( <TranslationIssuesSideButton sid={this.props.segment.sid.split('-')[0]} reviewType={this.props.reviewType} segment={this.props.segment} open={this.props.segment.openIssues} /> ) } return null } lockUnlockSegment(event) { event.preventDefault() event.stopPropagation() if ( !this.props.segment.unlocked && config.revisionNumber !== 2 && this.props.segment.revision_number === 2 ) { var props = { text: 'You are about to edit a segment that has been approved in the 2nd pass review. The project owner and 2nd pass reviser will be notified.', successText: 'Ok', successCallback: function () { APP.ModalWindow.onCloseModal() }, } APP.ModalWindow.showModalComponent( ConfirmMessageModal, props, 'Modify locked and approved segment ', ) } SegmentActions.setSegmentLocked( this.props.segment, this.props.fid, !this.props.segment.unlocked, ) } checkSegmentClasses() { let classes = this.state.segment_classes.slice() classes = _.union(classes, this.createSegmentClasses()) classes = this.checkSegmentStatus(classes) if (classes.indexOf('muted') > -1 && classes.indexOf('editor') > -1) { let indexEditor = classes.indexOf('editor') classes.splice(indexEditor, 1) let indexOpened = classes.indexOf('opened') classes.splice(indexOpened, 1) } return classes } handleChangeBulk(event) { event.stopPropagation() if (event.shiftKey) { this.props.setBulkSelection(this.props.segment.sid, this.props.fid) } else { SegmentActions.toggleSegmentOnBulk(this.props.segment.sid, this.props.fid) this.props.setLastSelectedSegment(this.props.segment.sid, this.props.fid) } } openRevisionPanel = (data) => { if ( parseInt(data.sid) === parseInt(this.props.segment.sid) && (this.props.segment.ice_locked == 0 || (this.props.segment.ice_locked == 1 && this.props.segment.unlocked)) ) { this.setState({ selectedTextObj: data.selection, }) } else { this.setState({ selectedTextObj: null, }) } } removeSelection = () => { var selection = document.getSelection() if (this.section.contains(selection.anchorNode)) { selection.removeAllRanges() } this.setState({ selectedTextObj: null, }) } checkIfCanOpenSegment() { return ( (this.props.isReview && !(this.props.segment.status == 'NEW') && !(this.props.segment.status == 'DRAFT')) || !this.props.isReview ) } onClickEvent(event) { if ( this.state.readonly || (!this.props.segment.unlocked && this.props.segment.ice_locked === '1') ) { UI.handleClickOnReadOnly($(event.currentTarget).closest('section')) } else if (this.props.segment.muted) { return } else if (!this.props.segment.opened) { this.openSegment() SegmentActions.setOpenSegment(this.props.segment.sid, this.props.fid) } } handleKeyDown(event) { if (event.code === 'Escape') { if ( this.props.segment.opened && !this.props.segment.openComments && !this.props.segment.openIssues && !UI.body.hasClass('search-open') && !UI.tagMenuOpen ) { if (!this.props.segment.openSplit) { SegmentActions.closeSegment(this.props.segment.sid) } else { SegmentActions.closeSplitSegment() } } else if (this.props.segment.openComments) { SegmentActions.closeSegmentComment() localStorage.setItem(MBC.localStorageCommentsClosed, true) } else if (this.props.segment.openIssues) { SegmentActions.closeIssuesPanel() } } } forceUpdateSegment(sid) { if (this.props.segment.sid === sid) { this.forceUpdate() } } allowHTML(string) { return {__html: string} } componentDidMount() { this.$section = $(this.section) document.addEventListener('keydown', this.handleKeyDown) SegmentStore.addListener(SegmentConstants.ADD_SEGMENT_CLASS, this.addClass) SegmentStore.addListener( SegmentConstants.REMOVE_SEGMENT_CLASS, this.removeClass, ) SegmentStore.addListener( SegmentConstants.SET_SEGMENT_PROPAGATION, this.setAsAutopropagated, ) SegmentStore.addListener( SegmentConstants.SET_SEGMENT_STATUS, this.setSegmentStatus, ) SegmentStore.addListener( SegmentConstants.OPEN_SEGMENT, this.openSegmentFromAction, ) SegmentStore.addListener( SegmentConstants.FORCE_UPDATE_SEGMENT, this.forceUpdateSegment, ) //Review SegmentStore.addListener( SegmentConstants.OPEN_ISSUES_PANEL, this.openRevisionPanel, ) if (this.props.segment.opened) { setTimeout(() => { this.openSegment() Speech2Text.enabled() && Speech2Text.enableMicrophone(this.$section) }) setTimeout(() => { UI.setCurrentSegment() }, 0) } } componentWillUnmount() { document.removeEventListener('keydown', this.handleKeyDown) SegmentStore.removeListener( SegmentConstants.ADD_SEGMENT_CLASS, this.addClass, ) SegmentStore.removeListener( SegmentConstants.REMOVE_SEGMENT_CLASS, this.removeClass, ) SegmentStore.removeListener( SegmentConstants.SET_SEGMENT_PROPAGATION, this.setAsAutopropagated, ) SegmentStore.removeListener( SegmentConstants.SET_SEGMENT_STATUS, this.setSegmentStatus, ) SegmentStore.removeListener( SegmentConstants.OPEN_SEGMENT, this.openSegmentFromAction, ) SegmentStore.removeListener( SegmentConstants.FORCE_UPDATE_SEGMENT, this.forceUpdateSegment, ) //Review SegmentStore.removeListener( SegmentConstants.OPEN_ISSUES_PANEL, this.openRevisionPanel, ) } shouldComponentUpdate(nextProps, nextState) { return ( !nextProps.segImmutable.equals(this.props.segImmutable) || !Immutable.fromJS(nextState.segment_classes).equals( Immutable.fromJS(this.state.segment_classes), ) || nextState.autopropagated !== this.state.autopropagated || nextState.readonly !== this.state.readonly || nextState.selectedTextObj !== this.state.selectedTextObj || nextProps.sideOpen !== this.props.sideOpen || nextState.showActions !== this.state.showActions ) } getSnapshotBeforeUpdate(prevProps, prevState) { if (!prevProps.segment.opened && this.props.segment.opened) { this.timeoutScroll = setTimeout(() => { SegmentActions.scrollToSegment(this.props.segment.sid) }, 200) setTimeout(() => { UI.setCurrentSegment() }, 0) setTimeout(() => { if ( this.props.segment.opened && !config.isReview && !SegmentStore.segmentHasIssues(this.props.segment.sid) ) { SegmentActions.closeSegmentIssuePanel(this.props.segment.sid) } if (this.props.segment.opened && !this.props.segment.openComments) { SegmentActions.closeSegmentComment(this.props.segment.sid) } Speech2Text.enabled() && Speech2Text.enableMicrophone(this.$section) }) } else if (prevProps.segment.opened && !this.props.segment.opened) { clearTimeout(this.timeoutScroll) setTimeout(() => { SegmentActions.saveSegmentBeforeClose(this.props.segment) }) } return null } componentDidUpdate() {} render() { let job_marker = '' let timeToEdit = '' let readonly = this.state.readonly let showLockIcon = this.props.segment.ice_locked === '1' || this.secondPassLocked let segment_classes = this.checkSegmentClasses() let split_group = this.props.segment.split_group || [] let autoPropagable = this.props.segment.repetitions_in_chunk !== '1' let originalId = this.props.segment.sid.split('-')[0] if (this.props.timeToEdit) { this.segment_edit_min = this.props.segment.parsed_time_to_edit[1] this.segment_edit_sec = this.props.segment.parsed_time_to_edit[2] } if (this.props.timeToEdit) { timeToEdit = <span className="edit-min">{this.segment_edit_min}</span> + 'm' + <span className="edit-sec">{this.segment_edit_sec}</span> + 's' } let translationIssues = this.getTranslationIssues() let locked = !this.props.segment.unlocked && (this.props.segment.ice_locked === '1' || this.secondPassLocked) const segmentHasIssues = SegmentStore.segmentHasIssues( this.props.segment.sid, ) return ( <section ref={(section) => (this.section = section)} id={'segment-' + this.props.segment.sid} className={segment_classes.join(' ')} data-hash={this.props.segment.segment_hash} data-autopropagated={this.state.autopropagated} data-propagable={autoPropagable} data-version={this.props.segment.version} data-split-group={split_group} data-split-original-id={originalId} data-tagmode="crunched" data-tagprojection={this.dataAttrTagged} onClick={this.onClickEvent.bind(this)} data-fid={this.props.segment.id_file} data-modified={this.props.segment.modified} > <div className="sid" title={this.props.segment.sid}> <div className="txt">{this.props.segment.sid}</div> {showLockIcon ? ( !readonly ? ( this.props.segment.unlocked ? ( <div className="ice-locked-icon" onClick={this.lockUnlockSegment.bind(this)} > <button className="unlock-button unlocked icon-unlocked3" /> </div> ) : ( <div className="ice-locked-icon" onClick={this.lockUnlockSegment.bind(this)} > <button className="icon-lock unlock-button locked" /> </div> ) ) : null ) : null} <div className="txt segment-add-inBulk"> <input type="checkbox" ref={(node) => (this.bulk = node)} checked={this.props.segment.inBulk} onClick={this.handleChangeBulk} /> </div> {this.props.segment.ice_locked !== '1' && config.splitSegmentEnabled && this.props.segment.opened ? ( !this.props.segment.openSplit ? ( <div className="actions"> <button className="split" title="Click to split segment" onClick={() => SegmentActions.openSplitSegment(this.props.segment.sid) } > <i className="icon-split" /> </button> <p className="split-shortcut">CTRL + S</p> </div> ) : ( <div className="actions"> <button className="split cancel" title="Click to close split segment" onClick={() => SegmentActions.closeSplitSegment()} > <i className="icon-split" /> </button> {/*<p className="split-shortcut">CTRL + W</p>*/} </div> ) ) : null} </div> {job_marker} <div className="body"> <SegmentHeader sid={this.props.segment.sid} autopropagated={this.state.autopropagated} segmentOpened={this.props.segment.opened} repetition={autoPropagable} /> <SegmentBody segment={this.props.segment} segImmutable={this.props.segImmutable} readonly={this.state.readonly} tagModesEnabled={this.props.tagModesEnabled} speech2textEnabledFn={this.props.speech2textEnabledFn} enableTagProjection={ this.props.enableTagProjection && !this.props.segment.tagged } locked={locked} removeSelection={this.removeSelection.bind(this)} openSegment={this.openSegment} isReview={this.props.isReview} isReviewExtended={this.props.isReviewExtended} reviewType={this.props.reviewType} isReviewImproved={this.props.isReviewImproved} /> <div className="timetoedit" data-raw-time-to-edit={this.props.segment.time_to_edit} > {timeToEdit} </div> {SegmentFilter && SegmentFilter.enabled() ? ( <div className="edit-distance"> Edit Distance: {this.props.segment.edit_distance} </div> ) : null} {config.isReview && this.props.reviewType === this.reviewExtendedFooter ? ( <IssuesContainer segment={this.props.segment} sid={this.props.segment.sid} /> ) : null} {this.props.segment.opened ? ( <SegmentFooter segment={this.props.segment} sid={this.props.segment.sid} fid={this.props.fid} /> ) : null} </div> {/*//!-- TODO: place this element here only if it's not a split --*/} <div className="segment-side-buttons"> {config.comments_enabled && (!this.props.segment.openComments || !this.props.segment.opened) ? ( <SegmentsCommentsIcon {...this.props} /> ) : null} <div data-mount="translation-issues-button" className="translation-issues-button" data-sid={this.props.segment.sid} > {translationIssues} </div> </div> <div className="segment-side-container"> {config.comments_enabled && this.props.segment.openComments && this.props.segment.opened ? ( <SegmentCommentsContainer {...this.props} /> ) : null} {this.props.isReviewExtended && this.props.segment.openIssues && this.props.segment.opened && (config.isReview || (!config.isReview && segmentHasIssues)) ? ( <div className="review-balloon-container"> {!this.props.segment.versions ? null : ( <ReviewExtendedPanel reviewType={this.props.reviewType} segment={this.props.segment} sid={this.props.segment.sid} isReview={config.isReview} selectionObj={this.state.selectedTextObj} removeSelection={this.removeSelection.bind(this)} /> )} </div> ) : null} </div> </section> ) } } export default Segment
src/js/pages/AnswerQuestionPage.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import selectn from 'selectn'; import TopNavBar from "../components/TopNavBar/TopNavBar"; import AnswerQuestion from '../components/questions/AnswerQuestion'; import AuthenticatedComponent from '../components/AuthenticatedComponent'; import translate from '../i18n/Translate'; import tutorial from '../components/tutorial/Tutorial'; import connectToStores from '../utils/connectToStores'; import * as QuestionActionCreators from '../actions/QuestionActionCreators'; import RouterActionCreators from '../actions/RouterActionCreators'; import UserStore from '../stores/UserStore'; import QuestionStore from '../stores/QuestionStore'; import Joyride from 'react-joyride'; import '../../scss/pages/answer/answer-next-question.scss'; import RegisterQuestionsFinishedPopup from "../components/questions/RegisterQuestionsFinishedPopup"; function parseId(user) { return user.id; } /** * Requests data from server (or store) for current props. */ function requestData(props) { const {user, params} = props; const questionId = params.hasOwnProperty('questionId') ? parseInt(params.questionId) : null; const currentUserId = parseId(user); QuestionActionCreators.requestQuestion(currentUserId, questionId); } /** * Retrieves state from stores for current props. */ function getState(props) { const {user, params} = props; const currentUserId = parseId(user); const currentUser = UserStore.get(currentUserId); const question = QuestionStore.getQuestion(); const questionId = parseInt(params.questionId); const from = params.from; const userAnswer = questionId ? QuestionStore.getUserAnswer(currentUserId, questionId) : {}; const errors = QuestionStore.getErrors(); const noMoreQuestions = QuestionStore.noMoreQuestions(); const isLoadingOwnQuestions = QuestionStore.isLoadingOwnQuestions(); const goToQuestionStats = QuestionStore.mustGoToQuestionStats(); return { currentUser, question, from, userAnswer, user, errors, noMoreQuestions, isLoadingOwnQuestions, goToQuestionStats }; } @AuthenticatedComponent @translate('AnswerQuestionPage') @tutorial() @connectToStores([UserStore, QuestionStore], getState) export default class AnswerQuestionPage extends Component { static propTypes = { // Injected by React Router: params : PropTypes.shape({ questionId: PropTypes.string, from : PropTypes.string }), // Injected by @AuthenticatedComponent user : PropTypes.object.isRequired, // Injected by @translate: strings : PropTypes.object, // Injected by @tutorial: steps : PropTypes.array, startTutorial : PropTypes.func, endTutorialHandler : PropTypes.func, tutorialLocale : PropTypes.object, joyrideRunning : PropTypes.bool, // Injected by @connectToStores: question : PropTypes.object, userAnswer : PropTypes.object, errors : PropTypes.string, isLoadingOwnQuestions : PropTypes.bool, noMoreQuestions : PropTypes.bool, goToQuestionStats : PropTypes.bool }; constructor(props) { super(props); this.skipQuestionHandler = this.skipQuestionHandler.bind(this); this.forceStartTutorial = this.forceStartTutorial.bind(this); } componentDidMount() { const questionId = this.props.params.questionId; if(!this.props.question || this.props.question.questionId !== questionId) { window.setTimeout(() => requestData(this.props), 0); } } componentDidUpdate() { const {goToQuestionStats, question, from} = this.props; if (goToQuestionStats) { setTimeout(() => { RouterActionCreators.replaceRoute(`/question-stats/${from}`); }, 0); } } componentWillUnmount() { this.joyride.reset(); } skipQuestionHandler() { const {user, question, params} = this.props; let userId = parseId(user); let questionId = question.questionId; QuestionActionCreators.skipQuestion(userId, questionId); if (user.slug === params.from) { window.setTimeout(RouterActionCreators.replaceRoute(`/questions`), 0); } else { window.setTimeout(RouterActionCreators.replaceRoute(`/users/${params.from}/other-questions`), 0); } } forceStartTutorial() { this.joyride.reset(true); } render() { const {user, strings, errors, noMoreQuestions, isLoadingOwnQuestions, userAnswer, question, steps, tutorialLocale, endTutorialHandler, joyrideRunning} = this.props; const userId = parseId(user); const ownPicture = user.photo ? user.photo.thumbnail.small : 'img/no-img/small.jpg'; const isRegisterQuestion = selectn('isRegisterQuestion', question); return ( <div className="answer-next-question-page"> <TopNavBar background={'FFFFFF'} iconLeft={'arrow-left'} textCenter={strings.topNavBarText} textSize={'small'} //onLeftLinkClickHandler={this.topNavBarLeftLinkClick} /> {/*{isJustRegistered ?*/} {/*<TopNavBar centerText={navBarTitle}/>*/} {/*:*/} {/*<TopNavBar leftIcon={'left-arrow'} centerText={navBarTitle} rightText={isRegisterQuestion ? '' : strings.skip} onRightLinkClickHandler={isRegisterQuestion ? null : this.skipQuestionHandler}/>*/} {/*}*/} <div className="answer-next-question-page-wrapper"> <Joyride ref={c => this.joyride = c} steps={steps} locale={tutorialLocale} callback={endTutorialHandler} type="continuous" run={joyrideRunning} autoStart={true}/> <div className=""> <div id="page-content" className="answer-question-content"> <AnswerQuestion question={question} userAnswer={userAnswer} userId={userId} errors={errors} noMoreQuestions={noMoreQuestions} ownPicture={ownPicture} startTutorial={this.forceStartTutorial} isLoadingOwnQuestions={isLoadingOwnQuestions}/> </div> </div> <RegisterQuestionsFinishedPopup onContinue={this.onContinue} onClose={this.onClosePopup} contentRef={this.props.popupContentRef}/> </div> <div className="skip-nav-bar" onClick={this.skipQuestionHandler}> <div className="text">Omitir <span className="icon icon-arrow-right"/></div> </div> </div> ); } } AnswerQuestionPage.defaultProps = { strings: { topNavBarText : 'Personality test', question : 'Question', skip : 'Skip', tutorialFirstStepTitle : 'Your answer', tutorialFirstStep : 'This is your answer to the above question.', tutorialSecondStepTitle: 'Others answers', tutorialSecondStep : 'Here you choose what other person should answer to be compatible with you; you can choose more than one answer.', tutorialThirdStepTitle : 'Importance', tutorialThirdStep : 'This will be the question`s importance when making compatibility calculations.' }, steps: [ { titleRef: 'tutorialFirstStepTitle', textRef: 'tutorialFirstStep', selector: '#joyride-1-your-answer', position: 'bottom', }, { titleRef: 'tutorialSecondStepTitle', textRef: 'tutorialSecondStep', selector: '#joyride-2-others-answers', position: 'bottom', }, { titleRef: 'tutorialThirdStepTitle', textRef: 'tutorialThirdStep', selector: '#joyride-3-answer-importance', position: 'top', } ] };
src/components/Tile/test.js
codella/snake
import React from 'react'; import ReactDOM from 'react-dom'; import Tile, {TILE_TYPES} from './'; it('renders an empty tile without crashing', () => { const div = document.createElement('div'); ReactDOM.render(<Tile type={TILE_TYPES.empty} />, div); }); it('renders a snake tile without crashing', () => { const div = document.createElement('div'); ReactDOM.render(<Tile type={TILE_TYPES.snake} />, div); }); it('renders a food tile without crashing', () => { const div = document.createElement('div'); ReactDOM.render(<Tile type={TILE_TYPES.food} />, div); });
actor-apps/app-web/src/app/components/modals/AppCacheUpdate.react.js
akingyin1987/actor-platform
import React from 'react'; import Modal from 'react-modal'; //import pureRender from 'pure-render-decorator'; import { Styles, FlatButton } from 'material-ui'; import AppCacheStore from 'stores/AppCacheStore'; import AppCacheActionCreators from 'actions/AppCacheActionCreators'; import { KeyCodes } from 'constants/ActorAppConstants'; import ActorTheme from 'constants/ActorTheme'; const ThemeManager = new Styles.ThemeManager(); const appElement = document.getElementById('actor-web-app'); Modal.setAppElement(appElement); const getStateFromStores = () => { return { isShown: AppCacheStore.isModalOpen() }; }; class AddContact extends React.Component { static childContextTypes = { muiTheme: React.PropTypes.object }; getChildContext() { return { muiTheme: ThemeManager.getCurrentTheme() }; } constructor(props) { super(props); this.state = getStateFromStores(); AppCacheStore.addChangeListener(this.onChange); document.addEventListener('keydown', this.onKeyDown, false); ThemeManager.setTheme(ActorTheme); } componentWillUnmount() { AppCacheStore.removeChangeListener(this.onChange); document.removeEventListener('keydown', this.onKeyDown, false); } render() { return ( <Modal className="modal-new modal-new--update" closeTimeoutMS={150} isOpen={this.state.isShown} style={{width: 400}}> <div className="modal-new__body"> <h1>Update available</h1> <h3>New version of Actor Web App available.</h3> <p>It's already downloaded to your browser, you just need to reload tab.</p> </div> <footer className="modal-new__footer text-right"> <FlatButton hoverColor="rgba(74,144,226,.12)" label="Cancel" onClick={this.onClose} secondary={true} /> <FlatButton hoverColor="rgba(74,144,226,.12)" label="Reload" onClick={this.onConfirm} secondary={true} /> </footer> </Modal> ); } onClose = () => { AppCacheActionCreators.closeModal(); } onConfirm = () => { AppCacheActionCreators.confirmUpdate(); } onChange = () => { this.setState(getStateFromStores()); } onKeyDown = (event) => { if (event.keyCode === KeyCodes.ESC) { event.preventDefault(); this.onClose(); } } } export default AddContact;
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.js
mangomint/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; export default class extends Component { static propTypes = { onReady: PropTypes.func.isRequired, }; users = [ { id: 1, name: '1' }, { id: 2, name: '2' }, { id: 3, name: '3' }, { id: 4, name: '4' }, ]; componentDidMount() { this.props.onReady(); } render() { return ( <div id="feature-class-properties"> {this.users.map(user => ( <div key={user.id}>{user.name}</div> ))} </div> ); } }
admin/client/App/shared/AlertMessages.js
w01fgang/keystone
import React from 'react'; import { Alert } from '../elemental'; import { upcase } from '../../utils/string'; /** * This renders alerts for API success and error responses. * Error format: { * error: 'validation errors' // The unique error type identifier * detail: { ... } // Optional details specific to that error type * } * Success format: { * success: 'item updated', // The unique success type identifier * details: { ... } // Optional details specific to that success type * } * Eventually success and error responses should be handled individually * based on their type. For example: validation errors should be displayed next * to each invalid field and signin errors should promt the user to sign in. */ var AlertMessages = React.createClass({ displayName: 'AlertMessages', propTypes: { alerts: React.PropTypes.shape({ error: React.PropTypes.Object, success: React.PropTypes.Object, }), }, getDefaultProps () { return { alerts: {}, }; }, renderValidationErrors () { let errors = this.props.alerts.error.detail; if (errors.name === 'ValidationError') { errors = errors.errors; } let errorCount = Object.keys(errors).length; let alertContent; let messages = Object.keys(errors).map((path) => { if (errorCount > 1) { return ( <li key={path}> {upcase(errors[path].error || errors[path].message)} </li> ); } else { return ( <div key={path}> {upcase(errors[path].error || errors[path].message)} </div> ); } }); if (errorCount > 1) { alertContent = ( <div> <h4>There were {errorCount} errors creating the new item:</h4> <ul>{messages}</ul> </div> ); } else { alertContent = messages; } return <Alert color="danger">{alertContent}</Alert>; }, render () { let { error, success } = this.props.alerts; if (error) { // Render error alerts switch (error.error) { case 'validation errors': return this.renderValidationErrors(); case 'error': if (error.detail.name === 'ValidationError') { return this.renderValidationErrors(); } else { return <Alert color="danger">{upcase(error.error)}</Alert>; } default: return <Alert color="danger">{upcase(error.error)}</Alert>; } } if (success) { // Render success alerts return <Alert color="success">{upcase(success.success)}</Alert>; } return null; // No alerts, render nothing }, }); module.exports = AlertMessages;
fixtures/dom/src/components/FixtureSet.js
yangshun/react
import React from 'react'; import PropTypes from 'prop-types'; const propTypes = { title: PropTypes.node.isRequired, description: PropTypes.node.isRequired, }; class FixtureSet extends React.Component { render() { const {title, description, children} = this.props; return ( <div> <h1>{title}</h1> {description && <p>{description}</p>} {children} </div> ); } } FixtureSet.propTypes = propTypes; export default FixtureSet;
src/library/validations/components/Select.js
zdizzle6717/universal-react-movie-app
'use strict'; import React from 'react'; import ReactDOM from 'react-dom'; import defaultValidations from '../constants/defaultValidations' import classNames from 'classnames'; import FormActions from '../actions/FormActions'; import FormStore from '../stores/FormStore'; export default class Select extends React.Component { constructor() { super(); this.state = { 'name': null, 'value': null, 'formName': null, 'valid': true, 'initial': true, 'touched': false, 'pristine': true, 'focused': false, 'blurred': false }; this.handleMouseDown = this.handleMouseDown.bind(this); this.handleFocus = this.handleFocus.bind(this); this.handleBlur = this.handleBlur.bind(this); this.validateInit = this.validateInit.bind(this); this.validateInput = this.validateInput.bind(this); } componentDidMount() { this.validateInit(this.props); } // Accounts for initial data check and conditionally required inputs componentWillReceiveProps(nextProps) { if (this.state.initial && this.state.pristine && nextProps.value || this.props.required !== nextProps.required) { this.validateInit(nextProps, true); } } // This will update validation in the case that an input is conditionally visible componentWillUnmount() { if (!this.props.preserveState) { let input = { 'name': this.props.name, 'formName': this.state.formName } setTimeout(() => { FormActions.removeInput(input); }); } } validateInit(props, propsHaveLoaded = false) { let elem = ReactDOM.findDOMNode(this); let formName = elem.closest('.form').getAttribute('name'); let existingInput = propsHaveLoaded ? false : FormStore.getInput(formName, props.name); if (existingInput) { this.setState(existingInput); return; } let validity = props.required ? (props.value ? true : false) : true; let input = { 'name': props.name, 'value': props.value, 'formName': formName, 'valid': validity }; this.setState(input); if (propsHaveLoaded) { input.initial = false; this.setState({ initial: false }) } input = Object.assign(this.state, input); setTimeout(() => { FormActions.addInput(input); }); } validateInput(e) { e.preventDefault(); let validity = this.props.required ? (e.target.value ? true : false) : true; let input = { 'name': e.target.name, 'value': e.target.value, 'valid': validity, 'initial': false, 'pristine': false } input = Object.assign(this.state, input); this.setState(input); FormActions.addInput(input); this.props.handleInputChange(e); } handleMouseDown() { let input = Object.assign(this.state, {'touched': true}); this.setState(input); FormActions.addInput(input); } handleFocus() { let input = Object.assign(this.state, {'focused': true, 'blurred': false}); this.setState(input); FormActions.addInput(input); } handleBlur() { let input = Object.assign(this.state, {'focused': false, 'blurred': true}); this.setState(input); FormActions.addInput(input); } render() { let validationClasses = classNames({ 'valid': this.state.valid, 'invalid': !this.state.valid, 'touched': this.state.touched, 'untouched': !this.state.touched, 'pristine': this.state.pristine, 'focused': this.state.focused, 'blurred': this.state.blurred, 'dirty': !this.state.pristine }); return ( <div className="validate-error-element"> <select className={validationClasses} type={this.props.type} name={this.props.name} value={this.props.value} onChange={this.validateInput} onMouseDown={this.handleMouseDown} onFocus={this.handleFocus} onBlur={this.handleBlur} disabled={this.props.disabled}> {this.props.children} </select> </div> ) } } Select.propTypes = { 'name': React.PropTypes.string.isRequired, 'value': React.PropTypes.string, 'handleInputChange': React.PropTypes.func.isRequired, 'preserveState': React.PropTypes.bool, 'required': React.PropTypes.bool, 'disabled': React.PropTypes.bool } Select.defaultProps = { 'preserveState': false };
client/analytics/components/pages/overview/assetReport/AssetSummary.js
Haaarp/geo
import React from 'react'; import {connect} from 'react-redux'; import FormWrap from 'konux/common/components/FormWrap'; import Block from './../../../partials/Block'; import SingleInfoIndicatorContainer from './../../../partials/indicators/SingleInfoIndicatorContainer'; import { translate } from 'react-i18next'; class AssetSummary extends React.Component { render() { let {t} = this.props; return( <Block> <FormWrap className="summary-wrapper"> <SingleInfoIndicatorContainer title={t('speed')} value={this.props.speed.toFixed(2)} unitOfMeasure="KM/H"/> <SingleInfoIndicatorContainer title={t('load')} value={this.props.load.toFixed(2)} unitOfMeasure="kTons"/> <SingleInfoIndicatorContainer title={t('amount')} value={parseInt(this.props.amount)} unitOfMeasure={t('trains')}/> </FormWrap> </Block> ); } } const stateMap = (state, props, ownProps) => { return { load: props.assetKpiStats && props.assetKpiStats.load ? props.assetKpiStats.load : 0, speed: props.assetKpiStats && props.assetKpiStats.speed ? props.assetKpiStats.speed : 0, amount: props.assetKpiStats && props.assetKpiStats.amount ? props.assetKpiStats.amount : 0 }; }; const ConnectedAssetSummary = connect(stateMap, null)(AssetSummary); export default translate(['common'])(ConnectedAssetSummary);
src/utils/typography.js
mattdell/coinmarketwatch
/* eslint-disable */ import ReactDOM from 'react-dom/server'; import React from 'react'; import Typography from 'typography'; import CodePlugin from 'typography-plugin-code'; import { MOBILE_MEDIA_QUERY } from 'typography-breakpoint-constants'; const options = { baseFontSize: '18px', baseLineHeight: 1.45, scaleRatio: 2.25, plugins: [new CodePlugin()], overrideStyles: ({ rhythm, scale }, options) => ({ [MOBILE_MEDIA_QUERY]: { // Make baseFontSize on mobile 16px. html: { fontSize: `${16 / 16 * 100}%`, }, }, }), }; const typography = new Typography(options); // Hot reload typography in development. if (process.env.NODE_ENV !== 'production') { typography.injectStyles(); } export default typography;
src/pages/resume/components/preface.js
dan9186/danielhess.me
import React from 'react' import styled from 'styled-components' import { Section } from '../../../components/grid' export const Preface = ({ preface }) => ( <Section> <Content>{preface}</Content> </Section> ) const Content = styled.div` display: flex; flex-flow: row wrap; margin-top: ${({ theme }) => theme.spacing(2)}; margin-bottom: ${({ theme }) => theme.spacing(0)}; padding-left: ${({ theme }) => theme.spacing(2)}; `
src/components/Publish/components/type_tabs/index.js
dloa/alexandria-librarian
import React from 'react'; import ExtraDrop from '../drop_zones/extra'; import MusicTab from './music'; export default React.createClass({ getTab(){ switch (this.props.selectedType) { case 'music': return <MusicTab/>; break; } }, render() { return ( <div className="tab-pane fade in active"> {this.getTab()} </div> ); } });
src/svg-icons/editor/border-right.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorBorderRight = (props) => ( <SvgIcon {...props}> <path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h2v-2h-2v2zm4-10v18h2V3h-2zm-4 18h2v-2h-2v2zm0-16h2V3h-2v2zm-4 8h2v-2h-2v2zm0-8h2V3h-2v2zm0 4h2V7h-2v2z"/> </SvgIcon> ); EditorBorderRight = pure(EditorBorderRight); EditorBorderRight.displayName = 'EditorBorderRight'; EditorBorderRight.muiName = 'SvgIcon'; export default EditorBorderRight;
node_modules/react-bootstrap/es/MediaList.js
Technaesthetic/ua-tools
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import classNames from 'classnames'; import React from 'react'; import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; var MediaList = function (_React$Component) { _inherits(MediaList, _React$Component); function MediaList() { _classCallCheck(this, MediaList); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } MediaList.prototype.render = function render() { var _props = this.props, className = _props.className, props = _objectWithoutProperties(_props, ['className']); var _splitBsProps = splitBsProps(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = getClassSet(bsProps); return React.createElement('ul', _extends({}, elementProps, { className: classNames(className, classes) })); }; return MediaList; }(React.Component); export default bsClass('media-list', MediaList);
components/spinner/spinner.js
Travix-International/travix-ui-kit
import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import { getClassNamesWithMods, warnAboutDeprecatedProp } from '../_helpers'; /** * General Spinner component. */ function Spinner(props) { warnAboutDeprecatedProp(props.mods, 'mods', 'className'); const { className, size } = props; const mods = props.mods ? props.mods.slice() : []; mods.push(`size_${size}`); const classes = classnames(getClassNamesWithMods('ui-spinner', mods), className); /* eslint-disable max-len */ return ( <div className={classes}> <svg version="1.1" viewBox="0 0 80 80" x="0px" xlinkHref="http://www.w3.org/1999/xlink" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg" y="0px" > <g> <g> <circle clipRule="evenodd" cx="40" cy="40" fillRule="evenodd" r="34.3" /> <path className="ui-spinner_darker" clipRule="evenodd" d="M39.9,33.1c0.5-5.4-1.5-10.4-5.2-14.9c6.1-2.1,7.6-1.5,8.6,3.8c0.5,2.9,0.4,6,0.1,9c-0.1,0.9-0.3,1.8-0.7,2.7c-0.8-0.3-1.8-0.6-2.7-0.6H39.9z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M46.6,41.9c5.3,2,10.6,2.1,16-0.3c0.8,5.6-0.3,7-5.4,6.9c-4.6,0-8.5-1.6-12-4.1C45.9,43.7,46.3,42.8,46.6,41.9z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M44.3,45.4c3.1,4.5,7.2,7.7,13.2,8.9c-3.2,5.1-5.1,5.5-9.2,2.1c-3.2-2.6-5.3-5.9-6.5-9.8C42.7,46.4,43.5,46,44.3,45.4z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M40.1,46.9c-0.1,5.6,1.3,10.4,5.3,14.5c-5.6,2.6-7.2,2-8.6-3.3c-0.5-1.8-0.8-3.7-0.6-5.6c0.2-2,0.6-4.1,1.1-6.2c0.8,0.3,1.7,0.5,2.7,0.5H40.1z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M36,45.5c-3.5,4.3-5,9.2-4.7,14.8c-5.7-1.2-6.8-2.7-4.9-7.3c1.1-2.5,2.6-4.8,4.4-6.8c0.9-1,2-1.9,3.3-2.8C34.6,44.3,35.2,45,36,45.5z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M33.5,42.1c-5.6,1.5-9.8,4.5-12.8,9.5c-4-4.2-3.9-6.4,0.6-9.1c1.6-1,3.4-1.9,5.2-2.2c2.2-0.4,4.4-0.6,6.6-0.8l0,0.5C33.1,40.7,33.2,41.5,33.5,42.1z" fillRule="evenodd" /> <path className="ui-spinner_darker" clipRule="evenodd" d="M33.5,37.9c-3.7-1.5-7.1-1.4-16,0c-1-4.9,0.3-6.5,5-6.6c4.7,0,8.8,1.6,12.4,4.1C34.2,36.2,33.8,37,33.5,37.9z" fillRule="evenodd" /> <path className="ui-spinner_darker" clipRule="evenodd" d="M35.8,34.6c-3-4.7-7.3-7.8-13.2-9c3.4-5.2,5.2-5.5,9.5-1.9c3.2,2.6,5.2,5.9,6.5,9.6C37.5,33.5,36.6,34,35.8,34.6z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M48,34.8c-0.5,0.7-1.4,1.1-2.1,1.6c-0.5-0.8-1.1-1.5-1.8-2c3.5-4.4,5.2-9.2,4.6-14.9c5.7,0.8,7.1,2.7,5.1,7.1C52.3,29.6,50,32.2,48,34.8z" fillRule="evenodd" /> <path className="ui-spinner_dark" clipRule="evenodd" d="M46.9,40c0-0.8-0.1-1.5-0.4-2.2c5.8-1.6,10-4.7,13.1-9.6c4.4,6.1,3.2,6.4-1.3,9.5c-1.5,1-3.3,1.7-5,2c-2.1,0.4-4.2,0.6-6.4,0.8L46.9,40z" fillRule="evenodd" /> </g> <circle className="ui-spinner_lighter" clipRule="evenodd" cx="40" cy="40" fillRule="evenodd" r="36" strokeLinecap="round" strokeLinejoin="round" strokeMiterlimit="10" strokeWidth="8" /> </g> </svg> </div> ); /* eslint-enable max-len */ } Spinner.defaultProps = { size: 'm', }; Spinner.propTypes = { /** * Custom class name */ className: PropTypes.string, /** * You can provide set of custom modifications. */ mods: PropTypes.arrayOf(PropTypes.string), /** * Spinner size. */ size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl']), }; export default Spinner;
src/components/Title.js
roycejewell/flux-ui-example
import React, { Component } from 'react'; class Title extends Component { render() { return ( <h1 className={`title title--${this.props.type}`}>{this.props.children}</h1> ); } } export default Title;
packages/example-phone/src/scripts/components/call/media-status.js
glhewett/spark-js-sdk
import React from 'react'; export default function MediaStatus({audioDirection, videoDirection}) { return ( <table> <tbody> <tr> <td>audio:</td> <td className="audio-direction">{audioDirection}</td> </tr> <tr> <td>video:</td> <td className="video-direction">{videoDirection}</td> </tr> </tbody> </table> ); } MediaStatus.propTypes = { audioDirection: React.PropTypes.string.isRequired, videoDirection: React.PropTypes.string.isRequired };
src/components/Feedback/Feedback.js
ademuk/react-starter-kit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback { render() { return ( <div className="Feedback"> <div className="Feedback-container"> <a className="Feedback-link" href="https://gitter.im/kriasoft/react-starter-kit">Ask a question</a> <span className="Feedback-spacer">|</span> <a className="Feedback-link" href="https://github.com/kriasoft/react-starter-kit/issues/new">Report an issue</a> </div> </div> ); } } export default Feedback;
test/componentsMock.js
michaltakac/mathworldvr
import React from 'react' import PropTypes from 'prop-types' module.exports = new Proxy({}, { get: (target, property) => { const Mock = (props) => <a-entity>{props.children}</a-entity> Mock.displayName = property Mock.propTypes = { children: PropTypes.any, } return Mock }, })
src/icons/Folder.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class Folder extends React.Component { render() { if(this.props.bare) { return <g> <g> <path d="M430.1,192H81.9c-17.7,0-18.6,9.2-17.6,20.5l13,183c0.9,11.2,3.5,20.5,21.1,20.5h316.2c18,0,20.1-9.2,21.1-20.5l12.1-185.3 C448.7,199,447.8,192,430.1,192z"></path> <g> <path d="M426.2,143.3c-0.5-12.4-4.5-15.3-15.1-15.3c0,0-121.4,0-143.2,0c-21.8,0-24.4,0.3-40.9-17.4C213.3,95.8,218.7,96,190.4,96 c-22.6,0-75.3,0-75.3,0c-17.4,0-23.6-1.5-25.2,16.6c-1.5,16.7-5,57.2-5.5,63.4h343.4L426.2,143.3z"></path> </g> </g> </g>; } return <IconBase> <g> <path d="M430.1,192H81.9c-17.7,0-18.6,9.2-17.6,20.5l13,183c0.9,11.2,3.5,20.5,21.1,20.5h316.2c18,0,20.1-9.2,21.1-20.5l12.1-185.3 C448.7,199,447.8,192,430.1,192z"></path> <g> <path d="M426.2,143.3c-0.5-12.4-4.5-15.3-15.1-15.3c0,0-121.4,0-143.2,0c-21.8,0-24.4,0.3-40.9-17.4C213.3,95.8,218.7,96,190.4,96 c-22.6,0-75.3,0-75.3,0c-17.4,0-23.6-1.5-25.2,16.6c-1.5,16.7-5,57.2-5.5,63.4h343.4L426.2,143.3z"></path> </g> </g> </IconBase>; } };Folder.defaultProps = {bare: false}
node_modules/react-router/es6/RouteUtils.js
gurusewak/react101
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; }; import React from 'react'; function isValidChild(object) { return object == null || React.isValidElement(object); } export function isReactChildren(object) { return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); } function createRoute(defaultProps, props) { return _extends({}, defaultProps, props); } export function createRouteFromReactElement(element) { var type = element.type; var route = createRoute(type.defaultProps, element.props); if (route.children) { var childRoutes = createRoutesFromReactChildren(route.children, route); if (childRoutes.length) route.childRoutes = childRoutes; delete route.children; } return route; } /** * Creates and returns a routes object from the given ReactChildren. JSX * provides a convenient way to visualize how routes in the hierarchy are * nested. * * import { Route, createRoutesFromReactChildren } from 'react-router' * * const routes = createRoutesFromReactChildren( * <Route component={App}> * <Route path="home" component={Dashboard}/> * <Route path="news" component={NewsFeed}/> * </Route> * ) * * Note: This method is automatically used when you provide <Route> children * to a <Router> component. */ export function createRoutesFromReactChildren(children, parentRoute) { var routes = []; React.Children.forEach(children, function (element) { if (React.isValidElement(element)) { // Component classes may have a static create* method. if (element.type.createRouteFromReactElement) { var route = element.type.createRouteFromReactElement(element, parentRoute); if (route) routes.push(route); } else { routes.push(createRouteFromReactElement(element)); } } }); return routes; } /** * Creates and returns an array of routes from the given object which * may be a JSX route, a plain object route, or an array of either. */ export function createRoutes(routes) { if (isReactChildren(routes)) { routes = createRoutesFromReactChildren(routes); } else if (routes && !Array.isArray(routes)) { routes = [routes]; } return routes; }
actor-apps/app-web/src/app/components/JoinGroup.react.js
hzy87email/actor-platform
import React from 'react'; import requireAuth from 'utils/require-auth'; import DialogActionCreators from 'actions/DialogActionCreators'; import JoinGroupActions from 'actions/JoinGroupActions'; import JoinGroupStore from 'stores/JoinGroupStore'; // eslint-disable-line class JoinGroup extends React.Component { static propTypes = { params: React.PropTypes.object }; static contextTypes = { router: React.PropTypes.func }; constructor(props) { super(props); JoinGroupActions.joinGroup(props.params.token) .then((peer) => { this.context.router.replaceWith('/'); DialogActionCreators.selectDialogPeer(peer); }).catch((e) => { console.warn(e, 'User is already a group member'); this.context.router.replaceWith('/'); }); } render() { return null; } } export default requireAuth(JoinGroup);
src/svg-icons/av/skip-previous.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSkipPrevious = (props) => ( <SvgIcon {...props}> <path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/> </SvgIcon> ); AvSkipPrevious = pure(AvSkipPrevious); AvSkipPrevious.displayName = 'AvSkipPrevious'; AvSkipPrevious.muiName = 'SvgIcon'; export default AvSkipPrevious;
imports/ui/pages/Admin/Suppliers/NewSupplier/NewSupplier.js
haraneesh/mydev
import React from 'react'; import PropTypes from 'prop-types'; import SupplierEditor from '../../../../components/SupplierEditor/SupplierEditor'; const NewSupplier = ({ history }) => ( <div className="NewSupplier"> <h2 className="page-header">New Supplier</h2> <SupplierEditor history={history} /> </div> ); NewSupplier.propTypes = { history: PropTypes.object.isRequired, }; export default NewSupplier;
app/packs/src/components/qc/components/substance/BlockIr.js
ComPlat/chemotion_ELN
import React from 'react'; import PropTypes from 'prop-types'; import { Panel, Alert } from 'react-bootstrap'; import QcMolView from '../helper/qc_mol_view'; import { iconByMargin } from '../helper/icon'; import { tableIr } from '../helper/ir'; const emptyBlock = () => ( <div className="card-qc"> <h5> <span>4 Analysis of the provided digital IR data:</span> </h5> <div className="card-qc"> <Alert bsStyle="danger"> No Information. Please upload spectra to Spectra Editor. </Alert> </div> </div> ); const BlockIr = ({ ansIr }) => { if (!ansIr.exist) return emptyBlock(); const { qcp } = ansIr; const { fgs, svg, numFg, numFg80, numFg90, posMac80, posOwn80, posMac90, posOwn90, negMac90, negOwn90, numMac, numOwn, ansMac80, ansOwn80, ansMacF90, ansOwnF90, } = qcp; return ( <div className="card-qc"> <h5> <span>4 Analysis of the provided digital IR data:</span> </h5> <div className="card-qc"> <div> <span>Amount of functional groups given: { numFg }</span> </div> <div> <span> Amount of functional groups that were part of the routine and accurracy &gt;80%: { numFg80 + numFg90 } </span> </div> <div> <span>Output true machine (&gt;80%): </span> { `${(posMac80 + posMac90)}/${(numMac)}` } { iconByMargin(ansMac80, 1) } </div> <div> <span>Output true owner (&gt;80%): </span> { `${(posOwn80 + posOwn90)}/${(numOwn)}` } { iconByMargin(ansOwn80, 1) } </div> <div> <span>Output false machine (&gt;90%): </span> { `${(negMac90)}/${(posMac90 + negMac90)}` } { iconByMargin(ansMacF90, 0) } </div> <div> <span>Output false owner (&gt; 90%): </span> { `${(negOwn90)}/${(posOwn90 + negOwn90)}` } { iconByMargin(ansOwnF90, 0) } </div> <Panel className="qc-detail-panel" id="qc-detail-panel-ir" defaultExpanded={false} > <Panel.Heading> <Panel.Title className="qc-detail-panel-title" toggle> IR Prediction Detail </Panel.Title> </Panel.Heading> <Panel.Collapse> <Panel.Body> <QcMolView svg={svg} /> { tableIr(fgs) } </Panel.Body> </Panel.Collapse> </Panel> </div> </div> ); }; BlockIr.propTypes = { ansIr: PropTypes.object.isRequired, }; export default BlockIr;
chapter-11/react_router_chunked/src/pages/NotFound.js
mocheng/react-and-redux
import React from 'react'; const NotFound = () => { return ( <div>404: Not Found</div> ); }; export default NotFound;
client/main.js
hr-memories/TagMe
import Exponent from 'exponent'; import React from 'react'; import Login from './login'; import Homescreen from './homescreen'; import Memory from './memory'; import Memories from './memories'; import { Navigator } from 'react-native'; class App extends React.Component { renderScene(route, navigator) { if (route.name === 'Login') { return <Login navigator={navigator} />; } if (route.name === 'Homescreen') { return <Homescreen navigator={navigator} {...route.passProps}/>; } if (route.name === 'Memory') { return <Memory navigator={navigator} {...route.passProps}/>; } if (route.name === 'Memories') { return <Memories navigator={navigator} {...route.passProps}/>; } } render() { return ( <Navigator initialRoute={{ name: 'Login' }} renderScene={this.renderScene} /> ); } } Exponent.registerRootComponent(App);
ui/src/pages/SettingsStoresPage/index.js
LearningLocker/learninglocker
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withProps, compose } from 'recompose'; import { withModels } from 'ui/utils/hocs'; import { fromJS } from 'immutable'; import { queryStringToQuery, modelQueryStringSelector } from 'ui/redux/modules/search'; import { addModel } from 'ui/redux/modules/models'; import { loggedInUserId } from 'ui/redux/modules/auth'; import { clearModelsCache } from 'ui/redux/modules/pagination'; import SearchBox from 'ui/containers/SearchBox'; import ModelList from 'ui/containers/ModelList'; import StoreForm from './StoreForm'; const schema = 'lrs'; const StoreList = compose( withProps({ schema, sort: fromJS({ createdAt: -1, _id: -1 }) }), withModels )(ModelList); class Stores extends Component { static propTypes = { userId: PropTypes.string, addModel: PropTypes.func, searchString: PropTypes.string, }; onClickAdd = () => { this.addButton.blur(); return this.props.addModel({ schema, props: { owner: this.props.userId, isExpanded: true } }) .then(() => { // when we add a new store we also create a new client this.props.clearModelsCache({ schema: 'client' }); }) .catch((err) => { console.error(err); }); } render = () => ( <div> <header id="topbar"> <div className="heading heading-light"> <span className="pull-right open_panel_btn"> <button className="btn btn-primary btn-sm" ref={(ref) => { this.addButton = ref; }} onClick={this.onClickAdd}> <i className="ion ion-plus" /> Add new </button> </span> <span className="pull-right open_panel_btn" style={{ width: '25%' }}> <SearchBox schema={schema} /> </span> Learning Record Stores </div> </header> <div className="row"> <div className="col-md-12"> <StoreList filter={queryStringToQuery(this.props.searchString, schema)} getDescription={model => `${model.get('title', '')} ( ${model.get('statementCount')} )`} ModelForm={StoreForm} /> </div> </div> </div> ) } export default connect(state => ({ userId: loggedInUserId(state), searchString: modelQueryStringSelector(schema)(state), }), { addModel, clearModelsCache })(Stores);
docs/components/App/index.js
WEACOMRU/react-giphy-select
import React, { Component } from 'react'; import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/dist/light'; import bash from 'react-syntax-highlighter/dist/languages/bash'; import javascript from 'react-syntax-highlighter/dist/languages/javascript'; import tomorrowNightEighties from 'react-syntax-highlighter/dist/styles/tomorrow-night-eighties'; import { ObjectInspector } from 'react-inspector'; import GiphySelect from 'GiphySelect'; // eslint-disable-line import/no-unresolved, import/extensions import styles from './styles.css'; registerLanguage('bash', bash); registerLanguage('javascript', javascript); const installationCode = '$ npm i -S react-giphy-select'; const stylesCode = 'node_modules/react-giphy-select/lib/styles.css'; const usageCode = `import React, { Component } from 'react'; import GiphySelect from 'react-giphy-select'; import 'react-giphy-select/lib/styles.css'; export default class Example extends Component { render() { return ( <div> <GiphySelect /> </div> ); } }`; const renderEntryCode = 'renderEntry(entry, onSelect, options)'; const onEntrySelectCode = 'onEntrySelect(entry)'; const contributingCode = `$ npm install $ npm start`; const testCode = `$ npm run lint $ npm test`; export default class App extends Component { state = { entry: {}, }; onEntrySelect = entry => { this.setState({ entry, }); }; render() { return ( <div className={styles.app}> <h1 className={styles.appTitle}>React Giphy Select Component</h1> <p>A React component for select GIFs by Giphy API.</p> <GiphySelect theme={{ select: styles.appSelect }} onEntrySelect={this.onEntrySelect} /> <div className={styles.appInspector}> <h3 className={styles.appInspectorTitle}> Please, select a GIF </h3> <ObjectInspector data={this.state.entry} /> </div> <p> By default it show GIFs currently trending online. But user can request a specific GIFs using the search input. </p> <h2 className={styles.appHeader2}>Attribution to Giphy</h2> <p> Please, read Giphy&nbsp; <a href="https://giphy.com/terms" rel="noopener noreferrer" target="_blank" >terms of service</a>. </p> <h2 className={styles.appHeader2}>Installation</h2> <SyntaxHighlighter language="bash" style={tomorrowNightEighties} >{installationCode}</SyntaxHighlighter> <h2 className={styles.appHeader2}>Usage</h2> <p> The plugin ships with a default styling available at this location in the installed package: </p> <SyntaxHighlighter language="bash" style={tomorrowNightEighties} >{stylesCode}</SyntaxHighlighter> <p> You will need&nbsp; <a href="https://webpack.js.org/" rel="noopener noreferrer" target="_blank" >Webpack</a> or other build system, that supports requiring css files. </p> <SyntaxHighlighter language="javascript" style={tomorrowNightEighties} >{usageCode}</SyntaxHighlighter> <h2 className={styles.appHeader2}>Props</h2> <dl className={styles.appProps}> <dt className={styles.appPropsName}>theme</dt> <dd className={styles.appPropsDesc}> Object of CSS classes with the following keys. <dl className={styles.appSubParams}> <dt className={styles.appSubParamsName}>select</dt> <dd className={styles.appSubParamsDesc}> CSS class for GiphySelect component. </dd> <dt className={styles.appSubParamsName}>selectInput</dt> <dd className={styles.appSubParamsDesc}> CSS class for search input. </dd> <dt className={styles.appSubParamsName}>list</dt> <dd className={styles.appSubParamsDesc}> CSS class for entries list. </dd> <dt className={styles.appSubParamsName}>listEmpty</dt> <dd className={styles.appSubParamsDesc}> CSS class for empty state of entries list. </dd> <dt className={styles.appSubParamsName}>listScrollbar</dt> <dd className={styles.appSubParamsDesc}> CSS class for scrollbar. </dd> <dt className={styles.appSubParamsName}>listScrollbarThumb</dt> <dd className={styles.appSubParamsDesc}> CSS class for scrollbar thumb. </dd> <dt className={styles.appSubParamsName}>listMasonry</dt> <dd className={styles.appSubParamsDesc}> CSS class for masonry layout. </dd> <dt className={styles.appSubParamsName}>listItem</dt> <dd className={styles.appSubParamsDesc}> CSS class for item of entries list. </dd> <dt className={styles.appSubParamsName}>listEntry</dt> <dd className={styles.appSubParamsDesc}> CSS class for entry. </dd> <dt className={styles.appSubParamsName}>listEntryImage</dt> <dd className={styles.appSubParamsDesc}> CSS class for entry image. </dd> <dt className={styles.appSubParamsName}>attribution</dt> <dd className={styles.appSubParamsDesc}> CSS class for attribution. </dd> </dl> </dd> <dt className={styles.appPropsName}>placeholder</dt> <dd className={styles.appPropsDesc}> Search input placeholder&nbsp; <em className={styles.appPropsDefault}>(by default &quot;Search GIFs&quot;)</em>. </dd> <dt className={styles.appPropsName}>requestDelay</dt> <dd className={styles.appPropsDesc}> Delay before sending a request after the search input value is changed&nbsp; <em className={styles.appPropsDefault}>(by default 500 ms)</em>. </dd> <dt className={styles.appPropsName}>requestKey</dt> <dd className={styles.appPropsDesc}> Key for Giphy API&nbsp; <em className={styles.appPropsDefault}> (by default is used public beta key &quot;dc6zaTOxFJmzC&quot;) </em>. </dd> <dt className={styles.appPropsName}>requestLang</dt> <dd className={styles.appPropsDesc}> Specify default country for regional content; format is 2-letter ISO 639-1 country code. See list of supported languages&nbsp; <a href="https://github.com/Giphy/GiphyAPI#language-support" rel="noopener noreferrer" target="_blank" >here</a>. </dd> <dt className={styles.appPropsName}>requestRating</dt> <dd className={styles.appPropsDesc}> Limit results to those rated (y,g, pg, pg-13 or r)&nbsp; <em className={styles.appPropsDefault}>(by default &quot;pg&quot;)</em>. </dd> <dt className={styles.appPropsName}>renderEntry</dt> <dd className={styles.appPropsDesc}> You can rewrite default&nbsp; <code className={styles.appCode}>renderEntry</code> method <SyntaxHighlighter language="javascript" style={tomorrowNightEighties} >{renderEntryCode}</SyntaxHighlighter> <dl className={styles.appSubParams}> <dt className={styles.appSubParamsName}>entry</dt> <dd className={styles.appSubParamsDesc}> Object with entry data from Giphy API. </dd> <dt className={styles.appSubParamsName}>onSelect</dt> <dd className={styles.appSubParamsDesc}> <code className={styles.appCode}>onEntrySelect</code> callback. </dd> <dt className={styles.appSubParamsName}>options</dt> <dd className={styles.appSubParamsDesc}> Object, that contains&nbsp; <code className={styles.appCode}>theme</code> &nbsp;parameter. </dd> </dl> </dd> <dt className={styles.appPropsName}>onEntrySelect</dt> <dd className={styles.appPropsDesc}> A callback which is triggered whenever the entry is selected <SyntaxHighlighter language="javascript" style={tomorrowNightEighties} >{onEntrySelectCode}</SyntaxHighlighter> <dl className={styles.appSubParams}> <dt className={styles.appSubParamsName}>entry</dt> <dd className={styles.appSubParamsDesc}> Object with entry data from Giphy API. </dd> </dl> </dd> </dl> <h2 className={styles.appHeader2}>Contribution</h2> <p>Install all dependencies, then start the demo</p> <SyntaxHighlighter language="bash" style={tomorrowNightEighties} >{contributingCode}</SyntaxHighlighter> <p>Do not forget about tests and lint check</p> <SyntaxHighlighter language="bash" style={tomorrowNightEighties} >{testCode}</SyntaxHighlighter> <p>Please, create issues and pull requests.</p> <h2 className={styles.appHeader2}>License</h2> <p>MIT.</p> </div> ); } }
js/pages/HomePage.js
KissLuckystar/HotelMarketingApp
/** * 主页 * @flow * Created by smk on 2017/2/23 */ import React, { Component } from 'react'; import { StyleSheet, Image, View, BackAndroid, ToastAndroid } from 'react-native'; //react-native导航条组件 import TabNavigator from 'react-native-tab-navigator'; import MainPage from './MainPage'; //第一页主导航 import ProductPage from './ProductPage'; //第二页产品导航 import MyPage from './MyPage'; //第三页个人导航 //数组的静态方法类 import ArrayUtils from '../util/ArrayUtils'; export var FLAG_TAB = { flag_mainTab:'flag_mainTab', flag_productTab:'flag_productTab', flag_myTab:'flag_myTab' } export default class HomePage extends Component { constructor(props) { super(props); this.subscribers = []; this.changedValues = { //favorite: {popularChange: false, trendingChange: false}, my: {languageChange: false, keyChange: false, themeChange: false} }; //设置默认选中的tab let selectedTab = this.props.selectedTab ? this.props.selectedTab : FLAG_TAB.flag_mainTab; this.state={ selectedTab:selectedTab, theme: this.props.theme } } addSubscriber(subscriber) { ArrayUtils.add(this.subscribers, subscriber); } removeSubscriber(subscriber) { ArrayUtils.remove(this.subscribers, subscriber); } //监听Android物理设备返回键事件 /*componentWillMount() { BackAndroid.addEventListener('hardwareBackPress',this.onBackAndroid); } ComponentWillUnmount() { BackAndroid.removeEventListener('hardwareBackPress',this.onBackAndroid); } onBackAndroid = () => { if( this.lastBackPressed && this.lastBackPressed + 2000 >= Date.now() ) { //最近两秒内按过back键,可以退出应用 return false; } else{ this.lastBackPressed = Date.now(); ToastAndroid.show('再按一次退出应用',ToastAndroid.SHORT); //return true; } return true; }*/ onSelected(object) { // if (this.updateFavorite && 'popularTab' === object)this.updateFavorite(object); if (object !== this.state.selectedTab) { this.subscribers.forEach((item, index, arr)=> { if (typeof(item) == 'function')item(this.state.selectedTab, object); }) } if(object===FLAG_TAB.flag_popularTab)this.changedValues.favorite.popularChange=false; if(object===FLAG_TAB.flag_trendingTab)this.changedValues.favorite.trendingChange=false; this.setState({ selectedTab: object, }) } onReStart(jumpToTab){ this.props.navigator.resetTo({ component: HomePage, name: 'HomePage', params: { ...this.props, theme:this.state.theme, selectedTab: jumpToTab, } }); } onThemeChange(theme) { if (!theme)return; this.setState({ theme: theme }) this.changedValues.my.themeChange = true; this.subscribers.forEach((item, index, arr)=> { if (typeof(item) == 'function')item(theme); }) this.changedValues.my.themeChange = false; } //定义Tab的内容和样式 _renderTab(Component,selectedTab,title,renderIcon) { return ( <TabNavigator.Item selected={this.state.selectedTab === selectedTab} title={ title } titleStyle={ styles.tabText } selectedTitleStyle={ this.state.theme.styles.selectedTitleStyle } renderIcon={ () => <Image style={styles.tabBarIcon} source={renderIcon} /> } renderSelectedIcon={ () => <Image style={[styles.tabBarSelectedIcon, this.state.theme.styles.tabBarSelectedIcon]} source={renderIcon} />} onPress={ () => this.onSelected(selectedTab)} > <Component {...this.props} theme={this.state.theme} homeComponent={this} /> </TabNavigator.Item> ) } render() { return ( <View style={styles.container}> <TabNavigator tabBarStyle={{opacity: 0.9,}} sceneStyle={{paddingBottom: 0}} > {this._renderTab(MainPage, FLAG_TAB.flag_mainTab, '首页', require('../../res/images/ic_main.png'))} {this._renderTab(ProductPage, FLAG_TAB.flag_productTab, '产品', require('../../res/images/ic_product.png'))} {this._renderTab(MyPage, FLAG_TAB.flag_myTab, '我的', require('../../res/images/ic_my.png'))} </TabNavigator> </View> ) } /*render() { return ( <View style={styles.container}> <TabNavigator> <TabNavigator.Item selected={this.state.selectedTab === FLAG_TAB.flag_mainTab} title="首页" titleStyle={ styles.tabText } selectedTitleStyle={ styles.selectedTabText } renderIcon={ () => <Image style={styles.tabBarIcon} source={require('../../res/images/ic_main.png')} /> } renderSelectedIcon={ () => <Image style={styles.tabBarSelectedIcon} source={require('../../res/images/ic_main.png')} />} onPress={ () => this.setState({selectedTab:FLAG_TAB.flag_mainTab})} > <MainPage navigator={this.props.navigator} /> </TabNavigator.Item> <TabNavigator.Item selected={this.state.selectedTab === FLAG_TAB.flag_productTab} title="产品" titleStyle={ styles.tabText } selectedTitleStyle={ styles.selectedTabText } renderIcon={ () => <Image style={styles.tabBarIcon} source={require('../../res/images/ic_product.png')} /> } renderSelectedIcon={ () => <Image style={styles.tabBarSelectedIcon} source={require('../../res/images/ic_product.png')} />} onPress={ () => this.setState({selectedTab:FLAG_TAB.flag_productTab})} > <ProductPage navigator={this.props.navigator} /> </TabNavigator.Item> <TabNavigator.Item selected={this.state.selectedTab === FLAG_TAB.flag_myTab} title="我的" titleStyle={ styles.tabText } selectedTitleStyle={ styles.selectedTabText } renderIcon={ () => <Image style={styles.tabBarIcon} source={require('../../res/images/ic_my.png')} /> } renderSelectedIcon={ () => <Image style={styles.tabBarSelectedIcon} source={require('../../res/images/ic_my.png')} />} onPress={ () => this.setState({selectedTab:FLAG_TAB.flag_myTab})} > <MyPage navigator={this.props.navigator} /> </TabNavigator.Item> </TabNavigator> </View> ) }*/ } const styles=StyleSheet.create({ container:{ flex:1 }, tabText:{ }, selectedTabText:{ color:'#3c78d8' }, tabBarIcon:{ width:26,height:26, resizeMode:'contain' }, tabBarSelectedIcon:{ width:26,height:26, resizeMode:'contain', tintColor:'#3c78d8' } })
test/views/object.spec.js
transmute-industries/monarch-portal
import {expect} from 'chai' import {shallow} from 'enzyme' import React from 'react' import {parse} from '../../app/scripts/utils/path' import ObjectView from '../../app/scripts/views/object' describe('Object', () => { it('renders', () => { const path = parse('/ipfs/hello/world') const permalink = parse('/perma/hello/world') const el = shallow( <ObjectView path={path} permalink={permalink} gateway='gateway' object={{Links: [], Data: 'hello'}} /> ) expect(el.find('h4')).to.have.text('Object') expect(el.find('Links')).to.have.prop('links').eql([]) expect(el.find('DisplayData')).to.have.prop('data', 'hello') expect(el.find('PermaLink')).to.have.prop('url', permalink) }) })
examples/src/components/Contributors.js
mcls/react-select
import React from 'react'; import Select from 'react-select'; const CONTRIBUTORS = require('../data/contributors'); const MAX_CONTRIBUTORS = 6; const ASYNC_DELAY = 500; const Contributors = React.createClass({ displayName: 'Contributors', propTypes: { label: React.PropTypes.string, }, getInitialState () { return { multi: true, value: [CONTRIBUTORS[0]], }; }, onChange (value) { this.setState({ value: value, }); }, switchToMulti () { this.setState({ multi: true, value: [this.state.value], }); }, switchToSingle () { this.setState({ multi: false, value: this.state.value[0], }); }, getContributors (input, callback) { input = input.toLowerCase(); var options = CONTRIBUTORS.filter(i => { return i.github.substr(0, input.length) === input; }); var data = { options: options.slice(0, MAX_CONTRIBUTORS), complete: options.length <= MAX_CONTRIBUTORS, }; setTimeout(function() { callback(null, data); }, ASYNC_DELAY); }, gotoContributor (value, event) { window.open('https://github.com/' + value.github); }, render () { return ( <div className="section"> <h3 className="section-heading">{this.props.label}</h3> <Select.Async multi={this.state.multi} value={this.state.value} onChange={this.onChange} onValueClick={this.gotoContributor} valueKey="github" labelKey="name" loadOptions={this.getContributors} /> <div className="checkbox-list"> <label className="checkbox"> <input type="radio" className="checkbox-control" checked={this.state.multi} onChange={this.switchToMulti}/> <span className="checkbox-label">Multiselect</span> </label> <label className="checkbox"> <input type="radio" className="checkbox-control" checked={!this.state.multi} onChange={this.switchToSingle}/> <span className="checkbox-label">Single Value</span> </label> </div> <div className="hint">This example implements custom label and value properties, async options and opens the github profiles in a new window when values are clicked</div> </div> ); } }); module.exports = Contributors;
src/app/components/DatePickerExampleSimple.js
leoliew/react-webpack-example
/** * Created by leoliew on 2016/11/28. */ import React from 'react'; import DatePicker from 'material-ui/DatePicker'; import ShowCaseCard from './ShowCaseCard'; /** * The Date Picker defaults to a portrait dialog. The `mode` property can be set to `landscape`. * You can also disable the Dialog passing `true` to the `disabled` property. */ export default class ChipExampleSimple extends React.Component { render() { var showCase = <div> <DatePicker hintText="Portrait Dialog"/> <DatePicker hintText="Landscape Dialog" mode="landscape"/> <DatePicker hintText="Dialog Disabled" disabled={true}/> </div> ; return ( <ShowCaseCard title="Simple examples" subtitle="The Date Picker defaults to a portrait dialog. The mode property can be set to landscape. You can also disable the Dialog passing true to the disabled property." text={showCase} /> ) } }
src/components/FunctionBox.js
piecewisecss/piecewisecss.github.io
import React from 'react'; import { WindowResizeListener } from 'react-window-resize-listener' WindowResizeListener.DEBOUNCE_TIME = 20; export default class FunctionBox extends React.Component{ constructor(props){ super(props); this.state = { width: window.innerWidth }; } render(){ // console.log('state', this.state); let { width } = this.state, calc = `24px + ((${width}px - 480px) / (1000px - 480px)) / (48px - 24px)`, eqTop = <div className='eqTop'>(<span>{width + 'px'}</span> - 480px)</div>, eqMid = `(1000px - 480px)`, eqBot = `(48px - 24px)`, finalCalc = (24 + (width - 480) / ((1000 - 480) / (48 - 24))).toString().split('.')[0] + '.' + (24 + (width - 480) / ((1000 - 480) / (48 - 24))).toString().split('.')[1].substring(0, 2) + ((24 + (width - 480) / ((1000 - 480) / (48 - 24))).toString().split('.')[1].substring(0, 2).length == 1 ? '0' : '') + 'px' return ( <div className='functionBox'> <div className='currentWidth'>{width + 'px'}</div> <div className='calc'> <div className='calcTop'> <div className='topLeft left'>f(x) =</div> <div className='topMid mid'>48px</div> <div className='topRight right'>48px</div> </div> <div className='calcMid'> <div className='midLeft left noSelect'>f(x) =</div> <div className='midMid mid'> <div className='base'>24px +</div> <div className='equation'> {eqTop} <div className='eqMid'>{eqMid}</div> <div className='eqBot'>{eqBot}</div> </div> </div> <div className='midRight right'>{finalCalc}</div> </div> <div className='calcBot'> <div className='botLeft left noSelect'>f(x) =</div> <div className='botMid mid'>24px</div> <div className='botRight right'>24px</div> </div> </div> <WindowResizeListener onResize={windowSize => this.setState({ width: windowSize.windowWidth })}/> </div> ) } }
packages/material-ui-icons/src/Compare.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Compare = props => <SvgIcon {...props}> <path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /> </SvgIcon>; Compare = pure(Compare); Compare.muiName = 'SvgIcon'; export default Compare;
examples/websdk-samples/LayerReactNativeSample/src/LoginDialog.js
layerhq/layer-js-sampleapps
import React, { Component } from 'react'; import { StyleSheet, View, Modal, Text, TouchableOpacity, Image, TextInput } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; export default class LoginDialog extends Component { constructor(props) { super(props); this.email = null; this.password = null; this.state = { selectedUserId: 0, } } login() { window.layerSample.email = this.email; window.layerSample.password = this.password; this.props.onLogin(); } render() { return ( <View style={styles.container}> <Image style={styles.logoImage} source={{uri: 'http://static.layer.com/logo-only-blue.png'}} resizeMode='contain' /> <Text style={styles.welcomeText}>Welcome to Layer Sample App!</Text> <Text style={styles.inputLabel}>Email</Text> <TextInput style={styles.input} onChangeText={(text) => this.email = text} value={this.state.text} autoCapitalize='none' autoCorrect={false} returnKeyType='done' /> <Text style={styles.inputLabel}>Password</Text> <TextInput style={styles.input} onChangeText={(text) => this.password = text} value={this.state.text} autoCapitalize='none' autoCorrect={false} returnKeyType='done' secureTextEntry={true} /> <TouchableOpacity style={styles.loginButton} onPress={this.login.bind(this)} activeOpacity={.5} > <Text style={styles.loginButtonText}>LOGIN</Text> </TouchableOpacity> </View> ) } } const styles = StyleSheet.create({ container: { backgroundColor: 'white', margin: 20, padding: 20, borderRadius: 25 }, logoImage: { width: 32, height: 32, alignSelf: 'center', marginBottom: 10 }, welcomeText: { alignSelf: 'center', fontFamily: 'System', fontSize: 20, textAlign: 'center', color: '#404F59', width: 200, marginBottom: 40 }, input: { height: 30, backgroundColor: '#fafbfc', borderWidth: 1, borderColor: '#e4e9ec', borderRadius: 5, marginBottom: 10 }, inputLabel: { fontFamily: 'System', fontSize: 14, color: '#404F59', marginBottom: 5 }, loginButton: { backgroundColor: '#27A6E1', borderRadius: 6, paddingVertical: 10, marginTop: 40 }, loginButtonText: { fontFamily: 'System', fontSize: 14, fontWeight: 'bold', color: 'white', textAlign: 'center' } });
packages/mineral-ui-icons/src/IconDomain.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconDomain(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProps}> <g> <path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/> </g> </Icon> ); } IconDomain.displayName = 'IconDomain'; IconDomain.category = 'social';
core/src/plugins/gui.ajax/res/js/ui/HOCs/animations/make-staggered.js
ChuckDaniels87/pydio-core
/** * Copyright (c) 2013-present, Facebook, Inc. All rights reserved. * * This file provided by Facebook is for non-commercial testing and evaluation * purposes only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import React from 'react'; import ReactDOM from 'react-dom'; import shallowCompare from 'react/lib/shallowCompare'; import { StaggeredMotion } from 'react-motion'; import stripStyle from 'react-motion/lib/stripStyle'; import {springify, buildTransform} from './utils'; let counter=0 const DEFAULT_ANIMATION={stiffness: 200, damping: 22, precision: 0.1} const makeStaggered = (originStyles, targetStyles, animation) => { return (Target) => { class StaggeredGroup extends React.PureComponent { constructor(props) { super(props) this.state = { styles: this.buildStyles(props) } } componentWillReceiveProps(nextProps) { this.setState({ styles: this.buildStyles(nextProps) }); } buildStyles(props) { return React.Children .toArray(props.children) .filter(child => child) // Removing null values .map(child => { return originStyles }); } getStyles(prevStyles) { const endValue = React.Children .toArray(this.props.children) .filter(child => child) // Removing null values .map((_, i) => { return !this.props.ready ? originStyles : i === 0 ? springify(targetStyles, animation || DEFAULT_ANIMATION) : prevStyles[i - 1] ? springify(prevStyles[i - 1], animation || DEFAULT_ANIMATION) : originStyles }) return endValue; } render() { // Making sure we fliter out properties const {ready, ...props} = this.props return ( <StaggeredMotion defaultStyles={this.state.styles} styles={(styles) => this.getStyles(styles)} > {styles => <Target {...props}> {React.Children.toArray(props.children).filter(child => child).map((Child, i) => { let style = styles[i] || {} const itemProps = Child.props const transform = buildTransform(style, { length: 'px', angle: 'deg' }); return React.cloneElement(Child, {style: { ...itemProps.style, ...style, transform, transition: "none" }}) })} </Target> } </StaggeredMotion> ); } } StaggeredGroup.propTypes = { ready: React.PropTypes.bool.isRequired } StaggeredGroup.defaultProps = { ready: true } return StaggeredGroup } } export default makeStaggered;
src/parser/druid/balance/CONFIG.js
sMteX/WoWAnalyzer
import React from 'react'; import { Gebuz } from 'CONTRIBUTORS'; import retryingPromise from 'common/retryingPromise'; import SPECS from 'game/SPECS'; import CHANGELOG from './CHANGELOG'; export default { // The people that have contributed to this spec recently. People don't have to sign up to be long-time maintainers to be included in this list. If someone built a large part of the spec or contributed something recently to that spec, they can be added to the contributors list. If someone goes MIA, they may be removed after major changes or during a new expansion. contributors: [Gebuz], // The WoW client patch this spec was last updated to be fully compatible with. patchCompatibility: '8.0.1', // If set to false`, the spec will show up as unsupported. isSupported: true, // Explain the status of this spec's analysis here. Try to mention how complete it is, and perhaps show links to places users can learn more. // If this spec's analysis does not show a complete picture please mention this in the `<Warning>` component. description: ( <> Hello Moonkins! This tool is intended to show major statistics and potential issues in your rotation. Please mind that it can always be improved upon, so if you see anything that you disagree with or think is missing please let us know!<br /><br /> As a rule of thumb: Never overcap Astral Power, don't overcap empowerments and keep your dots up on the target(s) at all times. Remember to pool Astral Power prior to movement.<br /><br /> If you want to learn more about how to play Moonkin, visit <a href="https://discordapp.com/invite/0dWu0WkuetF87H9H" target="_blank" rel="noopener noreferrer">DreamGrove, the Druid's Discord</a> or <a href="https://dreamgrove.gg/" target="_blank" rel="noopener noreferrer">DreamGrove.gg</a>. </> ), // A recent example report to see interesting parts of the spec. Will be shown on the homepage. exampleReport: '/report/TGzmk4bXDZJndpj7/6-Heroic+Opulence+-+Kill+(8:12)/2-Chushpajz', // Don't change anything below this line; // The current spec identifier. This is the only place (in code) that specifies which spec this parser is about. spec: SPECS.BALANCE_DRUID, // The contents of your changelog. changelog: CHANGELOG, // The CombatLogParser class for your spec. parser: () => retryingPromise(() => import('./CombatLogParser' /* webpackChunkName: "BalanceDruid" */).then(exports => exports.default)), // The path to the current directory (relative form project root). This is used for generating a GitHub link directly to your spec's code. path: __dirname, };
src/js/visuals/App.js
CT-Data-Collaborative/edi-v2
import React, { Component } from 'react'; import StackedBarChart from './components/StackedBar'; import EdiMap from './components/Maps'; import Select from 'react-select'; class App extends Component { constructor(props) { super(props); const mainElement = document.getElementById('main'); this.state = { mapData: window.data.domain_map_data, vulData: window.data.vulnerable_map_data, chartData: window.data.chart_data, domainColors: window.domainColorScale, vulColors: window.vulnerableColorScale, selectedMapData: 'language', selectedVulMapData: 'vulnerable_one', city: window.city, height: mainElement.clientHeight, width: mainElement.clientWidth } this.updateSelected = this.updateSelected.bind(this); this.updateVulSelected = this.updateVulSelected.bind(this); } updateSelected(val) { this.setState({'selectedMapData': val.value}); } updateVulSelected(val) { this.setState({'selectedVulMapData': val.value}); } render() { let choices = Object.keys(this.state.mapData); const dropdownChoices = choices.map((c) => { return { value: c, label: this.state.mapData[c].label } }); let vulChoices = Object.keys(this.state.vulData); const vulDropdownChoices = vulChoices.map((c) => { return { value: c, label: this.state.vulData[c].label } }); const selectedVulMap = this.state.selectedVulMapData; const vulData = this.state.vulData[selectedVulMap]; const selectedMapData = this.state.selectedMapData; const mapData = this.state.mapData[selectedMapData]; const mapWidth = this.state.width > 850 ? '800px' : this.state.width*.9 + 'px'; return ( <div style={{paddingTop: '20px'}}> <h1>Visualize the results for {this.state.city}</h1> <p>The Early Development Instrument (EDI) looks at five domains that cover the academic, social, physical, and emotional development children need to thrive and be ready for school:</p> <ul> <li>Physical Health & Well-being</li> <li>Social Competence</li> <li>Emotional Maturity</li> <li>Language & Cognitive Development</li> <li>Communication Skills & General Knowledge</li> </ul> <p>Explore results in the following <a href="#maps">maps</a> and <a href="#charts">charts</a>.</p> <h4 id="maps">Maps</h4> <p>The following maps display the results for each neighborhood (census tract). The first map displays the results by domains. Use the dropdown menu to change which domain is displayed. Click on a neighborhood to see the displayed values. The second map displays the results by the % of children vulnerable on one domain or vulnerable on one or more domains. A student is considered vulnerable if their score is in the lowest 10th percentile of results.</p> <h5>Select Neighborhood EDI Results by Domain</h5> <Select name="map-data-select" value={selectedMapData} options={dropdownChoices} onChange={this.updateSelected} style={{width: mapWidth}} /> <EdiMap geojson={window.geojson} data={mapData} colors={this.state.domainColors} width={mapWidth}/> <hr style={{width: mapWidth, textAlign: "left", marginLeft: 0}}/> <h5>View Neighborhoods Where Kids are Vulnerable</h5> <Select name="vul-map-data-select" value={selectedVulMap} options={vulDropdownChoices} onChange={this.updateVulSelected} style={{width: mapWidth}} /> <EdiMap geojson={window.geojson} data={vulData} colors={this.state.vulColors} width={mapWidth}/> <hr/> <h4 id="charts">Charts</h4> <StackedBarChart chartTitle="Who is considered vulnerable?" data={this.state.chartData.vulnerable.data} columns={this.state.chartData.vulnerable.columns} open={true} dataKey="geography" width={this.state.width} /> <StackedBarChart chartTitle={this.state.chartData.physical.label} intro={this.state.chartData.physical.intro} findings={this.state.chartData.physical.findings} data={this.state.chartData.physical.components} columns={this.state.chartData.physical.columns} open={false} dataKey="component" width={this.state.width} /> <StackedBarChart chartTitle={this.state.chartData.emotional.label} intro={this.state.chartData.emotional.intro} findings={this.state.chartData.emotional.findings} data={this.state.chartData.emotional.components} columns={this.state.chartData.emotional.columns} open={false} dataKey="component" width={this.state.width} /> <StackedBarChart chartTitle={this.state.chartData.social.label} intro={this.state.chartData.social.intro} findings={this.state.chartData.social.findings} data={this.state.chartData.social.components} columns={this.state.chartData.social.columns} open={false} dataKey="component" width={this.state.width} /> <StackedBarChart chartTitle={this.state.chartData.language.label} intro={this.state.chartData.language.intro} findings={this.state.chartData.language.findings} data={this.state.chartData.language.components} columns={this.state.chartData.language.columns} open={false} dataKey="component" width={this.state.width} /> <StackedBarChart chartTitle={this.state.chartData.communication.label} intro={this.state.chartData.communication.intro} findings={this.state.chartData.communication.findings} data={this.state.chartData.communication.components} columns={this.state.chartData.communication.columns} open={false} dataKey="component" width={this.state.width} /> </div> ); } } export default App;
src/js/components/icons/base/SocialGithub.js
odedre/grommet-final
/** * @description SocialGithub SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor. * @property {xsmall|small|medium|large|xlarge|huge} size - The icon size. Defaults to small. * @property {boolean} responsive - Allows you to redefine what the coordinates. * @example * <svg width="24" height="24" ><path d="M11.9989871,1 C5.92550416,1 1,5.92482888 1,12.0003376 C1,16.8603395 4.15153934,20.9829338 8.52263728,22.4374904 C9.0729918,22.5387827 9.27355045,22.199116 9.27355045,21.9073943 C9.27355045,21.6467356 9.2640965,20.954572 9.25869425,20.0368642 C6.19899322,20.7013414 5.55342398,18.5620492 5.55342398,18.5620492 C5.0530403,17.2911692 4.33183953,16.9528531 4.33183953,16.9528531 C3.33309801,16.2708186 4.40747107,16.2843243 4.40747107,16.2843243 C5.51155652,16.3619816 6.09229872,17.4181221 6.09229872,17.4181221 C7.07348292,19.0988981 8.66714755,18.6133706 9.2938089,18.3317781 C9.39375058,17.6213819 9.67804414,17.1365297 9.99205009,16.86169 C7.54955646,16.5841493 4.98146045,15.6401056 4.98146045,11.4249977 C4.98146045,10.224347 5.41026428,9.24181221 6.11390773,8.47334172 C6.00046042,8.19512569 5.62297799,7.07618404 6.22195279,5.56220265 C6.22195279,5.56220265 7.14506277,5.26642929 9.24653918,6.68992296 C10.12373,6.44547101 11.0650726,6.32392032 12.0003376,6.31919335 C12.9349274,6.32392032 13.8755947,6.44547101 14.7541361,6.68992296 C16.8542619,5.26642929 17.7760214,5.56220265 17.7760214,5.56220265 C18.3763467,7.07618404 17.9988643,8.19512569 17.8860923,8.47334172 C18.5910863,9.24181221 19.0165137,10.224347 19.0165137,11.4249977 C19.0165137,15.6509101 16.444366,16.5807729 13.9944443,16.8529114 C14.3888087,17.192578 14.7406305,17.863808 14.7406305,18.890236 C14.7406305,20.3603241 14.7271248,21.5467939 14.7271248,21.9073943 C14.7271248,22.2018171 14.9256576,22.5441849 15.4834403,22.4368151 C19.8511618,20.9788821 23,16.8589889 23,12.0003376 C23,5.92482888 18.0744958,1 11.9989871,1" stroke="none"/></svg> */ // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Props'; const CLASS_ROOT = CSSClassnames.CONTROL_ICON; const COLOR_INDEX = CSSClassnames.COLOR_INDEX; export default class Icon extends Component { render () { const { className, colorIndex } = this.props; let { a11yTitle, size, responsive } = this.props; let { intl } = this.context; const classes = classnames( CLASS_ROOT, `${CLASS_ROOT}-social-github`, className, { [`${CLASS_ROOT}--${size}`]: size, [`${CLASS_ROOT}--responsive`]: responsive, [`${COLOR_INDEX}-${colorIndex}`]: colorIndex } ); a11yTitle = a11yTitle || Intl.getMessage(intl, 'social-github'); const restProps = Props.omit(this.props, Object.keys(Icon.propTypes)); return <svg {...restProps} version="1.1" viewBox="0 0 24 24" width="24px" height="24px" role="img" className={classes} aria-label={a11yTitle}><path fill="#333" fillRule="evenodd" d="M11.9989871,1 C5.92550416,1 1,5.92482888 1,12.0003376 C1,16.8603395 4.15153934,20.9829338 8.52263728,22.4374904 C9.0729918,22.5387827 9.27355045,22.199116 9.27355045,21.9073943 C9.27355045,21.6467356 9.2640965,20.954572 9.25869425,20.0368642 C6.19899322,20.7013414 5.55342398,18.5620492 5.55342398,18.5620492 C5.0530403,17.2911692 4.33183953,16.9528531 4.33183953,16.9528531 C3.33309801,16.2708186 4.40747107,16.2843243 4.40747107,16.2843243 C5.51155652,16.3619816 6.09229872,17.4181221 6.09229872,17.4181221 C7.07348292,19.0988981 8.66714755,18.6133706 9.2938089,18.3317781 C9.39375058,17.6213819 9.67804414,17.1365297 9.99205009,16.86169 C7.54955646,16.5841493 4.98146045,15.6401056 4.98146045,11.4249977 C4.98146045,10.224347 5.41026428,9.24181221 6.11390773,8.47334172 C6.00046042,8.19512569 5.62297799,7.07618404 6.22195279,5.56220265 C6.22195279,5.56220265 7.14506277,5.26642929 9.24653918,6.68992296 C10.12373,6.44547101 11.0650726,6.32392032 12.0003376,6.31919335 C12.9349274,6.32392032 13.8755947,6.44547101 14.7541361,6.68992296 C16.8542619,5.26642929 17.7760214,5.56220265 17.7760214,5.56220265 C18.3763467,7.07618404 17.9988643,8.19512569 17.8860923,8.47334172 C18.5910863,9.24181221 19.0165137,10.224347 19.0165137,11.4249977 C19.0165137,15.6509101 16.444366,16.5807729 13.9944443,16.8529114 C14.3888087,17.192578 14.7406305,17.863808 14.7406305,18.890236 C14.7406305,20.3603241 14.7271248,21.5467939 14.7271248,21.9073943 C14.7271248,22.2018171 14.9256576,22.5441849 15.4834403,22.4368151 C19.8511618,20.9788821 23,16.8589889 23,12.0003376 C23,5.92482888 18.0744958,1 11.9989871,1" stroke="none"/></svg>; } }; Icon.contextTypes = { intl: PropTypes.object }; Icon.defaultProps = { responsive: true }; Icon.displayName = 'SocialGithub'; Icon.icon = true; Icon.propTypes = { a11yTitle: PropTypes.string, colorIndex: PropTypes.string, size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'huge']), responsive: PropTypes.bool };
stories/Tooltip/Core/index.js
skyiea/wix-style-react
import React from 'react'; import {storiesOf} from '@storybook/react'; import Markdown from '../../utils/Components/Markdown'; import CodeExample from '../../utils/Components/CodeExample'; import Readme from '../../../src/Tooltip/README.md'; import ExamplePlacement from './ExamplePlacement'; import ExamplePlacementRaw from '!raw-loader!./ExamplePlacement'; import ExampleBounce from './ExampleBounce'; import ExampleBounceRaw from '!raw-loader!./ExampleBounce'; import ExampleTheme from './ExampleTheme'; import ExampleThemeRaw from '!raw-loader!./ExampleTheme'; import ExampleCustomContent from './ExampleCustomContent'; import ExampleCustomContentRaw from '!raw-loader!./ExampleCustomContent'; import ExampleMove from './ExampleMove'; import ExampleMoveRaw from '!raw-loader!./ExampleMove'; storiesOf('Core', module) .add('Tooltip', () => ( <div> <Markdown source={Readme}/> <CodeExample title="Tooltip Placement" code={ExamplePlacementRaw}> <ExamplePlacement/> </CodeExample> <CodeExample title="Tooltip Bounce" code={ExampleBounceRaw}> <ExampleBounce/> </CodeExample> <CodeExample title="Tooltip Theme" code={ExampleThemeRaw}> <ExampleTheme/> </CodeExample> <CodeExample title="Tooltip Custom Content" code={ExampleCustomContentRaw}> <ExampleCustomContent/> </CodeExample> <CodeExample title="Custom tooltip adjustment" code={ExampleMoveRaw}> <ExampleMove/> </CodeExample> </div> ));
client/modules/App/__tests__/Components/Footer.spec.js
aksm/refactored-palm-tree
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import { Footer } from '../../components/Footer/Footer'; test('renders the footer properly', t => { const wrapper = shallow( <Footer /> ); t.is(wrapper.find('p').length, 2); t.is(wrapper.find('p').first().text(), '© 2016 · Hashnode · LinearBytes Inc.'); });
src/components/Layout.js
douglascorrea/react-hot-redux-firebase-starter
import React from 'react'; import Header from './common/Header'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {signOut} from '../actions/authActions'; class Layout extends React.Component { constructor(props, context) { super(props, context); } render() { const {auth, actions, loading, user} = this.props; return ( <div className="container-fluid"> <Header signOut={actions.signOut} auth={auth} loading={loading} user={user} /> {this.props.children} </div> ); } } Layout.propTypes = { children: React.PropTypes.object, actions: React.PropTypes.object.isRequired, auth: React.PropTypes.object.isRequired, user: React.PropTypes.object.isRequired, loading: React.PropTypes.bool.isRequired }; function mapStateToProps(state, ownProps) { return { auth: state.auth, user: state.user, loading: state.ajaxCallsInProgress > 0 }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({signOut}, dispatch) }; } export default connect(mapStateToProps, mapDispatchToProps)(Layout);
src/routes/employee/index.js
uptive/react-starter-kit
import React from 'react'; import Employee from './Employee'; export default { path: '/employee/:id', async action(context) { return { title: 'Employee', component: <Employee id={ context.params.id } />, }; }, };
crowdpact/static/js/apps/landing/components/LandingHeader.js
joshmarlow/crowdpact
import debounce from 'lodash/function/debounce'; import React from 'react'; import LandingActions from '../actions/LandingActions'; class LandingHeader extends React.Component { constructor(...args) { super(...args); this.onClickLogin = this.onClickLogin.bind(this); this.onSearch = debounce(this.onSearch.bind(this), 400); } render() { return ( <div className="landing-header"> <div className="container"> <div className="landing-title"> <a href="/">CrowdPact</a> </div> <div className="landing-search"> <input onChange={this.onSearch} placeholder="Find pacts" type="text" /> </div> <div className="landing-buttons"> <button onClick={this.onClickLogin}>{this.getButtonText()}</button> </div> </div> </div> ); } onSearch() { console.log('onSearch'); } onClickLogin() { LandingActions.toggleShowLogin() } getButtonText() { return this.props.data.get('showLogin') ? 'Signup' : 'Login'; } } export default LandingHeader;
rojak-ui-web/src/app/kit/SocialMedia.js
CodeRiderz/rojak
import React from 'react' import { Link } from 'react-router' import styles from './SocialMedia.css' class SocialMedia extends React.Component { static propTypes = { instagram: React.PropTypes.string, twitter: React.PropTypes.string, facebook: React.PropTypes.string, style: React.PropTypes.object } render () { const { instagram, twitter, facebook, style } = this.props return ( <div className={styles.socialMedia} style={style}> <Link to={`//instagram.com/${instagram}`} target="_blank" className={`ion-social-instagram-outline ${styles.socialIcon}`} /> <Link to={`//twitter.com/${twitter}`} target="_blank" className={`ion-social-twitter-outline ${styles.socialIcon}`} /> <Link to={`//facebook.com/${facebook}`} target="_blank" className={`ion-social-facebook-outline ${styles.socialIcon}`} /> </div> ) } } export default SocialMedia
examples/counter/index.js
jquense/redux
import React from 'react'; import App from './containers/App'; React.render( <App />, document.getElementById('root') );
app/app/index.js
natecavanaugh/github-pulls
import React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import routes from './routes'; import configureStore from './store/configureStore'; import {loginSuccess, loginComplete} from './actions/login'; import {loadConfig} from './actions/config'; import {updateCheck} from './actions/update'; import settings from './utils/settings'; import { Router, hashHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; const electron = require('electron'); const currentVersion = electron.ipcRenderer.sendSync('currentVersion'); import './scss/main.scss'; const store = configureStore( { currentVersion } ); let {username, token, avatar, lastUpdateCheck} = settings.load(); const history = syncHistoryWithStore(hashHistory, store); if (username && token) { store.dispatch(loginSuccess(username, token)); store.dispatch(loginComplete(avatar)); store.dispatch(loadConfig(username)); store.dispatch(updateCheck(lastUpdateCheck)); } if (process.env.NODE_ENV === 'development') { var windowConfig = { height: window.screen.availHeight, width: 800 }; windowConfig.width = Math.min(1400, window.screen.availWidth); window.resizeTo(windowConfig.width, windowConfig.height); } render( <Provider store={store}> <Router history={history} routes={routes} /> </Provider>, document.getElementById('root') );
frontend/src/index.js
rayyildiz/twitter-streaming
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
website/Home.js
sahat/boilerplate
import haikunate from 'haikunator'; import React from 'react'; import Header from './Header'; import Footer from './Footer'; import Platform from './sections/Platform'; import StaticSiteGenerator from './sections/StaticSiteGenerator'; import JsLibrary from './sections/JsLibrary'; import Framework from './sections/Framework'; import TemplateEngine from './sections/TemplateEngine'; import CssFramework from './sections/CssFramework'; import CssPreprocessor from './sections/CssPreprocessor'; import BuildTool from './sections/BuildTool'; import Testing from './sections/Testing' import Database from './sections/Database'; import Authentication from './sections/Authentication'; import JsFramework from './sections/JsFramework'; import Deployment from './sections/Deployment'; import NextSteps from './sections/NextSteps'; import { VelocityComponent } from 'velocity-react'; class Home extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.handleGenerateLibraryName = this.handleGenerateLibraryName.bind(this); this.handleDisableAutoScroll = this.handleDisableAutoScroll.bind(this); this.clickDownload = this.clickDownload.bind(this); this.state = {}; } componentDidMount() { // require it here to avoid "window is not defined" error during server-side rendering const swal = require('sweetalert'); try { const disableAutoScroll = localStorage.getItem('disableAutoScroll'); this.setState({ beginner: false, disableAutoScroll: disableAutoScroll === 'true', copyClipboardText: 'Copy to clipboard', isDownloadLoading: false }); } catch (e) { console.warn(e); } } clickDownload(options = {}) { const state = this.state; if (!state.platform) { console.info('Please select a platform.'); return this.setState({ platformValidationError: 'Please select a platform.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'html5' && !state.staticSiteGenerator) { console.info('Please select a static site generator.'); return this.setState({ staticSiteGeneratorValidationError: 'Please select a static site generator.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'library' && !state.jsLibraryName) { console.info('Please enter a library name.'); return this.setState({ jsLibraryValidationError: 'Please enter a library name.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.framework) { console.info('Please select a framework.'); return this.setState({ frameworkValidationError: 'Please select a framework.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.cssFramework) { console.info('Please select a CSS framework.'); return this.setState({ cssFrameworkValidationError: 'Please select a CSS framework.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.cssPreprocessor) { console.info('Please select a CSS preprocessor.'); return this.setState({ cssPreprocessorValidationError: 'Please select a CSS preprocessor.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.jsFramework) { console.info('Please make a selection.'); return this.setState({ jsFrameworkValidationError: 'Please make a selection.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.templateEngine && state.jsFramework !== 'angularjs') { console.info('Please select a template engine.'); return this.setState({ templateEngineValidationError: 'Please select a template engine.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && state.jsFramework !== 'none' && !state.buildTool) { console.info('Please select a build tool.'); return this.setState({ buildToolValidationError: 'Please select a build tool.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.testing) { console.info('Please select a testing framework.'); return this.setState({ testingValidationError: 'Please select a testing framework.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.database) { console.info('Please select a database.'); return this.setState({ databaseValidationError: 'Please select a database.', generateDownloadLinkInProgress: false }); } else if (state.platform === 'node' && !state.authentication && state.database !== 'none') { console.info('Please check all that apply.'); return this.setState({ authenticationValidationError: 'Please check all that apply.', generateDownloadLinkInProgress: false }); } // Show download button spinner if (!options.generateDownloadLink) { this.setState({ isDownloadLoading: true }); } // Show next steps component this.setState({ showNextSteps: true }); if (!state.disableAutoScroll) { if (options.generateDownloadLink) { $(this.refs.download).velocity('scroll'); } else { $(this.refs.nextSteps).velocity('scroll'); } } const data = Object.assign({}, state); data.appName = haikunate({ tokenLength: 0 }); if (data.jsFramework === 'none') { data.jsFramework = null; } if (options.generateDownloadLink) { data.generateDownloadLink = true; } // Convert ES6 set to array data.authentication = data.authentication ? Array.from(data.authentication) : []; data.frameworkOptions = data.frameworkOptions ? Array.from(data.frameworkOptions) : []; data.cssPreprocessorOptions = data.cssPreprocessorOptions ? Array.from(data.cssPreprocessorOptions) : []; data.reactOptions = data.reactOptions ? Array.from(data.reactOptions) : []; data.jsLibraryOptions = data.jsLibraryOptions ? Array.from(data.jsLibraryOptions) : []; ga('send', 'event', 'Mega Boilerplate', 'Download', 'Downloads'); if (options.generateDownloadLink) { ga('send', 'event', 'Mega Boilerplate', 'Download', 'Generated Links'); $.ajax({ url: '/download', method: 'POST', contentType: 'application/json; charset=utf-8', data: JSON.stringify(data) }).done((response, status, request) => { this.setState({ downloadLinkInputValue: response.link, generateDownloadLinkSuccess: true, generateDownloadLinkInProgress: false }); $(this.refs.downloadLinkInput).focus(); }).fail((jqXHR) => { this.setState({ generateDownloadLinkSuccess: false, generateDownloadLinkInProgress: false }); const title = encodeURIComponent(jqXHR.responseJSON.message); const body = encodeURIComponent('\n##### :boom: Error Stack Trace\n' + '\`\`\`js\n' + jqXHR.responseJSON.stack + '\n\`\`\`'); swal({ title: 'Server Error', text: `${jqXHR.responseJSON.message}<br><strong><a href='https://github.com/sahat/megaboilerplate/issues/new?title=${title}&body=${body}' target="_blank">Report a bug</a></strong>`, type: 'error', html: true }); }); } else { $.ajax({ url: '/download', method: 'POST', contentType: 'application/json; charset=utf-8', data: JSON.stringify(data) }).done((response, status, request) => { const disp = request.getResponseHeader('Content-Disposition'); if (disp && disp.search('attachment') !== -1) { this.setState({ isDownloadLoading: false }); const form = $('<form method="POST" action="/download">'); $.each(data, (k, v) => { if (v) { form.append($(`<input type="hidden" name="${k}" value="${v}">`)); } }); $('body').append(form); form.submit(); } }).fail((jqXHR) => { const title = encodeURIComponent(jqXHR.responseJSON.message); const body = encodeURIComponent('\n##### :boom: Error Stack Trace\n' + '\`\`\`js\n' + jqXHR.responseJSON.stack + '\n\`\`\`'); swal({ title: 'Server Error', text: `${jqXHR.responseJSON.message}<br><strong><a href='https://github.com/sahat/megaboilerplate/issues/new?title=${title}&body=${body}' target="_blank">Report a bug</a></strong>`, type: 'error', html: true }); this.setState({ isDownloadLoading: false }); }); } } handleGenerateLibraryName() { const newState = Object.assign({}, this.state); newState.jsLibraryName = haikunate({ tokenLength: 0 }); newState.jsLibraryValidationError = null; this.setState(newState); } handleChange(event) { const name = event.target.name; const value = event.target.value; const isChecked = event.target.checked; const state = Object.assign({}, this.state); const refs = this.refs; switch (name) { case 'beginner': state.beginner = isChecked; if (isChecked) { ga('send', 'event', 'Mega Boilerplate', 'Site Options', 'Beginner'); } break; case 'platformRadios': const whitelist = ['beginner', 'disableAutoScroll', 'copyClipboardText', 'isDownloadLoading']; for (const key in state) { if (state.hasOwnProperty(key)) { if (whitelist.indexOf(key) === -1) { state[key] = null; } } } ga('send', 'event', 'Mega Boilerplate', 'Platform', value); state.platform = value; if (!state.disableAutoScroll) { $(refs.platform).velocity('scroll'); } state.platformValidationError = null; break; case 'staticSiteGeneratorRadios': if (!state.staticSiteGenerator && !state.disableAutoScroll) { $(refs.staticSiteGenerator).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Static Site', value); state.staticSiteGenerator = value; state.staticSiteGeneratorValidationError = null; break; case 'jsLibraryOptionsCheckboxes': state.jsLibraryOptions = state.jsLibraryOptions || new Set(); if (isChecked) { state.jsLibraryOptions.add(value); ga('send', 'event', 'Mega Boilerplate', 'JS Library', value); } else { state.jsLibraryOptions.delete(value); } break; case 'jsLibraryName': state.jsLibraryName = value; state.jsLibraryValidationError = null; break; case 'jsLibraryAuthor': state.jsLibraryAuthor = value; break; case 'jsLibraryGithubUsername': state.jsLibraryGithubUsername = value; break; case 'jsLibraryLicenseRadios': state.jsLibraryLicense = value; ga('send', 'event', 'Mega Boilerplate', 'JS Library', value); break; case 'frameworkRadios': if (!state.framework && !state.disableAutoScroll) { $(refs.framework).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Framework', value); state.framework = value; state.frameworkValidationError = null; break; case 'frameworkOptionsCheckboxes': state.frameworkOptions = state.frameworkOptions || new Set(); if (isChecked) { state.frameworkOptions.add(value); ga('send', 'event', 'Mega Boilerplate', 'Framework', value); } else { state.frameworkOptions.delete(value); } break; case 'templateEngineRadios': if (!state.templateEngine && !state.disableAutoScroll) { $(refs.templateEngine).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Template Engine', value); state.templateEngine = value; state.templateEngineValidationError = null; break; case 'cssFrameworkRadios': if (!state.cssFramework && !state.disableAutoScroll) { $(refs.cssFramework).velocity('scroll'); } if (state.cssPreprocessor) { state.cssPreprocessor = null; } ga('send', 'event', 'Mega Boilerplate', 'CSS Framework', value); state.cssFramework = value; state.cssFrameworkValidationError = null; break; case 'cssPreprocessorRadios': if (!state.cssPreprocessor && !state.disableAutoScroll) { $(refs.cssPreprocessor).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'CSS Preprocessor', value); state.cssPreprocessor = value; state.cssPreprocessorValidationError = null; state.buildTool = null; break; case 'cssPreprocessorOptionsCheckboxes': state.cssPreprocessorOptions = state.cssPreprocessorOptions || new Set(); if (isChecked) { state.cssPreprocessorOptions.add(value); ga('send', 'event', 'Mega Boilerplate', 'CSS Preprocessor', value); } else { state.cssPreprocessorOptions.delete(value); } break; case 'jsFrameworkRadios': if (!state.jsFramework && !state.disableAutoScroll) { $(refs.jsFramework).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'JS Framework', value); state.jsFramework = value; state.jsFrameworkValidationError = null; state.testing = null; state.buildTool = null; break; case 'reactOptionsCheckboxes': state.reactOptions = state.reactOptions || new Set(); if (isChecked) { state.reactOptions.add(value); ga('send', 'event', 'Mega Boilerplate', 'JS Framework', value); } else { state.reactOptions.delete(value); } break; case 'buildToolRadios': if (!state.buildTool && !state.disableAutoScroll) { $(refs.buildTool).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Build Tool', value); state.buildTool = value; state.buildToolValidationError = null; break; case 'testingRadios': if (!state.testing && !state.disableAutoScroll) { $(refs.testing).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Testing', value); state.testing = value; state.testingValidationError = null; break; case 'databaseRadios': if (!state.database && !state.disableAutoScroll) { $(refs.database).velocity('scroll'); } if (value === 'none' && state.authentication) { state.authentication.clear(); } ga('send', 'event', 'Mega Boilerplate', 'Database', value); state.database = value; state.authenticationValidationError = null; state.databaseValidationError = null; break; case 'authenticationCheckboxes': state.authentication = state.authentication || new Set(); const requiresEmail = ( state.authentication.has('facebook') || state.authentication.has('google') || state.authentication.has('twitter') || state.authentication.has('github') ); if (isChecked) { ga('send', 'event', 'Mega Boilerplate', 'Authentication', value); if (value === 'none') { state.authentication.clear(); } else { state.authentication.add(value); if (value === 'facebook' || value === 'google' || value === 'twitter' || value === 'github') { state.authentication.add('email'); } } state.authenticationValidationError = null; } else { if (value === 'email' && requiresEmail) { return; } state.authentication.delete(value); } break; case 'deploymentRadios': if (!state.deployment && !state.disableAutoScroll) { $(refs.deployment).velocity('scroll'); } ga('send', 'event', 'Mega Boilerplate', 'Deployment', value); state.deployment = value; break; default: // Handle default case } // reset download link state state.generateDownloadLinkSuccess = false; this.setState(state); } handleDisableAutoScroll(event) { if (event.target.checked) { ga('send', 'event', 'Mega Boilerplate', 'Site Options', 'Disable Auto-Scroll'); } this.setState({ disableAutoScroll: event.target.checked }); try { localStorage.setItem('disableAutoScroll', event.target.checked); } catch (e) { console.warn(e); } } handleGenerateDownloadLink(event) { event.preventDefault(); this.setState({ generateDownloadLinkInProgress: true }); this.clickDownload({ generateDownloadLink: true }); } handleClickDownloadLink(event) { const input = this.refs.downloadLinkInput; $(input).focus(); input.setSelectionRange(0, 9999); } copyDownloadLink(event) { const input = this.refs.downloadLinkInput; // select all text in the input $(input).focus(); input.setSelectionRange(0, 9999); try { document.execCommand('copy'); this.setState({ copyClipboardText: 'Copied!' }); } catch (e) { this.setState({ copyClipboardText: 'Press ⌘ + C to copy' }); console.warn('Copy to clipboard is not supported in Safari.') } } copyDownloadLinkMouseOut() { setTimeout(() => { this.setState({ copyClipboardText: 'Copy to clipboard' }); }, 300) } render() { const state = this.state; const settingsCheckboxes = ( <ul className="list-inline list-unstyled clearfix"> <li> <div className="checkbox"> <label> <input type="checkbox" name="beginner" value="beginner" onChange={this.handleChange} checked={state.beginner}/> <span>Beginner</span> </label> </div> </li> <li> <div className="checkbox"> <label> <input type="checkbox" name="disableAutoScroll" value="disableAutoScroll" onChange={this.handleDisableAutoScroll} checked={state.disableAutoScroll}/> <span>Disable auto-scroll</span> </label> </div> </li> <li className="pull-right"> <div className="checkbox"> <a href="https://www.codementor.io/sahatyalkabov?utm_source=github&utm_medium=button&utm_term=sahatyalkabov&utm_campaign=github" target="_blank"><img src="https://cdn.codementor.io/badges/book_session_github.svg" alt="Book session on Codementor"/></a> </div> </li> </ul> ); const platform = ( <Platform {...state} handleChange={this.handleChange}/> ); const staticSiteGenerator = state.platform === 'html5' ? ( <StaticSiteGenerator {...state} handleChange={this.handleChange}/> ) : null; const jsLibrary = state.platform === 'library' ? ( <JsLibrary {...state} handleChange={this.handleChange} handleGenerateLibraryName={this.handleGenerateLibraryName}/> ) : null; const framework = state.platform === 'node' ? ( <Framework {...state} handleChange={this.handleChange}/> ) : null; const cssFramework = state.framework ? ( <CssFramework {...state} handleChange={this.handleChange}/> ) : null; const cssPreprocessor = state.cssFramework ? ( <CssPreprocessor {...state} handleChange={this.handleChange}/> ) : null; const jsFramework = state.cssPreprocessor && state.platform === 'node' ? ( <JsFramework {...state} handleChange={this.handleChange}/> ) : null; const templateEngine = state.jsFramework && state.jsFramework !== 'angularjs' ? ( <TemplateEngine {...state} handleChange={this.handleChange}/> ) : null; const buildTool = (state.jsFramework || (state.jsFramework && state.cssPreprocessor)) && state.platform === 'node' ? ( <BuildTool {...state} handleChange={this.handleChange}/> ) : null; const testing = (state.buildTool || state.cssPreprocessor === 'css' && state.jsFramework === 'none') && state.platform === 'node' ? ( <Testing {...state} handleChange={this.handleChange}/> ) : null; const database = state.testing ? ( <Database {...state} handleChange={this.handleChange}/> ) : null; const authentication = state.database ? ( <Authentication {...state} handleChange={this.handleChange}/> ) : null; const deployment = (state.authentication || state.database === 'none') ? ( <Deployment {...state} handleChange={this.handleChange}/> ) : null; let generateDownloadLink; const loadingSvgColor = state.isDownloadLoading ? '#fff' : '#000'; const loadingSvg = ( <svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="28px" height="28px" viewBox="0 0 40 40"> <path opacity="0.2" fill={loadingSvgColor} d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"/> <path fill={loadingSvgColor} d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z"> <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="0.5s" repeatCount="indefinite"/> </path> </svg> ); if (this.state.generateDownloadLinkSuccess) { generateDownloadLink = ( <div className="row"> <div className="col-sm-8 col-sm-offset-2"> <div className="input-group"> <input type="text" ref="downloadLinkInput" onClick={this.handleClickDownloadLink.bind(this)} className="form-control" defaultValue={state.downloadLinkInputValue} readOnly/> <span className="input-group-btn"> <button onClick={this.copyDownloadLink.bind(this)} onMouseOut={this.copyDownloadLinkMouseOut.bind(this)} className="btn btn-default hint--bottom hint--rounded" type="button" data-hint={this.state.copyClipboardText}> <img className="clipboard" src="https://megaboilerplate.blob.core.windows.net/megaboilerplate/img/svg/clippy.svg" width="13" alt="Copy to clipboard"/> </button> </span> </div> <p className="small text-muted text-right">This link will stay active for 24 hours</p> </div> <br/> </div> ); } else if (this.state.generateDownloadLinkInProgress) { generateDownloadLink = ( <div className="text-center"> <div className="loader"> {loadingSvg} <span>Please wait...</span> </div> </div> ); } else { generateDownloadLink = ( <div> <p onClick={this.handleGenerateDownloadLink.bind(this)} className="text-center">or <a href="#" type="button">Generate Download Link</a></p> </div> ); } const downloadText = state.isDownloadLoading ? loadingSvg : ( <span><i className="fa fa-download"></i> Compile and Download</span> ); const download = state.deployment || state.staticSiteGenerator || state.platform === 'library' || state.platform === 'electron' ? ( <div> <button ref="downloadBtn" className="btn btn-block btn-mega btn-success" onClick={this.clickDownload}>{downloadText}</button> {generateDownloadLink} </div> ) : null; const nextSteps = state.showNextSteps ? ( <NextSteps {...state}/> ) : null; return ( <div ref="wrapper"> <Header /> <main className="container"> {settingsCheckboxes} <div ref="platform">{platform}</div> <div ref="framework">{framework}</div> <div ref="staticSiteGenerator">{staticSiteGenerator}</div> <div ref="jsLibrary">{jsLibrary}</div> <div ref="cssFramework">{cssFramework}</div> <div ref="cssPreprocessor">{cssPreprocessor}</div> <div ref="jsFramework">{jsFramework}</div> <div ref="templateEngine">{templateEngine}</div> <div ref="buildTool">{buildTool}</div> <div ref="testing">{testing}</div> <div ref="database">{database}</div> <div ref="authentication">{authentication}</div> <div ref="deployment">{deployment}</div> <div ref="download">{download}</div> <div ref="nextSteps">{nextSteps}</div> </main> <Footer /> <div className="modal" id="demosModal" tabIndex="-1" role="dialog"> <div className="modal-dialog" role="document"> <div className="modal-content"> <div className="modal-header"> <button type="button" className="close" data-dismiss="modal"><span aria-hidden="true">&times;</span> </button> <h4 className="modal-title" id="myModalLabel"><i className="fa fa-globe"></i> Live Demos</h4> </div> <div className="modal-body"> <a href="http://megaboilerplate-demo1.azurewebsites.net/" className="demo-container demo1" target="_blank"> <p><span><strong>Demo 1</strong> - Traditional Express web app</span> <img src="https://megaboilerplate.blob.core.windows.net/megaboilerplate/img/svg/recommended.svg" alt="Recommended"/> </p> <span className="text-normal">Node - Jade - Bootstrap - Sass - Mocha - MongoBD - Facebook - Google - Twitter - VK</span> </a> <a href="http://megaboilerplate-demo2.azurewebsites.net/" className="demo-container demo2" target="_blank"> <p><span><strong>Demo 2</strong> - MEAN stack</span></p> <span className="text-normal">Node - Handlebars - Foundation - AngularJS - Gulp - Jasmine - MongoDB - Facebook - Google</span> </a> <a href="http://megaboilerplate-demo3.azurewebsites.net/ " className="demo-container demo3" target="_blank"> <p><span><strong>Demo 3</strong> - Full-stack React app (unstyled)</span></p> <span className="text-normal">Node - Nunjucks - CSSNext - PostCSS - React - Webpack - Mocha - SQLite - Twitter</span> </a> <a href="https://github.com/sahat/megaboilerplate/tree/master/examples/jekyll#mega-boilerplate-jekyll-blog-example" className="demo-container demo4" target="_blank"> <p><span><strong>Demo 4</strong> - Jekyll blo</span>g</p> <span className="text-normal">Ruby - Jekyll</span> </a> <a href="https://github.com/sahat/megaboilerplate/tree/master/examples/middleman#mega-boilerplate-middleman-site-example" className="demo-container demo5" target="_blank"> <p><span><strong>Demo 5</strong> - Middleman static site</span></p> <span className="text-normal">Ruby - Middleman</span> </a> </div> </div> </div> </div> </div> ); } } export default Home;
src/Parser/Druid/Guardian/Modules/Sets/Tier21_2P.js
hasseboulen/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import SpellUsable from 'Parser/Core/Modules/SpellUsable'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import SPELLS from 'common/SPELLS'; // Formats a number to display in seconds with millisecond precision, but remove trailing zeros if applicable function formatTimer(timeInMs) { return Number((timeInMs / 1000).toFixed(3)); } class Tier21_2P extends Analyzer { static dependencies = { combatants: Combatants, spellUsable: SpellUsable, }; BARKSKIN_REDUCTION_MS = 1000; _totalReductionMs = 0; get totalReductionMs() { return this._totalReductionMs; } on_initialized() { this.active = this.combatants.selected.hasBuff(SPELLS.GUARDIAN_TIER_21_2P_SET_BONUS.id); } on_byPlayer_cast(event) { const spellId = event.ability.guid; if (spellId === SPELLS.MANGLE_BEAR.id) { const hasGoreBuff = this.combatants.selected.hasBuff(SPELLS.GORE_BEAR.id); const isOnCooldown = this.spellUsable.isOnCooldown(SPELLS.BARKSKIN.id); if (hasGoreBuff && isOnCooldown) { this._totalReductionMs += this.spellUsable.reduceCooldown(SPELLS.BARKSKIN.id, this.BARKSKIN_REDUCTION_MS); } } } item() { return { id: `spell-${SPELLS.GUARDIAN_TIER_21_2P_SET_BONUS.id}`, icon: <SpellIcon id={SPELLS.BARKSKIN.id} />, title: <SpellLink id={SPELLS.GUARDIAN_TIER_21_2P_SET_BONUS.id} />, result: `Total reduction: ${formatTimer(this.totalReductionMs)} seconds`, }; } } export default Tier21_2P;
src/@ui/Icon/icons/LeafSolid.js
NewSpring/Apollos
import React from 'react'; import PropTypes from 'prop-types'; import { Svg } from '../../Svg'; import makeIcon from './makeIcon'; const Icon = makeIcon(({ size = 32, fill, ...otherProps } = {}) => ( <Svg width={size} height={size} viewBox="0 0 24 24" {...otherProps}> <Svg.Path d="M12 22C5.2 22 2 17.52 2 12S6.48 2 12 2s10 3.33 10 10v10H12" fill={fill} /> </Svg> )); Icon.propTypes = { size: PropTypes.number, fill: PropTypes.string, }; export default Icon;
index.ios.js
lukewalt/buzzpoint
'use strict'; import React, { Component } from 'react'; import { AppRegistry, Text, View, NavigatorIOS, } from 'react-native'; import styles from './styles/styles' import LoginRegister from './components/signInRegister' import Rating from './components/rating' export default class buzzpoint extends Component { constructor(){ super(); this.state = { loggedIn: true } } render() { return ( <NavigatorIOS initialRoute={{ component: this.state.loggedIn ? Rating : LoginRegister, title: '', translucent: false, shadowHidden: true, passProps: { loggedIn: this.state.loggedIn } }} style={{flex: 1}} /> ) } } AppRegistry.registerComponent('buzzpoint', () => buzzpoint);
components/Icon/Icon.js
iest/loggins
import React, { Component } from 'react'; import invariant from 'invariant'; import styles from './Icon.css'; import icons from './icons'; export default class Icon extends Component { constructor(props) { super(props); invariant( icons[props.name], `Icon(): No icon exists for "${props.name}"` ); } render() { const css = [ styles.root, styles[this.props.name], this.props.className || '', ].join(' '); return ( <span {...this.props} className={css} dangerouslySetInnerHTML={{ __html: icons[this.props.name] }} /> ); } } Icon.propTypes = { name: React.PropTypes.string.isRequired, className: React.PropTypes.string, };
jqwidgets/jqwidgets-react/react_jqxwindow.js
UCF/IKM-APIM
/* jQWidgets v5.6.0 (2018-Feb) Copyright (c) 2011-2017 jQWidgets. License: https://jqwidgets.com/license/ */ import React from 'react'; const JQXLite = window.JQXLite; export const jqx = window.jqx; export default class JqxWindow extends React.Component { componentDidMount() { let options = this.manageAttributes(); this.createComponent(options); }; manageAttributes() { let properties = ['autoOpen','animationType','collapsed','collapseAnimationDuration','content','closeAnimationDuration','closeButtonSize','closeButtonAction','cancelButton','dragArea','draggable','disabled','height','initContent','isModal','keyboardCloseKey','keyboardNavigation','minHeight','maxHeight','minWidth','maxWidth','modalOpacity','modalZIndex','modalBackgroundZIndex','okButton','position','rtl','resizable','showAnimationDuration','showCloseButton','showCollapseButton','theme','title','width','zIndex']; let options = {}; for(let item in this.props) { if(item === 'settings') { for(let itemTwo in this.props[item]) { options[itemTwo] = this.props[item][itemTwo]; } } else { if(properties.indexOf(item) !== -1) { options[item] = this.props[item]; } } } return options; }; createComponent(options) { if(!this.style) { for (let style in this.props.style) { JQXLite(this.componentSelector).css(style, this.props.style[style]); } } if(this.props.className !== undefined) { let classes = this.props.className.split(' '); for (let i = 0; i < classes.length; i++ ) { JQXLite(this.componentSelector).addClass(classes[i]); } } if(!this.template) { JQXLite(this.componentSelector).html(this.props.template); } JQXLite(this.componentSelector).jqxWindow(options); }; setOptions(options) { JQXLite(this.componentSelector).jqxWindow('setOptions', options); }; getOptions() { if(arguments.length === 0) { throw Error('At least one argument expected in getOptions()!'); } let resultToReturn = {}; for(let i = 0; i < arguments.length; i++) { resultToReturn[arguments[i]] = JQXLite(this.componentSelector).jqxWindow(arguments[i]); } return resultToReturn; }; on(name,callbackFn) { JQXLite(this.componentSelector).on(name,callbackFn); }; off(name) { JQXLite(this.componentSelector).off(name); }; autoOpen(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('autoOpen', arg) } else { return JQXLite(this.componentSelector).jqxWindow('autoOpen'); } }; animationType(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('animationType', arg) } else { return JQXLite(this.componentSelector).jqxWindow('animationType'); } }; collapsed(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('collapsed', arg) } else { return JQXLite(this.componentSelector).jqxWindow('collapsed'); } }; collapseAnimationDuration(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('collapseAnimationDuration', arg) } else { return JQXLite(this.componentSelector).jqxWindow('collapseAnimationDuration'); } }; content(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('content', arg) } else { return JQXLite(this.componentSelector).jqxWindow('content'); } }; closeAnimationDuration(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('closeAnimationDuration', arg) } else { return JQXLite(this.componentSelector).jqxWindow('closeAnimationDuration'); } }; closeButtonSize(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('closeButtonSize', arg) } else { return JQXLite(this.componentSelector).jqxWindow('closeButtonSize'); } }; closeButtonAction(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('closeButtonAction', arg) } else { return JQXLite(this.componentSelector).jqxWindow('closeButtonAction'); } }; cancelButton(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('cancelButton', arg) } else { return JQXLite(this.componentSelector).jqxWindow('cancelButton'); } }; dragArea(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('dragArea', arg) } else { return JQXLite(this.componentSelector).jqxWindow('dragArea'); } }; draggable(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('draggable', arg) } else { return JQXLite(this.componentSelector).jqxWindow('draggable'); } }; disabled(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('disabled', arg) } else { return JQXLite(this.componentSelector).jqxWindow('disabled'); } }; height(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('height', arg) } else { return JQXLite(this.componentSelector).jqxWindow('height'); } }; initContent(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('initContent', arg) } else { return JQXLite(this.componentSelector).jqxWindow('initContent'); } }; isModal(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('isModal', arg) } else { return JQXLite(this.componentSelector).jqxWindow('isModal'); } }; keyboardCloseKey(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('keyboardCloseKey', arg) } else { return JQXLite(this.componentSelector).jqxWindow('keyboardCloseKey'); } }; keyboardNavigation(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('keyboardNavigation', arg) } else { return JQXLite(this.componentSelector).jqxWindow('keyboardNavigation'); } }; minHeight(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('minHeight', arg) } else { return JQXLite(this.componentSelector).jqxWindow('minHeight'); } }; maxHeight(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('maxHeight', arg) } else { return JQXLite(this.componentSelector).jqxWindow('maxHeight'); } }; minWidth(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('minWidth', arg) } else { return JQXLite(this.componentSelector).jqxWindow('minWidth'); } }; maxWidth(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('maxWidth', arg) } else { return JQXLite(this.componentSelector).jqxWindow('maxWidth'); } }; modalOpacity(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('modalOpacity', arg) } else { return JQXLite(this.componentSelector).jqxWindow('modalOpacity'); } }; modalZIndex(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('modalZIndex', arg) } else { return JQXLite(this.componentSelector).jqxWindow('modalZIndex'); } }; modalBackgroundZIndex(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('modalBackgroundZIndex', arg) } else { return JQXLite(this.componentSelector).jqxWindow('modalBackgroundZIndex'); } }; okButton(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('okButton', arg) } else { return JQXLite(this.componentSelector).jqxWindow('okButton'); } }; position(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('position', arg) } else { return JQXLite(this.componentSelector).jqxWindow('position'); } }; rtl(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('rtl', arg) } else { return JQXLite(this.componentSelector).jqxWindow('rtl'); } }; resizable(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('resizable', arg) } else { return JQXLite(this.componentSelector).jqxWindow('resizable'); } }; showAnimationDuration(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('showAnimationDuration', arg) } else { return JQXLite(this.componentSelector).jqxWindow('showAnimationDuration'); } }; showCloseButton(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('showCloseButton', arg) } else { return JQXLite(this.componentSelector).jqxWindow('showCloseButton'); } }; showCollapseButton(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('showCollapseButton', arg) } else { return JQXLite(this.componentSelector).jqxWindow('showCollapseButton'); } }; theme(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('theme', arg) } else { return JQXLite(this.componentSelector).jqxWindow('theme'); } }; title(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('title', arg) } else { return JQXLite(this.componentSelector).jqxWindow('title'); } }; width(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('width', arg) } else { return JQXLite(this.componentSelector).jqxWindow('width'); } }; zIndex(arg) { if (arg !== undefined) { JQXLite(this.componentSelector).jqxWindow('zIndex', arg) } else { return JQXLite(this.componentSelector).jqxWindow('zIndex'); } }; bringToFront() { JQXLite(this.componentSelector).jqxWindow('bringToFront'); }; close() { JQXLite(this.componentSelector).jqxWindow('close'); }; collapse() { JQXLite(this.componentSelector).jqxWindow('collapse'); }; closeAll() { JQXLite(this.componentSelector).jqxWindow('closeAll'); }; disable() { JQXLite(this.componentSelector).jqxWindow('disable'); }; destroy() { JQXLite(this.componentSelector).jqxWindow('destroy'); }; enable() { JQXLite(this.componentSelector).jqxWindow('enable'); }; expand() { JQXLite(this.componentSelector).jqxWindow('expand'); }; focus() { JQXLite(this.componentSelector).jqxWindow('focus'); }; isOpen() { return JQXLite(this.componentSelector).jqxWindow('isOpen'); }; move(top, left) { JQXLite(this.componentSelector).jqxWindow('move', top, left); }; open() { JQXLite(this.componentSelector).jqxWindow('open'); }; hide() { JQXLite(this.componentSelector).jqxWindow('hide'); }; resize(top, left) { JQXLite(this.componentSelector).jqxWindow('resize', top, left); }; setTitle(title) { JQXLite(this.componentSelector).jqxWindow('setTitle', title); }; setContent(content) { JQXLite(this.componentSelector).jqxWindow('setContent', content); }; render() { let id = 'jqxWindow' + JQXLite.generateID(); this.componentSelector = '#' + id; return ( <div id={id}>{this.props.value}{this.props.children}</div> ) }; };
src/components/d3components/Node.js
nbuechler/studious-display
import React from 'react'; import ReactDOM from 'react-dom'; import d3 from 'd3'; import _ from 'underscore'; export default class Node extends React.Component { constructor (props) { super(props); this.state = { }; } _handleOver(d) { var shifter = 30; // This gets the whole tooltip away from the node var forceTipDOM = ReactDOM.findDOMNode(this).parentElement.parentElement.children[3]; //DOM Element //These transformations apply to each case forceTipDOM.children[1].innerHTML = d.nodeType.charAt(0).toUpperCase() + d.nodeType.slice(1); forceTipDOM.children[0].setAttribute('visibility', 'visible'); forceTipDOM.children[1].setAttribute('visibility', 'visible'); switch (d.nodeType) { case 'log': // Change Rectangle Element forceTipDOM.children[0].setAttribute('x', d.cx + shifter); forceTipDOM.children[0].setAttribute('y', d.cy + shifter); forceTipDOM.children[0].setAttribute('width', 60); // Change Text Title forceTipDOM.children[1].setAttribute('x', d.cx + 20 + shifter); forceTipDOM.children[1].setAttribute('y', d.cy + 30 + shifter); // Pie Variables var nodePiePaths = forceTipDOM.children[2].children[0].children; //piePaths var nodePieData = [d.physicArrayLength, d.emotionArrayLength, d.academicArrayLength, d.communeArrayLength, d.etherArrayLength]; //data var nodePie = d3.layout.pie()(nodePieData); //pie layout var arcGen = d3.svg.arc() //arcGeneration of pie slices paths .innerRadius(25 * 0.0) .outerRadius(25 * 0.9); // Change MiniPieChart Element forceTipDOM.children[2].setAttribute('visibility', 'visible'); forceTipDOM.children[2].setAttribute('x', d.cx + 5); forceTipDOM.children[2].setAttribute('y', d.cy + 5); forceTipDOM.children[2].setAttribute('visibility', 'visible'); nodePiePaths[0].setAttribute('d', arcGen(nodePie[0])); nodePiePaths[1].setAttribute('d', arcGen(nodePie[1])); nodePiePaths[2].setAttribute('d', arcGen(nodePie[2])); nodePiePaths[3].setAttribute('d', arcGen(nodePie[3])); nodePiePaths[4].setAttribute('d', arcGen(nodePie[4])); break; case 'word': // Change Rectangle Element forceTipDOM.children[0].setAttribute('x', d.cx + shifter); forceTipDOM.children[0].setAttribute('y', d.cy + shifter); forceTipDOM.children[0].setAttribute('width', 100); // Change Text Title forceTipDOM.children[1].setAttribute('x', d.cx + 20 + shifter); forceTipDOM.children[1].setAttribute('y', d.cy + 30 + shifter); forceTipDOM.children[1].innerHTML += '(' + d.characters + ')'; break; case 'experience': // Change Rectangle Element forceTipDOM.children[0].setAttribute('x', d.cx + shifter); forceTipDOM.children[0].setAttribute('y', d.cy + shifter); forceTipDOM.children[0].setAttribute('width', 113); // Change Text Title forceTipDOM.children[1].setAttribute('x', d.cx + 20 + shifter); forceTipDOM.children[1].setAttribute('y', d.cy + 30 + shifter); break; case 'activity': // Change Rectangle Element forceTipDOM.children[0].setAttribute('x', d.cx + shifter); forceTipDOM.children[0].setAttribute('y', d.cy + shifter); forceTipDOM.children[0].setAttribute('width', 93); // Change Text Title forceTipDOM.children[1].setAttribute('x', d.cx + 20 + shifter); forceTipDOM.children[1].setAttribute('y', d.cy + 30 + shifter); break; default: break; } } _handleOut(d) { var forceTipDOM = ReactDOM.findDOMNode(this).parentElement.parentElement.children[3]; // Change Rectangle Element forceTipDOM.children[0].setAttribute('visibility', 'hidden'); // Change Text Title forceTipDOM.children[1].setAttribute('visibility', 'hidden'); switch (d.nodeType) { case 'log': // Change MiniPieChart Element forceTipDOM.children[2].setAttribute('visibility', 'hidden'); break; case 'word': break; case 'experience': break; case 'activity': break; default: break; } } render () { var node = ''; var nodeColor = '#111'; if (this.props.privacy) { nodeColor = 'white'; } switch (this.props.nodeType) { case 'log': //draw a log node node = <circle fill={nodeColor} r={this.props.r + 'px'} cx={this.props.cx} cy={this.props.cy} stroke={nodeColor} style={{strokeWidth: '3px'}} onMouseOver={this._handleOver.bind(this, this.props)} onMouseOut={this._handleOut.bind(this, this.props)} /> break; case 'word': //draw a word node node = <circle fill={this.props.fillColor} r={this.props.r * ('.' + this.props.characters) + 'px'} cx={this.props.cx} cy={this.props.cy} stroke={this.props.stroke} style={{strokeWidth: '3px'}} onMouseOver={this._handleOver.bind(this, this.props)} onMouseOut={this._handleOut.bind(this, this.props)} /> break; case 'experience': //draw a word node node = <circle fill={nodeColor} r={this.props.r + 'px'} cx={this.props.cx} cy={this.props.cy} stroke={nodeColor} style={{strokeWidth: '3px'}} onMouseOver={this._handleOver.bind(this, this.props)} onMouseOut={this._handleOut.bind(this, this.props)} /> break; case 'activity': //draw a word node node = <circle fill={nodeColor} r={this.props.r + 'px'} cx={this.props.cx} cy={this.props.cy} stroke={'red'} style={{strokeWidth: '3px'}} onMouseOver={this._handleOver.bind(this, this.props)} onMouseOut={this._handleOut.bind(this, this.props)} /> break; default: break; } return ( node ); } }
demo/component/TextDemo.js
sdoomz/recharts
import React, { Component } from 'react'; import { Text } from 'recharts'; class TextDemo extends Component { state = { exampleText: 'This is really long text', x: 0, y: 0, width: 300, height: 200, angle: 0, scaleToFit: false, textAnchor: 'start', verticalAnchor: 'start', fontSize: '1em', fontFamily: 'Arial', lineHeight: '1em', showAnchor: true, resizeSvg: true, }; render() { const styles = { exampleText: { width: 200, }, range: { marginLeft: 25, width: 275, }, svg: { height: 200, display: 'block', border: '1px solid #aaa', marginBottom: 10, }, }; return ( <div> <h2>Demo</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={this.state.x} y={this.state.y} width={this.state.width} textAnchor={this.state.textAnchor} verticalAnchor={this.state.verticalAnchor} lineHeight={this.state.lineHeight} scaleToFit={this.state.scaleToFit} angle={this.state.angle} style={{ fontSize: this.state.fontSize, fontFamily: this.state.fontFamily }} > {this.state.exampleText} </Text> { this.state.showAnchor && <circle cx={this.state.x} cy={this.state.y} r="2" fill="red" /> } </svg> <div> text: <input type="text" style={styles.exampleText} value={this.state.exampleText} onChange={e => this.setState({ exampleText: e.target.value })} /> </div> <div> x: <input type="text" value={this.state.x} onChange={e => this.setState({ x: Number(e.target.value) })} /> y: <input type="text" value={this.state.y} onChange={e => this.setState({ y: Number(e.target.value) })} /> </div> <div> width: <input type="range" style={styles.range} min="25" max="300" value={this.state.width} onChange={e => this.setState({ width: Number(e.target.value) })} /> {this.state.width} </div> <div> textAnchor: <label> <input type="radio" value="start" onChange={e => this.setState({ textAnchor: e.target.value })} checked={this.state.textAnchor === 'start'} /> start </label> <label> <input type="radio" value="middle" onChange={e => this.setState({ textAnchor: e.target.value })} checked={this.state.textAnchor === 'middle'} /> middle </label> <label> <input type="radio" value="end" onChange={e => this.setState({ textAnchor: e.target.value })} checked={this.state.textAnchor === 'end'} /> end </label> </div> <div> verticalAnchor: <label> <input type="radio" value="start" onChange={e => this.setState({ verticalAnchor: e.target.value })} checked={this.state.verticalAnchor === 'start'} /> start </label> <label> <input type="radio" value="middle" onChange={e => this.setState({ verticalAnchor: e.target.value })} checked={this.state.verticalAnchor === 'middle'} /> middle </label> <label> <input type="radio" value="end" onChange={e => this.setState({ verticalAnchor: e.target.value })} checked={this.state.verticalAnchor === 'end'} /> end </label> </div> <div> fontSize: <input type="text" value={this.state.fontSize} onChange={e => this.setState({ fontSize: e.target.value })} /> </div> <div> fontFamily: <input type="text" value={this.state.fontFamily} onChange={e => this.setState({ fontFamily: e.target.value })} /> </div> <div> lineHeight: <input type="text" value={this.state.lineHeight} onChange={e => this.setState({ lineHeight: e.target.value })} /> </div> <div> angle: <input type="range" min="0" max="360" value={this.state.angle} onChange={e => this.setState({ angle: Number(e.target.value) })} /> </div> <div> <label> scaleToFit: <input type="checkbox" onChange={e => this.setState({ scaleToFit: !this.state.scaleToFit })} checked={this.state.scaleToFit} /> </label> </div> <div> <label> show anchor: <input type="checkbox" onChange={e => this.setState({ showAnchor: !this.state.showAnchor })} checked={this.state.showAnchor} /> </label> </div> <div> <label> resize svg (container): <input type="checkbox" onChange={e => this.setState({ resizeSvg: !this.state.resizeSvg })} checked={this.state.resizeSvg} /> </label> </div> <hr /> <h2>Simple</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start"> {this.state.exampleText} </Text> </svg> <h2>Centered</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={this.state.width / 2} width={this.state.width} verticalAnchor="start" textAnchor="middle"> {this.state.exampleText} </Text> </svg> <h2>Right-aligned</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={this.state.width} width={this.state.width} verticalAnchor="start" textAnchor="end"> {this.state.exampleText} </Text> </svg> <h2>Line height</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" lineHeight="2em"> {this.state.exampleText} </Text> </svg> <h2>Styled text (fontWeight)</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" style={{ fontWeight: 900 }}> {this.state.exampleText} </Text> </svg> <h2>Styled (fontSize px)</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" style={{ fontSize: '24px' }}> {this.state.exampleText} </Text> </svg> <h2>Styled (fontSize em)</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" style={{ fontSize: '1.5em' }}> {this.state.exampleText} </Text> </svg> <h2>Styled (fontSize rem)</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" style={{ fontSize: '1.5rem' }}> {this.state.exampleText} </Text> </svg> <h2>Styled (fontSize %)</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text x={0} width={this.state.width} verticalAnchor="start" style={{ fontSize: '150%' }}> {this.state.exampleText} </Text> </svg> <h2>Fit</h2> <svg width={this.state.resizeSvg ? this.state.width : 300} style={styles.svg}> <Text width={this.state.width} verticalAnchor="start" scaleToFit> {this.state.exampleText} </Text> </svg> </div> ); } } export default TextDemo;
src/components/Feedback/Feedback.js
Batname/react-starter-kit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.less'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback { render() { return ( <div className="Feedback"> <div className="Feedback-container"> <a className="Feedback-link" href="https://gitter.im/kriasoft/react-starter-kit">Ask a question</a> <span className="Feedback-spacer">|</span> <a className="Feedback-link" href="https://github.com/kriasoft/react-starter-kit/issues/new">Report an issue</a> </div> </div> ); } } export default Feedback;
test/NavBrandSpec.js
pombredanne/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ReactDOM from 'react-dom'; import NavbarBrand from '../src/NavbarBrand'; describe('NavbarBrand', () => { it('Should create NavbarBrand SPAN element', () => { let instance = ReactTestUtils.renderIntoDocument( <NavbarBrand>Brand</NavbarBrand> ); let brand = ReactDOM.findDOMNode(instance); assert.equal(brand.nodeName, 'SPAN'); assert.ok(brand.className.match(/\bnavbar-brand\b/)); assert.equal(brand.innerText, 'Brand'); }); it('Should create NavbarBrand A (link) element', () => { let instance = ReactTestUtils.renderIntoDocument( <NavbarBrand><a href>BrandLink</a></NavbarBrand> ); let brand = ReactDOM.findDOMNode(instance); assert.equal(brand.nodeName, 'A'); assert.ok(brand.className.match(/\bnavbar-brand\b/)); assert.equal(brand.innerText, 'BrandLink'); }); });
examples/huge-apps/routes/Course/components/Course.js
kurayama/react-router
/*globals COURSES:true */ import React from 'react' import Dashboard from './Dashboard' import Nav from './Nav' const styles = {} styles.sidebar = { float: 'left', width: 200, padding: 20, borderRight: '1px solid #aaa', marginRight: 20 } class Course extends React.Component { render() { let { children, params } = this.props let course = COURSES[params.courseId] return ( <div> <h2>{course.name}</h2> <Nav course={course} /> {children && children.sidebar && children.main ? ( <div> <div className="Sidebar" style={styles.sidebar}> {children.sidebar} </div> <div className="Main" style={{ padding: 20 }}> {children.main} </div> </div> ) : ( <Dashboard /> )} </div> ) } } export default Course
src/svg-icons/notification/airline-seat-recline-normal.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatReclineNormal = (props) => ( <SvgIcon {...props}> <path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3zm14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5L20 20.07z"/> </SvgIcon> ); NotificationAirlineSeatReclineNormal = pure(NotificationAirlineSeatReclineNormal); NotificationAirlineSeatReclineNormal.displayName = 'NotificationAirlineSeatReclineNormal'; NotificationAirlineSeatReclineNormal.muiName = 'SvgIcon'; export default NotificationAirlineSeatReclineNormal;
actor-apps/app-web/src/app/components/dialog/TypingSection.react.js
ketoo/actor-platform
import React from 'react'; import { PureRenderMixin } from 'react/addons'; import classNames from 'classnames'; import DialogStore from 'stores/DialogStore'; export default React.createClass({ mixins: [PureRenderMixin], getInitialState() { return { typing: null, show: false }; }, componentDidMount() { DialogStore.addTypingListener(this.onTypingChange); }, componentWillUnmount() { DialogStore.removeTypingListener(this.onTypingChange); }, onTypingChange() { const typing = DialogStore.getSelectedDialogTyping(); if (typing === null) { this.setState({show: false}); } else { this.setState({typing: typing, show: true}); } }, render() { const typing = this.state.typing; const show = this.state.show; const typingClassName = classNames('typing', { 'typing--hidden': show === false }); return ( <div className={typingClassName}> <i className="material-icons">more_horiz</i> <span>{typing}</span> </div> ); } });
src/components/Developer/DeveloperList.js
iamraphson/mernmap
/** * Created by Raphson on 10/14/16. */ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router'; export default class DeveloperList extends Component { constructor() { super(); } render(){ return ( <div className="col-lg-2 col-md-3 col-sm-4 col-xs-5 team-profile"> <div style={{textAlign: 'center'}}> <Link to={ `/mern-developers/${this.props.developer.username}`}> <img height={150} width={150} alt={this.props.developer.fullname} src={this.props.developer.user_avi} /> </Link> </div> <div className="profile-name grid3">{this.props.developer.username}</div> <ul className="profile-social-icons"> <li> <a target="_blank" href={this.props.developer.twitter_handle || '#'}> <i className="fa fa-twitter-square" /> </a> </li> <div style={{display: 'inline-block', width: 10, height: 4}}></div> <li> <a target="_blank" href={this.props.developer.github_profile || '#'}> <i className="fa fa-github-square" /> </a> </li> </ul> </div> ); } }
tests/layouts/CoreLayout.spec.js
Havoc-Todo/havoc-web
import React from 'react' import TestUtils from 'react-addons-test-utils' import CoreLayout from 'layouts/CoreLayout/CoreLayout' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) return renderer.getRenderOutput() } function shallowRenderWithProps (props = {}) { return shallowRender(<CoreLayout {...props} />) } describe('(Layout) Core', function () { let _component let _props let _child beforeEach(function () { _child = <h1 className='child'>Child</h1> _props = { children : _child } _component = shallowRenderWithProps(_props) }) it('Should render as a <div>.', function () { expect(_component.type).to.equal('div') }) })
src/parser/warrior/fury/modules/spells/RampageCancelled.js
fyruna/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; const RAMPAGE_HITS_PER_CAST = 4; class RampageCancelled extends Analyzer { // Rampage is in fact 5 separate spells cast in this sequence rampage = [SPELLS.RAMPAGE_1.id, SPELLS.RAMPAGE_2.id, SPELLS.RAMPAGE_3.id, SPELLS.RAMPAGE_4.id]; counter = {}; constructor(...args) { super(...args); for (let i = 0; i < this.rampage.length; i++) { this.counter[this.rampage[i]] = 0; } } on_byPlayer_damage(event) { if (!this.rampage.includes(event.ability.guid)) { return; } this.counter[event.ability.guid] += 1; } get suggestionThresholdsFrothingBerserker() { return { isGreaterThan: { minor: 0, average: 0.02, major: 0.05, }, style: 'percentage', }; } suggestions(when) { const { isGreaterThan: { minor, average, major, }, } = this.suggestionThresholdsFrothingBerserker; const max = Object.values(this.counter).reduce((max, current) => current > max ? current : max, 0); const wasted = Object.keys(this.counter).reduce((acc, current) => acc + max - this.counter[current], 0); when(wasted / (max * RAMPAGE_HITS_PER_CAST)).isGreaterThan(minor) .addSuggestion((suggest, actual) => { return suggest(<>Your <SpellLink id={SPELLS.RAMPAGE.id} /> cast are being cancelled prematurely. Be sure to be facing the target within melee distance to avoid this.</>) .icon(SPELLS.RAMPAGE.icon) .actual(`${formatPercentage(actual)}% (${wasted} out of ${max * RAMPAGE_HITS_PER_CAST}) of your Rampage hits were cancelled.`) .recommended(`0% is recommended`) .regular(average).major(major); }); } } export default RampageCancelled;
todo-iflux-es6/assets/js/components/footer.react.js
hufeng/todomvc
import React from 'react'; import PureComponent from './pure-component'; /** * footer */ export default class Footer extends PureComponent { render() { console.log('footer rendering....'); return ( <footer id="info"> <p>Double-click to edit a todo</p> <p>Created by <a href="http://sindresorhus.com">Sindre Sorhus</a></p> <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> </footer> ); } }
src/svg-icons/maps/local-airport.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalAirport = (props) => ( <SvgIcon {...props}> <path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/> </SvgIcon> ); MapsLocalAirport = pure(MapsLocalAirport); MapsLocalAirport.displayName = 'MapsLocalAirport'; MapsLocalAirport.muiName = 'SvgIcon'; export default MapsLocalAirport;
docs/app/Examples/collections/Table/Variations/TableExampleColumnWidth.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Table } from 'semantic-ui-react' const TableExampleColumnWidth = () => { return ( <Table> <Table.Header> <Table.Row> <Table.HeaderCell width={10}>Name</Table.HeaderCell> <Table.HeaderCell width='six'>Status</Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> <Table.Row> <Table.Cell>John</Table.Cell> <Table.Cell>Approved</Table.Cell> </Table.Row> <Table.Row> <Table.Cell>Jamie</Table.Cell> <Table.Cell>Approved</Table.Cell> </Table.Row> <Table.Row> <Table.Cell>Jill</Table.Cell> <Table.Cell>Denied</Table.Cell> </Table.Row> </Table.Body> <Table.Footer> <Table.Row> <Table.HeaderCell>3 People</Table.HeaderCell> <Table.HeaderCell>2 Approved</Table.HeaderCell> </Table.Row> </Table.Footer> </Table> ) } export default TableExampleColumnWidth
example/__tests__/index.ios.js
hyb175/react-native-calendar
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/svg-icons/image/switch-video.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageSwitchVideo = (props) => ( <SvgIcon {...props}> <path d="M18 9.5V6c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3.5l4 4v-13l-4 4zm-5 6V13H7v2.5L3.5 12 7 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"/> </SvgIcon> ); ImageSwitchVideo = pure(ImageSwitchVideo); ImageSwitchVideo.displayName = 'ImageSwitchVideo'; ImageSwitchVideo.muiName = 'SvgIcon'; export default ImageSwitchVideo;
blueprints/dumb/files/__root__/components/__name__/__name__.js
nicolas-amabile/counter
import React from 'react' type Props = { }; export class <%= pascalEntityName %> extends React.Component { props: Props; render () { return ( <div></div> ) } } export default <%= pascalEntityName %>
stories/Popover.stories.js
reactstrap/reactstrap
import React from 'react'; export default { title: 'Components/Popover', parameters: { docs: { description: { component: '[Bootstrap Popovers](https://getbootstrap.com/docs/5.1/components/popovers/)' } } } }; export { default as Popover } from './examples/Popover'; export { default as Focus } from './examples/PopoverFocus'; export { default as Multi } from './examples/PopoverMulti'; export { default as Uncontrolled } from './examples/PopoverUncontrolled'; export { default as Update } from './examples/PopoverUpdate'; export { default as Props } from './examples/PopoverProps';
src/routes/Async/components/Async.js
janoist1/universal-react-redux-starter-kit
import React from 'react' import Helmet from 'react-helmet' import { resolve } from 'react-resolver' @resolve('fetchedData', function(props) { const { fetchData } = props return fetchData().then(action => action.payload) }) export class Async extends React.Component { render() { const { fetchedData } = this.props return ( <div> <Helmet title='Async' /> { JSON.stringify(fetchedData) } </div> ) } } Async.propTypes = { fetchData: React.PropTypes.func.isRequired } export default Async