박선진

remade from create-react-app for completely deleting unnecessary codes from template code

Showing 180 changed files with 352 additions and 17552 deletions
This diff could not be displayed because it is too large.
1 -module.exports = {
2 - "presets": [
3 - "react-app"
4 - ],
5 - "plugins": [
6 - "@babel/plugin-proposal-class-properties",
7 - "@babel/plugin-proposal-optional-chaining"
8 - ]
9 -};
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -const fs = require('fs');
4 -const path = require('path');
5 -const paths = require('./paths');
6 -
7 -// Make sure that including paths.js after env.js will read .env variables.
8 -delete require.cache[require.resolve('./paths')];
9 -
10 -const NODE_ENV = process.env.NODE_ENV;
11 -if (!NODE_ENV) {
12 - throw new Error(
13 - 'The NODE_ENV environment variable is required but was not specified.'
14 - );
15 -}
16 -
17 -// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
18 -var dotenvFiles = [
19 - `${paths.dotenv}.${NODE_ENV}.local`,
20 - `${paths.dotenv}.${NODE_ENV}`,
21 - // Don't include `.env.local` for `test` environment
22 - // since normally you expect tests to produce the same
23 - // results for everyone
24 - NODE_ENV !== 'test' && `${paths.dotenv}.local`,
25 - paths.dotenv,
26 -].filter(Boolean);
27 -
28 -// Load environment variables from .env* files. Suppress warnings using silent
29 -// if this file is missing. dotenv will never modify any environment variables
30 -// that have already been set. Variable expansion is supported in .env files.
31 -// https://github.com/motdotla/dotenv
32 -// https://github.com/motdotla/dotenv-expand
33 -dotenvFiles.forEach(dotenvFile => {
34 - if (fs.existsSync(dotenvFile)) {
35 - require('dotenv-expand')(
36 - require('dotenv').config({
37 - path: dotenvFile,
38 - })
39 - );
40 - }
41 -});
42 -
43 -// We support resolving modules according to `NODE_PATH`.
44 -// This lets you use absolute paths in imports inside large monorepos:
45 -// https://github.com/facebook/create-react-app/issues/253.
46 -// It works similar to `NODE_PATH` in Node itself:
47 -// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
48 -// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
49 -// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
50 -// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
51 -// We also resolve them to make sure all tools using them work consistently.
52 -const appDirectory = fs.realpathSync(process.cwd());
53 -process.env.NODE_PATH = (process.env.NODE_PATH || '')
54 - .split(path.delimiter)
55 - .filter(folder => folder && !path.isAbsolute(folder))
56 - .map(folder => path.resolve(appDirectory, folder))
57 - .join(path.delimiter);
58 -
59 -// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
60 -// injected into the application via DefinePlugin in Webpack configuration.
61 -const REACT_APP = /^REACT_APP_/i;
62 -
63 -function getClientEnvironment(publicUrl) {
64 - const raw = Object.keys(process.env)
65 - .filter(key => REACT_APP.test(key))
66 - .reduce(
67 - (env, key) => {
68 - env[key] = process.env[key];
69 - return env;
70 - },
71 - {
72 - // Useful for determining whether we’re running in production mode.
73 - // Most importantly, it switches React into the correct mode.
74 - NODE_ENV: process.env.NODE_ENV || 'development',
75 - // Useful for resolving the correct path to static assets in `public`.
76 - // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
77 - // This should only be used as an escape hatch. Normally you would put
78 - // images into the `src` and `import` them in code to get their paths.
79 - PUBLIC_URL: publicUrl,
80 - }
81 - );
82 - // Stringify all values so we can feed into Webpack DefinePlugin
83 - const stringified = {
84 - 'process.env': Object.keys(raw).reduce((env, key) => {
85 - env[key] = JSON.stringify(raw[key]);
86 - return env;
87 - }, {}),
88 - };
89 -
90 - return { raw, stringified };
91 -}
92 -
93 -module.exports = getClientEnvironment;
1 -'use strict';
2 -
3 -// This is a custom Jest transformer turning style imports into empty objects.
4 -// http://facebook.github.io/jest/docs/en/webpack.html
5 -
6 -module.exports = {
7 - process() {
8 - return 'module.exports = {};';
9 - },
10 - getCacheKey() {
11 - // The output is always the same.
12 - return 'cssTransform';
13 - },
14 -};
1 -'use strict';
2 -
3 -const path = require('path');
4 -
5 -// This is a custom Jest transformer turning file imports into filenames.
6 -// http://facebook.github.io/jest/docs/en/webpack.html
7 -
8 -module.exports = {
9 - process(src, filename) {
10 - const assetFilename = JSON.stringify(path.basename(filename));
11 -
12 - if (filename.match(/\.svg$/)) {
13 - return `module.exports = {
14 - __esModule: true,
15 - default: ${assetFilename},
16 - ReactComponent: (props) => ({
17 - $$typeof: Symbol.for('react.element'),
18 - type: 'svg',
19 - ref: null,
20 - key: null,
21 - props: Object.assign({}, props, {
22 - children: ${assetFilename}
23 - })
24 - }),
25 - };`;
26 - }
27 -
28 - return `module.exports = ${assetFilename};`;
29 - },
30 -};
1 -'use strict';
2 -
3 -const path = require('path');
4 -const fs = require('fs');
5 -const url = require('url');
6 -
7 -// Make sure any symlinks in the project folder are resolved:
8 -// https://github.com/facebook/create-react-app/issues/637
9 -const appDirectory = fs.realpathSync(process.cwd());
10 -const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
11 -
12 -const envPublicUrl = process.env.PUBLIC_URL;
13 -
14 -function ensureSlash(inputPath, needsSlash) {
15 - const hasSlash = inputPath.endsWith('/');
16 - if (hasSlash && !needsSlash) {
17 - return inputPath.substr(0, inputPath.length - 1);
18 - } else if (!hasSlash && needsSlash) {
19 - return `${inputPath}/`;
20 - } else {
21 - return inputPath;
22 - }
23 -}
24 -
25 -const getPublicUrl = appPackageJson =>
26 - envPublicUrl || require(appPackageJson).homepage;
27 -
28 -// We use `PUBLIC_URL` environment variable or "homepage" field to infer
29 -// "public path" at which the app is served.
30 -// Webpack needs to know it to put the right <script> hrefs into HTML even in
31 -// single-page apps that may serve index.html for nested URLs like /todos/42.
32 -// We can't use a relative path in HTML because we don't want to load something
33 -// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
34 -function getServedPath(appPackageJson) {
35 - const publicUrl = getPublicUrl(appPackageJson);
36 - const servedUrl =
37 - envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
38 - return ensureSlash(servedUrl, true);
39 -}
40 -
41 -// config after eject: we're in ./config/
42 -module.exports = {
43 - dotenv: resolveApp('.env'),
44 - appPath: resolveApp('.'),
45 - appBuild: resolveApp('build'),
46 - appPublic: resolveApp('public'),
47 - appHtml: resolveApp('public/index.html'),
48 - appIndexJs: resolveApp('src/index.js'),
49 - appPackageJson: resolveApp('package.json'),
50 - appSrc: resolveApp('src'),
51 - yarnLockFile: resolveApp('yarn.lock'),
52 - testsSetup: resolveApp('src/setupTests.js'),
53 - proxySetup: resolveApp('src/setupProxy.js'),
54 - appNodeModules: resolveApp('node_modules'),
55 - publicUrl: getPublicUrl(resolveApp('package.json')),
56 - servedPath: getServedPath(resolveApp('package.json')),
57 -};
1 -'use strict';
2 -
3 -const path = require('path');
4 -const webpack = require('webpack');
5 -const PnpWebpackPlugin = require('pnp-webpack-plugin');
6 -const HtmlWebpackPlugin = require('html-webpack-plugin');
7 -const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
8 -const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
9 -const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
10 -const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
11 -const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
12 -const getClientEnvironment = require('./env');
13 -const paths = require('./paths');
14 -const ManifestPlugin = require('webpack-manifest-plugin');
15 -const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
16 -
17 -
18 -// Webpack uses `publicPath` to determine where the app is being served from.
19 -// In development, we always serve from the root. This makes config easier.
20 -const publicPath = '/';
21 -// `publicUrl` is just like `publicPath`, but we will provide it to our app
22 -// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
23 -// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
24 -const publicUrl = '';
25 -// Get environment variables to inject into our app.
26 -const env = getClientEnvironment(publicUrl);
27 -
28 -// style files regexes
29 -const cssRegex = /\.css$/;
30 -const cssModuleRegex = /\.module\.css$/;
31 -const sassRegex = /\.(scss|sass)$/;
32 -const sassModuleRegex = /\.module\.(scss|sass)$/;
33 -
34 -// common function to get style loaders
35 -const getStyleLoaders = (cssOptions, preProcessor) => {
36 - const loaders = [
37 - require.resolve('style-loader'),
38 - {
39 - loader: require.resolve('css-loader'),
40 - options: cssOptions,
41 - },
42 - {
43 - // Options for PostCSS as we reference these options twice
44 - // Adds vendor prefixing based on your specified browser support in
45 - // package.json
46 - loader: require.resolve('postcss-loader'),
47 - options: {
48 - // Necessary for external CSS imports to work
49 - // https://github.com/facebook/create-react-app/issues/2677
50 - ident: 'postcss',
51 - plugins: () => [
52 - require('postcss-flexbugs-fixes'),
53 - require('postcss-preset-env')({
54 - autoprefixer: {
55 - flexbox: 'no-2009',
56 - },
57 - stage: 3,
58 - }),
59 - ],
60 - },
61 - },
62 - ];
63 - if (preProcessor) {
64 - loaders.push(require.resolve(preProcessor));
65 - }
66 - return loaders;
67 -};
68 -
69 -// This is the development configuration.
70 -// It is focused on developer experience and fast rebuilds.
71 -// The production configuration is different and lives in a separate file.
72 -module.exports = {
73 - mode: 'development',
74 - // You may want 'eval' instead if you prefer to see the compiled output in DevTools.
75 - // See the discussion in https://github.com/facebook/create-react-app/issues/343
76 - devtool: 'cheap-module-source-map',
77 - // These are the "entry points" to our application.
78 - // This means they will be the "root" imports that are included in JS bundle.
79 - entry: [
80 - // Include an alternative client for WebpackDevServer. A client's job is to
81 - // connect to WebpackDevServer by a socket and get notified about changes.
82 - // When you save a file, the client will either apply hot updates (in case
83 - // of CSS changes), or refresh the page (in case of JS changes). When you
84 - // make a syntax error, this client will display a syntax error overlay.
85 - // Note: instead of the default WebpackDevServer client, we use a custom one
86 - // to bring better experience for Create React App users. You can replace
87 - // the line below with these two lines if you prefer the stock client:
88 - // require.resolve('webpack-dev-server/client') + '?/',
89 - // require.resolve('webpack/hot/dev-server'),
90 - require.resolve('react-dev-utils/webpackHotDevClient'),
91 - // Finally, this is your app's code:
92 - paths.appIndexJs,
93 - // We include the app code last so that if there is a runtime error during
94 - // initialization, it doesn't blow up the WebpackDevServer client, and
95 - // changing JS code would still trigger a refresh.
96 - ],
97 - output: {
98 - // Add /* filename */ comments to generated require()s in the output.
99 - pathinfo: true,
100 - // This does not produce a real file. It's just the virtual path that is
101 - // served by WebpackDevServer in development. This is the JS bundle
102 - // containing code from all our entry points, and the Webpack runtime.
103 - filename: 'static/js/bundle.js',
104 - // There are also additional JS chunk files if you use code splitting.
105 - chunkFilename: 'static/js/[name].chunk.js',
106 - // This is the URL that app is served from. We use "/" in development.
107 - publicPath: publicPath,
108 - // Point sourcemap entries to original disk location (format as URL on Windows)
109 - devtoolModuleFilenameTemplate: info =>
110 - path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
111 - },
112 - optimization: {
113 - // Automatically split vendor and commons
114 - // https://twitter.com/wSokra/status/969633336732905474
115 - // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
116 - splitChunks: {
117 - chunks: 'all',
118 - name: false,
119 - },
120 - // Keep the runtime chunk seperated to enable long term caching
121 - // https://twitter.com/wSokra/status/969679223278505985
122 - runtimeChunk: true,
123 - },
124 - resolve: {
125 - // This allows you to set a fallback for where Webpack should look for modules.
126 - // We placed these paths second because we want `node_modules` to "win"
127 - // if there are any conflicts. This matches Node resolution mechanism.
128 - // https://github.com/facebook/create-react-app/issues/253
129 - modules: ['node_modules'].concat(
130 - // It is guaranteed to exist because we tweak it in `env.js`
131 - process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
132 - ),
133 - // These are the reasonable defaults supported by the Node ecosystem.
134 - // We also include JSX as a common component filename extension to support
135 - // some tools, although we do not recommend using it, see:
136 - // https://github.com/facebook/create-react-app/issues/290
137 - // `web` extension prefixes have been added for better support
138 - // for React Native Web.
139 - extensions: ['.mjs', '.web.js', '.js', '.json', '.web.jsx', '.jsx'],
140 - alias: {
141 - // Support React Native Web
142 - // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
143 - 'react-native': 'react-native-web',
144 - },
145 - plugins: [
146 - // Adds support for installing with Plug'n'Play, leading to faster installs and adding
147 - // guards against forgotten dependencies and such.
148 - PnpWebpackPlugin,
149 - // Prevents users from importing files from outside of src/ (or node_modules/).
150 - // This often causes confusion because we only process files within src/ with babel.
151 - // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
152 - // please link the files into your node_modules/ and let module-resolution kick in.
153 - // Make sure your source files are compiled, as they will not be processed in any way.
154 - new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
155 - ],
156 - },
157 - resolveLoader: {
158 - plugins: [
159 - // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
160 - // from the current package.
161 - PnpWebpackPlugin.moduleLoader(module),
162 - ],
163 - },
164 - module: {
165 - strictExportPresence: true,
166 - rules: [
167 - // Disable require.ensure as it's not a standard language feature.
168 - { parser: { requireEnsure: false } },
169 -
170 - // First, run the linter.
171 - // It's important to do this before Babel processes the JS.
172 - {
173 - test: /\.(js|mjs|jsx)$/,
174 - enforce: 'pre',
175 - use: [
176 - {
177 - options: {
178 - formatter: require.resolve('react-dev-utils/eslintFormatter'),
179 - eslintPath: require.resolve('eslint'),
180 -
181 - },
182 - loader: require.resolve('eslint-loader'),
183 - },
184 - ],
185 - include: paths.appSrc,
186 - },
187 - {
188 - // "oneOf" will traverse all following loaders until one will
189 - // match the requirements. When no loader matches it will fall
190 - // back to the "file" loader at the end of the loader list.
191 - oneOf: [
192 - // "url" loader works like "file" loader except that it embeds assets
193 - // smaller than specified limit in bytes as data URLs to avoid requests.
194 - // A missing `test` is equivalent to a match.
195 - {
196 - test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
197 - loader: require.resolve('url-loader'),
198 - options: {
199 - limit: 10000,
200 - name: 'static/media/[name].[ext]',
201 - },
202 - },
203 - // Process application JS with Babel.
204 - // The preset includes JSX, Flow, and some ESnext features.
205 - {
206 - test: /\.(js|mjs|jsx)$/,
207 - include: paths.appSrc,
208 - loader: require.resolve('babel-loader'),
209 - options: {
210 - customize: require.resolve(
211 - 'babel-preset-react-app/webpack-overrides'
212 - ),
213 -
214 - plugins: [
215 - [
216 - require.resolve('babel-plugin-named-asset-import'),
217 - {
218 - loaderMap: {
219 - svg: {
220 - ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
221 - },
222 - },
223 - },
224 - ],
225 - ],
226 - // This is a feature of `babel-loader` for webpack (not Babel itself).
227 - // It enables caching results in ./node_modules/.cache/babel-loader/
228 - // directory for faster rebuilds.
229 - cacheDirectory: true,
230 - // Don't waste time on Gzipping the cache
231 - cacheCompression: false,
232 - },
233 - },
234 - // Process any JS outside of the app with Babel.
235 - // Unlike the application JS, we only compile the standard ES features.
236 - {
237 - test: /\.(js|mjs)$/,
238 - exclude: /@babel(?:\/|\\{1,2})runtime/,
239 - loader: require.resolve('babel-loader'),
240 - options: {
241 - babelrc: false,
242 - configFile: false,
243 - compact: false,
244 - presets: [
245 - [
246 - require.resolve('babel-preset-react-app/dependencies'),
247 - { helpers: true },
248 - ],
249 - ],
250 - cacheDirectory: true,
251 - // Don't waste time on Gzipping the cache
252 - cacheCompression: false,
253 -
254 - // If an error happens in a package, it's possible to be
255 - // because it was compiled. Thus, we don't want the browser
256 - // debugger to show the original code. Instead, the code
257 - // being evaluated would be much more helpful.
258 - sourceMaps: false,
259 - },
260 - },
261 - // "postcss" loader applies autoprefixer to our CSS.
262 - // "css" loader resolves paths in CSS and adds assets as dependencies.
263 - // "style" loader turns CSS into JS modules that inject <style> tags.
264 - // In production, we use a plugin to extract that CSS to a file, but
265 - // in development "style" loader enables hot editing of CSS.
266 - // By default we support CSS Modules with the extension .module.css
267 - {
268 - test: cssRegex,
269 - exclude: cssModuleRegex,
270 - use: getStyleLoaders({
271 - importLoaders: 1,
272 - }),
273 - },
274 - // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
275 - // using the extension .module.css
276 - {
277 - test: cssModuleRegex,
278 - use: getStyleLoaders({
279 - importLoaders: 1,
280 - modules: true,
281 - getLocalIdent: getCSSModuleLocalIdent,
282 - }),
283 - },
284 - // Opt-in support for SASS (using .scss or .sass extensions).
285 - // Chains the sass-loader with the css-loader and the style-loader
286 - // to immediately apply all styles to the DOM.
287 - // By default we support SASS Modules with the
288 - // extensions .module.scss or .module.sass
289 - {
290 - test: sassRegex,
291 - exclude: sassModuleRegex,
292 - use: getStyleLoaders({ importLoaders: 2 }, 'sass-loader'),
293 - },
294 - // Adds support for CSS Modules, but using SASS
295 - // using the extension .module.scss or .module.sass
296 - {
297 - test: sassModuleRegex,
298 - use: getStyleLoaders(
299 - {
300 - importLoaders: 2,
301 - modules: true,
302 - getLocalIdent: getCSSModuleLocalIdent,
303 - },
304 - 'sass-loader'
305 - ),
306 - },
307 - // "file" loader makes sure those assets get served by WebpackDevServer.
308 - // When you `import` an asset, you get its (virtual) filename.
309 - // In production, they would get copied to the `build` folder.
310 - // This loader doesn't use a "test" so it will catch all modules
311 - // that fall through the other loaders.
312 - {
313 - // Exclude `js` files to keep "css" loader working as it injects
314 - // its runtime that would otherwise be processed through "file" loader.
315 - // Also exclude `html` and `json` extensions so they get processed
316 - // by webpacks internal loaders.
317 - exclude: [/\.(js|mjs|jsx)$/, /\.html$/, /\.json$/],
318 - loader: require.resolve('file-loader'),
319 - options: {
320 - name: 'static/media/[name].[hash:8].[ext]',
321 - },
322 - },
323 - ],
324 - },
325 - // ** STOP ** Are you adding a new loader?
326 - // Make sure to add the new loader(s) before the "file" loader.
327 - ],
328 - },
329 - plugins: [
330 - // Generates an `index.html` file with the <script> injected.
331 - new HtmlWebpackPlugin({
332 - inject: true,
333 - template: paths.appHtml,
334 - }),
335 - // Makes some environment variables available in index.html.
336 - // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
337 - // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
338 - // In development, this will be an empty string.
339 - new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
340 - // This gives some necessary context to module not found errors, such as
341 - // the requesting resource.
342 - new ModuleNotFoundPlugin(paths.appPath),
343 - // Makes some environment variables available to the JS code, for example:
344 - // if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
345 - new webpack.DefinePlugin(env.stringified),
346 - // This is necessary to emit hot updates (currently CSS only):
347 - new webpack.HotModuleReplacementPlugin(),
348 - // Watcher doesn't work well if you mistype casing in a path so we use
349 - // a plugin that prints an error when you attempt to do this.
350 - // See https://github.com/facebook/create-react-app/issues/240
351 - new CaseSensitivePathsPlugin(),
352 - // If you require a missing module and then `npm install` it, you still have
353 - // to restart the development server for Webpack to discover it. This plugin
354 - // makes the discovery automatic so you don't have to restart.
355 - // See https://github.com/facebook/create-react-app/issues/186
356 - new WatchMissingNodeModulesPlugin(paths.appNodeModules),
357 - // Moment.js is an extremely popular library that bundles large locale files
358 - // by default due to how Webpack interprets its code. This is a practical
359 - // solution that requires the user to opt into importing specific locales.
360 - // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
361 - // You can remove this if you don't use Moment.js:
362 - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
363 - // Generate a manifest file which contains a mapping of all asset filenames
364 - // to their corresponding output file so that tools can pick it up without
365 - // having to parse `index.html`.
366 - new ManifestPlugin({
367 - fileName: 'asset-manifest.json',
368 - publicPath: publicPath,
369 - }),
370 - ],
371 -
372 - // Some libraries import Node modules but don't use them in the browser.
373 - // Tell Webpack to provide empty mocks for them so importing them works.
374 - node: {
375 - dgram: 'empty',
376 - fs: 'empty',
377 - net: 'empty',
378 - tls: 'empty',
379 - child_process: 'empty',
380 - },
381 - // Turn off performance processing because we utilize
382 - // our own hints via the FileSizeReporter
383 - performance: false,
384 -};
1 -'use strict';
2 -
3 -const path = require('path');
4 -const webpack = require('webpack');
5 -const PnpWebpackPlugin = require('pnp-webpack-plugin');
6 -const HtmlWebpackPlugin = require('html-webpack-plugin');
7 -const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
8 -const TerserPlugin = require('terser-webpack-plugin');
9 -const MiniCssExtractPlugin = require('mini-css-extract-plugin');
10 -const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
11 -const safePostCssParser = require('postcss-safe-parser');
12 -const ManifestPlugin = require('webpack-manifest-plugin');
13 -const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
14 -const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
15 -const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
16 -const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
17 -const paths = require('./paths');
18 -const getClientEnvironment = require('./env');
19 -const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
20 -
21 -
22 -// Webpack uses `publicPath` to determine where the app is being served from.
23 -// It requires a trailing slash, or the file assets will get an incorrect path.
24 -const publicPath = paths.servedPath;
25 -// Some apps do not use client-side routing with pushState.
26 -// For these, "homepage" can be set to "." to enable relative asset paths.
27 -const shouldUseRelativeAssetPaths = publicPath === './';
28 -// Source maps are resource heavy and can cause out of memory issue for large source files.
29 -const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
30 -// Some apps do not need the benefits of saving a web request, so not inlining the chunk
31 -// makes for a smoother build process.
32 -const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
33 -// `publicUrl` is just like `publicPath`, but we will provide it to our app
34 -// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
35 -// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
36 -const publicUrl = publicPath.slice(0, -1);
37 -// Get environment variables to inject into our app.
38 -const env = getClientEnvironment(publicUrl);
39 -
40 -// Assert this just to be safe.
41 -// Development builds of React are slow and not intended for production.
42 -if (env.stringified['process.env'].NODE_ENV !== '"production"') {
43 - throw new Error('Production builds must have NODE_ENV=production.');
44 -}
45 -
46 -// style files regexes
47 -const cssRegex = /\.css$/;
48 -const cssModuleRegex = /\.module\.css$/;
49 -const sassRegex = /\.(scss|sass)$/;
50 -const sassModuleRegex = /\.module\.(scss|sass)$/;
51 -
52 -// common function to get style loaders
53 -const getStyleLoaders = (cssOptions, preProcessor) => {
54 - const loaders = [
55 - {
56 - loader: MiniCssExtractPlugin.loader,
57 - options: Object.assign(
58 - {},
59 - shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined
60 - ),
61 - },
62 - {
63 - loader: require.resolve('css-loader'),
64 - options: cssOptions,
65 - },
66 - {
67 - // Options for PostCSS as we reference these options twice
68 - // Adds vendor prefixing based on your specified browser support in
69 - // package.json
70 - loader: require.resolve('postcss-loader'),
71 - options: {
72 - // Necessary for external CSS imports to work
73 - // https://github.com/facebook/create-react-app/issues/2677
74 - ident: 'postcss',
75 - plugins: () => [
76 - require('postcss-flexbugs-fixes'),
77 - require('postcss-preset-env')({
78 - autoprefixer: {
79 - flexbox: 'no-2009',
80 - },
81 - stage: 3,
82 - }),
83 - ],
84 - sourceMap: shouldUseSourceMap,
85 - },
86 - },
87 - ];
88 - if (preProcessor) {
89 - loaders.push({
90 - loader: require.resolve(preProcessor),
91 - options: {
92 - sourceMap: shouldUseSourceMap,
93 - },
94 - });
95 - }
96 - return loaders;
97 -};
98 -
99 -// This is the production configuration.
100 -// It compiles slowly and is focused on producing a fast and minimal bundle.
101 -// The development configuration is different and lives in a separate file.
102 -module.exports = {
103 - mode: 'production',
104 - // Don't attempt to continue if there are any errors.
105 - bail: true,
106 - // We generate sourcemaps in production. This is slow but gives good results.
107 - // You can exclude the *.map files from the build during deployment.
108 - devtool: false,
109 - // In production, we only want to load the app code.
110 - entry: [paths.appIndexJs],
111 - output: {
112 - // The build folder.
113 - path: paths.appBuild,
114 - // Generated JS file names (with nested folders).
115 - // There will be one main bundle, and one file per asynchronous chunk.
116 - // We don't currently advertise code splitting but Webpack supports it.
117 - filename: 'static/js/[name].[chunkhash:8].js',
118 - chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
119 - // We inferred the "public path" (such as / or /my-project) from homepage.
120 - publicPath: publicPath,
121 - // Point sourcemap entries to original disk location (format as URL on Windows)
122 - devtoolModuleFilenameTemplate: info =>
123 - path
124 - .relative(paths.appSrc, info.absoluteResourcePath)
125 - .replace(/\\/g, '/'),
126 - },
127 - optimization: {
128 - minimizer: [
129 - new TerserPlugin({
130 - terserOptions: {
131 - parse: {
132 - // we want terser to parse ecma 8 code. However, we don't want it
133 - // to apply any minfication steps that turns valid ecma 5 code
134 - // into invalid ecma 5 code. This is why the 'compress' and 'output'
135 - // sections only apply transformations that are ecma 5 safe
136 - // https://github.com/facebook/create-react-app/pull/4234
137 - ecma: 8,
138 - },
139 - compress: {
140 - ecma: 5,
141 - warnings: false,
142 - // Disabled because of an issue with Uglify breaking seemingly valid code:
143 - // https://github.com/facebook/create-react-app/issues/2376
144 - // Pending further investigation:
145 - // https://github.com/mishoo/UglifyJS2/issues/2011
146 - comparisons: false,
147 - // Disabled because of an issue with Terser breaking valid code:
148 - // https://github.com/facebook/create-react-app/issues/5250
149 - // Pending futher investigation:
150 - // https://github.com/terser-js/terser/issues/120
151 - inline: 2,
152 - },
153 - mangle: {
154 - safari10: true,
155 - reserved: ['$super'],
156 - },
157 - output: {
158 - ecma: 5,
159 - comments: false,
160 - // Turned on because emoji and regex is not minified properly using default
161 - // https://github.com/facebook/create-react-app/issues/2488
162 - ascii_only: true,
163 - },
164 - },
165 - // Use multi-process parallel running to improve the build speed
166 - // Default number of concurrent runs: os.cpus().length - 1
167 - parallel: true,
168 - // Enable file caching
169 - cache: true,
170 - sourceMap: shouldUseSourceMap,
171 - }),
172 - new OptimizeCSSAssetsPlugin({
173 - cssProcessorOptions: {
174 - parser: safePostCssParser,
175 - map: shouldUseSourceMap
176 - ? {
177 - // `inline: false` forces the sourcemap to be output into a
178 - // separate file
179 - inline: false,
180 - // `annotation: true` appends the sourceMappingURL to the end of
181 - // the css file, helping the browser find the sourcemap
182 - annotation: true,
183 - }
184 - : false,
185 - },
186 - }),
187 - ],
188 - // Automatically split vendor and commons
189 - // https://twitter.com/wSokra/status/969633336732905474
190 - // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
191 - splitChunks: {
192 - chunks: 'all',
193 - name: false,
194 - },
195 - // Keep the runtime chunk seperated to enable long term caching
196 - // https://twitter.com/wSokra/status/969679223278505985
197 - runtimeChunk: true,
198 - },
199 - resolve: {
200 - // This allows you to set a fallback for where Webpack should look for modules.
201 - // We placed these paths second because we want `node_modules` to "win"
202 - // if there are any conflicts. This matches Node resolution mechanism.
203 - // https://github.com/facebook/create-react-app/issues/253
204 - modules: ['node_modules'].concat(
205 - // It is guaranteed to exist because we tweak it in `env.js`
206 - process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
207 - ),
208 - // These are the reasonable defaults supported by the Node ecosystem.
209 - // We also include JSX as a common component filename extension to support
210 - // some tools, although we do not recommend using it, see:
211 - // https://github.com/facebook/create-react-app/issues/290
212 - // `web` extension prefixes have been added for better support
213 - // for React Native Web.
214 - extensions: ['.mjs', '.web.js', '.js', '.json', '.web.jsx', '.jsx'],
215 - alias: {
216 - // Support React Native Web
217 - // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
218 - 'react-native': 'react-native-web',
219 - },
220 - plugins: [
221 - // Adds support for installing with Plug'n'Play, leading to faster installs and adding
222 - // guards against forgotten dependencies and such.
223 - PnpWebpackPlugin,
224 - // Prevents users from importing files from outside of src/ (or node_modules/).
225 - // This often causes confusion because we only process files within src/ with babel.
226 - // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
227 - // please link the files into your node_modules/ and let module-resolution kick in.
228 - // Make sure your source files are compiled, as they will not be processed in any way.
229 - new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
230 - ],
231 - },
232 - resolveLoader: {
233 - plugins: [
234 - // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
235 - // from the current package.
236 - PnpWebpackPlugin.moduleLoader(module),
237 - ],
238 - },
239 - module: {
240 - strictExportPresence: true,
241 - rules: [
242 - // Disable require.ensure as it's not a standard language feature.
243 - { parser: { requireEnsure: false } },
244 -
245 - // First, run the linter.
246 - // It's important to do this before Babel processes the JS.
247 - {
248 - test: /\.(js|mjs|jsx)$/,
249 - enforce: 'pre',
250 - use: [
251 - {
252 - options: {
253 - formatter: require.resolve('react-dev-utils/eslintFormatter'),
254 - eslintPath: require.resolve('eslint'),
255 -
256 - },
257 - loader: require.resolve('eslint-loader'),
258 - },
259 - ],
260 - include: paths.appSrc,
261 - },
262 - {
263 - // "oneOf" will traverse all following loaders until one will
264 - // match the requirements. When no loader matches it will fall
265 - // back to the "file" loader at the end of the loader list.
266 - oneOf: [
267 - // "url" loader works just like "file" loader but it also embeds
268 - // assets smaller than specified size as data URLs to avoid requests.
269 - {
270 - test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
271 - loader: require.resolve('url-loader'),
272 - options: {
273 - limit: 10000,
274 - name: 'static/media/[name].[ext]',
275 - },
276 - },
277 - // Process application JS with Babel.
278 - // The preset includes JSX, Flow, and some ESnext features.
279 - {
280 - test: /\.(js|mjs|jsx)$/,
281 - include: paths.appSrc,
282 -
283 - loader: require.resolve('babel-loader'),
284 - options: {
285 - customize: require.resolve(
286 - 'babel-preset-react-app/webpack-overrides'
287 - ),
288 -
289 - plugins: [
290 - [
291 - require.resolve('babel-plugin-named-asset-import'),
292 - {
293 - loaderMap: {
294 - svg: {
295 - ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
296 - },
297 - },
298 - },
299 - ],
300 - ],
301 - cacheDirectory: true,
302 - // Save disk space when time isn't as important
303 - cacheCompression: true,
304 - compact: true,
305 - },
306 - },
307 - // Process any JS outside of the app with Babel.
308 - // Unlike the application JS, we only compile the standard ES features.
309 - {
310 - test: /\.(js|mjs)$/,
311 - exclude: /@babel(?:\/|\\{1,2})runtime/,
312 - loader: require.resolve('babel-loader'),
313 - options: {
314 - babelrc: false,
315 - configFile: false,
316 - compact: false,
317 - presets: [
318 - [
319 - require.resolve('babel-preset-react-app/dependencies'),
320 - { helpers: true },
321 - ],
322 - ],
323 - cacheDirectory: true,
324 - // Save disk space when time isn't as important
325 - cacheCompression: true,
326 -
327 - // If an error happens in a package, it's possible to be
328 - // because it was compiled. Thus, we don't want the browser
329 - // debugger to show the original code. Instead, the code
330 - // being evaluated would be much more helpful.
331 - sourceMaps: false,
332 - },
333 - },
334 - // "postcss" loader applies autoprefixer to our CSS.
335 - // "css" loader resolves paths in CSS and adds assets as dependencies.
336 - // `MiniCSSExtractPlugin` extracts styles into CSS
337 - // files. If you use code splitting, async bundles will have their own separate CSS chunk file.
338 - // By default we support CSS Modules with the extension .module.css
339 - {
340 - test: cssRegex,
341 - exclude: cssModuleRegex,
342 - loader: getStyleLoaders({
343 - importLoaders: 1,
344 - sourceMap: shouldUseSourceMap,
345 - }),
346 - // Don't consider CSS imports dead code even if the
347 - // containing package claims to have no side effects.
348 - // Remove this when webpack adds a warning or an error for this.
349 - // See https://github.com/webpack/webpack/issues/6571
350 - sideEffects: true,
351 - },
352 - // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
353 - // using the extension .module.css
354 - {
355 - test: cssModuleRegex,
356 - loader: getStyleLoaders({
357 - importLoaders: 1,
358 - sourceMap: shouldUseSourceMap,
359 - modules: true,
360 - getLocalIdent: getCSSModuleLocalIdent,
361 - }),
362 - },
363 - // Opt-in support for SASS. The logic here is somewhat similar
364 - // as in the CSS routine, except that "sass-loader" runs first
365 - // to compile SASS files into CSS.
366 - // By default we support SASS Modules with the
367 - // extensions .module.scss or .module.sass
368 - {
369 - test: sassRegex,
370 - exclude: sassModuleRegex,
371 - loader: getStyleLoaders(
372 - {
373 - importLoaders: 2,
374 - sourceMap: shouldUseSourceMap,
375 - },
376 - 'sass-loader'
377 - ),
378 - // Don't consider CSS imports dead code even if the
379 - // containing package claims to have no side effects.
380 - // Remove this when webpack adds a warning or an error for this.
381 - // See https://github.com/webpack/webpack/issues/6571
382 - sideEffects: true,
383 - },
384 - // Adds support for CSS Modules, but using SASS
385 - // using the extension .module.scss or .module.sass
386 - {
387 - test: sassModuleRegex,
388 - loader: getStyleLoaders(
389 - {
390 - importLoaders: 2,
391 - sourceMap: shouldUseSourceMap,
392 - modules: true,
393 - getLocalIdent: getCSSModuleLocalIdent,
394 - },
395 - 'sass-loader'
396 - ),
397 - },
398 - // "file" loader makes sure assets end up in the `build` folder.
399 - // When you `import` an asset, you get its filename.
400 - // This loader doesn't use a "test" so it will catch all modules
401 - // that fall through the other loaders.
402 - {
403 - loader: require.resolve('file-loader'),
404 - // Exclude `js` files to keep "css" loader working as it injects
405 - // it's runtime that would otherwise be processed through "file" loader.
406 - // Also exclude `html` and `json` extensions so they get processed
407 - // by webpacks internal loaders.
408 - exclude: [/\.(js|mjs|jsx)$/, /\.html$/, /\.json$/],
409 - options: {
410 - name: 'static/media/[name].[hash:8].[ext]',
411 - },
412 - },
413 - // ** STOP ** Are you adding a new loader?
414 - // Make sure to add the new loader(s) before the "file" loader.
415 - ],
416 - },
417 - ],
418 - },
419 - plugins: [
420 - // Generates an `index.html` file with the <script> injected.
421 - new HtmlWebpackPlugin({
422 - inject: true,
423 - template: paths.appHtml,
424 - minify: {
425 - removeComments: true,
426 - collapseWhitespace: true,
427 - removeRedundantAttributes: true,
428 - useShortDoctype: true,
429 - removeEmptyAttributes: true,
430 - removeStyleLinkTypeAttributes: true,
431 - keepClosingSlash: true,
432 - minifyJS: true,
433 - minifyCSS: true,
434 - minifyURLs: true,
435 - },
436 - }),
437 - // Inlines the webpack runtime script. This script is too small to warrant
438 - // a network request.
439 - shouldInlineRuntimeChunk && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
440 - // Makes some environment variables available in index.html.
441 - // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
442 - // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
443 - // In production, it will be an empty string unless you specify "homepage"
444 - // in `package.json`, in which case it will be the pathname of that URL.
445 - new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
446 - // This gives some necessary context to module not found errors, such as
447 - // the requesting resource.
448 - new ModuleNotFoundPlugin(paths.appPath),
449 - // Makes some environment variables available to the JS code, for example:
450 - // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
451 - // It is absolutely essential that NODE_ENV was set to production here.
452 - // Otherwise React will be compiled in the very slow development mode.
453 - new webpack.DefinePlugin(env.stringified),
454 - new MiniCssExtractPlugin({
455 - // Options similar to the same options in webpackOptions.output
456 - // both options are optional
457 - filename: 'static/css/[name].[contenthash:8].css',
458 - chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
459 - }),
460 - // Generate a manifest file which contains a mapping of all asset filenames
461 - // to their corresponding output file so that tools can pick it up without
462 - // having to parse `index.html`.
463 - new ManifestPlugin({
464 - fileName: 'asset-manifest.json',
465 - publicPath: publicPath,
466 - }),
467 - // Moment.js is an extremely popular library that bundles large locale files
468 - // by default due to how Webpack interprets its code. This is a practical
469 - // solution that requires the user to opt into importing specific locales.
470 - // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
471 - // You can remove this if you don't use Moment.js:
472 - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
473 - // Generate a service worker script that will precache, and keep up to date,
474 - // the HTML & assets that are part of the Webpack build.
475 - new WorkboxWebpackPlugin.GenerateSW({
476 - clientsClaim: true,
477 - exclude: [/\.map$/, /asset-manifest\.json$/],
478 - importWorkboxFrom: 'cdn',
479 - navigateFallback: publicUrl + '/index.html',
480 - navigateFallbackBlacklist: [
481 - // Exclude URLs starting with /_, as they're likely an API call
482 - new RegExp('^/_'),
483 - // Exclude URLs containing a dot, as they're likely a resource in
484 - // public/ and not a SPA route
485 - new RegExp('/[^/]+\\.[^/]+$'),
486 - ],
487 - }),
488 - ].filter(Boolean),
489 - // Some libraries import Node modules but don't use them in the browser.
490 - // Tell Webpack to provide empty mocks for them so importing them works.
491 - node: {
492 - dgram: 'empty',
493 - fs: 'empty',
494 - net: 'empty',
495 - tls: 'empty',
496 - child_process: 'empty',
497 - },
498 - // Turn off performance processing because we utilize
499 - // our own hints via the FileSizeReporter
500 - performance: false,
501 -};
1 -'use strict';
2 -
3 -const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
4 -const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
5 -const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
6 -const ignoredFiles = require('react-dev-utils/ignoredFiles');
7 -const config = require('./webpack.config.dev');
8 -const paths = require('./paths');
9 -const fs = require('fs');
10 -
11 -const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
12 -const host = process.env.HOST || '0.0.0.0';
13 -
14 -module.exports = function(proxy, allowedHost) {
15 - return {
16 - // WebpackDevServer 2.4.3 introduced a security fix that prevents remote
17 - // websites from potentially accessing local content through DNS rebinding:
18 - // https://github.com/webpack/webpack-dev-server/issues/887
19 - // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
20 - // However, it made several existing use cases such as development in cloud
21 - // environment or subdomains in development significantly more complicated:
22 - // https://github.com/facebook/create-react-app/issues/2271
23 - // https://github.com/facebook/create-react-app/issues/2233
24 - // While we're investigating better solutions, for now we will take a
25 - // compromise. Since our WDS configuration only serves files in the `public`
26 - // folder we won't consider accessing them a vulnerability. However, if you
27 - // use the `proxy` feature, it gets more dangerous because it can expose
28 - // remote code execution vulnerabilities in backends like Django and Rails.
29 - // So we will disable the host check normally, but enable it if you have
30 - // specified the `proxy` setting. Finally, we let you override it if you
31 - // really know what you're doing with a special environment variable.
32 - disableHostCheck:
33 - !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
34 - // Enable gzip compression of generated files.
35 - compress: true,
36 - // Silence WebpackDevServer's own logs since they're generally not useful.
37 - // It will still show compile warnings and errors with this setting.
38 - clientLogLevel: 'none',
39 - // By default WebpackDevServer serves physical files from current directory
40 - // in addition to all the virtual build products that it serves from memory.
41 - // This is confusing because those files won’t automatically be available in
42 - // production build folder unless we copy them. However, copying the whole
43 - // project directory is dangerous because we may expose sensitive files.
44 - // Instead, we establish a convention that only files in `public` directory
45 - // get served. Our build script will copy `public` into the `build` folder.
46 - // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
47 - // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
48 - // In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
49 - // Note that we only recommend to use `public` folder as an escape hatch
50 - // for files like `favicon.ico`, `manifest.json`, and libraries that are
51 - // for some reason broken when imported through Webpack. If you just want to
52 - // use an image, put it in `src` and `import` it from JavaScript instead.
53 - contentBase: paths.appPublic,
54 - // By default files from `contentBase` will not trigger a page reload.
55 - watchContentBase: true,
56 - // Enable hot reloading server. It will provide /sockjs-node/ endpoint
57 - // for the WebpackDevServer client so it can learn when the files were
58 - // updated. The WebpackDevServer client is included as an entry point
59 - // in the Webpack development configuration. Note that only changes
60 - // to CSS are currently hot reloaded. JS changes will refresh the browser.
61 - hot: true,
62 - // It is important to tell WebpackDevServer to use the same "root" path
63 - // as we specified in the config. In development, we always serve from /.
64 - publicPath: config.output.publicPath,
65 - // WebpackDevServer is noisy by default so we emit custom message instead
66 - // by listening to the compiler events with `compiler.hooks[...].tap` calls above.
67 - quiet: true,
68 - // Reportedly, this avoids CPU overload on some systems.
69 - // https://github.com/facebook/create-react-app/issues/293
70 - // src/node_modules is not ignored to support absolute imports
71 - // https://github.com/facebook/create-react-app/issues/1065
72 - watchOptions: {
73 - ignored: ignoredFiles(paths.appSrc),
74 - },
75 - // Enable HTTPS if the HTTPS environment variable is set to 'true'
76 - https: protocol === 'https',
77 - host,
78 - overlay: false,
79 - historyApiFallback: {
80 - // Paths with dots should still use the history fallback.
81 - // See https://github.com/facebook/create-react-app/issues/387.
82 - disableDotRule: true,
83 - },
84 - public: allowedHost,
85 - proxy,
86 - before(app, server) {
87 - if (fs.existsSync(paths.proxySetup)) {
88 - // This registers user provided middleware for proxy reasons
89 - require(paths.proxySetup)(app);
90 - }
91 -
92 - // This lets us fetch source contents from webpack for the error overlay
93 - app.use(evalSourceMapMiddleware(server));
94 - // This lets us open files from the runtime error overlay.
95 - app.use(errorOverlayMiddleware());
96 -
97 - // This service worker file is effectively a 'no-op' that will reset any
98 - // previous service worker registered for the same host:port combination.
99 - // We do this in development to avoid hitting the production cache if
100 - // it used the same host and port.
101 - // https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
102 - app.use(noopServiceWorkerMiddleware());
103 - },
104 - };
105 -};
This diff could not be displayed because it is too large.
1 { 1 {
2 - "name": "sing-app-react", 2 + "name": "oss-front-end",
3 - "version": "5.0.0", 3 + "version": "0.1.0",
4 + "moduleNameMapper": {
5 + "^react-native$": "react-native-web",
6 + "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
7 + },
4 "private": true, 8 "private": true,
9 + "dependencies": {
10 + "@testing-library/jest-dom": "^4.2.4",
11 + "@testing-library/react": "^9.5.0",
12 + "@testing-library/user-event": "^7.2.1",
13 + "animate.css": "^4.1.0",
14 + "awesome-bootstrap-checkbox": "^1.0.1",
15 + "bootstrap": "^4.5.0",
16 + "classnames": "^2.2.6",
17 + "debug": "^4.1.1",
18 + "font-awesome": "^4.7.0",
19 + "glyphicons-halflings": "^1.9.1",
20 + "jquery": "^3.5.1",
21 + "line-awesome": "^1.3.0",
22 + "mixins": "0.0.1",
23 + "node-sass": "^4.14.1",
24 + "prop-types": "^15.7.2",
25 + "rc-hammerjs": "^0.6.10",
26 + "react": "^16.13.1",
27 + "react-dom": "^16.13.1",
28 + "react-redux": "^7.2.0",
29 + "react-router": "^5.2.0",
30 + "react-router-dom": "^5.2.0",
31 + "react-scripts": "3.4.1",
32 + "react-table": "^7.2.0",
33 + "react-transition-group": "^4.4.1",
34 + "reactstrap": "^8.4.1",
35 + "redux": "^4.0.5",
36 + "redux-thunk": "^2.3.0",
37 + "scss": "^0.2.4"
38 + },
5 "scripts": { 39 "scripts": {
6 - "build": "node scripts/build.js", 40 + "start": "react-scripts start",
7 - "start": "node scripts/start.js", 41 + "build": "react-scripts build",
8 - "test": "node scripts/test.js" 42 + "test": "react-scripts test",
43 + "eject": "react-scripts eject"
9 }, 44 },
10 - "browserslist": [
11 - ">0.2%",
12 - "not dead",
13 - "not ie <= 11",
14 - "not op_mini all"
15 - ],
16 "eslintConfig": { 45 "eslintConfig": {
17 "extends": "react-app" 46 "extends": "react-app"
18 }, 47 },
19 - "jest": { 48 + "browserslist": {
20 - "collectCoverageFrom": [ 49 + "production": [
21 - "src/**/*.{js,jsx}" 50 + ">0.2%",
22 - ], 51 + "not dead",
23 - "moduleFileExtensions": [ 52 + "not op_mini all"
24 - "web.js",
25 - "js",
26 - "json",
27 - "web.jsx",
28 - "jsx",
29 - "node"
30 - ],
31 - "moduleNameMapper": {
32 - "^react-native$": "react-native-web",
33 - "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
34 - },
35 - "resolver": "jest-pnp-resolver",
36 - "setupFiles": [
37 - "react-app-polyfill/jsdom"
38 ], 53 ],
39 - "testEnvironment": "jsdom", 54 + "development": [
40 - "testMatch": [ 55 + "last 1 chrome version",
41 - "<rootDir>/src/**/__tests__/**/*.{js,jsx}", 56 + "last 1 firefox version",
42 - "<rootDir>/src/**/?(*.)(spec|test).{js,jsx}" 57 + "last 1 safari version"
43 - ],
44 - "testURL": "http://localhost",
45 - "transform": {
46 - "^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
47 - "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
48 - "^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
49 - },
50 - "transformIgnorePatterns": [
51 - "[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$",
52 - "^.+\\.module\\.(css|sass|scss)$"
53 ] 58 ]
54 - },
55 - "dependencies": {
56 - "animate.css": "3.7.0",
57 - "awesome-bootstrap-checkbox": "1.0.1",
58 - "axios": "^0.18.0",
59 - "bootstrap": "4.0.0",
60 - "bootstrap-slider": "^10.2.1",
61 - "bootstrap_calendar": "https://github.com/xero/bootstrap_calendar.git#1.0.1",
62 - "classnames": "^2.2.6",
63 - "draft-js": "^0.10.5",
64 - "flot": "^0.8.0-alpha",
65 - "flot.dashes": "https://github.com/cquartier/flot.dashes.git",
66 - "font-awesome": "4.7.0",
67 - "formsy-react": "0.19.5",
68 - "fullcalendar": "^3.9.0",
69 - "glyphicons-halflings": "^1.9.1",
70 - "jasny-bootstrap": "^3.1.3",
71 - "jquery": "^3.3.1",
72 - "jquery-mapael": "^2.2.0",
73 - "jquery-sparkline": "^2.4.0",
74 - "jquery-ui": "1.12.1",
75 - "jquery.animate-number": "0.0.14",
76 - "jquery.flot-orderBars": "https://github.com/emmerich/flot-orderBars.git",
77 - "jquery.flot.animator": "https://github.com/Codicode/flotanimator.git#3c256c0183d713fd3bf41d04417873928eb1a751",
78 - "jsonwebtoken": "^8.5.1",
79 - "jvectormap": "2.0.4",
80 - "line-awesome": "github:icons8/line-awesome",
81 - "messenger": "git+https://github.com/HubSpot/messenger.git#v1.4.2",
82 - "metrojs": "0.9.77",
83 - "moment": "^2.22.2",
84 - "moment-timezone": "^0.5.26",
85 - "nvd3": "1.8.6",
86 - "pretty": "^2.0.0",
87 - "prettysize": "^2.0.0",
88 - "rc-color-picker": "^1.2.6",
89 - "rc-hammerjs": "0.6.9",
90 - "react": "^16.5.2",
91 - "react-animated-number": "^0.4.4",
92 - "react-app-polyfill": "^0.1.3",
93 - "react-autosize-textarea": "^5.0.0",
94 - "react-bootstrap-slider": "^2.1.5",
95 - "react-bootstrap-table": "4.1.5",
96 - "react-datetime": "^2.16.1",
97 - "react-dev-utils": "^6.0.5",
98 - "react-dom": "^16.5.2",
99 - "react-draft-wysiwyg": "1.10.12",
100 - "react-dropzone": "^6.2.4",
101 - "react-flot": "^1.3.0",
102 - "react-google-maps": "^9.4.5",
103 - "react-images": "^0.5.19",
104 - "react-maskedinput": "^4.0.1",
105 - "react-mde": "2.3.4",
106 - "react-redux": "^5.0.7",
107 - "react-router": "^4.3.1",
108 - "react-router-dom": "^4.3.1",
109 - "react-router-hash-link": "^1.2.1",
110 - "react-scrollspy": "^3.3.5",
111 - "react-select": "^3.0.4",
112 - "react-select2-wrapper": "^1.0.4-beta6",
113 - "react-shuffle": "2.1.0",
114 - "react-slick": "^0.23.1",
115 - "react-sortable-hoc": "^0.8.3",
116 - "react-sortable-tree": "^2.2.0",
117 - "react-sparklines": "^1.7.0",
118 - "react-syntax-highlighter": "^10.1.2",
119 - "react-table": "6.7.6",
120 - "react-tagsinput": "^3.19.0",
121 - "react-toastify": "^5.1.1",
122 - "react-transition-group": "^2.5.2",
123 - "reactstrap": "7.1.0",
124 - "redux": "^4.0.1",
125 - "redux-thunk": "^2.3.0",
126 - "rickshaw": "1.6.6",
127 - "semantic-ui-react": "^0.87.3",
128 - "showdown": "1.8.6",
129 - "skycons": "^1.0.0",
130 - "widgster": "^1.0.0",
131 - "xlsx": "^0.14.4"
132 - },
133 - "devDependencies": {
134 - "@babel/core": "7.4.4",
135 - "@babel/plugin-proposal-class-properties": "7.4.4",
136 - "@babel/plugin-proposal-optional-chaining": "^7.2.0",
137 - "@svgr/webpack": "4.2.0",
138 - "babel-core": "7.0.0-bridge.0",
139 - "babel-eslint": "10.0.1",
140 - "babel-jest": "24.8.0",
141 - "babel-loader": "8.0.5",
142 - "babel-plugin-named-asset-import": "1.0.0-next.103",
143 - "babel-preset-react-app": "9.0.0",
144 - "bfj": "6.1.1",
145 - "bundle-loader": "0.5.6",
146 - "case-sensitive-paths-webpack-plugin": "2.2.0",
147 - "chalk": "^2.4.2",
148 - "css-loader": "2.1.1",
149 - "dotenv": "^8.2.0",
150 - "dotenv-expand": "^5.1.0",
151 - "eslint": "5.16.0",
152 - "eslint-config-react-app": "4.0.1",
153 - "eslint-loader": "2.1.1",
154 - "eslint-plugin-flowtype": "3.8.1",
155 - "eslint-plugin-import": "2.17.2",
156 - "eslint-plugin-jsx-a11y": "6.2.1",
157 - "eslint-plugin-react": "7.13.0",
158 - "eslint-plugin-react-hooks": "1.6.0",
159 - "expose-loader": "0.7.5",
160 - "file-loader": "3.0.1",
161 - "fs-extra": "7.0.1",
162 - "html-webpack-plugin": "4.0.0-alpha.2",
163 - "identity-obj-proxy": "3.0.0",
164 - "imports-loader": "0.8.0",
165 - "jest": "24.8.0",
166 - "jest-pnp-resolver": "1.2.1",
167 - "jest-resolve": "24.8.0",
168 - "lodash": "4.17.11",
169 - "mini-css-extract-plugin": "0.6.0",
170 - "node-sass": "4.12.0",
171 - "optimize-css-assets-webpack-plugin": "5.0.1",
172 - "pnp-webpack-plugin": "1.4.3",
173 - "postcss-flexbugs-fixes": "4.1.0",
174 - "postcss-loader": "3.0.0",
175 - "postcss-preset-env": "6.6.0",
176 - "postcss-safe-parser": "4.0.1",
177 - "resolve": "1.10.1",
178 - "sass-loader": "7.1.0",
179 - "style-loader": "0.23.0",
180 - "terser-webpack-plugin": "1.2.3",
181 - "url-loader": "1.1.2",
182 - "webpack": "^4.31.0",
183 - "webpack-dev-server": "3.3.1",
184 - "webpack-manifest-plugin": "2.0.4",
185 - "webpack-raphael": "2.1.4",
186 - "workbox-webpack-plugin": "4.3.1"
187 - },
188 - "resolutions": {
189 - "jquery": "3.3.1"
190 } 59 }
191 } 60 }
......

12 KB | W: | H:

37 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 - <meta charset="utf-8"> 4 + <meta charset="utf-8" />
5 - <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png"> 5 + <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6 - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 6 + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css"/>
7 - <meta name="theme-color" content="#000000"> 7 + <meta name="viewport" content="width=device-width, initial-scale=1" />
8 + <meta name="theme-color" content="#000000" />
9 + <meta
10 + name="description"
11 + content="Web site created using create-react-app"
12 + />
13 + <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
8 <!-- 14 <!--
9 - manifest.json provides metadata used when your web app is added to the 15 + manifest.json provides metadata used when your web app is installed on a
10 - homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/ 16 + user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
11 --> 17 -->
12 - <link rel="manifest" href="%PUBLIC_URL%/manifest.json"> 18 + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
13 <!-- 19 <!--
14 Notice the use of %PUBLIC_URL% in the tags above. 20 Notice the use of %PUBLIC_URL% in the tags above.
15 It will be replaced with the URL of the `public` folder during the build. 21 It will be replaced with the URL of the `public` folder during the build.
...@@ -19,27 +25,10 @@ ...@@ -19,27 +25,10 @@
19 work correctly both with client-side routing and a non-root public URL. 25 work correctly both with client-side routing and a non-root public URL.
20 Learn how to configure a non-root public URL by running `npm run build`. 26 Learn how to configure a non-root public URL by running `npm run build`.
21 --> 27 -->
22 - <title>Video Emergency Detection</title> 28 + <title>React App</title>
23 - <meta name="description" content="React Admin Dashboard Template built with Bootstrap, Redux and React Router by Flatlogic. Over 40 unique pages, hundreds of components and theme support.">
24 - <meta name="keywords" content="react admin, react dashboard, react admin template, react theme, react dashboard template, react dashboard template">
25 - <meta name="author" content="Flatlogic LLC.">
26 -
27 - <!-- Global site tag (gtag.js) - Google Analytics -->
28 - <script async src="https://www.googletagmanager.com/gtag/js?id=UA-36759672-9"></script>
29 - <script>
30 - window.dataLayer = window.dataLayer || [];
31 - function gtag(){dataLayer.push(arguments);}
32 - gtag('js', new Date());
33 -
34 - gtag('config', 'UA-36759672-9');
35 - </script>
36 -
37 - <!-- Yandex.Metrika counter --> <script type="text/javascript" > (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://cdn.jsdelivr.net/npm/yandex-metrica-watch/tag.js", "ym"); ym(48020168, "init", { id:48020168, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true, ecommerce:"dataLayer" }); </script> <!-- /Yandex.Metrika counter -->
38 </head> 29 </head>
39 <body> 30 <body>
40 - <noscript> 31 + <noscript>You need to enable JavaScript to run this app.</noscript>
41 - You need to enable JavaScript to run this app.
42 - </noscript>
43 <div id="root"></div> 32 <div id="root"></div>
44 <!-- 33 <!--
45 This HTML file is a template. 34 This HTML file is a template.
......
1 { 1 {
2 - "short_name": "Sing App 5.0.0 - Isomorphic React Dashboard", 2 + "short_name": "React App",
3 "name": "Create React App Sample", 3 "name": "Create React App Sample",
4 "icons": [ 4 "icons": [
5 { 5 {
6 - "src": "/favicon.png", 6 + "src": "favicon.ico",
7 "sizes": "64x64 32x32 24x24 16x16", 7 "sizes": "64x64 32x32 24x24 16x16",
8 "type": "image/x-icon" 8 "type": "image/x-icon"
9 + },
10 + {
11 + "src": "logo192.png",
12 + "type": "image/png",
13 + "sizes": "192x192"
14 + },
15 + {
16 + "src": "logo512.png",
17 + "type": "image/png",
18 + "sizes": "512x512"
9 } 19 }
10 ], 20 ],
11 "start_url": ".", 21 "start_url": ".",
......
1 +# https://www.robotstxt.org/robotstxt.html
2 +User-agent: *
3 +Disallow:
1 -'use strict';
2 -
3 -// Do this as the first thing so that any code reading it knows the right env.
4 -process.env.BABEL_ENV = 'production';
5 -process.env.NODE_ENV = 'production';
6 -
7 -// Makes the script crash on unhandled rejections instead of silently
8 -// ignoring them. In the future, promise rejections that are not handled will
9 -// terminate the Node.js process with a non-zero exit code.
10 -process.on('unhandledRejection', err => {
11 - throw err;
12 -});
13 -
14 -// Ensure environment variables are read.
15 -require('../config/env');
16 -
17 -
18 -const path = require('path');
19 -const chalk = require('chalk');
20 -const fs = require('fs-extra');
21 -const webpack = require('webpack');
22 -const bfj = require('bfj');
23 -const config = require('../config/webpack.config.prod');
24 -const paths = require('../config/paths');
25 -const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
26 -const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
27 -const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
28 -const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
29 -const printBuildError = require('react-dev-utils/printBuildError');
30 -
31 -const measureFileSizesBeforeBuild =
32 - FileSizeReporter.measureFileSizesBeforeBuild;
33 -const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
34 -const useYarn = fs.existsSync(paths.yarnLockFile);
35 -
36 -// These sizes are pretty large. We'll warn for bundles exceeding them.
37 -const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
38 -const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
39 -
40 -const isInteractive = process.stdout.isTTY;
41 -
42 -// Warn and crash if required files are missing
43 -if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
44 - process.exit(1);
45 -}
46 -
47 -// Process CLI arguments
48 -const argv = process.argv.slice(2);
49 -const writeStatsJson = argv.indexOf('--stats') !== -1;
50 -
51 -// We require that you explictly set browsers and do not fall back to
52 -// browserslist defaults.
53 -const { checkBrowsers } = require('react-dev-utils/browsersHelper');
54 -checkBrowsers(paths.appPath, isInteractive)
55 - .then(() => {
56 - // First, read the current file sizes in build directory.
57 - // This lets us display how much they changed later.
58 - return measureFileSizesBeforeBuild(paths.appBuild);
59 - })
60 - .then(previousFileSizes => {
61 - // Remove all content but keep the directory so that
62 - // if you're in it, you don't end up in Trash
63 - fs.emptyDirSync(paths.appBuild);
64 - // Merge with the public folder
65 - copyPublicFolder();
66 - // Start the webpack build
67 - return build(previousFileSizes);
68 - })
69 - .then(
70 - ({ stats, previousFileSizes, warnings }) => {
71 - if (warnings.length) {
72 - console.log(chalk.yellow('Compiled with warnings.\n'));
73 - console.log(warnings.join('\n\n'));
74 - console.log(
75 - '\nSearch for the ' +
76 - chalk.underline(chalk.yellow('keywords')) +
77 - ' to learn more about each warning.'
78 - );
79 - console.log(
80 - 'To ignore, add ' +
81 - chalk.cyan('// eslint-disable-next-line') +
82 - ' to the line before.\n'
83 - );
84 - } else {
85 - console.log(chalk.green('Compiled successfully.\n'));
86 - }
87 -
88 - console.log('File sizes after gzip:\n');
89 - printFileSizesAfterBuild(
90 - stats,
91 - previousFileSizes,
92 - paths.appBuild,
93 - WARN_AFTER_BUNDLE_GZIP_SIZE,
94 - WARN_AFTER_CHUNK_GZIP_SIZE
95 - );
96 - console.log();
97 -
98 - const appPackage = require(paths.appPackageJson);
99 - const publicUrl = paths.publicUrl;
100 - const publicPath = config.output.publicPath;
101 - const buildFolder = path.relative(process.cwd(), paths.appBuild);
102 - printHostingInstructions(
103 - appPackage,
104 - publicUrl,
105 - publicPath,
106 - buildFolder,
107 - useYarn
108 - );
109 - },
110 - err => {
111 - console.log(chalk.red('Failed to compile.\n'));
112 - printBuildError(err);
113 - process.exit(1);
114 - }
115 - )
116 - .catch(err => {
117 - if (err && err.message) {
118 - console.log(err.message);
119 - }
120 - process.exit(1);
121 - });
122 -
123 -// Create the production build and print the deployment instructions.
124 -function build(previousFileSizes) {
125 - console.log('Creating an optimized production build...');
126 -
127 - let compiler = webpack(config);
128 - return new Promise((resolve, reject) => {
129 - compiler.run((err, stats) => {
130 - let messages;
131 - if (err) {
132 - if (!err.message) {
133 - return reject(err);
134 - }
135 - messages = formatWebpackMessages({
136 - errors: [err.message],
137 - warnings: [],
138 - });
139 - } else {
140 - messages = formatWebpackMessages(
141 - stats.toJson({ all: false, warnings: true, errors: true })
142 - );
143 - }
144 - if (messages.errors.length) {
145 - // Only keep the first error. Others are often indicative
146 - // of the same problem, but confuse the reader with noise.
147 - if (messages.errors.length > 1) {
148 - messages.errors.length = 1;
149 - }
150 - return reject(new Error(messages.errors.join('\n\n')));
151 - }
152 - if (
153 - process.env.CI &&
154 - (typeof process.env.CI !== 'string' ||
155 - process.env.CI.toLowerCase() !== 'false') &&
156 - messages.warnings.length
157 - ) {
158 - console.log(
159 - chalk.yellow(
160 - '\nTreating warnings as errors because process.env.CI = true.\n' +
161 - 'Most CI servers set it automatically.\n'
162 - )
163 - );
164 - return reject(new Error(messages.warnings.join('\n\n')));
165 - }
166 -
167 - const resolveArgs = {
168 - stats,
169 - previousFileSizes,
170 - warnings: messages.warnings,
171 - };
172 - if (writeStatsJson) {
173 - return bfj
174 - .write(paths.appBuild + '/bundle-stats.json', stats.toJson())
175 - .then(() => resolve(resolveArgs))
176 - .catch(error => reject(new Error(error)));
177 - }
178 -
179 - return resolve(resolveArgs);
180 - });
181 - });
182 -}
183 -
184 -function copyPublicFolder() {
185 - fs.copySync(paths.appPublic, paths.appBuild, {
186 - dereference: true,
187 - filter: file => file !== paths.appHtml,
188 - });
189 -}
1 -'use strict';
2 -
3 -// Do this as the first thing so that any code reading it knows the right env.
4 -process.env.BABEL_ENV = 'development';
5 -process.env.NODE_ENV = 'development';
6 -
7 -// Makes the script crash on unhandled rejections instead of silently
8 -// ignoring them. In the future, promise rejections that are not handled will
9 -// terminate the Node.js process with a non-zero exit code.
10 -process.on('unhandledRejection', err => {
11 - throw err;
12 -});
13 -
14 -// Ensure environment variables are read.
15 -require('../config/env');
16 -
17 -
18 -const fs = require('fs');
19 -const chalk = require('chalk');
20 -const webpack = require('webpack');
21 -const WebpackDevServer = require('webpack-dev-server');
22 -const clearConsole = require('react-dev-utils/clearConsole');
23 -const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
24 -const {
25 - choosePort,
26 - createCompiler,
27 - prepareProxy,
28 - prepareUrls,
29 -} = require('react-dev-utils/WebpackDevServerUtils');
30 -const openBrowser = require('react-dev-utils/openBrowser');
31 -const paths = require('../config/paths');
32 -const config = require('../config/webpack.config.dev');
33 -const createDevServerConfig = require('../config/webpackDevServer.config');
34 -
35 -const useYarn = fs.existsSync(paths.yarnLockFile);
36 -const isInteractive = process.stdout.isTTY;
37 -
38 -// Warn and crash if required files are missing
39 -if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
40 - process.exit(1);
41 -}
42 -
43 -// Tools like Cloud9 rely on this.
44 -const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
45 -const HOST = process.env.HOST || '0.0.0.0';
46 -
47 -if (process.env.HOST) {
48 - console.log(
49 - chalk.cyan(
50 - `Attempting to bind to HOST environment variable: ${chalk.yellow(
51 - chalk.bold(process.env.HOST)
52 - )}`
53 - )
54 - );
55 - console.log(
56 - `If this was unintentional, check that you haven't mistakenly set it in your shell.`
57 - );
58 - console.log(
59 - `Learn more here: ${chalk.yellow('http://bit.ly/CRA-advanced-config')}`
60 - );
61 - console.log();
62 -}
63 -
64 -// We require that you explictly set browsers and do not fall back to
65 -// browserslist defaults.
66 -const { checkBrowsers } = require('react-dev-utils/browsersHelper');
67 -checkBrowsers(paths.appPath, isInteractive)
68 - .then(() => {
69 - // We attempt to use the default port but if it is busy, we offer the user to
70 - // run on a different port. `choosePort()` Promise resolves to the next free port.
71 - return choosePort(HOST, DEFAULT_PORT);
72 - })
73 - .then(port => {
74 - if (port == null) {
75 - // We have not found a port.
76 - return;
77 - }
78 - const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
79 - const appName = require(paths.appPackageJson).name;
80 - const urls = prepareUrls(protocol, HOST, port);
81 - // Create a webpack compiler that is configured with custom messages.
82 - const compiler = createCompiler(webpack, config, appName, urls, useYarn);
83 - // Load proxy config
84 - const proxySetting = require(paths.appPackageJson).proxy;
85 - const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
86 - // Serve webpack assets generated by the compiler over a web server.
87 - const serverConfig = createDevServerConfig(
88 - proxyConfig,
89 - urls.lanUrlForConfig
90 - );
91 - const devServer = new WebpackDevServer(compiler, serverConfig);
92 - // Launch WebpackDevServer.
93 - devServer.listen(port, HOST, err => {
94 - if (err) {
95 - return console.log(err);
96 - }
97 - if (isInteractive) {
98 - clearConsole();
99 - }
100 - console.log(chalk.cyan('Starting the development server...\n'));
101 - openBrowser(urls.localUrlForBrowser);
102 - });
103 -
104 - ['SIGINT', 'SIGTERM'].forEach(function(sig) {
105 - process.on(sig, function() {
106 - devServer.close();
107 - process.exit();
108 - });
109 - });
110 - })
111 - .catch(err => {
112 - if (err && err.message) {
113 - console.log(err.message);
114 - }
115 - process.exit(1);
116 - });
1 -'use strict';
2 -
3 -// Do this as the first thing so that any code reading it knows the right env.
4 -process.env.BABEL_ENV = 'test';
5 -process.env.NODE_ENV = 'test';
6 -process.env.PUBLIC_URL = '';
7 -
8 -// Makes the script crash on unhandled rejections instead of silently
9 -// ignoring them. In the future, promise rejections that are not handled will
10 -// terminate the Node.js process with a non-zero exit code.
11 -process.on('unhandledRejection', err => {
12 - throw err;
13 -});
14 -
15 -// Ensure environment variables are read.
16 -require('../config/env');
17 -
18 -
19 -const jest = require('jest');
20 -const execSync = require('child_process').execSync;
21 -let argv = process.argv.slice(2);
22 -
23 -function isInGitRepository() {
24 - try {
25 - execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
26 - return true;
27 - } catch (e) {
28 - return false;
29 - }
30 -}
31 -
32 -function isInMercurialRepository() {
33 - try {
34 - execSync('hg --cwd . root', { stdio: 'ignore' });
35 - return true;
36 - } catch (e) {
37 - return false;
38 - }
39 -}
40 -
41 -// Watch unless on CI, in coverage mode, or explicitly running all tests
42 -if (
43 - !process.env.CI &&
44 - argv.indexOf('--coverage') === -1 &&
45 - argv.indexOf('--watchAll') === -1
46 -) {
47 - // https://github.com/facebook/create-react-app/issues/5210
48 - const hasSourceControl = isInGitRepository() || isInMercurialRepository();
49 - argv.push(hasSourceControl ? '--watch' : '--watchAll');
50 -}
51 -
52 -
53 -jest.run(argv);
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'react-redux';
3 import { Switch, Route, Redirect } from 'react-router'; 2 import { Switch, Route, Redirect } from 'react-router';
4 import { HashRouter } from 'react-router-dom'; 3 import { HashRouter } from 'react-router-dom';
5 -import { ToastContainer } from 'react-toastify';
6 -
7 -/* eslint-disable */
8 -import ErrorPage from '../pages/error';
9 -/* eslint-enable */
10 4
11 import '../styles/theme.scss'; 5 import '../styles/theme.scss';
12 -import LayoutComponent from '../components/Layout'; 6 +import LayoutComponent from '../components/Layout/Layout';
13 -
14 -const CloseButton = ({closeToast}) => <i onClick={closeToast} className="la la-close notifications-close"/>
15 7
16 class App extends React.PureComponent { 8 class App extends React.PureComponent {
17 render() { 9 render() {
18 return ( 10 return (
19 <div> 11 <div>
20 - <ToastContainer
21 - autoClose={5000}
22 - hideProgressBar
23 - closeButton={<CloseButton/>}
24 - />
25 <HashRouter> 12 <HashRouter>
26 <Switch> 13 <Switch>
27 <Route path="/" exact render={() => <Redirect to="/app/main"/>}/> 14 <Route path="/" exact render={() => <Redirect to="/app/main"/>}/>
28 <Route path="/app" exact render={() => <Redirect to="/app/main"/>}/> 15 <Route path="/app" exact render={() => <Redirect to="/app/main"/>}/>
29 <Route path="/app" component={LayoutComponent}/> 16 <Route path="/app" component={LayoutComponent}/>
30 - <Route path="/error" exact component={ErrorPage}/>
31 <Redirect from="*" to="/app/main/"/> 17 <Redirect from="*" to="/app/main/"/>
32 </Switch> 18 </Switch>
33 </HashRouter> 19 </HashRouter>
34 </div> 20 </div>
35 -
36 ); 21 );
37 } 22 }
38 } 23 }
39 24
40 -const mapStateToProps = state => ({ 25 +export default App;
41 -});
42 -
43 -export default connect(mapStateToProps)(App);
......
...@@ -13,103 +13,103 @@ import s from './Layout.module.scss'; ...@@ -13,103 +13,103 @@ import s from './Layout.module.scss';
13 import { DashboardThemes } from '../../reducers/layout'; 13 import { DashboardThemes } from '../../reducers/layout';
14 14
15 class Layout extends React.Component { 15 class Layout extends React.Component {
16 - static propTypes = { 16 + static propTypes = {
17 - sidebarStatic: PropTypes.bool, 17 + sidebarStatic: PropTypes.bool,
18 - sidebarOpened: PropTypes.bool, 18 + sidebarOpened: PropTypes.bool,
19 - dashboardTheme: PropTypes.string, 19 + dashboardTheme: PropTypes.string,
20 - dispatch: PropTypes.func.isRequired, 20 + dispatch: PropTypes.func.isRequired,
21 - }; 21 + };
22 - 22 +
23 - static defaultProps = { 23 + static defaultProps = {
24 - sidebarStatic: false, 24 + sidebarStatic: false,
25 - sidebarOpened: false, 25 + sidebarOpened: false,
26 - dashboardTheme: DashboardThemes.DARK 26 + dashboardTheme: DashboardThemes.DARK
27 - }; 27 + };
28 - constructor(props) { 28 + constructor(props) {
29 - super(props); 29 + super(props);
30 - this.handleSwipe = this.handleSwipe.bind(this); 30 + this.handleSwipe = this.handleSwipe.bind(this);
31 - }
32 -
33 - async componentDidMount() {
34 - const staticSidebar = JSON.parse(localStorage.getItem('staticSidebar'));
35 - if (staticSidebar && window.innerWidth > 768) {
36 - this.props.dispatch(toggleSidebar());
37 - } else if (this.props.sidebarOpened) {
38 - setTimeout(() => {
39 - this.props.dispatch(closeSidebar());
40 - this.props.dispatch(changeActiveSidebarItem(null));
41 - }, 2500);
42 - }
43 - this.handleResize();
44 - window.addEventListener('resize', this.handleResize.bind(this));
45 - }
46 -
47 - componentWillUnmount() {
48 - window.removeEventListener('resize', this.handleResize.bind(this));
49 - }
50 -
51 - handleResize() {
52 - if (window.innerWidth <= 768 && this.props.sidebarStatic) {
53 - this.props.dispatch(toggleSidebar());
54 } 31 }
55 - } 32 +
56 - 33 + async componentDidMount() {
57 - handleSwipe(e) { 34 + const staticSidebar = JSON.parse(localStorage.getItem('staticSidebar'));
58 - if ('ontouchstart' in window) { 35 + if (staticSidebar && window.innerWidth > 768) {
59 - this.props.dispatch(openSidebar()); 36 + this.props.dispatch(toggleSidebar());
60 - return; 37 + } else if (this.props.sidebarOpened) {
38 + setTimeout(() => {
39 + this.props.dispatch(closeSidebar());
40 + this.props.dispatch(changeActiveSidebarItem(null));
41 + }, 2500);
61 } 42 }
62 - if (e.direction === 2 && this.props.sidebarOpened) { 43 + this.handleResize();
63 - this.props.dispatch(closeSidebar()); 44 + window.addEventListener('resize', this.handleResize.bind(this));
64 - return; 45 + }
46 +
47 + componentWillUnmount() {
48 + window.removeEventListener('resize', this.handleResize.bind(this));
49 + }
50 +
51 + handleResize() {
52 + if (window.innerWidth <= 768 && this.props.sidebarStatic) {
53 + this.props.dispatch(toggleSidebar());
65 } 54 }
66 - } 55 + }
67 - 56 +
68 - render() { 57 + handleSwipe(e) {
69 - return ( 58 + if ('ontouchstart' in window) {
70 - <div 59 + this.props.dispatch(openSidebar());
71 - className={[ 60 + return;
72 - s.root, 61 + }
73 - this.props.sidebarStatic ? s.sidebarStatic : '', 62 + if (e.direction === 2 && this.props.sidebarOpened) {
74 - !this.props.sidebarOpened ? s.sidebarClose : '', 63 + this.props.dispatch(closeSidebar());
75 - 'sing-dashboard', 64 + return;
76 - 'dashboard-' + this.props.dashboardTheme, 65 + }
77 - ].join(' ')} 66 + }
78 - > 67 +
79 - <Sidebar /> 68 + render() {
80 - <div className={s.wrap}> 69 + return (
81 - <Hammer onSwipe={this.handleSwipe}> 70 + <div
82 - <main className={s.content}> 71 + className={[
83 - <TransitionGroup> 72 + s.root,
84 - <CSSTransition 73 + this.props.sidebarStatic ? s.sidebarStatic : '',
85 - key={this.props.location.pathname} 74 + !this.props.sidebarOpened ? s.sidebarClose : '',
86 - classNames="fade" 75 + 'video emergency analysis',
87 - timeout={200} 76 + 'video emergency-' + this.props.dashboardTheme,
88 - > 77 + ].join(' ')}
89 - <Switch> 78 + >
90 - <Route path="/app/main/" exact component={Main} /> 79 + <Sidebar />
91 - <Route path="/app/subject" exact component={Subject} /> 80 + <div className={s.wrap}>
92 - </Switch> 81 + <Hammer onSwipe={this.handleSwipe}>
93 - </CSSTransition> 82 + <main className={s.content}>
94 - </TransitionGroup> 83 + <TransitionGroup>
95 - <footer className={s.contentFooter}> 84 + <CSSTransition
96 - OSS project 85 + key={this.props.location.pathname}
97 - </footer> 86 + classNames="fade"
98 - </main> 87 + timeout={200}
99 - </Hammer> 88 + >
89 + <Switch>
90 + <Route path="/app/main/" exact component={Main} />
91 + <Route path="/app/subject" exact component={Subject} />
92 + </Switch>
93 + </CSSTransition>
94 + </TransitionGroup>
95 + <footer className={s.contentFooter}>
96 + OSS project
97 + </footer>
98 + </main>
99 + </Hammer>
100 + </div>
100 </div> 101 </div>
101 - </div> 102 + );
102 - ); 103 + }
103 } 104 }
104 -} 105 +
105 - 106 + function mapStateToProps(store) {
106 -function mapStateToProps(store) { 107 + return {
107 - return { 108 + sidebarOpened: store.navigation.sidebarOpened,
108 - sidebarOpened: store.navigation.sidebarOpened, 109 + sidebarStatic: store.navigation.sidebarStatic,
109 - sidebarStatic: store.navigation.sidebarStatic, 110 + dashboardTheme: store.layout.dashboardTheme,
110 - dashboardTheme: store.layout.dashboardTheme, 111 + labelDataGroup: store.labelDataGroup,
111 - labelDataGroup: store.labelDataGroup, 112 + };
112 - }; 113 + }
113 -} 114 +
114 - 115 + export default withRouter(connect(mapStateToProps)(Layout));
115 -export default withRouter(connect(mapStateToProps)(Layout));
...\ No newline at end of file ...\ No newline at end of file
......
1 -{
2 - "name": "Layout",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Layout.js"
6 -}
1 -{
2 - "name": "Loader",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Loader.js"
6 -}
...@@ -73,7 +73,7 @@ class LinksGroup extends Component { ...@@ -73,7 +73,7 @@ class LinksGroup extends Component {
73 target={this.props.target} 73 target={this.props.target}
74 > 74 >
75 <span className={classnames('icon', s.icon)}> 75 <span className={classnames('icon', s.icon)}>
76 - <i className={`fi ${this.props.iconName}`} /> 76 + <i className={this.props.iconName} />
77 </span> 77 </span>
78 {this.props.header} {this.props.label && <sup className={`${s.headerLabel} text-${this.props.labelColor || 'warning'}`}>{this.props.label}</sup>} 78 {this.props.header} {this.props.label && <sup className={`${s.headerLabel} text-${this.props.labelColor || 'warning'}`}>{this.props.label}</sup>}
79 {this.props.badge && <Badge className={s.badge} color="warning" pill>9</Badge>} 79 {this.props.badge && <Badge className={s.badge} color="warning" pill>9</Badge>}
...@@ -99,7 +99,7 @@ class LinksGroup extends Component { ...@@ -99,7 +99,7 @@ class LinksGroup extends Component {
99 </NavLink> 99 </NavLink>
100 </li> 100 </li>
101 ); 101 );
102 - } 102 + }
103 /* eslint-disable */ 103 /* eslint-disable */
104 return ( 104 return (
105 <Route 105 <Route
...@@ -114,7 +114,7 @@ class LinksGroup extends Component { ...@@ -114,7 +114,7 @@ class LinksGroup extends Component {
114 > 114 >
115 {this.props.isHeader ? 115 {this.props.isHeader ?
116 <span className={classnames('icon', s.icon)}> 116 <span className={classnames('icon', s.icon)}>
117 - <i className={`fi ${this.props.iconName}`} /> 117 + <i className={this.props.iconName} />
118 </span> : null 118 </span> : null
119 } 119 }
120 {this.props.header} {this.props.label && <sup className={`${s.headerLabel} text-${this.props.labelColor || 'warning'} ml-1`}>{this.props.label}</sup>} 120 {this.props.header} {this.props.label && <sup className={`${s.headerLabel} text-${this.props.labelColor || 'warning'} ml-1`}>{this.props.label}</sup>}
......
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
78 &:hover { 78 &:hover {
79 color: $sidebar-item-active-color; 79 color: $sidebar-item-active-color;
80 } 80 }
81 - 81 +
82 .icon { 82 .icon {
83 border-radius: 50%; 83 border-radius: 50%;
84 - background-color: $sidebar-item-active-color; 84 + background-color: #ffc247;
85 opacity: 1; 85 opacity: 1;
86 86
87 i { 87 i {
88 - color: var(--sidebar-bg-color); 88 + color: #313947;
89 } 89 }
90 } 90 }
91 } 91 }
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
124 } 124 }
125 } 125 }
126 126
127 +
127 ul { 128 ul {
128 background: var(--sidebar-action-bg); 129 background: var(--sidebar-action-bg);
129 padding: $spacer; 130 padding: $spacer;
......
...@@ -54,7 +54,7 @@ class Sidebar extends React.Component { ...@@ -54,7 +54,7 @@ class Sidebar extends React.Component {
54 className={[s.root, this.props.sidebarStatic ? s.staticSidebar : '', !this.props.sidebarOpened ? s.sidebarClose : ''].join(' ')} 54 className={[s.root, this.props.sidebarStatic ? s.staticSidebar : '', !this.props.sidebarOpened ? s.sidebarClose : ''].join(' ')}
55 > 55 >
56 <header className={s.logo}> 56 <header className={s.logo}>
57 - <img src="/images/emergency.png" style={{width: '112px', padding: '7px'}} alt="Emergency Inc. logo"/> 57 + <img src="/images/emergency.png" style={{width: '130px', padding: '7px'}} alt="Emergency Inc. logo"/>
58 </header> 58 </header>
59 <ul className={s.nav}> 59 <ul className={s.nav}>
60 <LinksGroup 60 <LinksGroup
...@@ -62,24 +62,24 @@ class Sidebar extends React.Component { ...@@ -62,24 +62,24 @@ class Sidebar extends React.Component {
62 activeItem={this.props.activeItem} 62 activeItem={this.props.activeItem}
63 header="영상 분석" 63 header="영상 분석"
64 isHeader 64 isHeader
65 - iconName="flaticon-record" 65 + iconName="fas fa-camera"
66 link="/app/main" 66 link="/app/main"
67 index="main" 67 index="main"
68 - childrenLinks={[ 68 + // childrenLinks={[
69 - { 69 + // {
70 - header: 'Phone', link: '/app/file/phone', 70 + // header: 'Phone', link: '/app/file/phone',
71 - }, 71 + // },
72 - { 72 + // {
73 - header: 'RaspberryPi', link: '/app/file/raspberrypi', 73 + // header: 'RaspberryPi', link: '/app/file/raspberrypi',
74 - }, 74 + // },
75 - ]} 75 + // ]}
76 /> 76 />
77 <LinksGroup 77 <LinksGroup
78 onActiveSidebarItemChange={activeItem => this.props.dispatch(changeActiveSidebarItem(activeItem))} 78 onActiveSidebarItemChange={activeItem => this.props.dispatch(changeActiveSidebarItem(activeItem))}
79 activeItem={this.props.activeItem} 79 activeItem={this.props.activeItem}
80 header="사진 등록" 80 header="사진 등록"
81 isHeader 81 isHeader
82 - iconName="flaticon-user" 82 + iconName="fas fa-user"
83 link="/app/subject" 83 link="/app/subject"
84 index="subject" 84 index="subject"
85 /> 85 />
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
7 top: 0; 7 top: 0;
8 bottom: 0; 8 bottom: 0;
9 border-right: $sidebar-border; 9 border-right: $sidebar-border;
10 - background-color: var(--sidebar-bg-color); 10 + background-color: #313947;
11 - color: var(--sidebar-color); 11 + color: #a6b2c1;
12 overflow-y: auto; 12 overflow-y: auto;
13 13
14 @include scroll-bar($sidebar-scrollbar-bg); 14 @include scroll-bar($sidebar-scrollbar-bg);
......
1 import React from 'react'; 1 import React from 'react';
2 import PropTypes from 'prop-types'; 2 import PropTypes from 'prop-types';
3 -import jQuery from 'jquery';
4 -import { UncontrolledTooltip } from 'reactstrap';
5 -import 'imports-loader?window.jQuery=jquery,this=>window!widgster'; // eslint-disable-line
6 import s from './Widget.module.scss'; 3 import s from './Widget.module.scss';
7 -import Loader from '../Loader'; // eslint-disable-line css-modules/no-unused-class 4 +import Loader from '../Loader/Loader';
8 5
9 class Widget extends React.Component { 6 class Widget extends React.Component {
10 static propTypes = { 7 static propTypes = {
...@@ -14,17 +11,7 @@ class Widget extends React.Component { ...@@ -14,17 +11,7 @@ class Widget extends React.Component {
14 PropTypes.arrayOf(PropTypes.node), 11 PropTypes.arrayOf(PropTypes.node),
15 PropTypes.node, 12 PropTypes.node,
16 ]), 13 ]),
17 - close: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
18 - fullscreen: PropTypes.bool,
19 - collapse: PropTypes.bool,
20 - refresh: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
21 - settings: PropTypes.bool,
22 - settingsInverse: PropTypes.bool,
23 - tooltipPlacement: PropTypes.string,
24 - showTooltip: PropTypes.bool,
25 bodyClass: PropTypes.string, 14 bodyClass: PropTypes.string,
26 - customControls: PropTypes.node,
27 - options: PropTypes.object, //eslint-disable-line,
28 fetchingData: PropTypes.bool 15 fetchingData: PropTypes.bool
29 }; 16 };
30 17
...@@ -32,17 +19,7 @@ class Widget extends React.Component { ...@@ -32,17 +19,7 @@ class Widget extends React.Component {
32 title: null, 19 title: null,
33 className: '', 20 className: '',
34 children: [], 21 children: [],
35 - close: false,
36 - fullscreen: false,
37 - collapse: false,
38 - refresh: false,
39 - settings: false,
40 - settingsInverse: false,
41 - tooltipPlacement: 'bottom',
42 - showTooltip: false,
43 bodyClass: '', 22 bodyClass: '',
44 - customControls: null,
45 - options: {},
46 fetchingData: false 23 fetchingData: false
47 }; 24 };
48 25
...@@ -53,33 +30,15 @@ class Widget extends React.Component { ...@@ -53,33 +30,15 @@ class Widget extends React.Component {
53 }; 30 };
54 } 31 }
55 32
56 - componentDidMount() {
57 - const options = this.props.options;
58 - options.bodySelector = '.widget-body';
59 - jQuery(this.el).widgster(options);
60 - }
61 -
62 render() { 33 render() {
63 const { 34 const {
64 title, 35 title,
65 className, 36 className,
66 children, 37 children,
67 - close,
68 - fullscreen,
69 - collapse,
70 - refresh,
71 - settings,
72 - settingsInverse,
73 - tooltipPlacement,
74 - showTooltip,
75 bodyClass, 38 bodyClass,
76 - customControls,
77 fetchingData, 39 fetchingData,
78 - options, //eslint-disable-line
79 ...attributes 40 ...attributes
80 } = this.props; 41 } = this.props;
81 - const randomId = this.state.randomId;
82 - const mainControls = !!(close || fullscreen || collapse || refresh || settings || settingsInverse);
83 return ( 42 return (
84 <section 43 <section
85 className={['widget', s.widget, className].join(' ')} 44 className={['widget', s.widget, className].join(' ')}
...@@ -92,101 +51,6 @@ class Widget extends React.Component { ...@@ -92,101 +51,6 @@ class Widget extends React.Component {
92 : <header className={s.title}>{title}</header> 51 : <header className={s.title}>{title}</header>
93 ) 52 )
94 } 53 }
95 - {
96 - !customControls && mainControls && (
97 - <div className={`${s.widgetControls} widget-controls`}>
98 - {settings && (
99 - <button><i className="la la-cog" /></button>
100 - )}
101 - {settingsInverse && (
102 - <button className={`bg-gray-transparent ${s.inverse}`}><i
103 - className="la la-cog text-white"
104 - /></button>
105 - )}
106 - {refresh && (
107 - <button data-widgster="load" id={`reloadId-${randomId}`}>
108 - {typeof refresh === 'string' ?
109 - <strong className="text-gray-light">{refresh}</strong> :
110 - <i className="la la-refresh" />}
111 - {showTooltip && (
112 - <UncontrolledTooltip
113 - placement={tooltipPlacement}
114 - target={`reloadId-${randomId}`}
115 - >Reload</UncontrolledTooltip>
116 - )}
117 - </button>
118 - )}
119 - {fullscreen && (
120 - <button data-widgster="fullscreen" id={`fullscreenId-${randomId}`}>
121 - <i className="glyphicon glyphicon-resize-full" />
122 - {showTooltip && (
123 - <UncontrolledTooltip
124 - placement={tooltipPlacement}
125 - target={`fullscreenId-${randomId}`}
126 - >Fullscreen</UncontrolledTooltip>
127 - )}
128 - </button>
129 - )}
130 - {fullscreen && (
131 - <button data-widgster="restore" id={`restoreId-${randomId}`}>
132 - <i className="glyphicon glyphicon-resize-small" />
133 - {showTooltip && (
134 - <UncontrolledTooltip
135 - placement={tooltipPlacement}
136 - target={`restoreId-${randomId}`}
137 - >Restore</UncontrolledTooltip>
138 - )}
139 - </button>
140 - )}
141 - {collapse && (
142 - <span>
143 - <button data-widgster="collapse" id={`collapseId-${randomId}`}>
144 - <i className="la la-angle-down" />
145 - {showTooltip && (
146 - <UncontrolledTooltip
147 - placement={tooltipPlacement}
148 - target={`collapseId-${randomId}`}
149 - >Collapse</UncontrolledTooltip>
150 - )}
151 - </button>
152 - </span>
153 - )}
154 - {collapse && (
155 - <span>
156 - <button data-widgster="expand" id={`expandId-${randomId}`}>
157 - <i className="la la-angle-up" />
158 - {showTooltip && (
159 - <UncontrolledTooltip
160 - placement={tooltipPlacement}
161 - target={`expandId-${randomId}`}
162 - >Expand</UncontrolledTooltip>
163 - )}
164 - </button>
165 - </span>
166 - )}
167 -
168 - {close && (
169 - <button data-widgster="close" id={`closeId-${randomId}`}>
170 - {typeof close === 'string' ?
171 - <strong className="text-gray-light">{close}</strong> :
172 - <i className="la la-remove" />}
173 - {showTooltip && (
174 - <UncontrolledTooltip
175 - placement={tooltipPlacement}
176 - target={`closeId-${randomId}`}
177 - >Close</UncontrolledTooltip>
178 - )}
179 - </button>
180 - )}
181 - </div>
182 - )}
183 - {
184 - customControls && (
185 - <div className={`${s.widgetControls} widget-controls`}>
186 - {customControls}
187 - </div>
188 - )
189 - }
190 <div className={`${s.widgetBody} widget-body ${bodyClass}`}> 54 <div className={`${s.widgetBody} widget-body ${bodyClass}`}>
191 {fetchingData ? <Loader className={s.widgetLoader} size={40}/> : children} 55 {fetchingData ? <Loader className={s.widgetLoader} size={40}/> : children}
192 </div> 56 </div>
...@@ -195,4 +59,4 @@ class Widget extends React.Component { ...@@ -195,4 +59,4 @@ class Widget extends React.Component {
195 } 59 }
196 } 60 }
197 61
198 -export default Widget; 62 +export default Widget;
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
7 @include clearfix(); 7 @include clearfix();
8 } 8 }
9 9
10 -:global .widget.collapsed {
11 - min-height: unset;
12 -}
13 -
14 .widget { 10 .widget {
15 display: block; 11 display: block;
16 position: relative; 12 position: relative;
...@@ -76,51 +72,6 @@ ...@@ -76,51 +72,6 @@
76 } 72 }
77 } 73 }
78 74
79 -.widgetControls + .widgetBody {
80 - margin-top: $widget-padding-vertical;
81 -}
82 -
83 -.widgetControls,
84 -:global(.widget-controls) {
85 - position: absolute;
86 - z-index: 1;
87 - top: 0;
88 - right: 0;
89 - padding: 14px;
90 - font-size: $font-size-sm;
91 -
92 - button {
93 - padding: 1px 4px;
94 - border-radius: 4px;
95 - color: rgba($black, 0.4);
96 - background: transparent;
97 - border: none;
98 -
99 - @include transition(color 0.15s ease-in-out);
100 -
101 - &:hover {
102 - color: rgba($black, 0.1);
103 - text-decoration: none;
104 - }
105 -
106 - &:active,
107 - &:focus {
108 - outline: none;
109 - }
110 -
111 - :global {
112 - .la {
113 - position: relative;
114 - top: 2px;
115 - }
116 -
117 - .glyphicon {
118 - font-size: 0.7rem;
119 - }
120 - }
121 - }
122 -}
123 -
124 .inverse { 75 .inverse {
125 top: 2px; 76 top: 2px;
126 position: relative; 77 position: relative;
......
1 -{
2 - "name": "Widget",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Widget.js"
6 -}
1 -const hostApi = process.env.NODE_ENV === "development" ? "http://localhost" : "http://localhost";
2 -const portApi = process.env.NODE_ENV === "development" ? 8080 : 4000;
3 -const baseURLApi = `${hostApi}${portApi ? `:${portApi}` : ``}`;
4 -
5 -export default {
6 - hostApi,
7 - portApi,
8 - baseURLApi
9 -};
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- Generator: Adobe Illustrator 19.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3 -<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4 - viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5 -<g id="Слой_1">
6 - <rect x="0" y="0" width="13.9" height="30"/>
7 -</g>
8 -<g id="Слой_1__x28_копия_x29_">
9 - <rect x="16.1" y="0" width="13.9" height="30"/>
10 -</g>
11 -</svg>
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- Generator: Adobe Illustrator 19.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3 -<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4 - viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5 -<g id="Слой_1">
6 - <rect x="0" y="0" width="8.3" height="30"/>
7 -</g>
8 -<g id="Слой_1__x28_копия_x29_">
9 - <rect x="21.7" y="0" width="8.3" height="30"/>
10 -</g>
11 -<g id="Слой_1__x28_копия2_x29_">
12 - <rect x="10.8" y="0" width="8.3" height="30"/>
13 -</g>
14 -</svg>
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- Generator: Adobe Illustrator 19.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3 -<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4 - viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5 -<g id="Слой_1">
6 - <rect x="0" y="0" width="6.2" height="30"/>
7 -</g>
8 -<g id="Слой_1__x28_копия_x29_">
9 - <rect x="23.8" y="0" width="6.2" height="30"/>
10 -</g>
11 -<g id="Слой_1__x28_копия2_x29_">
12 - <rect x="15.9" y="0" width="6.2" height="30"/>
13 -</g>
14 -<g id="Слой_1__x28_копия3_x29_">
15 - <rect x="8" y="0" width="6.2" height="30"/>
16 -</g>
17 -</svg>
1 -<?xml version="1.0" encoding="iso-8859-1"?>
2 -<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3 -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 49.94 49.94" style="enable-background:new 0 0 49.94 49.94;" xml:space="preserve" width="512px" height="512px">
4 -<path d="M48.856,22.73c0.983-0.958,1.33-2.364,0.906-3.671c-0.425-1.307-1.532-2.24-2.892-2.438l-12.092-1.757 c-0.515-0.075-0.96-0.398-1.19-0.865L28.182,3.043c-0.607-1.231-1.839-1.996-3.212-1.996c-1.372,0-2.604,0.765-3.211,1.996 L16.352,14c-0.23,0.467-0.676,0.79-1.191,0.865L3.069,16.622c-1.359,0.197-2.467,1.131-2.892,2.438 c-0.424,1.307-0.077,2.713,0.906,3.671l8.749,8.528c0.373,0.364,0.544,0.888,0.456,1.4L8.224,44.701 c-0.183,1.06,0.095,2.091,0.781,2.904c1.066,1.267,2.927,1.653,4.415,0.871l10.814-5.686c0.452-0.237,1.021-0.235,1.472,0 l10.815,5.686c0.526,0.277,1.087,0.417,1.666,0.417c1.057,0,2.059-0.47,2.748-1.288c0.687-0.813,0.964-1.846,0.781-2.904 l-2.065-12.042c-0.088-0.513,0.083-1.036,0.456-1.4L48.856,22.73z" fill="#363f4e"/>
5 -<g>
6 -</g>
7 -<g>
8 -</g>
9 -<g>
10 -</g>
11 -<g>
12 -</g>
13 -<g>
14 -</g>
15 -<g>
16 -</g>
17 -<g>
18 -</g>
19 -<g>
20 -</g>
21 -<g>
22 -</g>
23 -<g>
24 -</g>
25 -<g>
26 -</g>
27 -<g>
28 -</g>
29 -<g>
30 -</g>
31 -<g>
32 -</g>
33 -<g>
34 -</g>
35 -</svg>
1 -<?xml version="1.0" encoding="iso-8859-1"?>
2 -<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3 -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 49.94 49.94" style="enable-background:new 0 0 49.94 49.94;" xml:space="preserve" width="512px" height="512px">
4 -<path d="M48.856,22.731c0.983-0.958,1.33-2.364,0.906-3.671c-0.425-1.307-1.532-2.24-2.892-2.438l-12.092-1.757 c-0.515-0.075-0.96-0.398-1.19-0.865L28.182,3.043c-0.607-1.231-1.839-1.996-3.212-1.996c-1.372,0-2.604,0.765-3.211,1.996 L16.352,14c-0.23,0.467-0.676,0.79-1.191,0.865L3.069,16.623C1.71,16.82,0.603,17.753,0.178,19.06 c-0.424,1.307-0.077,2.713,0.906,3.671l8.749,8.528c0.373,0.364,0.544,0.888,0.456,1.4L8.224,44.702 c-0.232,1.353,0.313,2.694,1.424,3.502c1.11,0.809,2.555,0.914,3.772,0.273l10.814-5.686c0.461-0.242,1.011-0.242,1.472,0 l10.815,5.686c0.528,0.278,1.1,0.415,1.669,0.415c0.739,0,1.475-0.231,2.103-0.688c1.111-0.808,1.656-2.149,1.424-3.502 L39.651,32.66c-0.088-0.513,0.083-1.036,0.456-1.4L48.856,22.731z M37.681,32.998l2.065,12.042c0.104,0.606-0.131,1.185-0.629,1.547 c-0.499,0.361-1.12,0.405-1.665,0.121l-10.815-5.687c-0.521-0.273-1.095-0.411-1.667-0.411s-1.145,0.138-1.667,0.412l-10.813,5.686 c-0.547,0.284-1.168,0.24-1.666-0.121c-0.498-0.362-0.732-0.94-0.629-1.547l2.065-12.042c0.199-1.162-0.186-2.348-1.03-3.17 L2.48,21.299c-0.441-0.43-0.591-1.036-0.4-1.621c0.19-0.586,0.667-0.988,1.276-1.077l12.091-1.757 c1.167-0.169,2.176-0.901,2.697-1.959l5.407-10.957c0.272-0.552,0.803-0.881,1.418-0.881c0.616,0,1.146,0.329,1.419,0.881 l5.407,10.957c0.521,1.058,1.529,1.79,2.696,1.959l12.092,1.757c0.609,0.089,1.086,0.491,1.276,1.077 c0.19,0.585,0.041,1.191-0.4,1.621l-8.749,8.528C37.866,30.65,37.481,31.835,37.681,32.998z" fill="#363f4e"/>
5 -<g>
6 -</g>
7 -<g>
8 -</g>
9 -<g>
10 -</g>
11 -<g>
12 -</g>
13 -<g>
14 -</g>
15 -<g>
16 -</g>
17 -<g>
18 -</g>
19 -<g>
20 -</g>
21 -<g>
22 -</g>
23 -<g>
24 -</g>
25 -<g>
26 -</g>
27 -<g>
28 -</g>
29 -<g>
30 -</g>
31 -<g>
32 -</g>
33 -<g>
34 -</g>
35 -</svg>
...@@ -3,14 +3,11 @@ import ReactDOM from 'react-dom'; ...@@ -3,14 +3,11 @@ import ReactDOM from 'react-dom';
3 import { createStore, applyMiddleware } from 'redux'; 3 import { createStore, applyMiddleware } from 'redux';
4 import { Provider } from 'react-redux' 4 import { Provider } from 'react-redux'
5 import ReduxThunk from 'redux-thunk' 5 import ReduxThunk from 'redux-thunk'
6 -import axios from 'axios';
7 -
8 import App from './components/App'; 6 import App from './components/App';
9 -import config from './config'; 7 +
10 import reducers from './reducers'; 8 import reducers from './reducers';
11 9
12 -axios.defaults.baseURL = config.baseURLApi; 10 +import * as serviceWorker from './serviceWorker';
13 -axios.defaults.headers.common['Content-Type'] = "application/json";
14 11
15 const store = createStore( 12 const store = createStore(
16 reducers, 13 reducers,
...@@ -18,8 +15,13 @@ const store = createStore( ...@@ -18,8 +15,13 @@ const store = createStore(
18 ); 15 );
19 16
20 ReactDOM.render( 17 ReactDOM.render(
21 - <Provider store={store}> 18 + <Provider store={store}>
22 - <App /> 19 + <App />
23 - </Provider>, 20 + </Provider>,
24 - document.getElementById('root') 21 + document.getElementById('root')
25 ); 22 );
23 +
24 +// If you want your app to work offline and load faster, you can change
25 +// unregister() to register() below. Note this comes with some pitfalls.
26 +// Learn more about service workers: https://bit.ly/CRA-PWA
27 +serviceWorker.unregister();
......
1 -import React from 'react';
2 -import {
3 - Container,
4 - Form,
5 - FormGroup,
6 - Input,
7 - Button,
8 -} from 'reactstrap';
9 -import { Link } from 'react-router-dom';
10 -
11 -import s from './ErrorPage.module.scss';
12 -
13 -class ErrorPage extends React.Component {
14 - render() {
15 - return (
16 - <div className={s.errorPage}>
17 - <Container>
18 - <div className={`${s.errorContainer} mx-auto`}>
19 - <h1 className={s.errorCode}>404</h1>
20 - <p className={s.errorInfo}>
21 - Opps, it seems that this page does not exist.
22 - </p>
23 - <p className={[s.errorHelp, 'mb-3'].join(' ')}>
24 - If you are sure it should, search for it.
25 - </p>
26 - <Form method="get">
27 - <FormGroup>
28 - <Input className="input-no-border" type="text" placeholder="Search Pages" />
29 - </FormGroup>
30 - <Link to="app/extra/search">
31 - <Button className={s.errorBtn} type="submit" color="inverse">
32 - Search <i className="fa fa-search text-warning ml-xs" />
33 - </Button>
34 - </Link>
35 - </Form>
36 - </div>
37 - <footer className={s.pageFooter}>
38 - 2019 &copy; Sing App - React Admin Dashboard Template.
39 - </footer>
40 - </Container>
41 - </div>
42 - );
43 - }
44 -}
45 -
46 -export default ErrorPage;
1 -@import '../../styles/app';
2 -
3 -.errorPage {
4 - padding-top: 5%;
5 - height: 100vh;
6 -}
7 -
8 -.errorContainer {
9 - width: 365px;
10 - text-align: center;
11 -}
12 -
13 -.errorBtn {
14 - padding-left: 35px;
15 - padding-right: 35px;
16 -}
17 -
18 -.errorCode {
19 - margin: 20px;
20 - font-size: 80px;
21 - font-weight: $font-weight-normal;
22 - color: $gray-800;
23 -
24 - @include media-breakpoint-up(md) {
25 - font-size: 180px;
26 - }
27 -}
28 -
29 -.errorInfo {
30 - font-size: 20px;
31 - color: $gray-800;
32 -}
33 -
34 -.errorHelp {
35 - font-size: 14px;
36 -}
37 -
38 -.pageFooter {
39 - position: absolute;
40 - bottom: 30px;
41 - left: 0;
42 - right: 0;
43 - width: 100%;
44 - font-size: $font-size-mini;
45 - color: $text-muted;
46 - text-align: center;
47 -}
1 -{
2 - "name": "error",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./ErrorPage.js"
6 -}
1 -import React from 'react';
2 -import $ from 'jquery';
3 -/* eslint-disable */
4 -import 'imports-loader?jQuery=jquery,this=>window!webpack-raphael/raphael';
5 -import 'imports-loader?jQuery=jquery,this=>window!flot';
6 -import 'imports-loader?jQuery=jquery,this=>window!flot/jquery.flot.resize';
7 -import 'imports-loader?jQuery=jquery,this=>window!flot/jquery.flot.time';
8 -import 'imports-loader?jQuery=jquery,this=>window!jquery.flot.animator/jquery.flot.animator';
9 -import 'imports-loader?jQuery=jquery,this=>window!easy-pie-chart/dist/jquery.easypiechart.js';
10 -import 'imports-loader?jQuery=jquery,this=>window!jquery.flot-orderBars/js/jquery.flot.orderBars';
11 -import 'imports-loader?jQuery=jquery,this=>window!jquery-sparkline';
12 -/* eslint-enable */
13 -import d3 from 'd3';
14 -import nv from 'nvd3';
15 -import Rickshaw from 'rickshaw';
16 -
17 -import {
18 - Row, Col, Progress,
19 -} from 'reactstrap';
20 -
21 -import FlotBars from './flot/charts/BarsChart';
22 -import Widget from '../../../components/Widget';
23 -
24 -import s from './Charts.module.scss';
25 -
26 -const FlotChartData = [
27 - {
28 - label: 'Traffic',
29 - data: [[1, 23],
30 - [2, 13],
31 - [3, 33],
32 - [4, 16],
33 - [5, 32],
34 - [6, 28],
35 - [7, 31]],
36 - lines: {
37 - fill: 0.3,
38 - lineWidth: 0,
39 - },
40 - color: ['#fff8e3'],
41 - }, {
42 - label: 'Traffic',
43 - data: [[1, 13],
44 - [2, 8],
45 - [3, 17],
46 - [4, 10],
47 - [5, 17],
48 - [6, 15],
49 - [7, 16]],
50 - lines: {
51 - fill: 0.6,
52 - lineWidth: 0,
53 - },
54 - color: ['#ffebb2'],
55 - }, {
56 - label: 'Traffic',
57 - data: [[1, 20],
58 - [2, 20],
59 - [3, 40],
60 - [4, 30],
61 - [5, 40],
62 - [6, 35],
63 - [7, 47]],
64 - animator: { steps: 60, duration: 1000, start: 0 },
65 - lines: { lineWidth: 2 },
66 - shadowSize: 0,
67 - color: '#ffc247',
68 - },
69 -];
70 -const Morris = window.Morris;
71 -
72 -class Charts extends React.Component {
73 - constructor(prop) {
74 - super(prop);
75 - this.onResize = this.onResize.bind(this);
76 - this.state = {
77 - graph: null,
78 - };
79 - }
80 -
81 - componentDidMount() {
82 - this.initFlotChart();
83 - this.initEasyPie();
84 - this.initSparklineLine();
85 - this.initSparklinePie();
86 - this.initD3Charts();
87 - this.initMorrisLineChart();
88 - this.initMorrisAreaChart();
89 - this.initRickshaw();
90 - this.initEasyPieChart();
91 - this.initInteractiveSparklines();
92 - this.initSparklineAreaChart();
93 - this.initMorrisDonutCharts();
94 - window.addEventListener('resize', this.onResize);
95 - }
96 -
97 - componentWillUnmount() {
98 - window.removeEventListener('resize', this.onResize);
99 - }
100 -
101 - onResize() {
102 - this.initFlotChart();
103 - this.initSparklineLine();
104 - this.initD3Charts();
105 - this.initMorrisLineChart();
106 - this.initMorrisAreaChart();
107 - this.initEasyPieChart();
108 - this.initInteractiveSparklines();
109 - this.initSparklineAreaChart();
110 - this.initMorrisDonutCharts();
111 - this.onResizeRickshaw();
112 - this.onResizeFlotChat();
113 - }
114 -
115 - onResizeFlotChat() {
116 - const option = {
117 - xaxis: {
118 - tickLength: 0,
119 - tickDecimals: 0,
120 - min: 2,
121 - font: {
122 - lineHeight: 13,
123 - weight: 'bold',
124 - color: '#777',
125 - },
126 - },
127 - yaxis: {
128 - tickDecimals: 0,
129 - tickColor: '#f3f3f3',
130 - font: {
131 - lineHeight: 13,
132 - weight: 'bold',
133 - color: '#eee',
134 - },
135 - },
136 - grid: {
137 - backgroundColor: { colors: ['#fff', '#fff'] },
138 - borderWidth: 1,
139 - borderColor: '#f0f0f0',
140 - margin: 0,
141 - minBorderMargin: 0,
142 - labelMargin: 20,
143 - hoverable: true,
144 - clickable: true,
145 - mouseActiveRadius: 6,
146 - },
147 - legend: false,
148 - };
149 - $.plotAnimator($(this.flotChart), FlotChartData, option);
150 - }
151 -
152 - onResizeRickshaw() {
153 - this.state.graph.configure({ height: 130 });
154 - this.state.graph.render();
155 - }
156 -
157 - initEasyPie() {
158 - this.$easyPieChart.easyPieChart({
159 - barColor: '#8fe5d4',
160 - trackColor: '#f8f9fa',
161 - scaleColor: false,
162 - lineWidth: 10,
163 - size: 120,
164 - });
165 - }
166 -
167 - initSparklineAreaChart() { // eslint-disable-line
168 - this.$sparklineAreaChart.sparkline([2, 4, 6, 2, 7, 5, 3, 7, 8, 3, 6], {
169 - width: '100%',
170 - fillColor: '#e2e1ff',
171 - height: '100px',
172 - lineColor: 'transparent',
173 - spotColor: '#b7b3ff',
174 - minSpotColor: null,
175 - maxSpotColor: null,
176 - highlightSpotColor: '#ffebb2',
177 - highlightLineColor: '#ffebb2',
178 - }).sparkline([5, 3, 7, 8, 3, 6, 2, 4, 6, 2, 7], {
179 - composite: true,
180 - lineColor: 'transparent',
181 - spotColor: '#b7b3ff',
182 - fillColor: '#b7b3ff',
183 - minSpotColor: null,
184 - maxSpotColor: null,
185 - highlightSpotColor: '#b7b3ff',
186 - highlightLineColor: '#b7b3ff',
187 - });
188 - }
189 -
190 - initSparklineLine() {
191 - this.$sparklineLineChart.sparkline([1, 2, 4, 2, 3, 7], {
192 - width: '100%',
193 - height: '100px',
194 - lineColor: '#ffc247',
195 - fillColor: false,
196 - highlightLineColor: '#8fe5d4',
197 - spotColor: '#8fe5d4',
198 - minSpotColor: '#ffc247',
199 - maxSpotColor: '#ffc247',
200 - spotRadius: 2,
201 - lineWidth: 2,
202 - });
203 - }
204 -
205 - initD3Charts() {
206 - const streamLayers = (n, m, o) => {
207 - if (arguments.length < 3) {
208 - o = 0; //eslint-disable-line
209 - }
210 -
211 - const bump = (a) => {
212 - const x = 1 / (0.1 + Math.random());
213 - const y = (2 * Math.random()) - 0.5;
214 - const z = 10 / (0.1 + Math.random());
215 - for (let i = 0; i < m; i += 1) {
216 - const w = ((i / m) - y) * z;
217 - a[i] += x * Math.exp(-w * w);
218 - }
219 - };
220 -
221 - return d3.range(n).map(() => {
222 - const a = [];
223 - let i;
224 - for (i = 0; i < m; i += 1) {
225 - a[i] = o + (o * Math.random());
226 - }
227 - for (i = 0; i < 5; i += 1) {
228 - bump(a);
229 - }
230 - return a.map((d, iItem) => ({ x: iItem, y: Math.max(0, d) }));
231 - });
232 - };
233 -
234 - const testData = (streamNames, pointCount) => {
235 - const now = new Date().getTime();
236 - const day = 1000 * 60 * 60 * 24; // milliseconds
237 - const daysAgoCount = 60;
238 - const daysAgo = daysAgoCount * day;
239 - const daysAgoDate = now - daysAgo;
240 - const pointsCount = pointCount || 45; // less for better performance
241 - const daysPerPoint = daysAgoCount / pointsCount;
242 - return streamLayers(streamNames.length, pointsCount, 0.1).map((data, i) => ({
243 - key: streamNames[i],
244 - values: data.map(d => ({
245 - x: daysAgoDate + (d.x * day * daysPerPoint),
246 - y: Math.floor(d.y * 100), // just a coefficient,
247 - })),
248 - yAxis: i + 1,
249 - type: 'line',
250 - }));
251 - };
252 -
253 - nv.addGraph(() => {
254 - const chart = nv.models.lineChart()
255 - .useInteractiveGuideline(true)
256 - .margin({ left: 28, bottom: 30, right: 0 })
257 - .color(['#ffd7de', '#e2e1ff'])
258 - .showLegend(true);
259 - chart.xAxis
260 - .showMaxMin(false)
261 - .tickFormat(d => d3.time.format('%b %d')(new Date(d)));
262 - chart.yAxis
263 - .showMaxMin(false)
264 - .tickFormat(d3.format(',f'));
265 -
266 - const chartData = testData(['Search', 'Referral'], 50);
267 - d3.select(this.nvd3ChartLineSvg)
268 - .style('height', '300px')
269 - .datum(chartData.map((el) => {
270 - el.area = true;
271 - return el;
272 - }))
273 - .call(chart);
274 -
275 - return chart;
276 - });
277 -
278 - nv.addGraph(() => {
279 - const bar = nv.models.multiBarChart()
280 - .margin({ left: 28, bottom: 30, right: 0 })
281 - .color(['#8fe5d4', '#ffd7de']);
282 - bar.xAxis
283 - .showMaxMin(false)
284 - .tickFormat(d => d3.time.format('%b %d')(new Date(d)));
285 - bar.yAxis
286 - .showMaxMin(false)
287 - .tickFormat(d3.format(',f'));
288 - const barData = testData(['Uploads', 'Downloads'], 10).map((el) => {
289 - el.area = true;
290 - return el;
291 - });
292 -
293 - d3.select(this.nvd3ChartBarSvg)
294 - .style('height', '300px')
295 - .datum(barData.map((el) => {
296 - el.area = true;
297 - return el;
298 - }))
299 - .call(bar);
300 -
301 - return bar;
302 - });
303 - }
304 -
305 - initMorrisDonutCharts() {
306 - $(this.morrisDonutChart).html('');
307 - Morris.Donut({
308 - element: this.morrisDonutChart,
309 - colors: ['#ffd7de', '#ffebb2'],
310 - data: [
311 - { label: 'Download Sales', value: 12 },
312 - { label: 'In-Store Sales', value: 30 },
313 - ],
314 - });
315 - }
316 -
317 - initMorrisLineChart() {
318 - $(this.morrisLineChart).html('');
319 - Morris.Line({
320 - element: this.morrisLineChart,
321 - resize: true,
322 - data: [
323 - { y: '2006', a: 100, b: 90 },
324 - { y: '2007', a: 75, b: 65 },
325 - { y: '2008', a: 50, b: 40 },
326 - { y: '2009', a: 75, b: 65 },
327 - { y: '2010', a: 50, b: 40 },
328 - { y: '2011', a: 75, b: 65 },
329 - { y: '2012', a: 100, b: 90 },
330 - ],
331 - xkey: 'y',
332 - ykeys: ['a', 'b'],
333 - labels: ['Series A', 'Series B'],
334 - lineColors: ['#8fe5d4', '#ffebb2'],
335 - });
336 - }
337 -
338 - initMorrisAreaChart() {
339 - $(this.morrisAreaChart).html('');
340 - Morris.Area({
341 - element: this.morrisAreaChart,
342 - resize: true,
343 - data: [
344 - { y: '2006', a: 100, b: 90 },
345 - { y: '2007', a: 75, b: 65 },
346 - { y: '2008', a: 50, b: 40 },
347 - { y: '2009', a: 75, b: 65 },
348 - { y: '2010', a: 50, b: 40 },
349 - { y: '2011', a: 75, b: 65 },
350 - { y: '2012', a: 100, b: 90 },
351 - ],
352 - xkey: 'y',
353 - ykeys: ['a', 'b'],
354 - labels: ['Series A', 'Series B'],
355 - lineColors: ['#f59f9f', '#f55d5d'],
356 - lineWidth: 0,
357 - });
358 - }
359 -
360 - initFlotChart() {
361 - const option = {
362 - series: {
363 - lines: {
364 - show: true,
365 - lineWidth: 1,
366 - fill: false,
367 - fillColor: { colors: [{ opacity: 0.001 }, { opacity: 0.5 }] },
368 - },
369 - points: {
370 - show: false,
371 - fill: true,
372 - },
373 - shadowSize: 0,
374 - },
375 - legend: false,
376 - grid: {
377 - show: false,
378 - margin: 0,
379 - labelMargin: 0,
380 - axisMargin: 0,
381 - hoverable: true,
382 - clickable: true,
383 - tickColor: 'rgba(255,255,255,1)',
384 - borderWidth: 0,
385 - },
386 - };
387 - $(this.flotChart).plot(FlotChartData, option);
388 - this.onResizeFlotChat();
389 - }
390 -
391 - initFlotBarChart() {
392 - const barCustomised1 = [
393 - [1388534400000, 120],
394 - [1391212800000, 70],
395 - [1393632000000, 100],
396 - [1396310400000, 60],
397 - [1398902400000, 35],
398 - ];
399 - const barCustomised2 = [
400 - [1388534400000, 90],
401 - [1391212800000, 60],
402 - [1393632000000, 30],
403 - [1396310400000, 73],
404 - [1398902400000, 30],
405 - ];
406 - const barCustomised3 = [
407 - [1388534400000, 80],
408 - [1391212800000, 40],
409 - [1393632000000, 47],
410 - [1396310400000, 22],
411 - [1398902400000, 24],
412 - ];
413 - const flotBarsData = [
414 - {
415 - label: 'Apple',
416 - data: barCustomised1,
417 - bars: {
418 - show: true,
419 - barWidth: 12 * 24 * 60 * 60 * 300,
420 - fill: true,
421 - lineWidth: 0,
422 - order: 1,
423 - },
424 - },
425 - {
426 - label: 'Google',
427 - data: barCustomised2,
428 - bars: {
429 - show: true,
430 - barWidth: 12 * 24 * 60 * 60 * 300,
431 - fill: true,
432 - lineWidth: 0,
433 - order: 2,
434 - },
435 - },
436 - {
437 - label: 'Facebook',
438 - data: barCustomised3,
439 - bars: {
440 - show: true,
441 - barWidth: 12 * 24 * 60 * 60 * 300,
442 - fill: true,
443 - lineWidth: 0,
444 - order: 3,
445 - },
446 - },
447 -
448 - ];
449 - const flotBarsOptions = {
450 - series: {
451 - bars: {
452 - show: true,
453 - barWidth: 12 * 24 * 60 * 60 * 350,
454 - lineWidth: 0,
455 - order: 1,
456 - fillColor: {
457 - colors: [{
458 - opacity: 1,
459 - }, {
460 - opacity: 0.7,
461 - }],
462 - },
463 - },
464 - },
465 - xaxis: {
466 - mode: 'time',
467 - min: 1387497600000,
468 - max: 1400112000000,
469 - tickLength: 0,
470 - tickSize: [1, 'month'],
471 - axisLabel: 'Month',
472 - axisLabelUseCanvas: true,
473 - axisLabelFontSizePixels: 13,
474 - axisLabelPadding: 15,
475 - },
476 - yaxis: {
477 - axisLabel: 'Value',
478 - axisLabelUseCanvas: true,
479 - axisLabelFontSizePixels: 13,
480 - axisLabelPadding: 5,
481 - },
482 - grid: {
483 - hoverable: true,
484 - borderWidth: 0,
485 - },
486 - legend: {
487 - backgroundColor: 'transparent',
488 - labelBoxBorderColor: 'none',
489 - },
490 - colors: ['#64bd63', '#f0b518', '#F7653F'],
491 - };
492 - $(this.flotBarChart).plot(flotBarsData, flotBarsOptions);
493 - }
494 -
495 - initEasyPieChart() {
496 - $(this.easyPieChart).easyPieChart({
497 - barColor: '#5dc4bf',
498 - trackColor: '#ddd',
499 - scaleColor: false,
500 - lineWidth: 10,
501 - size: 120,
502 - });
503 - }
504 -
505 - initSparklinePie() {
506 - const data = [2, 4, 6];
507 - const option = {
508 - type: 'pie',
509 - width: '100px',
510 - height: '100px',
511 - sliceColors: ['#b7b3ff', '#ffebb2', '#f8f9fa'],
512 - };
513 - $(this.sparklinePie).sparkline(data, option);
514 - }
515 -
516 - initSparklineComposite() {
517 - const data = [
518 - [2, 4, 6, 2, 7, 5, 3, 7, 8, 3, 6],
519 - [5, 3, 7, 8, 3, 6, 2, 4, 6, 2, 7],
520 - ];
521 - const option = [{
522 - width: '99%',
523 - fillColor: '#ddd',
524 - height: '100px',
525 - lineColor: 'transparent',
526 - spotColor: '#c0d0f0',
527 - minSpotColor: null,
528 - maxSpotColor: null,
529 - highlightSpotColor: '#ddd',
530 - highlightLineColor: '#ddd',
531 - }, {
532 - lineColor: 'transparent',
533 - spotColor: '#c0d0f0',
534 - fillColor: 'rgba(192, 208, 240, 0.76)',
535 - minSpotColor: null,
536 - maxSpotColor: null,
537 - highlightSpotColor: '#ddd',
538 - highlightLineColor: '#ddd',
539 - }];
540 - $(this.sparklineComposite).sparkline(data[0], option[0]);
541 - $(this.sparklineComposite).sparkline(data[1], $.extend({ composite: true }, option[1]));
542 - }
543 -
544 - initInteractiveSparklines() {
545 - const data = [9, 12, 14, 15, 10, 14, 20];
546 - const option = { type: 'bar', barColor: '#FFC247', height: '30px', barWidth: 6, barSpacing: 2 };
547 - const option2 = { type: 'bar', barColor: '#FFF8E3', height: '30px', barWidth: 6, barSpacing: 2 };
548 - $(this.InteractiveSparkline1).sparkline(data, option);
549 - $(this.InteractiveSparkline2).sparkline(data, option2);
550 - }
551 -
552 - initRickshaw() {
553 - const seriesData = [[], []];
554 - const random = new Rickshaw.Fixtures.RandomData(30);
555 - for (let i = 0; i < 30; i += 1) {
556 - random.addData(seriesData);
557 - }
558 -
559 - // eslint-disable-next-line
560 - this.state.graph = new Rickshaw.Graph({
561 - element: this.rickshawChart,
562 - height: 130,
563 - series: [
564 - {
565 - color: '#ffebb2',
566 - data: seriesData[0],
567 - name: 'Uploads',
568 - }, {
569 - color: '#fff8e3',
570 - data: seriesData[1],
571 - name: 'Downloads',
572 - },
573 - ],
574 - });
575 -
576 - const hoverDetail = new Rickshaw.Graph.HoverDetail({
577 - graph: this.state.graph,
578 - xFormatter: x => new Date(x * 1000).toString(),
579 - });
580 -
581 - hoverDetail.show();
582 -
583 - setInterval(() => {
584 - random.removeData(seriesData);
585 - random.addData(seriesData);
586 - this.state.graph.update();
587 - }, 1000);
588 -
589 - this.state.graph.render();
590 - }
591 -
592 - render() {
593 - return (
594 - <div className={s.root}>
595 - <ol className="breadcrumb">
596 - <li className="breadcrumb-item">YOU ARE HERE</li>
597 - <li className="breadcrumb-item active">Charts</li>
598 - </ol>
599 - <h1 className="page-title">Visual - <span className="fw-semi-bold">Charts</span></h1>
600 - <div>
601 - <Row>
602 - <Col lg={6} xl={5} xs={12}>
603 - <Widget
604 - title={<h5>Flot <span className="fw-semi-bold">Charts</span></h5>}
605 - close collapse
606 - >
607 - <div>
608 - <div className="mt mb" id="flotChart" ref={(r) => { this.flotChart = r; }} style={{ width: '100%', height: '260px' }} />
609 - <div className="chart-tooltip" id="flot-main-tooltip" style={{ opacity: 0 }} />
610 - <p className="fs-mini text-muted">
611 - Flot is a <span className="fw-semi-bold">pure</span> JavaScript plotting library for jQuery, with a
612 - focus on simple usage, attractive looks and interactive features.
613 - </p>
614 - <h5 className="mt">Interactive <span className="fw-semi-bold">Sparklines</span></h5>
615 - <Row className="mt">
616 - <Col md={6} xs={12}>
617 - <div className="stats-row">
618 - <div className="stat-item">
619 - <p className="value5 fw-thin">34 567</p>
620 - <h6 className="name text-muted m-0 fs-mini">Overall Values</h6>
621 - </div>
622 - <div className="stat-item stat-item-mini-chart">
623 - <div className="sparkline" ref={(r) => { this.InteractiveSparkline1 = r; }} />
624 - </div>
625 - </div>
626 - </Col>
627 - <Col md={6} xs={12}>
628 - <div className="stats-row">
629 - <div className="stat-item">
630 - <p className="value5 fw-thin">34 567</p>
631 - <h6 className="name text-muted m-0 fs-mini">Overall Values</h6>
632 - </div>
633 - <div className="stat-item stat-item-mini-chart">
634 - <div className="sparkline" ref={(r) => { this.InteractiveSparkline2 = r; }} />
635 - </div>
636 - </div>
637 - </Col>
638 - </Row>
639 - <p className="fs-mini text-muted">
640 - This jQuery plugin generates sparklines (small inline charts) directly in the browser using
641 - data supplied either inline in the HTML, or via javascript.
642 - </p>
643 - </div>
644 - </Widget>
645 - </Col>
646 - <Col lg={6} xl={7} xs={12}>
647 - <Row>
648 - <Col xs={12} lg={7}>
649 - <Widget
650 - title={<h5> Easy <span className="fw-semi-bold">Pie Charts</span></h5>}
651 - collapse close
652 - >
653 - <div>
654 - <div ref={(r) => { this.$easyPieChart = $(r); }} className="mb text-center" data-percent="47" />
655 - <p className="fs-mini text-muted">
656 - Easy pie chart is a jQuery plugin that uses the canvas element to render
657 - simple pie charts for single values. These charts are highly customizable,
658 - very easy to implement, scale to the resolution of the display of the client
659 - to provide sharp charts even on retina displays.
660 - </p>
661 - </div>
662 - </Widget>
663 - </Col>
664 - <Col xs={12} lg={5}>
665 - <Widget
666 - title={<h5> Sparkline <span className="fw-semi-bold">Pie Charts</span></h5>}
667 - collapse close
668 - >
669 - <div>
670 - <p className="fs-mini text-muted">
671 - Each example displayed below takes just 1 line of HTML or javascript to generate.
672 - </p>
673 - <div ref={(r) => { this.sparklinePie = r; }} className="chart-overflow-bottom mb-0 text-center" />
674 - <p className="fs-mini text-muted">
675 - Nevertheless Sparkline charts can be configured quite accurate.
676 - </p>
677 - </div>
678 - </Widget>
679 - </Col>
680 - <Col xs={12}>
681 - <Widget
682 - title={<h5> Sparkline <span className="fw-semi-bold">Line Charts</span></h5>}
683 - collapse close
684 - >
685 - <div>
686 - <div ref={(r) => { this.$sparklineLineChart = $(r); }} className="chart-overflow-bottom mb-0 text-center" />
687 - </div>
688 - </Widget>
689 - </Col>
690 - </Row>
691 - </Col>
692 - <Col xs={12}>
693 - <Widget
694 - title={<h5><span className="fw-semi-bold">D3</span> Charts</h5>}
695 - close
696 - >
697 - <div>
698 - <p className="fs-mini text-muted">
699 - This project is an attempt to build re-usable charts and chart components for <span
700 - className="fw-semi-bold"
701 - >d3.js</span> without
702 - taking away the power that d3.js gives you.
703 - </p>
704 - <div>
705 - <svg ref={(r) => { this.nvd3ChartLineSvg = r; }} />
706 - </div>
707 - </div>
708 - </Widget>
709 - </Col>
710 - <Col lg={7} xs={12}>
711 - <Widget
712 - title={<h5><span className="fw-semi-bold">D3</span> Charts</h5>}
713 - close
714 - >
715 - <div>
716 - <p className="fs-mini text-muted">
717 - This is a very young collection of components, with the goal of keeping these components
718 - very customizeable.
719 - </p>
720 - <div>
721 - <svg ref={(r) => { this.nvd3ChartBarSvg = r; }} />
722 - </div>
723 - </div>
724 - </Widget>
725 - </Col>
726 - <Col lg={5} xs={12}>
727 - <Widget
728 - title={<h5> Realtime <span className="fw-semi-bold">Rickshaw</span></h5>}
729 - collapse close
730 - >
731 - <div>
732 - <p className="fs-mini text-muted mb-lg">
733 - Rickshaw provides the elements you need to create interactive graphs: renderers, legends,
734 - hovers, range selectors, etc. You put the pieces together.
735 - It&apos;s all based on <span className="fw-semi-bold">d3</span> underneath, so graphs are drawn with
736 - standard
737 - SVG and styled with CSS.
738 - Customize all you like with techniques you already know.
739 - </p>
740 - <h5>720 Users</h5>
741 - <Progress value="60" color="gray" size="xs" className="mb-sm progress-xs" />
742 - <p className="fs-mini text-muted mb-lg">
743 - <span className="circle bg-warning-light text-white">
744 - <i className="fa fa-circle" />
745 - </span>
746 - &nbsp;
747 - Target <span className="fw-semi-bold">820</span> users
748 - is <span className="fw-semi-bold">96%</span> reached.
749 - </p>
750 - <div ref={(r) => { this.rickshawChart = r; }} className="chart-overflow-bottom" style={{ height: '130px' }} />
751 - </div>
752 - </Widget>
753 - </Col>
754 - </Row>
755 - <Row>
756 - <Col lg={6} xs={12}>
757 - <Widget
758 - title={<h5> Morris <span className="fw-semi-bold">Area Charts</span></h5>}
759 - close collapse
760 - >
761 - <div>
762 - <p className="fs-mini text-muted">
763 - Good-looking charts shouldn&apos;t be difficult.
764 - The public API is terribly simple. It&apos;s just one function: <code>Morris.Line(options)</code>,
765 - where options is an object containing some of the following configuration options.
766 - </p>
767 - <div className="text-center" ref={(r) => { this.morrisAreaChart = r; }} style={{ height: '343px' }} />
768 - </div>
769 - </Widget>
770 - </Col>
771 - <Col lg={6} xs={12}>
772 - <Widget
773 - title={<h5> Morris <span className="fw-semi-bold">Line Charts</span></h5>}
774 - close collapse
775 - >
776 - <div>
777 - <p className="fs-mini text-muted">
778 - Good-looking charts shouldn&apos;t be difficult.
779 - The public API is terribly simple. It&apos;s just one function: <code>Morris.Line(options)</code>,
780 - where options is an object containing some of the following configuration options.
781 - </p>
782 - <div className="text-center" ref={(r) => { this.morrisLineChart = r; }} style={{ height: '343px' }} />
783 - </div>
784 - </Widget>
785 - </Col>
786 - </Row>
787 - <Row>
788 - <Col xs={12} lg={6} xl={3}>
789 - <Widget
790 - title={<h5>Area <span className="fw-semi-bold">Sparkline</span></h5>}
791 - close collapse
792 - >
793 - <p className="fs-mini text-muted">Each example displayed below takes just 1 line of HTML or javascript to generate.</p>
794 - <div className="stats-row text-muted mt">
795 - <div className="stat-item">
796 - <h6 className="name">Overall Growth</h6>
797 - <p className="value">43.75%</p>
798 - </div>
799 - <div className="stat-item">
800 - <h6 className="name">Montly</h6>
801 - <p className="value">86.34%</p>
802 - </div>
803 - </div>
804 - <p className="text-muted fs-mini">
805 - <span className="fw-semi-bold">17% higher</span> than last month
806 - </p>
807 - <div className="chart-overflow-bottom" ref={(r) => { this.$sparklineAreaChart = $(r); }} />
808 - </Widget>
809 - </Col>
810 - <Col lg={6} xl={6} xs={12}>
811 - <Widget
812 - title={<h5> Flot <span className="fw-semi-bold">Bars</span></h5>}
813 - close collapse
814 - >
815 - <div>
816 - <FlotBars />
817 - <p className="fs-mini text-muted">
818 - Flot is a <span className="fw-semi-bold">pure</span> JavaScript plotting library for jQuery, with a
819 - focus on simple usage, attractive looks and interactive features.
820 - </p>
821 - </div>
822 - </Widget>
823 - </Col>
824 - <Col lg={6} xl={3} xs={12}>
825 - <Widget
826 - title={<h5> Morris <span className="fw-semi-bold">Donut Charts</span></h5>}
827 - close collapse
828 - >
829 - <div>
830 - <div className="text-center" ref={(r) => { this.morrisDonutChart = r; }} style={{ height: '180px' }} />
831 - <p className="fs-mini text-muted">
832 - Donuts a great for representing some parted information like traffice sources,
833 - disk partitions, etc.
834 - This really couldn&apos;t be easier. Create a Donut chart using <code>Morris.Donut(options)</code>,
835 - with only few options.
836 - </p>
837 - </div>
838 - </Widget>
839 - </Col>
840 - </Row>
841 - </div>
842 - </div>
843 - );
844 - }
845 -
846 -}
847 -
848 -export default Charts;
1 -import React from 'react';
2 -import {
3 - Breadcrumb,
4 - BreadcrumbItem,
5 - Row,
6 - Col,
7 - Table,
8 - Button,
9 -} from 'reactstrap';
10 -
11 -import Widget from '../../../../components/Widget';
12 -
13 -const tableData = [
14 - {
15 - id: 0,
16 - state: 'Success',
17 - usage: ['text-success', 'btn-success'],
18 - },
19 - {
20 - id: 1,
21 - state: 'Warning',
22 - usage: ['badge-warning', 'bg-warning'],
23 - },
24 - {
25 - id: 2,
26 - state: 'Danger',
27 - usage: ['btn-danger', 'text-danger'],
28 - },
29 - {
30 - id: 3,
31 - state: 'Info',
32 - usage: ['alert-info', 'badge-info'],
33 - },
34 - {
35 - id: 4,
36 - state: 'Primary',
37 - usage: ['bg-primary', 'text-primary'],
38 - },
39 - {
40 - id: 5,
41 - state: 'Secondary',
42 - usage: ['bg-secondary'],
43 - },
44 -];
45 -
46 -const Colors = () => (
47 - <div>
48 - <Breadcrumb>
49 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
50 - <BreadcrumbItem active>Colors</BreadcrumbItem>
51 - </Breadcrumb>
52 - <h1 className="page-title">Colors</h1>
53 - <Row>
54 - <Col>
55 - <Widget
56 - title={<h5>States <span className="fw-semi-bold">Colors</span></h5>}
57 - close collapse
58 - >
59 - <p>Sing comes with a number of state colors that can be applied to
60 - the most of elements and components. It reuses Bootstrap&apos;s original 6 states:</p>
61 - <Table>
62 - <thead>
63 - <tr>
64 - <th>STATE</th>
65 - <th>PREVIEW</th>
66 - <th>CLASS POSTFIX</th>
67 - <th>USAGE EXAMPLE</th>
68 - </tr>
69 - </thead>
70 - <tbody>
71 - {tableData.map(({ state, usage, id }) =>
72 - <tr key={id}>
73 - <th scope="row" className="fw-thin">{state}</th>
74 - <td><span className={`circle bg-${state.toLowerCase()}`}>&nbsp;</span></td>
75 - <td><code>*-{state.toLowerCase()}</code></td>
76 - <td>{usage.map(item => <code key={item} className="mr-xs">{item}</code>)}</td>
77 - </tr>,
78 - )}
79 - </tbody>
80 - </Table>
81 - </Widget>
82 - </Col>
83 - </Row>
84 - <Row>
85 - <Col xs={12} md={6}>
86 - <Widget
87 - title={<h5>Text <span className="fw-semi-bold">Colors</span></h5>}
88 - close collapse
89 - >
90 - <p>Convey meaning through color with a handful of color utility classes.
91 - Includes support for styling links with hover states, too. Use <code>text-*</code> class to fill text.</p>
92 - <div className="widget-padding-md border rounded w-100 h-100 text-left">
93 - <h1 className="text-danger">h1. Heading</h1>
94 - <h2 className="text-warning">h2. Heading</h2>
95 - <h3 className="text-success">h3. Heading</h3>
96 - <h4 className="text-primary">h4. Heading</h4>
97 - <h5 className="text-info">h5. Heading</h5>
98 - <h6 className="text-inverse">h6. Heading</h6>
99 - </div>
100 - </Widget>
101 - </Col>
102 - <Col xs={12} md={6}>
103 - <Widget
104 - title={<h5>Example <span className="fw-semi-bold">Buttons</span></h5>}
105 - close collapse
106 - >
107 - <p>Use any of the available button classes to quickly create a styled button.
108 - Semantically distinguishable beauty.</p>
109 - <Button className="width-100 mb-xs mr-xs" color="default">Default</Button>
110 - <Button className="width-100 mb-xs mr-xs" color="primary">Primary</Button>
111 - <Button className="width-100 mb-xs mr-xs" color="info">Info</Button>
112 - <Button className="width-100 mb-xs mr-xs" color="success">Success</Button>
113 - <Button className="width-100 mb-xs mr-xs" color="warning">Warning</Button>
114 - <Button className="width-100 mb-xs mr-xs" color="danger">Danger</Button>
115 - <Button className="width-100 mb-xs mr-xs" color="gray">Gray</Button>
116 - <Button className="width-100 mb-xs mr-xs" color="inverse">Inverse</Button>
117 - </Widget>
118 - </Col>
119 - </Row>
120 - </div>
121 -);
122 -
123 -export default Colors;
1 -{
2 - "name": "Colors",
3 - "version": "0.0.0",
4 - "main": "./Colors.js",
5 - "private": true
6 -}
1 -import React from 'react';
2 -import {
3 - Breadcrumb,
4 - BreadcrumbItem,
5 - Row,
6 - Col,
7 - Table,
8 -} from 'reactstrap';
9 -
10 -import Widget from '../../../../components/Widget';
11 -
12 -const Typography = () => (
13 - <div>
14 - <Breadcrumb>
15 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
16 - <BreadcrumbItem active>Grid</BreadcrumbItem>
17 - </Breadcrumb>
18 - <h1 className="page-title">Grid <span className="fw-semi-bold">System</span></h1>
19 - <Row>
20 - <Col xs={12} md={6}>
21 - <Widget
22 - title={<h5><span className="fw-semi-bold">How</span> it works</h5>}
23 - close collapse
24 - >
25 - <p>
26 - Bootstraps grid system uses a series of containers, rows, and columns to layout
27 - and align content. Its built with flexbox and is fully responsive. Below is an
28 - example and an in-depth look at how the grid comes together.
29 - </p>
30 - <div className="bg-light p-3">
31 - <Row className="mb-lg">
32 - <Col xs={4}>
33 - <div className="py-4 bg-primary text-center text-white">
34 - One of three columns
35 - </div>
36 - </Col>
37 - <Col xs={4}>
38 - <div className="py-4 bg-primary text-center text-white">
39 - One of three columns
40 - </div>
41 - </Col>
42 - <Col xs={4}>
43 - <div className="py-4 bg-primary text-center text-white">
44 - One of three columns
45 - </div>
46 - </Col>
47 - </Row>
48 - <pre className="bg-light border-0 w-100 h-100">
49 - <code className="text-danger">{'<Container>\n'}</code>
50 - <code className="text-success">{' <Row>\n'}</code>
51 - <code className="text-info">{' <Col xs={4}>\n'}</code>
52 - <code>{' One of three columns\n'}</code>
53 - <code className="text-info">{' </Col>\n'}</code>
54 - <code className="text-info">{' <Col xs={4}>\n'}</code>
55 - <code>{' One of three columns\n'}</code>
56 - <code className="text-info">{' </Col>\n'}</code>
57 - <code className="text-info">{' <Col xs={4}>\n'}</code>
58 - <code>{' One of three columns\n'}</code>
59 - <code className="text-info">{' </Col>\n'}</code>
60 - <code className="text-success">{' </Row>\n'}</code>
61 - <code className="text-danger">{'</Container>'}</code>
62 - </pre>
63 - </div>
64 - </Widget>
65 - </Col>
66 - <Col xs={12} md={6}>
67 - <Widget
68 - title={<h5><span className="fw-semi-bold">Equal</span> width</h5>}
69 - close collapse
70 - >
71 - <p>
72 - For example, here are two grid layouts that apply to every device and viewport,
73 - from xs to xl. Add any number of unit-less classes for each breakpoint you
74 - need and every column will be the same width.
75 - </p>
76 - <div className="bg-light p-3">
77 - <Row className="mb-lg">
78 - <Col>
79 - <div className="py-4 bg-primary text-center text-white">
80 - 1 of 2
81 - </div>
82 - </Col>
83 - <Col>
84 - <div className="py-4 bg-primary text-center text-white">
85 - 2 of 2
86 - </div>
87 - </Col>
88 - </Row>
89 - <pre className="bg-light border-0 w-100 h-100">
90 - <code className="text-danger">{'<Container>\n'}</code>
91 - <code className="text-success">{' <Row>\n'}</code>
92 - <code className="text-info">{' <Col>\n'}</code>
93 - <code>{' 1 of 2\n'}</code>
94 - <code className="text-info">{' </Col>\n'}</code>
95 - <code className="text-info">{' <Col>\n'}</code>
96 - <code>{' 1 of 2\n'}</code>
97 - <code className="text-info">{' </Col>\n'}</code>
98 - <code className="text-success">{' </Row>\n'}</code>
99 - <code className="text-danger">{'</Container>'}</code>
100 - </pre>
101 - </div>
102 - </Widget>
103 - </Col>
104 - </Row>
105 - <Row>
106 - <Col>
107 - <Widget
108 - title={<h5><span className="fw-semi-bold">Grid</span> options</h5>}
109 - close collapse
110 - >
111 - <p>
112 - While Bootstrap uses <code>em</code>s or <code>rem</code>s for defining
113 - most sizes, <code>px</code>s are used for
114 - grid breakpoints and container widths. This is because the viewport width is in
115 - pixels and does not change with the font size. See how aspects of the Bootstrap grid
116 - system work across multiple devices with a handy table.
117 - </p>
118 - <Table striped responsive>
119 - <thead>
120 - <tr>
121 - <th />
122 - <th className="text-center">
123 - Extra small<br />
124 - <small>&lt;576px</small>
125 - </th>
126 - <th className="text-center">
127 - Small<br />
128 - <small>576px</small>
129 - </th>
130 - <th className="text-center">
131 - Medium<br />
132 - <small>768px</small>
133 - </th>
134 - <th className="text-center">
135 - Large<br />
136 - <small>992px</small>
137 - </th>
138 - <th className="text-center">
139 - Extra large<br />
140 - <small>1200px</small>
141 - </th>
142 - </tr>
143 - </thead>
144 - <tbody>
145 - <tr>
146 - <th className="text-nowrap" scope="row">Max container width</th>
147 - <td>None (auto)</td>
148 - <td>540px</td>
149 - <td>720px</td>
150 - <td>960px</td>
151 - <td>1140px</td>
152 - </tr>
153 - <tr>
154 - <th className="text-nowrap" scope="row">Component property</th>
155 - <td><code>{'<Col xs={}>'}</code></td>
156 - <td><code>{'<Col sm={}>'}</code></td>
157 - <td><code>{'<Col md={}>'}</code></td>
158 - <td><code>{'<Col lg={}>'}</code></td>
159 - <td><code>{'<Col xl={}>'}</code></td>
160 - </tr>
161 - <tr>
162 - <th className="text-nowrap" scope="row"># of columns</th>
163 - <td colSpan="5">12</td>
164 - </tr>
165 - <tr>
166 - <th className="text-nowrap" scope="row">Gutter width</th>
167 - <td colSpan="5">30px (15px on each side of a column)</td>
168 - </tr>
169 - <tr>
170 - <th className="text-nowrap" scope="row">Nestable</th>
171 - <td colSpan="5">Yes</td>
172 - </tr>
173 - <tr>
174 - <th className="text-nowrap" scope="row">Column ordering</th>
175 - <td colSpan="5">Yes</td>
176 - </tr>
177 - </tbody>
178 - </Table>
179 - </Widget>
180 - </Col>
181 - </Row>
182 - <Row>
183 - <Col xs={12} md={6}>
184 - <Widget
185 - title={<h5>Vertical <span className="fw-semi-bold">Alignment</span></h5>}
186 - close collapse
187 - >
188 - <p>Use flexbox alignment utilities to vertically and horizontally align columns.</p>
189 - <div className="bg-light p-3">
190 - <Row className="mb-lg" style={{ height: '150px' }}>
191 - <Col className="align-self-start">
192 - <div className="py-4 bg-primary text-center text-white">
193 - Start
194 - </div>
195 - </Col>
196 - <Col className="align-self-center">
197 - <div className="py-4 bg-primary text-center text-white">
198 - Center
199 - </div>
200 - </Col>
201 - <Col className="align-self-end">
202 - <div className="py-4 bg-primary text-center text-white">
203 - End
204 - </div>
205 - </Col>
206 - </Row>
207 - <pre className="bg-light border-0 w-100 h-100">
208 - <code className="text-danger">{'<Container>\n'}</code>
209 - <code className="text-success">{' <Row>\n'}</code>
210 - <code className="text-info">{' <Col className="align-self-start">\n'}</code>
211 - <code>{' Start\n'}</code>
212 - <code className="text-info">{' </Col>\n'}</code>
213 - <code className="text-info">{' <Col className="align-self-center">\n'}</code>
214 - <code>{' Center\n'}</code>
215 - <code className="text-info">{' </Col>\n'}</code>
216 - <code className="text-info">{' <Col className="align-self-end">\n'}</code>
217 - <code>{' End\n'}</code>
218 - <code className="text-info">{' </Col>\n'}</code>
219 - <code className="text-success">{' </Row>\n'}</code>
220 - <code className="text-danger">{'</Container>'}</code>
221 - </pre>
222 - </div>
223 - </Widget>
224 - </Col>
225 - <Col xs={12} md={6}>
226 - <Widget
227 - title={<h5>Vertical <span className="fw-semi-bold">Alignment</span></h5>}
228 - close collapse
229 - >
230 - <p>Use flexbox alignment utilities to vertically and horizontally align columns.</p>
231 - <div className="bg-light p-3">
232 - <Row className="mb-lg justify-content-end">
233 - <Col xs={3}>
234 - <div className="py-4 bg-primary text-center text-white">
235 - 1
236 - </div>
237 - </Col>
238 - <Col xs={3}>
239 - <div className="py-4 bg-primary text-center text-white">
240 - 2
241 - </div>
242 - </Col>
243 - </Row>
244 - <Row className="mb-lg justify-content-around">
245 - <Col xs={3}>
246 - <div className="py-4 bg-primary text-center text-white">
247 - 1
248 - </div>
249 - </Col>
250 - <Col xs={3}>
251 - <div className="py-4 bg-primary text-center text-white">
252 - 2
253 - </div>
254 - </Col>
255 - </Row>
256 - <Row className="mb-lg justify-content-between">
257 - <Col xs={3}>
258 - <div className="py-4 bg-primary text-center text-white">
259 - 1
260 - </div>
261 - </Col>
262 - <Col xs={3}>
263 - <div className="py-4 bg-primary text-center text-white">
264 - 2
265 - </div>
266 - </Col>
267 - <Col xs={3}>
268 - <div className="py-4 bg-primary text-center text-white">
269 - 3
270 - </div>
271 - </Col>
272 - </Row>
273 - <pre className="bg-light border-0 w-100 h-100">
274 - <code className="text-danger">{'<Container>\n'}</code>
275 - <code className="text-success">{' <Row className="justify-content-end">\n'}</code>
276 - <code className="text-info">{' <Col>\n'}</code>
277 - <code>{' 1\n'}</code>
278 - <code className="text-info">{' </Col>\n'}</code>
279 - <code className="text-info">{' <Col>\n'}</code>
280 - <code>{' 2\n'}</code>
281 - <code className="text-info">{' </Col>\n'}</code>
282 - <code className="text-success">{' </Row>\n'}</code>
283 - <code className="text-success">{' <Row className="justify-content-around">\n'}</code>
284 - <code className="text-info">{' <Col>\n'}</code>
285 - <code>{' 1\n'}</code>
286 - <code className="text-info">{' </Col>\n'}</code>
287 - <code className="text-info">{' <Col>\n'}</code>
288 - <code>{' 2\n'}</code>
289 - <code className="text-info">{' </Col>\n'}</code>
290 - <code className="text-success">{' </Row>\n'}</code>
291 - <code className="text-success">{' <Row className="justify-content-between">\n'}</code>
292 - <code className="text-info">{' <Col>\n'}</code>
293 - <code>{' 1\n'}</code>
294 - <code className="text-info">{' </Col>\n'}</code>
295 - <code className="text-info">{' <Col>\n'}</code>
296 - <code>{' 2\n'}</code>
297 - <code className="text-info">{' </Col>\n'}</code>
298 - <code className="text-info">{' <Col>\n'}</code>
299 - <code>{' 3\n'}</code>
300 - <code className="text-info">{' </Col>\n'}</code>
301 - <code className="text-success">{' </Row>\n'}</code>
302 - <code className="text-danger">{'</Container>'}</code>
303 - </pre>
304 - </div>
305 - </Widget>
306 - </Col>
307 - </Row>
308 - </div>
309 -);
310 -
311 -export default Typography;
1 -{
2 - "name": "Grid",
3 - "version": "0.0.0",
4 - "main": "./Grid.js",
5 - "private": true
6 -}
1 -import React from 'react';
2 -import {
3 - Breadcrumb,
4 - BreadcrumbItem,
5 - Row,
6 - Col,
7 -} from 'reactstrap';
8 -
9 -import Widget from '../../../../components/Widget';
10 -
11 -const Typography = () => (
12 - <div>
13 - <Breadcrumb>
14 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
15 - <BreadcrumbItem active>Typography</BreadcrumbItem>
16 - </Breadcrumb>
17 - <h1 className="page-title">Typography - <span className="fw-semi-bold">Texts & Display</span></h1>
18 - <Row>
19 - <Col xs={12} md={6}>
20 - <Widget
21 - title={<h5>Headings <small className="text-muted">Default and customized</small></h5>}
22 - close collapse
23 - >
24 - <h4>Default headings</h4>
25 - <p>Basic headings for everyday use</p>
26 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
27 - <Row>
28 - <Col sm={6}>
29 - <h1>h1. Heading</h1>
30 - <h2>h2. Heading</h2>
31 - <h3>h3. Heading</h3>
32 - <h4>h4. Heading</h4>
33 - <h5>h5. Heading</h5>
34 - <h6>h6. Heading</h6>
35 - </Col>
36 - <Col sm={6}>
37 - <h1 className="text-danger">h1. Heading</h1>
38 - <h2 className="text-warning">h2. Heading</h2>
39 - <h3 className="text-success">h3. Heading</h3>
40 - <h4 className="text-primary">h4. Heading</h4>
41 - <h5 className="text-info">h5. Heading</h5>
42 - <h6 className="text-inverse">h6. Heading</h6>
43 - </Col>
44 - </Row>
45 - </div>
46 - <h4 className="mt-5">Customized headings</h4>
47 - <p>Enhanced with additional text</p>
48 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
49 - <h3>
50 - Headings <small>And some clarification text</small>
51 - </h3>
52 - </div>
53 - <h4 className="mt-5">Display</h4>
54 - <p>Headings to stand out</p>
55 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
56 - <h1 className="display-1">Display 1</h1>
57 - <h1 className="display-2">Display 2</h1>
58 - <h1 className="display-3">Display 3</h1>
59 - <h1 className="display-4">Display 4</h1>
60 - </div>
61 - <h4 className="mt-5">Lead</h4>
62 - <p>Make a paragraph stand out by adding <code className="highlighter-rouge">.lead</code>.</p>
63 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
64 - <p className="lead">Sing App is admin dashboard template built with Bootstrap</p>
65 - </div>
66 - </Widget>
67 - </Col>
68 - <Col xs={12} md={6}>
69 - <Widget
70 - title={<h5>Body texts <small className="text-muted">Variations</small></h5>}
71 - close collapse
72 - >
73 - <h4>Basic texts</h4>
74 - <p>Styling for common texts</p>
75 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
76 - <p>You can use the mark tag to <mark>highlight</mark> text.</p>
77 - <p><del>This line of text is meant to be treated as deleted text.</del></p>
78 - <p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
79 - <p><small>This line of text is meant to be treated as fine print.</small></p>
80 - <p><em>This line rendered as italicized text.</em></p>
81 - <p><strong>This line rendered as bold text.</strong></p>
82 - </div>
83 - <h4 className="mt-5">Font weights</h4>
84 - <p>Various font weights supported</p>
85 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
86 - <p>Thin (default) font weight</p>
87 - <p className="fw-normal">Normal font weight</p>
88 - <p className="fw-semi-bold">Semi bold to empasize important thing</p>
89 - <p className="fw-bold">Bold font as a high priority</p>
90 - </div>
91 - <h4 className="mt-5">Colors</h4>
92 - <p>Bootstrap state colors can be applied to texts too</p>
93 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
94 - <p className="text-danger">Some danger text</p>
95 - <p className="text-warning">Some warning text</p>
96 - <p className="text-success">Some succes text</p>
97 - <p className="text-primary">Some primary text</p>
98 - <p className="text-info">Some info text</p>
99 - </div>
100 - <h4 className="mt-5">Blockquotes</h4>
101 - <p>Citing someone is really easy</p>
102 - <div className="widget-padding-md w-100 h-100 text-left border rounded">
103 - <blockquote className="blockquote">
104 - <p>Don&apos;t get set into one form, adapt it and build your own, and let
105 - it grow, be like water. Empty your mind, be formless, shapeless like water.
106 - Now you put water in a cup, it becomes the cup; You put water into a bottle it
107 - becomes the bottle; You put it in a teapot it becomes the teapot. Now water can
108 - flow or it can crash. Be water, my friend.</p>
109 - <footer className="blockquote-footer">Bruce Lee in <cite title="A Warrior's Journey">A Warrior&apos;s Journey</cite></footer>
110 - </blockquote>
111 - </div>
112 - </Widget>
113 - </Col>
114 - </Row>
115 - </div>
116 -);
117 -
118 -export default Typography;
1 -{
2 - "name": "Typography",
3 - "version": "0.0.0",
4 - "main": "./Typography.js",
5 - "private": true
6 -}
1 -import React, { Component } from 'react';
2 -import cx from 'classnames';
3 -import {
4 - Breadcrumb,
5 - BreadcrumbItem,
6 - Alert,
7 -} from 'reactstrap';
8 -
9 -import Filters from './components/Filters/Filters';
10 -import MessageTable from './components/MessageTable/MessageTable';
11 -
12 -import s from './Email.module.scss';
13 -
14 -class Email extends Component {
15 - state = {
16 - isNotificationOpen: true,
17 - filter: null,
18 - openedMessage: null,
19 - compose: false,
20 - composeData: null,
21 - alertAfter: false,
22 - }
23 -
24 - componentDidMount() {
25 - setTimeout(() => { this.fixAlert(); }, 0);
26 - }
27 -
28 - fixAlert() {
29 - this.setState({ alertAfter: true });
30 - }
31 -
32 - filter = (filter) => {
33 - this.setState({ filter, compose: false, composeData: null });
34 - }
35 -
36 - closeNotification() {
37 - this.setState({ isNotificationOpen: false });
38 - }
39 -
40 - openMessage = (id) => {
41 - this.setState(pvState => ({
42 - openedMessage: id,
43 - compose: id === null ? false : pvState.compose,
44 - composeData: id === null ? null : pvState.composeData,
45 - }));
46 - }
47 -
48 - changeCompose = (compose, data) => {
49 - this.setState({ compose });
50 -
51 - if (data) {
52 - this.setState({ composeData: data });
53 - }
54 - }
55 -
56 - render() {
57 - const {
58 - isNotificationOpen,
59 - filter,
60 - openedMessage,
61 - alertAfter,
62 - compose,
63 - composeData,
64 - } = this.state;
65 - return (
66 - <div>
67 - <Breadcrumb>
68 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
69 - <BreadcrumbItem active>Email</BreadcrumbItem>
70 - </Breadcrumb>
71 - <div className="page-top-line">
72 - <h1 className="page-title">Email - <span className="fw-semi-bold">Inbox</span></h1>
73 - <Alert
74 - isOpen={isNotificationOpen}
75 - color="success"
76 - toggle={() => this.closeNotification()}
77 - className={cx(s.alert, { [s.alertAfter]: alertAfter })}
78 - >
79 - Hey! This is a <span className="fw-semi-bold">real app</span> with CRUD and Search functions. Have fun!
80 - </Alert>
81 - </div>
82 - <div className={s.view}>
83 - <Filters
84 - filter={this.filter}
85 - openMessage={this.openMessage}
86 - compose={this.changeCompose}
87 - />
88 - <MessageTable
89 - filter={filter}
90 - openedMessage={openedMessage}
91 - openMessage={this.openMessage}
92 - compose={compose}
93 - changeCompose={this.changeCompose}
94 - composeData={composeData}
95 - />
96 - </div>
97 - </div>
98 - );
99 - }
100 -}
101 -
102 -export default Email;
1 -.view {
2 - display: flex;
3 -
4 - @media screen and (max-width: 1125px) {
5 - flex-direction: column;
6 - }
7 -}
8 -
9 -.alert {
10 - transition: 0.6s;
11 - transition-timing-function: ease;
12 - transform: translateX(-130vw);
13 -}
14 -
15 -.alertAfter {
16 - transform: translateX(0);
17 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import { Editor } from 'react-draft-wysiwyg';
4 -import { Input, Button } from 'reactstrap';
5 -
6 -import Widget from '../../../../../components/Widget';
7 -
8 -import s from './Compose.module.scss';
9 -
10 -const Compose = ({ data }) => (
11 - <Widget>
12 - <div className={s.compose}>
13 - <h4>Compose <span className="fw-semi-bold">New</span></h4>
14 - <Input type="text" placeholder="To" defaultValue={data && data.from} />
15 - <Input type="text" placeholder="Subject" defaultValue={data && data.theme} />
16 - <Editor
17 - wrapperClassName={s.wysiwygWrapper}
18 - editorClassName={s.wysiwygEditor}
19 - toolbarClassName={s.wysiwygToolbar}
20 - />
21 - <div className="text-md-right mt-xs">
22 - <Button color="gray">Discard</Button>
23 - <Button color="gray">Save</Button>
24 - <Button color="danger">Send</Button>
25 - </div>
26 - </div>
27 - </Widget>
28 -);
29 -
30 -Compose.propTypes = {
31 - data: PropTypes.shape({
32 - from: PropTypes.string,
33 - to: PropTypes.string,
34 - }),
35 -};
36 -
37 -Compose.defaultProps = {
38 - data: {
39 - from: null,
40 - to: null,
41 - },
42 -};
43 -
44 -export default Compose;
1 -@import '../../../../../styles/app';
2 -
3 -:global {
4 - @import '../../../../../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg';
5 -}
6 -
7 -.compose {
8 - h4 {
9 - margin-bottom: 20px;
10 - }
11 -
12 - input {
13 - margin-bottom: 15px;
14 - }
15 -
16 - button {
17 - margin-left: 7.5px;
18 - }
19 -}
20 -
21 -.wysiwygWrapper {
22 - border: 1px solid #ccc !important;
23 - overflow: visible;
24 - height: 270px;
25 - margin-bottom: 15px;
26 -}
27 -
28 -.wysiwygToolbar {
29 - color: $gray-800 !important;
30 - background-color: #ddd !important;
31 - border-color: transparent !important;
32 -
33 - :global {
34 - .rdw-option-wrapper {
35 - font-family: 'Open Sans', sans-serif;
36 - font-size: 14px;
37 - height: 30px;
38 - min-width: 30px;
39 - margin: 0;
40 - background: #f8f8f8;
41 - }
42 -
43 - .rdw-dropdown-wrapper {
44 - background: #f8f8f8;
45 - }
46 - }
47 -}
48 -
49 -.wysiwygEditor {
50 - position: relative !important;
51 - overflow: hidden !important;
52 - height: 150px;
53 - line-height: 0.1;
54 -}
1 -import React, { Component } from 'react';
2 -import PropTypes from 'prop-types';
3 -import cx from 'classnames';
4 -import { Badge } from 'reactstrap';
5 -
6 -import s from './Filters.module.scss';
7 -
8 -class Filters extends Component {
9 - state = { activeButtonId: 0 }
10 -
11 - handleButtonClick(id, filterCond) {
12 - const { filter, openMessage } = this.props;
13 - this.setState({ activeButtonId: id });
14 -
15 - openMessage(null);
16 - filter(filterCond);
17 - }
18 -
19 - render() {
20 - const mainButtons = [
21 - { id: 0, title: 'Inbox', notifications: 2, filter: null },
22 - { id: 1, title: 'Starred', filter: 'starred' },
23 - { id: 2, title: 'Sent Mail', filter: 'sent' },
24 - { id: 3, title: 'Draft', notifications: 3, lable: 'danger', filter: 'draft' },
25 - { id: 4, title: 'Trash', filter: 'trash' },
26 - ];
27 - const quickViewButton = [
28 - { id: 0, title: 'Work', colour: 'danger' },
29 - { id: 1, title: 'Private', colour: 'white' },
30 - { id: 2, title: 'Saved', colour: '' },
31 - ];
32 - const { activeButtonId } = this.state;
33 - const { compose } = this.props;
34 - return (
35 - <div className={s.filters}>
36 - <button
37 - className="btn btn-danger btn-block"
38 - onClick={() => compose(true)}
39 - >
40 - Compose
41 - </button>
42 - <div className={s.mainFilterButtons}>
43 - {mainButtons.map(button =>
44 - <button
45 - className={cx('btn', s.button, { [s.buttonActive]: button.id === activeButtonId })}
46 - key={button.id}
47 - onClick={() => this.handleButtonClick(button.id, button.filter)}
48 - >
49 - {button.title}
50 - {button.notifications &&
51 - <Badge color={button.lable || 'default'} pill>{button.notifications}</Badge>}
52 - </button>,
53 - )}
54 - </div>
55 - <div>
56 - <h6>QUICK VIEW</h6>
57 - {quickViewButton.map(button =>
58 - <button className={cx('btn', s.button)} key={button.id}>
59 - {button.title}
60 - <i className={cx('fa fa-circle', { [`text-${button.colour}`]: true })} />
61 - </button>,
62 - )}
63 - </div>
64 - </div>
65 - );
66 - }
67 -}
68 -
69 -Filters.propTypes = {
70 - filter: PropTypes.func.isRequired,
71 - openMessage: PropTypes.func.isRequired,
72 - compose: PropTypes.func.isRequired,
73 -};
74 -
75 -export default Filters;
1 -@import '../../../../../styles/app';
2 -
3 -.filters {
4 - width: 16%;
5 - padding-right: 15px;
6 -
7 - @media screen and (max-width: 1125px) {
8 - width: 100%;
9 - padding-right: 0;
10 - }
11 -}
12 -
13 -.mainFilterButtons {
14 - margin: 15px 0;
15 -}
16 -
17 -.button {
18 - width: 100%;
19 - padding: 10px 14px !important;
20 - display: flex !important;
21 - justify-content: space-between;
22 - align-items: center;
23 - font-weight: $font-weight-normal;
24 - border-radius: 0.2rem;
25 - color: #868e96;
26 - background: transparent;
27 -
28 - &:hover {
29 - background-color: #e5e5e5;
30 - color: $gray-700;
31 - }
32 -
33 - & :global .badge {
34 - width: 20px;
35 - height: 20px;
36 - padding: 0;
37 - display: flex;
38 - align-items: center;
39 - justify-content: center;
40 - line-height: 10px;
41 - }
42 -}
43 -
44 -.buttonActive {
45 - background-color: $white;
46 - color: #555;
47 - font-weight: 600;
48 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -
4 -import Widget from '../../../../../components/Widget';
5 -import MessageHeader from '../MessageHeader/MessageHeader';
6 -import MessageAttachments from '../MessageAttachments/MessageAttachments';
7 -
8 -const Message = ({ message, compose }) => (
9 - <Widget>
10 - <MessageHeader
11 - title={message.theme}
12 - name={message.from}
13 - email={message.fromEmail}
14 - to={message.to}
15 - date={message.date}
16 - compose={compose}
17 - />
18 - {/* eslint-disable */}
19 - <div
20 - dangerouslySetInnerHTML={{ __html: message.content }}
21 - />
22 - {/* eslint-enable */}
23 - {message.attachments && <MessageAttachments attachments={message.attachments} />}
24 - </Widget>
25 -);
26 -
27 -Message.propTypes = {
28 - message: PropTypes.shape({
29 - theme: PropTypes.string,
30 - from: PropTypes.string,
31 - fromEmail: PropTypes.string,
32 - to: PropTypes.string,
33 - date: PropTypes.string,
34 - }).isRequired,
35 - compose: PropTypes.func.isRequired,
36 -};
37 -
38 -export default Message;
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -
4 -import s from './MessageAttachments.module.scss';
5 -
6 -const MessageAttachments = ({ attachments }) => (
7 - <div className={s.messageAttachments}>
8 - <hr />
9 - <div className={s.attachmentsInfo}>
10 - <strong>{attachments.length} attachments</strong> -
11 - <button className="btn-link">Download all attachments</button>
12 - <button className="btn-link">View all attachments</button>
13 - </div>
14 - {attachments.map(att =>
15 - <div className={s.attachment} key={att.id}>
16 - <img src={att.photo} alt="attachment" />
17 - <h5>{att.photoName}</h5>
18 - <div className={s.attachmentButtons}>
19 - {att.weight}
20 - <button className="btn-link">View</button>
21 - <button className="btn-link">Download</button>
22 - </div>
23 - </div>,
24 - )}
25 - </div>
26 -);
27 -
28 -MessageAttachments.propTypes = {
29 - attachments: PropTypes.arrayOf(PropTypes.shape({
30 - photo: PropTypes.string,
31 - photoName: PropTypes.string,
32 - weight: PropTypes.string,
33 - })).isRequired,
34 -};
35 -
36 -export default MessageAttachments;
1 -@import '../../../../../styles/app';
2 -
3 -.messageAttachments {
4 - width: 50%;
5 -
6 - @media screen and (max-width: 576px) {
7 - width: 100%;
8 - }
9 -}
10 -
11 -.attachmentsInfo {
12 - margin: -5px 0 10px;
13 -
14 - a {
15 - margin-left: 5px;
16 - }
17 -}
18 -
19 -.attachment {
20 - max-width: 100%;
21 -
22 - img {
23 - width: 100%;
24 - }
25 -
26 - h5 {
27 - font-weight: $font-weight-semi-bold;
28 - }
29 -}
30 -
31 -.attachmentButtons {
32 - margin: -5px 0 15px;
33 -
34 - a {
35 - margin-left: 10px;
36 - }
37 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -
4 -import ReplyDropdown from '../ReplyDropdown/ReplyDropdown';
5 -
6 -import userPhoto from '../../../../../images/people/a5.jpg';
7 -import s from './MessageHeader.module.scss';
8 -
9 -const MessageHeader = ({ title, name, email, to, date, compose }) => (
10 - <div className={s.messageHeader}>
11 - <h3>{title}</h3>
12 - <div className={s.messageHeaderLine}>
13 - <div className={s.messageFrom}>
14 - <img src={userPhoto} alt="user" className="rounded-circle" />
15 - <div className={s.messageFromInfo}>
16 - <span>
17 - <strong>{name}</strong>
18 - <span className={s.email}>
19 - {`<${email}>`}
20 - </span>
21 - </span>
22 - <span className={s.to}>to {to}</span>
23 - </div>
24 - </div>
25 - <div className={s.messageHeaderDate}>
26 - {date}
27 - <ReplyDropdown compose={() => compose(true, { from: name, theme: title })} />
28 - </div>
29 - </div>
30 - </div>
31 -);
32 -
33 -MessageHeader.propTypes = {
34 - title: PropTypes.string.isRequired,
35 - name: PropTypes.string.isRequired,
36 - email: PropTypes.string.isRequired,
37 - to: PropTypes.string.isRequired,
38 - date: PropTypes.string.isRequired,
39 - compose: PropTypes.func.isRequired,
40 -};
41 -
42 -export default MessageHeader;
1 -@import '../../../../../styles/app';
2 -
3 -.messageHeader {
4 - width: 100%;
5 -}
6 -
7 -.messageHeaderLine {
8 - display: flex;
9 - justify-content: space-between;
10 - align-items: center;
11 - margin: 15px 0;
12 - flex-wrap: wrap;
13 -}
14 -
15 -.messageFrom {
16 - display: flex;
17 - align-items: center;
18 -
19 - img {
20 - height: 30px;
21 - width: 30px;
22 - margin-right: 5px;
23 - }
24 -}
25 -
26 -.messageFromInfo {
27 - display: flex;
28 - flex-direction: column;
29 - line-height: 1.1;
30 -}
31 -
32 -.email {
33 - color: #868e96;
34 - font-size: $font-size-mini;
35 - margin-left: 5px;
36 -}
37 -
38 -.to {
39 - color: #868e96;
40 -}
41 -
42 -.messageHeaderDate {
43 - padding: 15px 0;
44 -
45 - & :global .btn-group {
46 - margin-left: 10px;
47 -
48 - button {
49 - font-size: 12px;
50 -
51 - i {
52 - margin-right: 3px;
53 - }
54 - }
55 - }
56 -}
1 -import React, { Component } from 'react';
2 -import PropTypes from 'prop-types';
3 -import cx from 'classnames';
4 -import { Table, Input, FormGroup, Label } from 'reactstrap';
5 -
6 -import Widget from '../../../../../components/Widget';
7 -import MessageTableHeader from '../MessageTableHeader/MessageTableHeader';
8 -import Pagination from '../Pagination/Pagination';
9 -import Compose from '../Compose/Compose';
10 -import Message from '../Message/Message';
11 -
12 -import mock from '../../mock';
13 -import s from './MessageTable.module.scss';
14 -
15 -class MessageTable extends Component {
16 - state = {
17 - messages: mock,
18 - checkedIds: [],
19 - searchString: '',
20 - }
21 -
22 - componentWillReceiveProps(nextProps) {
23 - const { filter } = this.props;
24 -
25 - if (filter !== nextProps.filter) {
26 - this.chooseNone();
27 - this.setState({ openedMessage: null });
28 - }
29 - }
30 -
31 - chooseAll = () => {
32 - const { messages } = this.state;
33 - const { filter } = this.props;
34 - const newCheckedIds = [];
35 -
36 - if (filter) {
37 - messages
38 - .filter(message => message[filter])
39 - .forEach(message => newCheckedIds.push(message.id));
40 - } else {
41 - messages.forEach(message => newCheckedIds.push(message.id));
42 - }
43 -
44 - this.setState({ checkedIds: newCheckedIds });
45 - }
46 -
47 - chooseNone = () => {
48 - this.setState({ checkedIds: [] });
49 - }
50 -
51 - chooseRead = () => {
52 - const { messages } = this.state;
53 - const newCheckedIds = [];
54 -
55 - messages.forEach((message) => {
56 - if (!message.unreaded) {
57 - newCheckedIds.push(message.id);
58 - }
59 - });
60 -
61 - this.setState({
62 - checkedIds: newCheckedIds,
63 - });
64 - }
65 -
66 - chooseUnread = () => {
67 - const { messages } = this.state;
68 - const newCheckedIds = [];
69 -
70 - messages.forEach((message) => {
71 - if (message.unreaded) {
72 - newCheckedIds.push(message.id);
73 - }
74 - });
75 -
76 - this.setState({
77 - checkedIds: newCheckedIds,
78 - });
79 - }
80 -
81 - choose(id) {
82 - const { checkedIds } = this.state;
83 - const indexOfId = checkedIds.indexOf(id);
84 -
85 - if (indexOfId === -1) {
86 - this.setState({ checkedIds: [...checkedIds, id] });
87 - } else {
88 - const newCheckedIds = [...checkedIds];
89 - newCheckedIds.splice(indexOfId, 1);
90 - this.setState({ checkedIds: newCheckedIds });
91 - }
92 - }
93 -
94 - markUnread = () => {
95 - const { messages, checkedIds } = this.state;
96 - const newMessages = [...messages];
97 -
98 - newMessages.map((message) => {
99 - if (checkedIds.indexOf(message.id) !== -1) {
100 - message.unreaded = true;
101 - }
102 - return message;
103 - });
104 -
105 - this.setState({ messages: newMessages });
106 - }
107 -
108 - markRead = () => {
109 - const { messages, checkedIds } = this.state;
110 - const newMessages = [...messages];
111 -
112 - newMessages.map((message) => {
113 - if (checkedIds.indexOf(message.id) !== -1) {
114 - message.unreaded = false;
115 - }
116 - return message;
117 - });
118 -
119 - this.setState({ messages: newMessages });
120 - }
121 -
122 - delete = () => {
123 - const { messages, checkedIds } = this.state;
124 - const newMessages = [...messages];
125 -
126 - newMessages.map((message) => {
127 - if (checkedIds.indexOf(message.id) !== -1) {
128 - message.deleted = true;
129 - }
130 - return message;
131 - });
132 -
133 - this.setState({
134 - messages: newMessages.filter(message => !message.deleted),
135 - checkedIds: [],
136 - });
137 - }
138 -
139 - starItem(id) {
140 - const { messages } = this.state;
141 - const isAlreadyStarred = messages.find(m => m.id === id).starred;
142 - const newMessages = [...messages];
143 -
144 - newMessages.map((message) => {
145 - if (message.id === id) {
146 - message.starred = !isAlreadyStarred;
147 - }
148 - return message;
149 - });
150 -
151 - this.setState({ messages: newMessages });
152 - }
153 -
154 - handleOpenMessage(id) {
155 - const newMessages = [...this.state.messages];
156 -
157 - newMessages.map((message) => {
158 - if (message.id === id) {
159 - message.unreaded = false;
160 - }
161 -
162 - return message;
163 - });
164 -
165 - this.setState({ messages: newMessages });
166 -
167 - this.props.openMessage(id);
168 - }
169 -
170 - search = (value) => {
171 - this.setState({ searchString: value.toLowerCase() });
172 - }
173 -
174 - _searchable(m) {
175 - const { searchString } = this.state;
176 -
177 - if (searchString) {
178 - return (m.content.toLowerCase().indexOf(searchString) !== -1 ||
179 - m.from.toLowerCase().indexOf(searchString) !== -1 ||
180 - m.theme.toLowerCase().indexOf(searchString) !== -1);
181 - }
182 -
183 - return true;
184 - }
185 -
186 - render() {
187 - const { messages, checkedIds } = this.state;
188 - const { filter, openedMessage, openMessage, compose, composeData, changeCompose } = this.props;
189 - const filteredMessages = messages.filter(message => message[filter]);
190 - const dataToDisplay = filter ? filteredMessages : messages;
191 - return (
192 - <div className={s.messages}>
193 - {openedMessage === null && !compose
194 - ? <Pagination />
195 - : <button className={cx('btn btn-default', s.backButton)} onClick={() => openMessage(null)}>
196 - <i className="fa fa-angle-left fa-lg" />
197 - </button>
198 - }
199 - {/* eslint-disable */}
200 - {openedMessage === null && !compose
201 - ? <Widget>
202 - <MessageTableHeader
203 - all={this.chooseAll}
204 - none={this.chooseNone}
205 - read={this.chooseRead}
206 - unread={this.chooseUnread}
207 - markRead={this.markRead}
208 - markUnread={this.markUnread}
209 - deleteItems={this.delete}
210 - search={this.search}
211 - />
212 - <Table striped hover>
213 - <thead>
214 - <tr>
215 - <th>
216 - <FormGroup className="checkbox abc-checkbox" check>
217 - <Input
218 - id="checkbox-main"
219 - type="checkbox"
220 - onChange={dataToDisplay.length !== checkedIds.length ? this.chooseAll : this.chooseNone}
221 - checked={dataToDisplay.length !== 0 && checkedIds.length === dataToDisplay.length}
222 - />{' '}
223 - <Label for="checkbox-main" check />
224 - </FormGroup>
225 - </th>
226 - </tr>
227 - </thead>
228 - <tbody>
229 - {dataToDisplay
230 - .filter((m) => this._searchable(m))
231 - .map(message =>
232 - (<tr
233 - key={message.id}
234 - className={cx({ [s.unreadedMessage]: message.unreaded })}
235 - >
236 - <td className={s.messageCheckbox} >
237 - <FormGroup className="checkbox abc-checkbox" check>
238 - <Input
239 - id={`checkbox${message.id}`}
240 - type="checkbox"
241 - checked={checkedIds.indexOf(message.id) !== -1}
242 - onChange={() => this.choose(message.id)}
243 - />{' '}
244 - <Label for={`checkbox${message.id}`} check />
245 - </FormGroup>
246 - </td>
247 - <td
248 - className={s.messageStar}
249 - onClick={() => this.starItem(message.id)}>{message.starred
250 - ? <span className={s.messageStarred}><i className="fa fa-star" /></span>
251 - : <span><i className="fa fa-star-o" /></span>}
252 - </td>
253 - <td
254 - className={s.messageFrom}
255 - onClick={() => this.handleOpenMessage(message.id)}
256 - >{message.from}</td>
257 - <td onClick={() => this.handleOpenMessage(message.id)}>{message.theme}</td>
258 - <td className={s.messageClip}>{message.attachments && <i className="fa fa-paperclip" />}</td>
259 - <td className={s.messageDate}>{message.date}</td>
260 - </tr>),
261 - )}
262 - </tbody>
263 - </Table>
264 - </Widget>
265 - : compose
266 - ? <Compose data={composeData} />
267 - : <Message message={messages[openedMessage]} compose={changeCompose} />
268 - }
269 - {/* eslint-enable */}
270 - </div>
271 - );
272 - }
273 -}
274 -
275 -MessageTable.propTypes = {
276 - filter: PropTypes.string,
277 - openedMessage: PropTypes.number,
278 - openMessage: PropTypes.func.isRequired,
279 - compose: PropTypes.bool.isRequired,
280 - composeData: PropTypes.shape({
281 - from: PropTypes.string,
282 - theme: PropTypes.string,
283 - }),
284 - changeCompose: PropTypes.func.isRequired,
285 -};
286 -
287 -MessageTable.defaultProps = {
288 - filter: null,
289 - openedMessage: null,
290 - composeData: null,
291 -};
292 -
293 -export default MessageTable;
1 -@import '../../../../../styles/app';
2 -
3 -.messages {
4 - width: 84%;
5 - border-radius: 0.2rem;
6 -
7 - @media screen and (max-width: 1125px) {
8 - width: 100%;
9 - }
10 -
11 - & :global .form-check-input {
12 - margin: 0;
13 - position: relative;
14 - }
15 -
16 - & :global .table {
17 - margin-bottom: 0;
18 - }
19 -}
20 -
21 -.unreadedMessage {
22 - td {
23 - font-weight: $font-weight-semi-bold;
24 - }
25 -}
26 -
27 -.messageCheckbox {
28 - width: 50px;
29 - padding-right: 0;
30 -
31 - :global .form-check {
32 - margin-bottom: 0;
33 - }
34 -}
35 -
36 -.messageStar {
37 - left: 25px;
38 - margin-left: -10px;
39 -}
40 -
41 -.messageStarred {
42 - color: theme-color('warning');
43 -}
44 -
45 -.messageFrom,
46 -.messageClip {
47 - @media screen and (max-width: 768px) {
48 - display: none;
49 - }
50 -}
51 -
52 -.messageDate {
53 - display: flex;
54 - justify-content: flex-end;
55 -
56 - @media screen and (max-width: 768px) {
57 - width: 65px;
58 - }
59 -}
60 -
61 -.backButton {
62 - margin-bottom: 15px;
63 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import {
4 - UncontrolledButtonDropdown,
5 - DropdownToggle,
6 - DropdownMenu,
7 - DropdownItem,
8 - Input,
9 -} from 'reactstrap';
10 -
11 -import s from './MessageTableHeader.module.scss';
12 -
13 -const MessageTableHeader = (props) => {
14 - const { all, none, read, unread, markRead, markUnread, deleteItems, search } = props;
15 - const select = [
16 - { id: 0, title: 'All', onClick: all },
17 - { id: 1, title: 'None', onClick: none },
18 - { id: 2 },
19 - { id: 3, title: 'Read', onClick: read },
20 - { id: 4, title: 'Unread', onClick: unread },
21 - ];
22 - const action = [
23 - { id: 1, title: 'Reply' },
24 - { id: 2, title: 'Forward' },
25 - { id: 3, title: 'Archive' },
26 - { id: 4 },
27 - { id: 5, title: 'Mark As Read', onClick: markRead },
28 - { id: 6, title: 'Mark As Unread', onClick: markUnread },
29 - { id: 7 },
30 - { id: 8, title: 'Delete', onClick: deleteItems },
31 - ];
32 - return (
33 - <div className={s.messageTableHeader}>
34 - <div>
35 - <UncontrolledButtonDropdown size="sm">
36 - <DropdownToggle
37 - caret color="default"
38 - className="dropdown-toggle-split mr-xs"
39 - >
40 - Select
41 - </DropdownToggle>
42 - <DropdownMenu>
43 - {select.map(item =>
44 - (Object.keys(item).length > 1
45 - ? <DropdownItem key={item.id} onClick={item.onClick}>{item.title}</DropdownItem>
46 - : <DropdownItem key={item.id} divider />),
47 - )}
48 - </DropdownMenu>
49 - </UncontrolledButtonDropdown >
50 - <UncontrolledButtonDropdown size="sm">
51 - <DropdownToggle
52 - caret color="default"
53 - className="dropdown-toggle-split mr-xs"
54 - >
55 - Actions
56 - </DropdownToggle>
57 - <DropdownMenu>
58 - {action.map(item =>
59 - (Object.keys(item).length > 1
60 - ? <DropdownItem key={item.id} onClick={item.onClick}>{item.title}</DropdownItem>
61 - : <DropdownItem key={item.id} divider />),
62 - )}
63 - </DropdownMenu>
64 - </UncontrolledButtonDropdown>
65 - </div>
66 - <Input placeholder="Search Messages" size="sm" onChange={e => search(e.target.value)} />
67 - </div>
68 - );
69 -};
70 -
71 -MessageTableHeader.propTypes = {
72 - all: PropTypes.func.isRequired,
73 - none: PropTypes.func.isRequired,
74 - read: PropTypes.func.isRequired,
75 - unread: PropTypes.func.isRequired,
76 - markRead: PropTypes.func.isRequired,
77 - markUnread: PropTypes.func.isRequired,
78 - deleteItems: PropTypes.func.isRequired,
79 - search: PropTypes.func.isRequired,
80 -};
81 -
82 -export default MessageTableHeader;
1 -.messageTableHeader {
2 - display: flex;
3 - justify-content: space-between;
4 - align-items: center;
5 -
6 - & :global .form-control {
7 - width: auto;
8 - }
9 -}
1 -import React from 'react';
2 -import cx from 'classnames';
3 -
4 -import s from './Pagination.module.scss';
5 -
6 -const Pagination = () => (
7 - <div className={s.pagination}>
8 - <span className={s.paginationText}>Showing 1 - 10 of 96 messages</span>
9 - <div className={s.paginationPages}>
10 - <button className={cx(s.button, s.buttonDisabled)}><i className="fa fa-chevron-left" /></button>
11 - <button className={cx(s.button, s.buttonActive)}>1</button>
12 - <button className={s.button}>2</button>
13 - <button className={s.button}><i className="fa fa-chevron-right" /></button>
14 - </div>
15 - </div>
16 -);
17 -
18 -export default Pagination;
1 -@import '../../../../../styles/app';
2 -
3 -.pagination {
4 - width: 100%;
5 - display: flex;
6 - justify-content: flex-end;
7 - align-items: center;
8 - margin-bottom: 15px;
9 -}
10 -
11 -.paginationText {
12 - color: #868e96;
13 - font-size: $font-size-mini;
14 -}
15 -
16 -.paginationPages {
17 - border-left: 1px solid #868e96;
18 - padding-left: 11px;
19 - margin-left: 10px;
20 - display: flex;
21 -
22 - button {
23 - margin-left: 4px;
24 - }
25 -}
26 -
27 -.button {
28 - transition: 0.3s;
29 - padding: 0.45rem 0.75rem;
30 - display: flex;
31 - justify-content: space-between;
32 - align-items: center;
33 - font-weight: $font-weight-normal;
34 - border-radius: 0.2rem;
35 - color: #888;
36 - background: #fff;
37 - border: none;
38 -
39 - &:hover {
40 - background-color: transparent;
41 - }
42 -}
43 -
44 -.buttonActive {
45 - background: $gray-300;
46 -}
47 -
48 -.buttonDisabled {
49 - &:hover {
50 - background-color: #fff;
51 - }
52 -}
1 -import React, { Component } from 'react';
2 -import PropTypes from 'prop-types';
3 -import {
4 - ButtonDropdown,
5 - Button,
6 - DropdownToggle,
7 - DropdownMenu,
8 - DropdownItem,
9 -} from 'reactstrap';
10 -
11 -class ReplyDropdown extends Component {
12 - state = { open: false };
13 -
14 - toggle() {
15 - this.setState(pvState => ({ open: !pvState.open }));
16 - }
17 -
18 - render() {
19 - const { open } = this.state;
20 - const { compose } = this.props;
21 - return (
22 - <ButtonDropdown isOpen={open} toggle={() => this.toggle()}>
23 - <Button size="sm" id="dropdownFour" color="default" onClick={() => compose()}>
24 - <i className="fa fa-reply" /> Reply
25 - </Button>
26 - <DropdownToggle size="sm" color="default" className="dropdown-toggle-split">
27 - <i className="fa fa-angle-down" />
28 - </DropdownToggle>
29 - <DropdownMenu>
30 - <DropdownItem><i className="fa fa-reply" /> Reply</DropdownItem>
31 - <DropdownItem><i className="fa fa-arrow-right" /> Forward</DropdownItem>
32 - <DropdownItem><i className="fa fa-print" /> Print</DropdownItem>
33 - <DropdownItem divider />
34 - <DropdownItem><i className="fa fa-ban" /> Spam</DropdownItem>
35 - <DropdownItem><i className="fa fa-trash" /> Delete</DropdownItem>
36 - </DropdownMenu>
37 - </ButtonDropdown>
38 - );
39 - }
40 -}
41 -
42 -ReplyDropdown.propTypes = {
43 - compose: PropTypes.func.isRequired,
44 -};
45 -
46 -export default ReplyDropdown;
1 -import photo1 from '../../../images/tables/1.png';
2 -import photo2 from '../../../images/tables/2.png';
3 -import photo3 from '../../../images/tables/3.png';
4 -
5 -export default [
6 - {
7 - id: 0,
8 - starred: true,
9 - from: 'Philip Horbachuski',
10 - fromEmail: 'philip.horbachuski@example.com',
11 - to: 'Wrapbootstrap',
12 - theme: 'Hi, Welcom to Google Mail',
13 - date: '18:31',
14 - unreaded: true,
15 - content: `<p>Projecting surrounded literature yet delightful alteration but bed men. Open are from long why cold.
16 - If must snug by upon sang loud left. As me do preference entreaties compliment motionless ye literature.
17 - Day behaviour explained law remainder.</p>
18 - <p><strong>On then sake home</strong> is am leaf. Of suspicion do departure at extremely he believing.
19 - Do know said mind do rent they oh hope of. General enquire picture letters
20 - garrets on offices of no on.</p>
21 - <p>All the best,</p>
22 - <p>Vitaut the Great, CEO, <br />
23 - Fooby Inc. </p>`,
24 - attachments: [
25 - {
26 - photo: photo1,
27 - photoName: 'some-cool-photo1.jpg',
28 - weight: '568K',
29 - id: 0,
30 - },
31 - {
32 - photo: photo2,
33 - photoName: 'some-cool-photo2.jpg',
34 - weight: '568K',
35 - id: 1,
36 - },
37 - ],
38 - },
39 - {
40 - id: 1,
41 - starred: true,
42 - from: 'StackExchange',
43 - theme: 'New Python questions for this week',
44 - fromEmail: 'stackexchange@example.com',
45 - to: 'Wrapbootstrap',
46 - date: 'Aug 14',
47 - unreaded: false,
48 - draft: true,
49 - content: '<h1>THIS IS HTML!!!!</h1>',
50 - attachments: [
51 - {
52 - photo: photo3,
53 - photoName: 'some-cool-photo1.jpg',
54 - weight: '568K',
55 - id: 0,
56 - },
57 - ],
58 - },
59 - {
60 - id: 2,
61 - starred: false,
62 - from: 'Facebook',
63 - theme: 'Someone just commented on your photo!',
64 - fromEmail: 'notification@facebook.com',
65 - to: 'Wrapbootstrap',
66 - date: 'Aug 7',
67 - unreaded: true,
68 - sent: true,
69 - content: 'Someone just commented on your photo!',
70 - },
71 - {
72 - id: 3,
73 - starred: false,
74 - from: 'Twitter',
75 - theme: '@hackernews is now following you on Twitter',
76 - fromEmail: 'notification@twitter.com',
77 - to: 'Wrapbootstrap',
78 - date: 'Jul 31',
79 - unreaded: false,
80 - sent: true,
81 - content: '@hackernews is now following you on Twitter',
82 - },
83 -];
1 -{
2 - "name": "email",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Email.js"
6 -}
...\ No newline at end of file ...\ No newline at end of file
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - ButtonGroup,
6 - Button,
7 -} from 'reactstrap';
8 -
9 -import 'fullcalendar/dist/fullcalendar';
10 -import 'jquery-ui/ui/widgets/draggable';
11 -import moment from 'moment/moment';
12 -import $ from 'jquery';
13 -
14 -import s from './Calendar.module.scss';
15 -import Widget from '../../../../components/Widget';
16 -
17 -class Calendar extends React.Component {
18 -
19 - constructor(props) {
20 - super(props);
21 -
22 - this.state = {
23 - calendarView: 'month',
24 - currentMonth: moment().format('MMM YYYY'),
25 - currentDay: moment().format('dddd'),
26 - };
27 -
28 - const date = new Date();
29 - const d = date.getDate();
30 - const m = date.getMonth();
31 - const y = date.getFullYear();
32 -
33 - this.calendarOptions = {
34 - header: {
35 - left: '',
36 - center: '',
37 - right: '',
38 - },
39 - events: [
40 - {
41 - title: 'All Day Event',
42 - start: new Date(y, m, 1),
43 - backgroundColor: '#79A5F0',
44 - textColor: '#fff',
45 - description: 'Will be busy throughout the whole day',
46 - },
47 - {
48 - title: 'Long Event',
49 - start: new Date(y, m, d + 5),
50 - end: new Date(y, m, d + 7),
51 - description: 'This conference should be worse visiting',
52 - },
53 - {
54 - id: 999,
55 - title: 'Blah Blah Car',
56 - start: new Date(y, m, d - 3, 16, 0),
57 - allDay: false,
58 - description: 'Agree with this guy on arrival time',
59 - },
60 - {
61 - id: 1000,
62 - title: 'Buy this template',
63 - start: new Date(y, m, d + 3, 12, 0),
64 - allDay: false,
65 - backgroundColor: '#555',
66 - textColor: '#fff',
67 - description: 'Make sure everything is consistent first',
68 - },
69 - {
70 - title: 'Got to school',
71 - start: new Date(y, m, d + 16, 12, 0),
72 - end: new Date(y, m, d + 16, 13, 0),
73 - backgroundColor: '#64bd63',
74 - textColor: '#fff',
75 - description: 'Time to go back',
76 - },
77 - {
78 - title: 'Study some Node',
79 - start: new Date(y, m, d + 18, 12, 0),
80 - end: new Date(y, m, d + 18, 13, 0),
81 - backgroundColor: '#79A5F0',
82 - textColor: '#fff',
83 - description: 'Node.js is a platform built ' +
84 - 'on Chrome\'s JavaScript runtime for easily' +
85 - ' building fast, scalable network applications.' +
86 - ' Node.js uses an event-driven, non-blocking' +
87 - ' I/O model that makes it lightweight and' +
88 - ' efficient, perfect for data-intensive real-time' +
89 - ' applications that run across distributed devices.',
90 - },
91 - {
92 - title: 'Click for Flatlogic',
93 - start: new Date(y, m, 28),
94 - end: new Date(y, m, 29),
95 - url: 'http://flatlogic.com/',
96 - backgroundColor: '#e5603b',
97 - textColor: '#fff',
98 - description: 'Creative solutions',
99 - },
100 - ],
101 - selectable: true,
102 - selectHelper: true,
103 - select: (start, end, allDay) => {
104 - this.createEvent = () => {
105 - const title = this.event.title;
106 - if (title) {
107 - this.$calendar.fullCalendar('renderEvent',
108 - {
109 - title,
110 - start,
111 - end,
112 - allDay,
113 - backgroundColor: '#64bd63',
114 - textColor: '#fff',
115 - },
116 - true, // make the event "stick"
117 - );
118 - }
119 - this.$calendar.fullCalendar('unselect');
120 - $('#create-event-modal').modal('hide');
121 - };
122 -
123 - $('#create-event-modal').modal('show');
124 - },
125 - eventClick: (event) => {
126 - this.event = event;
127 - $('#show-event-modal').modal('show');
128 - },
129 - editable: true,
130 - droppable: true,
131 -
132 - drop: (dateItem, event) => { // this function is called when something is dropped
133 - // retrieve the dropped element's stored Event Object
134 - const originalEventObject = {
135 - // use the element's text as the event title
136 - title: $.trim($(event.target).text()),
137 - };
138 -
139 - // we need to copy it, so that multiple events don't have a reference to the same object
140 - const copiedEventObject = $.extend({}, originalEventObject);
141 -
142 - // assign it the date that was reported
143 - copiedEventObject.start = dateItem;
144 - copiedEventObject.allDay = !dateItem.hasTime();
145 -
146 - const $categoryClass = $(event.target).data('event-class');
147 - if ($categoryClass) {
148 - copiedEventObject.className = [$categoryClass];
149 - }
150 -
151 - // render the event on the calendar
152 - // the last `true` argument determines if
153 - // the event 'sticks'
154 - // http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
155 - this.$calendar.fullCalendar('renderEvent', copiedEventObject, true);
156 -
157 - $(event.target).remove();
158 - },
159 - };
160 -
161 - this.dragOptions = { zIndex: 999, revert: true, revertDuration: 0 };
162 -
163 - this.prev = this.prev.bind(this);
164 - this.next = this.next.bind(this);
165 - this.today = this.today.bind(this);
166 - this.changeView = this.changeView.bind(this);
167 - this.getCurrentMonth = this.getCurrentMonth.bind(this);
168 - this.getCurrentDay = this.getCurrentDay.bind(this);
169 - }
170 -
171 - componentDidMount() {
172 - this.$calendar = $('#calendar');
173 - this.$calendar.fullCalendar(this.calendarOptions);
174 - $('.draggable').draggable(this.dragOptions);
175 - }
176 -
177 - getCurrentMonth() {
178 - return moment(this.$calendar.fullCalendar('getDate')).format('MMM YYYY');
179 - }
180 -
181 - getCurrentDay() {
182 - return moment(this.$calendar.fullCalendar('getDate')).format('dddd');
183 - }
184 -
185 - prev() {
186 - this.$calendar.fullCalendar('prev');
187 - }
188 -
189 - next() {
190 - this.$calendar.fullCalendar('next');
191 - }
192 -
193 - today() {
194 - this.$calendar.fullCalendar('today');
195 - }
196 -
197 - changeView(view) {
198 - this.$calendar.fullCalendar('changeView', view);
199 - this.setState({ calendarView: view });
200 - }
201 -
202 - render() {
203 - return (
204 - <div className={s.root}>
205 - <Row>
206 - <Col lg={4} xs={12} md={6}>
207 - <ol className="breadcrumb">
208 - <li className="breadcrumb-item">YOU ARE HERE</li>
209 - <li className="breadcrumb-item active">Calendar</li>
210 - </ol>
211 - <h1 className="page-title">
212 - {this.state.currentMonth} - <span className="fw-semi-bold">{this.state.currentDay}</span>
213 - </h1>
214 - <h3>Draggable <span className="fw-semi-bold">Events</span></h3>
215 - <p>Just drap and drop events from there directly into the calendar.</p>
216 - <div className="calendar-external-events mb-lg">
217 - <div className="external-event draggable" data-event-class="bg-success text-white">
218 - <i className="fa fa-circle fa-fw text-success ml-xs mr-xs" />
219 - Make a tea
220 - </div>
221 - <div className="external-event draggable" data-event-class="bg-warning text-white">
222 - <i className="fa fa-circle fa-fw text-warning ml-xs mr-xs" />
223 - Open windows
224 - </div>
225 - <div className="external-event draggable" data-event-class="bg-gray text-white">
226 - <i className="fa fa-circle-o fa-fw text-gray-light ml-xs mr-xs" />
227 - Some stuff
228 - </div>
229 - <div className="external-event draggable" data-event-class="bg-danger text-white">
230 - <i className="fa fa-square fa-fw text-danger ml-xs mr-xs" />
231 - Study UX engineering
232 - </div>
233 - <div className="external-event draggable" data-event-class="bg-gray text-white">
234 - <i className="fa fa-circle-o fa-fw text-gray-light ml-xs mr-xs" />
235 - Another stuff
236 - </div>
237 - </div>
238 - </Col>
239 - <Col md={6} lg={8} xs={12}>
240 - <Widget>
241 - <Row className="calendar-controls">
242 - <Col md={3}>
243 - <ButtonGroup className="mr-sm">
244 - <Button color="default" onClick={this.prev}>
245 - <i className="fa fa-angle-left" />
246 - </Button>
247 - <Button color="default" onClick={this.next}>
248 - <i className="fa fa-angle-right" />
249 - </Button>
250 - </ButtonGroup>
251 - </Col>
252 - <Col md={9} className="calendar-controls text-right">
253 - <ButtonGroup>
254 - <Button
255 - color="default" onClick={() => this.changeView('month')}
256 - active={this.state.calendarView === 'month'}
257 - >Month</Button>
258 - <Button
259 - color="default" onClick={() => this.changeView('agendaWeek')}
260 - active={this.state.calendarView === 'agendaWeek'}
261 - >Week</Button>
262 - <Button
263 - color="default" onClick={() => this.changeView('agendaDay')}
264 - active={this.state.calendarView === 'agendaDay'}
265 - >Day</Button>
266 - </ButtonGroup>
267 - </Col>
268 - </Row>
269 - <div id="calendar" className="calendar" />
270 - </Widget>
271 - </Col>
272 - </Row>
273 - </div>
274 - );
275 - }
276 -
277 -}
278 -
279 -export default Calendar;
1 -@import '../../../../styles/app';
2 -
3 -:global {
4 - @import '../../../../../node_modules/fullcalendar/dist/fullcalendar';
5 -}
6 -
7 -.root {
8 - h4 {
9 - font-size: 14px;
10 - }
11 -
12 - :global {
13 - .fc-grid th {
14 - text-transform: uppercase;
15 - }
16 -
17 - .fc-day-grid-event {
18 - margin: 0;
19 - padding: 0;
20 - }
21 -
22 - .fc-event {
23 - border: none;
24 - font-weight: $font-weight-normal;
25 - background-color: $gray-200;
26 - color: $text-color;
27 - }
28 -
29 - .fc-today {
30 - background-color: #fff1b8;
31 - }
32 -
33 - a.fc-event {
34 - height: auto;
35 - line-height: $line-height-base;
36 - width: 100%;
37 - }
38 -
39 - /* **** Full Calendar Custom **** */
40 - .full-calendar {
41 - margin-top: 10px;
42 - }
43 -
44 - .calendar-controls {
45 - .btn {
46 - font-size: $font-size-mini;
47 - }
48 - }
49 -
50 - .calendar-external-events {
51 - margin-top: 20px;
52 -
53 - .external-event {
54 - margin: 10px 0;
55 - padding: 6px;
56 - font-size: $font-size-mini;
57 - cursor: pointer;
58 - border-radius: $border-radius;
59 - background-color: $white;
60 - border: 1px solid #ccc;
61 - box-shadow: var(--widget-shadow);
62 - }
63 - }
64 -
65 - .widget-calendar {
66 - @include media-breakpoint-up(xl) {
67 - margin-top: -100px;
68 - }
69 - }
70 - }
71 -}
72 -
1 -{
2 - "name": "calendar",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Calendar.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Button,
4 - ButtonGroup,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 -} from 'reactstrap';
8 -
9 -import Lightbox from 'react-images';
10 -import s from './Gallery.module.scss';
11 -
12 -import pic1 from '../../../../images/pictures/1.jpg';
13 -import pic2 from '../../../../images/pictures/2.jpg';
14 -import pic3 from '../../../../images/pictures/3.jpg';
15 -import pic4 from '../../../../images/pictures/4.jpg';
16 -import pic5 from '../../../../images/pictures/5.jpg';
17 -import pic6 from '../../../../images/pictures/6.jpg';
18 -import pic8 from '../../../../images/pictures/8.jpg';
19 -import pic9 from '../../../../images/pictures/9.jpg';
20 -import pic10 from '../../../../images/pictures/10.jpg';
21 -import pic11 from '../../../../images/pictures/11.jpg';
22 -import pic13 from '../../../../images/pictures/13.jpg';
23 -import pic14 from '../../../../images/pictures/14.jpg';
24 -
25 -const items = [
26 - {
27 - name: 'Mountains',
28 - groups: [
29 - 'nature',
30 - ],
31 - src: pic1,
32 - date: '10 mins',
33 - },
34 - {
35 - name: 'Empire State Pigeon',
36 - groups: [
37 - 'people',
38 - ],
39 - src: pic2,
40 - date: '1 hour',
41 - like: true,
42 - },
43 - {
44 - name: 'Big Lake',
45 - groups: [
46 - 'nature',
47 - ],
48 - src: pic3,
49 - date: '2 mins',
50 - like: true,
51 - },
52 - {
53 - name: 'Forest',
54 - groups: [
55 - 'nature',
56 - ],
57 - src: pic4,
58 - date: '2 mins',
59 - like: true,
60 - },
61 - {
62 - name: 'Smile',
63 - groups: [
64 - 'people',
65 - ],
66 - src: pic5,
67 - date: '2 mins',
68 - },
69 - {
70 - name: 'Smile',
71 - groups: [
72 - 'people',
73 - ],
74 - src: pic6,
75 - date: '1 hour',
76 - like: true,
77 - },
78 - {
79 - name: 'Fog',
80 - groups: [
81 - 'nature',
82 - ],
83 - src: pic8,
84 - date: '2 mins',
85 - like: true,
86 - },
87 - {
88 - name: 'Beach',
89 - groups: [
90 - 'people',
91 - ],
92 - src: pic9,
93 - date: '2 mins',
94 - },
95 - {
96 - name: 'Pause',
97 - groups: [
98 - 'people',
99 - ],
100 - src: pic10,
101 - date: '3 hour',
102 - like: true,
103 - },
104 - {
105 - name: 'Space',
106 - groups: [
107 - 'space',
108 - ],
109 - src: pic11,
110 - date: '3 hour',
111 - like: true,
112 - },
113 - {
114 - name: 'Shuttle',
115 - groups: [
116 - 'space',
117 - ],
118 - src: pic13,
119 - date: '35 mins',
120 - like: true,
121 - },
122 - {
123 - name: 'Sky',
124 - groups: [
125 - 'space',
126 - ],
127 - src: pic14,
128 - date: '2 mins',
129 - },
130 -];
131 -
132 -class Gallery extends React.Component {
133 - constructor() {
134 - super();
135 -
136 - this.state = {
137 - currentImage: 0,
138 - lightboxIsOpen: false,
139 - children: items,
140 - activeGroup: 'all',
141 - order: 'asc',
142 - theme: {
143 - arrow: {
144 - ':focus': {
145 - outline: 0,
146 - },
147 - },
148 - close: {
149 - ':focus': {
150 - outline: 0,
151 - },
152 - },
153 - },
154 - };
155 -
156 - this.closeLightbox = this.closeLightbox.bind(this);
157 - this.gotoNext = this.gotoNext.bind(this);
158 - this.gotoPrevious = this.gotoPrevious.bind(this);
159 - this.gotoImage = this.gotoImage.bind(this);
160 - this.handleClickImage = this.handleClickImage.bind(this);
161 - this.openLightbox = this.openLightbox.bind(this);
162 - }
163 -
164 - openLightbox(index, event) {
165 - event.preventDefault();
166 - this.setState({
167 - currentImage: index,
168 - lightboxIsOpen: true,
169 - });
170 - }
171 -
172 - gotoPrevious() {
173 - this.setState({
174 - currentImage: this.state.currentImage - 1,
175 - });
176 - }
177 -
178 - gotoImage(index) {
179 - this.setState({
180 - currentImage: index,
181 - });
182 - }
183 -
184 - gotoNext() {
185 - this.setState({
186 - currentImage: this.state.currentImage + 1,
187 - });
188 - }
189 -
190 - closeLightbox() {
191 - this.setState({
192 - currentImage: 0,
193 - lightboxIsOpen: false,
194 - });
195 - }
196 -
197 - handleClickImage() {
198 - if (this.state.currentImage === this.state.children.length - 1) return;
199 -
200 - this.gotoNext();
201 - }
202 -
203 - filterChildren(type) {
204 - this.setState({
205 - children: type === 'all' ? items : items.filter((child) => {
206 - const group = child.groups.find(item => item === type);
207 - return !!group;
208 - }),
209 - activeGroup: type,
210 - });
211 - }
212 -
213 - orderChildren(order) {
214 - const children = this.state.children.sort((a, b) => {
215 - const nameA = a.name.toLowerCase();
216 - const nameB = b.name.toLowerCase();
217 -
218 - if (nameA < nameB) {
219 - return order === 'asc' ? -1 : 1;
220 - }
221 -
222 - if (nameA > nameB) {
223 - return order === 'asc' ? 1 : -1;
224 - }
225 - return 0;
226 - });
227 -
228 - this.setState({ children, order });
229 - }
230 -
231 - render() {
232 - return (
233 - <div className={s.root}>
234 - <Breadcrumb>
235 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
236 - <BreadcrumbItem active>Gallery</BreadcrumbItem>
237 - </Breadcrumb>
238 - <h1 className="page-title">Media - <span className="fw-semi-bold">Images</span>
239 - </h1>
240 -
241 - <div className={s.galleryControls}>
242 - <ButtonGroup id="shuffle-buttons">
243 - <Button color="default" onClick={() => this.filterChildren('all')} active={this.state.activeGroup === 'all'}>All</Button>
244 - <Button color="default" onClick={() => this.filterChildren('nature')} active={this.state.activeGroup === 'nature'}>Nature</Button>
245 - <Button color="default" onClick={() => this.filterChildren('people')} active={this.state.activeGroup === 'people'}>People</Button>
246 - <Button color="default" onClick={() => this.filterChildren('space')} active={this.state.activeGroup === 'space'}>Space</Button>
247 - </ButtonGroup>
248 - <ButtonGroup id="order-buttons">
249 - <Button color="default" onClick={() => this.orderChildren('asc')} active={this.state.order === 'asc'}><i className="fa fa-sort-numeric-asc" /></Button>
250 - <Button color="default" onClick={() => this.orderChildren('desc')} active={this.state.order === 'desc'}><i className="fa fa-sort-numeric-desc" /></Button>
251 - </ButtonGroup>
252 - </div>
253 - <div className={s.gallery}>
254 - {this.state.children.map((item, index) => {
255 - const key = item.name + index;
256 - return (
257 - <div key={key} className={`${s.picture} card`}>
258 - <a href={item.src} onClick={e => this.openLightbox(index, e)}><img className="figure-img" src={item.src} alt="..." /></a>
259 - <div className={s.description}>
260 - <h6 className="mt-0 mb-xs">{item.name}</h6>
261 - <ul className="post-links">
262 - <li><button className="btn-link">{item.date}</button></li>
263 - <li><button className="btn-link"><span className="text-danger"><i className={`fa ${item.like ? 'fa-heart' : 'fa-heart-o'}`} /> Like</span></button></li>
264 - <li><button className="btn-link">Details</button></li>
265 - </ul>
266 - </div>
267 - </div>
268 - );
269 - })}
270 - </div>
271 - <Lightbox
272 - currentImage={this.state.currentImage}
273 - images={this.state.children}
274 - isOpen={this.state.lightboxIsOpen}
275 - onClickPrev={this.gotoPrevious}
276 - onClickNext={this.gotoNext}
277 - onClose={this.closeLightbox}
278 - onClickImage={this.handleClickImage}
279 - onClickThumbnail={this.gotoImage}
280 - backdropClosesModal
281 - enableKeyboardInput
282 - theme={this.state.theme}
283 - />
284 - </div>);
285 - }
286 -
287 -}
288 -
289 -export default Gallery;
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - :global .tile {
5 - display: inline-block;
6 - }
7 -}
8 -
9 -.galleryControls {
10 - display: flex;
11 - justify-content: space-between;
12 - margin-bottom: $spacer;
13 -}
14 -
15 -.gallery {
16 - display: grid;
17 - grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
18 - grid-gap: 15px;
19 -}
20 -
21 -.picture {
22 - padding: 3px;
23 - border-radius: $border-radius;
24 - background-color: $white;
25 -
26 - > a {
27 - overflow: hidden;
28 - }
29 -
30 - :global .figure-img {
31 - width: 100%;
32 - transition: $transition-base;
33 - }
34 -
35 - &:hover {
36 - :global .figure-img {
37 - transform: scale(1.1, 1.1);
38 - }
39 - }
40 -}
41 -
42 -.description {
43 - padding: ($spacer * 0.85) ($spacer * 0.5);
44 -}
1 -{
2 - "name": "invoice",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Gallery.js"
6 -}
1 -/* eslint class-methods-use-this: ["error", { "exceptMethods": ["printInvoice"] }] */
2 -import React from 'react';
3 -import {
4 - Row,
5 - Col,
6 - Table,
7 - ButtonToolbar,
8 - Button,
9 -} from 'reactstrap';
10 -
11 -import s from './Invoice.module.scss';
12 -import Widget from '../../../../components/Widget';
13 -import iLogo from '../../../../images/invoice-logo.png';
14 -
15 -class Stats extends React.Component {
16 -
17 - printInvoice() {
18 - window.print();
19 - }
20 -
21 - render() {
22 - return (
23 - <Row>
24 - <Col lg={11}>
25 - <Row className={s.root}>
26 - <Col xs={12}>
27 - <Widget>
28 - <div className="widget">
29 - <header>
30 - <Row>
31 - <Col md="6" xs="12" className="col-print-6">
32 - <img src={iLogo} alt="Logo" className={s.invoiceLogo} />
33 - </Col>
34 - <Col md="6" xs="12" className="col-print-6">
35 - <h4 className="text-right">
36 - #<span className="fw-semi-bold">9.45613</span> /
37 - <small>17 May 2014</small>
38 - </h4>
39 - <div className="text-muted fs-larger text-right">
40 - Some Invoice number description or whatever
41 - </div>
42 - </Col>
43 - </Row>
44 - </header>
45 - <section className={s.invoiceBody}>
46 - <Row className="mb-lg">
47 - <Col sm={6} className="col-print-6">
48 - <h5 className="text-muted no-margin">Company Information</h5>
49 - <h3 className="company-name m-t-1">
50 - Wrapbootstrap LLC
51 - </h3>
52 - <address>
53 - <strong>2 Infinite Loop</strong><br />
54 - Minsk, Belarus 220004<br />
55 - 088.253.5345<br />
56 - <abbr title="Work email">e-mail:</abbr> <a href="mailto:#">email@example.com</a><br />
57 - <abbr title="Work Phone">phone:</abbr> (012) 345-678-901<br />
58 - <abbr title="Work Fax">fax:</abbr> (012) 678-132-901
59 - </address>
60 - </Col>
61 -
62 - <Col sm={6} className="col-print-6 text-right">
63 - <h5 className="text-muted no-margin">Client Information</h5>
64 - <h3 className="client-name m-t-1">
65 - Veronica Niasvizhskaja
66 - </h3>
67 - <address>
68 - <strong>Consultant</strong> at
69 - {/* eslint-disable */}
70 - <a href="#">Allspana</a><br />
71 - {/* eslint-enable */}
72 - <abbr title="Work email">e-mail:</abbr> <a href="mailto:#">maryna@allspana.by</a><br />
73 - <abbr title="Work Phone">phone:</abbr> (012) 345-678-901<br />
74 - <abbr title="Work Fax">fax:</abbr> (012) 678-132-901
75 - <p className="no-margin"><strong>Note:</strong></p>
76 - <p className="text-muted">Some nights I stay up cashing in my bad luck.
77 - Some nights I call it a draw</p>
78 - </address>
79 - </Col>
80 - </Row>
81 -
82 - <Table className="table-striped">
83 - <thead>
84 - <tr>
85 - <th>#</th>
86 - <th>Item</th>
87 - <th className="hidden-sm-down d-print-none">Description</th>
88 - <th>Quantity</th>
89 - <th className="hidden-sm-down d-print-none">Price per Unit</th>
90 - <th>Total</th>
91 - </tr>
92 - </thead>
93 - <tbody>
94 - <tr>
95 - <td>1</td>
96 - <td>Brand-new 27 monitor</td>
97 - <td className="hidden-sm-down d-print-none">2,560x1,440-pixel (WQHD) resolution supported!</td>
98 - <td>2</td>
99 - <td className="hidden-sm-down d-print-none">700</td>
100 - <td>1,400.00</td>
101 - </tr>
102 - <tr>
103 - <td>2</td>
104 - <td>Domain: okendoken.com</td>
105 - <td className="hidden-sm-down d-print-none">6-month registration</td>
106 - <td>1</td>
107 - <td className="hidden-sm-down d-print-none">10.99</td>
108 - <td>21.88</td>
109 - </tr>
110 - <tr>
111 - <td>3</td>
112 - <td>Atlas Shrugged</td>
113 - <td className="hidden-sm-down d-print-none">Novel by Ayn Rand, first published in 1957 in the
114 - United
115 - States
116 - </td>
117 - <td>5</td>
118 - <td className="hidden-sm-down d-print-none">35</td>
119 - <td>175.00</td>
120 - </tr>
121 - <tr>
122 - <td>4</td>
123 - <td>New Song by Dr. Pre</td>
124 - <td className="hidden-sm-down d-print-none">Lyrics: praesent blandit augue non sapien ornare
125 - imperdiet
126 - </td>
127 - <td>1</td>
128 - <td className="hidden-sm-down d-print-none">2</td>
129 - <td>2.00</td>
130 - </tr>
131 - </tbody>
132 - </Table>
133 -
134 - <Row>
135 - <Col xs={12} md={8} className="col-print-6">
136 - <p>
137 - <strong>Note:</strong>
138 - Thank you for your business. Keep in mind, sometimes bad things happen. But it&#39;s just
139 - sometimes.
140 - </p>
141 - </Col>
142 - <Col md={4} xs={12} className="col-print-6">
143 - <Row className="text-right justify-content-end">
144 - <Col xs={6} />
145 - <Col sm={3}>
146 - <p>Subtotal</p>
147 - <p>Tax(10%)</p>
148 - <p className="no-margin"><strong>Total</strong></p>
149 - </Col>
150 - <Col sm={3}>
151 - <p>1,598.88</p>
152 - <p>159.89</p>
153 - <p className="no-margin"><strong>1,758.77</strong></p>
154 - </Col>
155 - </Row>
156 - </Col>
157 - </Row>
158 - <p className="text-right mt-lg mb-xs">
159 - Marketing Consultant
160 - </p>
161 - <p className="text-right">
162 - <span className="fw-semi-bold">Bob Smith</span>
163 - </p>
164 - <ButtonToolbar className="mt-lg justify-content-end d-print-none">
165 - <Button onClick={this.printInvoice} color="inverse" className="mr-2">
166 - <i className="fa fa-print" />
167 - &nbsp;&nbsp;
168 - Print
169 - </Button>
170 - <Button color="danger">
171 - Proceed with Payment
172 - &nbsp;
173 - <span className="circle bg-white">
174 - <i className="fa fa-arrow-right text-danger" />
175 - </span>
176 - </Button>
177 - </ButtonToolbar>
178 - </section>
179 - </div>
180 - </Widget>
181 - </Col>
182 - </Row>
183 - </Col>
184 - </Row>);
185 - }
186 -
187 -}
188 -
189 -export default Stats;
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - .invoiceLogo {
5 - max-height: 50px;
6 - }
7 -
8 - .invoiceBody {
9 - margin-top: 70px;
10 - }
11 -
12 - :global {
13 - .widget {
14 - padding: 10px 20px;
15 - }
16 - }
17 -}
1 -{
2 - "name": "invoice",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Invoice.js"
6 -}
1 -/* eslint-disable jsx-a11y/href-no-hash */
2 -
3 -import React from 'react';
4 -import {
5 - Row,
6 - Col,
7 - ButtonGroup,
8 - Button,
9 - Nav,
10 - NavItem,
11 - NavLink,
12 - Pagination,
13 - PaginationLink,
14 - PaginationItem,
15 - Badge,
16 - UncontrolledButtonDropdown,
17 - DropdownMenu,
18 - DropdownToggle,
19 - DropdownItem,
20 -} from 'reactstrap';
21 -
22 -import s from './Search.module.scss';
23 -import i1 from '../../../../images/search/1.jpg';
24 -import i2 from '../../../../images/search/5.jpg';
25 -import i3 from '../../../../images/search/3.jpg';
26 -import i4 from '../../../../images/search/13.jpg';
27 -
28 -class Search extends React.Component {
29 -
30 - render() {
31 - return (
32 - <div className={s.root}>
33 - <ol className="breadcrumb">
34 - <li className="breadcrumb-item">YOU ARE HERE</li>
35 - <li className="breadcrumb-item active">Search Results</li>
36 - </ol>
37 - <h1 className="page-title">Matching - <span className="fw-semi-bold">Results</span></h1>
38 - <div className="btn-toolbar justify-content-between">
39 - <div className="d-inline-flex">
40 - <UncontrolledButtonDropdown>
41 - <DropdownToggle color="default" caret>
42 - Popular
43 - </DropdownToggle>
44 - <DropdownMenu>
45 - <DropdownItem>All</DropdownItem>
46 - <DropdownItem>Popular</DropdownItem>
47 - <DropdownItem>Interesting</DropdownItem>
48 - <DropdownItem>Latest</DropdownItem>
49 - </DropdownMenu>
50 - </UncontrolledButtonDropdown>
51 - <UncontrolledButtonDropdown>
52 - <DropdownToggle color="default" caret>
53 - All Time
54 - </DropdownToggle>
55 - <DropdownMenu>
56 - <DropdownItem>Last 24h</DropdownItem>
57 - <DropdownItem>Last Month</DropdownItem>
58 - <DropdownItem>Last Year</DropdownItem>
59 - </DropdownMenu>
60 - </UncontrolledButtonDropdown>
61 - </div>
62 -
63 - <ButtonGroup>
64 - <Button color="gray" className="active"><i className="fa fa-th-list" /></Button>
65 - <Button color="gray"><i className="fa fa-th-large" /></Button>
66 - </ButtonGroup>
67 - </div>
68 - <Row className="mt-3 d-block">
69 - <Col xl={3} sm={12} className="float-xl-right">
70 - <h5>Results <span className="fw-semi-bold">Filtering</span></h5>
71 - <p className="text-muted fs-mini">Listed content is categorized by the following groups:</p>
72 - <Nav className={`nav-pills flex-column nav-stacked ${s.searchResultCategories} mt`}>
73 - <NavItem>
74 - <NavLink href="#">
75 - Hot Ideas
76 - <Badge color="default" pill className="float-right">34</Badge>
77 - </NavLink>
78 - </NavItem>
79 - <NavItem>
80 - <NavLink href="#">
81 - Latest Pictures
82 - <Badge color="default" pill className="float-right">9</Badge>
83 - </NavLink>
84 - </NavItem>
85 - <NavItem>
86 - <NavLink href="#">Labels of Day</NavLink>
87 - </NavItem>
88 - <NavItem>
89 - <NavLink href="#">Recent Movies</NavLink>
90 - </NavItem>
91 - <NavItem>
92 - <NavLink href="#">
93 - Globals
94 - <Badge color="default" pill className="float-right">18</Badge>
95 - </NavLink>
96 - </NavItem>
97 - </Nav>
98 - </Col>
99 -
100 - <Col xl={9} sm={12}>
101 - <p className={s.searchResultsCount}>About 94 700 000 (0.39 sec.) results</p>
102 - <section className={`${s.searchResultItem}`}>
103 - <button className={`btn-link ${s.imageLink}`}>
104 - <img className={s.image} src={i1} alt="" />
105 - </button>
106 - <div className={s.searchResultItemBody}>
107 - <Row>
108 - <Col md={9}>
109 - <h4 className={s.searchResultItemHeading}>
110 - <button className="btn-link">Next generation admin template</button>
111 - </h4>
112 - <p className={s.info}>
113 - New York, NY 20188
114 - </p>
115 - <p className={s.description}>
116 - Not just usual Metro. But something bigger. Not just usual widgets, but real
117 - widgets. Not just yet another admin template,
118 - but next generation admin template.
119 - </p>
120 - </Col>
121 - <Col md={3} xs={12} className="text-center">
122 - <p className="value3 mt-sm">
123 - $9, 700
124 - </p>
125 - <p className="fs-mini text-muted">
126 - PER WEEK
127 - </p>
128 - <Button color="info" size="sm">Learn More</Button>
129 - </Col>
130 - </Row>
131 - </div>
132 - </section>
133 - <section className={s.searchResultItem}>
134 - <button className={`btn-link ${s.imageLink}`}>
135 - <img className={s.image} src={i2} alt="" />
136 - </button>
137 - <div className={s.searchResultItemBody}>
138 - <Row>
139 - <Col md={9}>
140 - <h4 className={s.searchResultItemHeading}>
141 - <button className="btn-link">Try. Posted by Okendoken</button>
142 - <small>
143 - <span className="badge badge-pill badge-danger float-right">
144 - <span className="fw-normal"> Best Deal!</span>
145 - </span>
146 - </small>
147 - </h4>
148 - <p className={s.info}>
149 - Los Angeles, NY 20188
150 - </p>
151 - <p className={s.description}>
152 - You will never know exactly how something will go until you try it. You can
153 - think three hundred times and still have no precise result.
154 - </p>
155 - </Col>
156 - <Col md={3} xs={12} className="text-center">
157 - <p className="value3 mt-sm">
158 - $10, 300
159 - </p>
160 - <p className="fs-mini text-muted">
161 - PER WEEK
162 - </p>
163 - <Button color="info" size="sm">Learn More</Button>
164 - </Col>
165 - </Row>
166 - </div>
167 - </section>
168 - <section className={s.searchResultItem}>
169 - <button className={`btn-link ${s.imageLink}`}>
170 - <img className={s.image} src={i3} alt="" />
171 - </button>
172 - <div className={s.searchResultItemBody}>
173 - <Row>
174 - <Col md={9}>
175 - <h4 className={s.searchResultItemHeading}>
176 - <button className="btn-link">Vitaut the Great</button>
177 - </h4>
178 - <p className={s.info}>
179 - New York, NY 20188
180 - </p>
181 - <p className={s.description}>
182 - The Great Prince of the Grand Duchy of Lithuania he had stopped the invasion
183 - to Europe of Timur (Tamerlan) from Asia heading a big Army
184 - of Belarusians, Lithuanians.
185 - </p>
186 - </Col>
187 - <Col md={3} xs={12} className="text-center">
188 - <p className="value3 mt-sm">
189 - $3, 200
190 - </p>
191 - <p className="fs-mini text-muted">
192 - PER WEEK
193 - </p>
194 - <Button color="info" size="sm">Learn More</Button>
195 - </Col>
196 - </Row>
197 - </div>
198 - </section>
199 - <section className={s.searchResultItem}>
200 - <button className={`btn-link ${s.imageLink}`}>
201 - <img className={s.image} src={i4} alt="" />
202 - </button>
203 - <div className={s.searchResultItemBody}>
204 - <Row>
205 - <Col md={9}>
206 - <h4 className={s.searchResultItemHeading}>
207 - <button className="btn-link">Can I use CSS3 Radial-Gradient?</button>
208 - </h4>
209 - <p className={s.info}>
210 - Minsk, NY 20188
211 - </p>
212 - <p className={s.description}>
213 - Yes you can! Further more, you should!
214 - It let&#39;s you create really beautiful images
215 - either for elements or for the entire background.
216 - </p>
217 - </Col>
218 - <Col md={3} xs={12} className="text-center">
219 - <p className="value3 mt-sm">
220 - $2, 400
221 - </p>
222 - <p className="fs-mini text-muted">
223 - PER MONTH
224 - </p>
225 - <Button color="info" size="sm">Learn More</Button>
226 - </Col>
227 - </Row>
228 - </div>
229 - </section>
230 - <div className="d-flex justify-content-center mt-3">
231 - <Pagination>
232 - <PaginationItem disabled>
233 - <PaginationLink previous href="#">Prev</PaginationLink>
234 - </PaginationItem>
235 - <PaginationItem active>
236 - <PaginationLink href="#">1</PaginationLink>
237 - </PaginationItem>
238 - <PaginationItem>
239 - <PaginationLink href="#">2</PaginationLink>
240 - </PaginationItem>
241 - <PaginationItem>
242 - <PaginationLink href="#">3</PaginationLink>
243 - </PaginationItem>
244 - <PaginationItem>
245 - <PaginationLink href="#">4</PaginationLink>
246 - </PaginationItem>
247 - <PaginationItem>
248 - <PaginationLink href="#">5</PaginationLink>
249 - </PaginationItem>
250 - <PaginationItem>
251 - <PaginationLink next href="#">Next</PaginationLink>
252 - </PaginationItem>
253 - </Pagination>
254 - </div>
255 - </Col>
256 - </Row>
257 - </div>);
258 - }
259 -
260 -}
261 -
262 -export default Search;
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - .searchResultCategories {
5 - > li > a {
6 - color: $gray-600;
7 - font-weight: $font-weight-normal;
8 -
9 - &:hover {
10 - color: $gray-700;
11 - background-color: $gray-400;
12 - }
13 - }
14 - }
15 -
16 - .searchResultsCount {
17 - margin-top: 10px;
18 - }
19 -
20 - .searchResultItem {
21 - padding: 20px;
22 - background-color: $white;
23 - border-radius: $border-radius;
24 - box-shadow: var(--widget-shadow);
25 -
26 - &:first-of-type {
27 - overflow: hidden;
28 - }
29 -
30 - @include clearfix();
31 -
32 - .imageLink {
33 - display: block;
34 - overflow: hidden;
35 - border-top-left-radius: $border-radius;
36 - border-bottom-left-radius: $border-radius;
37 -
38 - @include media-breakpoint-up(md) {
39 - display: inline-block;
40 - margin: -20px 0 -20px -20px;
41 - float: left;
42 - width: 200px;
43 - }
44 -
45 - @include media-breakpoint-down(sm) {
46 - max-height: 200px;
47 - }
48 - }
49 -
50 - .image {
51 - max-width: 100%;
52 - }
53 -
54 - .info {
55 - margin-top: 2px;
56 - font-size: $font-size-sm;
57 - color: $text-muted;
58 - }
59 -
60 - .description {
61 - font-size: $font-size-mini;
62 - margin-bottom: -5px;
63 - }
64 -
65 - + .searchResultItem {
66 - margin-top: 20px;
67 - }
68 -
69 - .searchResultItemBody {
70 - height: auto;
71 -
72 - @include media-breakpoint-down(sm) {
73 - margin-top: 10px;
74 - }
75 -
76 - @include media-breakpoint-up(md) {
77 - margin-left: 200px;
78 - }
79 - }
80 -
81 - .searchResultItemHeading {
82 - font-weight: $font-weight-normal;
83 -
84 - > a {
85 - color: $text-color;
86 - }
87 -
88 - @include media-breakpoint-up(md) {
89 - margin: 0;
90 - }
91 - }
92 - }
93 -}
1 -{
2 - "name": "search",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Search.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Input,
4 -} from 'reactstrap';
5 -import {
6 - withGoogleMap,
7 - withScriptjs,
8 - GoogleMap,
9 - Marker,
10 -} from 'react-google-maps';
11 -
12 -import s from './Timeline.module.scss'; // eslint-disable-line css-modules/no-unused-class
13 -
14 -import a1 from '../../../../images/people/a1.jpg';
15 -import a2 from '../../../../images/people/a2.jpg';
16 -import a3 from '../../../../images/people/a3.jpg';
17 -import a4 from '../../../../images/people/a4.jpg';
18 -import a5 from '../../../../images/people/a5.jpg';
19 -import a6 from '../../../../images/people/a6.jpg';
20 -import avatar from '../../../../images/avatar.png';
21 -import img8 from '../../../../images/search/8.jpg';
22 -
23 -const BasicMap = withScriptjs(withGoogleMap(() =>
24 - <GoogleMap
25 - defaultZoom={8}
26 - defaultCenter={{ lat: 51, lng: 7 }}
27 - defaultOptions={{ mapTypeControl: false, fullscreenControl: false, gestureHandling: 'greedy' }}
28 - >
29 - <Marker position={{ lat: 51, lng: 7 }} draggable />
30 - </GoogleMap>,
31 -));
32 -
33 -class Timeline extends React.Component {
34 -
35 - render() {
36 - return (
37 - <div>
38 - <ol className="breadcrumb">
39 - <li className="breadcrumb-item">YOU ARE HERE</li>
40 - <li className="breadcrumb-item active">Time Line</li>
41 - </ol>
42 - <h1 className="page-title">Events - <span className="fw-semi-bold">Feed</span></h1>
43 -
44 - <ul className={s.timeline}>
45 - <li className={s.onLeft}>
46 - <time className={s.eventTime} dateTime="2014-05-19 03:04">
47 - <span className={s.date}>yesterday</span>
48 - <span className={s.time}>8:03 <span className="fw-semi-bold">pm</span></span>
49 - </time>
50 - <span className={`${s.eventIcon} ${s.eventIconSuccess}`}>
51 - <i className="glyphicon glyphicon-map-marker" />
52 - </span>
53 - <section className={s.event}>
54 - <span className={`thumb-sm ${s.avatar} pull-left mr-sm`}>
55 - <img className="rounded-circle" src={a2} alt="..." />
56 - </span>
57 - <h4 className={s.eventHeading}><button className="btn-link">Jessica Nilson</button>
58 - <small> @jess</small>
59 - </h4>
60 - <p className="fs-sm text-muted">10:12 am - Publicly near Minsk</p>
61 - <div className={s.eventMap}>
62 - <BasicMap
63 - googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=AIzaSyB7OXmzfQYua_1LEhRdqsoYzyJOPh9hGLg"
64 - loadingElement={<div style={{ height: '200px', width: '100%' }} />}
65 - containerElement={<div style={{ height: '200px' }} />}
66 - mapElement={<div style={{ height: '200px' }} />}
67 - />
68 - </div>
69 - <footer>
70 - <ul className={s.postLinks}>
71 - <li><button className="btn-link">1 hour</button>
72 - </li>
73 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> Like</span></button></li>
74 - <li><button className="btn-link">Comment</button></li>
75 - </ul>
76 - <ul className={s.postComments}>
77 - <li>
78 - <span className={`thumb-xs ${s.avatar} pull-left mr-sm`}>
79 - <img className="rounded-circle" src={a2} alt="..." />
80 - </span>
81 - <div className={s.commentBody}>
82 - <h6 className={`${s.author} fs-sm fw-semi-bold`}>Radrigo Gonzales
83 - <small>7 mins ago</small>
84 - </h6>
85 - <p>{`Someone said they were the best people out there just few years ago. Don't know
86 - better options.`}</p>
87 - </div>
88 - </li>
89 - <li>
90 - <span className={`thumb-xs ${s.avatar} pull-left mr-sm`}>
91 - <img className="rounded-circle" src={a4} alt="..." />
92 - </span>
93 - <div className={s.commentBody}>
94 - <h6 className={`${s.author} fs-sm fw-semi-bold`}>Ignacio Abad
95 - <small>6 mins ago</small>
96 - </h6>
97 - <p>True. Heard absolutely the same.</p>
98 - </div>
99 - </li>
100 - <li>
101 - <span className={`thumb-xs ${s.avatar} pull-left mr-sm`}>
102 - <img className="rounded-circle" src={avatar} alt="..." />
103 - </span>
104 - <div className={s.commentBody}>
105 - <Input size="sm" placeholder="Write your comment..." />
106 - </div>
107 - </li>
108 - </ul>
109 - </footer>
110 - </section>
111 - </li>
112 -
113 - <li>
114 - <time className={s.eventTime} dateTime="2014-05-19 03:04">
115 - <span className={s.date}>today</span>
116 - <span className={s.time}>9:41 <span className="fw-semi-bold">am</span></span>
117 - </time>
118 - <span className={`${s.eventIcon} ${s.eventIconPrimary}`}>
119 - <i className="glyphicon glyphicon-comments" />
120 - </span>
121 - <section className={s.event}>
122 - <span className={`thumb-xs ${s.avatar} pull-left mr-sm`}>
123 - <img className="rounded-circle" src={a5} alt="..." />
124 - </span>
125 - <h5 className={s.eventHeading}><button className="btn-link">Bob Nilson</button>
126 - <small><button className="btn-link"> @nils</button></small>
127 - </h5>
128 - <p className="fs-sm text-muted">February 22, 2014 at 01:59 PM</p>
129 - <p className="fs-mini">
130 - There is no such thing as maturity. There is instead an ever-evolving process of maturing.
131 - Because when there is a maturity, there is ...
132 - </p>
133 - <footer>
134 - <ul className={s.postLinks}>
135 - <li><button className="btn-link">1 hour</button></li>
136 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> Like</span></button></li>
137 - <li><button className="btn-link">Comment</button></li>
138 - </ul>
139 - </footer>
140 - </section>
141 - </li>
142 - <li className={s.onLeft}>
143 - <time className={s.eventTime} dateTime="2014-05-19 03:04">
144 - <span className={s.date}>yesterday</span>
145 - <span className={s.time}>9:03 <span className="fw-semi-bold">am</span></span>
146 - </time>
147 - <span className={`${s.eventIcon} ${s.eventIconDanger}`}>
148 - <i className="glyphicon glyphicon-cutlery" />
149 - </span>
150 - <section className={s.event}>
151 - <h5 className={s.eventHeading}><button className="btn-link">Jessica Smith</button>
152 - <small> @jess</small>
153 - </h5>
154 - <p className="fs-sm text-muted">February 22, 2014 at 01:59 PM</p>
155 - <p className="fs-mini">
156 - Check out this awesome photo I made in Italy last summer. Seems it was lost somewhere deep inside
157 - my brand new HDD 40TB. Thanks god I found it!
158 - </p>
159 - <div className={s.eventImage}>
160 - <a href={img8} data-ui-jq="magnificPopup" data-ui-options="{type: 'image'}">
161 - <img src={img8} alt="..." />
162 - </a>
163 - </div>
164 - <footer>
165 - <div className="clearfix">
166 - <ul className={`${s.postLinks} mt-sm pull-left`}>
167 - <li><button className="btn-link">1 hour</button></li>
168 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart-o" /> Like</span></button></li>
169 - <li><button className="btn-link">Comment</button></li>
170 - </ul>
171 -
172 - <span className="thumb thumb-sm pull-right">
173 - <button className="btn-link">
174 - <img className="rounded-circle" src={a1} alt="..." />
175 - </button>
176 - </span>
177 - <span className="thumb thumb-sm pull-right">
178 - <button className="btn-link"><img className="rounded-circle" src={a5} alt="..." /></button>
179 - </span>
180 - <span className="thumb thumb-sm pull-right">
181 - <button className="btn-link"><img className="rounded-circle" src={a3} alt="..." /></button>
182 - </span>
183 - </div>
184 - <ul className={`${s.postComments} mt-sm`}>
185 - <li>
186 - <span className="thumb-xs avatar pull-left mr-sm">
187 - <img className="rounded-circle" src={a1} alt="..." />
188 - </span>
189 - <div className={s.commentBody}>
190 - <h6 className={`${s.author} fs-sm fw-semi-bold`}>Ignacio Abad
191 - <small>6 mins ago</small>
192 - </h6>
193 - <p>Hey, have you heard anything about that?</p>
194 - </div>
195 - </li>
196 - <li>
197 - <span className="thumb-xs avatar pull-left mr-sm">
198 - <img className="rounded-circle" src={avatar} alt="..." />
199 - </span>
200 - <div className={s.commentBody}>
201 - <Input size="sm" placeholder="Write your comment..." />
202 - </div>
203 - </li>
204 - </ul>
205 - </footer>
206 - </section>
207 - </li>
208 - <li>
209 - <time className={s.eventTime} dateTime="2014-05-19 03:04">
210 - <span className={s.date}>yesterday</span>
211 - <span className={s.time}>9:03 <span className="fw-semi-bold">am</span></span>
212 - </time>
213 - <span className={s.eventIcon}>
214 - <img className="rounded-circle" src={avatar} alt="..." />
215 - </span>
216 - <section className={s.event}>
217 - <span className={`thumb-xs ${s.avatar} pull-left mr-sm`}>
218 - <img className="rounded-circle" src={a6} alt="..." />
219 - </span>
220 - <h5 className={s.eventHeading}><button className="btn-link">Jessica Smith</button>
221 - <small> @jess</small>
222 - </h5>
223 - <p className="fs-sm text-muted">9:03 am - Publicly near Minsk</p>
224 - <h5>New <span className="fw-semi-bold">Project</span> Launch</h5>
225 - <p className="fs-mini">
226 - {`Let's try something different this time. Hey, do you wanna join us tonight?
227 - We're planning to a launch a new project soon. Want to discuss with all of you...`}
228 - </p>
229 - <button className="btn-link mt-n-xs fs-mini text-muted">Read more...</button>
230 - <footer>
231 - <ul className={s.postLinks}>
232 - <li><button className="btn-link">1 hour</button></li>
233 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart-o" /> Like</span></button></li>
234 - <li><button className="btn-link">Comment</button></li>
235 - </ul>
236 - </footer>
237 - </section>
238 - </li>
239 - </ul>
240 - </div>
241 - );
242 - }
243 -
244 -}
245 -
246 -export default Timeline;
1 -@import '../../../../styles/app';
2 -
3 -/* Post Comments */
4 -.postComments {
5 - font-size: $font-size-sm;
6 - padding-left: 0;
7 -
8 - @include clearfix();
9 -
10 - .postLinks + & {
11 - margin-top: $spacer / 2;
12 - }
13 -
14 - > li {
15 - padding: 10px;
16 - border-top: 1px solid #e7e7e7;
17 - list-style: none;
18 -
19 - @include clearfix();
20 -
21 - &:last-child {
22 - padding-bottom: 0;
23 - }
24 - }
25 -
26 - p:last-child {
27 - margin-bottom: 0;
28 - }
29 -
30 - .avatar {
31 - margin-top: 1px;
32 - }
33 -
34 - .author {
35 - margin-top: 0;
36 - margin-bottom: 2px;
37 - color: #7ca9dd;
38 - }
39 -
40 - .commentBody {
41 - overflow: auto;
42 - }
43 -
44 - h6.author > small {
45 - font-size: 11px;
46 - }
47 -
48 - :global {
49 - .widget > footer & {
50 - margin-left: -$widget-padding-horizontal;
51 - margin-right: -$widget-padding-horizontal;
52 - }
53 - }
54 -}
55 -
56 -/* Post Links */
57 -.postLinks {
58 - margin-bottom: 0;
59 - font-size: $font-size-sm;
60 - padding-left: 0;
61 -
62 - @include clearfix();
63 -
64 - > li {
65 - float: left;
66 - list-style: none;
67 -
68 - + li {
69 - &::before {
70 - color: #999;
71 - content: '\25cf';
72 - padding: 0 8px;
73 - }
74 - }
75 -
76 - > a {
77 - text-decoration: none;
78 - color: $text-muted;
79 -
80 - :hover {
81 - color: $text-muted;
82 - }
83 - }
84 - }
85 -
86 - :global {
87 - .no-separator > li + li {
88 - margin-left: 12px;
89 -
90 - &::before {
91 - content: normal;
92 - }
93 - }
94 - }
95 -}
96 -
97 -/* Time Line */
98 -.timeline {
99 - position: relative;
100 - min-height: 100%;
101 - list-style: none;
102 - padding-left: 0;
103 - margin-bottom: -40px; /* content padding bottom */
104 - padding-bottom: 80px;
105 -
106 - > li {
107 - @include clearfix();
108 -
109 - + li {
110 - margin-top: 30px;
111 - }
112 - }
113 -
114 - /* the time line :) */
115 - &::before {
116 - position: absolute;
117 - top: 0;
118 - bottom: 0;
119 - left: 24%;
120 - width: 8px;
121 - content: ' ';
122 - margin-left: -4px;
123 - background-color: $white;
124 -
125 - @include media-breakpoint-up(lg) {
126 - left: 50%;
127 - margin-left: -4px;
128 - }
129 - }
130 -}
131 -
132 -.event {
133 - background: $white;
134 - border-radius: $border-radius;
135 - padding: 20px 20px 0;
136 - position: relative;
137 - box-shadow: var(--widget-shadow);
138 -
139 - .timeline & {
140 - float: right;
141 - width: 68%;
142 -
143 - &::before {
144 - right: 100%;
145 - content: ' ';
146 - height: 0;
147 - width: 0;
148 - position: absolute;
149 - border: 10px solid rgba(0, 0, 0, 0);
150 - border-right-color: $white;
151 - top: 15px;
152 - }
153 - }
154 -
155 - .postComments {
156 - margin-left: -20px;
157 - margin-right: -20px;
158 - }
159 -
160 - > footer {
161 - margin: 20px -20px 0;
162 - padding: 10px 20px;
163 - border-bottom-left-radius: $border-radius;
164 - border-bottom-right-radius: $border-radius;
165 - background-color: #fafafa;
166 -
167 - @include clearfix();
168 -
169 - :global {
170 - .thumb {
171 - margin-left: 10px;
172 - }
173 - }
174 - }
175 -
176 - @include media-breakpoint-up(lg) {
177 - .timeline & {
178 - width: 45%;
179 - }
180 -
181 - .timeline > li.onLeft & {
182 - float: left;
183 -
184 - &::before {
185 - right: auto;
186 - left: 100%;
187 - border-right-color: rgba(0, 0, 0, 0);
188 - border-left-color: $white;
189 - }
190 - }
191 - }
192 -}
193 -
194 -.eventTime {
195 - .timeline & {
196 - float: left;
197 - width: 18%;
198 - margin-top: 5px;
199 - text-align: right;
200 -
201 - > .date {
202 - display: block;
203 - font-size: $font-size-larger;
204 - }
205 -
206 - > .time {
207 - display: block;
208 - font-size: $font-size-lg;
209 - font-weight: $font-weight-normal;
210 - }
211 - }
212 -
213 - @include media-breakpoint-up(lg) {
214 - .timeline & {
215 - width: 46%;
216 - }
217 -
218 - .timeline > li.onLeft & {
219 - float: right;
220 - text-align: left;
221 - }
222 - }
223 -}
224 -
225 -.eventIcon {
226 - :global {
227 - .glyphicon {
228 - top: -2px;
229 - }
230 - }
231 -
232 - .timeline & {
233 - position: absolute;
234 - left: 24%;
235 - width: 50px;
236 - height: 50px;
237 - line-height: 37px;
238 - margin-left: -25px;
239 - background-color: $white;
240 - border: 7px solid $white;
241 - border-radius: 50%;
242 - text-align: center;
243 - box-shadow: var(--widget-shadow);
244 -
245 - &.eventIconDanger {
246 - background-color: theme-color('danger');
247 - border-color: lighten(theme-color('danger'), 7%);
248 - }
249 -
250 - &.eventIconWarning {
251 - background-color: theme-color('warning');
252 - border-color: lighten(theme-color('warning'), 7%);
253 - }
254 -
255 - &.eventIconSuccess {
256 - background-color: theme-color('success');
257 - border-color: lighten(theme-color('success'), 7%);
258 - }
259 -
260 - &.eventIconInfo {
261 - background-color: theme-color('info');
262 - border-color: lighten(theme-color('info'), 7%);
263 - }
264 -
265 - &.eventIconPrimary {
266 - background-color: theme-color('primary');
267 - border-color: lighten(theme-color('primary'), 7%);
268 - }
269 -
270 - &.eventIconDanger,
271 - &.eventIconWarning,
272 - &.eventIconSuccess,
273 - &.eventIconInfo,
274 - &.eventIconPrimary {
275 - color: $white;
276 - }
277 -
278 - @include media-breakpoint-up(lg) {
279 - left: 50%;
280 - }
281 -
282 - > img {
283 - width: 36px;
284 - height: 36px;
285 - margin-top: -4px;
286 - }
287 - }
288 -}
289 -
290 -.eventHeading {
291 - margin: 0 0 2px;
292 - font-weight: $font-weight-semi-bold;
293 -
294 - > a {
295 - text-decoration: none;
296 - color: #7ca9dd;
297 - }
298 -
299 - > small {
300 - font-weight: $font-weight-semi-bold;
301 -
302 - > a {
303 - text-decoration: none;
304 - color: $text-muted;
305 - }
306 - }
307 -}
308 -
309 -.eventMap {
310 - display: block;
311 - height: 200px;
312 - margin: 0 -20px -20px;
313 - overflow: visible !important;
314 -}
315 -
316 -.eventImage {
317 - margin: 0 -20px -20px;
318 - max-height: 260px;
319 - overflow: hidden;
320 -
321 - > img {
322 - max-width: 100%;
323 - }
324 -}
325 -
1 -{
2 - "name": "timeline",
3 - "version": "0.0.0",
4 - "main": "./Timeline.js",
5 - "private": true
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Button,
6 - Form,
7 - FormGroup,
8 - Label,
9 - Input,
10 - UncontrolledTooltip,
11 - UncontrolledButtonDropdown,
12 - InputGroup,
13 - InputGroupAddon,
14 - ButtonGroup,
15 - DropdownMenu,
16 - DropdownItem,
17 - DropdownToggle,
18 -} from 'reactstrap';
19 -import { Editor } from 'react-draft-wysiwyg';
20 -import { EditorState } from 'draft-js';
21 -import Select2 from 'react-select2-wrapper';
22 -import Datetime from 'react-datetime';
23 -import ColorPicker from 'rc-color-picker';
24 -import MaskedInput from 'react-maskedinput';
25 -import ReactBootstrapSlider from 'react-bootstrap-slider';
26 -import Dropzone from 'react-dropzone';
27 -import TextareaAutosize from 'react-autosize-textarea';
28 -import ReactMde, { ReactMdeCommands } from 'react-mde';
29 -
30 -
31 -import Widget from '../../../../components/Widget';
32 -
33 -import s from './Elements.module.scss';
34 -
35 -class Elements extends React.Component {
36 -
37 - constructor(props) {
38 - super(props);
39 - this.changeValueDropdown = this.changeValueDropdown.bind(this);
40 - this.onEditorStateChange = this.onEditorStateChange.bind(this);
41 - this.defaultSelectChange = this.defaultSelectChange.bind(this);
42 - this.changeSelectDropdownSimple = this.changeSelectDropdownSimple.bind(this);
43 - this.changeSelectDropdownGreen = this.changeSelectDropdownGreen.bind(this);
44 - this.changeSelectDropdownOrange = this.changeSelectDropdownOrange.bind(this);
45 - this.changeSelectDropdownRed = this.changeSelectDropdownRed.bind(this);
46 - this.changeSelectDropdownBig = this.changeSelectDropdownBig.bind(this);
47 - this.changeColorValue = this.changeColorValue.bind(this);
48 - this.changeColorInput = this.changeColorInput.bind(this);
49 - this.onChangeInputFiles = this.onChangeInputFiles.bind(this);
50 - this.removeInputFiles = this.removeInputFiles.bind(this);
51 - this.onChangeInputImage = this.onChangeInputImage.bind(this);
52 - this.onDrop = this.onDrop.bind(this);
53 -
54 - this.state = {
55 - dropDownValue: 'Another type',
56 - simpleSelectDropdownValue: 'Option one',
57 - greenSelectDropdownValue: 'Hichi',
58 - orangeSelectDropdownValue: 'Shi',
59 - redSelectDropdownValue: 'Ichi',
60 - bigSelectDropdownValue: 'Fourth Item',
61 - editorState: EditorState.createEmpty(),
62 - selectGroupData: [{
63 - id: '1',
64 - text: 'NFC EAST',
65 - children: [{
66 - id: '11', text: 'Dallas Cowboys',
67 - }, {
68 - id: '12', text: 'New York Giants',
69 - }, {
70 - id: '13', text: 'Philadelphia Eagles',
71 - }, {
72 - id: '14', text: 'Washington Redskins',
73 - }],
74 - }, {
75 - id: '2',
76 - text: 'NFC NORTH',
77 - children: [{
78 - id: '21', text: 'Chicago Bears',
79 - }, {
80 - id: '22', text: 'Detroit Lions',
81 - }, {
82 - id: '23', text: 'Green Bay Packers',
83 - }, {
84 - id: '24', text: 'Minnesota Vikings',
85 - }],
86 - }, {
87 - id: '3',
88 - text: 'NFC SOUTH',
89 - children: [{
90 - id: '31', text: 'Atlanta Falcons',
91 - }, {
92 - id: '32', text: 'Carolina Panthers',
93 - }, {
94 - id: '33', text: 'New Orleans Saints',
95 - }, {
96 - id: '34', text: 'Tampa Bay Buccaneers',
97 - }],
98 - }],
99 - selectDefaultData: [{
100 - id: 'Magellanic', text: 'Large Magellanic Cloud',
101 - }, {
102 - id: 'Andromeda', text: 'Andromeda Galaxy',
103 - }, {
104 - id: 'Sextans', text: 'Sextans A',
105 - }],
106 - defaultSelectVal: 'Andromeda',
107 - groupSelectVal: '',
108 - colorpickerValue: '#ff0000',
109 - colorpickerInputValue: '#ff0000',
110 - isDatePickerOpen: false,
111 - isTimePickerOpen: false,
112 - dropFiles: [],
113 - inputFiles: [],
114 - imageFiles: [],
115 - reactMdeValue: {
116 - text: '',
117 - selection: null },
118 - };
119 - }
120 -
121 - onEditorStateChange(editorState) {
122 - this.setState({
123 - editorState,
124 - });
125 - }
126 -
127 - onDrop(files) {
128 - this.setState({
129 - dropFiles: files,
130 - });
131 - }
132 -
133 - onChangeInputFiles(e) {
134 - const files = [];
135 - let i = 0;
136 - for (i; i < e.target.files.length; i += 1) {
137 - files.push(e.target.files[i]);
138 - }
139 - this.setState({
140 - inputFiles: files,
141 - });
142 - }
143 -
144 - onChangeInputImage(e) {
145 - const files = [];
146 - const reader = new FileReader();
147 - files.push(e.target.files[0]);
148 - reader.onloadend = () => {
149 - files[0].preview = reader.result;
150 - files[0].toUpload = true;
151 - this.setState({
152 - imageFiles: files,
153 - });
154 - };
155 - reader.readAsDataURL(e.target.files[0]);
156 - }
157 -
158 - handleValueChange = (value) => {
159 - this.setState({ reactMdeValue: value });
160 - }
161 -
162 - changeValueDropdown(e) {
163 - this.setState({ dropDownValue: e.currentTarget.textContent });
164 - }
165 -
166 - changeSelectDropdownGreen(e) {
167 - this.setState({ greenSelectDropdownValue: e.currentTarget.textContent });
168 - }
169 -
170 - changeSelectDropdownOrange(e) {
171 - this.setState({ orangeSelectDropdownValue: e.currentTarget.textContent });
172 - }
173 -
174 - changeSelectDropdownRed(e) {
175 - this.setState({ redSelectDropdownValue: e.currentTarget.textContent });
176 - }
177 -
178 - changeSelectDropdownBig(e) {
179 - this.setState({ bigSelectDropdownValue: e.currentTarget.textContent });
180 - }
181 -
182 - changeSelectDropdownSimple(e) {
183 - this.setState({ simpleSelectDropdownValue: e.currentTarget.textContent });
184 - }
185 -
186 - defaultSelectChange(e) {
187 - this.setState({
188 - defaultSelectVal: e,
189 - });
190 - }
191 -
192 - changeColorValue(colors) {
193 - this.setState({
194 - colorpickerValue: colors.color,
195 - colorpickerInputValue: colors.color,
196 - });
197 - }
198 -
199 - changeColorInput(e) {
200 - if (e.target.value.length > 3 && e.target.value.length < 8) {
201 - this.setState({
202 - colorpickerInputValue: e.target.value,
203 - colorpickerValue: e.target.value,
204 - });
205 - }
206 - if (e.target.value.length <= 3) {
207 - this.setState({
208 - colorpickerInputValue: e.target.value,
209 - });
210 - }
211 - }
212 -
213 - removeInputFiles() {
214 - this.setState({
215 - inputFiles: [],
216 - });
217 - }
218 -
219 - render() {
220 - return (
221 - <div className={s.root}>
222 - <ol className="breadcrumb">
223 - <li className="breadcrumb-item">YOU ARE HERE</li>
224 - <li className="active breadcrumb-item">Form Elements</li>
225 - </ol>
226 - <h1 className="page-title">Form - <span className="fw-semi-bold">Inputs & Controls</span>
227 - </h1>
228 -
229 - <Row>
230 - {/* Horizontal form */}
231 - <Col lg={6} md={12}>
232 - <Widget title={<h6> Inputs </h6>} settings refresh close>
233 - <FormGroup>
234 - <Form>
235 - <legend><strong>Horizontal</strong> form</legend>
236 - <FormGroup row>
237 - <Label for="normal-field" md={4} className="text-md-right">
238 - Normal field
239 - </Label>
240 - <Col md={7}>
241 - <Input type="text" id="normal-field" placeholder="May have placeholder" />
242 - </Col>
243 - </FormGroup>
244 - <FormGroup row>
245 - <Label for="hint-field" md={4} className="text-md-right">
246 - Label hint
247 - <span className="help-block">Some help text</span>
248 - </Label>
249 - <Col md={7}>
250 - <Input type="text" name="password" id="hint-field" />
251 - </Col>
252 - </FormGroup>
253 - <FormGroup row>
254 - <Label md={4} for="tooltip-enabled" className="text-md-right">Tooltip
255 - enabled</Label>
256 - <Col md={7}>
257 - <Input
258 - type="text" id="tooltip-enabled"
259 - placeholder="Hover over me.."
260 - />
261 - <UncontrolledTooltip placement="top" target="tooltip-enabled">
262 - Some explanation text here
263 - </UncontrolledTooltip>
264 - </Col>
265 - </FormGroup>
266 - <FormGroup row>
267 - <Label md={4} className="text-md-right" for="disabled-input">Disabled
268 - input</Label>
269 - <Col md={7}>
270 - <Input
271 - type="text" id="disabled-input"
272 - disabled="disabled" value="Default value"
273 - />
274 - </Col>
275 - </FormGroup>
276 - <FormGroup row>
277 - <Label md={4} className="text-md-right" for="max-length">
278 - Max length</Label>
279 - <Col md={7}>
280 - <Input
281 - type="text" id="max-length" maxLength="3"
282 - placeholder="Max length 3 characters"
283 - />
284 - <UncontrolledTooltip placement="top" target="max-length">
285 - You cannot write more than 3
286 - </UncontrolledTooltip>
287 - </Col>
288 - </FormGroup>
289 - <FormGroup row>
290 - <Label md={4} className="text-md-right" for="prepended-input">
291 - Prepended input</Label>
292 - <Col md={7}>
293 - <InputGroup>
294 - <InputGroupAddon addonType="prepend"><span className="input-group-text"><i className="fa fa-user" /></span></InputGroupAddon>
295 - <Input id="prepended-input" type="test" bsSize="16" placeholder="Username" />
296 - </InputGroup>
297 - </Col>
298 - </FormGroup>
299 - <FormGroup row>
300 - <Label md={4} className="text-md-right" for="password-field">
301 - Password
302 - </Label>
303 - <Col md={7}>
304 - <InputGroup>
305 - <InputGroupAddon addonType="prepend"><span className="input-group-text"><i className="fa fa-lock" /></span></InputGroupAddon>
306 - <Input
307 - id="password-field" type="password"
308 - placeholder="Password"
309 - />
310 - </InputGroup>
311 - </Col>
312 - </FormGroup>
313 - <FormGroup row>
314 - <Label md={4} className="text-md-right" for="appended-input">
315 - Appended input
316 - </Label>
317 - <Col md={7}>
318 - <InputGroup>
319 - <Input id="appended-input" bsSize="16" type="text" />
320 - <InputGroupAddon addonType="append">.00</InputGroupAddon>
321 - </InputGroup>
322 - </Col>
323 - </FormGroup>
324 - <FormGroup row>
325 - <Label md={4} className="text-md-right" for="combined-input">
326 - Combined
327 - </Label>
328 - <Col md={7}>
329 - <InputGroup>
330 - <InputGroupAddon addonType="prepend">$</InputGroupAddon>
331 - <Input id="combined-input" bsSize="16" type="text" />
332 - <InputGroupAddon addonType="append">.00</InputGroupAddon>
333 - </InputGroup>
334 - </Col>
335 - </FormGroup>
336 - <FormGroup row>
337 - <Label md={4} className="text-md-right" for="transparent-input">
338 - Append Transparent
339 - </Label>
340 - <Col md={7}>
341 - <InputGroup className="input-group-transparent">
342 - <Input id="transparent-input" type="text" />
343 - <InputGroupAddon addonType="append"><span className="input-group-text"><i className="fa fa-camera" /></span></InputGroupAddon>
344 - </InputGroup>
345 - </Col>
346 - </FormGroup>
347 -
348 - <FormGroup row className="form-action">
349 - <Label md={4} />
350 - <Col md={7}>
351 - <Button color="primary" type="submit" className="mr-xs">Save Changes</Button>
352 - <Button color="inverse">Cancel</Button>
353 - </Col>
354 - </FormGroup>
355 - </Form>
356 - </FormGroup>
357 - </Widget>
358 - </Col>
359 -
360 - {/* Default form */}
361 - <Col lg={6} md={12}>
362 - <Widget title={<h6> Prepended and appended inputs </h6>} settings refresh close>
363 - <FormGroup>
364 - <Form>
365 - <legend><strong>Default</strong> Form</legend>
366 - <Row>
367 - <Col md={8}>
368 - <FormGroup>
369 - <Label for="search-input1">
370 - Search type input
371 - </Label>
372 - <InputGroup>
373 - <Input type="text" id="search-input1" />
374 - <InputGroupAddon addonType="append">
375 - <Button color="default">Search</Button>
376 - </InputGroupAddon>
377 - </InputGroup>
378 - </FormGroup>
379 -
380 - <FormGroup>
381 - <Label for="bar">
382 - Whole bar appended
383 - </Label>
384 - <InputGroup>
385 - <Input type="text" id="bar" />
386 - <InputGroupAddon addonType="append">
387 - <ButtonGroup>
388 - <Button color="danger"><i className="fa fa-pencil" /></Button>
389 - <Button color="warning"><i className="fa fa-plus" /></Button>
390 - <Button color="success"><i className="fa fa-refresh" /></Button>
391 - </ButtonGroup>
392 - </InputGroupAddon>
393 - </InputGroup>
394 - </FormGroup>
395 -
396 - <FormGroup>
397 - <Label for="dropdown-appended">
398 - Actions dropdown
399 - </Label>
400 - <InputGroup>
401 - <Input type="text" id="dropdown-appended" />
402 - <InputGroupAddon addonType="append">
403 - <UncontrolledButtonDropdown>
404 - <DropdownToggle caret color="success">
405 - Action
406 - </DropdownToggle>
407 - <DropdownMenu>
408 - <DropdownItem>Action</DropdownItem>
409 - <DropdownItem>Another action</DropdownItem>
410 - <DropdownItem>Something else here</DropdownItem>
411 - <DropdownItem divider />
412 - <DropdownItem>Separated link</DropdownItem>
413 - </DropdownMenu>
414 - </UncontrolledButtonDropdown>
415 - </InputGroupAddon>
416 - </InputGroup>
417 - </FormGroup>
418 -
419 - <FormGroup>
420 - <Label for="segmented-dropdown">
421 - Segmented dropdown
422 - </Label>
423 - <InputGroup>
424 - <Input type="text" id="segmented-dropdown" />
425 - <InputGroupAddon addonType="append">
426 - <UncontrolledButtonDropdown>
427 - <Button color="warning">Action</Button>
428 - <DropdownToggle
429 - caret color="warning"
430 - className="dropdown-toggle-split"
431 - />
432 - <DropdownMenu>
433 - <DropdownItem>Action</DropdownItem>
434 - <DropdownItem>Another action</DropdownItem>
435 - <DropdownItem>Something else here</DropdownItem>
436 - <DropdownItem divider />
437 - <DropdownItem>Separated link</DropdownItem>
438 - </DropdownMenu>
439 - </UncontrolledButtonDropdown>
440 - </InputGroupAddon>
441 - </InputGroup>
442 - <span className="help-block">Anything can be appended to the right</span>
443 - </FormGroup>
444 -
445 - <FormGroup>
446 - <Label for="type-dropdown-appended">
447 - Types dropdown
448 - </Label>
449 - <InputGroup>
450 - <Input type="text" id="type-dropdown-appended" />
451 - <InputGroupAddon addonType="append">
452 - <UncontrolledButtonDropdown>
453 - <DropdownToggle
454 - caret color="primary"
455 - className="dropdown-toggle-split"
456 - >
457 - {this.state.dropDownValue}
458 - </DropdownToggle>
459 - <DropdownMenu>
460 - <DropdownItem onClick={this.changeValueDropdown}>
461 - Another type
462 - </DropdownItem>
463 - <DropdownItem onClick={this.changeValueDropdown}>
464 - Type one
465 - </DropdownItem>
466 - <DropdownItem onClick={this.changeValueDropdown}>
467 - Next type
468 - </DropdownItem>
469 - </DropdownMenu>
470 - </UncontrolledButtonDropdown>
471 - </InputGroupAddon>
472 - </InputGroup>
473 - <p className="help-block">
474 - You can select some type of a field just right in the place.
475 - </p>
476 - </FormGroup>
477 -
478 - <FormGroup>
479 - <Label for="no-borders-input">
480 - Transparent input
481 - </Label>
482 - <Input
483 - type="text" placeholder="Search Dashboard" id="no-borders-input"
484 - className="input-no-border bg-gray-lighter"
485 - />
486 - <p className="help-block">
487 - With <code>.bg-gray-lighter</code>. White by default.
488 - </p>
489 - </FormGroup>
490 - </Col>
491 - </Row>
492 -
493 - <FormGroup className="form-action">
494 - <Button color="inverse" type="submit" className="mr-xs">
495 - Save Changes
496 - </Button>
497 - <Button color="default">Cancel</Button>
498 - </FormGroup>
499 - </Form>
500 - </FormGroup>
501 - </Widget>
502 - </Col>
503 - </Row>
504 -
505 - <Row>
506 -
507 - <Col lg={8} md={12}>
508 - <Widget
509 - title={<h6> Form <span className="fw-semi-bold">Options</span></h6>}
510 - settingsInverse refresh close
511 - >
512 - <Form>
513 - <legend>Control sizing</legend>
514 - <p>
515 - Set input heights using parameters like <code>size=&apos;lg&apos;</code> and
516 - <code>size=&apos;sm&apos;</code>.
517 - Also works with <code>type=&apos;search&apos;</code> inputs, input groups and
518 - selects.
519 - </p>
520 - <br />
521 - <FormGroup>
522 - <Input type="text" placeholder='bsSize="lg"' bsSize="lg" />
523 - </FormGroup>
524 - <FormGroup>
525 - <Input type="text" placeholder="default input" />
526 - </FormGroup>
527 - <FormGroup>
528 - <Input type="text" placeholder='bsSize="sm"' bsSize="sm" />
529 - </FormGroup>
530 - </Form>
531 - </Widget>
532 - </Col>
533 -
534 -
535 - <Col lg={4} md={12}>
536 - <Widget
537 - title={<h6> Form <span className="fw-semi-bold">Options</span></h6>}
538 - settingsInverse refresh close
539 - >
540 - <Form>
541 - <legend> Input Groups</legend>
542 - <p>
543 - Different colors & sizes for any elements including input groups. Elements may be
544 - easily styled with classes like <code>.bg-primary</code> or
545 - <code>.bg-transparent</code>
546 - </p>
547 - <br />
548 - <FormGroup>
549 - <InputGroup>
550 - <InputGroupAddon addonType="prepend" className="bg-transparent">
551 - <span className="input-group-text"><i className="fa fa-github-alt" /></span>
552 - </InputGroupAddon>
553 - <Input type="text" placeholder="First Name" bsSize="16" />
554 - </InputGroup>
555 - </FormGroup>
556 - <FormGroup>
557 - <InputGroup size="lg">
558 - <InputGroupAddon addonType="prepend">
559 - <span className="input-group-text"><i className="fa fa-bars" /></span>
560 - </InputGroupAddon>
561 - <Input type="text" placeholder="Username" bsSize="16" />
562 - </InputGroup>
563 - </FormGroup>
564 - <FormGroup>
565 - <InputGroup size="sm">
566 - <Input type="text" placeholder="City" bsSize="16" />
567 - <InputGroupAddon addonType="prepend">
568 - <span className="bg-danger text-white input-group-text"><i className="fa fa-code-fork" /></span>
569 - </InputGroupAddon>
570 - </InputGroup>
571 - </FormGroup>
572 - </Form>
573 - </Widget>
574 - </Col>
575 - </Row>
576 -
577 - <Row>
578 -
579 - <Col lg="6" md={12}>
580 - <Widget title={<h6><i className="fa fa-font" />Textareas</h6>} settings refresh close>
581 - <Form>
582 - <legend>Small form</legend>
583 - <FormGroup row>
584 - <Label md={3} className="text-md-right" for="default-textarea">Default
585 - textarea</Label>
586 - <Col md={9}>
587 - <Input rows="4" type="textarea" name="text" id="default-textarea" />
588 - </Col>
589 - </FormGroup>
590 - <FormGroup row>
591 - <Label md={3} className="text-md-right" for="elastic-textarea">Auto-growing
592 - textarea</Label>
593 - <Col md={9}>
594 - <TextareaAutosize
595 - rows={3} id="elastic-textarea"
596 - placeholder="Try to add few new lines.."
597 - className={`form-control ${s.autogrow} transition-height`}
598 - />
599 - </Col>
600 - </FormGroup>
601 - <FormGroup row>
602 - <Label md={3} className="text-md-right">
603 - Wysiwyg
604 - <span className="help-block">
605 - With bottom toolbar appended
606 - </span>
607 - </Label>
608 - <Col md={9}>
609 - <Editor
610 - wrapperClassName={s.wysiwygWrapper}
611 - editorClassName={s.wysiwygEditor}
612 - toolbarClassName={s.wysiwygToolbar}
613 - />
614 - <div className="text-md-right mt-xs">
615 - <Button color="danger" className="mr-xs">Save</Button>
616 - <Button color="default">Clear</Button>
617 - </div>
618 - </Col>
619 - </FormGroup>
620 -
621 - <FormGroup row>
622 - <Label md={3} className="text-md-right" for="markdown-editor">
623 - Markdown Editor
624 - </Label>
625 - <Col md={9}>
626 -
627 - <ReactMde
628 - textAreaProps={{
629 - id: 'ta1',
630 - name: 'ta1',
631 - }}
632 - value={this.state.reactMdeValue}
633 - onChange={this.handleValueChange}
634 - commands={ReactMdeCommands.getDefaultCommands()}
635 - />
636 - </Col>
637 - </FormGroup>
638 - </Form>
639 - </Widget>
640 - </Col>
641 -
642 -
643 - <Col lg="6" md={12}>
644 - <Widget
645 - title={<h6><i className="fa fa-list-alt" /> Selects </h6>} refresh close
646 - settings
647 - >
648 - <Form className="form-label-left">
649 - <legend>Default form with labels on left</legend>
650 - <FormGroup row>
651 - <Label md="4" for="default-select">Default select</Label>
652 - <Col md="6" className={s.select2}>
653 - <Select2
654 - value={this.state.defaultSelectVal}
655 - data={this.state.selectDefaultData}
656 - />
657 - </Col>
658 - </FormGroup>
659 - <FormGroup row>
660 - <Label md="4" for="grouped-select">Select with search & groups</Label>
661 - <Col md="6" className={s.select2}>
662 - <Select2
663 - data={this.state.selectGroupData}
664 - />
665 - </Col>
666 - </FormGroup>
667 - </Form>
668 -
669 - <Form>
670 - <legend>Dropdown based colored selects</legend>
671 - <FormGroup row>
672 - <Label md="4" for="simple-select">Simple select</Label>
673 - <Col md="8">
674 - <UncontrolledButtonDropdown>
675 - <DropdownToggle
676 - caret color="default"
677 - className="dropdown-toggle-split mr-xs"
678 - >
679 - {this.state.simpleSelectDropdownValue}
680 - </DropdownToggle>
681 - <DropdownMenu>
682 - <DropdownItem onClick={this.changeSelectDropdownSimple}>
683 - Option One
684 - </DropdownItem>
685 - <DropdownItem onClick={this.changeSelectDropdownSimple}>
686 - Option Two
687 - </DropdownItem>
688 - <DropdownItem onClick={this.changeSelectDropdownSimple}>
689 - Option Three
690 - </DropdownItem>
691 - </DropdownMenu>
692 - </UncontrolledButtonDropdown>
693 - <span className="help-block">Auto size</span>
694 - </Col>
695 - </FormGroup>
696 -
697 - <FormGroup row>
698 - <Label md="4" for="simple-red-select">
699 - Colored ones
700 - <span className="help-block">A bit of Japanese</span>
701 - </Label>
702 - <Col md="8">
703 - <UncontrolledButtonDropdown>
704 - <DropdownToggle
705 - caret color="danger"
706 - className="dropdown-toggle-split mr-xs"
707 - >
708 - {this.state.redSelectDropdownValue}
709 - </DropdownToggle>
710 - <DropdownMenu>
711 - <DropdownItem onClick={this.changeSelectDropdownRed}>
712 - Ichi
713 - </DropdownItem>
714 - <DropdownItem onClick={this.changeSelectDropdownRed}>
715 - Ni
716 - </DropdownItem>
717 - <DropdownItem onClick={this.changeSelectDropdownRed}>
718 - San
719 - </DropdownItem>
720 - </DropdownMenu>
721 - </UncontrolledButtonDropdown>
722 - <UncontrolledButtonDropdown>
723 - <DropdownToggle
724 - caret color="warning"
725 - className="dropdown-toggle-split mr-xs"
726 - >
727 - {this.state.orangeSelectDropdownValue}
728 - </DropdownToggle>
729 - <DropdownMenu>
730 - <DropdownItem onClick={this.changeSelectDropdownOrange}>
731 - Shi
732 - </DropdownItem>
733 - <DropdownItem onClick={this.changeSelectDropdownOrange}>
734 - Go
735 - </DropdownItem>
736 - <DropdownItem onClick={this.changeSelectDropdownOrange}>
737 - Roku
738 - </DropdownItem>
739 - </DropdownMenu>
740 - </UncontrolledButtonDropdown>
741 - <UncontrolledButtonDropdown>
742 - <DropdownToggle
743 - caret color="success"
744 - className="dropdown-toggle-split"
745 - >
746 - {this.state.greenSelectDropdownValue}
747 - </DropdownToggle>
748 - <DropdownMenu>
749 - <DropdownItem onClick={this.changeSelectDropdownGreen}>
750 - Hichi
751 - </DropdownItem>
752 - <DropdownItem onClick={this.changeSelectDropdownGreen}>
753 - Hachi
754 - </DropdownItem>
755 - <DropdownItem onClick={this.changeSelectDropdownGreen}>
756 - Ku
757 - </DropdownItem>
758 - <DropdownItem onClick={this.changeSelectDropdownGreen}>
759 - Ju
760 - </DropdownItem>
761 - </DropdownMenu>
762 - </UncontrolledButtonDropdown>
763 - </Col>
764 - </FormGroup>
765 -
766 - <FormGroup row>
767 - <Label md="4" for="simple-big-select">
768 - Big One
769 - <span className="help-block">
770 - Size can be controlled with <code>size=&apos;lg&apos;</code> & <code>size=&apos;
771 - sm&apos;</code>
772 - </span>
773 - </Label>
774 - <Col md="8">
775 - <UncontrolledButtonDropdown id="simple-big-select">
776 - <DropdownToggle
777 - caret color="default" size="lg"
778 - className="dropdown-toggle-split"
779 - >
780 - <span className="mr-5"> {this.state.bigSelectDropdownValue}</span>
781 - </DropdownToggle>
782 - <DropdownMenu>
783 - <DropdownItem onClick={this.changeSelectDropdownBig}>
784 - Fourth Item
785 - </DropdownItem>
786 - <DropdownItem onClick={this.changeSelectDropdownBig}>
787 - Fifth Item
788 - </DropdownItem>
789 - <DropdownItem onClick={this.changeSelectDropdownBig}>
790 - Sixth Item
791 - </DropdownItem>
792 - </DropdownMenu>
793 - </UncontrolledButtonDropdown>
794 - </Col>
795 - </FormGroup>
796 - </Form>
797 - </Widget>
798 - </Col>
799 - </Row>
800 -
801 -
802 - <Row>
803 - <Col md="12">
804 - <Widget
805 - title={<h6> Checkbox <strong>Controls</strong></h6>} settingsInverse refresh
806 - close
807 - >
808 - <Row>
809 - <Col lg="4">
810 - <Form>
811 -
812 - <legend>Basic</legend>
813 - <p>
814 - Supports bootstrap brand colors: <code>.abc-checkbox-primary</code>,
815 - <code>.abc-checkbox-info</code>
816 - etc.
817 - Pure <abbr title="Cascading Style Sheet">css</abbr> solution with no
818 - javascript.
819 - Let your checkboxes shine!
820 - </p>
821 -
822 - <FormGroup className="checkbox abc-checkbox" check>
823 - <Input id="checkbox1" type="checkbox" />{' '}
824 - <Label for="checkbox1" check>
825 - Default
826 - </Label>
827 - </FormGroup>
828 - <FormGroup className="checkbox abc-checkbox abc-checkbox-primary" check>
829 - <Input id="checkbox2" type="checkbox" defaultChecked />{' '}
830 - <Label for="checkbox2" check>
831 - Primary
832 - </Label>
833 - </FormGroup>
834 - <FormGroup className="checkbox abc-checkbox abc-checkbox-success" check>
835 - <Input id="checkbox3" type="checkbox" />{' '}
836 - <Label for="checkbox3" check>
837 - Success
838 - </Label>
839 - </FormGroup>
840 - <FormGroup className="checkbox abc-checkbox abc-checkbox-info" check>
841 - <Input id="checkbox4" type="checkbox" defaultChecked />{' '}
842 - <Label for="checkbox4" check>
843 - Info
844 - </Label>
845 - </FormGroup>
846 - <FormGroup className="checkbox abc-checkbox abc-checkbox-warning" check>
847 - <Input id="checkbox5" type="checkbox" defaultChecked />{' '}
848 - <Label for="checkbox5" check>
849 - Warning
850 - </Label>
851 - </FormGroup>
852 - <FormGroup className="checkbox abc-checkbox abc-checkbox-danger" check>
853 - <Input id="checkbox6" type="checkbox" defaultChecked />{' '}
854 - <Label for="checkbox6" check>
855 - Check me out
856 - </Label>
857 - </FormGroup>
858 -
859 - </Form>
860 -
861 - </Col>
862 -
863 - <Col lg="4">
864 - <Form>
865 - <legend>Circled</legend>
866 - <p>
867 - <code>.abc-checkbox-circle</code> for roundness. No more sad controls
868 - controls.
869 - Check out this brand-new rounded checkboxes!
870 - </p>
871 - <FormGroup className="checkbox abc-checkbox abc-checkbox-circle" check>
872 - <Input id="checkbox7" type="checkbox" />{' '}
873 - <Label for="checkbox7" check>
874 - Simple Rounded
875 - </Label>
876 - </FormGroup>
877 - <FormGroup
878 - className="checkbox abc-checkbox abc-checkbox-info abc-checkbox-circle" check
879 - >
880 - <Input id="checkbox8" type="checkbox" defaultChecked />{' '}
881 - <Label for="checkbox8" check>
882 - Me too
883 - </Label>
884 - </FormGroup>
885 - </Form>
886 - </Col>
887 -
888 - <Col lg="4">
889 - <Form>
890 - <legend>Disabled</legend>
891 - <p>
892 - Disabled state also supported. Full stack checkbox functionality.
893 - </p>
894 - <FormGroup className="checkbox abc-checkbox" check>
895 - <Input id="checkbox9" type="checkbox" disabled />{' '}
896 - <Label for="checkbox9" check>
897 - Can&apos;t check this
898 - </Label>
899 - </FormGroup>
900 - <FormGroup className="checkbox abc-checkbox abc-checkbox-success" check>
901 - <Input id="checkbox10" type="checkbox" disabled defaultChecked />{' '}
902 - <Label for="checkbox10" check>
903 - This too
904 - </Label>
905 - </FormGroup>
906 - <FormGroup
907 - className="checkbox abc-checkbox abc-checkbox-warning abc-checkbox-circle"
908 - check
909 - >
910 - <Input id="checkbox11" type="checkbox" disabled defaultChecked />{' '}
911 - <Label for="checkbox11" check>
912 - And this
913 - </Label>
914 - </FormGroup>
915 - </Form>
916 - </Col>
917 - </Row>
918 - <p className="fs-mini">Built with <a
919 - href="https://github.com/flatlogic/awesome-bootstrap-checkbox"
920 - rel="noopener noreferrer" target="_blank"
921 - >awesome-bootstrap-checkbox</a>.
922 - </p>
923 - </Widget>
924 - </Col>
925 - </Row>
926 -
927 -
928 - <Row>
929 - <Col md="12">
930 - <Widget title={<h6> Radio <strong>Controls</strong></h6>} close refresh settingsInverse>
931 - <Form>
932 - <Row>
933 - <Col lg="4">
934 - <legend>Basic</legend>
935 - <p>
936 - Supports bootstrap brand colors: <code>.abc-radio-primary</code>, <code>.abc-radio-danger</code>
937 - etc.
938 - Pure css solution with no javascript. Let your radios shine!
939 - </p>
940 - <Row>
941 - <Col md="6">
942 - <FormGroup className="radio abc-radio">
943 - <Input
944 - type="radio" name="radio1" id="radio1" value="option1"
945 - defaultChecked
946 - />
947 - <Label for="radio1">Small</Label>
948 - </FormGroup>
949 - <FormGroup className="radio abc-radio">
950 - <Input type="radio" id="radio2" name="radio1" value="option2" />
951 - <Label for="radio2">Big</Label>
952 - </FormGroup>
953 - </Col>
954 - <Col md="6">
955 - <FormGroup className="radio abc-radio abc-radio-danger">
956 - <Input type="radio" id="radio3" value="option1" name="radio2" />
957 - <Label for="radio3">Next</Label>
958 - </FormGroup>
959 - <FormGroup className="radio abc-radio abc-radio-danger">
960 - <Input
961 - type="radio" id="radio4" value="option2" name="radio2"
962 - defaultChecked
963 - />
964 - <Label for="radio4">One</Label>
965 - </FormGroup>
966 - </Col>
967 - </Row>
968 - </Col>
969 - <Col lg="4">
970 - <legend>
971 - Disabled
972 - </legend>
973 - <p>
974 - Disabled state also supported. Full stack radios functionality.
975 - </p>
976 - <FormGroup className="radio abc-radio">
977 - <Input type="radio" name="radio3" id="radio5" value="option1" disabled />
978 - <Label for="radio5">Next</Label>
979 - </FormGroup>
980 - <FormGroup className="radio abc-radio abc-radio-warning">
981 - <Input
982 - type="radio" name="radio3" id="radio6" value="option2" disabled
983 - defaultChecked
984 - />
985 - <Label for="radio6">One</Label>
986 - </FormGroup>
987 - </Col>
988 - <Col lg="4">
989 - <legend>
990 - Cool iOS-like switches
991 - </legend>
992 - <p>
993 - Simple component that helps you turn your default HTML checkbox inputs into
994 - beautiful iOS 7 style switches in just few simple steps.
995 - </p>
996 - <FormGroup className="display-inline-block checkbox-ios">
997 - <Label for="checkbox-ios1" className="switch">
998 - <Input
999 - type="checkbox" className="ios" defaultChecked
1000 - id="checkbox-ios1"
1001 - /><i />
1002 - </Label>
1003 - </FormGroup>
1004 - <FormGroup className="display-inline-block checkbox-ios ml">
1005 - <Label for="checkbox-ios2" className="switch">
1006 - <Input type="checkbox" className="ios" id="checkbox-ios2" /><i />
1007 - </Label>
1008 - </FormGroup>
1009 - </Col>
1010 - </Row>
1011 - </Form>
1012 - </Widget>
1013 - </Col>
1014 - </Row>
1015 -
1016 - <Row>
1017 -
1018 - <Col lg="6" md="12">
1019 - <Widget title={<h6>Pickers</h6>} close refresh settingsInverse>
1020 - <Form>
1021 - <legend>Date & Time</legend>
1022 - <FormGroup>
1023 - <Label for="datetimepicker">Time-enabled</Label>
1024 - <Row>
1025 - <Col xs="6">
1026 - <div className="datepicker" style={{display: 'flex'}}>
1027 - <Datetime
1028 - id="datepicker"
1029 - open={this.state.isDatePickerOpen}
1030 - viewMode="days" timeFormat={false}
1031 - inputProps={{ ref: (input) => { this.refDatePicker = input; } }}
1032 - />
1033 - <InputGroupAddon addonType="append" onClick={() => { this.refDatePicker.focus(); }}>
1034 - <span className="input-group-text"><i className="glyphicon glyphicon-th" /></span>
1035 - </InputGroupAddon>
1036 - </div>
1037 - </Col>
1038 - <Col xs="6">
1039 - <div className="datepicker" style={{display: 'flex'}}>
1040 - <Datetime
1041 - open={this.state.isTimePickerOpen} id="timepicker"
1042 - inputProps={{ ref: (input) => { this.refTimePicker = input; } }}
1043 - viewMode="time" dateFormat={false}
1044 - />
1045 - <InputGroupAddon addonType="append" onClick={() => { this.refTimePicker.focus(); }}>
1046 - <span className="input-group-text"><i className="glyphicon glyphicon-time" /></span>
1047 - </InputGroupAddon>
1048 - </div>
1049 - </Col>
1050 - </Row>
1051 - </FormGroup>
1052 - </Form>
1053 -
1054 - <Form>
1055 - <legend>Colors</legend>
1056 - <FormGroup>
1057 - <Label for="colorpickeri">
1058 - Simple select
1059 - <span className="help-block">
1060 - Colorpicker plugin for Twitter Bootstrap, originally written by Stefan Petre
1061 - </span>
1062 - <InputGroup id="colorpicker">
1063 - <Input
1064 - type="text" onChange={this.changeColorInput} id="colorpickeri"
1065 - value={this.state.colorpickerInputValue}
1066 - />
1067 - <InputGroupAddon addonType="append">
1068 - <span className="input-group-text"><ColorPicker
1069 - animation="slide-up"
1070 - color={this.state.colorpickerValue}
1071 - onChange={this.changeColorValue}
1072 - /></span>
1073 - </InputGroupAddon>
1074 - </InputGroup>
1075 - </Label>
1076 - </FormGroup>
1077 - </Form>
1078 - </Widget>
1079 - </Col>
1080 -
1081 -
1082 - <Col lg="6" md="12">
1083 - <Widget title={<h6> Input <strong>Masks</strong></h6>} close settingsInverse refresh>
1084 - <Form className="form-label-left">
1085 - <legend>Masked inputs</legend>
1086 - <FormGroup row>
1087 - <Label md="4" xs="12" for="mask-phone">
1088 - Phone
1089 - <span className="help-block">(123) 456-7890</span>
1090 - </Label>
1091 - <Col md="6" xs="12">
1092 - <MaskedInput
1093 - className="form-control" id="mask-phone" mask="(111) 111-1111"
1094 - size="10"
1095 - />
1096 - </Col>
1097 - </FormGroup>
1098 - <FormGroup row>
1099 - <Label md="4" xs="12" for="mask-int-phone">
1100 - International Phone
1101 - <span className="help-block">+375 123 456 789</span>
1102 - </Label>
1103 - <Col md="6" xs="12">
1104 - <MaskedInput
1105 - className="form-control" id="mask-int-phone"
1106 - mask="+111 111 111 111"
1107 - />
1108 - </Col>
1109 - </FormGroup>
1110 - <FormGroup row>
1111 - <Label md="4" xs="12" for="mask-date">
1112 - Date Format
1113 - <span className="help-block">07-03-2013</span>
1114 - </Label>
1115 - <Col md="6" xs="12">
1116 - <MaskedInput className="form-control" id="mask-date" mask="11-11-1111" />
1117 - </Col>
1118 - </FormGroup>
1119 - <FormGroup row>
1120 - <Label md="4" xs="12" for="mask-time">
1121 - Time
1122 - <span className="help-block">13:43</span>
1123 - </Label>
1124 - <Col md="6" xs="12">
1125 - <MaskedInput className="form-control" id="mask-date1" mask="11:11" />
1126 - </Col>
1127 - </FormGroup>
1128 - </Form>
1129 -
1130 - </Widget>
1131 - </Col>
1132 - </Row>
1133 -
1134 -
1135 - <Row>
1136 - <Col xs="12">
1137 - <Widget title={<h6>Sliders</h6>} settingsInverse close refresh>
1138 - <Row>
1139 - <Col lg="4">
1140 - <h4>Color Options</h4>
1141 - <p>Sing extends Bootstrap Slider and provides different color options:</p>
1142 - <Form>
1143 - <div className="mb-sm">
1144 - <ReactBootstrapSlider
1145 - value={14}
1146 - step={1}
1147 - min={0}
1148 - max={20}
1149 - />
1150 - </div>
1151 - <div className="slider-danger mb-sm">
1152 - <ReactBootstrapSlider
1153 - value={18}
1154 - step={1}
1155 - min={0}
1156 - max={20}
1157 - />
1158 - </div>
1159 - <div className="slider-warning mb-sm">
1160 - <ReactBootstrapSlider
1161 - value={7}
1162 - step={1}
1163 - min={0}
1164 - max={20}
1165 - />
1166 - </div>
1167 - <div className="slider-success mb-sm">
1168 - <ReactBootstrapSlider
1169 - value={11}
1170 - step={1}
1171 - min={0}
1172 - max={20}
1173 - />
1174 - </div>
1175 - <div className="slider-inverse mb-sm">
1176 - <ReactBootstrapSlider
1177 - value={4}
1178 - step={1}
1179 - min={0}
1180 - max={20}
1181 - />
1182 - </div>
1183 - </Form>
1184 - </Col>
1185 -
1186 - <Col lg="4">
1187 - <h4>Slider Orientation</h4>
1188 - <p>
1189 - Vertical orientation is also possible. Simply changing <strong>
1190 - data-slider-orientation </strong>
1191 - attribute does the thing.
1192 - </p>
1193 - <Row>
1194 - <Col md="8">
1195 - <span className="">
1196 - <ReactBootstrapSlider
1197 - value={14}
1198 - step={1}
1199 - min={0}
1200 - max={20}
1201 - orientation="vertical"
1202 - />
1203 - </span>
1204 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1205 - <span className="slider-inverse">
1206 - <ReactBootstrapSlider
1207 - value={18}
1208 - step={1}
1209 - min={0}
1210 - max={20}
1211 - orientation="vertical"
1212 - />
1213 - </span>
1214 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1215 - <span className="">
1216 - <ReactBootstrapSlider
1217 - value={7}
1218 - step={1}
1219 - min={0}
1220 - max={20}
1221 - orientation="vertical"
1222 - />
1223 - </span>
1224 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1225 - <span className="slider-inverse">
1226 - <ReactBootstrapSlider
1227 - value={11}
1228 - step={1}
1229 - min={0}
1230 - max={20}
1231 - orientation="vertical"
1232 - />
1233 - </span>
1234 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1235 - <span className="">
1236 - <ReactBootstrapSlider
1237 - value={4}
1238 - step={1}
1239 - min={0}
1240 - max={20}
1241 - orientation="vertical"
1242 - />
1243 - </span>
1244 - </Col>
1245 - </Row>
1246 - </Col>
1247 -
1248 - <Col lg="4">
1249 - <h4>Range Selector</h4>
1250 - <p>Range selector, options specified via <strong>data-slider-value</strong>
1251 - attribute as
1252 - an array. Price range selector:</p>
1253 - <span className="slider-warning">
1254 - <ReactBootstrapSlider
1255 - step={1}
1256 - min={0}
1257 - max={2000}
1258 - value={[200, 1547]} range
1259 - />
1260 - &nbsp;
1261 - </span>
1262 - </Col>
1263 -
1264 - </Row>
1265 - </Widget>
1266 - </Col>
1267 - </Row>
1268 -
1269 -
1270 - <Row>
1271 -
1272 - <Col lg="6" md={12}>
1273 - <Widget
1274 - title={<h6>Simple <strong>file uploads</strong></h6>} settingsInverse close
1275 - refresh
1276 - >
1277 - <Form>
1278 - <blockquote className="blockquote blockquote-reverse">
1279 - <p>The man who is really serious, with the urge to find out what truth is, has no
1280 - style at all. He lives only in what is.</p>
1281 - <footer>Bruce Lee</footer>
1282 - </blockquote>
1283 -
1284 - <FormGroup row>
1285 - <Label md="4" className="text-md-right">
1286 - File input widget
1287 - </Label>
1288 - <Col md="8">
1289 - <InputGroup className="fileinput fileinput-new">
1290 - <input
1291 - onChange={this.onChangeInputFiles}
1292 - id="fileupload1"
1293 - type="file" name="file" className="display-none"
1294 - />
1295 - <Label for="fileupload1" className="form-control">
1296 - {this.state.inputFiles.length > 0 ? <div>
1297 - {this.state.inputFiles.map((file, idx) => (
1298 - <span key={`select-id-${idx.toString()}`} >{file.name}</span>
1299 - ))}
1300 - </div> : <span />}
1301 - </Label>
1302 - {this.state.inputFiles.length === 0 ? <InputGroupAddon addonType="append">
1303 - <Button type="button" color="default" className="btn-file">
1304 - <Label for="fileupload1">Select file</Label>
1305 - </Button>
1306 - </InputGroupAddon> : <InputGroupAddon addonType="append">
1307 - <Button type="button" color="default">
1308 - <Label for="fileupload1">Change file</Label>
1309 - </Button>
1310 - <Button
1311 - type="reset" color="default"
1312 - onClick={this.removeInputFiles}
1313 - >
1314 - <Label>Remove file</Label>
1315 - </Button>
1316 - </InputGroupAddon>}
1317 -
1318 - </InputGroup>
1319 - <span className="help-block">Awesome file input plugin allows you to create a visually appealing
1320 - file or image inputs.</span>
1321 - </Col>
1322 - </FormGroup>
1323 -
1324 - <FormGroup row>
1325 - <Label md="4" className="text-md-right">
1326 - Image upload widget
1327 - </Label>
1328 - <Col md="8">
1329 - <input
1330 - accept="image/*" onChange={this.onChangeInputImage}
1331 - id="fileupload2"
1332 - type="file" name="file" className="display-none"
1333 - />
1334 - <div className="fileinput fileinput-new fileinput-fix">
1335 - <div className="fileinput-new thumbnail">
1336 - {this.state.imageFiles.length > 0 ? <div>
1337 - {this.state.imageFiles.map((file, idx) => (
1338 - <img alt="..." src={file.preview} key={`img-id-${idx.toString()}`} />))}
1339 - </div> : <img
1340 - alt="..."
1341 - src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOTEiIGhlaWdodD0iMTQxIj48cmVjdCB3aWR0aD0iMTkxIiBoZWlnaHQ9IjE0MSIgZmlsbD0iI2VlZSIvPjx0ZXh0IHRleHQtYW5jaG9yPSJtaWRkbGUiIHg9Ijk1LjUiIHk9IjcwLjUiIHN0eWxlPSJmaWxsOiNhYWE7Zm9udC13ZWlnaHQ6Ym9sZDtmb250LXNpemU6MTJweDtmb250LWZhbWlseTpBcmlhbCxIZWx2ZXRpY2Esc2Fucy1zZXJpZjtkb21pbmFudC1iYXNlbGluZTpjZW50cmFsIj4xOTF4MTQxPC90ZXh0Pjwvc3ZnPg=="
1342 - />}
1343 - </div>
1344 - </div>
1345 - <div>
1346 - <Button type="button" color="default"><Label for="fileupload2">Select
1347 - image</Label></Button>
1348 - </div>
1349 - <span className="help-block">Showing a thumbnail instead of the filename when uploading an image.</span>
1350 - </Col>
1351 - </FormGroup>
1352 - </Form>
1353 - </Widget>
1354 - </Col>
1355 -
1356 -
1357 - <Col lg="6" md={12}>
1358 - <Widget title={<h6><strong>Drop</strong> Zone</h6>} settingsInverse refresh close>
1359 - <div>
1360 - <Dropzone
1361 - onDrop={this.onDrop} accept="image/*"
1362 - className={`${s.dropzone} dropzone`}
1363 - >
1364 - {this.state.dropFiles.length > 0 ? <div>
1365 - {this.state.dropFiles.map((file, idx) => (
1366 - <div className="display-inline-block mr-xs mb-xs" key={`drop-id-${idx.toString()}`}>
1367 - <img alt="..." src={file.preview} width={100} />
1368 - <div>{file.name}</div>
1369 - </div>
1370 - ))}
1371 - </div> : <p>This dropzone accepts only images.
1372 - Try dropping some here, or click to select files to upload.</p>}
1373 - </Dropzone>
1374 -
1375 - </div>
1376 - </Widget>
1377 - </Col>
1378 -
1379 - </Row>
1380 -
1381 - </div>
1382 - );
1383 - }
1384 -}
1385 -
1386 -export default Elements;
1 -@import '../../../../styles/app';
2 -
3 -:global {
4 - @import '../../../../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg';
5 - @import '../../../../../node_modules/react-select2-wrapper/css/select2';
6 - @import '../../../../../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox';
7 - @import '../../../../../node_modules/react-datetime/css/react-datetime';
8 - @import '../../../../../node_modules/rc-color-picker/dist/rc-color-picker';
9 - @import '../../../../../node_modules/bootstrap-slider/dist/css/bootstrap-slider';
10 - @import '../../../../../node_modules/jasny-bootstrap/dist/css/jasny-bootstrap';
11 - @import '../../../../../node_modules/react-mde/lib/styles/scss/react-mde-all';
12 -}
13 -
14 -.autogrow {
15 - overflow: hidden;
16 - resize: none;
17 -}
18 -
19 -.wysiwygWrapper {
20 - border: 1px solid #ccc !important;
21 - overflow: visible;
22 - height: 270px;
23 -}
24 -
25 -.wysiwygToolbar {
26 - color: $gray-800 !important;
27 - background-color: #ddd !important;
28 - border-color: transparent !important;
29 -
30 - :global {
31 - .rdw-option-wrapper {
32 - font-family: 'Open Sans', sans-serif;
33 - font-size: 14px;
34 - height: 30px;
35 - min-width: 30px;
36 - margin: 0;
37 - background: #f8f8f8;
38 - }
39 -
40 - .rdw-dropdown-wrapper {
41 - background: #f8f8f8;
42 - }
43 - }
44 -}
45 -
46 -.wysiwygEditor {
47 - position: relative !important;
48 - overflow: hidden !important;
49 - height: 150px;
50 - line-height: 0.1;
51 -}
52 -
53 -.select2 {
54 - :global {
55 - .select2-container {
56 - width: 100% !important;
57 - }
58 -
59 - .select2-selection--single {
60 - border-color: $input-border-color;
61 -
62 - &,
63 - & :global .select2-selection__arrow {
64 - height: $input-height;
65 - }
66 -
67 - & :global .select2-selection__rendered {
68 - line-height: $input-height;
69 - }
70 - }
71 - }
72 -}
73 -
74 -.root {
75 - :global {
76 - /*
77 - * Switchery.
78 - */
79 -
80 - .abc-checkbox,
81 - .abc-radio {
82 - .form-check-input {
83 - position: relative;
84 - margin: 0;
85 - }
86 - }
87 -
88 - .display-inline-block {
89 - display: inline-block;
90 - }
91 -
92 - .display-none {
93 - display: none;
94 - }
95 -
96 - .switch {
97 - box-sizing: content-box;
98 - }
99 -
100 - .switch input {
101 - display: none;
102 - }
103 -
104 - .switch i {
105 - display: inline-block;
106 - cursor: pointer;
107 - padding-right: 20px;
108 - transition: all ease 0.2s;
109 - -webkit-transition: all ease 0.2s;
110 - border-radius: 20px;
111 - box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5);
112 - }
113 -
114 - .switch i::before {
115 - display: block;
116 - content: '';
117 - width: 30px;
118 - height: 30px;
119 - padding: 1px;
120 - border-radius: 20px;
121 - background: white;
122 - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
123 - }
124 -
125 - .switch :checked + i {
126 - padding-right: 0;
127 - padding-left: 20px;
128 - background: rgb(100, 189, 99);
129 - }
130 -
131 - /* Datepicker */
132 -
133 - .datepicker {
134 - .input-group-addon {
135 - display: inline-block;
136 - position: relative;
137 - top: -2px;
138 - left: -2px;
139 - }
140 -
141 - i.glyphicon {
142 - vertical-align: top;
143 - }
144 -
145 - .rdt {
146 - display: inline-block;
147 - }
148 - }
149 -
150 - /* slider */
151 -
152 - $slider-line-height: 8px;
153 - $slider-handle-size: 26px;
154 -
155 - .slider {
156 - display: inline-block;
157 - vertical-align: middle;
158 - position: relative;
159 -
160 - .slider-handle {
161 - position: absolute;
162 - width: $slider-handle-size;
163 - height: $slider-handle-size;
164 - background: $white;
165 - border: 0 solid transparent;
166 -
167 - @include box-shadow(inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 5));
168 -
169 - &:focus {
170 - outline: 0;
171 - }
172 -
173 - &.round {
174 - border-radius: 50%;
175 - }
176 -
177 - &.triangle {
178 - background: transparent none;
179 - }
180 - }
181 -
182 - &.slider-horizontal {
183 - width: 210px;
184 - height: $slider-line-height;
185 -
186 - .slider-track {
187 - height: $slider-line-height/2;
188 - width: 100%;
189 - margin-top: -$slider-line-height/4;
190 - top: 50%;
191 - left: 0;
192 - }
193 -
194 - .slider-selection {
195 - height: 100%;
196 - top: 0;
197 - bottom: 0;
198 - }
199 -
200 - .slider-handle {
201 - margin-left: -$slider-handle-size/2;
202 - margin-top: -$slider-handle-size*3/8;
203 -
204 - &.triangle {
205 - border-width: 0 $slider-line-height/2 $slider-line-height/2 $slider-line-height/2;
206 - width: 0;
207 - height: 0;
208 - border-bottom-color: #0480be;
209 - margin-top: 0;
210 - }
211 - }
212 - }
213 -
214 - &.slider-vertical {
215 - height: 210px;
216 - width: $slider-line-height;
217 -
218 - .slider-track {
219 - width: $slider-line-height/2;
220 - height: 100%;
221 - margin-left: -$slider-line-height/4;
222 - left: 50%;
223 - top: 0;
224 - }
225 -
226 - .slider-selection {
227 - width: 100%;
228 - left: 0;
229 - top: 0;
230 - bottom: 0;
231 - }
232 -
233 - .slider-handle {
234 - margin-left: -$slider-handle-size*3/8;
235 - margin-top: -$slider-handle-size/2;
236 -
237 - &.triangle {
238 - border-width: $slider-line-height/2 0 $slider-line-height/2 $slider-line-height/2;
239 - width: 1px;
240 - height: 1px;
241 - border-left-color: #0480be;
242 - margin-left: 0;
243 - }
244 - }
245 - }
246 -
247 - &.slider-disabled {
248 - .slider-handle {
249 - // @include gradient-y(#dfdfdf, #bebebe);
250 - }
251 -
252 - .slider-track {
253 - @include gradient-y(#e5e5e5, #e9e9e9);
254 -
255 - cursor: not-allowed;
256 - }
257 - }
258 -
259 - input {
260 - display: none;
261 - }
262 -
263 - .tooltip-inner {
264 - white-space: nowrap;
265 - }
266 - }
267 -
268 - .slider-selection {
269 - position: absolute;
270 - background: theme-color('primary');
271 -
272 - @include box-shadow(inset 0 -1px 0 rgba(0, 0, 0, 0.15));
273 -
274 - box-sizing: border-box;
275 - border-radius: $border-radius;
276 - }
277 -
278 - .slider-danger .slider .slider-selection {
279 - background: theme-color('danger'); // $brand-danger;
280 - }
281 -
282 - .slider-success .slider .slider-selection {
283 - background: theme-color('success'); // $brand-success;
284 - }
285 -
286 - .slider-warning .slider .slider-selection {
287 - background: theme-color('warning'); // $brand-warning;
288 - }
289 -
290 - .slider-info .slider .slider-selection {
291 - background: theme-color('info'); // $brand-info;
292 - }
293 -
294 - .slider-inverse .slider .slider-selection {
295 - background: $gray-700; // $gray;
296 - }
297 -
298 - .slider-track {
299 - position: absolute;
300 - cursor: pointer;
301 - border-radius: $border-radius;
302 -
303 - @include gradient-y(#eee, #f8f8f8);
304 - @include box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.1));
305 - }
306 -
307 - /* file input */
308 -
309 - .fileinput.fileinput-new {
310 - .thumbnail {
311 - padding: $thumbnail-padding;
312 - line-height: $line-height-base;
313 - background-color: $thumbnail-bg;
314 - border: $thumbnail-border-width solid $thumbnail-border-color;
315 - border-radius: $thumbnail-border-radius;
316 - transition: all 0.2s ease-in-out;
317 -
318 - @include box-shadow(0 1px 2px rgba(0, 0, 0, 0.075));
319 - }
320 -
321 - &.fileinput-fix {
322 - width: 200px;
323 - height: 150px;
324 - }
325 - }
326 -
327 - .btn {
328 - label {
329 - margin-bottom: 0;
330 - }
331 - }
332 -
333 - .fileinput-preview.fileinput-exists {
334 - border: 1px solid $input-border-color;
335 - border-radius: $border-radius;
336 - padding: 5px;
337 - }
338 -
339 - .fileinput.input-group {
340 - display: flex;
341 - }
342 -
343 - .fileinput-new.input-group .btn-file,
344 - .fileinput-new .input-group .btn-file {
345 - border-radius: 0 $border-radius $border-radius 0;
346 -
347 - &.btn-xs,
348 - &.btn-sm {
349 - border-radius: 0 $border-radius-sm $border-radius-sm 0;
350 - }
351 -
352 - &.btn-lg {
353 - border-radius: 0 $border-radius-lg $border-radius-lg 0;
354 - }
355 - }
356 -
357 - .form-group.has-warning .fileinput {
358 - .fileinput-preview {
359 - color: #fff;
360 - }
361 -
362 - .thumbnail {
363 - border-color: theme-color('warning');
364 - }
365 - }
366 -
367 - .form-group.has-error .fileinput {
368 - .fileinput-preview {
369 - color: #fff;
370 - }
371 -
372 - .thumbnail {
373 - border-color: theme-color('danger');
374 - }
375 - }
376 -
377 - .form-group.has-success .fileinput {
378 - .fileinput-preview {
379 - color: #fff;
380 - }
381 -
382 - .thumbnail {
383 - border-color: theme-color('success');
384 - }
385 - }
386 -
387 - .btn-label {
388 - background: transparent;
389 - left: 2px;
390 - padding: 1px 6px;
391 - }
392 -
393 - // Opposite alignment of blockquote
394 - .blockquote {
395 - padding: ($spacer / 2) $spacer;
396 - margin-bottom: $spacer;
397 - font-size: $blockquote-font-size;
398 - border-left: 0.25rem solid $gray-300;
399 - }
400 -
401 - .blockquote footer {
402 - display: block;
403 - font-size: 80%; // back to default font-size
404 - color: $blockquote-small-color;
405 -
406 - &::before {
407 - content: '\2014 \00A0'; // em dash, nbsp
408 - }
409 - }
410 -
411 - .blockquote-reverse {
412 - padding-right: $spacer;
413 - padding-left: 0;
414 - text-align: right;
415 - border-right: 0.25rem solid $gray-300;
416 - border-left: 0;
417 - }
418 -
419 - .blockquote-reverse footer {
420 - &::before {
421 - content: '';
422 - }
423 -
424 - &::after {
425 - content: '\00A0 \2014'; // nbsp, em dash
426 - }
427 - }
428 - }
429 -}
430 -
431 -.dropzone {
432 - width: 100%;
433 - text-align: center;
434 - padding: 40px 10px;
435 - height: 200px;
436 - border: 2px dashed #ccc;
437 -
438 - @include border-radius($border-radius);
439 -
440 - img {
441 - max-height: 100px;
442 - max-width: 150px;
443 - border-radius: 5px;
444 - }
445 -}
1 -{
2 - "name": "FormsElements",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Elements.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Button,
6 - FormGroup,
7 - Label,
8 -} from 'reactstrap';
9 -import Formsy from 'formsy-react';
10 -
11 -import InputValidation from '../../../../components/InputValidation';
12 -import Widget from '../../../../components/Widget';
13 -
14 -
15 -class Validation extends React.Component {
16 -
17 - render() {
18 - return (
19 - <div>
20 - <ol className="breadcrumb">
21 - <li className="breadcrumb-item">YOU ARE HERE</li>
22 - <li className="breadcrumb-item active">Form Validation</li>
23 - </ol>
24 - <h1 className="page-title">Form - <span className="fw-semi-bold">Validation</span>
25 - </h1>
26 -
27 - <Row>
28 - <Col xs={0} lg={1} />
29 - <Col lg={8} xs={12}>
30 - <Widget
31 - title={<h5> Dead simple validation
32 - <small> No JS needed to tune-up</small>
33 - </h5>} close collapse
34 - >
35 - <Formsy.Form>
36 - <fieldset>
37 - <legend>
38 - By default validation is started only after at least 3 characters have been input.
39 - </legend>
40 - <FormGroup row>
41 - <Label md={3} xs={12} for="basic">Simple required</Label>
42 - <Col md={9} xs={12}>
43 - <InputValidation
44 - type="text"
45 - id="basic"
46 - name="basic"
47 - required
48 - />
49 - </Col>
50 - </FormGroup>
51 - <FormGroup row>
52 - <Label md={3} xs={12} for="basic-change">Min-length On Change
53 - <span className="help-block"> At least 10 </span>
54 - </Label>
55 - <Col md={9} xs={12}>
56 - <InputValidation
57 - type="text" id="basic-change"
58 - name="basic-change"
59 - trigger="change"
60 - validations={{ minLength: 10 }}
61 - validationError={{
62 - minLength: 'This value is too short. It should have 10 characters or more.',
63 - }}
64 - required
65 - />
66 - </Col>
67 - </FormGroup>
68 - </fieldset>
69 - <fieldset>
70 - <legend>
71 - <span className="badge badge-warning text-gray-dark mr-xs">
72 - HTML5 </span> input types supported
73 - </legend>
74 - <FormGroup row>
75 - <Label md={3} xs={12} for="email">E-mail</Label>
76 - <Col md={9} xs={12}>
77 - <InputValidation
78 - type="text"
79 - id="email"
80 - name="email"
81 - trigger="change"
82 - required
83 - validations={{ isEmail: true }}
84 - validationError={{ isEmail: 'This value should be a valid email.' }}
85 - />
86 - <span className="help-block">
87 - This one is triggered even when 1 character has been input
88 - </span>
89 - {/* todo: change triggered */}
90 - </Col>
91 - </FormGroup>
92 - <FormGroup row>
93 - <Label md={3} xs={12} for="number">Number</Label>
94 - <Col md={9} xs={12}>
95 - <InputValidation
96 - type="text"
97 - id="number"
98 - name="number"
99 - required
100 - validations="isNumeric"
101 - validationError={{ isNumeric: 'This value should be a valid number.' }}
102 - />
103 - </Col>
104 - </FormGroup>
105 - <FormGroup row>
106 - <Label md={3} xs={12} for="range">Range</Label>
107 - <Col md={9} xs={12}>
108 - <InputValidation
109 - type="text"
110 - id="range"
111 - name="range"
112 - trigger="change"
113 - required
114 - validations="isRange:[10,100]"
115 - validationError={{ isRange: 'This value should be between 10 and 100.' }}
116 - />
117 - </Col>
118 - </FormGroup>
119 - </fieldset>
120 -
121 - <fieldset>
122 - <legend>
123 - More validation
124 - </legend>
125 - <FormGroup row>
126 - <Label md={3} xs={12} for="password"> Password helpers</Label>
127 - <Col md={9} xs={12}>
128 - <InputValidation
129 - type="password"
130 - id="password"
131 - name="password"
132 - trigger="change"
133 - className="mb-xs"
134 - validations={{ minLength: 6 }}
135 - validationError={{
136 - minLength: 'This value is too short. It should have 6 characters or more.',
137 - }}
138 - required
139 - />
140 - <InputValidation
141 - type="password"
142 - id="password-r"
143 - name="password-r"
144 - trigger="change"
145 - className="mb-sm"
146 - validations={{ equalsField: 'password', minLength: 6 }}
147 - validationError={{
148 - equalsField: 'This value should be the same.',
149 - minLength: 'This value is too short. It should have 6 characters or more.',
150 -
151 - }}
152 - required
153 - />
154 - </Col>
155 - </FormGroup>
156 -
157 - <FormGroup row>
158 - <Label md={3} xs={12} for="website">Website</Label>
159 - <Col md={9} xs={12}>
160 - <InputValidation
161 - type="text"
162 - id="website"
163 - name="website"
164 - trigger="change"
165 - validations="isUrl"
166 - validationError={{
167 - isUrl: 'This value should be a valid url.',
168 - }}
169 - required
170 - />
171 - </Col>
172 - </FormGroup>
173 - </fieldset>
174 -
175 - <div className="form-action">
176 - <Button type="submit" color="danger" className="btn-rounded float-right">Validate & Submit</Button>
177 - <Button type="button" color="default" className="btn-rounded">Cancel</Button>
178 - </div>
179 - </Formsy.Form>
180 - </Widget>
181 - </Col>
182 - </Row>
183 - </div>
184 - );
185 - }
186 -}
187 -
188 -export default Validation;
1 -{
2 - "name": "FormValidation",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Validation.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Button,
6 - FormGroup,
7 - Label,
8 - Nav,
9 - NavLink,
10 - NavItem,
11 - Progress,
12 -} from 'reactstrap';
13 -import Formsy from 'formsy-react';
14 -import Select2 from 'react-select2-wrapper';
15 -import MaskedInput from 'react-maskedinput';
16 -import Datetime from 'react-datetime';
17 -import { select2CountriesData, select2ShipmentData, cardTypesData } from './data';
18 -
19 -
20 -import InputValidation from '../../../../components/InputValidation/InputValidation';
21 -import Widget from '../../../../components/Widget';
22 -import s from './Wizard.module.scss';
23 -
24 -const count = 4;
25 -const StepsComponents = {
26 - Step1: function Step1() {
27 - return (<fieldset>
28 - <FormGroup>
29 - <Label for="username">Username</Label>
30 - <InputValidation
31 - type="text"
32 - id="username"
33 - name="username"
34 - validations={{ isAlphanumeric: true }}
35 - trigger="change"
36 - required
37 - validationError={{ isAlphanumeric: 'Username can contain any letters or numbers, without spaces' }}
38 - />
39 - <p className="help-block">Username can contain any letters or numbers, without spaces</p>
40 - </FormGroup>
41 - <FormGroup>
42 - <Label for="email">Email</Label>
43 - <InputValidation
44 - type="text"
45 - id="email"
46 - name="email"
47 - validations={{ isEmail: true }}
48 - required
49 - validationError={{ isEmail: 'Please provide your E-mail' }}
50 - />
51 - <p className="help-block">Please provide your E-mail</p>
52 - </FormGroup>
53 - <FormGroup>
54 - <Label for="address">Address</Label>
55 - <InputValidation
56 - type="text"
57 - id="address"
58 - name="address"
59 - validations={{ isAlpha: true }}
60 - required
61 - validationError={{ isAlpha: 'Please provide your address' }}
62 - />
63 - <p className="help-block">Please provide your address</p>
64 - </FormGroup>
65 - </fieldset>);
66 - },
67 - Step2: function Step2() {
68 - return (
69 - <fieldset>
70 - <FormGroup>
71 - <Label for="country-select">Destination Country</Label>
72 - <Select2
73 - style={{ width: '100%' }}
74 - id="country-selec"
75 - data={select2CountriesData}
76 - />
77 - <p className="help-block">Please choose your country destination</p>
78 - </FormGroup>
79 - <FormGroup>
80 - <Label for="courier">Choose shipping option</Label>
81 - <Select2
82 - style={{ width: '100%' }}
83 - id="courier"
84 - data={select2ShipmentData}
85 - />
86 - <p className="help-block">Please choose your shipping option</p>
87 - </FormGroup>
88 - <FormGroup>
89 - <Label for="destination">Destination Zip Code</Label>
90 - <MaskedInput
91 - className="form-control" id="destination" mask="111111"
92 - size="6"
93 - />
94 - <p className="help-block">Please provide your Destination Zip Code</p>
95 - </FormGroup>
96 - <FormGroup>
97 - <Label for="dest-address">Destination Address</Label>
98 - <InputValidation type="text" id="dest-address" name="dest-address" />
99 - <p className="help-block">Please provide the destination address</p>
100 - </FormGroup>
101 - </fieldset>
102 - );
103 - },
104 - Step3: function Step3(props) {
105 - return (
106 - <fieldset>
107 - <FormGroup>
108 - <Label for="name">Name on the Card</Label>
109 - <InputValidation type="text" id="name" name="name" />
110 - </FormGroup>
111 - <FormGroup>
112 - <Label for="credit-card-type">Choose shipping option</Label>
113 - <Select2
114 - style={{ width: '100%' }}
115 - id="credit-card-type"
116 - data={cardTypesData}
117 - />
118 - </FormGroup>
119 - <FormGroup>
120 - <Label for="credit">Credit Card Number</Label>
121 - <InputValidation type="text" id="credit" name="credit" />
122 - </FormGroup>
123 - <FormGroup>
124 - <Label for="expiration-data">Expiration Date</Label>
125 - <div className="datepicker">
126 - <Datetime
127 - id="datepicker"
128 - open={props.isDatePickerOpen} //eslint-disable-line
129 - viewMode="days"
130 - />
131 - </div>
132 - </FormGroup>
133 - </fieldset>
134 - );
135 - },
136 - Step4: function Step4() {
137 - return (
138 - <fieldset>
139 - <h2>Thank you!</h2>
140 - <p>Your submission has been received.</p>
141 - </fieldset>
142 - );
143 - },
144 -
145 -};
146 -
147 -class Wizard extends React.Component {
148 - constructor(prop) {
149 - super(prop);
150 - this.state = {
151 - currentStep: 1,
152 - progress: 25,
153 - isDatePickerOpen: false,
154 - };
155 - this.nextStep = this.nextStep.bind(this);
156 - this.previousStep = this.previousStep.bind(this);
157 - }
158 -
159 - nextStep() {
160 - let currentStep = this.state.currentStep;
161 - if (currentStep >= count) {
162 - currentStep = count;
163 - } else {
164 - currentStep += 1;
165 - }
166 -
167 - this.setState({
168 - currentStep,
169 - progress: (100 / count) * currentStep,
170 - });
171 - }
172 -
173 - previousStep() {
174 - let currentStep = this.state.currentStep;
175 - if (currentStep <= 1) {
176 - currentStep = 1;
177 - } else {
178 - currentStep -= 1;
179 - }
180 -
181 - this.setState({
182 - currentStep,
183 - progress: (100 / count) * currentStep,
184 - });
185 - }
186 -
187 - render() {
188 - const currentStep = this.state.currentStep;
189 - return (
190 - <div className={s.root}>
191 - <ol className="breadcrumb">
192 - <li className="breadcrumb-item">YOU ARE HERE</li>
193 - <li className="breadcrumb-item active">Form Wizard</li>
194 - </ol>
195 - <h1 className="page-title">Form - <span className="fw-semi-bold">Wizard</span>
196 - </h1>
197 - <Row>
198 - <Col xl={8} lg={12}>
199 - <Widget
200 - close collapse
201 - className={s.formWizard}
202 - title={<div>
203 - <h4>
204 - Wizard&nbsp;
205 - <small>Tunable widget</small>
206 - </h4>
207 - <p className="text-muted">An example of complete wizard form in widget.</p></div>}
208 - >
209 -
210 - <Nav pills justified className={s.wizardNavigation}>
211 - <NavItem>
212 - <NavLink active={currentStep === 1}>
213 - <small>1.</small>
214 - &nbsp;
215 - Your Details
216 - </NavLink>
217 - </NavItem>
218 - <NavItem>
219 - <NavLink active={currentStep === 2}>
220 - <small>2.</small>
221 - &nbsp;
222 - Shipping
223 - </NavLink>
224 - </NavItem>
225 - <NavItem>
226 - <NavLink active={currentStep === 3}>
227 - <small>3.</small>
228 - &nbsp;
229 - Pay
230 - </NavLink>
231 - </NavItem>
232 - <NavItem>
233 - <NavLink active={currentStep === 4}>
234 - <small>4.</small>
235 - &nbsp;
236 - Thank you!
237 - </NavLink>
238 - </NavItem>
239 - </Nav>
240 - <Progress value={this.state.progress} color="gray-light" className="progress-xs" />
241 - <div className="tab-content">
242 - <div className={s.stepBody}>
243 - <Formsy.Form>
244 - {currentStep === 1 && <StepsComponents.Step1 />}
245 - {currentStep === 2 && <StepsComponents.Step2 />}
246 - {currentStep === 3 && <StepsComponents.Step3 />}
247 - {currentStep === 4 &&
248 - <StepsComponents.Step4 isDatePickerOpen={this.state.isDatePickerOpen} />}
249 - </Formsy.Form>
250 - </div>
251 -
252 - <div className="description">
253 - <ul className="pager wizard">
254 - <li className="previous">
255 - <Button disabled={currentStep === 1} color="primary" onClick={this.previousStep}><i
256 - className="fa fa-caret-left"
257 - />
258 - &nbsp;Previous</Button>
259 - </li>
260 - {currentStep < count &&
261 - <li className="next">
262 - <Button color="primary" onClick={this.nextStep}>Next <i className="fa fa-caret-right" /></Button>
263 - </li>
264 - }
265 - {currentStep === count &&
266 - <li className="finish">
267 - <Button color="success">Finish <i className="fa fa-check" /></Button>
268 - </li>
269 - }
270 - </ul>
271 - </div>
272 - </div>
273 - </Widget>
274 - </Col>
275 - </Row>
276 - </div>
277 - );
278 - }
279 -}
280 -
281 -export default Wizard;
1 -@import '../../../../styles/app';
2 -
3 -:global {
4 - @import '../../../../../node_modules/react-select2-wrapper/css/select2';
5 - @import '../../../../../node_modules/react-datetime/css/react-datetime';
6 -}
7 -
8 -.root {
9 - :global {
10 - .tab-content {
11 - overflow: visible;
12 - }
13 - }
14 -
15 - .formWizard {
16 - :global {
17 - .progress {
18 - margin-top: 6px;
19 - margin-bottom: 10px;
20 - }
21 -
22 - .form-group:last-child {
23 - margin-bottom: 0;
24 - }
25 -
26 - .pager {
27 - display: flex;
28 - margin: 18px 0;
29 - flex-direction: row;
30 - justify-content: space-between;
31 -
32 - .disabled button {
33 - cursor: not-allowed;
34 - opacity: 0.65;
35 - }
36 - }
37 -
38 - #datepicker .input-group {
39 - width: 100%;
40 - display: flex !important;
41 -
42 - .form-control {
43 - border-bottom-right-radius: 0.25rem;
44 - border-top-right-radius: 0.25rem;
45 - }
46 -
47 - .input-group-addon {
48 - display: none;
49 - }
50 - }
51 - }
52 - }
53 -
54 - .wizardNavigation {
55 - margin: 0 (-0.5 * $spacer) 5px;
56 -
57 - :global {
58 - .active {
59 - background: theme-color('primary');
60 -
61 - &:hover {
62 - color: $white;
63 - }
64 - }
65 - }
66 -
67 - li {
68 - padding: 0 (0.5 * $spacer);
69 - }
70 -
71 - a {
72 - padding: $spacer;
73 - color: $text-color;
74 - background: $gray-300;
75 -
76 - strong {
77 - font-weight: $font-weight-semi-bold;
78 - }
79 -
80 - small {
81 - font-weight: $font-weight-thin;
82 - }
83 - }
84 - }
85 -
86 - .stepBody {
87 - padding: $spacer;
88 - background: $gray-300;
89 - border-radius: $border-radius;
90 - }
91 -}
1 -export const select2CountriesData = [
2 - { text: 'Afghanistan', id: 'AF' },
3 - { text: 'land Islands', id: 'AX' },
4 - { text: 'Albania', id: 'AL' },
5 - { text: 'Algeria', id: 'DZ' },
6 - { text: 'American Samoa', id: 'AS' },
7 - { text: 'AndorrA', id: 'AD' },
8 - { text: 'Angola', id: 'AO' },
9 - { text: 'Anguilla', id: 'AI' },
10 - { text: 'Antarctica', id: 'AQ' },
11 - { text: 'Antigua and Barbuda', id: 'AG' },
12 - { text: 'Argentina', id: 'AR' },
13 - { text: 'Armenia', id: 'AM' },
14 - { text: 'Aruba', id: 'AW' },
15 - { text: 'Australia', id: 'AU' },
16 - { text: 'Austria', id: 'AT' },
17 - { text: 'Azerbaijan', id: 'AZ' },
18 - { text: 'Bahamas', id: 'BS' },
19 - { text: 'Bahrain', id: 'BH' },
20 - { text: 'Bangladesh', id: 'BD' },
21 - { text: 'Barbados', id: 'BB' },
22 - { text: 'Belarus', id: 'BY' },
23 - { text: 'Belgium', id: 'BE' },
24 - { text: 'Belize', id: 'BZ' },
25 - { text: 'Benin', id: 'BJ' },
26 - { text: 'Bermuda', id: 'BM' },
27 - { text: 'Bhutan', id: 'BT' },
28 - { text: 'Bolivia', id: 'BO' },
29 - { text: 'Bosnia and Herzegovina', id: 'BA' },
30 - { text: 'Botswana', id: 'BW' },
31 - { text: 'Bouvet Island', id: 'BV' },
32 - { text: 'Brazil', id: 'BR' },
33 - { text: 'British Indian Ocean Territory', id: 'IO' },
34 - { text: 'Brunei Darussalam', id: 'BN' },
35 - { text: 'Bulgaria', id: 'BG' },
36 - { text: 'Burkina Faso', id: 'BF' },
37 - { text: 'Burundi', id: 'BI' },
38 - { text: 'Cambodia', id: 'KH' },
39 - { text: 'Cameroon', id: 'CM' },
40 - { text: 'Canada', id: 'CA' },
41 - { text: 'Cape Verde', id: 'CV' },
42 - { text: 'Cayman Islands', id: 'KY' },
43 - { text: 'Central African Republic', id: 'CF' },
44 - { text: 'Chad', id: 'TD' },
45 - { text: 'Chile', id: 'CL' },
46 - { text: 'China', id: 'CN' },
47 - { text: 'Christmas Island', id: 'CX' },
48 - { text: 'Cocos (Keeling) Islands', id: 'CC' },
49 - { text: 'Colombia', id: 'CO' },
50 - { text: 'Comoros', id: 'KM' },
51 - { text: 'Congo', id: 'CG' },
52 - { text: 'Congo, The Democratic Republic of the', id: 'CD' },
53 - { text: 'Cook Islands', id: 'CK' },
54 - { text: 'Costa Rica', id: 'CR' },
55 - { text: "Cote D'Ivoire", id: 'CI' },
56 - { text: 'Croatia', id: 'HR' },
57 - { text: 'Cuba', id: 'CU' },
58 - { text: 'Cyprus', id: 'CY' },
59 - { text: 'Czech Republic', id: 'CZ' },
60 - { text: 'Denmark', id: 'DK' },
61 - { text: 'Djibouti', id: 'DJ' },
62 - { text: 'Dominica', id: 'DM' },
63 - { text: 'Dominican Republic', id: 'DO' },
64 - { text: 'Ecuador', id: 'EC' },
65 - { text: 'Egypt', id: 'EG' },
66 - { text: 'El Salvador', id: 'SV' },
67 - { text: 'Equatorial Guinea', id: 'GQ' },
68 - { text: 'Eritrea', id: 'ER' },
69 - { text: 'Estonia', id: 'EE' },
70 - { text: 'Ethiopia', id: 'ET' },
71 - { text: 'Falkland Islands (Malvinas)', id: 'FK' },
72 - { text: 'Faroe Islands', id: 'FO' },
73 - { text: 'Fiji', id: 'FJ' },
74 - { text: 'Finland', id: 'FI' },
75 - { text: 'France', id: 'FR' },
76 - { text: 'French Guiana', id: 'GF' },
77 - { text: 'French Polynesia', id: 'PF' },
78 - { text: 'French Southern Territories', id: 'TF' },
79 - { text: 'Gabon', id: 'GA' },
80 - { text: 'Gambia', id: 'GM' },
81 - { text: 'Georgia', id: 'GE' },
82 - { text: 'Germany', id: 'DE' },
83 - { text: 'Ghana', id: 'GH' },
84 - { text: 'Gibraltar', id: 'GI' },
85 - { text: 'Greece', id: 'GR' },
86 - { text: 'Greenland', id: 'GL' },
87 - { text: 'Grenada', id: 'GD' },
88 - { text: 'Guadeloupe', id: 'GP' },
89 - { text: 'Guam', id: 'GU' },
90 - { text: 'Guatemala', id: 'GT' },
91 - { text: 'Guernsey', id: 'GG' },
92 - { text: 'Guinea', id: 'GN' },
93 - { text: 'Guinea-Bissau', id: 'GW' },
94 - { text: 'Guyana', id: 'GY' },
95 - { text: 'Haiti', id: 'HT' },
96 - { text: 'Heard Island and Mcdonald Islands', id: 'HM' },
97 - { text: 'Holy See (Vatican City State)', id: 'VA' },
98 - { text: 'Honduras', id: 'HN' },
99 - { text: 'Hong Kong', id: 'HK' },
100 - { text: 'Hungary', id: 'HU' },
101 - { text: 'Iceland', id: 'IS' },
102 - { text: 'India', id: 'IN' },
103 - { text: 'Indonesia', id: 'ID' },
104 - { text: 'Iran, Islamic Republic Of', id: 'IR' },
105 - { text: 'Iraq', id: 'IQ' },
106 - { text: 'Ireland', id: 'IE' },
107 - { text: 'Isle of Man', id: 'IM' },
108 - { text: 'Israel', id: 'IL' },
109 - { text: 'Italy', id: 'IT' },
110 - { text: 'Jamaica', id: 'JM' },
111 - { text: 'Japan', id: 'JP' },
112 - { text: 'Jersey', id: 'JE' },
113 - { text: 'Jordan', id: 'JO' },
114 - { text: 'Kazakhstan', id: 'KZ' },
115 - { text: 'Kenya', id: 'KE' },
116 - { text: 'Kiribati', id: 'KI' },
117 - { text: 'Korea, Democratic Republic', id: 'KP' },
118 - { text: 'Korea, Republic of', id: 'KR' },
119 - { text: 'Kuwait', id: 'KW' },
120 - { text: 'Kyrgyzstan', id: 'KG' },
121 - { text: 'Lao Democratic Republic', id: 'LA' },
122 - { text: 'Latvia', id: 'LV' },
123 - { text: 'Lebanon', id: 'LB' },
124 - { text: 'Lesotho', id: 'LS' },
125 - { text: 'Liberia', id: 'LR' },
126 - { text: 'Libyan Arab Jamahiriya', id: 'LY' },
127 - { text: 'Liechtenstein', id: 'LI' },
128 - { text: 'Lithuania', id: 'LT' },
129 - { text: 'Luxembourg', id: 'LU' },
130 - { text: 'Macao', id: 'MO' },
131 - { text: 'Macedonia, The Former Yugoslav Republic of', id: 'MK' },
132 - { text: 'Madagascar', id: 'MG' },
133 - { text: 'Malawi', id: 'MW' },
134 - { text: 'Malaysia', id: 'MY' },
135 - { text: 'Maldives', id: 'MV' },
136 - { text: 'Mali', id: 'ML' },
137 - { text: 'Malta', id: 'MT' },
138 - { text: 'Marshall Islands', id: 'MH' },
139 - { text: 'Martinique', id: 'MQ' },
140 - { text: 'Mauritania', id: 'MR' },
141 - { text: 'Mauritius', id: 'MU' },
142 - { text: 'Mayotte', id: 'YT' },
143 - { text: 'Mexico', id: 'MX' },
144 - { text: 'Micronesia, Federated States of', id: 'FM' },
145 - { text: 'Moldova, Republic of', id: 'MD' },
146 - { text: 'Monaco', id: 'MC' },
147 - { text: 'Mongolia', id: 'MN' },
148 - { text: 'Montenegro', id: 'ME' },
149 - { text: 'Montserrat', id: 'MS' },
150 - { text: 'Morocco', id: 'MA' },
151 - { text: 'Mozambique', id: 'MZ' },
152 - { text: 'Myanmar', id: 'MM' },
153 - { text: 'Namibia', id: 'NA' },
154 - { text: 'Nauru', id: 'NR' },
155 - { text: 'Nepal', id: 'NP' },
156 - { text: 'Netherlands', id: 'NL' },
157 - { text: 'Netherlands Antilles', id: 'AN' },
158 - { text: 'New Caledonia', id: 'NC' },
159 - { text: 'New Zealand', id: 'NZ' },
160 - { text: 'Nicaragua', id: 'NI' },
161 - { text: 'Niger', id: 'NE' },
162 - { text: 'Nigeria', id: 'NG' },
163 - { text: 'Niue', id: 'NU' },
164 - { text: 'Norfolk Island', id: 'NF' },
165 - { text: 'Northern Mariana Islands', id: 'MP' },
166 - { text: 'Norway', id: 'NO' },
167 - { text: 'Oman', id: 'OM' },
168 - { text: 'Pakistan', id: 'PK' },
169 - { text: 'Palau', id: 'PW' },
170 - { text: 'Palestinian Territory, Occupied', id: 'PS' },
171 - { text: 'Panama', id: 'PA' },
172 - { text: 'Papua New Guinea', id: 'PG' },
173 - { text: 'Paraguay', id: 'PY' },
174 - { text: 'Peru', id: 'PE' },
175 - { text: 'Philippines', id: 'PH' },
176 - { text: 'Pitcairn', id: 'PN' },
177 - { text: 'Poland', id: 'PL' },
178 - { text: 'Portugal', id: 'PT' },
179 - { text: 'Puerto Rico', id: 'PR' },
180 - { text: 'Qatar', id: 'QA' },
181 - { text: 'Reunion', id: 'RE' },
182 - { text: 'Romania', id: 'RO' },
183 - { text: 'Russian Federation', id: 'RU' },
184 - { text: 'RWANDA', id: 'RW' },
185 - { text: 'Saint Helena', id: 'SH' },
186 - { text: 'Saint Kitts and Nevis', id: 'KN' },
187 - { text: 'Saint Lucia', id: 'LC' },
188 - { text: 'Saint Pierre and Miquelon', id: 'PM' },
189 - { text: 'Saint Vincent and the Grenadines', id: 'VC' },
190 - { text: 'Samoa', id: 'WS' },
191 - { text: 'San Marino', id: 'SM' },
192 - { text: 'Sao Tome and Principe', id: 'ST' },
193 - { text: 'Saudi Arabia', id: 'SA' },
194 - { text: 'Senegal', id: 'SN' },
195 - { text: 'Serbia', id: 'RS' },
196 - { text: 'Seychelles', id: 'SC' },
197 - { text: 'Sierra Leone', id: 'SL' },
198 - { text: 'Singapore', id: 'SG' },
199 - { text: 'Slovakia', id: 'SK' },
200 - { text: 'Slovenia', id: 'SI' },
201 - { text: 'Solomon Islands', id: 'SB' },
202 - { text: 'Somalia', id: 'SO' },
203 - { text: 'South Africa', id: 'ZA' },
204 - { text: 'South Georgia and the South Sandwich Islands', id: 'GS' },
205 - { text: 'Spain', id: 'ES' },
206 - { text: 'Sri Lanka', id: 'LK' },
207 - { text: 'Sudan', id: 'SD' },
208 - { text: 'Suriname', id: 'SR' },
209 - { text: 'Svalbard and Jan Mayen', id: 'SJ' },
210 - { text: 'Swaziland', id: 'SZ' },
211 - { text: 'Sweden', id: 'SE' },
212 - { text: 'Switzerland', id: 'CH' },
213 - { text: 'Syrian Arab Republic', id: 'SY' },
214 - { text: 'Taiwan, Province of China', id: 'TW' },
215 - { text: 'Tajikistan', id: 'TJ' },
216 - { text: 'Tanzania, United Republic of', id: 'TZ' },
217 - { text: 'Thailand', id: 'TH' },
218 - { text: 'Timor-Leste', id: 'TL' },
219 - { text: 'Togo', id: 'TG' },
220 - { text: 'Tokelau', id: 'TK' },
221 - { text: 'Tonga', id: 'TO' },
222 - { text: 'Trinidad and Tobago', id: 'TT' },
223 - { text: 'Tunisia', id: 'TN' },
224 - { text: 'Turkey', id: 'TR' },
225 - { text: 'Turkmenistan', id: 'TM' },
226 - { text: 'Turks and Caicos Islands', id: 'TC' },
227 - { text: 'Tuvalu', id: 'TV' },
228 - { text: 'Uganda', id: 'UG' },
229 - { text: 'Ukraine', id: 'UA' },
230 - { text: 'United Arab Emirates', id: 'AE' },
231 - { text: 'United Kingdom', id: 'GB' },
232 - { text: 'United States', id: 'US' },
233 - { text: 'United States Minor Outlying Islands', id: 'UM' },
234 - { text: 'Uruguay', id: 'UY' },
235 - { text: 'Uzbekistan', id: 'UZ' },
236 - { text: 'Vanuatu', id: 'VU' },
237 - { text: 'Venezuela', id: 'VE' },
238 - { text: 'Viet Nam', id: 'VN' },
239 - { text: 'Virgin Islands, British', id: 'VG' },
240 - { text: 'Virgin Islands, U.S.', id: 'VI' },
241 - { text: 'Wallis and Futuna', id: 'WF' },
242 - { text: 'Western Sahara', id: 'EH' },
243 - { text: 'Yemen', id: 'YE' },
244 - { text: 'Zambia', id: 'ZM' },
245 - { text: 'Zimbabwe', id: 'ZW' },
246 -];
247 -
248 -
249 -export const select2ShipmentData = [
250 - { id: 'Australia Post', text: 'Australia Post' },
251 - { id: 'DHL US', text: 'DHL US' },
252 - { id: 'Other', text: 'Other' },
253 -];
254 -
255 -export const cardTypesData = [
256 - { id: 'Visa', text: 'Visa' },
257 - { id: 'Mastercard', text: 'Mastercard' },
258 - { id: 'Other', text: 'Other' },
259 -];
1 -{
2 - "name": "FormWizard",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Wizard.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Label,
6 - Input,
7 - Form,
8 - FormGroup,
9 - DropdownToggle,
10 - DropdownMenu,
11 - DropdownItem,
12 - UncontrolledDropdown,
13 - Button,
14 - Modal,
15 - ModalHeader,
16 - ModalBody,
17 - ModalFooter,
18 -} from 'reactstrap';
19 -import $ from 'jquery';
20 -import 'imports-loader?window.jQuery=jquery,this=>window!jquery-ui/ui/widgets/sortable'; //eslint-disable-line
21 -
22 -import Widget from '../../../components/Widget';
23 -import './Grid.scss';
24 -
25 -
26 -import peopleA1 from '../../../images/people/a1.jpg';
27 -import peopleA2 from '../../../images/people/a2.jpg';
28 -import peopleA3 from '../../../images/people/a3.jpg';
29 -import peopleA4 from '../../../images/people/a4.jpg';
30 -
31 -const sortOptions = {
32 - connectWith: '.widget-container',
33 - handle: 'header, .handle',
34 - cursor: 'move',
35 - iframeFix: false,
36 - items: '.widget:not(.locked)',
37 - opacity: 0.8,
38 - helper: 'original',
39 - revert: true,
40 - forceHelperSize: true,
41 - placeholder: 'widget widget-placeholder',
42 - forcePlaceholderSize: true,
43 - tolerance: 'pointer',
44 -};
45 -
46 -const tooltipPlacement = 'bottom';
47 -
48 -class Grid extends React.Component {
49 -
50 - constructor(props) {
51 - super(props);
52 - this.state = {
53 - isOpen: false,
54 - modal: false,
55 - };
56 - this.toggleModal = this.toggleModal.bind(this);
57 - this.closePrompt = this.closePrompt.bind(this);
58 - }
59 -
60 - componentDidMount() {
61 - $('.widget-container').sortable(sortOptions);
62 - this.initSharesWidget();
63 - this.initNewsWidget();
64 - }
65 -
66 - initSharesWidget() {
67 - $(this.sharesWidget).widgster({
68 - loaderTemplate: `<div class="loader animated fadeIn">
69 - <span class="spinner"><i class="fa fa-spinner fa-spin"></i></span>
70 - </div>`,
71 - });
72 - }
73 -
74 - initNewsWidget() {
75 - /**
76 - * Make refresh button spin when loading
77 - */
78 - $('#news-widget').bind('load.widgster', () => {
79 - $(this).find('[data-widgster="load"] > i').addClass('fa-spin');
80 - }).bind('loaded.widgster', () => {
81 - $(this).find('[data-widgster="load"] > i').removeClass('fa-spin');
82 - });
83 - }
84 -
85 - closePrompt(callback) {
86 - this.setState({ modal: true });
87 - $('#news-widget-remove').bind('click', () => {
88 - this.setState({ modal: false });
89 - callback();
90 - });
91 - }
92 -
93 - toggleModal() {
94 - this.setState({ modal: !this.state.modal });
95 - }
96 -
97 - render() {
98 - return (
99 - <div>
100 - <ol className="breadcrumb">
101 - <li className="breadcrumb-item">YOU ARE HERE</li>
102 - <li className="breadcrumb-item active">Grid</li>
103 - </ol>
104 - <h1 className="page-title">Grid - <span className="fw-semi-bold">Options</span></h1>
105 -
106 - <Row>
107 - <Col xl={7}>
108 - <Widget
109 - title={<h5>Draggable Grid &nbsp;<span className="badge badge-danger fw-normal">since 2.1</span></h5>}
110 - >
111 - <div>
112 - <p>
113 - <strong>Widgster</strong> is a plugin that allows to easily implement basic widget functions that
114 - lots of our customers have requested. For now it has the following essential
115 - widget features:
116 - </p>
117 - <ul className="text-list">
118 - <li><strong>Collapse/Expand</strong> - all widgets can be collapsed to fill only header&apos;s
119 - vertical
120 - space;
121 - </li>
122 - <li><strong>Close</strong> - closable. Any widget may be removed by clicking the close btn;</li>
123 - <li><strong>Full Screen</strong> - an option to make widget fill the whole window (just like OS);</li>
124 - <li><strong>Ajax Load</strong> - the hottest option allowing to load/reload widget content
125 - asynchronously. You just
126 - need to provide an url to fetch the data from. With loader delivered.
127 - </li>
128 - </ul>
129 - <p>It&apos;s available under MIT license, check out
130 - <a href="https://github.com/flatlogic/widgster" target="_blank" rel="noopener noreferrer"> github </a>
131 - to find it.</p>
132 - <p>
133 - Test it out!
134 - </p>
135 - </div>
136 - </Widget>
137 - </Col>
138 - </Row>
139 -
140 - <Row className="grid-demo">
141 - <Col className="widget-container" xl={6} xs={12}>
142 - <Widget
143 - title={<h6>Default <span className="fw-semi-bold">Widget</span></h6>}
144 - refresh collapse fullscreen close
145 - showTooltip tooltipPlacement={tooltipPlacement}
146 - >
147 - <div>
148 - <p>A timestamp this widget was created: Apr 24, 19:07:07</p>
149 - <p>A timestamp this widget was updated: Apr 24, 19:07:07</p>
150 - </div>
151 - </Widget>
152 -
153 - <Widget
154 - className="shares-widget"
155 - ref={(r) => {
156 - this.sharesWidget = r;
157 - }}
158 - data-post-processing
159 - showTooltip tooltipPlacement={tooltipPlacement}
160 - title={<h6>
161 - <span className="badge badge-primary"><i className="fa fa-facebook" /></span> &nbsp;
162 - Latest <span className="fw-semi-bold">Shares</span>
163 - </h6>}
164 - close="Close" refresh="Reload"
165 - bodyClass={'p-0'}
166 - >
167 - <div className="list-group list-group-lg">
168 - <button className="list-group-item text-left">
169 - <span className="thumb-sm mr">
170 - <img className="rounded-circle" src={peopleA1} alt="..." />
171 - </span>
172 - <div>
173 - <h6 className="m-0">Maikel Basso</h6>
174 - <small className="text-muted">about 2 mins ago</small>
175 - </div>
176 - <i className="fa fa-circle ml-auto text-danger" />
177 - </button>
178 - <button className="list-group-item text-left">
179 - <span className="thumb-sm mr">
180 - <img className="rounded-circle" src={peopleA2} alt="..." />
181 - </span>
182 - <div>
183 - <h6 className="m-0">Ianus Arendse</h6>
184 - <small className="text-muted">about 42 mins ago</small>
185 - </div>
186 - <i className="fa fa-circle ml-auto text-info" />
187 - </button>
188 - <button className="list-group-item text-left">
189 - <span className="thumb-sm mr">
190 - <img className="rounded-circle" src={peopleA3} alt="..." />
191 - </span>
192 - <div>
193 - <h6 className="m-0">Valdemar Landau</h6>
194 - <small className="text-muted">one hour ago</small>
195 - </div>
196 - <i className="fa fa-circle ml-auto text-success" />
197 - </button>
198 - <button className="list-group-item text-left mb-n-md">
199 - <span className="thumb-sm mr">
200 - <img className="rounded-circle" src={peopleA4} alt="..." />
201 - </span>
202 - <div>
203 - <h6 className="m-0">Rick Teagan</h6>
204 - <small className="text-muted">3 hours ago</small>
205 - </div>
206 - <i className="fa fa-circle ml-auto text-warning" />
207 - </button>
208 - </div>
209 - </Widget>
210 - <Widget
211 - id="autoload-widget"
212 - data-post-processing="true"
213 - data-widgster-autoload="true"
214 - data-widgster-show-loader="false"
215 - title={<h6>Autoload <span className="fw-semi-bold">Widget</span></h6>}
216 - customControls={
217 - <UncontrolledDropdown>
218 - <DropdownToggle
219 - tag="span"
220 - data-toggle="dropdown"
221 - >
222 - <i className="glyphicon glyphicon-cog" />
223 - </DropdownToggle>
224 - <DropdownMenu right>
225 - <DropdownItem data-widgster="load" title="Reload">
226 - Reload &nbsp;&nbsp;
227 - <span className="badge badge-pill badge-success animated bounceIn">
228 - <strong>9</strong>
229 - </span>
230 - </DropdownItem>
231 - <DropdownItem data-widgster="fullscreen" title="Full Screen">Fullscreen</DropdownItem>
232 - <DropdownItem data-widgster="restore" title="Restore">Restore</DropdownItem>
233 - <DropdownItem divider />
234 - <DropdownItem data-widgster="close" title="Close">Close</DropdownItem>
235 - </DropdownMenu>
236 - </UncontrolledDropdown>
237 - }
238 - >
239 - <div>
240 - <h3 className="text-center m-0">Sign up, it&apos;s <strong>free</strong></h3>
241 - <p className="lead text-muted text-center">
242 - Faith makes it possible to achieve that which man&apos;s mind can conceive and believe.
243 - </p>
244 - <Form>
245 - <FormGroup>
246 - <Label for="exampleInputEmail1"><i className="fa fa-circle text-warning" /> &nbsp; Email
247 - address</Label>
248 - <Input
249 - type="email" id="exampleInputEmail1"
250 - placeholder="Enter email"
251 - />
252 - </FormGroup>
253 - <FormGroup>
254 - <Label for="pswd"><i className="fa fa-circle text-danger" /> &nbsp; Password</Label>
255 - <Input id="pswd" type="text" placeholder="Min 8 characters" />
256 - </FormGroup>
257 - <p>
258 - To make a widget automatically load it&apos;s content you just need to set
259 - <strong>data-widgster-autoload</strong> attribute and provide an url.
260 - </p>
261 - <pre><code>data-widgster-load=&quot;server/ajax_widget.html&quot;
262 - data-widgster-autoload=&quot;true&quot;</code></pre>
263 - <p>
264 - <strong>data-widgster-autoload</strong> may be set to an integer value. If set, for example, to
265 - 2000 will refresh widget every 2 seconds.
266 - </p>
267 - <div className="clearfix">
268 - <div className="btn-toolbar float-right">
269 - <button type="button" className="btn btn-transparent">Cancel</button>
270 - <button type="button" className="btn btn-success">&nbsp;Submit&nbsp;</button>
271 - </div>
272 - </div>
273 - </Form>
274 - </div>
275 - </Widget>
276 -
277 - <Widget>
278 - <header>
279 - <h6>Custom <span className="fw-semi-bold">Loader</span></h6>
280 - </header>
281 - <div className="widget-body" style={{ minHeight: '140px' }}>
282 - <div className="loader animated fadeIn handle">
283 - <span className="spinner">
284 - <i className="fa fa-spinner fa-spin" />
285 - </span>
286 - </div>
287 - </div>
288 - </Widget>
289 - </Col>
290 -
291 -
292 - <Col xl={6} className="widget-container">
293 - <Widget
294 - id="news-widget"
295 - data-post-processing="true"
296 - title={<div><h6> News <span className="badge badge-pill badge-success">17</span></h6>
297 - <span className="text-muted">spinning refresh button & close prompt</span>
298 - </div>}
299 - customControls={
300 - <div>
301 - <button data-widgster="expand" title="Expand"><i className="glyphicon glyphicon-chevron-up" /></button>
302 - <button data-widgster="collapse" title="Collapse"><i
303 - className="glyphicon glyphicon-chevron-down"
304 - /></button>
305 - <button data-widgster="load" title="I am spinning!"><i className="fa fa-refresh" /></button>
306 - <button data-widgster="close" title="Close"><i className="glyphicon glyphicon-remove" /></button>
307 - </div>
308 - }
309 - bodyClass={'p-0'}
310 - options={{
311 - showLoader: false,
312 - closePrompt: this.closePrompt,
313 - }}
314 - >
315 - <ul className={'news-list stretchable'}>
316 - <li>
317 - <span className="icon bg-danger text-white">
318 - <i className="fa fa-star" />
319 - </span>
320 - <div className="news-item-info">
321 - <h5 className="name m-0 mb-xs"><button className="btn-link">First Human Colony on Mars</button></h5>
322 - <p className="fs-mini">
323 - First 700 people will take part in building first human settlement outside of Earth.
324 - That&apos;s awesome, right?
325 - </p>
326 - <time className="help-block">Mar 20, 18:46</time>
327 - </div>
328 - </li>
329 - <li>
330 - <span className="icon bg-info text-white">
331 - <i className="fa fa-microphone" />
332 - </span>
333 - <div className="news-item-info">
334 - <h5 className="name m-0 mb-xs"><button className="btn-link">Light Blue reached $300</button></h5>
335 - <p className="fs-mini">
336 - Light Blue Inc. shares just hit $300 price. &quot;This was inevitable. It should
337 - have happen sooner or later&quot; - says NYSE expert.
338 - </p>
339 - <time className="help-block">Sep 25, 11:59</time>
340 - </div>
341 - </li>
342 - <li>
343 - <span className="icon bg-success text-white">
344 - <i className="fa fa-eye" />
345 - </span>
346 - <div className="news-item-info">
347 - <h5 className="name m-0 mb-xs"><button className="btn-link">No more spying</button></h5>
348 - <p className="fs-mini">
349 - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
350 - incididunt ut labore et dolore magna aliqua.
351 - </p>
352 - <time className="help-block">Mar 20, 18:46</time>
353 - </div>
354 - </li>
355 - </ul>
356 -
357 - <Modal isOpen={this.state.modal} toggle={this.toggleModal} id="news-close-modal">
358 - <ModalHeader toggle={this.toggleModal} id="news-close-modal-label">Sure?</ModalHeader>
359 - <ModalBody className="bg-white">
360 - Do you really want to unrevertably remove this super news widget?
361 - </ModalBody>
362 - <ModalFooter>
363 - <Button color="default" onClick={this.toggleModal} data-dismiss="modal">No</Button>{' '}
364 - <Button color="danger" data-widgster="close" id="news-widget-remove">Yes,
365 - remove widget</Button>
366 - </ModalFooter>
367 - </Modal>
368 -
369 - </Widget>
370 -
371 - <Widget
372 - className="locked" data-widgster-collapsed="true"
373 - title={<h6>Collapsed by default & locked</h6>}
374 - collapse close
375 - >
376 - <div className="widget-body">
377 - <blockquote>
378 - There are no limits. There are plateaus, but you must not stay there, you must go beyond
379 - them. If it kills you, it kills you. A man must constantly exceed his level.
380 - <footer>
381 - Bruce Lee
382 - </footer>
383 - </blockquote>
384 - <p>To make a widget initially collapsed just add
385 - <code>data-widgster-collapsed=&quot;true&quot;</code> attribute
386 - to <code>.widget</code>.</p>
387 - <p>To make it locked (prevent dragging) add <code>.locked</code> class.</p>
388 - </div>
389 - </Widget>
390 -
391 - <Widget
392 - className="bg-gray"
393 - bodyClass={'p-0'}
394 - >
395 - <div className="jumbotron handle bg-gray text-white mb-0">
396 - <div className="container">
397 - <h1>Draggable story!</h1>
398 - <p className="lead">
399 - <em>Build</em> your own
400 - interfaces! Sit back and relax.
401 - </p>
402 - <p className="text-center">
403 - <button className="btn btn-danger btn-lg" data-widgster="fullscreen">
404 - Fullscreen me! &nbsp;
405 - <i className="fa fa-check" />
406 - </button>
407 - </p>
408 - <button className="btn btn-danger btn-lg" data-widgster="restore">
409 - Want to go back?
410 - </button>
411 - </div>
412 - </div>
413 -
414 - </Widget>
415 - </Col>
416 - </Row>
417 -
418 - </div>
419 - );
420 - }
421 -}
422 -
423 -export default Grid;
1 -@import '../../../styles/app';
2 -
3 -/* NEWS LIST */
4 -:global {
5 - .news-list {
6 - margin-bottom: 0;
7 - padding-left: 0;
8 -
9 - li {
10 - list-style: none;
11 - box-sizing: content-box;
12 - border-top: 1px solid $gray-200;
13 - padding: 12px;
14 - cursor: pointer;
15 -
16 - @include transition(background-color 0.2s ease-out);
17 -
18 - &:hover {
19 - background: $body-bg-light;
20 - }
21 -
22 - &:last-child {
23 - margin-bottom: -10px;
24 - }
25 - }
26 -
27 - img,
28 - .icon {
29 - float: left;
30 - height: 50px;
31 - width: 50px;
32 - }
33 -
34 - .icon {
35 - line-height: 50px;
36 - border-radius: 50%;
37 - text-align: center;
38 - font-size: 28px;
39 -
40 - .fa {
41 - vertical-align: baseline;
42 - }
43 - }
44 -
45 - .news-item-info {
46 - margin-left: 62px; /* 50 + 12px padding */
47 - }
48 -
49 - .name {
50 - text-transform: uppercase;
51 -
52 - a {
53 - text-decoration: none;
54 -
55 - &:hover {
56 - color: $link-color;
57 - }
58 - }
59 - }
60 - }
61 -}
62 -
63 -/* SHARES LIST */
64 -:global {
65 - .shares-widget {
66 - :global {
67 - .list-group {
68 - .list-group-item {
69 - display: flex;
70 - align-items: center;
71 - }
72 - }
73 - }
74 - }
75 -}
1 -{
2 - "name": "grid",
3 - "version": "0.0.0",
4 - "main": "./Grid.js",
5 - "private": true
6 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import { withRouter } from 'react-router';
4 -import {
5 - BootstrapTable,
6 - TableHeaderColumn,
7 -} from 'react-bootstrap-table';
8 -import { connect } from 'react-redux';
9 -import { Link } from 'react-router-dom';
10 -import { Popover, PopoverBody, PopoverHeader, Breadcrumb, BreadcrumbItem, Alert } from 'reactstrap';
11 -
12 -import {
13 - Button,
14 - ButtonToolbar,
15 - Dropdown,
16 - DropdownItem,
17 - DropdownMenu,
18 - DropdownToggle
19 -} from "reactstrap";
20 -
21 -import Widget from '../../../components/Widget';
22 -import s from './Management.module.scss';
23 -
24 -import { getProductsRequest, deleteProductRequest } from '../../../actions/products'
25 -import Loader from '../../../components/Loader';
26 -import cx from 'classnames';
27 -
28 -class Management extends React.Component {
29 - static propTypes = {
30 - products: PropTypes.array,
31 - dispatch: PropTypes.func.isRequired,
32 - };
33 -
34 - static defaultProps = {
35 - products: []
36 - };
37 -
38 - state = {
39 - popovers: {},
40 - promoAlert: false,
41 - };
42 -
43 - constructor() {
44 - super();
45 - this.apiFormatter = this.apiFormatter.bind(this);
46 - }
47 -
48 - componentDidMount() {
49 - this.props.dispatch(getProductsRequest());
50 - setTimeout(() => {
51 - this.showPromoAlert();
52 - }, 100);
53 - }
54 -
55 - showPromoAlert() {
56 - this.setState({promoAlert: true});
57 - }
58 -
59 - imageFormatter(cell) {
60 - return (
61 - <img src={cell} alt="..." className={s.image} title="image"/>
62 - )
63 - }
64 -
65 - titleFormatter(cell, row) {
66 - return cell ? (
67 - <Link to={'/app/ecommerce/product/' + row.id}>
68 - {cell[0].toUpperCase() + cell.slice(1)}
69 - </Link>
70 - ) : ""
71 - }
72 -
73 - deleteProduct(id) {
74 - this.props.dispatch(deleteProductRequest({
75 - id,
76 - history: this.props.history
77 - }))
78 - }
79 -
80 - togglePopover(id) {
81 - let newState = {...this.state};
82 - if (!this.state.popovers[id]) {
83 - newState.popovers[id] = true;
84 - } else {
85 - newState.popovers[id] = !newState.popovers[id];
86 - }
87 - this.setState(newState);
88 - }
89 -
90 - apiFormatter(cell, row) {
91 - return (
92 - <ButtonToolbar>
93 - <Button color="info" size="xs" onClick={()=> this.props.history.push('/app/ecommerce/management/' + row.id)}>
94 - <span className="d-none d-md-inline-block">Edit</span>
95 - <span className="d-md-none"><i className='la la-edit'/></span>
96 - </Button>
97 - <Button id={'popoverDelete_' + row.id} color="danger" size="xs">
98 - {this.props.isDeleting && this.props.idToDelete === row.id ? <Loader size={14}/> :
99 - <span>
100 - <span className="d-none d-md-inline-block">Delete</span>
101 - <span className="d-md-none"><i className='la la-remove'/></span>
102 - </span>
103 - }
104 - </Button>
105 - <Popover className="popover-danger" target={'popoverDelete_' + row.id} placement="top" isOpen={this.state.popovers[row.id]}
106 - toggle={()=>{this.togglePopover(row.id)}}
107 - >
108 - <PopoverHeader className="px-5">Are you sure?</PopoverHeader>
109 - <PopoverBody className="px-5 d-flex justify-content-center">
110 - <ButtonToolbar>
111 - <Button color="success" size="xs" onClick={() => {this.deleteProduct(row.id)}}>
112 - Yes
113 - </Button>
114 - <Button color="danger" size="xs" onClick={() => {this.togglePopover(row.id)}}>
115 - No
116 - </Button>
117 - </ButtonToolbar>
118 - </PopoverBody>
119 - </Popover>
120 - </ButtonToolbar>
121 - )
122 - }
123 -
124 - renderSizePerPageDropDown = (props) => {
125 - const limits = [];
126 - props.sizePerPageList.forEach((limit) => {
127 - limits.push(<DropdownItem key={limit}
128 - onClick={() => props.changeSizePerPage(limit)}>{limit}</DropdownItem>);
129 - });
130 -
131 - return (
132 - <Dropdown isOpen={props.open} toggle={props.toggleDropDown}>
133 - <DropdownToggle color="default" caret>
134 - {props.currSizePerPage}
135 - </DropdownToggle>
136 - <DropdownMenu>
137 - {limits}
138 - </DropdownMenu>
139 - </Dropdown>
140 - );
141 - };
142 -
143 - createNewProduct() {
144 - this.props.history.push('/app/ecommerce/management/create');
145 - }
146 -
147 - render() {
148 - const options = {
149 - sizePerPage: 10,
150 - paginationSize: 3,
151 - sizePerPageDropDown: this.renderSizePerPageDropDown,
152 - };
153 -
154 - return (
155 - <div>
156 - <Breadcrumb>
157 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
158 - <BreadcrumbItem active>E-commerce</BreadcrumbItem>
159 - </Breadcrumb>
160 - <div className="page-top-line">
161 - <h2 className="page-title">Product - <span className="fw-semi-bold">Management</span></h2>
162 - <Alert
163 - color="success"
164 - className={cx(s.promoAlert, {[s.showAlert]: this.state.promoAlert})}
165 - >
166 - This page is only available in <a className="text-white font-weight-bold" rel="noreferrer noopener" href="https://flatlogic.com/admin-dashboards/sing-app-react-node-js" target="_blank">Sing App React with Node.js</a> integration!
167 - </Alert>
168 - </div>
169 - <Widget title="List of Products" collapse close
170 - fetchingData={this.props.isReceiving}
171 - >
172 - <Button color="success" onClick={() => this.createNewProduct()}>Create Product</Button>
173 - <BootstrapTable data={this.props.products} version="4" pagination options={options} search
174 - tableContainerClass={`table-striped ${s.bootstrapTable}`}>
175 - <TableHeaderColumn dataField="id" isKey={true} className="width-50"
176 - columnClassName="width-50">
177 - <span className="fs-sm">ID</span>
178 - </TableHeaderColumn>
179 - <TableHeaderColumn dataField="img" dataFormat={this.imageFormatter}>
180 - <span className="fs-sm">Image</span>
181 - </TableHeaderColumn>
182 - <TableHeaderColumn dataField="title" dataFormat={this.titleFormatter}>
183 - <span className="fs-sm">Title</span>
184 - </TableHeaderColumn>
185 - {window.innerWidth >= 768 && (
186 - <TableHeaderColumn dataField="subtitle">
187 - <span className="fs-sm">Subtitle</span>
188 - </TableHeaderColumn>
189 - )}
190 - {window.innerWidth >= 768 && (
191 - <TableHeaderColumn dataField="price">
192 - <span className="fs-sm">Price($)</span>
193 - </TableHeaderColumn>
194 - )}
195 - <TableHeaderColumn dataFormat={this.apiFormatter}>
196 - <span className="fs-sm">Api</span>
197 - </TableHeaderColumn>
198 - </BootstrapTable>
199 - </Widget>
200 - </div>
201 -
202 - );
203 - }
204 -}
205 -
206 -function mapStateToProps(state) {
207 - return {
208 - products: state.products.data,
209 - isReceiving: state.products.isReceiving,
210 - isDeleting: state.products.isDeleting,
211 - idToDelete: state.products.idToDelete,
212 - };
213 -}
214 -
215 -export default withRouter(connect(mapStateToProps)(Management));
1 -.bootstrapTable {
2 - border: none;
3 -
4 - :global .table {
5 - thead,
6 - tbody {
7 - th,
8 - td {
9 - border-right: none;
10 - border-left: none;
11 - }
12 - }
13 -
14 - thead th {
15 - background: transparent;
16 - }
17 -
18 - tbody td {
19 - vertical-align: middle;
20 - }
21 - }
22 -}
23 -
24 -.image {
25 - width: 100px;
26 -}
27 -
28 -.promoAlert {
29 - transition: 0.6s;
30 - transition-timing-function: ease;
31 - transform: translateX(-130vw);
32 -}
33 -
34 -.showAlert {
35 - transform: translateX(0);
36 -}
1 -import React from 'react';
2 -import PropTypes from 'prop-types';
3 -import { connect } from 'react-redux';
4 -import TagsInput from 'react-tagsinput'
5 -import { withRouter } from 'react-router';
6 -import {
7 - Input,
8 - Label,
9 - Form,
10 - FormGroup,
11 - Col,
12 - Button,
13 - ButtonToolbar,
14 - Dropdown,
15 - DropdownItem,
16 - DropdownMenu,
17 - DropdownToggle,
18 - Popover,
19 - PopoverHeader,
20 - PopoverBody
21 -} from "reactstrap";
22 -
23 -import {
24 - loadProductRequest,
25 - receiveProduct,
26 - updateProduct,
27 - updateProductRequest,
28 - createProductRequest,
29 - deleteProductRequest,
30 - getProductsImagesRequest
31 -} from '../../../../../actions/products';
32 -import Widget from '../../../../../components/Widget';
33 -import Loader from '../../../../../components/Loader';
34 -import s from './ProductEdit.module.scss';
35 -
36 -class ProductEdit extends React.Component {
37 - static propTypes = {
38 - products: PropTypes.array,
39 - images: PropTypes.array,
40 - dispatch: PropTypes.func.isRequired,
41 - };
42 -
43 - static defaultProps = {
44 - products: [],
45 - images: []
46 - };
47 -
48 - constructor(props) {
49 - super(props);
50 - this.updateProductRequest = this.updateProductRequest.bind(this);
51 - this.createProductRequest = this.createProductRequest.bind(this);
52 - this.deleteProductRequest = this.deleteProductRequest.bind(this);
53 - this.toggleDropdown = this.toggleDropdown.bind(this);
54 -
55 - this.state = {
56 - dropdownOpen: false,
57 - popover: false
58 - };
59 -
60 - this.description_1 = React.createRef();
61 - this.description_2 = React.createRef();
62 -
63 - let newProduct = {
64 - id: -1,
65 - price: 0.01,
66 - rating: 5,
67 - technology: []
68 - };
69 - let product = this.findProduct(this.getId());
70 - if (this.getId() > -1) {
71 - if (!product) {
72 - this.props.dispatch(loadProductRequest(this.getId()));
73 - }
74 - } else {
75 - if (!product) {
76 - this.props.dispatch(receiveProduct(newProduct));
77 - }
78 -
79 - }
80 -
81 - this.props.dispatch(getProductsImagesRequest(newProduct));
82 - }
83 -
84 - findProduct(id) {
85 - const {products} = this.props;
86 - return products.find(p => p.id === id);
87 - }
88 -
89 - getId() {
90 - const {match} = this.props;
91 - return parseInt(match.params.id) || -1;
92 - }
93 -
94 - updateProductRequest() {
95 - this.props.dispatch(updateProductRequest(this.findProduct(this.getId())));
96 - }
97 -
98 - createProductRequest() {
99 - this.props.dispatch(createProductRequest({
100 - product: this.findProduct(this.getId()),
101 - history: this.props.history
102 - }));
103 - }
104 -
105 - deleteProductRequest() {
106 - debugger;
107 - this.props.dispatch(deleteProductRequest({
108 - id: this.getId(),
109 - history: this.props.history
110 - }));
111 - }
112 -
113 - getImage() {
114 - let product = this.findProduct(this.getId());
115 - return product ? product.img : null;
116 - }
117 -
118 - updateProduct(value, key) {
119 - let product = this.findProduct(this.getId());
120 - product[key] = value;
121 - this.props.dispatch(updateProduct(product));
122 - }
123 -
124 - goBack() {
125 - this.props.history.push('/app/ecommerce/management');
126 - }
127 -
128 - toggleDropdown() {
129 - this.setState({
130 - dropdownOpen: !this.state.dropdownOpen
131 - })
132 - }
133 -
134 - togglePopover() {
135 - this.setState({
136 - popover: !this.state.popover
137 - });
138 - }
139 -
140 - componentDidUpdate() {
141 - let product = this.findProduct(this.getId()) || {
142 - technology: []
143 - };
144 - if (this.description_1.current) {
145 - this.description_1.current.value = product.description_1 || "";
146 - }
147 -
148 - if (this.description_2.current) {
149 - this.description_2.current.value = product.description_2 || "";
150 - }
151 - }
152 -
153 - render() {
154 - const isNew = this.getId() === -1;
155 - let image = this.getImage();
156 - let product = this.findProduct(this.getId()) || {
157 - technology: []
158 - };
159 -
160 - return (
161 - <div>
162 - <h2 className="page-title">Product - <span className="fw-semi-bold">Detail</span></h2>
163 - <Widget title={(isNew ? "New" : "Edit") + " product"} collapse close>
164 - {!isNew && this.props.isReceiving ? <Loader size={40}/> :
165 - <Form>
166 - <FormGroup row>
167 - <Label md={2} for="productImage">Image</Label>
168 - <Col md={5}>
169 - <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggleDropdown}
170 - id="productImage">
171 - <DropdownToggle caret color="info">
172 - {image && <img className={s.productImage} alt="img" src={image}/>}
173 - </DropdownToggle>
174 - <DropdownMenu>
175 - {this.props.images.map(img => (
176 - <DropdownItem key={img} onClick={() => this.updateProduct(img, 'img')}>
177 - <img className={s.productImage} alt={img} src={img}/>
178 - </DropdownItem>
179 - ))}
180 - </DropdownMenu>
181 - </Dropdown>
182 - </Col>
183 - </FormGroup>
184 - <FormGroup row>
185 - <Label md={2} for="productTitle">Title</Label>
186 - <Col md={5}>
187 - <Input id="productTitle" type="text" defaultValue={product.title}
188 - onChange={(event) => this.updateProduct(event.target.value, 'title')}/>
189 - </Col>
190 - </FormGroup>
191 - <FormGroup row>
192 - <Label md={2} for="productSubtitle">Subtitle</Label>
193 - <Col md={5}>
194 - <Input id="productSubtitle" type="text" defaultValue={product.subtitle}
195 - onChange={(event) => this.updateProduct(event.target.value, 'subtitle')}/>
196 - </Col>
197 - </FormGroup>
198 - <FormGroup row>
199 - <Label md={2} for="productPrice">Price</Label>
200 - <Col md={2}>
201 - <Input id="productPrice" type="number" step={0.01} min={0.01}
202 - defaultValue={product.price}
203 - onChange={(event) => this.updateProduct(event.target.value, 'price')}/>
204 - </Col>
205 - </FormGroup>
206 - <FormGroup row>
207 - <Label md={2} for="productDiscount">Discount</Label>
208 - <Col md={2}>
209 - <Input id="productDiscount" type="number" step={1} min={0} max={100}
210 - defaultValue={product.discount || 0}
211 - onChange={(event) => this.updateProduct(event.target.value, 'discount')}/>
212 - </Col>
213 - </FormGroup>
214 - <FormGroup row>
215 - <Label md={2} for="productDescription_1">Description 1</Label>
216 - <Col md={5}>
217 - <textarea rows={3} className="form-control" id="productDescription_1"
218 - ref={this.description_1}
219 - onChange={(event) => this.updateProduct(event.target.value, 'description_1')}/>
220 - </Col>
221 - </FormGroup>
222 - <FormGroup row>
223 - <Label md={2} for="productDescription_2">Description 2</Label>
224 - <Col md={5}>
225 - <textarea rows={3} className="form-control" id="productDescription_2"
226 - ref={this.description_2}
227 - onChange={(event) => this.updateProduct(event.target.value, 'description_2')}/>
228 - </Col>
229 - </FormGroup>
230 - <FormGroup row>
231 - <Label md={2} for="productCode">Code</Label>
232 - <Col md={2}>
233 - <Input id="productCode" type="text"
234 - defaultValue={product.code}
235 - onChange={(event) => this.updateProduct(event.target.value, 'code')}/>
236 - </Col>
237 - </FormGroup>
238 - <FormGroup row>
239 - <Label md={2} for="productHashtag">Hashtag</Label>
240 - <Col md={5}>
241 - <Input id="productHashtag" type="text"
242 - defaultValue={product.hashtag}
243 - onChange={(event) => this.updateProduct(event.target.value, 'hashtag')}/>
244 - </Col>
245 - </FormGroup>
246 - <FormGroup row>
247 - <Label md={2} for="productTechnology">Technology</Label>
248 - <Col md={5}>
249 - <TagsInput className="react-tagsinput form-control" id="productTechnology"
250 - value={product.technology}
251 - onChange={(tags) => this.updateProduct(tags, 'technology')}/>
252 - </Col>
253 - </FormGroup>
254 - <FormGroup row>
255 - <Label md={2} for="productRating">Rating</Label>
256 - <Col md={2}>
257 - <Input id="productRating" step={0.1} min={0} max={5} type="number"
258 - defaultValue={product.rating}
259 - onChange={(event) => this.updateProduct(event.target.value, 'rating')}/>
260 - </Col>
261 - </FormGroup>
262 - <ButtonToolbar>
263 - <Button color="success"
264 - onClick={!isNew ? this.updateProductRequest : this.createProductRequest}>
265 - {this.props.isUpdating ? <Loader/> : 'Save'}
266 - </Button>
267 - <Button color="default" onClick={() => {
268 - this.goBack()
269 - }}>Back</Button>
270 - {!isNew && (
271 - <span>
272 - <Button id="deleteProductPopover" color="danger">
273 - {this.props.isDeleting ? <Loader/> : 'Delete'}
274 - </Button>
275 - <Popover className="popover-danger" target="deleteProductPopover"
276 - placement="top"
277 - isOpen={this.state.popover}
278 - toggle={() => {
279 - this.togglePopover()
280 - }}
281 - >
282 - <PopoverHeader className="px-5">Are you sure?</PopoverHeader>
283 - <PopoverBody className="px-5 d-flex justify-content-center">
284 - <ButtonToolbar>
285 - <Button color="success" size="xs" onClick={this.deleteProductRequest}>
286 - Yes
287 - </Button>
288 - <Button color="danger" size="xs" onClick={() => {
289 - this.togglePopover()
290 - }}>
291 - No
292 - </Button>
293 - </ButtonToolbar>
294 - </PopoverBody>
295 - </Popover>
296 - </span>
297 - )}
298 - </ButtonToolbar>
299 - </Form>
300 - }
301 - </Widget>
302 - </div>
303 -
304 - );
305 - }
306 -}
307 -
308 -function mapStateToProps(state) {
309 - return {
310 - products: state.products.data,
311 - images: state.products.images,
312 - isReceiving: state.products.isReceiving,
313 - isUpdating: state.products.isUpdating,
314 - isDeleting: state.products.isDeleting,
315 - };
316 -}
317 -
318 -export default withRouter(connect(mapStateToProps)(ProductEdit));
1 -{
2 - "name": "ProductEdit",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./ProductEdit.js"
6 -}
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "name": "Management",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Management.js"
6 -}
...\ No newline at end of file ...\ No newline at end of file
1 -import React from 'react';
2 -import {
3 - withGoogleMap,
4 - withScriptjs,
5 - GoogleMap,
6 - Marker,
7 -} from 'react-google-maps';
8 -
9 -import s from './Google.module.scss';
10 -
11 -const BasicMap = withScriptjs(withGoogleMap(() =>
12 - <GoogleMap
13 - defaultZoom={12}
14 - defaultCenter={{ lat: parseFloat(-37.813179), lng: parseFloat(144.950259) }}
15 - >
16 - <Marker position={{ lat: -37.813179, lng: 144.950259 }} />
17 - </GoogleMap>,
18 -));
19 -
20 -class Maps extends React.Component {
21 -
22 - render() {
23 - return (
24 - <div>
25 - <h1 className={`${s.MapTitle} page-title`}>
26 - Google <span className="fw-semi-bold">Maps</span>
27 - </h1>
28 - <div className={s.MapContainer}>
29 - <BasicMap
30 - googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=AIzaSyB7OXmzfQYua_1LEhRdqsoYzyJOPh9hGLg"
31 - loadingElement={<div style={{ height: 'inherit', width: 'inherit' }} />}
32 - containerElement={<div style={{ height: 'inherit' }} />}
33 - mapElement={<div style={{ height: 'inherit' }} />}
34 - />
35 - </div>
36 -
37 - </div>);
38 - }
39 -
40 -}
41 -
42 -export default Maps;
1 -@import '../../../../styles/app';
2 -
3 -.MapContainer {
4 - position: absolute;
5 - top: 0;
6 - left: 0;
7 - bottom: 0;
8 - right: 0;
9 - height: 100%;
10 -}
11 -
12 -.MapTitle {
13 - position: relative;
14 - z-index: 2;
15 -}
1 -{
2 - "name": "GoogleMap",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Google.js"
6 -}
1 -import React from 'react';
2 -import $ from 'jquery';
3 -/* eslint-disable */
4 -import 'imports-loader?jQuery=jquery,this=>window!jvectormap/jquery-jvectormap.min.js';
5 -import 'imports-loader?jQuery=jquery,this=>window!./jvector-world.js';
6 -/* eslint-enable */
7 -
8 -import s from './Vector.module.scss';
9 -
10 -const mapData = {
11 - map: 'world_mill_en',
12 - scaleColors: ['#C8EEFF', '#0071A4'],
13 - normalizeFunction: 'polynomial',
14 - focusOn: {
15 - x: 0.5359,
16 - y: 0.4,
17 - scale: 2.5,
18 - },
19 - zoomMin: 0.85,
20 - hoverColor: false,
21 - regionStyle: {
22 - initial: {
23 - fill: '#bdbdbd',
24 - 'fill-opacity': 1,
25 - stroke: '#bdbdbd',
26 - 'stroke-width': 0,
27 - 'stroke-opacity': 0,
28 - },
29 - hover: {
30 - 'fill-opacity': 0.8,
31 - },
32 - },
33 - markerStyle: {
34 - initial: {
35 - fill: '#dd5826',
36 - stroke: '#c54e22',
37 - 'fill-opacity': 1,
38 - 'stroke-width': 4,
39 - 'stroke-opacity': 0.2,
40 - r: 5,
41 - },
42 - hover: {
43 - stroke: 'black',
44 - 'stroke-width': 5,
45 - },
46 - },
47 - backgroundColor: '#eee',
48 - markers: [
49 - { latLng: [41.90, 12.45], name: 'Vatican City' },
50 - { latLng: [43.73, 7.41], name: 'Monaco' },
51 - { latLng: [-0.52, 166.93], name: 'Nauru' },
52 - { latLng: [-8.51, 179.21], name: 'Tuvalu' },
53 - { latLng: [43.93, 12.46], name: 'San Marino' },
54 - { latLng: [47.14, 9.52], name: 'Liechtenstein' },
55 - { latLng: [7.11, 171.06], name: 'Marshall Islands' },
56 - { latLng: [17.3, -62.73], name: 'Saint Kitts and Nevis' },
57 - { latLng: [3.2, 73.22], name: 'Maldives' },
58 - { latLng: [35.88, 14.5], name: 'Malta' },
59 - { latLng: [12.05, -61.75], name: 'Grenada' },
60 - { latLng: [13.16, -61.23], name: 'Saint Vincent and the Grenadines' },
61 - { latLng: [13.16, -59.55], name: 'Barbados' },
62 - { latLng: [17.11, -61.85], name: 'Antigua and Barbuda' },
63 - { latLng: [-4.61, 55.45], name: 'Seychelles' },
64 - { latLng: [7.35, 134.46], name: 'Palau' },
65 - { latLng: [42.5, 1.51], name: 'Andorra' },
66 - { latLng: [14.01, -60.98], name: 'Saint Lucia' },
67 - { latLng: [6.91, 158.18], name: 'Federated States of Micronesia' },
68 - { latLng: [1.3, 103.8], name: 'Singapore' },
69 - { latLng: [1.46, 173.03], name: 'Kiribati' },
70 - { latLng: [-21.13, -175.2], name: 'Tonga' },
71 - { latLng: [15.3, -61.38], name: 'Dominica' },
72 - { latLng: [-20.2, 57.5], name: 'Mauritius' },
73 - { latLng: [26.02, 50.55], name: 'Bahrain' },
74 - { latLng: [0.33, 6.73], name: 'S?o Tom? and Pr?ncipe' },
75 - ],
76 -};
77 -
78 -class VectorMap extends React.Component {
79 -
80 - componentDidMount() {
81 - $(this.vectorMap).vectorMap(mapData);
82 - }
83 -
84 - render() {
85 - return (
86 - <div>
87 - <div
88 - className={`${s.contentMap} vector-map`} ref={(r) => {
89 - this.vectorMap = r;
90 - }}
91 - />
92 - <header className="page-title">
93 - <h1 className="m-0 mb-sm">Vector <span className="fw-semi-bold">Maps</span></h1>
94 - <p className="page-title fs-sm m-0">
95 - <span className="fw-semi-bold">1 656 843</span>
96 - <span className="ml-xs circle bg-gray"><i className="text-gray-lighter fa fa-circle" /></span>
97 - </p>
98 - </header>
99 - </div>);
100 - }
101 -
102 -}
103 -
104 -export default VectorMap;
1 -@import '../../../../styles/app';
2 -
3 -.contentMap {
4 - position: absolute;
5 - top: 0;
6 - bottom: 0;
7 - left: 0;
8 - right: 0;
9 -
10 - + :global(.page-title) {
11 - position: relative;
12 - z-index: 2;
13 - }
14 -}
This diff could not be displayed because it is too large.
1 -{
2 - "name": "Vector",
3 - "version": "0.0.0",
4 - "main": "./Vector.js",
5 - "private": true
6 -}
1 -import React from 'react';
2 -import cx from 'classnames';
3 -import {
4 - Breadcrumb,
5 - BreadcrumbItem,
6 - Row,
7 - Col,
8 - Input,
9 - Label,
10 - Form,
11 - FormGroup,
12 -} from 'reactstrap';
13 -import Widget from '../../../components/Widget';
14 -
15 -import p19 from '../../../images/pictures/19.jpg';
16 -import a5 from '../../../images/people/a5.jpg';
17 -import a1 from '../../../images/people/a1.jpg';
18 -import a3 from '../../../images/people/a3.jpg';
19 -import avatar from '../../../images/avatar.png';
20 -
21 -import s from './Profile.module.scss';
22 -
23 -const Profile = () => (
24 - <div className={s.root}>
25 - <Breadcrumb>
26 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
27 - <BreadcrumbItem active>Profile</BreadcrumbItem>
28 - </Breadcrumb>
29 - <h1 className="page-title">User - <span className="fw-semi-bold">Profile</span>
30 - </h1>
31 -
32 - <Row>
33 - <Col lg={6} xs={12}>
34 - <Widget>
35 - <div className="widget-top-overflow text-white">
36 - <div className="height-250 overflow-hidden">
37 - <img className="img-fluid" src={p19} alt="..." />
38 - </div>
39 - <button className="btn btn-outline btn-sm mb-2">
40 - <i className="fa fa-twitter mr-2" />
41 - Follow
42 - </button>
43 - </div>
44 - <Row>
45 - <Col md={5} xs={12} className="text-center">
46 - <div className={s.profileContactContainer}>
47 - <span className="thumb-xl mb-3">
48 - <img className={[s.profileAvatar, 'rounded-circle'].join(' ')} src={a5} alt="..." />
49 - </span>
50 - <h5 className="fw-normal">Adam <span className="fw-semi-bold">Johns</span></h5>
51 - <p>UI/UX designer</p>
52 - <button className="btn btn-danger btn-sm mb-3">
53 - &nbsp;Send
54 - <i className="fa fa-envelope ml-2" />&nbsp;
55 - </button>
56 - <div>
57 - <ul className={cx(s.profileContacts, 'mt-sm')}>
58 - <li><i className="fa fa-lg fa-phone fa-fw mr-2" /><button className="btn-link"> +375 29 555-55-55</button></li>
59 - <li><i className="fa fa-lg fa-envelope fa-fw mr-2" /><button className="btn-link"> psmith@example.com</button></li>
60 - <li><i className="fa fa-lg fa-map-marker fa-fw mr-2" /><button className="btn-link"> Minsk, Belarus</button></li>
61 - </ul>
62 - </div>
63 - </div>
64 - </Col>
65 - <Col md={7} xs={12}>
66 - <div className="stats-row mt-3">
67 - <div className={[s.profileStat, 'stat-item'].join(' ')}>
68 - <p className={[s.profileStatValue, 'value text-right'].join(' ')}>251</p>
69 - <h6 className="name">Posts</h6>
70 - </div>
71 - <div className={[s.profileStat, 'stat-item'].join(' ')}>
72 - <p className={[s.profileStatValue, 'value text-right'].join(' ')}>9.38%</p>
73 - <h6 className="name">Conversion</h6>
74 - </div>
75 - <div className={[s.profileStat, 'stat-item'].join(' ')}>
76 - <p className={[s.profileStatValue, 'value text-right'].join(' ')}>842</p>
77 - <h6 className="name">Followers</h6>
78 - </div>
79 - </div>
80 - <p>
81 - <span className="badge badge-warning rounded-0"> UI/UX </span>
82 - <span className="badge badge-danger rounded-0 ml-2"> Web Design </span>
83 - <span className="badge badge-default rounded-0 ml-2"> Mobile Apps </span>
84 - </p>
85 - <p className="lead mt-xlg">
86 - My name is Adam Johns and here is my new Sing user profile page.
87 - </p>
88 - <p className="text-muted">
89 - I love reading people&apos;s summaries page especially those who are in the same industry as me.
90 - Sometimes it&apos;s much easier to find your concentration during the night.
91 - </p>
92 - </Col>
93 - </Row>
94 - </Widget>
95 - </Col>
96 - <Col lg={6} xs={12}>
97 - <section className="activities">
98 - <h2 className="ml-3">Activities</h2>
99 - <section className={s.event}>
100 - <header>
101 - <span className={s.eventAvatar}>
102 - <img className="rounded-circle" src={a5} alt="..." />
103 - </span>
104 - <h5 className={s.eventTitle}><button className="btn-link">Bob Nilson</button> <small><button className="btn-link">@nils</button></small></h5>
105 - <p className={s.eventTimestamp}>February 22, 2014 at 01:59 PM</p>
106 - </header>
107 -
108 - <div className={s.eventBody}>
109 - There is no such thing as maturity. There is instead an ever-evolving process of maturing.
110 - Because when there is a maturity, there is ...
111 - </div>
112 - <footer className={s.eventFooter}>
113 - <ul className="post-links">
114 - <li><button className="btn-link">1 hour</button></li>
115 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> Like</span></button></li>
116 - <li><button className="btn-link">Comment</button></li>
117 - </ul>
118 - </footer>
119 - </section>
120 - <section className={s.event}>
121 - <header>
122 - <h5 className={s.eventTitle}><button className="btn-link">Jessica Smith</button> <small>@jess</small></h5>
123 - <p className={s.eventTimestamp}>February 22, 2014 at 01:59 PM</p>
124 - </header>
125 - <div className={s.eventBody}>
126 - Check out this awesome photo I made in Italy last summer. Seems it was lost somewhere deep inside
127 - my brand new HDD 40TB. Thanks god I found it!
128 - </div>
129 - <footer className={s.eventFooter}>
130 - <div className="clearfix">
131 - <ul className="post-links mt-sm pull-left">
132 - <li><button className="btn-link">1 hour</button></li>
133 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart-o" /> Like</span></button></li>
134 - <li><button className="btn-link">Comment</button></li>
135 - </ul>
136 -
137 - <span className="thumb thumb-sm pull-right">
138 - <button className="btn-link">
139 - <img className="rounded-circle" alt="..." src={a1} />
140 - </button>
141 - </span>
142 - <span className="thumb thumb-sm pull-right">
143 - <button className="btn-link"><img className="rounded-circle" alt="..." src={a5} /></button>
144 - </span>
145 - <span className="thumb thumb-sm pull-right">
146 - <button className="btn-link"><img className="rounded-circle" alt="..." src={a3} /></button>
147 - </span>
148 - </div>
149 - <ul className="post-comments mt-sm">
150 - <li>
151 - <span className="thumb-xs avatar pull-left mr-sm">
152 - <img className="rounded-circle" src={a1} alt="..." />
153 - </span>
154 - <div className="comment-body">
155 - <h6 className="author fs-sm fw-semi-bold">Ignacio Abad <small>6 mins ago</small></h6>
156 - <p>Hey, have you heard anything about that?</p>
157 - </div>
158 - </li>
159 - <li>
160 - <span className="thumb-xs avatar pull-left mr-sm">
161 - <img className="rounded-circle" src={avatar} alt="..." />
162 - </span>
163 - <div className="comment-body">
164 - <input className="form-control form-control-sm" type="text" placeholder="Write your comment..." />
165 - </div>
166 - </li>
167 - </ul>
168 - </footer>
169 - </section>
170 - <Form className="mt" action="#">
171 - <FormGroup className="mb-2">
172 - <Label className="sr-only" for="new-event">New event</Label>
173 - <Input type="textarea" id="new-event" placeholder="Post something..." rows="3" />
174 - </FormGroup>
175 - <div className="btn-toolbar">
176 - <div className="btn-group">
177 - <button className="btn btn-sm btn-default">
178 - <i className="fa fa-camera fa-lg" />
179 - </button>
180 - <button className="btn btn-sm btn-default">
181 - <i className="fa fa-map-marker fa-lg" />
182 - </button>
183 - </div>
184 - <button type="submit" className="btn btn-danger btn-sm ml-auto">Post</button>
185 - </div>
186 - </Form>
187 - </section>
188 - </Col>
189 - </Row>
190 - </div>
191 -);
192 -
193 -export default Profile;
1 -@import '../../../styles/app';
2 -
3 -.root {
4 - // some styles
5 -}
6 -
7 -.profileContactContainer {
8 - margin-top: -75px;
9 -}
10 -
11 -.profileContacts {
12 - @include list-unstyled();
13 -
14 - display: inline-block;
15 - text-align: left;
16 -
17 - > li {
18 - margin-bottom: $spacer / 2;
19 - }
20 -
21 - > li > a {
22 - color: lighten($text-color, 30%);
23 - text-decoration: none;
24 -
25 - @include hover-focus {
26 - color: $text-color;
27 - }
28 - }
29 -}
30 -
31 -.profileAvatar {
32 - border: 3px solid $white;
33 -}
34 -
35 -.profileStat {
36 - border-left: none !important;
37 - padding-right: 0 !important;
38 -}
39 -
40 -.profileStatValue {
41 - font-size: 28px;
42 - font-weight: $font-weight-base !important;
43 - margin-bottom: 0;
44 -}
45 -
46 -.event {
47 - background: $white;
48 - border-radius: $border-radius;
49 - padding: 20px 20px 0;
50 - position: relative;
51 - margin-bottom: $spacer;
52 - box-shadow: var(--widget-shadow);
53 -}
54 -
55 -.eventTitle {
56 - margin-bottom: 2px;
57 - font-weight: $font-weight-semi-bold;
58 -
59 - a {
60 - text-decoration: none;
61 - color: #7ca9dd;
62 - }
63 -
64 - small > a {
65 - color: $text-muted;
66 - }
67 -}
68 -
69 -.eventAvatar {
70 - float: left;
71 - margin-right: $spacer;
72 -}
73 -
74 -.eventAvatar > img {
75 - width: 34px;
76 -}
77 -
78 -.eventBody {
79 - font-size: 0.9rem;
80 - margin-bottom: $spacer;
81 -}
82 -
83 -.eventFooter {
84 - background-color: $gray-100;
85 - margin: 20px -20px 0;
86 - padding: 10px 20px;
87 -}
88 -
89 -.eventTimestamp {
90 - color: $text-muted;
91 -}
1 -{
2 - "name": "profile",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Profile.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Breadcrumb,
4 - BreadcrumbItem,
5 - Progress,
6 - Dropdown,
7 - DropdownMenu,
8 - DropdownToggle,
9 - DropdownItem,
10 -} from 'reactstrap';
11 -
12 -import {
13 - BootstrapTable,
14 - TableHeaderColumn,
15 -} from 'react-bootstrap-table';
16 -
17 -import ReactTable from 'react-table';
18 -
19 -import { reactTableData, reactBootstrapTableData } from './data';
20 -import Widget from '../../../../components/Widget';
21 -import s from './Dynamic.modules.scss';
22 -
23 -class Dynamic extends React.Component {
24 -
25 - constructor(props) {
26 - super(props);
27 -
28 - this.state = {
29 - reactTable: reactTableData(),
30 - reactBootstrapTable: reactBootstrapTableData(),
31 - };
32 - }
33 -
34 - renderSizePerPageDropDown = (props) => {
35 - const limits = [];
36 - props.sizePerPageList.forEach((limit) => {
37 - limits.push(<DropdownItem key={limit} onClick={() => props.changeSizePerPage(limit)}>{ limit }</DropdownItem>);
38 - });
39 -
40 - return (
41 - <Dropdown isOpen={props.open} toggle={props.toggleDropDown}>
42 - <DropdownToggle color="default" caret>
43 - { props.currSizePerPage }
44 - </DropdownToggle>
45 - <DropdownMenu>
46 - { limits }
47 - </DropdownMenu>
48 - </Dropdown>
49 - );
50 - };
51 -
52 - render() {
53 - const options = {
54 - sizePerPage: 10,
55 - paginationSize: 3,
56 - sizePerPageDropDown: this.renderSizePerPageDropDown,
57 - };
58 -
59 - function infoFormatter(cell) {
60 - return (
61 - <div>
62 - <small>
63 - Type:&nbsp;<span className="fw-semi-bold">{cell.type}</span>
64 - </small>
65 - <br />
66 - <small>
67 - Dimensions:&nbsp;<span className="fw-semi-bold">{cell.dimensions}</span>
68 - </small>
69 - </div>
70 - );
71 - }
72 -
73 - function descriptionFormatter(cell) {
74 - return (
75 - <button className="btn-link">
76 - {cell}
77 - </button>
78 - );
79 - }
80 -
81 - function progressFormatter(cell) {
82 - return (
83 - <Progress style={{ height: '15px' }} color={cell.type} value={cell.progress} />
84 - );
85 - }
86 -
87 - function progressSortFunc(a, b, order) {
88 - if (order === 'asc') {
89 - return a.status.progress - b.status.progress;
90 - }
91 - return b.status.progress - a.status.progress;
92 - }
93 -
94 - function dateSortFunc(a, b, order) {
95 - if (order === 'asc') {
96 - return new Date(a.date).getTime() - new Date(b.date).getTime();
97 - }
98 - return new Date(b.date).getTime() - new Date(a.date).getTime();
99 - }
100 -
101 - return (
102 - <div>
103 - <Breadcrumb>
104 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
105 - <BreadcrumbItem active>Tables Dynamic</BreadcrumbItem>
106 - </Breadcrumb>
107 - <h2 className="page-title">Tables - <span className="fw-semi-bold">Dynamic</span></h2>
108 - <Widget title={<h4>The <span className="fw-semi-bold">React</span> Way</h4>} collapse close>
109 - <p>
110 - Fully customizable Table. Built with <a href="https://allenfang.github.io/react-bootstrap-table/" target="_blank" rel="noopener noreferrer">react-bootstrap-table</a>
111 - </p>
112 - <BootstrapTable data={this.state.reactBootstrapTable} version="4" pagination options={options} search tableContainerClass={`table-striped table-hover ${s.bootstrapTable}`}>
113 - <TableHeaderColumn className="width-50" columnClassName="width-50" dataField="id" isKey>
114 - <span className="fs-sm">ID</span>
115 - </TableHeaderColumn>
116 - <TableHeaderColumn dataField="name" dataSort>
117 - <span className="fs-sm">Name</span>
118 - </TableHeaderColumn>
119 - <TableHeaderColumn className="d-none d-md-table-cell" columnClassName="d-none d-md-table-cell" dataField="info" dataFormat={infoFormatter}>
120 - <span className="fs-sm">Info</span>
121 - </TableHeaderColumn>
122 - <TableHeaderColumn className="d-none d-md-table-cell" columnClassName="d-none d-md-table-cell" dataField="description" dataFormat={descriptionFormatter}>
123 - <span className="fs-sm">Description</span>
124 - </TableHeaderColumn>
125 - <TableHeaderColumn className="d-none d-md-table-cell" columnClassName="d-none d-md-table-cell" dataField="date" dataSort sortFunc={dateSortFunc}>
126 - <span className="fs-sm">Date</span>
127 - </TableHeaderColumn>
128 - <TableHeaderColumn className="width-150" columnClassName="width-150" dataField="status" dataSort dataFormat={progressFormatter} sortFunc={progressSortFunc}>
129 - <span className="fs-sm">Status</span>
130 - </TableHeaderColumn>
131 - </BootstrapTable>
132 - </Widget>
133 - <Widget title={<h4>React <span className="fw-semi-bold">Table</span></h4>} collapse close>
134 - <p>
135 - Simple table extension with sorting, filtering and pagination for React apps. Built with <a href="https://react-table.js.org/" target="_blank" rel="noopener noreferrer">react-table</a>
136 - </p>
137 - <ReactTable
138 - data={this.state.reactTable}
139 - filterable
140 - columns={[
141 - {
142 - Header: 'NAME',
143 - accessor: 'name',
144 - },
145 - {
146 - Header: 'POSITION',
147 - accessor: 'position',
148 - },
149 - {
150 - Header: 'OFFICE',
151 - accessor: 'office',
152 - },
153 - {
154 - Header: 'EXT',
155 - accessor: 'ext',
156 - },
157 - {
158 - Header: 'START DATE',
159 - accessor: 'startDate',
160 - },
161 - {
162 - Header: 'SALARY',
163 - accessor: 'salary',
164 - },
165 - ]}
166 - defaultPageSize={10}
167 - className="-striped -highlight"
168 - />
169 - </Widget>
170 - </div>
171 - );
172 - }
173 -
174 -}
175 -
176 -export default Dynamic;
1 -@import '../../../../styles/app';
2 -
3 -.bootstrapTable {
4 - border: none;
5 -
6 - :global .table {
7 - thead,
8 - tbody {
9 - th,
10 - td {
11 - border-right: none;
12 - border-left: none;
13 - }
14 - }
15 -
16 - thead th {
17 - background: transparent;
18 - }
19 - }
20 -}
1 -export function reactTableData() {
2 - return [
3 - {
4 - name: 'Victoria Cantrell',
5 - position: 'Integer Corporation',
6 - office: 'Croatia',
7 - ext: '0839',
8 - startDate: '2015/08/19',
9 - salary: 208.178,
10 - }, {
11 - name: 'Pearl Crosby',
12 - position: 'In PC',
13 - office: 'Cambodia',
14 - ext: '8262',
15 - startDate: '2014/10/08',
16 - salary: 114.367,
17 - }, {
18 - name: 'Colette Foley',
19 - position: 'Lorem Inc.',
20 - office: 'Korea, North',
21 - ext: '8968',
22 - startDate: '2015/07/19',
23 - salary: 721.473,
24 - }, {
25 - name: 'Anastasia Shaffer',
26 - position: 'Dolor Nulla Semper LLC',
27 - office: 'Suriname',
28 - ext: '7980',
29 - startDate: '2015/04/20',
30 - salary: 264.620,
31 - }, {
32 - name: 'Gabriel Castro',
33 - position: 'Sed Limited',
34 - office: 'Bahrain',
35 - ext: '0757',
36 - startDate: '2015/03/04',
37 - salary: 651.350,
38 - }, {
39 - name: 'Cherokee Ware',
40 - position: 'Tincidunt LLC',
41 - office: 'United Kingdom (Great Britain)',
42 - ext: '3995',
43 - startDate: '2015/06/17',
44 - salary: 666.259,
45 - }, {
46 - name: 'Barry Moss',
47 - position: 'Sociis Industries',
48 - office: 'Western Sahara',
49 - ext: '6697',
50 - startDate: '2015/08/13',
51 - salary: 541.631,
52 - }, {
53 - name: 'Maryam Tucker',
54 - position: 'Elit Pede Malesuada Inc.',
55 - office: 'Brazil',
56 - ext: '5203',
57 - startDate: '2014/10/02',
58 - salary: 182.294,
59 - }, {
60 - name: 'Constance Clayton',
61 - position: 'Auctor Velit Aliquam LLP',
62 - office: 'United Arab Emirates',
63 - ext: '4204',
64 - startDate: '2015/08/01',
65 - salary: 218.597,
66 - }, {
67 - name: 'Rogan Tucker',
68 - position: 'Arcu Vestibulum Ante Associates',
69 - office: 'Jersey',
70 - ext: '0885',
71 - startDate: '2015/01/04',
72 - salary: 861.632,
73 - }, {
74 - name: 'Emery Mcdowell',
75 - position: 'Gravida Company',
76 - office: 'New Zealand',
77 - ext: '3951',
78 - startDate: '2015/06/02',
79 - salary: 413.568,
80 - }, {
81 - name: 'Yael Greer',
82 - position: 'Orci Limited',
83 - office: 'Madagascar',
84 - ext: '1416',
85 - startDate: '2014/12/04',
86 - salary: 121.831,
87 - }, {
88 - name: 'Jared Burgess',
89 - position: 'Auctor Incorporated',
90 - office: 'Burundi',
91 - ext: '4673',
92 - startDate: '2015/01/12',
93 - salary: 62.243,
94 - }, {
95 - name: 'Sharon Campbell',
96 - position: 'Elit Curabitur Sed Consulting',
97 - office: 'Comoros',
98 - ext: '6274',
99 - startDate: '2014/09/14',
100 - salary: 200.854,
101 - }, {
102 - name: 'Yeo Church',
103 - position: 'Donec Vitae Erat PC',
104 - office: 'Saudi Arabia',
105 - ext: '0269',
106 - startDate: '2015/06/07',
107 - salary: 581.193,
108 - }, {
109 - name: 'Kylie Barlow',
110 - position: 'Fermentum Risus Corporation',
111 - office: 'Papua New Guinea',
112 - ext: '2010',
113 - startDate: '2014/12/03',
114 - salary: 418.115,
115 - }, {
116 - name: 'Nell Leonard',
117 - position: 'Vestibulum Consulting',
118 - office: 'Saudi Arabia',
119 - ext: '4839',
120 - startDate: '2015/05/29',
121 - salary: 466.201,
122 - }, {
123 - name: 'Brandon Fleming',
124 - position: 'Donec Egestas Associates',
125 - office: 'Poland',
126 - ext: '0622',
127 - startDate: '2015/01/22',
128 - salary: 800.011,
129 - }, {
130 - name: 'Inga Pena',
131 - position: 'Et Magnis Dis Limited',
132 - office: 'Belgium',
133 - ext: '8140',
134 - startDate: '2015/05/18',
135 - salary: 564.245,
136 - }, {
137 - name: 'Arden Russo',
138 - position: 'Est Tempor Bibendum Corp.',
139 - office: 'Dominican Republic',
140 - ext: '6774',
141 - startDate: '2015/07/23',
142 - salary: 357.222,
143 - }, {
144 - name: 'Liberty Gallegos',
145 - position: 'Nec Diam LLC',
146 - office: 'Ghana',
147 - ext: '9266',
148 - startDate: '2015/06/18',
149 - salary: 554.375,
150 - }, {
151 - name: 'Dennis York',
152 - position: 'Nullam Suscipit Foundation',
153 - office: 'Namibia',
154 - ext: '3133',
155 - startDate: '2015/03/20',
156 - salary: 90.417,
157 - }, {
158 - name: 'Petra Chandler',
159 - position: 'Pede Nonummy Inc.',
160 - office: 'Namibia',
161 - ext: '3367',
162 - startDate: '2015/03/26',
163 - salary: 598.915,
164 - }, {
165 - name: 'Aurelia Marshall',
166 - position: 'Donec Consulting',
167 - office: 'Nicaragua',
168 - ext: '2690',
169 - startDate: '2015/08/18',
170 - salary: 201.680,
171 - }, {
172 - name: 'Rose Carter',
173 - position: 'Enim Consequat Purus Industries',
174 - office: 'Morocco',
175 - ext: '0619',
176 - startDate: '2015/03/06',
177 - salary: 220.187,
178 - }, {
179 - name: 'Denton Atkins',
180 - position: 'Non Vestibulum PC',
181 - office: 'Mali',
182 - ext: '5806',
183 - startDate: '2015/04/19',
184 - salary: 324.588,
185 - }, {
186 - name: 'Germaine Osborn',
187 - position: 'Tristique Aliquet PC',
188 - office: 'Lesotho',
189 - ext: '4469',
190 - startDate: '2015/01/19',
191 - salary: 351.108,
192 - }, {
193 - name: 'Nell Butler',
194 - position: 'Sit Amet Dapibus Industries',
195 - office: 'Cuba',
196 - ext: '7860',
197 - startDate: '2015/01/06',
198 - salary: 230.072,
199 - }, {
200 - name: 'Brent Stein',
201 - position: 'Eu Augue Porttitor LLP',
202 - office: 'Cyprus',
203 - ext: '4697',
204 - startDate: '2014/11/02',
205 - salary: 853.413,
206 - }, {
207 - name: 'Alexandra Shaw',
208 - position: 'Aenean Gravida Limited',
209 - office: 'Uruguay',
210 - ext: '1140',
211 - startDate: '2015/05/16',
212 - salary: 401.970,
213 - }, {
214 - name: 'Veronica Allison',
215 - position: 'Aliquet Diam Sed Institute',
216 - office: 'Samoa',
217 - ext: '9966',
218 - startDate: '2015/05/17',
219 - salary: 79.193,
220 - }, {
221 - name: 'Katelyn Gamble',
222 - position: 'Sed Associates',
223 - office: 'Mauritius',
224 - ext: '4767',
225 - startDate: '2015/03/20',
226 - salary: 484.299,
227 - }, {
228 - name: 'James Greer',
229 - position: 'A Dui Incorporated',
230 - office: 'Norway',
231 - ext: '5517',
232 - startDate: '2015/02/21',
233 - salary: 333.518,
234 - }, {
235 - name: 'Cain Vasquez',
236 - position: 'Nulla Facilisis Suspendisse Institute',
237 - office: 'China',
238 - ext: '3179',
239 - startDate: '2015/05/27',
240 - salary: 651.761,
241 - }, {
242 - name: 'Shaeleigh Barr',
243 - position: 'Eleifend Cras Institute',
244 - office: 'Ghana',
245 - ext: '5904',
246 - startDate: '2015/04/01',
247 - salary: 627.095,
248 - }, {
249 - name: 'Baker Mckay',
250 - position: 'Ut Sagittis Associates',
251 - office: 'Isle of Man',
252 - ext: '9840',
253 - startDate: '2015/01/12',
254 - salary: 742.247,
255 - }, {
256 - name: 'Jayme Pace',
257 - position: 'Cras Eu Tellus Associates',
258 - office: 'Bouvet Island',
259 - ext: '4580',
260 - startDate: '2015/08/12',
261 - salary: 591.588,
262 - }, {
263 - name: 'Reuben Albert',
264 - position: 'Lobortis Institute',
265 - office: 'Zambia',
266 - ext: '8725',
267 - startDate: '2015/04/04',
268 - salary: 791.408,
269 - }, {
270 - name: 'Idola Burns',
271 - position: 'Non Industries',
272 - office: 'Myanmar',
273 - ext: '3201',
274 - startDate: '2015/06/24',
275 - salary: 142.906,
276 - }, {
277 - name: 'Laura Macias',
278 - position: 'Phasellus Inc.',
279 - office: 'Mauritania',
280 - ext: '2033',
281 - startDate: '2014/11/21',
282 - salary: 226.591,
283 - }, {
284 - name: 'Nichole Salas',
285 - position: 'Duis PC',
286 - office: 'Madagascar',
287 - ext: '4397',
288 - startDate: '2015/01/18',
289 - salary: 234.196,
290 - }, {
291 - name: 'Hunter Walter',
292 - position: 'Ullamcorper Duis Cursus Foundation',
293 - office: 'Brazil',
294 - ext: '2227',
295 - startDate: '2015/02/28',
296 - salary: 655.052,
297 - }, {
298 - name: 'Asher Rich',
299 - position: 'Mauris Ipsum LLP',
300 - office: 'Paraguay',
301 - ext: '7288',
302 - startDate: '2015/08/08',
303 - salary: 222.946,
304 - }, {
305 - name: 'Angela Carlson',
306 - position: 'Donec Tempor Institute',
307 - office: 'Papua New Guinea',
308 - ext: '5416',
309 - startDate: '2015/02/12',
310 - salary: 562.194,
311 - }, {
312 - name: 'James Dorsey',
313 - position: 'Ipsum Leo Associates',
314 - office: 'Congo (Brazzaville)',
315 - ext: '6019',
316 - startDate: '2015/01/10',
317 - salary: 629.925,
318 - }, {
319 - name: 'Wesley Cobb',
320 - position: 'Nunc Est Incorporated',
321 - office: 'Australia',
322 - ext: '6466',
323 - startDate: '2015/01/30',
324 - salary: 343.476,
325 - }, {
326 - name: 'Meghan Stephens',
327 - position: 'Interdum PC',
328 - office: 'Turkey',
329 - ext: '8001',
330 - startDate: '2014/10/11',
331 - salary: 469.305,
332 - }, {
333 - name: 'Bertha Herrera',
334 - position: 'Amet Limited',
335 - office: 'Kenya',
336 - ext: '4799',
337 - startDate: '2014/11/22',
338 - salary: 56.606,
339 - }, {
340 - name: 'Karina Key',
341 - position: 'Quisque Varius Nam Company',
342 - office: 'France',
343 - ext: '3907',
344 - startDate: '2015/03/26',
345 - salary: 314.260,
346 - }, {
347 - name: 'Uriel Carson',
348 - position: 'Penatibus PC',
349 - office: 'Venezuela',
350 - ext: '5902',
351 - startDate: '2015/01/07',
352 - salary: 106.335,
353 - }, {
354 - name: 'Mira Baird',
355 - position: 'Felis Orci PC',
356 - office: 'Niue',
357 - ext: '4189',
358 - startDate: '2015/08/25',
359 - salary: 515.671,
360 - }, {
361 - name: 'Ursula Parrish',
362 - position: 'Ac Corporation',
363 - office: 'Macao',
364 - ext: '4771',
365 - startDate: '2015/06/30',
366 - salary: 72.295,
367 - }, {
368 - name: 'Josephine Sykes',
369 - position: 'Blandit Congue Limited',
370 - office: 'Holy See (Vatican City State)',
371 - ext: '4684',
372 - startDate: '2014/12/22',
373 - salary: 694.656,
374 - }, {
375 - name: 'Maggie Sims',
376 - position: 'Vulputate Posuere Industries',
377 - office: 'Sudan',
378 - ext: '6482',
379 - startDate: '2014/11/22',
380 - salary: 363.743,
381 - }, {
382 - name: 'Rogan Fuentes',
383 - position: 'Vestibulum Accumsan Neque Company',
384 - office: 'Jersey',
385 - ext: '4837',
386 - startDate: '2015/07/29',
387 - salary: 606.004,
388 - }, {
389 - name: 'Maya Haney',
390 - position: 'Ac Foundation',
391 - office: 'Falkland Islands',
392 - ext: '5752',
393 - startDate: '2015/09/03',
394 - salary: 745.500,
395 - }, {
396 - name: 'Aquila Battle',
397 - position: 'Sociis Natoque Penatibus Foundation',
398 - office: 'Azerbaijan',
399 - ext: '8470',
400 - startDate: '2015/03/06',
401 - salary: 582.265,
402 - }, {
403 - name: 'Connor Coleman',
404 - position: 'Orci Lacus Vestibulum Foundation',
405 - office: 'Croatia',
406 - ext: '6217',
407 - startDate: '2014/10/21',
408 - salary: 416.958,
409 - }, {
410 - name: 'Charity Thomas',
411 - position: 'Convallis Ligula Donec Inc.',
412 - office: 'Benin',
413 - ext: '6240',
414 - startDate: '2015/07/12',
415 - salary: 540.999,
416 - }, {
417 - name: 'Blythe Powers',
418 - position: 'Amet Orci Limited',
419 - office: 'Falkland Islands',
420 - ext: '5608',
421 - startDate: '2015/01/23',
422 - salary: 480.067,
423 - }, {
424 - name: 'Adria Battle',
425 - position: 'Ornare Lectus Incorporated',
426 - office: 'British Indian Ocean Territory',
427 - ext: '7419',
428 - startDate: '2015/05/28',
429 - salary: 257.937,
430 - }, {
431 - name: 'Melanie Mcintyre',
432 - position: 'Nunc Corp.',
433 - office: 'Mongolia',
434 - ext: '4326',
435 - startDate: '2015/01/06',
436 - salary: 359.737,
437 - }, {
438 - name: 'Keely Bauer',
439 - position: 'Nec Tempus Institute',
440 - office: 'Somalia',
441 - ext: '8372',
442 - startDate: '2015/03/09',
443 - salary: 99.718,
444 - }, {
445 - name: 'Noelani Strong',
446 - position: 'Nec LLP',
447 - office: 'Iran',
448 - ext: '0049',
449 - startDate: '2015/08/24',
450 - salary: 480.718,
451 - }, {
452 - name: 'Jeanette Henderson',
453 - position: 'Eu Elit Nulla Corporation',
454 - office: 'Italy',
455 - ext: '7586',
456 - startDate: '2015/06/19',
457 - salary: 253.772,
458 - }, {
459 - name: 'Candace Huber',
460 - position: 'Sed Institute',
461 - office: 'Uganda',
462 - ext: '7183',
463 - startDate: '2015/06/16',
464 - salary: 388.879,
465 - }, {
466 - name: 'Bethany Potter',
467 - position: 'Vivamus Nibh Dolor Incorporated',
468 - office: 'Puerto Rico',
469 - ext: '3354',
470 - startDate: '2014/11/12',
471 - salary: 747.310,
472 - }, {
473 - name: 'Whoopi Burks',
474 - position: 'Justo Inc.',
475 - office: 'Fiji',
476 - ext: '2185',
477 - startDate: '2014/09/24',
478 - salary: 803.037,
479 - }, {
480 - name: 'Sheila Long',
481 - position: 'Diam Associates',
482 - office: 'Sao Tome and Principe',
483 - ext: '7760',
484 - startDate: '2014/12/21',
485 - salary: 674.379,
486 - }, {
487 - name: 'Sonya Church',
488 - position: 'Laoreet Institute',
489 - office: 'Grenada',
490 - ext: '8920',
491 - startDate: '2015/06/03',
492 - salary: 625.147,
493 - }, {
494 - name: 'Shaine Forbes',
495 - position: 'Eu Arcu LLP',
496 - office: 'Cyprus',
497 - ext: '2369',
498 - startDate: '2015/01/18',
499 - salary: 208.100,
500 - }, {
501 - name: 'Alexandra Patrick',
502 - position: 'Ligula Donec Inc.',
503 - office: 'Viet Nam',
504 - ext: '8531',
505 - startDate: '2015/04/09',
506 - salary: 104.063,
507 - }, {
508 - name: 'Patience Vincent',
509 - position: 'Sem Molestie Associates',
510 - office: 'Philippines',
511 - ext: '8888',
512 - startDate: '2015/07/04',
513 - salary: 673.556,
514 - }, {
515 - name: 'Evelyn Smith',
516 - position: 'Fusce Industries',
517 - office: 'Togo',
518 - ext: '5051',
519 - startDate: '2015/08/15',
520 - salary: 737.284,
521 - }, {
522 - name: 'Kieran Gonzalez',
523 - position: 'Non Corp.',
524 - office: 'Equatorial Guinea',
525 - ext: '4834',
526 - startDate: '2015/08/24',
527 - salary: 90.195,
528 - }, {
529 - name: 'Molly Oneil',
530 - position: 'Non Dui Consulting',
531 - office: 'Belize',
532 - ext: '7501',
533 - startDate: '2014/10/28',
534 - salary: 140.767,
535 - }, {
536 - name: 'Nigel Davenport',
537 - position: 'Ullamcorper Velit In Industries',
538 - office: 'Vanuatu',
539 - ext: '0976',
540 - startDate: '2015/03/16',
541 - salary: 70.536,
542 - }, {
543 - name: 'Thor Young',
544 - position: 'Malesuada Consulting',
545 - office: 'French Southern Territories',
546 - ext: '0211',
547 - startDate: '2015/01/28',
548 - salary: 75.501,
549 - }, {
550 - name: 'Finn Delacruz',
551 - position: 'Lorem Industries',
552 - office: 'Cocos (Keeling) Islands',
553 - ext: '2980',
554 - startDate: '2014/12/11',
555 - salary: 754.967,
556 - }, {
557 - name: 'Lane Henderson',
558 - position: 'Pede Foundation',
559 - office: 'Kazakhstan',
560 - ext: '1446',
561 - startDate: '2015/07/02',
562 - salary: 842.050,
563 - }, {
564 - name: 'Shea Potter',
565 - position: 'Curabitur Limited',
566 - office: 'Timor-Leste',
567 - ext: '4654',
568 - startDate: '2015/05/07',
569 - salary: 263.629,
570 - }, {
571 - name: 'Brynn Yang',
572 - position: 'Ut Limited',
573 - office: 'Mayotte',
574 - ext: '4668',
575 - startDate: '2015/01/17',
576 - salary: 74.292,
577 - }, {
578 - name: 'Kylan Fuentes',
579 - position: 'Sapien Aenean Associates',
580 - office: 'Brazil',
581 - ext: '6623',
582 - startDate: '2014/12/28',
583 - salary: 108.632,
584 - }, {
585 - name: 'Lionel Mcbride',
586 - position: 'Ipsum PC',
587 - office: 'Portugal',
588 - ext: '3978',
589 - startDate: '2015/07/11',
590 - salary: 34.244,
591 - }, {
592 - name: 'Paul Lucas',
593 - position: 'Eget LLP',
594 - office: 'Nicaragua',
595 - ext: '8890',
596 - startDate: '2014/09/30',
597 - salary: 690.834,
598 - }, {
599 - name: 'Lareina Williamson',
600 - position: 'Imperdiet Ullamcorper Ltd',
601 - office: 'Cocos (Keeling) Islands',
602 - ext: '9489',
603 - startDate: '2014/12/01',
604 - salary: 603.498,
605 - }, {
606 - name: 'Amy Acevedo',
607 - position: 'Id Institute',
608 - office: 'Cook Islands',
609 - ext: '5592',
610 - startDate: '2015/02/04',
611 - salary: 125.165,
612 - }, {
613 - name: 'Nomlanga Silva',
614 - position: 'Eget LLC',
615 - office: 'Belize',
616 - ext: '3110',
617 - startDate: '2015/01/31',
618 - salary: 268.509,
619 - }, {
620 - name: 'Amena Stone',
621 - position: 'Enim Incorporated',
622 - office: 'Guinea',
623 - ext: '1211',
624 - startDate: '2014/09/23',
625 - salary: 214.381,
626 - }, {
627 - name: 'Danielle Coffey',
628 - position: 'Feugiat Placerat Corp.',
629 - office: 'Sao Tome and Principe',
630 - ext: '8176',
631 - startDate: '2015/06/17',
632 - salary: 137.423,
633 - }, {
634 - name: 'Buffy Russell',
635 - position: 'Lacus Quisque Ltd',
636 - office: 'Ecuador',
637 - ext: '6741',
638 - startDate: '2014/10/17',
639 - salary: 612.184,
640 - }, {
641 - name: 'Kaitlin Lamb',
642 - position: 'Malesuada Fringilla Est Associates',
643 - office: 'Algeria',
644 - ext: '5054',
645 - startDate: '2014/10/18',
646 - salary: 327.367,
647 - }, {
648 - name: 'Leilani Yates',
649 - position: 'Mus Proin LLC',
650 - office: 'South Sudan',
651 - ext: '1550',
652 - startDate: '2015/05/27',
653 - salary: 743.493,
654 - }, {
655 - name: 'Jemima Moon',
656 - position: 'Phasellus Corp.',
657 - office: 'South Georgia and The South Sandwich Islands',
658 - ext: '7582',
659 - startDate: '2015/05/21',
660 - salary: 496.067,
661 - }, {
662 - name: 'Hiroko Schwartz',
663 - position: 'Neque Institute',
664 - office: 'Saint Vincent and The Grenadines',
665 - ext: '9368',
666 - startDate: '2015/03/13',
667 - salary: 178.782,
668 - }, {
669 - name: 'Nathaniel Jensen',
670 - position: 'Mi Tempor Limited',
671 - office: 'Dominica',
672 - ext: '8331',
673 - startDate: '2014/12/05',
674 - salary: 37.441,
675 - }, {
676 - name: 'Silas Sweeney',
677 - position: 'Ultrices Institute',
678 - office: 'Turkmenistan',
679 - ext: '0746',
680 - startDate: '2014/11/13',
681 - salary: 152.980,
682 - }, {
683 - name: 'Jermaine Barry',
684 - position: 'Dapibus Corporation',
685 - office: 'Uzbekistan',
686 - ext: '1545',
687 - startDate: '2015/03/06',
688 - salary: 409.463,
689 - }, {
690 - name: 'Tatiana Nichols',
691 - position: 'Nec Diam Industries',
692 - office: 'Cook Islands',
693 - ext: '4395',
694 - startDate: '2015/05/22',
695 - salary: 51.155,
696 - }, {
697 - name: 'Rama Waller',
698 - position: 'Sem Pellentesque LLC',
699 - office: 'Andorra',
700 - ext: '2973',
701 - startDate: '2014/12/01',
702 - salary: 223.227,
703 - },
704 - ];
705 -}
706 -
707 -export function reactBootstrapTableData() {
708 - return [
709 - {
710 - id: '1',
711 - name: 'Algerd',
712 - info: {
713 - type: 'JPEG',
714 - dimensions: '200x150',
715 - },
716 - description: 'Palo Alto',
717 - date: 'June 27, 2013',
718 - status: {
719 - progress: '29',
720 - type: 'success',
721 - },
722 - },
723 - {
724 - id: '2',
725 - name: 'Vitaut',
726 - info: {
727 - type: 'PNG',
728 - dimensions: '6433x4522',
729 - },
730 - description: 'Vilnia',
731 - date: 'January 1, 1442',
732 - status: {
733 - progress: '19',
734 - type: 'danger',
735 - },
736 - },
737 - {
738 - id: '3',
739 - name: 'Honar',
740 - info: {
741 - type: 'AVI',
742 - dimensions: '1440x980',
743 - },
744 - description: 'Berlin',
745 - date: 'August 6, 2013',
746 - status: {
747 - progress: '49',
748 - type: 'bar-gray-light',
749 - },
750 - },
751 - {
752 - id: '4',
753 - name: 'Jack',
754 - info: {
755 - type: 'PNG',
756 - dimensions: '12x43',
757 - },
758 - description: 'San Francisco',
759 - date: 'August 19, 2013',
760 - status: {
761 - progress: '69',
762 - },
763 - },
764 - {
765 - id: '5',
766 - name: 'Leon',
767 - info: {
768 - type: 'MP4',
769 - dimensions: '800x480',
770 - },
771 - description: 'Brasilia',
772 - date: 'October 1, 2013',
773 - status: {
774 - progress: '9',
775 - type: 'bar-gray-light',
776 - },
777 - },
778 - {
779 - id: '6',
780 - name: 'Max',
781 - info: {
782 - type: 'TXT',
783 - dimensions: '-',
784 - },
785 - description: 'Helsinki',
786 - date: 'October 29, 2013',
787 - status: {
788 - progress: '38',
789 - type: 'warning',
790 - },
791 - },
792 - {
793 - id: '7',
794 - name: 'Pol',
795 - info: {
796 - type: 'MOV',
797 - dimensions: '640x480',
798 - },
799 - description: 'Radashkovichi',
800 - date: 'November 11, 2013',
801 - status: {
802 - progress: '83',
803 - type: 'danger',
804 - },
805 - },
806 - {
807 - id: '8',
808 - name: 'Chrishna',
809 - info: {
810 - type: 'DOC',
811 - dimensions: '-',
812 - },
813 - description: 'Mumbai',
814 - date: 'December 2, 2013',
815 - status: {
816 - progress: '40',
817 - type: 'info',
818 - },
819 - },
820 - {
821 - id: '9',
822 - name: 'Leslie',
823 - info: {
824 - type: 'AVI',
825 - dimensions: '4820x2140',
826 - },
827 - description: 'Singapore',
828 - date: 'December 6, 2013',
829 - status: {
830 - progress: '18',
831 - type: 'warning',
832 - },
833 - },
834 - {
835 - id: '10',
836 - name: 'David',
837 - info: {
838 - type: 'XML',
839 - dimensions: '-',
840 - },
841 - description: 'Portland',
842 - date: 'December 13, 2013',
843 - status: {
844 - progress: '54',
845 - type: 'bar-gray-light',
846 - },
847 - },
848 - {
849 - id: '11',
850 - name: 'Andrej',
851 - info: {
852 - type: 'VOB',
853 - dimensions: '6433x4522',
854 - },
855 - description: 'Minsk',
856 - date: 'December 14, 2013',
857 - status: {
858 - progress: '25',
859 - },
860 - },
861 - {
862 - id: '12',
863 - name: 'Julia',
864 - info: {
865 - type: 'JPEG',
866 - dimensions: '40x40',
867 - },
868 - description: 'Hrodna',
869 - date: 'July 9, 2012',
870 - status: {
871 - progress: '50',
872 - type: 'warning',
873 - },
874 - },
875 - {
876 - id: '13',
877 - name: 'Ihnat',
878 - info: {
879 - type: 'JAVA',
880 - dimensions: '-',
881 - },
882 - description: 'Los Angeles',
883 - date: 'August 2, 2012',
884 - status: {
885 - progress: '8',
886 - type: 'success',
887 - },
888 - },
889 - {
890 - id: '14',
891 - name: 'Abraham',
892 - info: {
893 - type: 'DOCX',
894 - dimensions: '-',
895 - },
896 - description: 'Panama',
897 - date: 'September 3, 2012',
898 - status: {
899 - progress: '80',
900 - type: 'bar-gray-light',
901 - },
902 - },
903 - {
904 - id: '15',
905 - name: 'Tomas',
906 - info: {
907 - type: 'JPEG',
908 - dimensions: '1800x1420',
909 - },
910 - description: 'Amsterdam',
911 - date: 'November 13, 2012',
912 - status: {
913 - progress: '10',
914 - type: 'bar-gray-light',
915 - },
916 - },
917 - {
918 - id: '16',
919 - name: 'Scott',
920 - info: {
921 - type: 'PNG',
922 - dimensions: '240x460',
923 - },
924 - description: 'Sluck',
925 - date: 'December 5, 2012',
926 - status: {
927 - progress: '93',
928 - },
929 - },
930 - {
931 - id: '17',
932 - name: 'Pham',
933 - info: {
934 - type: 'MAIL',
935 - dimensions: '-',
936 - },
937 - description: 'Tokyo',
938 - date: 'December 8, 2012',
939 - status: {
940 - progress: '44',
941 - type: 'danger',
942 - },
943 - },
944 - {
945 - id: '18',
946 - name: 'Peter',
947 - info: {
948 - type: 'PNG',
949 - dimensions: '8320x6400',
950 - },
951 - description: 'Cape Town',
952 - date: 'December 29, 2012',
953 - status: {
954 - progress: '5',
955 - type: 'bar-gray-light',
956 - },
957 - },
958 - {
959 - id: '19',
960 - name: 'Uladz',
961 - info: {
962 - type: 'JPEG',
963 - dimensions: '2200x1600',
964 - },
965 - description: 'Mahileu',
966 - date: 'December 7, 2013',
967 - status: {
968 - progress: '0',
969 - type: 'gray-light',
970 - },
971 - },
972 - ];
973 -}
1 -{
2 - "name": "dynamic",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Dynamic.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Table,
6 - Progress,
7 - Button,
8 - UncontrolledButtonDropdown,
9 - DropdownMenu,
10 - DropdownToggle,
11 - DropdownItem,
12 - Input,
13 - Label,
14 - Badge,
15 -} from 'reactstrap';
16 -import { Sparklines, SparklinesBars } from 'react-sparklines';
17 -
18 -import Widget from '../../../../components/Widget';
19 -import s from './Static.modules.scss';
20 -
21 -class Static extends React.Component {
22 -
23 - constructor(props) {
24 - super(props);
25 -
26 - this.state = {
27 - tableStyles: [
28 - {
29 - id: 1,
30 - picture: require('../../../../images/tables/1.png'), // eslint-disable-line global-require
31 - description: 'Palo Alto',
32 - info: {
33 - type: 'JPEG',
34 - dimensions: '200x150',
35 - },
36 - date: new Date('September 14, 2012'),
37 - size: '45.6 KB',
38 - progress: {
39 - percent: 29,
40 - colorClass: 'success',
41 - },
42 - },
43 - {
44 - id: 2,
45 - picture: require('../../../../images/tables/2.png'), // eslint-disable-line global-require
46 - description: 'The Sky',
47 - info: {
48 - type: 'PSD',
49 - dimensions: '2400x1455',
50 - },
51 - date: new Date('November 14, 2012'),
52 - size: '15.3 MB',
53 - progress: {
54 - percent: 33,
55 - colorClass: 'warning',
56 - },
57 - },
58 - {
59 - id: 3,
60 - picture: require('../../../../images/tables/3.png'), // eslint-disable-line global-require
61 - description: 'Down the road',
62 - label: {
63 - colorClass: 'danger',
64 - text: 'INFO!',
65 - },
66 - info: {
67 - type: 'JPEG',
68 - dimensions: '200x150',
69 - },
70 - date: new Date('September 14, 2012'),
71 - size: '49.0 KB',
72 - progress: {
73 - percent: 38,
74 - colorClass: 'inverse',
75 - },
76 - },
77 - {
78 - id: 4,
79 - picture: require('../../../../images/tables/4.png'), // eslint-disable-line global-require
80 - description: 'The Edge',
81 - info: {
82 - type: 'PNG',
83 - dimensions: '210x160',
84 - },
85 - date: new Date('September 15, 2012'),
86 - size: '69.1 KB',
87 - progress: {
88 - percent: 17,
89 - colorClass: 'danger',
90 - },
91 - },
92 - {
93 - id: 5,
94 - picture: require('../../../../images/tables/5.png'), // eslint-disable-line global-require
95 - description: 'Fortress',
96 - info: {
97 - type: 'JPEG',
98 - dimensions: '1452x1320',
99 - },
100 - date: new Date('October 1, 2012'),
101 - size: '2.3 MB',
102 - progress: {
103 - percent: 41,
104 - colorClass: 'primary',
105 - },
106 - },
107 - ],
108 - checkboxes1: [false, true, false, false],
109 - checkboxes2: [false, false, false, false, false, false],
110 - checkboxes3: [false, false, false, false, false, false],
111 - };
112 -
113 - this.checkAll = this.checkAll.bind(this);
114 - }
115 -
116 - parseDate(date) {
117 - this.dateSet = date.toDateString().split(' ');
118 -
119 - return `${date.toLocaleString('en-us', { month: 'long' })} ${this.dateSet[2]}, ${this.dateSet[3]}`;
120 - }
121 -
122 - checkAll(ev, checkbox) {
123 - const checkboxArr = (new Array(this.state[checkbox].length)).fill(ev.target.checked);
124 - this.setState({
125 - [checkbox]: checkboxArr,
126 - });
127 - }
128 -
129 - changeCheck(ev, checkbox, id) {
130 - //eslint-disable-next-line
131 - this.state[checkbox][id] = ev.target.checked;
132 - if (!ev.target.checked) {
133 - //eslint-disable-next-line
134 - this.state[checkbox][0] = false;
135 - }
136 - this.setState({
137 - [checkbox]: this.state[checkbox],
138 - });
139 - }
140 -
141 - render() {
142 - return (
143 - <div className={s.root}>
144 - <ol className="breadcrumb">
145 - <li className="breadcrumb-item">YOU ARE HERE</li>
146 - <li className="breadcrumb-item active">Tables Basic</li>
147 - </ol>
148 - <h2 className="page-title">Tables - <span className="fw-semi-bold">Static</span></h2>
149 - <Row>
150 - <Col>
151 - <Widget
152 - title={<h5>
153 - Table <span className="fw-semi-bold">Styles</span>
154 - </h5>} settings close
155 - >
156 - <Table>
157 - <thead>
158 - <tr className="fs-sm">
159 - <th className="hidden-sm-down">#</th>
160 - <th>Picture</th>
161 - <th>Description</th>
162 - <th className="hidden-sm-down">Info</th>
163 - <th className="hidden-sm-down">Date</th>
164 - <th className="hidden-sm-down">Size</th>
165 - <th className="hidden-sm-down">Status</th>
166 - <th />
167 - </tr>
168 - </thead>
169 - <tbody>
170 - {
171 - this.state.tableStyles.map(row =>
172 - <tr key={row.id}>
173 - <td>{row.id}</td>
174 - <td>
175 - <img className="img-rounded" src={row.picture} alt="" height="50" />
176 - </td>
177 - <td>
178 - {row.description}
179 - {row.label &&
180 - <div>
181 - <Badge color={row.label.colorClass}>{row.label.text}</Badge>
182 - </div>
183 - }
184 - </td>
185 - <td>
186 - <p className="mb-0">
187 - <small>
188 - Type:
189 - <span className="text-muted fw-semi-bold">&nbsp; {row.info.type}</span>
190 - </small>
191 - </p>
192 - <p>
193 - <small>
194 - Dimensions:
195 - <span className="text-muted fw-semi-bold">&nbsp; {row.info.dimensions}</span>
196 - </small>
197 - </p>
198 - </td>
199 - <td className="text-semi-muted">
200 - {this.parseDate(row.date)}
201 - </td>
202 - <td className="text-semi-muted">
203 - {row.size}
204 - </td>
205 - <td className="width-150">
206 - <Progress
207 - color={row.progress.colorClass} value={row.progress.percent}
208 - className="progress-sm mb-xs"
209 - />
210 - </td>
211 - </tr>,
212 - )
213 - }
214 - </tbody>
215 - </Table>
216 - <div className="clearfix">
217 - <div className="float-right">
218 - <Button color="default" className="mr-xs" size="sm">Send to...</Button>
219 - <UncontrolledButtonDropdown>
220 - <DropdownToggle color="inverse" className="mr-xs" size="sm" caret>Clear</DropdownToggle>
221 - <DropdownMenu>
222 - <DropdownItem>Clear</DropdownItem>
223 - <DropdownItem>Move ...</DropdownItem>
224 - <DropdownItem>Something else here</DropdownItem>
225 - <DropdownItem divider />
226 - <DropdownItem>Separated link</DropdownItem>
227 - </DropdownMenu>
228 - </UncontrolledButtonDropdown>
229 - </div>
230 - <p>Basic table with styled content</p>
231 - </div>
232 - </Widget>
233 - </Col>
234 - </Row>
235 - <Row>
236 - <Col lg={6}>
237 - <Widget
238 - title={<h5>Table <span className="fw-semi-bold">Styles</span></h5>} settings close
239 - >
240 - <h3>Stripped <span className="fw-semi-bold">Table</span></h3>
241 -
242 - <p>Each row is highlighted. You will never lost there. Just <code>.table-striped</code> it.</p>
243 - <Table className="table-striped">
244 - <thead>
245 - <tr>
246 - <th>
247 - <div className="abc-checkbox">
248 - <Input
249 - id="checkbox1" type="checkbox" checked={this.state.checkboxes1[0]}
250 - onChange={event => this.checkAll(event, 'checkboxes1')}
251 - />
252 - <Label for="checkbox1" />
253 - </div>
254 - </th>
255 - <th>First Name</th>
256 - <th>Last Name</th>
257 - <th>Info</th>
258 - </tr>
259 - </thead>
260 - <tbody>
261 - <tr>
262 - <td>
263 - <div className="abc-checkbox">
264 - <Input
265 - id="checkbox2" type="checkbox" checked={this.state.checkboxes1[1]}
266 - onChange={event => this.changeCheck(event, 'checkboxes1', 1)}
267 - />
268 - <Label for="checkbox2" />
269 - </div>
270 - </td>
271 - <td>Mark</td>
272 - <td>Otto</td>
273 - <td><Badge color="danger">Online</Badge></td>
274 - </tr>
275 - <tr>
276 - <td>
277 - <div className="abc-checkbox">
278 - <Input
279 - id="checkbox3" type="checkbox" checked={this.state.checkboxes1[2]}
280 - onChange={event => this.changeCheck(event, 'checkboxes1', 2)}
281 - />
282 - <Label for="checkbox3" />
283 - </div>
284 - </td>
285 - <td>Jacob <Badge color="warning" className="text-gray-dark">ALERT!</Badge></td>
286 - <td>Thornton</td>
287 - <td><span className="badge bg-gray">Away</span></td>
288 - </tr>
289 - <tr>
290 - <td>
291 - <div className="abc-checkbox">
292 - <Input
293 - id="checkbox4" type="checkbox" checked={this.state.checkboxes1[3]}
294 - onChange={event => this.changeCheck(event, 'checkboxes1', 3)}
295 - />
296 - <Label for="checkbox4" />
297 - </div>
298 - </td>
299 - <td>Larry</td>
300 - <td>the Bird</td>
301 - <td><Badge color="danger">Construct</Badge></td>
302 - </tr>
303 - </tbody>
304 - </Table>
305 - <br /><br />
306 - <h3>Hover <span className="fw-semi-bold">Table</span></h3>
307 - <p>{'Trace only what\'s really important. '}<code>.table-hover</code> is made for it.</p>
308 - <div className="table-responsive">
309 - <Table className="table-hover">
310 - <thead>
311 - <tr>
312 - <th>#</th>
313 - <th>First Name</th>
314 - <th>Last Name</th>
315 - <th>Email</th>
316 - <th>Status</th>
317 - </tr>
318 - </thead>
319 - {/* eslint-disable */}
320 - <tbody>
321 - <tr>
322 - <td>1</td>
323 - <td>Mark</td>
324 - <td>Otto</td>
325 - <td><a href="#">ottoto@example.com</a></td>
326 - <td><Badge color="gray" className="text-gray" pill>Pending</Badge></td>
327 - </tr>
328 - <tr>
329 - <td>2</td>
330 - <td>Jacob</td>
331 - <td>Thornton</td>
332 - <td><a href="#">fat.thor@example.com</a></td>
333 - <td><Badge color="gray" className="text-gray-light" pill>Unconfirmed</Badge></td>
334 - </tr>
335 - <tr>
336 - <td>3</td>
337 - <td>Larry</td>
338 - <td>the Bird</td>
339 - <td><a href="#">larry@example.com</a></td>
340 - <td><Badge color="gray" className="text-gray" pill>New</Badge></td>
341 - </tr>
342 - <tr>
343 - <td>4</td>
344 - <td>Peter</td>
345 - <td>Horadnia</td>
346 - <td><a href="#">peter@example.com</a></td>
347 - <td><Badge color="gray" className="text-gray-light" pill>Active</Badge></td>
348 - </tr>
349 - </tbody>
350 - {/* eslint-enable */}
351 - </Table>
352 - </div>
353 - </Widget>
354 - </Col>
355 - <Col lg={6}>
356 - <Widget
357 - title={<h5>Table <span className="fw-semi-bold">Styles</span></h5>} settings close
358 - >
359 - <h3>Bordered <span className="fw-semi-bold">Table</span></h3>
360 - <p>Each row is highlighted. You will never lost there. That&apos;s how
361 - all of us learned in school the table should look like. Just add
362 - <code>.table-bordered</code> to it.</p>
363 - <Table className="table-bordered table-lg mt-lg mb-0">
364 - <thead className="text-uppercase">
365 - <tr>
366 - <th>
367 - <div className="abc-checkbox">
368 - <Input
369 - id="checkbox10" type="checkbox" checked={this.state.checkboxes2[0]}
370 - onChange={event => this.checkAll(event, 'checkboxes2')}
371 - />
372 - <Label for="checkbox10" />
373 - </div>
374 - </th>
375 - <th>Product</th>
376 - <th className="text-right">Price</th>
377 - <th className="text-center">Sales</th>
378 - </tr>
379 - </thead>
380 - <tbody>
381 - <tr>
382 - <td>
383 - <div className="abc-checkbox">
384 - <Input
385 - id="checkbox11" type="checkbox" checked={this.state.checkboxes2[1]}
386 - onChange={event => this.changeCheck(event, 'checkboxes2', 1)}
387 - />
388 - <Label for="checkbox11" />
389 - </div>
390 - </td>
391 - <td>On the Road</td>
392 - <td className="text-right">$25 224.2</td>
393 - <td className="text-center">
394 - <Sparklines data={[13, 14, 16, 15, 4, 14, 20]} style={{ width: '35px', height: '20px' }}>
395 - <SparklinesBars style={{ stroke: 'white', fill: '#618fb0' }} />
396 - </Sparklines>
397 - </td>
398 - </tr>
399 - <tr>
400 - <td>
401 - <div className="abc-checkbox">
402 - <Input
403 - id="checkbox12" type="checkbox" checked={this.state.checkboxes2[2]}
404 - onChange={event => this.changeCheck(event, 'checkboxes2', 2)}
405 - />
406 - <Label for="checkbox12" />
407 - </div>
408 - </td>
409 - <td>HP Core i7</td>
410 - <td className="text-right">$87 346.1</td>
411 - <td className="text-center">
412 - <Sparklines data={[14, 12, 16, 11, 17, 19, 16]} style={{ width: '35px', height: '20px' }}>
413 - <SparklinesBars style={{ stroke: 'white', fill: '#999' }} />
414 - </Sparklines>
415 - </td>
416 - </tr>
417 - <tr>
418 - <td>
419 - <div className="abc-checkbox">
420 - <Input
421 - id="checkbox13" type="checkbox" checked={this.state.checkboxes2[3]}
422 - onChange={event => this.changeCheck(event, 'checkboxes2', 3)}
423 - />
424 - <Label for="checkbox13" />
425 - </div>
426 - </td>
427 - <td>Let&apos;s Dance</td>
428 - <td className="text-right">$57 944.6</td>
429 - <td className="text-center">
430 - <Sparklines data={[11, 17, 19, 16, 14, 12, 16]} style={{ width: '35px', height: '20px' }}>
431 - <SparklinesBars style={{ stroke: 'white', fill: '#f0b518' }} />
432 - </Sparklines>
433 - </td>
434 - </tr>
435 - <tr>
436 - <td>
437 - <div className="abc-checkbox">
438 - <Input
439 - id="checkbox14" type="checkbox" checked={this.state.checkboxes2[4]}
440 - onChange={event => this.changeCheck(event, 'checkboxes2', 4)}
441 - />
442 - <Label for="checkbox14" />
443 - </div>
444 - </td>
445 - <td>Air Pro</td>
446 - <td className="text-right">$118 533.1</td>
447 - <td className="text-center">
448 - <Sparklines data={[13, 14, 20, 16, 15, 4, 14]} style={{ width: '35px', height: '20px' }}>
449 - <SparklinesBars style={{ stroke: 'white', fill: '#e5603b' }} />
450 - </Sparklines>
451 - </td>
452 - </tr>
453 - <tr>
454 - <td>
455 - <div className="abc-checkbox">
456 - <Input
457 - id="checkbox15" type="checkbox" checked={this.state.checkboxes2[5]}
458 - onChange={event => this.changeCheck(event, 'checkboxes2', 5)}
459 - />
460 - <Label for="checkbox15" />
461 - </div>
462 - </td>
463 - <td>Version Control</td>
464 - <td className="text-right">$72 854.5</td>
465 - <td className="text-center">
466 - <Sparklines data={[16, 15, 4, 14, 13, 14, 20]} style={{ width: '35px', height: '20px' }}>
467 - <SparklinesBars style={{ stroke: 'white', fill: '#618fb0' }} />
468 - </Sparklines>
469 - </td>
470 - </tr>
471 - </tbody>
472 - </Table>
473 - </Widget>
474 - <Widget
475 - title={<h5>Table <span className="fw-semi-bold">Styles</span></h5>} settings close
476 - >
477 - <h3>Overflow <span className="fw-semi-bold">Table</span></h3>
478 - <p>
479 - Add any non-bordered .table within a widget for a seamless design.
480 - Awesome look for no cost.
481 - Just wrap the table with simple css class <code>.widget-table-overflow</code> inside
482 - of widget
483 - </p>
484 - <div className="widget-table-overflow">
485 - <Table className="table-striped table-lg mt-lg mb-0">
486 - <thead>
487 - <tr>
488 - <th>
489 - <div className="abc-checkbox">
490 - <Input
491 - id="checkbox20" type="checkbox" checked={this.state.checkboxes3[0]}
492 - onChange={event => this.checkAll(event, 'checkboxes3')}
493 - />
494 - <Label for="checkbox20" />
495 - </div>
496 - </th>
497 - <th>Product</th>
498 - <th className="text-right">Price</th>
499 - <th className="text-center">Sales</th>
500 - </tr>
501 - </thead>
502 - <tbody>
503 - <tr>
504 - <td>
505 - <div className="abc-checkbox">
506 - <Input
507 - id="checkbox21" type="checkbox" checked={this.state.checkboxes3[1]}
508 - onChange={event => this.changeCheck(event, 'checkboxes3', 1)}
509 - />
510 - <Label for="checkbox21" />
511 - </div>
512 - </td>
513 - <td>On the Road</td>
514 - <td className="text-right">$25 224.2</td>
515 - <td className="text-center">
516 - <Sparklines data={[13, 14, 16, 15, 4, 14, 20]} style={{ width: '35px', height: '20px' }}>
517 - <SparklinesBars style={{ stroke: 'white', fill: '#618fb0' }} />
518 - </Sparklines>
519 - </td>
520 - </tr>
521 - <tr>
522 - <td>
523 - <div className="abc-checkbox">
524 - <Input
525 - id="checkbox22" type="checkbox" checked={this.state.checkboxes3[2]}
526 - onChange={event => this.changeCheck(event, 'checkboxes3', 2)}
527 - />
528 - <Label for="checkbox22" />
529 - </div>
530 - </td>
531 - <td>HP Core i7</td>
532 - <td className="text-right">$87 346.1</td>
533 - <td className="text-center">
534 - <Sparklines data={[14, 12, 16, 11, 17, 19, 16]} style={{ width: '35px', height: '20px' }}>
535 - <SparklinesBars style={{ stroke: 'white', fill: '#999' }} />
536 - </Sparklines>
537 - </td>
538 - </tr>
539 - <tr>
540 - <td>
541 - <div className="abc-checkbox">
542 - <Input
543 - id="checkbox23" type="checkbox" checked={this.state.checkboxes3[3]}
544 - onChange={event => this.changeCheck(event, 'checkboxes3', 3)}
545 - />
546 - <Label for="checkbox23" />
547 - </div>
548 - </td>
549 - <td>Let&apos;s Dance</td>
550 - <td className="text-right">$57 944.6</td>
551 - <td className="text-center">
552 - <Sparklines data={[11, 17, 19, 16, 14, 12, 16]} style={{ width: '35px', height: '20px' }}>
553 - <SparklinesBars style={{ stroke: 'white', fill: '#f0b518' }} />
554 - </Sparklines>
555 - </td>
556 - </tr>
557 - <tr>
558 - <td>
559 - <div className="abc-checkbox">
560 - <Input
561 - id="checkbox24" type="checkbox" checked={this.state.checkboxes3[4]}
562 - onChange={event => this.changeCheck(event, 'checkboxes3', 4)}
563 - />
564 - <Label for="checkbox24" />
565 - </div>
566 - </td>
567 - <td>Air Pro</td>
568 - <td className="text-right">$118 533.1</td>
569 - <td className="text-center">
570 - <Sparklines data={[13, 14, 20, 16, 15, 4, 14]} style={{ width: '35px', height: '20px' }}>
571 - <SparklinesBars style={{ stroke: 'white', fill: '#e5603b' }} />
572 - </Sparklines>
573 - </td>
574 - </tr>
575 - <tr>
576 - <td>
577 - <div className="abc-checkbox">
578 - <Input
579 - id="checkbox25" type="checkbox" checked={this.state.checkboxes3[5]}
580 - onChange={event => this.changeCheck(event, 'checkboxes3', 5)}
581 - />
582 - <Label for="checkbox25" />
583 - </div>
584 - </td>
585 - <td>Version Control</td>
586 - <td className="text-right">$72 854.5</td>
587 - <td className="text-center">
588 - <Sparklines data={[16, 15, 4, 14, 13, 14, 20]} style={{ width: '35px', height: '20px' }}>
589 - <SparklinesBars style={{ stroke: 'white', fill: '#618fb0' }} />
590 - </Sparklines>
591 - </td>
592 - </tr>
593 - </tbody>
594 - </Table>
595 - </div>
596 - </Widget>
597 - </Col>
598 - </Row>
599 - </div>
600 - );
601 - }
602 -
603 -}
604 -
605 -export default Static;
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - // some styles
5 -}
1 -{
2 - "name": "static",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Static.js"
6 -}
1 -import React, { Component } from 'react';
2 -import cx from 'classnames';
3 -import {
4 - Row,
5 - Col,
6 - Breadcrumb,
7 - BreadcrumbItem,
8 - Alert,
9 -} from 'reactstrap';
10 -
11 -import Widget from '../../../../components/Widget';
12 -
13 -class Alerts extends Component {
14 - state = {
15 - alerts: [{
16 - id: 'al-1',
17 - type: 'success',
18 - msg: '<span class="fw-semi-bold">Success:</span> You successfully read this important alert message.',
19 - visible: [true, true, true],
20 - }, {
21 - id: 'al-2',
22 - type: 'info',
23 - msg: '<span class="fw-semi-bold">Info:</span> This alert needs your attention, but it\'s not super important.',
24 - visible: [true, true, true],
25 - }, {
26 - id: 'al-3',
27 - type: 'warning',
28 - msg: '<span class="fw-semi-bold"><strong>Warning:</strong></span> Best check yo self, you\'re not looking too good.',
29 - visible: [true, true, true],
30 - }, {
31 - id: 'al-4',
32 - type: 'danger',
33 - msg: '<span class="fw-semi-bold">Danger:</span> Change this and that and try again. <a class="btn btn-default btn-xs float-right mr" href="#">Ignore</a> <a class="btn btn-danger btn-xs float-right mr-xs" href="#">Take this action</a>',
34 - visible: [true, true, true],
35 - }],
36 - }
37 -
38 - closeAlert(index, alertGroup) {
39 - const newAlerts = [...this.state.alerts];
40 - newAlerts[index].visible[alertGroup] = false;
41 -
42 - this.setState({ alerts: newAlerts });
43 - }
44 -
45 - render() {
46 - const { alerts } = this.state;
47 -
48 - return (
49 - <div>
50 - <Breadcrumb>
51 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
52 - <BreadcrumbItem active>UI Alerts</BreadcrumbItem>
53 - </Breadcrumb>
54 - <h1 className="page-title">Alerts</h1>
55 - <Row>
56 - <Col xs={12} md={8}>
57 - <Widget
58 - title={<h5>Alert <span className="fw-semi-bold">Messages</span></h5>}
59 - close collapse
60 - >
61 - <p>Alerts are available for any length of text, as well as an optional dismiss button.</p>
62 - {alerts.map((alert, index) => <Alert
63 - key={alert.id} isOpen={alert.visible[0]} toggle={() => this.closeAlert(index, 0)}
64 - color={alert.type}
65 - >
66 - <span dangerouslySetInnerHTML={{ __html: alert.msg }} />
67 - </Alert>)}
68 - </Widget>
69 - </Col>
70 - <Col xs={12} md={8}>
71 - <Widget
72 - title={<h5>Transparent <span className="fw-semi-bold">Alerts</span></h5>}
73 - close collapse
74 - >
75 - <p>Transparent alerts are available by adding <code>.alert-transparent</code> class.</p>
76 - {alerts.map((alert, index) => <Alert
77 - className="alert-transparent"
78 - key={alert.id} isOpen={alert.visible[1]} toggle={() => this.closeAlert(index, 1)}
79 - color={alert.type}
80 - >
81 - <span dangerouslySetInnerHTML={{ __html: alert.msg }} />
82 - </Alert>)}
83 - </Widget>
84 - </Col>
85 - <Col xs={12} md={8}>
86 - <Widget
87 - title={<h5>Rounded <span className="fw-semi-bold">Alerts</span></h5>}
88 - close collapse
89 - >
90 - <p>Rounded alerts are available by adding <code>.alert-rounded</code> class.</p>
91 - {alerts.map((alert, index) => <Alert
92 - className={cx('alert-rounded', { 'alert-transparent': index % 2 !== 1 })}
93 - key={alert.id} isOpen={alert.visible[2]} toggle={() => this.closeAlert(index, 2)}
94 - color={alert.type}
95 - >
96 - <span dangerouslySetInnerHTML={{ __html: alert.msg }} />
97 - </Alert>)}
98 - </Widget>
99 - </Col>
100 - <Col xs={12} md={8}>
101 - <Widget
102 - title={<h5>Additional <span className="fw-semi-bold">Content</span></h5>}
103 - close collapse
104 - >
105 - <p>Alerts can also contain additional HTML elements like headings, paragraphs and dividers.</p>
106 - <Alert color="success">
107 - <h4 className="alert-heading">Well done!</h4>
108 - <p>
109 - Aww yeah, you successfully read this important alert message. This example text is going
110 - to run a bit longer so that you can see how spacing within an alert works with this kind
111 - of content.
112 - </p>
113 - <hr />
114 - <p className="mb-0">
115 - Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
116 - </p>
117 - </Alert>
118 - <Alert color="danger">
119 - <h4 className="alert-heading">Well done!</h4>
120 - <p>
121 - Aww yeah, you successfully read this important alert message. This example text is going
122 - to run a bit longer so that you can see how spacing within an alert works with this kind
123 - of content.
124 - </p>
125 - </Alert>
126 - </Widget>
127 - </Col>
128 - </Row>
129 - </div>
130 - );
131 - }
132 -}
133 -
134 -export default Alerts;
1 -{
2 - "name": "Alerts",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Alerts.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Button,
8 - Badge,
9 -} from 'reactstrap';
10 -
11 -import Widget from '../../../../components/Widget';
12 -
13 -const Badges = () => (
14 - <div>
15 - <Breadcrumb>
16 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
17 - <BreadcrumbItem active>UI Badge</BreadcrumbItem>
18 - </Breadcrumb>
19 - <h1 className="page-title">Badge</h1>
20 - <Row>
21 - <Col xs={12} md={8}>
22 - <Widget
23 - title={<h5>Badge <span className="fw-semi-bold">Example</span></h5>}
24 - close collapse
25 - >
26 - <p>
27 - Badges scale to match the size of the immediate parent element by
28 - using relative font sizing and em units.
29 - </p>
30 - <h1>Example heading <Badge color="primary">Primary</Badge></h1>
31 - <h2>Example heading <Badge color="info">Info</Badge></h2>
32 - <h3>Example heading <Badge color="warning">Warning</Badge></h3>
33 - <h4>Example heading <Badge color="success">Success</Badge></h4>
34 - <h5>Example heading <Badge color="danger">Danger</Badge></h5>
35 - <h6>Example heading <Badge color="secondary">Secondary</Badge></h6>
36 - <p>Badges can be used as part of links or buttons to provide a counter.</p>
37 - <Button color="primary">Notifications <Badge color="danger">4</Badge></Button>
38 - </Widget>
39 - </Col>
40 - <Col xs={12} md={8}>
41 - <Widget
42 - title={<h5>Pill <span className="fw-semi-bold">Badges</span></h5>}
43 - close collapse
44 - >
45 - <p>
46 - Use the <code>pill</code> property to make badges more rounded
47 - (with a larger border-radius and additional horizontal padding).
48 - </p>
49 - <Badge className="mr-xs" color="primary" pill>Primary</Badge>
50 - <Badge className="mr-xs" color="info" pill>Info</Badge>
51 - <Badge className="mr-xs" color="warning" pill>Warning</Badge>
52 - <Badge className="mr-xs" color="success" pill>Success</Badge>
53 - <Badge className="mr-xs" color="danger" pill>Danger</Badge>
54 - <Badge className="mr-xs" color="secondary" pill>Secondary</Badge>
55 - <Badge className="mr-xs" color="light" pill>Light</Badge>
56 - <Badge className="mr-xs" color="dark" pill>Dark</Badge>
57 - </Widget>
58 - </Col>
59 - <Col xs={12} md={8}>
60 - <Widget
61 - title={<h5>Pill <span className="fw-semi-bold">Badges</span></h5>}
62 - close collapse
63 - >
64 - <p>
65 - Using the contextual <code>href=&quot;&#35;&quot;</code> classes on
66 - an <code>&lt;Badge&gt;</code> element quickly provide actionable badges with hover and focus states.
67 - </p>
68 - <Badge className="mr-xs" href="#" color="primary">Primary</Badge>
69 - <Badge className="mr-xs" href="#" color="info">Info</Badge>
70 - <Badge className="mr-xs" href="#" color="warning">Warning</Badge>
71 - <Badge className="mr-xs" href="#" color="success">Success</Badge>
72 - <Badge className="mr-xs" href="#" color="danger">Danger</Badge>
73 - <Badge className="mr-xs" href="#" color="secondary">Secondary</Badge>
74 - <Badge className="mr-xs" href="#" color="light">Light</Badge>
75 - <Badge className="mr-xs" href="#" color="dark">Dark</Badge>
76 - </Widget>
77 - </Col>
78 - </Row>
79 - </div>
80 -);
81 -
82 -export default Badges;
1 -{
2 - "name": "Badge",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Badge.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Button,
6 - ButtonGroup,
7 - ButtonToolbar,
8 - ButtonDropdown,
9 - DropdownToggle,
10 - DropdownMenu,
11 - DropdownItem,
12 -} from 'reactstrap';
13 -
14 -import Widget from '../../../../components/Widget';
15 -
16 -class Buttons extends React.Component {
17 - constructor(props) {
18 - super(props);
19 -
20 - this.toggleOne = this.toggleOne.bind(this);
21 - this.toggleTwo = this.toggleTwo.bind(this);
22 - this.toggleThree = this.toggleThree.bind(this);
23 - this.toggleFour = this.toggleFour.bind(this);
24 -
25 - this.onRadioBtnClickOne = this.onRadioBtnClickOne.bind(this);
26 - this.onRadioBtnClickTwo = this.onRadioBtnClickTwo.bind(this);
27 - this.onCheckboxBtnClickOne = this.onCheckboxBtnClickOne.bind(this);
28 - this.onCheckboxBtnClickTwo = this.onCheckboxBtnClickTwo.bind(this);
29 -
30 - this.state = {
31 - dropdownOpenOne: false,
32 - dropdownOpenTwo: false,
33 - dropdownOpenThree: false,
34 - dropdownOpenFour: false,
35 - cSelectedOne: [2],
36 - cSelectedTwo: [1, 3],
37 - rSelectedTwo: 2,
38 - rSelectedOne: null,
39 - };
40 - }
41 -
42 - onRadioBtnClickOne(rSelectedOne) {
43 - this.setState({ rSelectedOne });
44 - }
45 -
46 - onRadioBtnClickTwo(rSelectedTwo) {
47 - this.setState({ rSelectedTwo });
48 - }
49 -
50 - onCheckboxBtnClickOne(selected) {
51 - const index = this.state.cSelectedOne.indexOf(selected);
52 - if (index < 0) {
53 - this.state.cSelectedOne.push(selected);
54 - } else {
55 - this.state.cSelectedOne.splice(index, 1);
56 - }
57 - this.setState({ cSelectedOne: [...this.state.cSelectedOne] });
58 - }
59 -
60 - onCheckboxBtnClickTwo(selected) {
61 - const index = this.state.cSelectedTwo.indexOf(selected);
62 - if (index < 0) {
63 - this.state.cSelectedTwo.push(selected);
64 - } else {
65 - this.state.cSelectedTwo.splice(index, 1);
66 - }
67 - this.setState({ cSelectedTwo: [...this.state.cSelectedTwo] });
68 - }
69 -
70 - toggleOne() {
71 - this.setState({
72 - dropdownOpenOne: !this.state.dropdownOpenOne,
73 - });
74 - }
75 -
76 - toggleTwo() {
77 - this.setState({
78 - dropdownOpenTwo: !this.state.dropdownOpenTwo,
79 - });
80 - }
81 -
82 - toggleThree() {
83 - this.setState({
84 - dropdownOpenThree: !this.state.dropdownOpenThree,
85 - });
86 - }
87 -
88 - toggleFour() {
89 - this.setState({
90 - dropdownOpenFour: !this.state.dropdownOpenFour,
91 - });
92 - }
93 -
94 - render() {
95 - return (
96 - <div>
97 - <ol className="breadcrumb">
98 - <li className="breadcrumb-item">YOU ARE HERE</li>
99 - <li className="active breadcrumb-item">UI Buttons</li>
100 - </ol>
101 -
102 - <h1 className="page-title">Buttons - <span className="fw-semi-bold">Styles </span></h1>
103 -
104 - <Row>
105 - {/* Color options */}
106 - <Col md={6} sm={12} xs={12}>
107 - <Widget
108 - title={<h5> Color <span className="fw-semi-bold">Options</span>
109 - </h5>} close collapse
110 - >
111 - <div>
112 - <p className="fs-mini text-muted">
113 - Use any of the available button classes to quickly create a styled button.
114 - Semantically distinguishable beauty.
115 - </p>
116 - <p className="text-left">
117 - <Button color="default" className="width-100 mb-xs mr-xs">Default</Button>
118 - <Button color="primary" className="width-100 mb-xs mr-xs">Primary</Button>
119 - <Button color="info" className="width-100 mb-xs mr-xs">Info</Button>
120 - <Button color="success" className="width-100 mb-xs mr-xs">Success</Button>
121 - <Button color="warning" className="width-100 mb-xs mr-xs">Warning</Button>
122 - <Button color="danger" className="width-100 mb-xs mr-xs">Danger</Button>
123 - <Button color="gray" className="width-100 mb-xs mr-xs">Gray</Button>
124 - <Button color="inverse" className="width-100 mb-xs mr-xs">Inverse</Button>
125 - </p>
126 - </div>
127 - </Widget>
128 - </Col>
129 -
130 - {/* Size variants */}
131 - <Col md={6} sm={12} xs={12}>
132 - <Widget
133 - title={<h5> Size <span className="fw-semi-bold">Variants</span>
134 - </h5>} close collapse
135 - >
136 - <div>
137 - <p className="fs-mini text-muted">
138 - Fancy larger or smaller buttons?
139 - Four separate sizes available for all use cases:
140 - from tiny 10px button to large one.
141 - </p>
142 - <p>
143 - <Button color="default" size="lg" className="mb-xs mr-xs">Large button</Button>
144 - <Button color="primary" className="mb-xs mr-xs">Default button</Button>
145 - <Button color="info" size="sm" className="mb-xs mr-xs">Small button</Button>
146 - <Button color="success" size="xs" className="mb-xs mr-xs">Tiny button</Button>
147 - </p>
148 - </div>
149 - </Widget>
150 - </Col>
151 -
152 - <Col md={6} sm={12} xs={12}>
153 - <Widget
154 - title={<h5>Outline <span className="fw-semi-bold">Buttons</span>
155 - </h5>} close collapse
156 - >
157 - <div>
158 - <p className="fs-mini">
159 - In need of a button, but not the hefty background colors they bring?
160 - Use <code>outline</code> property to remove all
161 - background images and colors on any button.
162 - </p>
163 - <p>
164 - <Button outline color="default" className="width-100 mb-xs mr-xs">Default</Button>
165 - <Button outline color="primary" className="width-100 mb-xs mr-xs">Primary</Button>
166 - <Button outline color="info" className="width-100 mb-xs mr-xs">Info</Button>
167 - <Button outline color="success" className="width-100 mb-xs mr-xs">Success</Button>
168 - <Button outline color="warning" className="width-100 mb-xs mr-xs">Warning</Button>
169 - <Button outline color="danger" className="width-100 mb-xs mr-xs">Danger</Button>
170 - <Button outline color="gray" className="width-100 mb-xs mr-xs">Gray</Button>
171 - <Button outline color="inverse" className="width-100 mb-xs mr-xs">Inverse</Button>
172 - </p>
173 - </div>
174 - </Widget>
175 - </Col>
176 -
177 - <Col md={6} sm={12} xs={12}>
178 - <Widget
179 - title={<h5>Rounded <span className="fw-semi-bold">Buttons</span>
180 - </h5>} close collapse
181 - >
182 - <div>
183 - <p className="fs-mini">
184 - Use any of the available button properties to quickly create a styled button.
185 - Semantically distinguishable beauty. Use <code>.btn-rounded</code> or <code>.btn-rounded-f</code>.
186 - </p>
187 - <p>
188 - <Button color="default" className="btn-rounded-f width-100 mb-xs mr-xs">Default</Button>
189 - <Button color="primary" className="btn-rounded-f width-100 mb-xs mr-xs">Primary</Button>
190 - <Button color="info" className="btn-rounded-f width-100 mb-xs mr-xs">Info</Button>
191 - <Button color="success" className="btn-rounded-f width-100 mb-xs mr-xs">Success</Button>
192 - <Button outline color="warning" className="btn-rounded width-100 mb-xs mr-xs">Warning</Button>
193 - <Button outline color="danger" className="btn-rounded width-100 mb-xs mr-xs">Danger</Button>
194 - <Button outline color="gray" className="btn-rounded width-100 mb-xs mr-xs">Gray</Button>
195 - <Button outline color="inverse" className="btn-rounded width-100 mb-xs mr-xs">Inverse</Button>
196 - </p>
197 - </div>
198 - </Widget>
199 - </Col>
200 -
201 - {/* Block Buttons */}
202 - <Col md={6} sm={12} xs={12}>
203 - <Widget
204 - title={<h5> Block <span className="fw-semi-bold">Buttons</span>
205 - </h5>} close collapse
206 - >
207 - <div>
208 - <p className="fs-mini text-muted">
209 - Create block level buttons - those that span the full width
210 - of a parent by adding <code>block</code>
211 - to <code>&lt;Button&gt;</code> component.
212 - Great for menu & social buttons.
213 - </p>
214 - <Button color="info" block>Block Button</Button>
215 - <Button color="default" block>Show Menu &nbsp;&nbsp;&nbsp;<i
216 - className="fa fa-bars"
217 - /></Button>
218 - <Button color="primary" block><i className="fa fa-facebook" />&nbsp;&nbsp;Login mit
219 - Facebook</Button>
220 - <Button color="warning" block>Are you sure?</Button>
221 - </div>
222 - </Widget>
223 - </Col>
224 -
225 - {/* Disabled Buttons */}
226 - <Col md={6} sm={12} xs={12}>
227 - <Widget
228 - title={<h5> Disabled <span className="fw-semi-bold">Buttons</span>
229 - </h5>} close collapse
230 - >
231 - <div>
232 - <p className="fs-mini text-muted">
233 - Make buttons look unclickable by fading them back 50%.
234 - Add the <code>disabled</code> to <code>&lt;Button&gt;</code> component.
235 - </p>
236 - <p>
237 - <Button color="primary" disabled className="mr-xs">Primary button</Button>
238 - <Button color="default" disabled className="mr-xs">Button</Button>
239 - </p>
240 - <p>
241 - <Button color="success" size="sm" disabled className="mr-xs">Primary Link</Button>
242 - <Button color="default" size="sm" disabled className="mr-xs">Link</Button>
243 - </p>
244 - </div>
245 - </Widget>
246 - </Col>
247 -
248 - {/* Buttons Groups */}
249 - <Col md={6} sm={12} xs={12}>
250 - <Widget
251 - title={<h5> Button <span className="fw-semi-bold">Groups</span>
252 - </h5>} close collapse
253 - >
254 - <div>
255 - <p className="fs-mini text-muted">
256 - Group a series of buttons together on a single
257 - line with the button group.
258 - Add on optional JavaScript radio and checkbox
259 - style behavior with Bootstrap buttons plugin.
260 - </p>
261 - <ButtonGroup className="mb-xs">
262 - <Button color="default">Left</Button>
263 - <Button color="default">Middle</Button>
264 - <Button color="default">Right</Button>
265 - </ButtonGroup>
266 -
267 - <ButtonToolbar className="mb-xs">
268 - <ButtonGroup className="mr-2">
269 - <Button color="default">1</Button>
270 - <Button color="default">2</Button>
271 - <Button color="default">3</Button>
272 - <Button color="default">4</Button>
273 - </ButtonGroup>
274 - <ButtonGroup className="mr-2">
275 - <Button color="default">5</Button>
276 - <Button color="default">6</Button>
277 - <Button color="default">7</Button>
278 - </ButtonGroup>
279 - <ButtonGroup className="mr-2">
280 - <Button color="default">8</Button>
281 - </ButtonGroup>
282 - </ButtonToolbar>
283 -
284 - </div>
285 - </Widget>
286 - </Col>
287 -
288 - {/* Button Dropdowns */}
289 - {/* todo: check after reactstrap update */}
290 - <Col md={6} sm={12} xs={12}>
291 - <Widget
292 - title={<h5> Button <span className="fw-semi-bold">Dropdowns</span>
293 - </h5>} close collapse
294 - >
295 - <div>
296 - <p className="fs-mini text-muted">
297 - Add dropdown menus to nearly anything with
298 - this simple plugin, including the buttons,
299 - navbar, tabs, and pills.
300 - Both solid & segmented dropdown options available.
301 - </p>
302 -
303 - <div className="mb-xs">
304 - <ButtonDropdown
305 - isOpen={this.state.dropdownOpenOne} toggle={this.toggleOne}
306 - className="mr-xs"
307 - >
308 - <DropdownToggle caret color="danger">
309 - &nbsp; One &nbsp;
310 - </DropdownToggle>
311 - <DropdownMenu>
312 - <DropdownItem>Action</DropdownItem>
313 - <DropdownItem>Another action</DropdownItem>
314 - <DropdownItem>Something else here</DropdownItem>
315 - <DropdownItem divider />
316 - <DropdownItem>Separated link</DropdownItem>
317 - </DropdownMenu>
318 - </ButtonDropdown>
319 -
320 - <ButtonDropdown isOpen={this.state.dropdownOpenTwo} toggle={this.toggleTwo}>
321 - <DropdownToggle size="sm" caret color="gray">
322 - &nbsp; One &nbsp;
323 - </DropdownToggle>
324 - <DropdownMenu>
325 - <DropdownItem>Action</DropdownItem>
326 - <DropdownItem>Another action</DropdownItem>
327 - <DropdownItem>Something else here</DropdownItem>
328 - <DropdownItem divider />
329 - <DropdownItem>Separated link</DropdownItem>
330 - </DropdownMenu>
331 - </ButtonDropdown>
332 - </div>
333 - <div className="mb-xs">
334 - <ButtonDropdown
335 - isOpen={this.state.dropdownOpenThree} toggle={this.toggleThree}
336 - className="mr-xs"
337 - >
338 - <Button id="dropdownThree" color="primary">Primary</Button>
339 - <DropdownToggle color="primary" caret className="dropdown-toggle-split" />
340 - <DropdownMenu>
341 - <DropdownItem>Action</DropdownItem>
342 - <DropdownItem>Another action</DropdownItem>
343 - <DropdownItem>Something else here</DropdownItem>
344 - <DropdownItem divider />
345 - <DropdownItem>Separated link</DropdownItem>
346 - </DropdownMenu>
347 - </ButtonDropdown>
348 - <ButtonDropdown isOpen={this.state.dropdownOpenFour} toggle={this.toggleFour}>
349 - <Button size="sm" id="dropdownFour" color="gray">Gray</Button>
350 - <DropdownToggle size="sm" caret color="gray" className="dropdown-toggle-split" />
351 - <DropdownMenu>
352 - <DropdownItem>Action</DropdownItem>
353 - <DropdownItem>Another action</DropdownItem>
354 - <DropdownItem>Something else here</DropdownItem>
355 - <DropdownItem divider />
356 - <DropdownItem>Separated link</DropdownItem>
357 - </DropdownMenu>
358 - </ButtonDropdown>
359 - </div>
360 - </div>
361 - </Widget>
362 - </Col>
363 - </Row>
364 -
365 - <Row>
366 - <Col md={12} sm={12} xs={12}>
367 - <Widget
368 - title={<h6> Button <span className="fw-semi-bold">Options</span>
369 - </h6>} close collapse
370 - >
371 - <Row>
372 - {/* Checkboxes */}
373 - <Col md={4} sm={6} xs={12}>
374 - <h4> Button <span className="fw-semi-bold">Checkboxes</span></h4>
375 - <p className="fs-mini text-muted">
376 - Do more with buttons. Control button states
377 - or create groups of buttons for more components like
378 - toolbars.
379 - Use <code>ButtonGroup</code> to a group
380 - of checkboxes for checkbox style toggling on
381 - btn-group.
382 - </p>
383 - <div className="mb-xs">
384 - <ButtonGroup>
385 - <Button
386 - color="default" onClick={() => this.onCheckboxBtnClickOne(1)}
387 - active={this.state.cSelectedOne.includes(1)}
388 - >Left way</Button>
389 - <Button
390 - color="default" onClick={() => this.onCheckboxBtnClickOne(2)}
391 - active={this.state.cSelectedOne.includes(2)}
392 - >Middle way</Button>
393 - <Button
394 - color="default" onClick={() => this.onCheckboxBtnClickOne(3)}
395 - active={this.state.cSelectedOne.includes(3)}
396 - >Right way</Button>
397 - </ButtonGroup>
398 - </div>
399 - <div className="mb-xs">
400 - <ButtonGroup>
401 - <Button
402 - size="sm" color="default" onClick={() => this.onCheckboxBtnClickTwo(1)}
403 - active={this.state.cSelectedTwo.includes(1)}
404 - >Left way</Button>
405 - <Button
406 - size="sm" color="default" onClick={() => this.onCheckboxBtnClickTwo(2)}
407 - active={this.state.cSelectedTwo.includes(2)}
408 - >Middle way</Button>
409 - <Button
410 - size="sm" color="default" onClick={() => this.onCheckboxBtnClickTwo(3)}
411 - active={this.state.cSelectedTwo.includes(3)}
412 - >Right way</Button>
413 - </ButtonGroup>
414 - </div>
415 -
416 - </Col>
417 -
418 - {/* Radios */}
419 - <Col md={4} sm={12} xs={12}>
420 - <h4> Button <span className="fw-semi-bold">Radios</span></h4>
421 - <p className="fs-mini text-muted">
422 - Do more with buttons. Control button states
423 - or create groups of buttons for more components like toolbars.
424 - Use <code>ButtonGroup</code> to a group of radio
425 - inputs for radio style toggling on btn-group.
426 - </p>
427 - <div className="mb-xs">
428 - <ButtonGroup>
429 - <Button
430 - color="default" onClick={() => this.onRadioBtnClickOne(1)}
431 - active={this.state.rSelectedOne === 1}
432 - >Left way</Button>
433 - <Button
434 - color="default" onClick={() => this.onRadioBtnClickOne(2)}
435 - active={this.state.rSelectedOne === 2}
436 - >Middle way</Button>
437 - <Button
438 - color="default" onClick={() => this.onRadioBtnClickOne(3)}
439 - active={this.state.rSelectedOne === 3}
440 - >Right way</Button>
441 - </ButtonGroup>
442 - </div>
443 - <div className="mb-xs">
444 - <ButtonGroup>
445 - <Button
446 - size="sm" color="default" onClick={() => this.onRadioBtnClickTwo(1)}
447 - active={this.state.rSelectedTwo === 1}
448 - >Left way</Button>
449 - <Button
450 - size="sm" color="default" onClick={() => this.onRadioBtnClickTwo(2)}
451 - active={this.state.rSelectedTwo === 2}
452 - >Middle way</Button>
453 - <Button
454 - size="sm" color="default" onClick={() => this.onRadioBtnClickTwo(3)}
455 - active={this.state.rSelectedTwo === 3}
456 - >Right way</Button>
457 - </ButtonGroup>
458 - </div>
459 - </Col>
460 -
461 - {/* Buttons with Icons */}
462 - <Col md={4} sm={12} xs={12}>
463 - <h4> Use with <span className="fw-semi-bold">Icons</span></h4>
464 - <p className="fs-mini text-muted">
465 - Fontawesome and Glyph- icons may be used in buttons,
466 - button groups for a toolbar, navigation, or prepended form inputs.
467 - Let your buttons shine!
468 - </p>
469 - <div className="text-center mb-sm">
470 - <Button color="default" className="width-100 mr-xs">
471 - <i className="glyphicon glyphicon-tree-conifer text-success mr-xs mb-xs" />
472 - Forest
473 - </Button>
474 - <Button color="default" className="width-100 mr-xs">
475 - <i className="fa fa-check text-danger mr-xs mb-xs" />
476 - Submit
477 - </Button>
478 - <Button color="default" className="width-100 mr-xs">
479 - <i className="fa fa-facebook text-primary mr-xs mb-xs" />
480 - Login
481 - </Button>
482 - </div>
483 - <div className="text-center">
484 - <Button color="inverse" className="width-100 mr-xs">
485 - <i className="fa fa-exclamation text-warning mr-xs mb-xs" />
486 - Error
487 - </Button>
488 - <Button color="inverse" className="width-100 mr-xs">
489 - <i className="glyphicon glyphicon-globe text-info mr-xs mb-xs" />
490 - <span className="text-info">Globe</span>
491 - </Button>
492 - <Button color="inverse" className="width-100 mr-xs">
493 - <span className="circle bg-white mr-xs">
494 - <i className="fa fa-map-marker text-gray" />
495 - </span>
496 - Map
497 - </Button>
498 - </div>
499 - </Col>
500 - </Row>
501 - </Widget>
502 - </Col>
503 - </Row>
504 -
505 - </div>
506 - );
507 - }
508 -
509 -}
510 -
511 -export default Buttons;
1 -{
2 - "name": "UIButtons",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Buttons.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Button,
8 - Badge,
9 - Card,
10 - CardBody,
11 - CardTitle,
12 - CardText,
13 - CardImg,
14 -} from 'reactstrap';
15 -
16 -import lifestyleImg from '../../../../images/cards/lifestyle.jpg';
17 -import isometricImg from '../../../../images/cards/isometric.jpg';
18 -import mountainsImg from '../../../../images/cards/mountains.jpeg';
19 -import reactnativeImg from '../../../../images/cards/rns.png';
20 -
21 -
22 -const Cards = () => (
23 - <div>
24 - <Breadcrumb>
25 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
26 - <BreadcrumbItem active>UI Card</BreadcrumbItem>
27 - </Breadcrumb>
28 - <h1 className="page-title">Cards - <span className="fw-semi-bold">Examples</span></h1>
29 - <p>
30 - A card is a flexible and extensible content container. It includes options for headers and footers,
31 - a wide variety of content, contextual background colors, and powerful display options. If youre
32 - familiar with Bootstrap 3, cards replace its old panels, wells, and thumbnails. Similar functionality
33 - to those components is available as modifier classes for cards.
34 - </p>
35 - <Row>
36 - <Col>
37 - <Card
38 - className="background-cover border-0 mb-xlg"
39 - style={{ backgroundImage: `url(${lifestyleImg})` }}
40 - >
41 - <CardBody className="text-white">
42 - <span>13 Mar</span>
43 - <h3 className="mt-lg">Lifestyle brand</h3>
44 - <p className="w-75">A lifestyle brand is a company that markets its products or services to embody the
45 - interests, attitudes, and opinions of a group or a culture. Lifestyle brands
46 - seek to inspire, guide, and motivate people, with the goal of their products
47 - contributing to the definition of the consumer&apos;s way of life.</p>
48 - <Button className="btn-rounded-f mt-lg" color="danger">Full Article</Button>
49 - </CardBody>
50 - </Card>
51 - </Col>
52 - </Row>
53 - <Row>
54 - <Col xs={12} sm={6} md={4}>
55 - <Card className="border-0 mb-xlg">
56 - <CardImg top width="100%" src={isometricImg} alt="Card image cap" />
57 - <CardBody>
58 - <CardTitle>Isometric design</CardTitle>
59 - <CardText>
60 - Isometric projection is a method for visually representing three-dimensional in two
61 - dimensions in technical and engineering drawings.
62 - </CardText>
63 - <div className="w-100 text-center">
64 - <Button className="btn-rounded-f" color="primary">Full Article</Button>
65 - </div>
66 - </CardBody>
67 - </Card>
68 - </Col>
69 - <Col xs={12} sm={6} md={4}>
70 - <Card className="mb-xlg border-0">
71 - <CardBody>
72 - <button className="btn-link fw-semi-bold text-success">Avg Rating</button>
73 - <button className="btn-link fw-semi-bold text-muted ml-sm">All Time</button>
74 - <hr />
75 - <div className="d-flex justify-content-between mb-lg">
76 - <div className="text-warning">
77 - <i className="fa fa-star mr-xs" />
78 - <i className="fa fa-star mr-xs" />
79 - <i className="fa fa-star mr-xs" />
80 - <i className="fa fa-star mr-xs" />
81 - <i className="fa fa-star" />
82 - </div>
83 - <span className="text-muted"><small>342 REVIEWS</small></span>
84 - </div>
85 - <div className="mb-lg">
86 - <h3 className="text-success mb-0">69%</h3>
87 - of customers recomend this product
88 - </div>
89 - <Button className="btn-rounded-f" color="success">Write a Review</Button>
90 - </CardBody>
91 - </Card>
92 - <Card className="mb-xlg border-0" style={{ position: 'relative' }}>
93 - <CardImg top width="100%" src={mountainsImg} alt="Card image cap" />
94 - <Badge className="mt-lg fw-thin rounded-0" color="success" style={{ position: 'absolute' }}>New</Badge>
95 - <CardBody>
96 - <CardTitle>Weekly Inspiration</CardTitle>
97 - <hr />
98 - <CardText>
99 - There are at least 109 mountains on Earts with elevations greeter than 7,200 meters
100 - </CardText>
101 - <Button className="border-0" color="default">Read More</Button>
102 - </CardBody>
103 - </Card>
104 - </Col>
105 - <Col xs={12} sm={6} md={4}>
106 - <Card className="border-0">
107 - <CardImg top width="100%" src={reactnativeImg} alt="Card image cap" />
108 - <CardBody>
109 - <small>Technology</small><br />
110 - <CardTitle className="mb mt-xs">
111 - React Native Starter
112 - </CardTitle>
113 - <hr />
114 - <div className="w-100 d-flex justify-content-between align-items-center">
115 - <span className="text-muted fw-semi-bold">from $49.95</span>
116 - <Button color="info">Read more</Button>
117 - </div>
118 - </CardBody>
119 - </Card>
120 - </Col>
121 - </Row>
122 - </div>
123 -);
124 -
125 -export default Cards;
1 -{
2 - "name": "Card",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Card.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - UncontrolledCarousel,
8 -} from 'reactstrap';
9 -
10 -import firstSlide from '../../../../images/slides/1.jpg';
11 -import secondSlide from '../../../../images/slides/2.jpg';
12 -import thirdSlide from '../../../../images/slides/3.jpg';
13 -
14 -const carouselItems = [
15 - { src: firstSlide, caption: '' },
16 - { src: secondSlide, caption: '' },
17 - { src: thirdSlide, caption: '' },
18 -];
19 -
20 -const Carousel = () => (
21 - <div>
22 - <Breadcrumb>
23 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
24 - <BreadcrumbItem active>UI Carousel</BreadcrumbItem>
25 - </Breadcrumb>
26 - <p>
27 - The carousel is a slideshow for cycling through a series of content, built with
28 - CSS 3D transforms and a bit of JavaScript. It works with a series of images, text,
29 - or custom markup. It also includes support for previous/next controls and indicators.
30 - </p>
31 - <Row>
32 - <Col>
33 - <UncontrolledCarousel captionTex={null} items={carouselItems} />
34 - </Col>
35 - </Row>
36 - </div>
37 -);
38 -
39 -export default Carousel;
1 -{
2 - "name": "Carousel",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Carousel.js"
6 -}
This diff could not be displayed because it is too large.
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - :global {
5 - .icon-list {
6 - margin-top: $spacer;
7 - }
8 -
9 - .icon-list-item {
10 - height: 32px;
11 - font-size: 14px;
12 - line-height: 32px;
13 -
14 - > a {
15 - color: $text-color;
16 - text-decoration: none;
17 - }
18 -
19 - .glyphicon,
20 - .fa,
21 - .fi {
22 - width: 32px;
23 - margin-right: 10px;
24 - }
25 -
26 - &:hover {
27 - .glyphicon,
28 - .fa,
29 - .fi {
30 - font-size: 28px;
31 - top: 2px;
32 - }
33 -
34 - .fa,
35 - .fi {
36 - vertical-align: -5px;
37 - }
38 -
39 - .glyphicon {
40 - vertical-align: -6px;
41 - }
42 - }
43 - }
44 - }
45 -}
1 -{
2 - "name": "UIIcons",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Icons.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Button,
8 - Jumbotron,
9 - Container,
10 -} from 'reactstrap';
11 -
12 -const Jumb = () => (
13 - <div>
14 - <Breadcrumb>
15 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
16 - <BreadcrumbItem active>UI Jumbotron</BreadcrumbItem>
17 - </Breadcrumb>
18 - <Jumbotron fluid>
19 - <Container fluid>
20 - <h1 className="display-3">Fluid jumbotron</h1>
21 - <p className="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
22 - </Container>
23 - </Jumbotron>
24 - <Row>
25 - <Col xs={12} md={8}>
26 - <Jumbotron>
27 - <h1 className="display-3">Hello, world!</h1>
28 - <p className="lead">This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.</p>
29 - <hr className="my-2" />
30 - <p>It uses utility classes for typgraphy and spacing to space content out within the larger container.</p>
31 - <p className="lead">
32 - <Button color="primary">Learn More</Button>
33 - </p>
34 - </Jumbotron>
35 - </Col>
36 - </Row>
37 - </div>
38 -);
39 -
40 -export default Jumb;
1 -{
2 - "name": "Jumbotron",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Jumbotron.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row, Col,
4 -} from 'reactstrap';
5 -import { SortableContainer, SortableElement, arrayMove } from 'react-sortable-hoc';
6 -import SortableTree from 'react-sortable-tree';
7 -
8 -import Widget from '../../../../components/Widget';
9 -
10 -import './ListGroups.scss';
11 -
12 -const SortableItem = SortableElement(({ value }) => <li className="list-group-item">
13 - <i className="fa fa-sort" />
14 - <button className="close flex-last ml-auto" data-dismiss="alert">&times;</button>
15 - &nbsp;&nbsp;&nbsp; {value.id} &nbsp;&nbsp;&nbsp;
16 - {value.text}
17 -</li>);
18 -
19 -
20 -const SortableList = SortableContainer(({ items }) => (
21 - <ul className="list-group list-group-sortable mt-xs">
22 - {items.map((value, index) => (
23 - <SortableItem key={`item-${index.toString()}`} index={index} value={value} />
24 - ))}
25 - </ul>
26 - ));
27 -
28 -const NestableItem = SortableElement(({ value }) => {
29 - if (value.children) {
30 - return (
31 - <li className="dd-item">
32 - <div className="dd-handle" data-id={value.id}> {value.text} </div>
33 - <ol className="dd-list">
34 - {value.children.map((child, index) => (
35 - <NestableItem key={`nest-${index.toString()}`} index={index} value={child} />
36 - ))}
37 - </ol>
38 - </li>);
39 - }
40 - return (
41 - <li className="dd-item">
42 - <div className="dd-handle" data-id={value.id}> {value.text} </div>
43 - </li>
44 - );
45 -});
46 -
47 -class ListGroups extends React.Component {
48 -
49 - constructor() {
50 - super();
51 - this.state = {
52 - nestableFirstItems: [{ id: 1, title: 'Item 1' }, {
53 - id: 2,
54 - expanded: true,
55 - title: 'Item 2',
56 - children: [{ id: 3, title: 'Item 3' }, { id: 4, title: 'Item 4' }, {
57 - id: 5,
58 - title: 'Item 5',
59 - expanded: true,
60 - children: [{ id: 6, title: 'Item 6' }, {
61 - id: 7, title: 'Item 7',
62 - }, {
63 - id: 8, title: 'Item 8',
64 - }],
65 - }, { id: 9, title: 'Item 9' }],
66 - }],
67 - nestableSecondItems: [{ id: 13, title: 'Item 13' }, { id: 14, title: 'Item 14' }, {
68 - id: 15,
69 - expanded: true,
70 - title: 'Item 15',
71 - children: [{ id: 16, title: 'Item 16' }, { id: 17, title: 'Item 17' }, {
72 - id: 18, title: 'Item 18',
73 - }],
74 -
75 - }],
76 - sortableList: [{
77 - id: '03', text: ' Barnard\'s Star',
78 - }, {
79 - id: '01', text: 'The Sun',
80 - }, {
81 - id: '04', text: 'Wolf 359',
82 - }, {
83 - id: '02', text: 'Proxima Centauri',
84 - }, {
85 - id: '05', text: 'Lalande 21185',
86 - }],
87 - };
88 - }
89 -
90 - onSortEnd = ({ oldIndex, newIndex }) => {
91 - this.setState({
92 - sortableList: arrayMove(this.state.sortableList, oldIndex, newIndex),
93 - });
94 - };
95 -
96 - render() {
97 - return (
98 - <div>
99 - <ol className="breadcrumb">
100 - <li className="breadcrumb-item">YOU ARE HERE</li>
101 - <li className="breadcrumb-item active">UI List Groups</li>
102 - </ol>
103 - <h1 className="page-title">Lists - <span className="fw-semi-bold">Sortable Groups</span>
104 - </h1>
105 - <Widget
106 - title={<h4> Grouped <span className="fw-semi-bold">Lists</span></h4>}
107 - close refresh settings
108 - >
109 - <h3>Closest <span className="fw-semi-bold">Stars</span></h3>
110 - <p>
111 - Try to play around with this list. Are you ready to pass an exam on astronomy?
112 - </p>
113 -
114 - <SortableList items={this.state.sortableList} onSortEnd={this.onSortEnd} />
115 - </Widget>
116 -
117 - <Widget
118 - title={<h3>Nestable <span className="fw-semi-bold">List</span></h3>}
119 - close refresh settings
120 - >
121 - <p className="fs-mini">
122 - There is a scientific theory that you can arrange this list in such way that there will
123 - be no more saddness
124 - in the whole world. Can you? Touch devices supported
125 - </p>
126 - <Row className="nestable">
127 - <Col md="6" xs="12" className="mb-xs">
128 - <SortableTree
129 - treeData={this.state.nestableFirstItems}
130 - onChange={nestableFirstItems => this.setState({ nestableFirstItems })}
131 - />
132 - </Col>
133 - <Col md="6">
134 - <SortableTree
135 - treeData={this.state.nestableSecondItems}
136 - onChange={nestableSecondItems => this.setState({ nestableSecondItems })}
137 - />
138 - </Col>
139 - </Row>
140 - </Widget>
141 -
142 - </div>
143 - );
144 - }
145 -
146 -}
147 -
148 -export default ListGroups;
1 -@import '../../../../styles/app';
2 -
3 -.list-group-sortable {
4 - > .list-group-item {
5 - margin-bottom: 0;
6 - border-radius: $border-radius;
7 -
8 - + .list-group-item {
9 - margin-top: $spacer;
10 - }
11 - }
12 -
13 - > .list-group-item-placeholder {
14 - border: 1px dashed $gray-300;
15 - background-color: $gray-600;
16 - }
17 -
18 - &:last-of-type > .list-group-item:last-child {
19 - border-bottom: 1px solid $list-group-border-color;
20 - }
21 -}
22 -
23 -.nestable {
24 - min-height: 600px;
25 -}
1 -{
2 - "name": "UIListGroups",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./ListGroups.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Button,
8 - Modal,
9 - ModalHeader,
10 - ModalBody,
11 - ModalFooter,
12 - Container,
13 -} from 'reactstrap';
14 -
15 -import Widget from '../../../../components/Widget';
16 -
17 -class ModalExample extends React.Component {
18 - state = {
19 - demo: false,
20 - verticallyCentered: false,
21 - large: false,
22 - small: false,
23 - launch: false,
24 - }
25 -
26 - toggle(id) {
27 - this.setState(prevState => ({
28 - [id]: !prevState[id],
29 - }));
30 - }
31 -
32 - render() {
33 - const { demo, scrollingLong, large, small, launch } = this.state;
34 - return (
35 - <div>
36 - <Breadcrumb>
37 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
38 - <BreadcrumbItem active>UI Modal</BreadcrumbItem>
39 - </Breadcrumb>
40 - <h1 className="page-title">Modal - <span className="fw-semi-bold">Examples</span></h1>
41 - <Row>
42 - <Col xs={12} md={6}>
43 - <Widget
44 - className="mb-xlg"
45 - title={<h5>Live <span className="fw-semi-bold">Demo</span>
46 - </h5>} close collapse
47 - >
48 - <p>
49 - Toggle a working modal demo by clicking the button below. It
50 - will slide down and fade in from the top of the page.
51 - </p>
52 - <Button className="mr-sm" color="primary" onClick={() => this.toggle('demo')}>Demo</Button>
53 - <Button color="primary" onClick={() => this.toggle('scrollingLong')}>Scrolling long content</Button>
54 - </Widget>
55 - <Widget
56 - title={<h5>Optional <span className="fw-semi-bold">Sizes</span></h5>}
57 - close collapse
58 - >
59 - <p>
60 - Modals have two optional sizes, available via modifier .modal-sm and .modal-lg
61 - classes to be placed on a .modal-dialog. These sizes kick in at certain
62 - breakpoints to avoid horizontal scrollbars on narrower viewports.
63 - </p>
64 - <Button className="mr-sm" color="primary" onClick={() => this.toggle('large')}>Large modal</Button>
65 - <Button color="primary" onClick={() => this.toggle('small')}>Small modal</Button>
66 - </Widget>
67 - </Col>
68 - <Col xs={12} md={6}>
69 - <Widget
70 - className="mb-xlg"
71 - title={<h5>Using <span className="fw-semi-bold">Grid</span> </h5>}
72 - close collapse
73 - >
74 - <p>
75 - Utilize the Bootstrap grid system within a modal by nesting <code>&lt;Container fluid&gt;</code> within
76 - the <code>&lt;ModalBody&gt;</code>. Then, use the normal grid system classes as you would anywhere else.
77 - </p>
78 - <div className="bg-light p-3">
79 - <Button color="primary" onClick={() => this.toggle('launch')}>Launch</Button>
80 - <pre className="bg-light border-0 w-100 h-100">
81 - <code className="text-danger">{'<Container fluid>\n'}</code>
82 - <code className="text-success">{' <Row>\n'}</code>
83 - <code className="text-info">{' <Col md={4}>\n'}</code>
84 - <code>{' .col-md-4\n'}</code>
85 - <code className="text-info">{' </Col>\n'}</code>
86 - <code className="text-info">{' <Col md={4} className="ml-auto">\n'}</code>
87 - <code>{' .col-md-4 .ml-auto\n'}</code>
88 - <code className="text-info">{' </Col>\n'}</code>
89 - <code className="text-success">{' </Row>\n'}</code>
90 - <code className="text-success">{' <Row>\n'}</code>
91 - <code className="text-info">{' <Col md={3} className="ml-auto">\n'}</code>
92 - <code>{' .col-md-3 .ml-auto\n'}</code>
93 - <code className="text-info">{' </Col>\n'}</code>
94 - <code className="text-info">{' <Col md={4} className="ml-auto">\n'}</code>
95 - <code>{' .col-md-4 .ml-auto\n'}</code>
96 - <code className="text-info">{' </Col>\n'}</code>
97 - <code className="text-success">{' </Row>\n'}</code>
98 - <code className="text-success">{' <Row>\n'}</code>
99 - <code className="text-info">{' <Col md={6} className="ml-auto">\n'}</code>
100 - <code>{' .col-md-6 .ml-auto\n'}</code>
101 - <code className="text-info">{' </Col>\n'}</code>
102 - <code className="text-success">{' </Row>\n'}</code>
103 - <code className="text-danger">{'</Container>'}</code>
104 - </pre>
105 - </div>
106 - </Widget>
107 - </Col>
108 - </Row>
109 -
110 - {/* Modals */}
111 - <Modal isOpen={demo} toggle={() => this.toggle('demo')}>
112 - <ModalHeader toggle={() => this.toggle('demo')}>Modal title</ModalHeader>
113 - <ModalBody className="bg-white">
114 - ...
115 - </ModalBody>
116 - <ModalFooter>
117 - <Button color="secondary" onClick={() => this.toggle('demo')}>Close</Button>
118 - <Button color="primary">Save changes</Button>
119 - </ModalFooter>
120 - </Modal>
121 -
122 - <Modal isOpen={scrollingLong} toggle={() => this.toggle('scrollingLong')}>
123 - <ModalHeader toggle={() => this.toggle('scrollingLong')}>Long content</ModalHeader>
124 - <ModalBody className="bg-white">
125 - <p>
126 - Lorem Ipsum is simply dummy text of the printing and typesetting industry.
127 - Lorem Ipsum has been the industry&apos;s standard dummy text ever since the 1500s,
128 - when an unknown printer took a galley of type and scrambled it to make a type
129 - specimen book. It has survived not only five centuries, but also the leap
130 - into electronic typesetting, remaining essentially unchanged. It was popularised
131 - in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
132 - and more recently with desktop publishing software like Aldus PageMaker including
133 - versions of Lorem Ipsum.
134 - </p>
135 - <p>
136 - Lorem Ipsum is simply dummy text of the printing and typesetting industry.
137 - Lorem Ipsum has been the industry&apos;s standard dummy text ever since the 1500s,
138 - when an unknown printer took a galley of type and scrambled it to make a type
139 - specimen book. It has survived not only five centuries, but also the leap
140 - into electronic typesetting, remaining essentially unchanged. It was popularised
141 - in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
142 - and more recently with desktop publishing software like Aldus PageMaker including
143 - versions of Lorem Ipsum.
144 - </p>
145 - <p>
146 - Lorem Ipsum is simply dummy text of the printing and typesetting industry.
147 - Lorem Ipsum has been the industry&apos;s standard dummy text ever since the 1500s,
148 - when an unknown printer took a galley of type and scrambled it to make a type
149 - specimen book. It has survived not only five centuries, but also the leap
150 - into electronic typesetting, remaining essentially unchanged. It was popularised
151 - in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
152 - and more recently with desktop publishing software like Aldus PageMaker including
153 - versions of Lorem Ipsum.
154 - </p>
155 - <p>
156 - Lorem Ipsum is simply dummy text of the printing and typesetting industry.
157 - Lorem Ipsum has been the industry&apos;s standard dummy text ever since the 1500s,
158 - when an unknown printer took a galley of type and scrambled it to make a type
159 - specimen book. It has survived not only five centuries, but also the leap
160 - into electronic typesetting, remaining essentially unchanged. It was popularised
161 - in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
162 - and more recently with desktop publishing software like Aldus PageMaker including
163 - versions of Lorem Ipsum.
164 - </p>
165 - <p>
166 - Lorem Ipsum is simply dummy text of the printing and typesetting industry.
167 - Lorem Ipsum has been the industry&apos;s standard dummy text ever since the 1500s,
168 - when an unknown printer took a galley of type and scrambled it to make a type
169 - specimen book. It has survived not only five centuries, but also the leap
170 - into electronic typesetting, remaining essentially unchanged. It was popularised
171 - in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
172 - and more recently with desktop publishing software like Aldus PageMaker including
173 - versions of Lorem Ipsum.
174 - </p>
175 - </ModalBody>
176 - <ModalFooter>
177 - <Button color="secondary" onClick={() => this.toggle('scrollingLong')}>Close</Button>
178 - <Button color="primary">Save changes</Button>
179 - </ModalFooter>
180 - </Modal>
181 -
182 - <Modal size="lg" isOpen={large} toggle={() => this.toggle('large')}>
183 - <ModalHeader toggle={() => this.toggle('large')}>Large modal</ModalHeader>
184 - <ModalBody className="bg-white">
185 - Lorem ipsum dolor sit amet consectetur adipisicing elit. In, illum harum?
186 - Quidem, quisquam, natus repellat debitis veniam quia facilis magni tempora
187 - cupiditate odio vitae? Eligendi nisi consequuntur vero tenetur nemo!
188 - </ModalBody>
189 - <ModalFooter>
190 - <Button color="secondary" onClick={() => this.toggle('large')}>Close</Button>
191 - <Button color="primary">Save changes</Button>
192 - </ModalFooter>
193 - </Modal>
194 -
195 - <Modal size="sm" isOpen={small} toggle={() => this.toggle('small')}>
196 - <ModalHeader toggle={() => this.toggle('small')}>Small modal</ModalHeader>
197 - <ModalBody className="bg-white">
198 - Lorem ipsum dolor sit amet consectetur adipisicing elit. In, illum harum?
199 - Quidem, quisquam, natus repellat debitis veniam quia facilis magni tempora
200 - cupiditate odio vitae? Eligendi nisi consequuntur vero tenetur nemo!
201 - </ModalBody>
202 - <ModalFooter>
203 - <Button color="secondary" onClick={() => this.toggle('small')}>Close</Button>
204 - <Button color="primary">Save changes</Button>
205 - </ModalFooter>
206 - </Modal>
207 -
208 - <Modal isOpen={launch} toggle={() => this.toggle('launch')}>
209 - <ModalHeader toggle={() => this.toggle('launch')}>Small modal</ModalHeader>
210 - <ModalBody className="bg-white text-white">
211 - <Container fluid>
212 - <Row>
213 - <Col md={4}><div className="h-100 w-100 bg-primary p-2">.col-md-4</div></Col>
214 - <Col md={4} className="ml-auto"><div className="h-100 w-100 bg-primary p-2">.col-md-4 .ml-auto</div></Col>
215 - </Row>
216 - <Row className="mt-sm">
217 - <Col md={3} className="ml-auto"><div className="h-100 w-100 bg-primary p-2">.col-md-3 .ml-auto</div></Col>
218 - <Col md={4} className="ml-auto"><div className="h-100 w-100 bg-primary p-2">.col-md-4 .ml-auto</div></Col>
219 - </Row>
220 - <Row className="mt-sm">
221 - <Col md={6} className="ml-auto"><div className="h-100 w-100 bg-primary p-2">.col-md-6 .ml-auto</div></Col>
222 - </Row>
223 - </Container>
224 - </ModalBody>
225 - <ModalFooter>
226 - <Button color="secondary" onClick={() => this.toggle('launch')}>Close</Button>
227 - <Button color="primary">Save changes</Button>
228 - </ModalFooter>
229 - </Modal>
230 - </div>
231 - );
232 - }
233 -}
234 -
235 -
236 -export default ModalExample;
1 -{
2 - "name": "Modal",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Modal.js"
6 -}
1 -import React, { Component } from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Nav,
8 - NavItem,
9 - NavLink,
10 - Dropdown,
11 - DropdownToggle,
12 - DropdownMenu,
13 - DropdownItem,
14 -} from 'reactstrap';
15 -
16 -import Widget from '../../../../components/Widget';
17 -
18 -class NavExamples extends Component {
19 - state = {
20 - isDropdownOpened: false,
21 - };
22 -
23 - toggleDropdown = () => {
24 - this.setState(prevState => ({
25 - isDropdownOpened: !prevState.isDropdownOpened,
26 - }));
27 - }
28 -
29 - render() {
30 - return (
31 - <div>
32 - <Breadcrumb>
33 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
34 - <BreadcrumbItem active>UI Nav</BreadcrumbItem>
35 - </Breadcrumb>
36 - <Row>
37 - <Col xs={12} md={6}>
38 - <Widget
39 - title={<h5>Base <span className="fw-semi-bold">Nav</span></h5>}
40 - close collapse
41 - >
42 - <p>
43 - Navigation available in Bootstrap share general markup and styles,
44 - from the base .nav class to the active and disabled states. Swap
45 - modifier classes to switch between each style.
46 - </p>
47 - <div className="bg-light p-3">
48 - <Nav>
49 - <NavItem>
50 - <NavLink href="#">Link</NavLink>
51 - </NavItem>
52 - <NavItem>
53 - <NavLink href="#">Link</NavLink>
54 - </NavItem>
55 - <NavItem>
56 - <NavLink href="#">Another Link</NavLink>
57 - </NavItem>
58 - <NavItem>
59 - <NavLink disabled href="#">Disabled Link</NavLink>
60 - </NavItem>
61 - </Nav>
62 - <pre className="bg-light border-0 w-100 h-100">
63 - <code className="text-danger">{'<Nav>\n'}</code>
64 - <code className="text-info">{' <NavItem>\n'}</code>
65 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
66 - <code>{' Link\n'}</code>
67 - <code className="text-warning">{' </NavLink>\n'}</code>
68 - <code className="text-info">{' </NavItem>\n'}</code>
69 -
70 - <code className="text-info">{' <NavItem>\n'}</code>
71 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
72 - <code>{' Link\n'}</code>
73 - <code className="text-warning">{' </NavLink>\n'}</code>
74 - <code className="text-info">{' </NavItem>\n'}</code>
75 -
76 - <code className="text-info">{' <NavItem>\n'}</code>
77 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
78 - <code>{' Another Link\n'}</code>
79 - <code className="text-warning">{' </NavLink>\n'}</code>
80 - <code className="text-info">{' </NavItem>\n'}</code>
81 -
82 - <code className="text-info">{' <NavItem>\n'}</code>
83 - <code className="text-warning">{' <NavLink disabled href="#">\n'}</code>
84 - <code>{' Disabled Link\n'}</code>
85 - <code className="text-warning">{' </NavLink>\n'}</code>
86 - <code className="text-info">{' </NavItem>\n'}</code>
87 - <code className="text-danger">{'</Nav>'}</code>
88 - </pre>
89 - </div>
90 - <h5 className="mt">With dropdown</h5>
91 - <Nav className="bg-light p-2">
92 - <NavItem>
93 - <NavLink href="#">Link</NavLink>
94 - </NavItem>
95 - <Dropdown isOpen={this.state.isDropdownOpened} toggle={this.toggleDropdown}>
96 - <DropdownToggle nav caret>
97 - Dropdown
98 - </DropdownToggle>
99 - <DropdownMenu>
100 - <DropdownItem header>Header</DropdownItem>
101 - <DropdownItem disabled>Action</DropdownItem>
102 - <DropdownItem>Another Action</DropdownItem>
103 - <DropdownItem divider />
104 - <DropdownItem>Another Action</DropdownItem>
105 - </DropdownMenu>
106 - </Dropdown>
107 - <NavItem>
108 - <NavLink href="#">Another Link</NavLink>
109 - </NavItem>
110 - <NavItem>
111 - <NavLink disabled href="#">Disabled Link</NavLink>
112 - </NavItem>
113 - </Nav>
114 - </Widget>
115 - </Col>
116 - <Col xs={12} md={6}>
117 - <Widget
118 - title={<h5>Tabs & Pills</h5>}
119 - close collapse
120 - >
121 - <p>
122 - Takes the basic <code>&lt;Nav&gt;</code> from above and adds the <code>tabs</code> property to generate a
123 - tabbed interface. Use them to create tabbable regions with our tab
124 - JavaScript plugin.
125 - </p>
126 - <div className="bg-light p-3">
127 - <Nav tabs>
128 - <NavItem>
129 - <NavLink href="#" active>Link</NavLink>
130 - </NavItem>
131 - <NavItem>
132 - <NavLink href="#">Link</NavLink>
133 - </NavItem>
134 - <NavItem>
135 - <NavLink href="#">Another Link</NavLink>
136 - </NavItem>
137 - <NavItem>
138 - <NavLink disabled href="#">Disabled Link</NavLink>
139 - </NavItem>
140 - </Nav>
141 - <pre className="bg-light border-0 w-100 h-100">
142 - <code className="text-danger">{'<Nav tabs>\n'}</code>
143 - <code className="text-info">{' <NavItem>\n'}</code>
144 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
145 - <code>{' Link\n'}</code>
146 - <code className="text-warning">{' </NavLink>\n'}</code>
147 - <code className="text-info">{' </NavItem>\n'}</code>
148 -
149 - <code className="text-info">{' <NavItem>\n'}</code>
150 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
151 - <code>{' Link\n'}</code>
152 - <code className="text-warning">{' </NavLink>\n'}</code>
153 - <code className="text-info">{' </NavItem>\n'}</code>
154 -
155 - <code className="text-info">{' <NavItem>\n'}</code>
156 - <code className="text-warning">{' <NavLink href="#">\n'}</code>
157 - <code>{' Another Link\n'}</code>
158 - <code className="text-warning">{' </NavLink>\n'}</code>
159 - <code className="text-info">{' </NavItem>\n'}</code>
160 -
161 - <code className="text-info">{' <NavItem>\n'}</code>
162 - <code className="text-warning">{' <NavLink disabled href="#">\n'}</code>
163 - <code>{' Disabled Link\n'}</code>
164 - <code className="text-warning">{' </NavLink>\n'}</code>
165 - <code className="text-info">{' </NavItem>\n'}</code>
166 - <code className="text-danger">{'</Nav>'}</code>
167 - </pre>
168 - </div>
169 - <p className="mt">Do the same thing with the <code>pills</code> property.</p>
170 - <div className="bg-light p-3">
171 - <Nav pills>
172 - <NavItem>
173 - <NavLink href="#" active>Link</NavLink>
174 - </NavItem>
175 - <NavItem>
176 - <NavLink href="#">Link</NavLink>
177 - </NavItem>
178 - <NavItem>
179 - <NavLink href="#">Another Link</NavLink>
180 - </NavItem>
181 - <NavItem>
182 - <NavLink disabled href="#">Disabled Link</NavLink>
183 - </NavItem>
184 - </Nav>
185 - </div>
186 - </Widget>
187 - </Col>
188 - </Row>
189 - </div>
190 - );
191 - }
192 -}
193 -
194 -export default NavExamples;
1 -{
2 - "name": "Nav",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Nav.js"
6 -}
1 -import React, { Component } from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Navbar,
8 - NavbarBrand,
9 - NavbarToggler,
10 - Collapse,
11 - Nav,
12 - NavItem,
13 - NavLink,
14 -} from 'reactstrap';
15 -
16 -import Widget from '../../../../components/Widget';
17 -
18 -class NavbarExamples extends Component {
19 - state = {
20 - navs: [false, false, false, false],
21 - }
22 -
23 - toggle(id) {
24 - const newState = Array(4).fill(false);
25 -
26 - if (!this.state.navs[id]) {
27 - newState[id] = true;
28 - }
29 -
30 - this.setState({ navs: newState });
31 - }
32 - render() {
33 - return (
34 - <div>
35 - <Breadcrumb>
36 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
37 - <BreadcrumbItem active>UI Navbar</BreadcrumbItem>
38 - </Breadcrumb>
39 - <Row>
40 - <Col xs={12} md={9}>
41 - <Widget
42 - title={<h5>Navbar <span className="fw-semi-bold">Example</span></h5>}
43 - close collapse
44 - >
45 - <p>Heres what you need to know before getting started with the navbar:</p>
46 - <ui>
47 - <li>Navbars require a wrapping <code>&lt;Navbar&gt;</code> with <code>expand=&quot;*&quot;</code> for
48 - responsive collapsing and color scheme classes.</li>
49 - <li>Navbars and their contents are fluid by default. Use optional containers
50 - to limit their horizontal width.</li>
51 - <li>Use our spacing and flex utility classes for controlling spacing and alignment within navbars.</li>
52 - <li>Navbars are responsive by default, but you can easily modify them to change that. Responsive
53 - behavior depends on our Collapse JavaScript plugin.</li>
54 - <li>Navbars are hidden by default when printing. Force them to be printed by adding <code>.d-print</code>
55 - to the <code>.navbar</code>. See the display utility class.</li>
56 - </ui>
57 - <Navbar className="px-2 mt-lg" color="light" light expand="md">
58 - <NavbarBrand href="/">Navbar</NavbarBrand>
59 - <NavbarToggler className="ml-auto" onClick={() => this.toggle(0)} />
60 - <Collapse isOpen={this.state.navs[0]} navbar>
61 - <Nav className="ml-auto" navbar>
62 - <NavItem>
63 - <NavLink>Home</NavLink>
64 - </NavItem>
65 - <NavItem>
66 - <NavLink>Features</NavLink>
67 - </NavItem>
68 - <NavItem>
69 - <NavLink>Pricing</NavLink>
70 - </NavItem>
71 - <NavItem>
72 - <NavLink disabled>Disabled</NavLink>
73 - </NavItem>
74 - </Nav>
75 - </Collapse>
76 - </Navbar>
77 - </Widget>
78 - </Col>
79 - <Col xs={12} md={9}>
80 - <Widget
81 - title={<h5>Navbar <span className="fw-semi-bold">Example</span></h5>}
82 - close collapse
83 - >
84 - <p>Theming the navbar has never been easier thanks to the combination of
85 - theming classes and background-color utilities. Choose from <code>color=&quot;light&quot;</code>
86 - for use with light background colors, or <code>color=&quot;dark&quot;</code> for dark background
87 - colors. Then, customize with <code>.bg-*</code> utilities.</p>
88 - <Navbar className="px-2 mt-lg" color="dark" dark expand="md">
89 - <NavbarBrand href="/">Navbar</NavbarBrand>
90 - <NavbarToggler className="ml-auto" onClick={() => this.toggle(1)} />
91 - <Collapse isOpen={this.state.navs[1]} navbar>
92 - <Nav className="ml-auto" navbar>
93 - <NavItem>
94 - <NavLink>Home</NavLink>
95 - </NavItem>
96 - <NavItem>
97 - <NavLink>Features</NavLink>
98 - </NavItem>
99 - <NavItem>
100 - <NavLink>Pricing</NavLink>
101 - </NavItem>
102 - <NavItem>
103 - <NavLink disabled>Disabled</NavLink>
104 - </NavItem>
105 - </Nav>
106 - </Collapse>
107 - </Navbar>
108 - <Navbar className="px-2 mt-lg" color="primary" dark expand="md">
109 - <NavbarBrand href="/">Navbar</NavbarBrand>
110 - <NavbarToggler className="ml-auto" onClick={() => this.toggle(2)} />
111 - <Collapse isOpen={this.state.navs[2]} navbar>
112 - <Nav className="ml-auto" navbar>
113 - <NavItem>
114 - <NavLink>Home</NavLink>
115 - </NavItem>
116 - <NavItem>
117 - <NavLink>Features</NavLink>
118 - </NavItem>
119 - <NavItem>
120 - <NavLink>Pricing</NavLink>
121 - </NavItem>
122 - <NavItem>
123 - <NavLink disabled>Disabled</NavLink>
124 - </NavItem>
125 - </Nav>
126 - </Collapse>
127 - </Navbar>
128 - <Navbar className="px-2 mt-lg" color="light" light expand="md">
129 - <NavbarBrand href="/">Navbar</NavbarBrand>
130 - <NavbarToggler className="ml-auto" onClick={() => this.toggle(3)} />
131 - <Collapse isOpen={this.state.navs[3]} navbar>
132 - <Nav className="ml-auto" navbar>
133 - <NavItem>
134 - <NavLink>Home</NavLink>
135 - </NavItem>
136 - <NavItem>
137 - <NavLink>Features</NavLink>
138 - </NavItem>
139 - <NavItem>
140 - <NavLink>Pricing</NavLink>
141 - </NavItem>
142 - <NavItem>
143 - <NavLink disabled>Disabled</NavLink>
144 - </NavItem>
145 - </Nav>
146 - </Collapse>
147 - </Navbar>
148 - </Widget>
149 - </Col>
150 - </Row>
151 - </div>
152 - );
153 - }
154 -}
155 -
156 -export default NavbarExamples;
1 -{
2 - "name": "Navbar",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Navbar.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row, Col, Button,
4 -} from 'reactstrap';
5 -/* eslint-disable */
6 -import 'imports-loader?$=jquery,this=>window!messenger/build/js/messenger';
7 -/* eslint-enable */
8 -
9 -import Widget from '../../../../components/Widget';
10 -import s from './Notifications.module.scss';
11 -
12 -// todo @franckeeva what about server side rendering? this will fail unless launched as lazy route
13 -const Messenger = window.Messenger;
14 -
15 -/* eslint-disable */
16 -function initializationMessengerCode() {
17 - (function () {
18 - let $,
19 - FlatMessage,
20 - spinner_template,
21 - __hasProp = {}.hasOwnProperty,
22 - __extends = function (child, parent) {
23 - for (const key in parent) {
24 - if (__hasProp.call(parent, key)) child[key] = parent[key];
25 - }
26 -
27 - function ctor() {
28 - this.constructor = child;
29 - }
30 -
31 - ctor.prototype = parent.prototype;
32 - child.prototype = new ctor();
33 - child.__super__ = parent.prototype;
34 - return child;
35 - };
36 -
37 - $ = jQuery;
38 -
39 - spinner_template = '<div class="messenger-spinner">\n <span class="messenger-spinner-side messenger-spinner-side-left">\n <span class="messenger-spinner-fill"></span>\n </span>\n <span class="messenger-spinner-side messenger-spinner-side-right">\n <span class="messenger-spinner-fill"></span>\n </span>\n</div>';
40 -
41 - FlatMessage = (function (_super) {
42 - __extends(FlatMessage, _super);
43 -
44 - function FlatMessage() {
45 - return FlatMessage.__super__.constructor.apply(this, arguments);
46 - }
47 -
48 - FlatMessage.prototype.template = function (opts) {
49 - let $message;
50 - $message = FlatMessage.__super__.template.apply(this, arguments);
51 - $message.append($(spinner_template));
52 - return $message;
53 - };
54 -
55 - return FlatMessage;
56 - }(Messenger.Message));
57 -
58 - Messenger.themes.air = {
59 - Message: FlatMessage,
60 - };
61 - }).call(window);
62 -}
63 -/* eslint-enable */
64 -
65 -class Notifications extends React.Component {
66 - constructor() {
67 - super();
68 - this.addSuccessNotification = this.addSuccessNotification.bind(this);
69 - this.addInfoNotification = this.addInfoNotification.bind(this);
70 - this.addErrorNotification = this.addErrorNotification.bind(this);
71 - this.toggleLocation = this.toggleLocation.bind(this);
72 - this.state = {
73 - locationClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
74 - };
75 - }
76 -
77 -
78 - componentDidMount() {
79 - initializationMessengerCode();
80 - Messenger.options = {
81 - extraClasses: this.state.locationClasses,
82 - theme: 'air',
83 - };
84 - Messenger().post('Thanks for checking out Messenger!');
85 - }
86 -
87 - addSuccessNotification() {
88 - Messenger().post({
89 - extraClasses: this.state.locationClasses,
90 - message: 'Showing success message was successful!',
91 - type: 'success',
92 - showCloseButton: true,
93 - });
94 - return false;
95 - }
96 -
97 - addInfoNotification() {
98 - const msg = Messenger().post({
99 - extraClasses: this.state.locationClasses,
100 - message: 'Launching thermonuclear war...',
101 - actions: {
102 - cancel: {
103 - label: 'cancel launch',
104 - action: () => msg.update({
105 - message: 'Thermonuclear war averted', type: 'success', actions: false,
106 - }),
107 - },
108 - },
109 - });
110 -
111 - return false;
112 - }
113 -
114 - addErrorNotification() {
115 - let i = 0;
116 - Messenger().run({
117 - errorMessage: 'Error destroying alien planet',
118 - successMessage: 'Alien planet destroyed!',
119 - extraClasses: this.state.locationClasses,
120 - action(opts) {
121 - /* eslint-disable */
122 - if (++i < 3) {
123 - return opts.error({
124 - status: 500,
125 - readyState: 0,
126 - responseText: 0,
127 - });
128 - }
129 - /* eslint-enable */
130 - return opts.success();
131 - },
132 - });
133 - }
134 -
135 - toggleLocation(vertical = 'top', horizontal = '') {
136 - let className = `messenger-fixed messenger-on-${vertical}`;
137 - className += (horizontal === '') ? '' : ` messenger-on-${horizontal}`;
138 - this.setState({
139 - locationClasses: className,
140 - });
141 - Messenger.options = {
142 - extraClasses: className,
143 - theme: 'air',
144 - };
145 - Messenger();
146 - }
147 -
148 - render() {
149 - return (
150 - <div className={s.root}>
151 - <ol className="breadcrumb">
152 - <li className="breadcrumb-item">YOU ARE HERE</li>
153 - <li className="breadcrumb-item active">UI Notifications</li>
154 - </ol>
155 - <h1 className="page-title">Messages - <span className="fw-semi-bold">Notifications</span>
156 - </h1>
157 -
158 - <Widget title={<h6> Messenger </h6>} close collapse settings>
159 - <Row>
160 - <Col lg="4" xs="12">
161 - <h5 className="m-t-1">Layout options</h5>
162 - <p>There are few position options available for notifications. You can click any of
163 - them
164 - to change notifications position:</p>
165 - <div className="location-selector">
166 - { /* eslint-disable */}
167 - <div
168 - className="bit top left" onClick={() => {
169 - this.toggleLocation('top', 'left');
170 - }}
171 - />
172 - <div
173 - className="bit top right" onClick={() => {
174 - this.toggleLocation('top', 'right');
175 - }}
176 - />
177 - <div
178 - className="bit top" onClick={() => {
179 - this.toggleLocation('top', '');
180 - }}
181 - />
182 - <div
183 - className="bit bottom left" onClick={() => {
184 - this.toggleLocation('bottom', 'left');
185 - }}
186 - />
187 - <div
188 - className="bit bottom right" onClick={() => {
189 - this.toggleLocation('bottom', 'right');
190 - }}
191 - />
192 - <div
193 - className="bit bottom" onClick={() => {
194 - this.toggleLocation('bottom', '');
195 - }}
196 - />
197 - { /* eslint-enable */}
198 - </div>
199 - </Col>
200 -
201 - <Col lg="4" xs="12">
202 - <h5 className="m-t-1">Notification Types</h5>
203 - <p>Different types of notifications for lost of use cases. Custom classes are also
204 - supported.</p>
205 - <p><Button color="info" id="show-info-message" onClick={this.addInfoNotification}>Info
206 - Message</Button></p>
207 - <p><Button color="danger" id="show-error-message" onClick={this.addErrorNotification}>Error
208 - + Retry Message</Button></p>
209 - <p><Button
210 - color="success" id="show-success-message" onClick={this.addSuccessNotification}
211 - >Success
212 - Message</Button></p>
213 - </Col>
214 -
215 - <Col lg="4" xs="12">
216 - <h5 className="m-t-1">Dead Simple Usage</h5>
217 - <p>Just few lines of code to instantiate a notifications object. Does not require
218 - passing any options:</p>
219 - <pre><code>{'Messenger().post("Thanks for checking out Messenger!");'}</code></pre>
220 - <p>More complex example:</p>
221 - <pre>
222 - <code>{'\nMessenger().post({\n message: \'There was an explosion while processing your request.\',\n type: \'error\',\n showCloseButton: true\n});\n\n'}
223 - </code>
224 - </pre>
225 - </Col>
226 - </Row>
227 - </Widget>
228 - </div>
229 - );
230 - }
231 -}
232 -
233 -export default Notifications;
1 -@import '../../../../styles/app';
2 -
3 -.root {
4 - :global {
5 - .location-selector {
6 - width: 100%;
7 - height: 220px;
8 - border: 1px dashed #bbb;
9 - background-color: $white;
10 - position: relative;
11 - }
12 -
13 - .location-selector .bit {
14 - @include transition(background-color 0.15s ease-in-out);
15 -
16 - background-color: $gray-300;
17 - cursor: pointer;
18 - position: absolute;
19 - }
20 -
21 - .location-selector .bit:hover {
22 - background-color: $gray-400;
23 - }
24 -
25 - .location-selector .bit.top,
26 - .location-selector .bit.bottom {
27 - height: 25%;
28 - width: 40%;
29 - margin: 0 30%;
30 - }
31 -
32 - .location-selector .bit.top {
33 - top: 0;
34 - }
35 -
36 - .location-selector .bit.bottom {
37 - bottom: 0;
38 - }
39 -
40 - .location-selector .bit.right,
41 - .location-selector .bit.left {
42 - height: 20%;
43 - width: 20%;
44 - margin-left: 0;
45 - margin-right: 0;
46 - }
47 -
48 - .location-selector .bit.right {
49 - right: 0;
50 - }
51 -
52 - .location-selector .bit.left {
53 - left: 0;
54 - }
55 - }
56 -}
1 -{
2 - "name": "UINotifications",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Notifications.js"
6 -}
1 -import React, { Component } from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Button,
8 - Popover,
9 - PopoverHeader,
10 - PopoverBody,
11 - Tooltip,
12 -} from 'reactstrap';
13 -
14 -import Widget from '../../../../components/Widget';
15 -
16 -class PopoverExamples extends Component {
17 - state = {
18 - tooltips: [false, false, false, false, false, false],
19 - popovers: [false, false, false, false, false, false],
20 - tooltipOpen: false,
21 - }
22 -
23 - toggle(id, field) {
24 - const newState = [...this.state[field]];
25 - newState.fill(false);
26 -
27 - if (!this.state[field][id]) {
28 - newState[id] = true;
29 - }
30 -
31 - this.setState({
32 - [field]: newState,
33 - });
34 - }
35 -
36 - render() {
37 - return (
38 - <div>
39 - <Breadcrumb>
40 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
41 - <BreadcrumbItem active>UI Badge</BreadcrumbItem>
42 - </Breadcrumb>
43 - <h1 className="page-title">Badge</h1>
44 - <Row>
45 - <Col xs={12} md={6}>
46 - <Widget
47 - className="mb-xlg"
48 - title={<h5>Popover <span className="fw-semi-bold">Example</span></h5>}
49 - close collapse
50 - >
51 - <Button
52 - id="p-1" className="mr-xs" size="lg" color="danger"
53 - onClick={() => this.toggle(0, 'popovers')}
54 - >Click to toggle popover</Button>
55 - <Button
56 - id="p-2" color="danger" disabled
57 - onClick={() => this.toggle(1, 'popovers')}
58 - >Disabled button</Button>
59 - </Widget>
60 - <Widget
61 - title={<h5>Popover <span className="fw-semi-bold">Directions</span></h5>}
62 - close collapse
63 - >
64 - <Button
65 - id="p-3" className="mr-xs mb-xs" color="info"
66 - onClick={() => this.toggle(2, 'popovers')}
67 - >Popover on top</Button>
68 - <Button
69 - id="p-4" className="mr-xs mb-xs" color="warning"
70 - onClick={() => this.toggle(3, 'popovers')}
71 - >Popover on right</Button>
72 - <Button
73 - id="p-5" className="mr-xs mb-xs" color="inverse"
74 - onClick={() => this.toggle(4, 'popovers')}
75 - >Popover on bottom</Button>
76 - <Button
77 - id="p-6" className="mr-xs mb-xs" color="default"
78 - onClick={() => this.toggle(5, 'popovers')}
79 - >Popover on left</Button>
80 - </Widget>
81 - </Col>
82 - <Col xs={12} md={6}>
83 - <Widget
84 - className="mb-xlg"
85 - title={<h5>Tooltip <span className="fw-semi-bold">Example</span></h5>}
86 - close collapse
87 - >
88 - <Button id="t-1" className="mr-sm" size="lg" color="success">Tooltip</Button>
89 - <Button id="t-2" color="success" disabled>Disabled button</Button>
90 - </Widget>
91 - <Widget
92 - title={<h5>Tooltip <span className="fw-semi-bold">Directions</span></h5>}
93 - close collapse
94 - >
95 - <Button id="t-3" className="mr-xs mb-xs" color="info">Tooltip on top</Button>
96 - <Button id="t-4" className="mr-xs mb-xs" color="warning">Tooltip on right</Button>
97 - <Button id="t-5" className="mr-xs mb-xs" color="inverse">Tooltip on bottom</Button>
98 - <Button id="t-6" className="mr-xs mb-xs" color="default">Tooltip on left</Button>
99 - </Widget>
100 - </Col>
101 - </Row>
102 -
103 - {/* Popovers & Tooltips */}
104 -
105 - <Popover placement="top" isOpen={this.state.popovers[0]} target="p-1" toggle={() => this.toggle(0, 'popovers')}>
106 - <PopoverHeader>Popover Title</PopoverHeader>
107 - <PopoverBody>
108 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
109 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
110 - </PopoverBody>
111 - </Popover>
112 - <Popover placement="top" isOpen={this.state.popovers[1]} target="p-2" toggle={() => this.toggle(1, 'popovers')}>
113 - <PopoverHeader>Popover Title</PopoverHeader>
114 - <PopoverBody>
115 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
116 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
117 - </PopoverBody>
118 - </Popover>
119 - <Popover placement="top" isOpen={this.state.popovers[2]} target="p-3" toggle={() => this.toggle(2, 'popovers')}>
120 - <PopoverHeader>Popover Title</PopoverHeader>
121 - <PopoverBody>
122 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
123 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
124 - </PopoverBody>
125 - </Popover>
126 - <Popover placement="right" isOpen={this.state.popovers[3]} target="p-4" toggle={() => this.toggle(3, 'popovers')}>
127 - <PopoverHeader>Popover Title</PopoverHeader>
128 - <PopoverBody>
129 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
130 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
131 - </PopoverBody>
132 - </Popover>
133 - <Popover placement="bottom" isOpen={this.state.popovers[4]} target="p-5" toggle={() => this.toggle(4, 'popovers')}>
134 - <PopoverHeader>Popover Title</PopoverHeader>
135 - <PopoverBody>
136 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
137 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
138 - </PopoverBody>
139 - </Popover>
140 - <Popover placement="left" isOpen={this.state.popovers[5]} target="p-6" toggle={() => this.toggle(5, 'popovers')}>
141 - <PopoverHeader>Popover Title</PopoverHeader>
142 - <PopoverBody>
143 - Sed posuere consectetur est at lobortis. Aenean eu leo quam.
144 - Pellentesque ornare sem lacinia quam venenatis vestibulum.
145 - </PopoverBody>
146 - </Popover>
147 -
148 - <Tooltip placement="top" isOpen={this.state.tooltips[0]} toggle={() => this.toggle(0, 'tooltips')} target="t-1">
149 - Hello world!
150 - </Tooltip>
151 - <Tooltip placement="top" isOpen={this.state.tooltips[1]} toggle={() => this.toggle(1, 'tooltips')} target="t-2">
152 - Hello world!
153 - </Tooltip>
154 - <Tooltip placement="top" isOpen={this.state.tooltips[2]} toggle={() => this.toggle(2, 'tooltips')} target="t-3">
155 - Top
156 - </Tooltip>
157 - <Tooltip placement="right" isOpen={this.state.tooltips[3]} toggle={() => this.toggle(3, 'tooltips')} target="t-4">
158 - Right
159 - </Tooltip>
160 - <Tooltip placement="bottom" isOpen={this.state.tooltips[4]} toggle={() => this.toggle(4, 'tooltips')} target="t-5">
161 - Bottom
162 - </Tooltip>
163 - <Tooltip placement="left" isOpen={this.state.tooltips[5]} toggle={() => this.toggle(5, 'tooltips')} target="t-6">
164 - Left
165 - </Tooltip>
166 - </div>
167 - );
168 - }
169 -}
170 -
171 -export default PopoverExamples;
1 -{
2 - "name": "Popovers",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Popovers.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Breadcrumb,
6 - BreadcrumbItem,
7 - Progress,
8 -} from 'reactstrap';
9 -
10 -import Widget from '../../../../components/Widget';
11 -
12 -const ProgressExamples = () => (
13 - <div>
14 - <Breadcrumb>
15 - <BreadcrumbItem>YOU ARE HERE</BreadcrumbItem>
16 - <BreadcrumbItem active>UI Progress</BreadcrumbItem>
17 - </Breadcrumb>
18 - <h1 className="page-title">Progress</h1>
19 - <Row>
20 - <Col xs={12} md={6}>
21 - <Widget
22 - title={<h5>Progress <span className="fw-semi-bold">Example</span></h5>}
23 - close collapse
24 - >
25 - <p>
26 - Badges scale to match the size of the immediate parent element by
27 - using relative font sizing and em units.
28 - </p>
29 - <Progress className="mb-sm" value="25" />
30 - <Progress className="mb-sm" value="50" />
31 - <Progress className="mb-sm" value="75" />
32 - <Progress value="100" />
33 - </Widget>
34 - </Col>
35 - <Col xs={12} md={6}>
36 - <Widget
37 - title={<h5>Backgrounds</h5>}
38 - close collaple
39 - >
40 - <p>
41 - Use background utility classes to change the appearance of
42 - individual progress bars.
43 - </p>
44 - <Progress className="mb-sm" value="25" color="info" />
45 - <Progress className="mb-sm" value="50" color="warning" />
46 - <Progress className="mb-sm" value="75" color="danger" />
47 - <Progress value="100" color="success" />
48 - </Widget>
49 - </Col>
50 - <Col xs={12} md={6}>
51 - <Widget
52 - title={<h5>Labels</h5>}
53 - close collapse
54 - >
55 - <p>
56 - Add labels to your progress bars by placing text within the <code>&lt;Progress&gt;</code>
57 - </p>
58 - <Progress className="mb-sm" value="25">25%</Progress>
59 - <Progress className="mb-sm" value="100" color="danger">Something was wrong!</Progress>
60 - <Progress value="100" color="success">Completed!</Progress>
61 - </Widget>
62 - </Col>
63 - <Col xs={12} md={6}>
64 - <Widget
65 - title={<h5>Size</h5>}
66 - close collapse
67 - >
68 - <p>
69 - We only set a height value on the <code>&lt;Progress&gt;</code>, so if you change that value the inner
70 - bar will automatically resize accordingly. Also <code>.progress-sm</code> is available.
71 - </p>
72 - <Progress className="progress-sm mb-sm" value="25" color="dark">25%</Progress>
73 - <Progress className="mb-sm" value="50" color="gray">50%</Progress>
74 - <Progress value="75" color="secondary" style={{ height: '30px' }}>75%</Progress>
75 - </Widget>
76 - </Col>
77 - <Col xs={12}>
78 - <Widget
79 - title={<h5><span className="fw-semi-bold">Striped</span> Progress</h5>}
80 - close collapse
81 - >
82 - <Row>
83 - <Col xs={12} md={6}>
84 - <p>
85 - Add <code>striped</code> property to any <code>&lt;Progress&gt;</code> to
86 - apply a stripe via CSS gradient over the progress bars background color.
87 - </p>
88 - <Progress striped className="mb-sm" value="10" />
89 - <Progress striped className="mb-sm" value="25" color="success" />
90 - <Progress striped className="mb-sm" value="50" color="info" />
91 - <Progress striped className="mb-sm" value="75" color="warning" />
92 - <Progress striped value="100" color="danger" />
93 - </Col>
94 - <Col xs={12} md={6}>
95 - <p>
96 - The striped gradient can also be animated. Add <code>animated</code> property
97 - to <code>&lt;Progress&gt;</code> to animate the stripes right to left via CSS3 animations.
98 - </p>
99 - <Progress animated striped className="mb-sm" value="10" color="danger" />
100 - <Progress animated striped className="mb-sm" value="25" color="warning" />
101 - <Progress animated striped className="mb-sm" value="50" color="info" />
102 - <Progress animated striped className="mb-sm" value="75" color="success" />
103 - <Progress animated striped value="100" />
104 - </Col>
105 - </Row>
106 - </Widget>
107 - </Col>
108 - </Row>
109 - </div>
110 -);
111 -
112 -export default ProgressExamples;
1 -{
2 - "name": "Progress",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./Progress.js"
6 -}
1 -/* eslint-disable */
2 -import React from 'react';
3 -import {
4 - Row,
5 - Col,
6 - Button,
7 - DropdownMenu,
8 - TabContent,
9 - TabPane,
10 - Nav,
11 - NavItem,
12 - NavLink,
13 - Collapse,
14 - DropdownItem,
15 - DropdownToggle,
16 - UncontrolledDropdown
17 -} from 'reactstrap';
18 -import classnames from 'classnames';
19 -
20 -class TabsAccordion extends React.Component {
21 -
22 - constructor(props) {
23 - super(props);
24 - this.toggleFirstTabs = this.toggleFirstTabs.bind(this);
25 - this.toggleSecondTabs = this.toggleSecondTabs.bind(this);
26 - this.toggleThirdTabs = this.toggleThirdTabs.bind(this);
27 - this.toggleAccordionFirst = this.toggleAccordionFirst.bind(this);
28 - this.state = {
29 - activeFirstTab: 'tab11',
30 - activeSecondTab: 'tab22',
31 - activeThirdTab: 'tab31',
32 - dropdownOpen: false,
33 - accordionFirst: [false, false, false],
34 - accordionSecond: [false, true, false],
35 - accordionSecondContent: [{
36 - title: 'Collapsible Group Item', body: ` Get base styles and flexible support for collapsible components like accordions and navigation.
37 - Using the collapse plugin, we built a simple accordion by extending the panel component.`,
38 - }, {
39 - title: 'Normal Text Insertion', body: `
40 - Why don't use Lore Ipsum? I think if some one says don't use lore ipsum it's very
41 - controversial point. I think the opposite actually. Everyone knows what is lore ipsum
42 - - it is easy to understand if text is lore ipsum. You'll automatically skip -
43 - because you know - it's just non-informative stub. But what if there some text like
44 - this one? You start to read it! But the goal of this text is different. The goal is
45 - the example. So a bit of Lore Ipsum is always very good practice. Keep it in mind!`,
46 - }, {
47 - title: 'Check It',
48 - body: ' Why don\'t use Lore Ipsum? I think if some one says don\'t use lore ipsum it\'s very controversial point. I think the opposite actually.',
49 - }],
50 -
51 - accordionFirstContent: [{
52 - title: 'Collapsible Group Item', body: ` Get base styles and flexible support for collapsible components like accordions and navigation.
53 - Using the collapse plugin, we built a simple accordion by extending the panel component.`,
54 - }, {
55 - title: 'Random from the Web', body: `
56 - <p><span class="fw-semi-bold">Light Blue</span> - is a next generation admin template based
57 - on the latest Metro design. There are few reasons we want to tell you, why we have created it:
58 - We didn't like the darkness of most of admin templates, so we created this light one.
59 - We didn't like the high contrast of most of admin templates, so we created this unobtrusive one.
60 - We searched for a solution of how to make widgets look like real widgets, so we decided that
61 - deep background - is what makes widgets look real.
62 - </p>
63 - <p class="no-margin text-muted"><em>- Some One</em></p>
64 -`,
65 - }, {
66 - title: 'Check It',
67 - body: ' Why don\'t use Lore Ipsum? I think if some one says don\'t use lore ipsum it\'s very controversial point. I think the opposite actually.',
68 - }],
69 - };
70 - }
71 -
72 - toggleFirstTabs(tab) {
73 - if (this.state.activeFirstTab !== tab) {
74 - this.setState({
75 - activeFirstTab: tab,
76 - });
77 - }
78 - }
79 -
80 - toggleSecondTabs(tab) {
81 - if (this.state.activeSecondTab !== tab) {
82 - this.setState({
83 - activeSecondTab: tab,
84 - });
85 - }
86 - }
87 -
88 - toggleThirdTabs(tab) {
89 - if (this.state.activeThirdTab !== tab) {
90 - this.setState({
91 - activeThirdTab: tab,
92 - });
93 - }
94 - }
95 -
96 - toggleAccordionFirst(id) {
97 - const arr = [];
98 - arr.length = this.state.accordionFirst.length;
99 - arr.fill(false);
100 - arr[id] = !this.state.accordionFirst[id];
101 - this.setState({
102 - accordionFirst: arr,
103 - });
104 - }
105 -
106 - toggleAccordionSecond(id) {
107 - const arr = [];
108 - arr.length = this.state.accordionSecond.length;
109 - arr.fill(false);
110 - arr[id] = !this.state.accordionSecond[id];
111 - this.setState({
112 - accordionSecond: arr,
113 - });
114 - }
115 -
116 - render() {
117 - return (
118 - <div>
119 - <ol className="breadcrumb">
120 - <li className="breadcrumb-item">YOU ARE HERE</li>
121 - <li className="breadcrumb-item active">UI Tabs & Accordion</li>
122 - </ol>
123 - <h1 className="page-title">Tabs & Accordion - <span
124 - className="fw-semi-bold"
125 - >Components</span></h1>
126 -
127 - {/* Tabs */}
128 - <Row>
129 - <Col md="6" xs="12">
130 - <div className="clearfix">
131 -
132 - <Nav tabs className="float-left bg-light">
133 - <NavItem>
134 - <NavLink
135 - className={classnames({ active: this.state.activeFirstTab === 'tab11' })}
136 - onClick={() => { this.toggleFirstTabs('tab11'); }}
137 - >
138 - <span>Basic</span>
139 - </NavLink>
140 - </NavItem>
141 - <NavItem>
142 - <NavLink
143 - className={classnames({ active: this.state.activeFirstTab === 'tab12' })}
144 - onClick={() => { this.toggleFirstTabs('tab12'); }}
145 - >
146 - <span>Assumtion</span>
147 - </NavLink>
148 - </NavItem>
149 - <UncontrolledDropdown nav>
150 - <DropdownToggle nav caret
151 - className={classnames({
152 - active: this.state.activeFirstTab === 'tab13' ||
153 - this.state.activeFirstTab === 'tab14'
154 - })}>
155 - Dropdown
156 - </DropdownToggle>
157 - <DropdownMenu>
158 - <DropdownItem onClick={() => {
159 - this.toggleFirstTabs('tab13');
160 - }}>@fat
161 - </DropdownItem>
162 - <DropdownItem onClick={() => {
163 - this.toggleFirstTabs('tab14');
164 - }}>@mdo
165 - </DropdownItem>
166 - </DropdownMenu>
167 - </UncontrolledDropdown>
168 - </Nav>
169 - </div>
170 - {/* tab content */}
171 -
172 - <TabContent className='mb-lg' activeTab={this.state.activeFirstTab}>
173 - <TabPane tabId="tab11">
174 - <h3>Tabs-enabled widget</h3>
175 - <p>You will never know exactly how something will go until you try it.</p>
176 - <p>{`You can think three hundred times and still have no precise result. If you see
177 - attractive girl all you need to do is to go and ask her to give you her phone.
178 - You don’t
179 - need to think about HOW it can turn out. All you have to do is to GO and DO IT.
180 - It
181 - should be super-fast and easy. No hesitation. You ask me: “What to do with these
182 - fearful thoughts preventing me from doing that?” The answer is to ignore them,
183 - because
184 - they can’t disappear immediately.`}</p>
185 - <p>The same thing is for startups and ideas. If you have an idea right away after
186 - it appears in your mind you should go and make a first step to implement
187 - it. </p>
188 - <div className="float-right">
189 - <Button color="inverse" className="mr-xs">Cancel</Button>
190 - <Button color="primary">Some button</Button>
191 - </div>
192 - <div className="clearfix"/>
193 - </TabPane>
194 -
195 - <TabPane tabId="tab12">
196 - <p>{`Why don't use Lore Ipsum? I think if some one says don't use lore ipsum it's
197 - very controversial
198 - point. I think the opposite actually. Everyone knows what is lore ipsum - it is
199 - easy to understand if text is lore ipsum.`}</p>
200 - <div className="clearfix">
201 - <div className="btn-toolbar">
202 - <a className="btn btn-default">&nbsp;&nbsp;Check&nbsp;&nbsp;</a>
203 - <a className="btn btn-primary">&nbsp;&nbsp;Dance?&nbsp;&nbsp;</a>
204 - </div>
205 - </div>
206 - </TabPane>
207 -
208 - <TabPane tabId="tab13">
209 - <p> If you will think too much it will sink in the swamp of never implemented
210 - plans and
211 - ideas or will just go away or will be implemented by someone else.</p>
212 - <p><strong>5 months of doing everything to achieve nothing.</strong></p>
213 - <p>{`You'll automatically skip - because you know - it's just non-informative stub.
214 - But what if there some text like this one?`}</p>
215 - </TabPane>
216 -
217 - <TabPane tabId="tab14">
218 - <blockquote className="blockquote-sm blockquote mb-xs">
219 - Plan it? Make it!
220 - </blockquote>
221 - <p>The same thing is for startups and ideas. If you have an idea right away after
222 - it appears
223 - in your mind you should go and make a first step to implement it.</p>
224 - </TabPane>
225 - </TabContent>
226 -
227 - </Col>
228 -
229 - <Col md="6" xs="12">
230 - <Row>
231 - <Col xs="12" className="mb-5">
232 - <Nav className="bg-light" tabs>
233 - <NavItem>
234 - <NavLink
235 - className={classnames({ active: this.state.activeSecondTab === 'tab21' })}
236 - onClick={() => { this.toggleSecondTabs('tab21'); }}
237 - >
238 - <span>Basic</span>
239 - </NavLink>
240 - </NavItem>
241 - <NavItem>
242 - <NavLink
243 - className={classnames({ active: this.state.activeSecondTab === 'tab22' })}
244 - onClick={() => { this.toggleSecondTabs('tab22'); }}
245 - >
246 - <span>Assumtion</span>
247 - </NavLink>
248 - </NavItem>
249 - <NavItem>
250 - <NavLink
251 - className={classnames({ active: this.state.activeSecondTab === 'tab23' })}
252 - onClick={() => { this.toggleSecondTabs('tab23'); }}
253 - >
254 - <span>Works</span>
255 - </NavLink>
256 - </NavItem>
257 - </Nav>
258 -
259 - <TabContent className='mb-lg' activeTab={this.state.activeSecondTab}>
260 - <TabPane tabId="tab21">
261 - <p>
262 - I had an idea named Great Work. It was a service aimed to help people find
263 - their
264 - passion.
265 - Yes I know it sound crazy and super naïve but I worked on that. I started to
266 - work
267 - on
268 - planning, graphics, presentations, pictures, descriptions, articles,
269 - investments
270 - and so on.
271 - I worked on everything but not the project itself.
272 - </p>
273 - </TabPane>
274 - <TabPane tabId="tab22">
275 - <p>{`Why don't use Lore Ipsum? I think if some one says don't use lore ipsum it's
276 - very
277 - controversial
278 - point. I think the opposite actually. Everyone knows what is lore ipsum - it
279 - is
280 - easy to understand if text is lore ipsum.`}</p>
281 - <div className="clearfix">
282 - <div className="btn-toolbar">
283 - <Button color="danger">&nbsp;&nbsp;Check&nbsp;&nbsp;</Button>
284 - <Button color="default">&nbsp;&nbsp;Dance?&nbsp;&nbsp;</Button>
285 - </div>
286 - </div>
287 - </TabPane>
288 - <TabPane tabId="tab23">
289 - <p> If you will think too much it will sink in the swamp of never implemented
290 - plans
291 - and
292 - ideas or will just go away or will be implemented by someone else.</p>
293 - <p><strong>5 months of doing everything to achieve nothing.</strong></p>
294 - <p>{`You'll automatically skip - because you know - it's just non-informative
295 - stub.
296 - But what if there some text like this one?`}</p>
297 - </TabPane>
298 - </TabContent>
299 - </Col>
300 - </Row>
301 -
302 - <Row>
303 - <Col xs="12">
304 - <Nav className="bg-light" tabs>
305 - <NavItem>
306 - <NavLink
307 - className={classnames({ active: this.state.activeThirdTab === 'tab31' })}
308 - onClick={() => { this.toggleThirdTabs('tab31'); }}
309 - >
310 - <span>Basic</span>
311 - </NavLink>
312 - </NavItem>
313 - <NavItem>
314 - <NavLink
315 - className={classnames({ active: this.state.activeThirdTab === 'tab32' })}
316 - onClick={() => { this.toggleThirdTabs('tab32'); }}
317 - >
318 - <span>Assumtion</span>
319 - </NavLink>
320 - </NavItem>
321 - <NavItem>
322 - <NavLink
323 - className={classnames({ active: this.state.activeThirdTab === 'tab33' })}
324 - onClick={() => { this.toggleThirdTabs('tab33'); }}
325 - >
326 - <span>Works</span>
327 - </NavLink>
328 - </NavItem>
329 - </Nav>
330 -
331 - <TabContent className='mb-lg' activeTab={this.state.activeThirdTab}>
332 - <TabPane tabId="tab31">
333 - <p>
334 - I had an idea named Great Work. It was a service aimed to help people find
335 - their
336 - passion.
337 - Yes I know it sound crazy and super naïve but I worked on that. I started to
338 - work
339 - on
340 - planning, graphics, presentations, pictures, descriptions, articles,
341 - investments
342 - and so on.
343 - I worked on everything but not the project itself.
344 - </p>
345 - </TabPane>
346 - <TabPane tabId="tab32">
347 - <p>{`Why don't use Lore Ipsum? I think if some one says don't use lore ipsum it's
348 - very
349 - controversial
350 - point. I think the opposite actually. Everyone knows what is lore ipsum - it
351 - is
352 - easy to understand if text is lore ipsum.`}</p>
353 - <div className="clearfix">
354 - <div className="btn-toolbar">
355 - <Button color="danger">&nbsp;&nbsp;Check&nbsp;&nbsp;</Button>
356 - <Button color="default">&nbsp;&nbsp;Dance?&nbsp;&nbsp;</Button>
357 - </div>
358 - </div>
359 - </TabPane>
360 - <TabPane tabId="tab33">
361 - <p> If you will think too much it will sink in the swamp of never implemented
362 - plans
363 - and
364 - ideas or will just go away or will be implemented by someone else.</p>
365 - <p><strong>5 months of doing everything to achieve nothing.</strong></p>
366 - <p>{`You'll automatically skip - because you know - it's just non-informative
367 - stub.
368 - But what if there some text like this one?`}</p>
369 - </TabPane>
370 - </TabContent>
371 - </Col>
372 - </Row>
373 - </Col>
374 - </Row>
375 -
376 - {/* Accordion */}
377 - <Row className="mt-xs">
378 - <Col md="6" xs="12" className='mb-lg'>
379 -
380 - {this.state.accordionFirstContent.map((element, index) => (
381 - <div className="card panel mb-xs" key={`accord-one-${index.toString()}`}>
382 - { /* eslint-disable */ }
383 - <div
384 - className="card-header panel-header bg-light" role="button"
385 - onClick={() => { this.toggleAccordionFirst(index); }}
386 - >
387 - { /* eslint-enable */ }
388 - <div className="mb-0">
389 - {/* eslint-disable-next-line */}
390 - <a className="accordion-toggle" role="button">
391 - {element.title}
392 - <i className={`fa fa-angle-down ${this.state.accordionFirst[index] ? 'expanded' : ''}`} />
393 - </a>
394 - </div>
395 - </div>
396 - <Collapse className="panel-body" isOpen={this.state.accordionFirst[index]}>
397 - <div className="card-body" dangerouslySetInnerHTML={{ __html: element.body }} />
398 - </Collapse>
399 - </div>))}
400 - </Col>
401 -
402 - <Col md="6" xs="12" className='mb-lg'>
403 - {this.state.accordionSecondContent.map((element, index) => (<div className="card panel mb-xs" key={`accord-one-${index.toString()}`}>
404 - { /* eslint-disable */ }
405 - <div
406 - className="card-header panel-header bg-light" role="button"
407 - onClick={() => { this.toggleAccordionSecond(index); }}
408 - >
409 - { /* eslint-enable */ }
410 - <div className="mb-0">
411 - {/* eslint-disable-next-line */}
412 - <a className="accordion-toggle" role="button">
413 - {element.title}
414 - <i className="fa fa-angle-down float-right" />
415 - </a>
416 - </div>
417 - </div>
418 - <Collapse className="panel-body" isOpen={this.state.accordionSecond[index]}>
419 - <div className="card-body" dangerouslySetInnerHTML={{ __html: element.body }} />
420 - </Collapse>
421 - </div>))}
422 - </Col>
423 - </Row>
424 -
425 - </div>);
426 - }
427 -
428 -}
429 -
430 -export default TabsAccordion;
1 -{
2 - "name": "UITabsAccordion",
3 - "version": "0.0.0",
4 - "private": true,
5 - "main": "./TabsAccordion.js"
6 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Progress,
6 -} from 'reactstrap';
7 -
8 -import Widget from '../../../components/Widget';
9 -import LiveTile from './components/live-tile/LiveTile';
10 -import ChangesChart from './components/changes-chart/ChangesChart';
11 -import RealtimeTraffic from './components/realtime-traffic/RealtimeTraffic';
12 -import YearsMap from './components/years-map/YearsMap';
13 -import FlotCharts from './components/flot-charts/FlotCharts';
14 -import NasdaqSparkline from './components/nasdaq-sparkline-widget/nasdaqSparkline';
15 -import Skycon from '../../../components/Skycon/Skycon';
16 -import { Input, InputGroup, InputGroupAddon, Button } from 'reactstrap';
17 -import './Widgets.scss';
18 -
19 -import peopleA1 from '../../../images/people/a1.jpg';
20 -import peopleA2 from '../../../images/people/a2.jpg';
21 -import peopleA4 from '../../../images/people/a4.jpg';
22 -import peopleA6 from '../../../images/people/a6.jpg';
23 -import peopleA3 from '../../../images/people/a3.jpg';
24 -import avatar from '../../../images/avatar.png';
25 -import img18 from '../../../images/pictures/18.jpg';
26 -import img17 from '../../../images/pictures/17.jpg';
27 -
28 -class Widgets extends React.Component {
29 - componentDidMount() {
30 -
31 - }
32 -
33 - render() {
34 - return (
35 - <div className="root">
36 - <Row>
37 - <Col lg={3} md={6} xs={12}>
38 - <Widget className="">
39 - <div className="clearfix">
40 - <Row className="flex-nowrap">
41 - <Col xs={3}>
42 - <span className="widget-icon">
43 - <i className="fi flaticon-like text-primary" />
44 - </span>
45 - </Col>
46 - <Col xs="9">
47 - <h6 className="m-0">USERS GROWTH</h6>
48 - <p className="h2 m-0 fw-normal">4,332</p>
49 - </Col>
50 - </Row>
51 - <Row className="flex-nowrap">
52 - <Col xs={6}>
53 - <h6 className="m-0 text-muted">Registrations</h6>
54 - <p className="value5">+830</p>
55 - </Col>
56 - <Col xs="6">
57 - <h6 className="m-0 text-muted">Bounce Rate</h6>
58 - <p className="value5">4.5%</p>
59 - </Col>
60 - </Row>
61 - </div>
62 - </Widget>
63 - </Col>
64 - <Col lg={3} md={6} xs={12}>
65 - <Widget className="">
66 - <div className="clearfix">
67 - <Row className="flex-nowrap">
68 - <Col xs="3">
69 - <span className="widget-icon">
70 - <i className="fi flaticon-magic-wand text-info" />
71 - </span>
72 - </Col>
73 - <Col xs="9">
74 - <LiveTile
75 - data-mode="carousel" data-speed="750" data-delay="3000"
76 - data-height="57"
77 - >
78 - <div>
79 - <h6 className="m-0">VISITS TODAY</h6>
80 - <p className="h2 m-0 fw-normal">12,324</p>
81 - </div>
82 - <div>
83 - <h6 className="m-0">VISITS YESTERDAY</h6>
84 - <p className="h2 m-0 fw-normal">11,885</p>
85 - </div>
86 - </LiveTile>
87 - </Col>
88 - </Row>
89 - <Row className="flex-nowrap">
90 - <Col xs="6">
91 - <h6 className="m-0 text-muted">New Visitors</h6>
92 - <LiveTile
93 - data-mode="carousel" data-speed="750" data-delay="3000"
94 - data-height="25"
95 - >
96 - <div>
97 - <p className="value5">1,332</p>
98 - </div>
99 - <div>
100 - <p className="value5">20.1%</p>
101 - </div>
102 - </LiveTile>
103 - </Col>
104 - <Col xs="6">
105 - <h6 className="m-0 text-muted">Bounce Rate</h6>
106 - <LiveTile
107 - data-mode="carousel" data-speed="750" data-delay="3000"
108 - data-height="26"
109 - >
110 - <div>
111 - <p className="value5">217</p>
112 - </div>
113 - <div>
114 - <p className="value5">2.3%</p>
115 - </div>
116 - </LiveTile>
117 - </Col>
118 - </Row>
119 - </div>
120 - </Widget>
121 - </Col>
122 - <Col lg={3} md={6} xs={12}>
123 - <Widget className="">
124 - <div className="clearfix">
125 - <LiveTile
126 - data-mode="fade" data-speed="750" data-delay="4000"
127 - data-height="104"
128 - >
129 - <div className="bg-white text-gray">
130 - <Row className="flex-nowrap">
131 - <Col xs={3}>
132 - <span className="widget-icon">
133 - <i className="fi flaticon-notebook-4" />
134 - </span>
135 - </Col>
136 - <Col xs="9">
137 - <h6 className="m-0">ORDERS</h6>
138 - <p className="h2 m-0 fw-normal">82,765</p>
139 - </Col>
140 - </Row>
141 - <Row className="flex-nowrap">
142 - <Col xs={6}>
143 - <h6 className="m-0">Avg. Time</h6>
144 - <p className="value5">2:56</p>
145 - </Col>
146 - <Col xs={6}>
147 - <h6 className="m-0">Last Week</h6>
148 - <p className="value5">374</p>
149 - </Col>
150 - </Row>
151 - </div>
152 - <div className="text-gray">
153 - <Row className="flex-nowrap">
154 - <Col xs={3}>
155 - <span className="widget-icon">
156 - <i className="fi flaticon-shuffle" />
157 - </span>
158 - </Col>
159 - <Col xs={9}>
160 - <h6 className="m-0">PICKED ORDERS</h6>
161 - <p className="h2 m-0 fw-normal">13.8%</p>
162 - </Col>
163 - </Row>
164 - <Row className="flex-nowrap">
165 - <Col xs={6}>
166 - <h6 className="m-0 text-muted">Basic</h6>
167 - <p className="value5">3,692</p>
168 - </Col>
169 - <Col xs="6">
170 - <h6 className="m-0 text-muted">Advanced</h6>
171 - <p className="value5">1,441</p>
172 - </Col>
173 - </Row>
174 - </div>
175 - </LiveTile>
176 - </div>
177 - </Widget>
178 - </Col>
179 - <Col lg={3} md={6} xs={12}>
180 - <Widget className="">
181 - <div className="clearfix">
182 - <Row className="flex-nowrap">
183 - <Col xs={3}>
184 - <span className="widget-icon">
185 - <i className="fi flaticon-diamond text-success" />
186 - </span>
187 - </Col>
188 - <Col xs={9}>
189 - <h6 className="m-0">TOTAL PROFIT</h6>
190 - <p className="h2 m-0 fw-normal">$7,448</p>
191 - </Col>
192 - </Row>
193 - <Row className="flex-nowrap">
194 - <Col xs="6">
195 - <h6 className="m-0 text-muted">Last Month</h6>
196 - <p className="value5">$83,541</p>
197 - </Col>
198 - <Col xs={6}>
199 - <h6 className="m-0 text-muted">Last Week</h6>
200 - <p className="value5">$17,926</p>
201 - </Col>
202 - </Row>
203 - </div>
204 - </Widget>
205 - </Col>
206 - </Row>
207 - <FlotCharts />
208 - <Row>
209 - <Col lg={4} xs={12}>
210 - <Widget refresh close bodyClass="mt-0">
211 - <div className="widget-top-overflow widget-padding-md clearfix bg-warning text-white">
212 - <h3 className="mt-lg mb-lg">Sing - <span className="fw-semi-bold">Next Generation</span> Admin
213 - Dashboard
214 - Template</h3>
215 - <ul className="tags text-white pull-right">
216 - {/* eslint-disable-next-line */}
217 - <li><a href="#">features</a></li>
218 - </ul>
219 - </div>
220 - <div className="post-user mt-negative-lg">
221 - <span className="thumb-lg pull-left mr mt-n-sm">
222 - <img className="rounded-circle" src={peopleA4} alt="..." />
223 - </span>
224 - <h6 className="m-b-1 fw-normal text-white">Jeremy &nbsp;
225 - <small className="text-white text-light">@sing</small>
226 - </h6>
227 - <p className="fs-mini text-muted">
228 - <time>25 mins</time>
229 - &nbsp; <i className="fa fa-map-marker" /> &nbsp; near Amsterdam
230 - </p>
231 - </div>
232 - <p className="text-light fs-mini mt-lg">Lots of cool stuff is happening around you. Just calm down for a
233 - sec
234 - and listen. Colors, sounds,
235 - thoughts, ideas.
236 - </p>
237 - <footer className="bg-body-light">
238 - <ul className="post-links">
239 - <li><button className="btn-link">1 hour</button></li>
240 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> Like</span></button></li>
241 - <li><button className="btn-link">Comment</button></li>
242 - </ul>
243 - <ul className="post-comments mb-0 mt-2">
244 - <li>
245 - <span className="thumb-xs avatar pull-left mr-sm">
246 - <img className="rounded-circle" src={peopleA1} alt="..." />
247 - </span>
248 - <div className="comment-body">
249 - <h6 className="author fs-sm fw-semi-bold">Ignacio Abad&nbsp;
250 - <small>6 mins ago</small>
251 - </h6>
252 - <p className="fs-mini">Hey, have you heard anything about that?</p>
253 - </div>
254 - </li>
255 - <li>
256 - <span className="thumb-xs avatar pull-left mr-sm">
257 - <img className="rounded-circle" src={avatar} alt="..." />
258 - </span>
259 - <div className="comment-body">
260 - <input
261 - className="form-control form-control-sm" type="text"
262 - placeholder="Write your comment..."
263 - />
264 - </div>
265 - </li>
266 - </ul>
267 - </footer>
268 - </Widget>
269 - </Col>
270 - <Col lg={4} xs={12}>
271 - <Widget refresh close bodyClass="mt-0">
272 - <div>
273 - <div className="widget-top-overflow text-white">
274 - <img src={img17} alt="..." />
275 - <ul className="tags text-white pull-right">
276 - {/* eslint-disable-next-line */}
277 - <li><a href="#">design</a></li>
278 - {/* eslint-disable-next-line */}
279 - <li><a href="#">white</a></li>
280 - </ul>
281 - </div>
282 - <div className="post-user mt-sm">
283 - <span className="thumb pull-left mr mt-n-sm">
284 - <img className="rounded-circle" src={peopleA6} alt="..." />
285 - </span>
286 - <h6 className="mb-xs mt"><span className="fw-semi-bold">Maryna</span> Nilson</h6>
287 - <p className="fs-mini text-muted">
288 - <time>25 mins</time>
289 - &nbsp; <i className="fa fa-map-marker" /> &nbsp; near Amsterdam
290 - </p>
291 - </div>
292 - <p className="text-light fs-mini m">Lots of cool stuff is happening around you. Just calm down for a
293 - sec
294 - and listen. Colors, sounds,
295 - thoughts, ideas. </p>
296 - </div>
297 - <footer className="bg-body-light">
298 - <ul className="post-links no-separator">
299 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> 427</span></button></li>
300 - <li><button className="btn-link"><i className="glyphicon glyphicon-comment" /> 98</button></li>
301 - </ul>
302 - </footer>
303 - </Widget>
304 - </Col>
305 - <Col lg={4} xs={12}>
306 - <Widget refresh close>
307 - <div>
308 - <div className="post-user mt-n-xs">
309 - <span className="thumb pull-left mr mt-n-sm">
310 - <img className="rounded-circle" src={peopleA2} alt="..." />
311 - </span>
312 - <h6 className="mb-xs mt-xs">Jess <span className="fw-semi-bold">@jessica</span></h6>
313 - <p className="fs-mini text-muted">
314 - <time>25 mins</time>
315 - &nbsp; <i className="fa fa-map-marker" /> &nbsp; near Amsterdam
316 - </p>
317 - </div>
318 - <div className="widget-middle-overflow widget-padding-md clearfix bg-danger text-white">
319 - <h3 className="mt-lg mb-lg">Sing - <span className="fw-semi-bold">Next Generation</span> Admin
320 - Dashboard
321 - Template</h3>
322 - <ul className="tags text-white pull-right">
323 - {/* eslint-disable-next-line */}
324 - <li><a href="#">design</a></li>
325 - </ul>
326 - </div>
327 - <p className="text-light fs-mini mt-sm">Lots of cool stuff is happening around you. Just calm down for
328 - a
329 - sec and listen. Colors, sounds,
330 - thoughts, ideas. </p>
331 - </div>
332 - <footer className="bg-body-light">
333 - <ul className="post-links">
334 - <li><button className="btn-link">1 hour</button></li>
335 - <li><button className="btn-link"><span className="text-danger"><i className="fa fa-heart" /> Like</span></button></li>
336 - <li><button className="btn-link">Comment</button></li>
337 - </ul>
338 - </footer>
339 - </Widget>
340 - </Col>
341 - </Row>
342 - <Row>
343 - <Col lg={6} xs={12}>
344 - <Widget bodyClass="mt-0">
345 - <div className="widget-image text-white">
346 - <img src={img18} alt="..." />
347 - <h4 className="title">
348 - <span className="fw-normal">Sunnyvale</span>, CA
349 - </h4>
350 - <div className="info text-right">
351 - <i className="fa fa-map-marker h1 m-0 mr-xs" />
352 - <h6 className="m-0 mt-xs">FLORIDA, USA</h6>
353 - <p className="fs-sm">9:41 am</p>
354 - </div>
355 - <div className="forecast">
356 - <div className="row">
357 - <div className="col-6 col-md-4">
358 - <div className="row mt-xs">
359 - <div className="col-6 p-0">
360 - <Skycon icon="CLEAR_DAY" color="white" width="40" height="40" />
361 - <p className="m-0 fw-normal mt-n-xs">sunny</p>
362 - </div>
363 - <div className="col-6 p-0">
364 - <h6 className="fw-semi-bold m-0">SUNDAY</h6>
365 - <p className="value1 ">29&deg;</p>
366 - </div>
367 - </div>
368 - </div>
369 - <div className="col-3 col-md-2 p-0">
370 - <h6 className="m-0">TOMMOROW</h6>
371 - <Skycon className="mt-1" icon="PARTLY_CLOUDY_DAY" color="white" width="28" height="28" />
372 - <p className="m-0 fw-semi-bold">32&deg;</p>
373 - </div>
374 - <div className="col-3 col-md-2 p-0">
375 - <h6 className="m-0">TUE</h6>
376 - <Skycon className="mt-1" icon="RAIN" color="white" width="28" height="28" />
377 - <p className="m-0 fw-semi-bold">25&deg;</p>
378 - </div>
379 - <div className="col-3 col-md-2 p-0">
380 - <h6 className="m-0">WED</h6>
381 - <Skycon className="mt-1" icon="CLEAR_DAY" color="#f0b518" width="28" height="28" />
382 - <p className="m-0 fw-semi-bold">28&deg;</p>
383 - </div>
384 - <div className="col-3 col-md-2 p-0">
385 - <h6 className="m-0">THU</h6>
386 - <Skycon className="mt-1" icon="PARTLY_CLOUDY_DAY" color="white" width="28" height="28" />
387 - <p className="m-0 fw-semi-bold">17&deg;</p>
388 - </div>
389 - </div>
390 - </div>
391 - </div>
392 - </Widget>
393 - <Row>
394 - <Col md={6} xs={12}>
395 - <Widget className="p-0 text-center">
396 - <Row className="m-0">
397 - <div className="col-5 bg-danger btlr bblr">
398 - <Skycon className="mt-3" icon="CLEAR_DAY" color="white" width="62" height="62" />
399 - <h6 className="text-white fw-normal m-t-1">FRIDAY</h6>
400 - </div>
401 - <div className="col-7">
402 - <p className="value0 text-danger mt-n-xs mr-n-xs">
403 - 33&deg;
404 - </p>
405 - <p className="mt-n-sm m-b-0 fw-normal fs-sm text-muted">WINDY</p>
406 - <div className="row mt-n-xs mb-xs">
407 - <div className="col-6 p-0">
408 - <Skycon icon="WIND" color="#999" width="20" height="20" />
409 - <div className="d-inline-block ml-1">
410 - <p className="value6">4</p>
411 - <p className="fs-sm m-0 mt-n-xs text-muted fw-normal">MPS</p>
412 - </div>
413 - </div>
414 - <div className="col-6 p-0">
415 - <Skycon icon="RAIN" color="#999" width="20" height="20" />
416 - <div className="d-inline-block ml-1">
417 - <p className="value6">52</p>
418 - <p className="fs-sm m-0 mt-n-xs text-muted fw-normal">MM</p>
419 - </div>
420 - </div>
421 - </div>
422 - </div>
423 - </Row>
424 - </Widget>
425 - </Col>
426 - <Col md={6} xs={12}>
427 - <Widget className="p-0 text-center">
428 - <div className="row m-0">
429 - <div className="col-7 bg-success btlr bblr">
430 - <p className="value0 text-white mt-sm mr-n-xs">
431 - 20&deg;
432 - </p>
433 - <p className="text-white fw-normal d-inline-block mb">SUNDAY</p>
434 - </div>
435 - <div className="col-5">
436 - <Skycon className="mt-3" icon="PARTLY_CLOUDY_DAY" color="#64bd63" width="60" height="60" />
437 - <p className="fw-normal fs-sm text-muted">WINDY</p>
438 - </div>
439 - </div>
440 - </Widget>
441 - </Col>
442 - </Row>
443 - </Col>
444 - <Col lg={6} xs={12}>
445 - <Row>
446 - <Col md={6} xs={12}>
447 - <Widget className="widget-sm">
448 - <h6 className="mt-3 fw-normal">
449 - Nasdaq
450 - </h6>
451 - <h3>
452 - 355 <span className="fw-semi-bold">USD</span>
453 - </h3>
454 - <p>Last Sale 354.94 USD</p>
455 - <NasdaqSparkline />
456 - </Widget>
457 - </Col>
458 - <Col md={6} xs={12}>
459 - <Widget className="widget-sm bg-success text-white">
460 - <p className="mb-xs"><i className="fa fa-comments fa-2x" /></p>
461 - <h5>
462 - Lots of <span className="fw-semi-bold">possibilities</span> to customize your
463 - new <span className="fw-semi-bold">admin template</span>
464 - </h5>
465 - <p className="fs-mini mt-sm">
466 - <span className="fw-semi-bold">83</span> likes
467 - &nbsp;
468 - <span className="fw-semi-bold">96</span> comments
469 - &nbsp;
470 - <span className="fw-semi-bold">7</span> shares
471 - </p>
472 - <p className="fs-sm mt-lg text-light">
473 - <time>10 June</time>
474 - </p>
475 - </Widget>
476 - </Col>
477 - </Row>
478 - <Row>
479 - <Col md={6} xs={12}>
480 - <Widget className="widget-sm bg-primary text-white">
481 - <p className="mb-xs"><i className="fa fa-arrow-circle-up fa-3x opacity-50" /></p>
482 - <p className="mb text-light">
483 - <time>10 June</time>
484 - </p>
485 - <h3>
486 - Lots of <span className="fw-semi-bold">new</span> amazing possibilities
487 - </h3>
488 - <p className="fs-mini mt">
489 - <span className="fw-semi-bold">214</span> likes
490 - &nbsp;
491 - <span className="fw-semi-bold">96</span> comments
492 - </p>
493 - </Widget>
494 - </Col>
495 - <Col md={6} xs={12}>
496 - <Widget
497 - className="widget-sm"
498 - title={<h6>Server <span className="fw-semi-bold">Overview</span></h6>}
499 - >
500 - <div className="clearfix fs-mini">
501 - <span className="pull-right m-0 fw-semi-bold">CPU</span>
502 - <span className="fs-mini">60% / 37°C / 3.3 Ghz</span>
503 - </div>
504 - <Progress color="bg-gray-lighter" className="progress-xs" value={60} />
505 - <div className="clearfix fs-mini mt">
506 - <span className="pull-right m-0 fw-semi-bold">Mem</span>
507 - <span className="fs-mini">29% / 4GB (16 GB)</span>
508 - </div>
509 - <Progress color="warning" className="bg-gray-lighter progress-xs" value={29} />
510 - <div className="clearfix fs-mini mt">
511 - <span className="pull-right m-0 fw-semi-bold">LAN</span>
512 - <span className="fs-mini">6 Mb/s <i className="fa fa-caret-down" /> &nbsp; 3 Mb/s <i
513 - className="fa fa-caret-up"
514 - /></span>
515 - </div>
516 - <Progress color="danger" className="bg-gray-lighter progress-xs" value={48} />
517 - <div className="clearfix fs-mini mt">
518 - <span className="pull-right m-0 fw-semi-bold">Access</span>
519 - <span className="fs-mini">17 Mb/s <i className="fa fa-caret-up" /> &nbsp; (+18%)</span>
520 - </div>
521 - <Progress color="success" className="bg-gray-lighter progress-xs" value={64} />
522 - </Widget>
523 - </Col>
524 - </Row>
525 - </Col>
526 - </Row>
527 -
528 - <Row>
529 - <Col lg={4} xs={12}>
530 - <Widget>
531 - <YearsMap />
532 - </Widget>
533 - </Col>
534 - <Col lg={4} xs={12}>
535 - <Widget
536 - title={
537 - <header className="bb">
538 - <h6>Recent <span className="fw-semi-bold">Chats</span></h6>
539 - </header>
540 - }
541 - >
542 - <div className="widget-body">
543 - <div className="widget-middle-overflow">
544 - {/* todo: slimscroll ??? */}
545 - <ul
546 - className="list-group widget-chat-list-group" data-ui-jq="slimscroll"
547 - data-ui-options="{ height: '287px', size: '4px', borderRadius: '1px', opacity: .3 }"
548 - >
549 - <li className="list-group-item">
550 - <span className="thumb">
551 - <img className="rounded-circle" src={peopleA6} alt="..." />
552 - </span>
553 - <div className="message">
554 - <h6 className="sender">Chris Gray</h6>
555 - <p className="body">Hey! What&apos;s up? So much time since we saw each other there</p>
556 - <time className="time">10 sec ago</time>
557 - </div>
558 - </li>
559 - <li className="list-group-item on-right">
560 - <span className="thumb">
561 - <img className="rounded-circle" src={avatar} alt="..." />
562 - </span>
563 - <div>
564 - <h6 className="sender">John Doe</h6>
565 - <p className="body">True! Totally makes sense. But how do we find that?</p>
566 - <time className="time">10 sec ago</time>
567 - </div>
568 - </li>
569 - <li className="list-group-item">
570 - <span className="thumb">
571 - <img className="rounded-circle" src={peopleA6} alt="..." />
572 - </span>
573 - <div>
574 - <h6 className="sender">Chris Gray</h6>
575 - <p className="body">OK, but so now what? What should we do now? Not sure actually.</p>
576 - <time className="time">10 sec ago</time>
577 - </div>
578 - </li>
579 - <li className="list-group-item on-right">
580 - <span className="thumb">
581 - <img className="rounded-circle" src={avatar} alt="..." />
582 - </span>
583 - <div>
584 - <h6 className="sender">John Doe</h6>
585 - <p className="body">Hey guys, didn&apos;t you notice this conversation is sort of jubberish?</p>
586 - <time className="time">10 sec ago</time>
587 - </div>
588 - </li>
589 - </ul>
590 - </div>
591 - </div>
592 - <footer className="bg-body-light bt">
593 - <InputGroup size="sm">
594 - <Input placeholder="Your message" />
595 - <InputGroupAddon addonType="append"><Button color="default">Send</Button></InputGroupAddon>
596 - </InputGroup>
597 - </footer>
598 - </Widget>
599 - </Col>
600 - <Col lg={4} xs={12}>
601 - <Widget className="bg-gray-dark text-white">
602 - <RealtimeTraffic />
603 - </Widget>
604 - </Col>
605 - </Row>
606 -
607 - <Row>
608 - <Col lg={3} xs={12}>
609 - <Widget className="widget-padding-lg">
610 - <div className="clearfix">
611 - <LiveTile
612 - data-mode="carousel" data-speed="750" data-delay="3000"
613 - data-height="313"
614 - >
615 - <div>
616 - <h3>Basic & <span className="fw-semi-bold">Advanced</span> Features</h3>
617 - <p className="value4 mt-lg">All you need in one app</p>
618 - <div className="h5 mt-lg mb-lg">
619 - <i className="fa fa-quote-left opacity-50" />
620 - &nbsp;That&apos;s awesome! &nbsp;
621 - <i className="fa fa-quote-right opacity-50" />
622 - </div>
623 - <div className="widget-footer-bottom">
624 - <p>Attention to what&apos;s really important</p>
625 - <button className="btn btn-info btn-block mt">Order Now!</button>
626 - </div>
627 - </div>
628 - <div>
629 - <h3>Beautiful <span className="fw-semi-bold">Thing</span></h3>
630 - <p className="value4 mt-lg">Life-time package support</p>
631 - <div className="h5 mt-lg mb-lg">
632 - <i className="fa fa-quote-left opacity-50" />
633 - &nbsp;That&apos;s awesome! &nbsp;
634 - <i className="fa fa-quote-right opacity-50" />
635 - </div>
636 - <div className="widget-footer-bottom">
637 - <p>Attention to what&apos;s really important</p>
638 - <button className="btn btn-inverse btn-block mt"><span
639 - className="fw-semi-bold text-warning"
640 - >Ready?</span>
641 - </button>
642 - </div>
643 - </div>
644 - </LiveTile>
645 - </div>
646 - </Widget>
647 - </Col>
648 -
649 - <Col lg={3} xs={12}>
650 - <Widget className="widget-chart-changes" close refresh bodyClass="mt-0">
651 - <ChangesChart />
652 - </Widget>
653 - </Col>
654 -
655 - <Col lg={3} xs={12}>
656 - <Widget className="widget-padding-lg bg-primary text-white">
657 - <div className="clearfix">
658 - <LiveTile data-mode="carousel" data-speed="300" data-delay="3000" data-height="313">
659 - <div>
660 - <p className="h4 mt-xs">
661 - <i className="fa fa-quote-left opacity-50" />
662 - &nbsp;Thanks for the awesome support. That&apos;s awesome!&nbsp;
663 - <i className="fa fa-quote-right opacity-50" />
664 - </p>
665 - <div className="widget-footer-bottom">
666 - <span className="thumb pull-left mr">
667 - <img className="rounded-circle" src={peopleA4} alt="..." />
668 - </span>
669 - <h4 className="m-0 mb-xs"><span className="fw-semi-bold">Miha</span> Koshir</h4>
670 - <p className="text-light">@miha</p>
671 - </div>
672 - </div>
673 - <div>
674 - <div className="clearfix mt-xs">
675 - <span className="thumb pull-left mr">
676 - <img className="rounded-circle" src={peopleA3} alt="..." />
677 - </span>
678 - <h4 className="m-0 mb-xs"><span className="fw-semi-bold">Maryna</span> Ess</h4>
679 - <p className="text-light">@ess</p>
680 - </div>
681 - <div className="widget-footer-bottom">
682 - <p className="h4">
683 - <i className="fa fa-quote-left opacity-50" />
684 - &nbsp;Could have never imagined it would be so great!&nbsp;
685 - <i className="fa fa-quote-right opacity-50" />
686 - </p>
687 - </div>
688 - </div>
689 - </LiveTile>
690 - </div>
691 - </Widget>
692 - </Col>
693 -
694 - <Col lg={3} xs={12} className="col-lg-3 col-12">
695 - <LiveTile
696 - data-mode="flip" data-direction="horizontal"
697 - data-speed="600" data-delay="3000" data-height="373" data-play-onhover="true"
698 - >
699 - <div>
700 - <Widget
701 - className="widget-padding-lg widget-md bg-gray-dark text-white"
702 - bodyClass="widget-body-container"
703 - >
704 - <div className="text-center">
705 - <i className="fa fa-child text-warning fa-5x" />
706 - </div>
707 - <h3 className="fw-normal">Sing Web App</h3>
708 - <div className="widget-footer-bottom">
709 - <div className="mb-sm">Cutting-edge tech and design delivered</div>
710 - <p>
711 - <button className="btn btn-default btn-block">Hover over me!</button>
712 - </p>
713 - </div>
714 - </Widget>
715 - </div>
716 - <div>
717 - <Widget className="widget-padding-lg widget-md" bodyClass="widget-body-container">
718 - <div className="text-center">
719 - <i className="fa fa-globe text-primary fa-5x" />
720 - </div>
721 - <h3 className="fw-normal">Join The Web Now!</h3>
722 - <div className="widget-footer-bottom">
723 - <div className="mb-sm">Cutting-edge tech and design delivered</div>
724 - <p>
725 - <button className="btn btn-gray btn-block">Join now!</button>
726 - </p>
727 - </div>
728 - </Widget>
729 - </div>
730 - </LiveTile>
731 - </Col>
732 - </Row>
733 -
734 - </div>
735 - );
736 - }
737 -}
738 -
739 -
740 -export default Widgets;
1 -@import '../../../styles/app';
2 -
3 -
4 - /* Post User */
5 -.post-user {
6 - position: relative;
7 -
8 - @include clearfix();
9 -
10 - img {
11 - border: 3px solid white;
12 - }
13 -}
14 -
15 -/* Tags */
16 -.tags {
17 - padding-left: 0;
18 - list-style: none;
19 -
20 - @include clearfix();
21 -
22 - > li {
23 - float: left;
24 -
25 - > a {
26 - padding: 2px 8px;
27 - font-size: $font-size-mini;
28 - border-radius: 6px;
29 - border: 1px solid white;
30 - color: inherit;
31 - text-decoration: none;
32 -
33 - &:hover {
34 - background-color: rgba(0, 0, 0, 0.1);
35 - }
36 -
37 - .fa {
38 - font-size: 8px;
39 - margin-right: 3px;
40 - opacity: 0.8;
41 - }
42 - }
43 - }
44 -
45 - > li + li > a {
46 - margin-left: 6px;
47 - }
48 -}
49 -
50 -.widget-top-overflow > img + .tags {
51 - position: absolute;
52 - bottom: 0;
53 - right: 0;
54 - margin: 20px;
55 -}
56 -
57 -/* Weather */
58 -.widget-image .forecast {
59 - position: absolute;
60 - left: 0;
61 - right: 0;
62 - bottom: 0;
63 - margin-bottom: 5px;
64 - padding-left: 15px;
65 - padding-right: 15px;
66 - text-align: center;
67 -}
68 -
69 -/* Chat List Group */
70 -.widget-chat-list-group {
71 - padding-top: $spacer/2;
72 -
73 - .list-group-item {
74 - margin-left: $widget-padding-horizontal;
75 - margin-right: $widget-padding-horizontal;
76 - padding: 0;
77 - border: 0;
78 - display: flex;
79 -
80 - div {
81 - width: 100%;
82 - }
83 -
84 - &:nth-child(even) {
85 - margin-left: 75px;
86 - }
87 -
88 - &:hover {
89 - background: none;
90 - }
91 -
92 - & + .list-group-item {
93 - margin-top: 20px;
94 - }
95 -
96 - .thumb,
97 - .thumb-sm {
98 - float: left;
99 - margin-right: 15px;
100 - }
101 -
102 - .time {
103 - font-size: $font-size-sm;
104 - color: $text-muted;
105 - }
106 -
107 - .sender {
108 - margin-top: 5px;
109 - margin-bottom: 5px;
110 - font-size: $font-size-mini;
111 - font-weight: $font-weight-normal;
112 - color: theme-color('primary');
113 - }
114 -
115 - .body {
116 - font-size: $font-size-mini;
117 - margin-bottom: 0;
118 - }
119 -
120 - &.on-right {
121 - div {
122 - padding-right: 1rem;
123 - }
124 -
125 - .thumb,
126 - .thumb-sm {
127 - order: 1;
128 - margin-left: auto;
129 - margin-right: 0;
130 - }
131 -
132 - .time {
133 - float: left;
134 - }
135 -
136 - .sender {
137 - text-align: right;
138 - }
139 - }
140 - }
141 -}
142 -
1 -import React from 'react';
2 -import Rickshaw from 'rickshaw';
3 -
4 -import $ from 'jquery';
5 -
6 -import {
7 - Row, Col,
8 -} from 'reactstrap';
9 -
10 -import Sparklines from '../../../../../components/Sparklines';
11 -import s from './ChangesChart.module.scss';
12 -
13 -class ChangesChart extends React.Component {
14 -
15 - constructor(prop) {
16 - super(prop);
17 - this.state = {
18 - rickshawGraph: null,
19 - sparklineData: [],
20 - sparklineOptions: {},
21 - };
22 - this.onResizeRickshaw = this.onResizeRickshaw.bind(this);
23 - this.initRickshaw = this.initRickshaw.bind(this);
24 - this.initSparkline();
25 - }
26 -
27 - componentDidMount() {
28 - this.initRickshaw();
29 - window.addEventListener('resize', this.onResizeRickshaw);
30 - }
31 -
32 - componentWillUnmount() {
33 - window.removeEventListener('resize', this.onResizeRickshaw);
34 - }
35 -
36 - onResizeRickshaw() {
37 - this.state.graph.configure({ height: 100 });
38 - this.state.graph.render();
39 - }
40 -
41 - initRickshaw() {
42 - const seriesData = [[], []];
43 - const random = new Rickshaw.Fixtures.RandomData(32);
44 - for (let i = 0; i < 32; i += 1) {
45 - random.addData(seriesData);
46 - }
47 -
48 - // eslint-disable-next-line
49 - this.state.graph = new Rickshaw.Graph({
50 - element: this.rickshawChart,
51 - height: '100',
52 - renderer: 'multi',
53 - series: [{
54 - name: 'pop',
55 - data: seriesData.shift().map(d => ({ x: d.x, y: d.y })),
56 - color: '#7bd47a', // (#64bd63, 0.9)
57 - renderer: 'bar',
58 - gapSize: 2,
59 - min: 'auto',
60 - strokeWidth: 3,
61 - }, {
62 - name: 'humidity',
63 - data: seriesData.shift()
64 - .map(d => ({ x: d.x, y: ((d.y * (Math.random() * 0.5)) + 30.1) })),
65 - renderer: 'line',
66 - color: '#fff',
67 - gapSize: 2,
68 - min: 'auto',
69 - strokeWidth: 3,
70 - }],
71 - });
72 -
73 - const hoverDetail = new Rickshaw.Graph.HoverDetail({
74 - graph: this.state.graph,
75 - xFormatter: x => new Date(x * 1000).toString(),
76 - });
77 -
78 - hoverDetail.show();
79 - this.state.graph.render();
80 - }
81 -
82 - initSparkline() {
83 - const data = [3, 6, 2, 4, 5, 8, 6, 8];
84 - const dataMax = Math.max.apply(null, data);
85 - const backgroundData = data.map(() => dataMax);
86 -
87 - // eslint-disable-next-line
88 - this.state.sparklineData = [backgroundData, data];
89 - // eslint-disable-next-line
90 - this.state.sparklineOptions = [
91 - {
92 - type: 'bar',
93 - height: 26,
94 - barColor: '#eee',
95 - barWidth: 7,
96 - barSpacing: 5,
97 - chartRangeMin: Math.min.apply(null, data),
98 - tooltipFormat: new $.SPFormatClass(''),
99 - },
100 - {
101 - composite: true,
102 - type: 'bar',
103 - barColor: '#64bd63',
104 - barWidth: 7,
105 - barSpacing: 5,
106 - },
107 - ];
108 - }
109 -
110 - render() {
111 - return (
112 - <div className={s.changesChart}>
113 - <div className={`${s.chart} bg-success btlr btrr`}>
114 - <p className={s.chartValue}><i className="fa fa-caret-up" /> 352.79</p>
115 - <p className={s.chartValueChange}>+2.04 (1.69%)</p>
116 - <div
117 - style={{ overflow: 'hidden' }}
118 - ref={(r) => {
119 - this.rickshawChart = r;
120 - }}
121 - />
122 - {/* <div rickshaw-chart [series]="series" [height]="100" [renderer]="'multi'"
123 - [configureProps]="{gapSize: 0.5, min: 'auto', strokeWidth: 3}"></div> */}
124 - </div>
125 - <h4 className={s.chartTitle}><span className="fw-normal">Salt Lake City</span>, Utah</h4>
126 - <p className="deemphasize">Today 13:34</p>
127 - <div className="mt">
128 - <Row>
129 - <Col xs={6}>
130 - <p className="h4 m-0">18.7M</p>
131 - <p className="deemphasize">Shares Traded</p>
132 - </Col>
133 - <Col xs={6} className="text-right">
134 - <p className="h4 m-0">19.9B</p>
135 - <p className="deemphasize">Market Cap</p>
136 - </Col>
137 - </Row>
138 - </div>
139 - <div className="mt">
140 - <Row>
141 - <Col xs={6}>
142 - <p className="h3 m-0 text-success fw-semi-bold">+120.93</p>
143 - <p className="deemphasize">Yearly Change</p>
144 - </Col>
145 - <Col xs={6} className="text-right">
146 - <div
147 - className="sparkline" ref={(r) => {
148 - this.sparklineRef = r;
149 - }}
150 - />
151 - <Sparklines data={this.state.sparklineData} options={this.state.sparklineOptions} />
152 - <p className="deemphasize">GOOG</p>
153 - </Col>
154 - </Row>
155 - </div>
156 - </div>
157 - );
158 - }
159 -}
160 -
161 -export default ChangesChart;
1 -@import '../../../../../styles/app';
2 -
3 -.changesChart {
4 - .chart {
5 - margin: -$widget-padding-vertical (-$widget-padding-horizontal) 0;
6 - padding: $widget-padding-vertical 0 0;
7 - }
8 -
9 - .chartTitle {
10 - margin: 20px 0 0;
11 - }
12 -
13 - .chartValue,
14 - .chartValueChange {
15 - padding: 0 $widget-padding-horizontal;
16 - }
17 -
18 - .chartValue {
19 - margin-bottom: 0;
20 - font-weight: $font-weight-bold;
21 - font-size: 21px;
22 - line-height: 1;
23 - color: $white;
24 - }
25 -
26 - .chartValueChange {
27 - color: rgba($white, 0.7);
28 - font-size: $small-font-size;
29 - margin-bottom: $spacer;
30 - }
31 -}
1 -import React from 'react';
2 -import {
3 - Row,
4 - Col,
5 - Button,
6 - Badge,
7 -} from 'reactstrap';
8 -import ReactFlot from 'react-flot';
9 -
10 -import Widget from '../../../../../components/Widget';
11 -import s from './FlotCharts.module.scss';
12 -
13 -class FlotCharts extends React.Component {
14 - static generateRandomData(labels) {
15 - function random() {
16 - return (Math.floor(Math.random() * 30)) + 10;
17 - }
18 -
19 - const data = [];
20 - let maxValueIndex = 5;
21 -
22 - for (let i = 0; i < labels.length; i += 1) {
23 - const randomSeries = [];
24 - for (let j = 0; j < 25; j += 1) {
25 - randomSeries.push([j, Math.floor(maxValueIndex * j) + random()]);
26 - }
27 - maxValueIndex -= 1;
28 - data.push({
29 - data: randomSeries,
30 - showLabels: true,
31 - label: labels[i].label,
32 - labelPlacement: 'below',
33 - canvasRender: true,
34 - cColor: 'red',
35 - color: labels[i].color,
36 - });
37 - }
38 - return data;
39 - }
40 -
41 - render() {
42 - const flotOptions = {
43 - series: {
44 - lines: {
45 - show: true,
46 - lineWidth: 1,
47 - fill: false,
48 - fillColor: { colors: [{ opacity: 0.001 }, { opacity: 0.5 }] },
49 - },
50 - points: {
51 - show: false,
52 - fill: true,
53 - },
54 - shadowSize: 0,
55 - },
56 - legend: false,
57 - grid: {
58 - show: false,
59 - margin: 0,
60 - labelMargin: 0,
61 - axisMargin: 0,
62 - hoverable: true,
63 - clickable: true,
64 - tickColor: 'rgba(255,255,255,1)',
65 - borderWidth: 0,
66 - },
67 - };
68 -
69 - const generateData = this.constructor.generateRandomData;
70 -
71 - return (<Row>
72 - <Col lg={6} xs={12}>
73 - <Widget
74 - title={<Row>
75 - <Col xs={4}>
76 - <h6>
77 - Total Sales
78 - </h6>
79 - <p className="value5">
80 - January, 2018
81 - </p>
82 - </Col>
83 - <Col xs={4}>
84 - <h5>
85 - <small>Best</small>
86 - </h5>
87 - <p className="value6 fs-sm">
88 - March, 2018 + 1
89 - </p>
90 - </Col>
91 - </Row>}
92 - settings close
93 - >
94 - <div className="chart-stats">
95 - <p className="text-muted fs-mini mt-xs">
96 - <i className="fi flaticon-placeholder fa-5x pull-left mr-3" />
97 - <span className="fw-semi-bold text-gray-dark">Jess:</span> Seems like statically it&apos;s getting impossible
98 - to achieve any sort of
99 - results in nearest future. The only thing we can hope for is pressing one of these two buttons:
100 - </p>
101 - <div className="btn-toolbar">
102 - <Button color="success" size="xs">Accept</Button>
103 - <Button color="default" size="xs">Reject</Button>
104 - </div>
105 - </div>
106 - <div className={`${s.chart} bg-body-light`}>
107 - <ReactFlot
108 - id="product-chart-1"
109 - data={
110 - generateData([{
111 - label: 'Visitors', color: '#777',
112 - }, {
113 - label: 'Charts', color: '#dd5826',
114 - }])}
115 - options={flotOptions}
116 - height={'100%'}
117 - />
118 - </div>
119 - </Widget>
120 - </Col>
121 - <Col lg={6} xs={12}>
122 - <Widget
123 - className=" widget-chart-stats-simple" title={<Row>
124 - <Col xs={12}>
125 - <h6 className="mb-0">
126 - <span className="fw-semi-bold">Budget</span>&nbsp;<Badge pill color="danger">2019</Badge>
127 - </h6>
128 - <span className="text-muted fs-mini">monthly report will be available in <button className="btn-link">6 hours</button></span>
129 - </Col>
130 - </Row>}
131 - settings close
132 - >
133 - <div className="chart-stats">
134 - <div className="row">
135 - <div className="col-md-5">
136 - <div className="clearfix m-t-1">
137 - <h6 className="pull-left text-muted mb-xs">
138 - Income
139 - </h6>
140 - <p className="pull-right h6 mb-xs">
141 - <span className="fw-semi-bold">$14,595</span>
142 - </p>
143 - </div>
144 - <div className="clearfix">
145 - <h6 className="pull-left no-margin text-muted">
146 - Recent
147 - </h6>
148 - <p className="pull-right">
149 - <span className="fw-semi-bold">$7,647</span>
150 - </p>
151 - </div>
152 - </div>
153 - <div className="col-md-3 text-right m-t-1">
154 - <h6 className="text-muted mb-xs">Inqueries</h6>
155 - <p className="fw-semi-bold">73 at 14am</p>
156 - </div>
157 - <div className="col-md-4 text-right m-t-1">
158 - <h6 className="text-muted mb-xs">Last Updated</h6>
159 - <p className="fw-semi-bold">23.06.2013</p>
160 - </div>
161 - </div>
162 - </div>
163 - <div className={`${s.chart} bg-body-light`}>
164 - <ReactFlot
165 - id="product-chart-2"
166 - data={
167 - generateData([{
168 - label: 'Controllers', color: '#777',
169 - }, {
170 - label: 'Scopes', color: '#f0b518',
171 - }])}
172 - options={flotOptions}
173 - height={'100%'}
174 - />
175 - </div>
176 - </Widget>
177 - </Col>
178 - </Row>
179 - );
180 - }
181 -}
182 -
183 -export default FlotCharts;
1 -@import '../../../../../styles/app';
2 -
3 -.chart {
4 - height: 200px;
5 - margin: $spacer/2 (-$widget-padding-horizontal) (-$widget-padding-vertical);
6 -}
1 -import React from 'react';
2 -import $ from 'jquery'
3 -import PropTypes from 'prop-types';
4 -/* eslint-disable */
5 -import 'metrojs/release/MetroJs.Full/MetroJs';
6 -/* eslint-enable */
7 -
8 -import './LiveTile.scss';
9 -
10 -class LiveTile extends React.Component {
11 - static propTypes = {
12 - children: PropTypes.oneOfType([
13 - PropTypes.arrayOf(PropTypes.node),
14 - PropTypes.node,
15 - ]),
16 - };
17 -
18 - static defaultProps = {
19 - children: null,
20 - };
21 -
22 - constructor(props) {
23 - super(props);
24 - this.state = {
25 - id: `live-tile-${Math.floor(Math.random() * 255)}`,
26 - };
27 - }
28 -
29 - componentDidMount() {
30 - const el = $(`#${this.state.id}`);
31 - el.css('height', el.data('height'))
32 - .liveTile();
33 - }
34 -
35 - render() {
36 - const {
37 - children,
38 - ...attr
39 - } = this.props;
40 - return (
41 - <div {...attr} id={this.state.id} className="live-tile">
42 - {children}
43 - </div>
44 - );
45 - }
46 -}
47 -
48 -export default LiveTile;
1 -@import '../../../../../styles/app';
2 -
3 -/* Live Tiles */
4 -.live-tile,
5 -.list-tile,
6 -.copy-tile,
7 -.tile-strip .flip-list > li {
8 - height: auto;
9 - min-width: 100%;
10 - margin: 0 !important;
11 - color: inherit !important;
12 -
13 - &.fade {
14 - opacity: 1;
15 - }
16 -}
17 -
18 -.live-tile p,
19 -.list-tile p,
20 -.copy-tile p {
21 - padding: 0 !important;
22 -}
23 -
24 -.live-tile p,
25 -.list-tile p,
26 -.copy-tile p,
27 -.live-tile .face,
28 -.list-tile .face,
29 -.copy-tile .face {
30 - &.h1 {
31 - font-size: $h1-font-size;
32 - }
33 -
34 - &.h2 {
35 - font-size: $h2-font-size;
36 - }
37 -
38 - &.h3 {
39 - font-size: $h3-font-size;
40 - }
41 -
42 - &.h4 {
43 - font-size: $h4-font-size;
44 - }
45 -
46 - &.h5 {
47 - font-size: $h5-font-size;
48 - }
49 -
50 - &.h6 {
51 - font-size: $h6-font-size;
52 - }
53 -
54 - $font-sizes: $h1-font-size, $h2-font-size, $h3-font-size, $h4-font-size, $h5-font-size, $h6-font-size;
55 - $i: 1;
56 -
57 - @each $font-size in $font-sizes {
58 - &.value#{$i} {
59 - font-size: $font-size;
60 - }
61 - $i: $i + 1;
62 - }
63 -}
1 -import React from 'react';
2 -
3 -import $ from 'jquery';
4 -import Sparklines from '../../../../../components/Sparklines';
5 -
6 -class NasdaqSparkline extends React.Component {
7 -
8 - render() {
9 - const data = [[4, 6, 5, 7, 5]];
10 - const options = {
11 - type: 'line',
12 - width: '99%',
13 - height: '60',
14 - lineColor: '#666',
15 - fillColor: 'transparent',
16 - spotRadius: 5,
17 - spotColor: '#666',
18 - valueSpots: { '0:': '#666' },
19 - highlightSpotColor: '#fff',
20 - highlightLineColor: '#666',
21 - minSpotColor: '#666',
22 - maxSpotColor: '#dd5826',
23 - tooltipFormat: new $
24 - .SPFormatClass('<span style="color: white">&#9679;</span> {{prefix}}{{y}}{{suffix}}'),
25 - chartRangeMin: Math.min.apply(null, data) - 1,
26 - };
27 -
28 -
29 - return (
30 - <Sparklines data={data} options={options} />
31 - );
32 - }
33 -}
34 -
35 -export default NasdaqSparkline;
1 -import React from 'react';
2 -import {
3 - Progress,
4 -} from 'reactstrap';
5 -import Rickshaw from 'rickshaw';
6 -
7 -
8 -class RealtimeTraffic extends React.Component {
9 - state = { graph: null }
10 - constructor(prop) {
11 - super(prop);
12 - this.onResizeRickshaw = this.onResizeRickshaw.bind(this);
13 - }
14 -
15 - componentDidMount() {
16 - this.initChart();
17 - window.addEventListener('resize', this.onResizeRickshaw);
18 - }
19 -
20 - componentWillUnmount() {
21 - window.removeEventListener('resize', this.onResizeRickshaw);
22 - }
23 -
24 - onResizeRickshaw() {
25 - this.graph.configure({ height: 130 });
26 - this.graph.render();
27 - }
28 -
29 - initChart() {
30 - const seriesData = [[], []];
31 - const random = new Rickshaw.Fixtures.RandomData(30);
32 -
33 - for (let i = 0; i < 30; i += 1) {
34 - random.addData(seriesData);
35 - }
36 - this.graph = new Rickshaw.Graph({
37 - element: this.rickshawChart,
38 - height: 130,
39 - realtime: true,
40 - series: [
41 - {
42 - color: '#343434', // 'gray-dark'
43 - data: seriesData[0],
44 - name: 'Uploads',
45 - }, {
46 - color: '#666', // gray,
47 - data: seriesData[1],
48 - name: 'Downloads',
49 - },
50 - ],
51 - });
52 -
53 - const hoverDetail = new Rickshaw.Graph.HoverDetail({
54 - graph: this.graph,
55 - xFormatter: x => new Date(x * 1000).toString(),
56 - });
57 -
58 - hoverDetail.show();
59 -
60 - setInterval(() => {
61 - random.removeData(seriesData);
62 - random.addData(seriesData);
63 - this.graph.update();
64 - }, 1000);
65 -
66 - this.graph.render();
67 - }
68 -
69 - render() {
70 - return (
71 - <div>
72 - <h4 className="mb-lg">Recent <span className="fw-semi-bold">Update</span></h4>
73 - <h6>Node.js <span className="fw-semi-bold">4.0.1 distribution</span></h6>
74 - <Progress className="bg-gray-lighter progress-xs" color="danger" value="77" />
75 - <p className="mt-sm mb fs-mini ">
76 - <small><span className="circle bg-warning text-gray-dark"><i
77 - className="glyphicon glyphicon-chevron-up"
78 - /></span></small>
79 - <strong className="px-1">17% higher</strong>
80 - than last month
81 - </p>
82 - <p className="fs-sm text-gray-lighter mb-0">Remaining hours</p>
83 - <button className="btn btn-xs btn-gray pull-right ml-xs">
84 - <i className="fa fa-compress" /> track
85 - </button>
86 - <button className="btn btn-xs btn-gray pull-right">
87 - <i className="fa fa-pause" /> pause
88 - </button>
89 - <p className="value4">2h 56m</p>
90 - <br />
91 - <div
92 - ref={(r) => {
93 - this.rickshawChart = r;
94 - }} className="text-gray-dark chart-overflow-bottom" style={{ height: '130px' }}
95 - />
96 - </div>
97 - );
98 - }
99 -}
100 -
101 -export default RealtimeTraffic;
This diff could not be displayed because it is too large.
1 -import React from 'react';
2 -import { Nav, NavItem, NavLink } from 'reactstrap';
3 -/* eslint-disable */
4 -import $ from 'jquery';
5 -import 'imports-loader?$=jquery,this=>window!jquery-mapael/js/maps/world_countries';
6 -import 'imports-loader?$=jquery,this=>window!jquery-mapael/js/jquery.mapael';
7 -/* eslint-enable */
8 -import './YearsMap.scss';
9 -import fakeWorldData from './MapData';
10 -
11 -class YearsMap extends React.Component {
12 - constructor(prop) {
13 - super(prop);
14 - this.state = {
15 - activeYear: 2019,
16 - };
17 - this.triggerYear = this.triggerYear.bind(this);
18 - }
19 -
20 - componentDidMount() {
21 - this.init();
22 - }
23 -
24 - init() {
25 - const $map = $('#mapael');
26 - const data = {
27 - map: {
28 - name: 'world_countries',
29 - defaultArea: {
30 - attrs: {
31 - fill: '#eee', // gray-lighter
32 - stroke: '#666', // 'gray'
33 - 'stroke-width': 0.1,
34 - },
35 - attrsHover: {
36 - fill: '#999', // gray-light,
37 - animDuration: 100,
38 - },
39 - },
40 - defaultPlot: {
41 - size: 17,
42 - attrs: {
43 - fill: '#f0b518', // brand-warning,
44 - stroke: '#fff',
45 - 'stroke-width': 0,
46 - 'stroke-linejoin': 'round',
47 - },
48 - attrsHover: {
49 - 'stroke-width': 1,
50 - animDuration: 100,
51 - },
52 - },
53 - zoom: {
54 - enabled: true,
55 - step: 1,
56 - maxLevel: 10,
57 - mousewheel: false,
58 - },
59 - },
60 - legend: {
61 - area: {
62 - display: false,
63 - slices: [
64 - {
65 - max: 5000000,
66 - attrs: {
67 - fill: 'rgb(245, 249, 251)', // lightenColor('#ebeff1', .04)
68 - },
69 - label: 'Less than 5M',
70 - },
71 - {
72 - min: 5000000,
73 - max: 10000000,
74 - attrs: {
75 - fill: '#ebeff1',
76 - },
77 - label: 'Between 5M and 10M',
78 - },
79 - {
80 - min: 10000000,
81 - max: 50000000,
82 - attrs: {
83 - fill: '#eee', // gray-lighter
84 - },
85 - label: 'Between 10M and 50M',
86 - },
87 - {
88 - min: 50000000,
89 - attrs: {
90 - fill: 'rgb(209, 213, 215)', // darkenColor('#ebeff1', .1)
91 - },
92 - label: 'More than 50M',
93 - },
94 - ],
95 - },
96 - },
97 - areas: fakeWorldData[this.state.activeYear].areas,
98 - };
99 - const height = 394;
100 - $map.css('height', height);
101 - if ($map.parents('.widget')[0]) {
102 - $map.find('.map').css('height', parseInt($map.parents('.widget').css('height'), 10) - 35);
103 - }
104 - $map.mapael(data);
105 - $map.trigger('zoom', { level: 6, latitude: 59.599254, longitude: 8.863224 });
106 - }
107 -
108 - triggerYear(year) {
109 - this.setState({
110 - activeYear: year,
111 - });
112 - const $map = $('#mapael');
113 - $map.trigger('update', [{
114 - mapOptions: fakeWorldData[year],
115 - animDuration: 300,
116 - }]);
117 - }
118 -
119 - render() {
120 - return (<div>
121 - <div className="mapael" id="mapael">
122 - <div className="stats">
123 - <h6 className="text-gray-dark">YEARLY <span className="fw-semi-bold">DISTRIBUTIONS</span></h6>
124 - <span className="pull-left mr-xs">
125 - <small><span className="circle bg-warning text-gray-dark">
126 - <i className="fa fa-plus" /></span></small>
127 - </span>
128 - <p className="h4 m-0">
129 - <strong>17% last year</strong>
130 - </p>
131 - </div>
132 - <div className="map">
133 - <span>Alternative content for the map</span>
134 - </div>
135 - <div className="areaLegend">
136 - <span>Alternative content for the legend</span>
137 - </div>
138 - </div>
139 - <Nav className="map-controls" pills fill>
140 - <NavItem>
141 - <NavLink active={this.state.activeYear === 2014} onClick={() => this.triggerYear(2014)}>2014</NavLink>
142 - </NavItem>
143 - <NavItem>
144 - <NavLink active={this.state.activeYear === 2015} onClick={() => this.triggerYear(2015)}>2015</NavLink>
145 - </NavItem>
146 - <NavItem>
147 - <NavLink active={this.state.activeYear === 2016} onClick={() => this.triggerYear(2016)}>2016</NavLink>
148 - </NavItem>
149 - <NavItem>
150 - <NavLink active={this.state.activeYear === 2017} onClick={() => this.triggerYear(2017)}>2017</NavLink>
151 - </NavItem>
152 - <NavItem>
153 - <NavLink active={this.state.activeYear === 2018} onClick={() => this.triggerYear(2018)}>2018</NavLink>
154 - </NavItem>
155 - <NavItem>
156 - <NavLink active={this.state.activeYear === 2019} onClick={() => this.triggerYear(2019)}>2019</NavLink>
157 - </NavItem>
158 - </Nav>
159 - </div>);
160 - }
161 -}
162 -
163 -export default YearsMap;
1 -@import '../../../../../styles/app';
2 -
3 -/* Mapael */
4 -.mapTooltip {
5 - position: fixed;
6 - padding: 2px;
7 - z-index: 1000;
8 - max-width: 200px;
9 - display: none;
10 - background-color: #fff;
11 - border: 1px solid #ccc;
12 - border-radius: $border-radius;
13 - font-size: $font-size-sm;
14 - color: $text-color;
15 -}
16 -
17 -.zoomIn,
18 -.zoomOut {
19 - position: absolute;
20 - bottom: 10px;
21 - left: 10px;
22 - width: 20px;
23 - height: 20px;
24 - box-sizing: content-box;
25 - border: 1px solid #ccc;
26 - background-color: #fff;
27 - color: $text-color;
28 - line-height: 20px;
29 - text-align: center;
30 - border-radius: $border-radius;
31 - cursor: pointer;
32 - font-weight: $font-weight-bold;
33 - user-select: none;
34 -}
35 -
36 -.zoomOut {
37 - left: 36px;
38 -}
39 -
40 -.mapael {
41 - position: relative;
42 - margin: (-$widget-padding-vertical) (-$widget-padding-horizontal) 0;
43 -
44 - .map {
45 - position: relative;
46 - height: calc(100% - 20px);
47 - }
48 -
49 - .stats {
50 - position: absolute;
51 - z-index: 1;
52 - top: 0;
53 - left: 0;
54 - margin: 5% 10%;
55 - }
56 -}
57 -
58 -/* Part:Map Controls */
59 -.map-controls {
60 - position: absolute;
61 - bottom: 0;
62 - left: 0;
63 - right: 0;
64 - border-top: 1px solid #bbb;
65 - background-color: $addition-bg;
66 - border-bottom-left-radius: $border-radius;
67 - border-bottom-right-radius: $border-radius;
68 -
69 - > .nav-item > .nav-link {
70 - border-radius: 0;
71 - padding: 0.7143rem 0;
72 - color: $text-color;
73 -
74 - &:hover {
75 - background-color: $gray-200;
76 - color: $text-color;
77 - }
78 - }
79 -
80 - > .nav-item > .nav-link.active {
81 - &,
82 - &:hover {
83 - background-color: $white;
84 - color: $text-color;
85 - font-weight: $font-weight-bold;
86 - }
87 - }
88 -
89 - > .nav-item:first-child > a {
90 - border-bottom-left-radius: $border-radius;
91 - }
92 -
93 - > .nav-item:last-child > a {
94 - border-bottom-right-radius: $border-radius;
95 - }
96 -}
97 -
98 -.map svg {
99 - height: 100%;
100 - width: 100%;
101 -}
102 -
1 -{
2 - "name": "widgets",
3 - "version": "0.0.0",
4 - "main": "./Widgets.js",
5 - "private": true
6 -}
1 import React, { PureComponent } from 'react'; 1 import React, { PureComponent } from 'react';
2 import { connect } from 'react-redux'; 2 import { connect } from 'react-redux';
3 -import Widget from '../../components/Widget'; 3 +import Widget from '../../components/Widget/Widget';
4 4
5 class Subject extends PureComponent { 5 class Subject extends PureComponent {
6 async componentDidUpdate() { 6 async componentDidUpdate() {
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
6 Col, 6 Col,
7 } from 'reactstrap'; 7 } from 'reactstrap';
8 8
9 -import Widget from '../../components/Widget'; 9 +import Widget from '../../components/Widget/Widget';
10 10
11 import s from './VideoAnalysis.module.scss'; 11 import s from './VideoAnalysis.module.scss';
12 12
......
1 +// This optional code is used to register a service worker.
2 +// register() is not called by default.
3 +
4 +// This lets the app load faster on subsequent visits in production, and gives
5 +// it offline capabilities. However, it also means that developers (and users)
6 +// will only see deployed updates on subsequent visits to a page, after all the
7 +// existing tabs open on the page have been closed, since previously cached
8 +// resources are updated in the background.
9 +
10 +// To learn more about the benefits of this model and instructions on how to
11 +// opt-in, read https://bit.ly/CRA-PWA
12 +
13 +const isLocalhost = Boolean(
14 + window.location.hostname === 'localhost' ||
15 + // [::1] is the IPv6 localhost address.
16 + window.location.hostname === '[::1]' ||
17 + // 127.0.0.0/8 are considered localhost for IPv4.
18 + window.location.hostname.match(
19 + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 + )
21 +);
22 +
23 +export function register(config) {
24 + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 + // The URL constructor is available in all browsers that support SW.
26 + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 + if (publicUrl.origin !== window.location.origin) {
28 + // Our service worker won't work if PUBLIC_URL is on a different origin
29 + // from what our page is served on. This might happen if a CDN is used to
30 + // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 + return;
32 + }
33 +
34 + window.addEventListener('load', () => {
35 + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 +
37 + if (isLocalhost) {
38 + // This is running on localhost. Let's check if a service worker still exists or not.
39 + checkValidServiceWorker(swUrl, config);
40 +
41 + // Add some additional logging to localhost, pointing developers to the
42 + // service worker/PWA documentation.
43 + navigator.serviceWorker.ready.then(() => {
44 + console.log(
45 + 'This web app is being served cache-first by a service ' +
46 + 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 + );
48 + });
49 + } else {
50 + // Is not localhost. Just register service worker
51 + registerValidSW(swUrl, config);
52 + }
53 + });
54 + }
55 +}
56 +
57 +function registerValidSW(swUrl, config) {
58 + navigator.serviceWorker
59 + .register(swUrl)
60 + .then(registration => {
61 + registration.onupdatefound = () => {
62 + const installingWorker = registration.installing;
63 + if (installingWorker == null) {
64 + return;
65 + }
66 + installingWorker.onstatechange = () => {
67 + if (installingWorker.state === 'installed') {
68 + if (navigator.serviceWorker.controller) {
69 + // At this point, the updated precached content has been fetched,
70 + // but the previous service worker will still serve the older
71 + // content until all client tabs are closed.
72 + console.log(
73 + 'New content is available and will be used when all ' +
74 + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 + );
76 +
77 + // Execute callback
78 + if (config && config.onUpdate) {
79 + config.onUpdate(registration);
80 + }
81 + } else {
82 + // At this point, everything has been precached.
83 + // It's the perfect time to display a
84 + // "Content is cached for offline use." message.
85 + console.log('Content is cached for offline use.');
86 +
87 + // Execute callback
88 + if (config && config.onSuccess) {
89 + config.onSuccess(registration);
90 + }
91 + }
92 + }
93 + };
94 + };
95 + })
96 + .catch(error => {
97 + console.error('Error during service worker registration:', error);
98 + });
99 +}
100 +
101 +function checkValidServiceWorker(swUrl, config) {
102 + // Check if the service worker can be found. If it can't reload the page.
103 + fetch(swUrl, {
104 + headers: { 'Service-Worker': 'script' },
105 + })
106 + .then(response => {
107 + // Ensure service worker exists, and that we really are getting a JS file.
108 + const contentType = response.headers.get('content-type');
109 + if (
110 + response.status === 404 ||
111 + (contentType != null && contentType.indexOf('javascript') === -1)
112 + ) {
113 + // No service worker found. Probably a different app. Reload the page.
114 + navigator.serviceWorker.ready.then(registration => {
115 + registration.unregister().then(() => {
116 + window.location.reload();
117 + });
118 + });
119 + } else {
120 + // Service worker found. Proceed as normal.
121 + registerValidSW(swUrl, config);
122 + }
123 + })
124 + .catch(() => {
125 + console.log(
126 + 'No internet connection found. App is running in offline mode.'
127 + );
128 + });
129 +}
130 +
131 +export function unregister() {
132 + if ('serviceWorker' in navigator) {
133 + navigator.serviceWorker.ready
134 + .then(registration => {
135 + registration.unregister();
136 + })
137 + .catch(error => {
138 + console.error(error.message);
139 + });
140 + }
141 +}
1 -.auth-page {
2 - padding-top: 10vh;
3 - height: 100vh;
4 -}
5 -
6 -.widget-auth {
7 - max-width: 360px;
8 - padding: 30px !important;
9 -
10 - h1,
11 - h2,
12 - h3,
13 - h4,
14 - h5,
15 - h6 {
16 - font-weight: $font-weight-normal;
17 - text-align: center;
18 - }
19 -
20 - .widget-auth-info {
21 - font-size: 13px;
22 - color: #888;
23 - margin-bottom: 0;
24 - text-align: center;
25 - }
26 -
27 - .auth-btn {
28 - width: 100%;
29 - }
30 -
31 - .social-buttons {
32 - display: flex;
33 - align-items: stretch;
34 - justify-content: center;
35 - flex-direction: column;
36 - margin: ($spacer) 0;
37 -
38 - .social-button {
39 - display: flex;
40 - align-items: center;
41 - padding: 0;
42 - position: relative;
43 - height: 30px;
44 - }
45 -
46 - .social-icon {
47 - position: absolute;
48 - left: 1px;
49 - width: 26px;
50 - height: 26px;
51 - padding: 0;
52 - transition: all .2s ease-in-out;
53 - border-radius: 3px;
54 - background-color: $white;
55 - }
56 -
57 - .social-text {
58 - margin: 0 auto;
59 - font-size: $font-size-sm;
60 - }
61 -
62 - .social-google {
63 - background-size: 100%;
64 - background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIzOHB4IiBoZWlnaHQ9IjM4cHgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5BcnRib2FyZDwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZyBpZD0iQXJ0Ym9hcmQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImJ0bl9nb29nbGVfZGFya19ub3JtYWxfaW9zIj4gICAgICAgICAgICA8ZyBpZD0iYnV0dG9uLWJnLWNvcHkiPiAgICAgICAgICAgICAgICA8cmVjdCBpZD0icGF0aC0zIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHJ4PSIxIj48L3JlY3Q+ICAgICAgICAgICAgPC9nPiAgICAgICAgICAgIDxnIGlkPSJsb2dvX2dvb2dsZWdfNDhkcCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCAxMC4wMDAwMDApIj4gICAgICAgICAgICAgICAgPHBhdGggZD0iTTE3LjY0LDkuMjA0NTQ1NDUgQzE3LjY0LDguNTY2MzYzNjQgMTcuNTgyNzI3Myw3Ljk1MjcyNzI3IDE3LjQ3NjM2MzYsNy4zNjM2MzYzNiBMOSw3LjM2MzYzNjM2IEw5LDEwLjg0NSBMMTMuODQzNjM2NCwxMC44NDUgQzEzLjYzNSwxMS45NyAxMy4wMDA5MDkxLDEyLjkyMzE4MTggMTIuMDQ3NzI3MywxMy41NjEzNjM2IEwxMi4wNDc3MjczLDE1LjgxOTU0NTUgTDE0Ljk1NjM2MzYsMTUuODE5NTQ1NSBDMTYuNjU4MTgxOCwxNC4yNTI3MjczIDE3LjY0LDExLjk0NTQ1NDUgMTcuNjQsOS4yMDQ1NDU0NSBaIiBpZD0iU2hhcGUiIGZpbGw9IiM0Mjg1RjQiPjwvcGF0aD4gICAgICAgICAgICAgICAgPHBhdGggZD0iTTksMTggQzExLjQzLDE4IDEzLjQ2NzI3MjcsMTcuMTk0MDkwOSAxNC45NTYzNjM2LDE1LjgxOTU0NTUgTDEyLjA0NzcyNzMsMTMuNTYxMzYzNiBDMTEuMjQxODE4MiwxNC4xMDEzNjM2IDEwLjIxMDkwOTEsMTQuNDIwNDU0NSA5LDE0LjQyMDQ1NDUgQzYuNjU1OTA5MDksMTQuNDIwNDU0NSA0LjY3MTgxODE4LDEyLjgzNzI3MjcgMy45NjQwOTA5MSwxMC43MSBMMC45NTcyNzI3MjcsMTAuNzEgTDAuOTU3MjcyNzI3LDEzLjA0MTgxODIgQzIuNDM4MTgxODIsMTUuOTgzMTgxOCA1LjQ4MTgxODE4LDE4IDksMTggWiIgaWQ9IlNoYXBlIiBmaWxsPSIjMzRBODUzIj48L3BhdGg+ICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0zLjk2NDA5MDkxLDEwLjcxIEMzLjc4NDA5MDkxLDEwLjE3IDMuNjgxODE4MTgsOS41OTMxODE4MiAzLjY4MTgxODE4LDkgQzMuNjgxODE4MTgsOC40MDY4MTgxOCAzLjc4NDA5MDkxLDcuODMgMy45NjQwOTA5MSw3LjI5IEwzLjk2NDA5MDkxLDQuOTU4MTgxODIgTDAuOTU3MjcyNzI3LDQuOTU4MTgxODIgQzAuMzQ3NzI3MjczLDYuMTczMTgxODIgMCw3LjU0NzcyNzI3IDAsOSBDMCwxMC40NTIyNzI3IDAuMzQ3NzI3MjczLDExLjgyNjgxODIgMC45NTcyNzI3MjcsMTMuMDQxODE4MiBMMy45NjQwOTA5MSwxMC43MSBaIiBpZD0iU2hhcGUiIGZpbGw9IiNGQkJDMDUiPjwvcGF0aD4gICAgICAgICAgICAgICAgPHBhdGggZD0iTTksMy41Nzk1NDU0NSBDMTAuMzIxMzYzNiwzLjU3OTU0NTQ1IDExLjUwNzcyNzMsNC4wMzM2MzYzNiAxMi40NDA0NTQ1LDQuOTI1NDU0NTUgTDE1LjAyMTgxODIsMi4zNDQwOTA5MSBDMTMuNDYzMTgxOCwwLjg5MTgxODE4MiAxMS40MjU5MDkxLDAgOSwwIEM1LjQ4MTgxODE4LDAgMi40MzgxODE4MiwyLjAxNjgxODE4IDAuOTU3MjcyNzI3LDQuOTU4MTgxODIgTDMuOTY0MDkwOTEsNy4yOSBDNC42NzE4MTgxOCw1LjE2MjcyNzI3IDYuNjU1OTA5MDksMy41Nzk1NDU0NSA5LDMuNTc5NTQ1NDUgWiIgaWQ9IlNoYXBlIiBmaWxsPSIjRUE0MzM1Ij48L3BhdGg+ICAgICAgICAgICAgICAgIDxwb2x5Z29uIGlkPSJTaGFwZSIgcG9pbnRzPSIwIDAgMTggMCAxOCAxOCAwIDE4Ij48L3BvbHlnb24+ICAgICAgICAgICAgPC9nPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+");
65 - }
66 -
67 - .social-microsoft {
68 - background-repeat: no-repeat;
69 - background-size: 50%;
70 - background-position-x: 50%;
71 - background-position-y: 50%;
72 - }
73 -
74 - }
75 -}
76 -
77 -.auth-footer {
78 - margin-bottom: 25px;
79 - font-size: 13px;
80 - color: #636c72;
81 - text-align: center;
82 -
83 - @media (min-height: 600px) {
84 - position: fixed;
85 - bottom: 0;
86 - left: 0;
87 - right: 0;
88 - }
89 -}
90 -
91 -.auth-logo {
92 - margin-top: 15px;
93 - margin-bottom: 40px;
94 - text-align: center;
95 - font-weight: $font-weight-normal;
96 -
97 - i {
98 - font-size: 13px;
99 - margin: 0 20px;
100 - }
101 -}
102 -
103 -
...@@ -7,27 +7,10 @@ ...@@ -7,27 +7,10 @@
7 @import 'variables'; 7 @import 'variables';
8 @import 'theme-variables'; 8 @import 'theme-variables';
9 @import '../../node_modules/bootstrap/scss/bootstrap'; 9 @import '../../node_modules/bootstrap/scss/bootstrap';
10 -@import '../../node_modules/glyphicons-halflings/scss/glyphicons-halflings';
11 -@import '../../node_modules/font-awesome/scss/font-awesome';
12 -@import '../../node_modules/line-awesome/dist/css/line-awesome.css';
13 -@import '../fonts/flaticon/flaticon';
14 @import '../../node_modules/animate.css/animate'; 10 @import '../../node_modules/animate.css/animate';
15 -@import '../../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox';
16 -@import '../../node_modules/messenger/build/css/messenger.css';
17 -@import '../../node_modules/messenger/build/css/messenger-theme-air.css';
18 -@import '../../node_modules/nvd3/build/nv.d3.css';
19 -@import '../../node_modules/rickshaw/rickshaw.css';
20 -@import '../../node_modules/react-table/react-table.css';
21 -@import '../../node_modules/react-bootstrap-table/dist/react-bootstrap-table-all.min.css';
22 -@import '../../node_modules/jvectormap/jquery-jvectormap.css';
23 -@import '../../node_modules/metrojs/release/MetroJs.Full/MetroJs.css';
24 -@import '../../node_modules/react-sortable-tree/style.css';
25 -@import '../../node_modules/react-toastify/dist/ReactToastify.css';
26 -@import '../../node_modules/react-tagsinput/react-tagsinput.css';
27 11
28 @import 'mixins'; 12 @import 'mixins';
29 @import 'base'; 13 @import 'base';
30 -@import 'auth';
31 @import 'overrides'; 14 @import 'overrides';
32 @import 'general'; 15 @import 'general';
33 @import 'utils'; 16 @import 'utils';
......
1 -{
2 - "root": "build/",
3 - "routes": {
4 - "/**": "index.html"
5 - }
6 -}
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.