├── test ├── notification-alert-test.js ├── .setup.js ├── notifications-test.js ├── loading-test.js ├── editable-field-test.js ├── preloader-test.js ├── tab-test.js ├── breadcrumbs-test.js ├── page-test.js ├── notifications-alert-test.js ├── textarea-test.js ├── alert-test.js ├── progress-bar-test.js ├── table-test.js ├── select-test.js ├── panel-test.js ├── switch-test.js └── modal-test.js ├── .eslintignore ├── circle.yml ├── .gitignore ├── .npmignore ├── src ├── assets │ ├── styles │ │ ├── blur │ │ │ ├── app │ │ │ │ ├── _table.scss │ │ │ │ ├── _tabsPage.scss │ │ │ │ ├── _notifications.scss │ │ │ │ ├── _buttonsPage.scss │ │ │ │ └── _modals.scss │ │ │ ├── theme │ │ │ │ ├── skins │ │ │ │ │ ├── _07_grey.scss │ │ │ │ │ ├── _05_material.scss │ │ │ │ │ ├── _03_blue.scss │ │ │ │ │ ├── _04_peachy.scss │ │ │ │ │ ├── _06_transblue.scss │ │ │ │ │ └── _02_transparent.scss │ │ │ │ ├── _blur-admin-theme.scss │ │ │ │ ├── components │ │ │ │ │ ├── _contentTop.scss │ │ │ │ │ ├── _pageTop.scss │ │ │ │ │ ├── _sidebar.scss │ │ │ │ │ └── _msgCenter.scss │ │ │ │ ├── conf │ │ │ │ │ ├── _variables.scss │ │ │ │ │ ├── colorScheme │ │ │ │ │ │ ├── _mint.scss │ │ │ │ │ │ └── _blur.scss │ │ │ │ │ └── _mixins.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _socicon.scss │ │ │ │ ├── _preloader.scss │ │ │ │ ├── bootstrap-overrides │ │ │ │ │ ├── _panel.scss │ │ │ │ │ └── _tabs.scss │ │ │ │ ├── _layout.scss │ │ │ │ ├── _buttons.scss │ │ │ │ └── _table.scss │ │ │ ├── 404.scss │ │ │ └── app.scss │ │ ├── readme.MD │ │ ├── bootstrap │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── app.scss │ │ ├── components │ │ │ └── search-bar.scss │ │ └── vendor │ │ │ ├── toastr.min.scss │ │ │ ├── bootstrap-select.min.scss │ │ │ └── bootstrap-switch.min.scss │ ├── img │ │ ├── blue-bg.jpg │ │ ├── blur-bg.jpg │ │ ├── green-bg.jpg │ │ ├── peachy-bg.jpg │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── theme │ │ │ ├── palette.png │ │ │ ├── no-photo.png │ │ │ └── icon │ │ │ │ ├── feed │ │ │ │ ├── feed-video.svg │ │ │ │ ├── feed-location.svg │ │ │ │ └── feed-image.svg │ │ │ │ └── kameleon │ │ │ │ └── Alien.svg │ │ ├── transblue-bg.jpg │ │ ├── blur-bg-blurred.jpg │ │ ├── blur-bg-mobile.jpg │ │ ├── app │ │ │ ├── todo │ │ │ │ └── check-icon.png │ │ │ └── browsers │ │ │ │ ├── safari.svg │ │ │ │ ├── chrome.svg │ │ │ │ ├── opera.svg │ │ │ │ ├── ie.svg │ │ │ │ └── firefox.svg │ │ ├── person.svg │ │ ├── refresh.svg │ │ ├── face.svg │ │ ├── money.svg │ │ ├── arrow-green-up.svg │ │ ├── arrow-red-down.svg │ │ ├── shopping-cart.svg │ │ └── comments.svg │ └── fonts │ │ ├── socicon.eot │ │ ├── socicon.ttf │ │ ├── socicon.woff │ │ └── socicon.woff2 ├── loading.js ├── table-body.js ├── tab.js ├── preloader.js ├── lib │ └── event-bus.js ├── table-row.js ├── table-head.js ├── breadcrumbs.js ├── index.js ├── page.js ├── table.js ├── messages-alert.js ├── notification-alert.js ├── progress-bar.js ├── textarea.js ├── alert.js ├── panel.js ├── messages-alert-container.js ├── notifications-alert.js ├── switch.js ├── notifications.js ├── button.js ├── notification.js ├── editable-select.js ├── tabs.js ├── pagination.js ├── modal.js ├── editable-text.js └── input.js ├── .babelrc ├── .editorconfig ├── Makefile ├── LICENSE ├── readme.MD └── package.json /test/notification-alert-test.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | dist/** 3 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | node: 3 | version: v6.2.1 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | dist 4 | junit 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .eslintrc 2 | karma.conf.js 3 | Makefile 4 | test 5 | -------------------------------------------------------------------------------- /src/assets/styles/blur/app/_table.scss: -------------------------------------------------------------------------------- 1 | .table-panel { 2 | height: 295px; 3 | } 4 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015", 4 | "stage-1", 5 | "react" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/skins/_07_grey.scss: -------------------------------------------------------------------------------- 1 | body.badmin-grey { 2 | background: #bdbdbd; 3 | } -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/skins/_05_material.scss: -------------------------------------------------------------------------------- 1 | body.badmin-material { 2 | background: #039be6; 3 | } -------------------------------------------------------------------------------- /src/assets/img/blue-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/blue-bg.jpg -------------------------------------------------------------------------------- /src/assets/img/blur-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/blur-bg.jpg -------------------------------------------------------------------------------- /src/assets/img/green-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/green-bg.jpg -------------------------------------------------------------------------------- /src/assets/fonts/socicon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/fonts/socicon.eot -------------------------------------------------------------------------------- /src/assets/fonts/socicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/fonts/socicon.ttf -------------------------------------------------------------------------------- /src/assets/fonts/socicon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/fonts/socicon.woff -------------------------------------------------------------------------------- /src/assets/img/peachy-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/peachy-bg.jpg -------------------------------------------------------------------------------- /src/assets/fonts/socicon.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/fonts/socicon.woff2 -------------------------------------------------------------------------------- /src/assets/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/favicon-16x16.png -------------------------------------------------------------------------------- /src/assets/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/favicon-32x32.png -------------------------------------------------------------------------------- /src/assets/img/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/favicon-96x96.png -------------------------------------------------------------------------------- /src/assets/img/theme/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/theme/palette.png -------------------------------------------------------------------------------- /src/assets/img/transblue-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/transblue-bg.jpg -------------------------------------------------------------------------------- /src/assets/img/blur-bg-blurred.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/blur-bg-blurred.jpg -------------------------------------------------------------------------------- /src/assets/img/blur-bg-mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/blur-bg-mobile.jpg -------------------------------------------------------------------------------- /src/assets/img/theme/no-photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/theme/no-photo.png -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/skins/_03_blue.scss: -------------------------------------------------------------------------------- 1 | body.badmin-blue { 2 | background-image: url(../../../../img/blue-bg.jpg); 3 | } -------------------------------------------------------------------------------- /src/assets/img/app/todo/check-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/img/app/todo/check-icon.png -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/skins/_04_peachy.scss: -------------------------------------------------------------------------------- 1 | body.badmin-peachy { 2 | background-image: url(../../../../img/peachy-bg.jpg); 3 | } -------------------------------------------------------------------------------- /src/assets/styles/readme.MD: -------------------------------------------------------------------------------- 1 | # Themes 2 | 3 | You can swap out themes by changing what app.scss imports. 4 | 5 | - [Blur Theme](https://github.com/akveo/blur-admin) -------------------------------------------------------------------------------- /src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knledg/react-blur-admin/HEAD/src/assets/styles/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/loading.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class Loading extends React.Component { 4 | render() { 5 | return ( 6 | 7 | ); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /src/table-body.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class TableBody extends React.Component { 4 | render() { 5 | return ( 6 | 7 | {this.props.children} 8 | 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/img/person.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/skins/_06_transblue.scss: -------------------------------------------------------------------------------- 1 | body.badmin-transblue { 2 | background-image: url(../../../../img/transblue-bg.jpg); 3 | 4 | @include overrideColors(#fff); 5 | @include overridePanelBg(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9)); 6 | } -------------------------------------------------------------------------------- /src/assets/styles/app.scss: -------------------------------------------------------------------------------- 1 | @import 'bootstrap/css/bootstrap.min.scss'; 2 | @import 'vendor/bootstrap-select.min.scss'; 3 | @import 'vendor/bootstrap-switch.min.scss'; 4 | @import 'vendor/toastr.min.scss'; 5 | 6 | @import 'blur/app.scss'; /* Copyright (c) 2016 Akvemus GSC */ 7 | @import 'components/search-bar'; 8 | -------------------------------------------------------------------------------- /src/tab.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const Tab = ({ title, onClick }) => { 4 | return ( 5 | {title} 6 | ); 7 | }; 8 | 9 | Tab.propTypes = { 10 | title: React.PropTypes.string, 11 | onClick: React.PropTypes.func, 12 | name: React.PropTypes.string, 13 | }; 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BABEL = node_modules/.bin/babel 2 | 3 | export NODE_ENV = test 4 | 5 | .PHONY: build clean dist lint test 6 | 7 | build: 8 | $(BABEL) src/ --modules common --out-dir dist 9 | 10 | lint: 11 | npm run lint 12 | 13 | test: 14 | npm run test 15 | 16 | clean: 17 | rm -rf dist 18 | 19 | dist: 20 | make clean 21 | make build 22 | -------------------------------------------------------------------------------- /src/preloader.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class Preloader extends React.Component { 4 | render() { 5 | return ( 6 |
7 |
8 |
9 |
10 |
11 |
12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/assets/img/refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/.setup.js: -------------------------------------------------------------------------------- 1 | require('babel-register')(); 2 | 3 | if (!global.document) { // to make mocha's watch mode work 4 | const jsdom = require('jsdom').jsdom; 5 | global.document = jsdom(''); 6 | global.window = document.defaultView; 7 | global.navigator = global.window.navigator; 8 | global.self = document.defaultView; 9 | } 10 | -------------------------------------------------------------------------------- /test/notifications-test.js: -------------------------------------------------------------------------------- 1 | describe('', function() { 2 | it('Has default props'); 3 | 4 | it('Has a position'); 5 | 6 | it('Newest are on top'); 7 | 8 | it('Newest are not on top'); 9 | 10 | it('Max opened is rendered'); 11 | 12 | it('Prevent duplicates'); 13 | 14 | it('Do not prevent duplicates'); 15 | 16 | it('Are notifications rendering'); 17 | }); 18 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/_blur-admin-theme.scss: -------------------------------------------------------------------------------- 1 | .label { 2 | border-radius: 0; 3 | } 4 | 5 | .label-primary { 6 | background: $primary; 7 | } 8 | 9 | .label-info { 10 | background: $primary-light; 11 | } 12 | 13 | .label-success { 14 | background: $success; 15 | } 16 | 17 | .label-warning { 18 | background: $warning; 19 | } 20 | 21 | .label-danger { 22 | background: $danger; 23 | } -------------------------------------------------------------------------------- /test/loading-test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {shallow} from 'enzyme'; 3 | import {expect} from 'chai'; 4 | 5 | import { Loading } from '../src'; 6 | 7 | describe('', function() { 8 | it('Displays a spinner', function() { 9 | const component = shallow(); 10 | expect(component.find('i').hasClass('fa fa-spinner fa-spin')).to.equal(true); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/lib/event-bus.js: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'events'; 2 | import _ from 'lodash'; 3 | 4 | class EventBus extends EventEmitter { 5 | 6 | // this.emit('message', payload) if available by default 7 | 8 | addNotification(type, text, options) { 9 | const props = _.extend(options, { 10 | type, 11 | }); 12 | 13 | this.emit('notification', {text, props}); 14 | } 15 | } 16 | 17 | export const eventBus = new EventBus(); 18 | -------------------------------------------------------------------------------- /src/assets/img/face.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/assets/img/money.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/editable-field-test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {shallow} from 'enzyme'; 3 | import {expect} from 'chai'; 4 | 5 | import { EditableField } from '../src'; 6 | 7 | describe('', function() { 8 | it('Has default properties'); 9 | 10 | it('Has an onChange function'); 11 | 12 | it('Has an onValidate function'); 13 | 14 | it('Has a value of text'); 15 | 16 | it('Has a value of a component'); 17 | 18 | it('Has error is true'); 19 | 20 | it('Has error is false'); 21 | 22 | it('Has error help label'); 23 | 24 | }); 25 | 26 | -------------------------------------------------------------------------------- /src/table-row.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | 4 | export class TableRow extends React.Component { 5 | 6 | static propTypes = { 7 | noTopBorder: React.PropTypes.bool, 8 | } 9 | 10 | static defaultProps = { 11 | noTopBorder: true, 12 | } 13 | 14 | render() { 15 | const classes = cx({ 16 | 'no-top-border': this.props.noTopBorder, 17 | }); 18 | 19 | // black-muted-background 20 | return ( 21 | 22 | {this.props.children} 23 | 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/table-head.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | 4 | export class TableHead extends React.Component { 5 | 6 | static propTypes = { 7 | blackMutedBackground: React.PropTypes.bool, 8 | } 9 | 10 | static defaultProps = { 11 | blackMutedBackground: true, 12 | } 13 | 14 | render() { 15 | const classes = cx({ 16 | 'black-muted-bg': this.props.blackMutedBackground, 17 | }); 18 | 19 | return ( 20 | 21 | 22 | {this.props.children} 23 | 24 | 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/assets/img/app/browsers/safari.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/img/theme/icon/feed/feed-video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/preloader-test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {mount} from 'enzyme'; 3 | import {expect} from 'chai'; 4 | 5 | import { Preloader } from '../src'; 6 | 7 | describe('', function() { 8 | const component = mount(); 9 | 10 | it('Contains preloader container', function() { 11 | expect(component.find('div.preloader-component-container').length).to.equal(1); 12 | }); 13 | 14 | it('Contains preloader component', function() { 15 | expect(component.find('div.preloader-component').length).to.equal(1); 16 | }); 17 | 18 | it('Has a third nested div', function() { 19 | expect(component.find('div div div').length).to.equal(3); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/assets/styles/blur/app/_tabsPage.scss: -------------------------------------------------------------------------------- 1 | .tabset-group { 2 | > div + div { 3 | margin-top: 15px; 4 | } 5 | } 6 | 7 | 8 | .panel.tabs-panel{ 9 | .panel-body{ 10 | padding: 0; 11 | } 12 | .dropdown-menu{ 13 | min-width: 132px; 14 | top: auto; 15 | border: none; 16 | border-bottom-left-radius: 5px; 17 | border-bottom-right-radius: 5px; 18 | } 19 | &.with-scroll .panel-body{ 20 | height: 100%; 21 | } 22 | } 23 | 24 | .xsmall-panel { 25 | .nav-tabs, .tab-content{ 26 | height: 100%; 27 | } 28 | } 29 | .inline-icon{ 30 | display: inline-block; 31 | margin: 20px 5px; 32 | } 33 | .panel.horizontal-tabs { 34 | .tab-content{ 35 | height: calc(100% - 40px); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/components/_contentTop.scss: -------------------------------------------------------------------------------- 1 | .content-top { 2 | padding-top: 13px; 3 | padding-bottom: 27px; 4 | } 5 | 6 | h1.al-title { 7 | font-weight: $font-bold; 8 | color: #ffffff; 9 | float: left; 10 | width: auto; 11 | margin: 0; 12 | padding: 0; 13 | font-size: 24px; 14 | text-transform: uppercase; 15 | opacity: 0.9; 16 | } 17 | 18 | .al-breadcrumb { 19 | background: none; 20 | color: #ffffff; 21 | padding: 0; 22 | margin: 0; 23 | float: right; 24 | padding-top: 11px; 25 | li { 26 | font-size: 18px; 27 | font-weight: $font-light; 28 | } 29 | } 30 | 31 | .al-look { 32 | float: right; 33 | margin-right: 10px; 34 | padding-top: 10px; 35 | > a { 36 | font-size: 19px; 37 | } 38 | } -------------------------------------------------------------------------------- /src/breadcrumbs.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import React from 'react'; 3 | 4 | export class Breadcrumbs extends React.Component { 5 | 6 | static propTypes = { 7 | className: React.PropTypes.string, 8 | } 9 | 10 | static defaultProps = { 11 | className: '', 12 | } 13 | 14 | renderBreadcrumbs() { 15 | let breadcrumbs = this.props.children; 16 | if (!_.isArray(breadcrumbs)) { 17 | breadcrumbs = [breadcrumbs]; 18 | } 19 | return _.map(breadcrumbs, (breadcrumb, key) => { 20 | return ( 21 |
  • {breadcrumb}
  • 22 | ); 23 | }); 24 | } 25 | 26 | render() { 27 | return ( 28 |
      29 | {this.renderBreadcrumbs()} 30 |
    31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test/tab-test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import sinon from 'sinon'; 3 | import {expect} from 'chai'; 4 | import {mount} from 'enzyme'; 5 | import {noop} from 'lodash'; 6 | 7 | import { Tab } from '../src'; 8 | 9 | describe('', function() { 10 | const component = mount(); 11 | it('renders an a tag', function() { 12 | expect(component.find('a')).to.have.length(1); 13 | }); 14 | it('can pass in a title', function() { 15 | expect(component.find('a').text()).to.contain('this is a title'); 16 | }); 17 | }); 18 | it('Has an onClick change', function() { 19 | const onClick = sinon.spy(); 20 | const component = mount(); 21 | component.find('a').simulate('click'); 22 | expect(onClick.calledOnce).to.equal(true); 23 | }); 24 | -------------------------------------------------------------------------------- /test/breadcrumbs-test.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import React from 'react'; 3 | import {shallow} from 'enzyme'; 4 | import {expect} from 'chai'; 5 | 6 | import { Breadcrumbs } from '../src'; 7 | 8 | describe('', function() { 9 | it('Has default classes', function() { 10 | const component = shallow(); 11 | expect(component.find('ul').hasClass('breadcrumb al-breadcrumb')).to.equal(true); 12 | }); 13 | it('className is being rendered', function() { 14 | const component = shallow(); 15 | expect(component.find('ul').hasClass('testing className')).to.equal(true); 16 | }); 17 | }); 18 | 19 | it('Renders li child components', function() { 20 | const component = shallow({_.map(_.range(0, 5), (num) => `Child ${num}`)}); 21 | expect(component.find('li')).to.have.length(5); 22 | }); 23 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export * from './alert'; 2 | export * from './breadcrumbs'; 3 | export * from './button'; 4 | export * from './editable-text'; 5 | export * from './editable-select'; 6 | export * from './input'; 7 | export * from './loading'; 8 | export * from './messages-alert'; 9 | export * from './messages-alert-container'; 10 | export * from './modal'; 11 | export * from './notification'; 12 | export * from './notification-alert'; 13 | export * from './notifications-alert'; 14 | export * from './notifications'; 15 | export * from './preloader'; 16 | export * from './page'; 17 | export * from './pagination'; 18 | export * from './panel'; 19 | export * from './progress-bar'; 20 | export * from './select'; 21 | export * from './switch'; 22 | export * from './tab'; 23 | export * from './table'; 24 | export * from './table-body'; 25 | export * from './table-head'; 26 | export * from './table-row'; 27 | export * from './tabs'; 28 | export * from './textarea'; 29 | 30 | // helpers 31 | export * from './lib/event-bus'; 32 | -------------------------------------------------------------------------------- /src/assets/styles/blur/404.scss: -------------------------------------------------------------------------------- 1 | @import "app.scss"; 2 | 3 | html { 4 | position: relative; 5 | min-width: 320px; 6 | } 7 | 8 | html, body { 9 | min-height: 100%; 10 | height: 100%; 11 | } 12 | 13 | body { 14 | font: 12px/16px $font-family; 15 | color: $default-text; 16 | @include main-background(); 17 | display: flex; 18 | align-items: center; 19 | } 20 | 21 | .page-not-found-modal { 22 | width: 638px; 23 | margin: 0 auto; 24 | @include bg-translucent-dark(0.5); 25 | border-radius: 5px; 26 | font-weight: $font-light; 27 | color: #ffffff; 28 | padding: 32px; 29 | text-align: center; 30 | 31 | h1 { 32 | font-weight: $font-light; 33 | margin-bottom: 32px; 34 | } 35 | p { 36 | font-size: 16px; 37 | line-height: 24px; 38 | } 39 | a { 40 | text-decoration: none; 41 | outline: none; 42 | transition: all 0.2s ease; 43 | color: $primary; 44 | display: inline-block; 45 | &:hover { 46 | color: $primary-dark; 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/assets/img/arrow-green-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/arrow-red-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/theme/icon/feed/feed-location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/page.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Row, Col } from 'react-flex-proto'; 3 | 4 | export class Page extends React.Component { 5 | 6 | static propTypes = { 7 | title: React.PropTypes.string, 8 | actionBar: React.PropTypes.node, 9 | } 10 | 11 | renderTitle() { 12 | if (! this.props.title) { 13 | return null; 14 | } 15 | 16 | return ( 17 | 18 |

    {this.props.title}

    19 | 20 | ); 21 | } 22 | 23 | renderActionBar() { 24 | if (! this.props.actionBar) { 25 | return null; 26 | } 27 | 28 | return ( 29 | 30 | {this.props.actionBar} 31 | 32 | ); 33 | } 34 | 35 | render() { 36 | return ( 37 |
    38 |
    39 | 40 | {this.renderTitle()} 41 | {this.renderActionBar()} 42 | 43 |
    44 | {this.props.children} 45 |
    46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/conf/_variables.scss: -------------------------------------------------------------------------------- 1 | $font-family: 'Roboto', sans-serif; 2 | 3 | $activelink: $primary; 4 | $hoverlink: $primary-dark; 5 | 6 | $resXXL: 1280px; 7 | $resXL: 1170px; 8 | $resL: 991px; 9 | $resM: 768px; 10 | $resS: 660px; 11 | $resXS: 500px; 12 | $resXXS: 435px; 13 | $resMin: 320px; 14 | 15 | $top-height: 66px; 16 | 17 | $small-panel-height: 114px; 18 | $xsmall-panel-height: 187px; 19 | $medium-panel-height: 400px; 20 | $extra-medium-panel-height: 550px; 21 | $large-panel-height: 974px; 22 | 23 | $default-animation-duration: 0.2s; 24 | $default-animation-style: ease-out; 25 | 26 | $assets-root: '../'; 27 | $images-root: $assets-root + 'img/'; 28 | $fonts-root: $assets-root + 'fonts/'; 29 | $font-thin: 100; 30 | $font-light: 300; 31 | $font-normal: 400; 32 | $font-bold: 700; 33 | $font-ultraBold: 900; 34 | 35 | $facebook-color: #3b5998; 36 | $twitter-color: #55acee; 37 | $google-color: #dd4b39; 38 | $linkedin-color: #0177B5; 39 | $github-color: #6b6b6b; 40 | $stackoverflow-color: #2F96E8; 41 | $dribble-color: #F26798; 42 | $behace-color: #0093FA; 43 | -------------------------------------------------------------------------------- /src/table.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | 4 | export class Table extends React.Component { 5 | 6 | static propTypes = { 7 | hover: React.PropTypes.bool, 8 | border: React.PropTypes.bool, 9 | condense: React.PropTypes.bool, 10 | stripe: React.PropTypes.bool, 11 | responsive: React.PropTypes.bool, 12 | style: React.PropTypes.object, 13 | } 14 | 15 | static defaultProps = { 16 | responsive: true, 17 | hover: true, 18 | stripe: false, 19 | condense: false, 20 | border: false, 21 | } 22 | 23 | render() { 24 | const classes = cx({ 25 | table: true, 26 | 'table-hover': this.props.hover, 27 | 'table-bordered': this.props.border, 28 | 'table-condensed': this.props.condense, 29 | 'table-striped': this.props.stripe, 30 | }); 31 | 32 | return ( 33 |
    34 | 35 | {this.props.children} 36 |
    37 |
    38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/messages-alert.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class MessagesAlert extends React.Component { 4 | 5 | static propTypes = { 6 | user: React.PropTypes.object, 7 | subject: React.PropTypes.string, 8 | createdAt: React.PropTypes.string, 9 | onClick: React.PropTypes.func, 10 | relativeTime: React.PropTypes.string, 11 | timestamp: React.PropTypes.string, 12 | } 13 | 14 | onClick() { 15 | if (this.props.onClick) { 16 | this.props.onClick(); 17 | } 18 | } 19 | 20 | renderBody() { 21 | return ( 22 |
    23 |
    24 | 25 |
    26 |
    27 |
    {this.props.subject}
    28 | {this.props.relativeTime} 29 |
    30 |
    31 | ); 32 | } 33 | 34 | render() { 35 | return ( 36 |
    37 | {this.renderBody()} 38 |
    39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/notification-alert.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class NotificationAlert extends React.Component { 4 | 5 | static propTypes = { 6 | user: React.PropTypes.object, 7 | subject: React.PropTypes.string, 8 | createdAt: React.PropTypes.string, 9 | onClick: React.PropTypes.func, 10 | relativeTime: React.PropTypes.string, 11 | timeStamp: React.PropTypes.string, 12 | } 13 | 14 | onClick() { 15 | if (this.props.onClick) { 16 | this.props.onClick(); 17 | } 18 | } 19 | 20 | renderBody() { 21 | return ( 22 |
    23 |
    24 | 25 |
    26 |
    27 |
    {this.props.subject}
    28 | {this.props.relativeTime} 29 |
    30 |
    31 | ); 32 | } 33 | 34 | render() { 35 | return ( 36 |
    37 | {this.renderBody()} 38 |
    39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/assets/img/app/browsers/chrome.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Original work Copyright (c) 2016 Akvemus GSC 4 | Modified work Copyright (c) 2016 Consolidated Knowledge 5 | 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | -------------------------------------------------------------------------------- /src/assets/styles/components/search-bar.scss: -------------------------------------------------------------------------------- 1 | .react-autosuggest__container { 2 | position: relative; 3 | } 4 | 5 | .react-autosuggest__input { 6 | width: 240px; 7 | height: 30px; 8 | padding: 10px 20px; 9 | font-family: Helvetica, sans-serif; 10 | font-weight: 300; 11 | font-size: 16px; 12 | border: 1px solid #aaa; 13 | border-radius: 4px; 14 | } 15 | 16 | .react-autosuggest__input:focus { 17 | outline: none; 18 | } 19 | 20 | .react-autosuggest__container--open .react-autosuggest__input { 21 | border-bottom-left-radius: 0; 22 | border-bottom-right-radius: 0; 23 | } 24 | 25 | .react-autosuggest__suggestions-container { 26 | margin: 0; 27 | padding: 0; 28 | list-style-type: none; 29 | font-family: Helvetica, sans-serif; 30 | font-weight: 300; 31 | font-size: 16px; 32 | border-bottom-left-radius: 5px; 33 | border-bottom-right-radius: 5px; 34 | background: rgba(0, 0, 0, 0.7); 35 | border-color: rgba(0, 0, 0, 0.5); 36 | margin-left: -27px; 37 | } 38 | 39 | .react-autosuggest__suggestion { 40 | cursor: pointer; 41 | padding: 10px 20px; 42 | color: $default; 43 | } 44 | 45 | .react-autosuggest__suggestion--focused { 46 | background-color: #222; 47 | opacity: 0.7; 48 | } 49 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/_icons.scss: -------------------------------------------------------------------------------- 1 | @mixin svg-icon($url, $width:'', $height:'') { 2 | display: inline-block; 3 | background: url($url) no-repeat center; 4 | background-size: contain; 5 | vertical-align: middle; 6 | @if ($width != '') { 7 | width: $width + px; 8 | } 9 | @if ($height != '') { 10 | height: $height + px; 11 | } 12 | } 13 | 14 | @mixin svg-icon-class($iconName, $width:'', $height:'') { 15 | .#{'i-' + $iconName} { 16 | @include svg-icon($images-root + $iconName + '.svg', $width, $height); 17 | } 18 | } 19 | 20 | @include svg-icon-class('face', 80, 80); 21 | @include svg-icon-class('money', 80, 80); 22 | @include svg-icon-class('person', 80, 80); 23 | @include svg-icon-class('refresh', 80, 80); 24 | 25 | 26 | @mixin png-icon($url, $width, $height) { 27 | display: inline-block; 28 | width: $width + px; 29 | height: $height + px; 30 | background: url($url) no-repeat center center; 31 | background-size: $width + px $height + px; 32 | } 33 | 34 | @mixin png-icon-class($iconName, $width, $height) { 35 | .#{'i-' + $iconName} { 36 | @include png-icon($images-root + $iconName + '.png', $width, $height); 37 | } 38 | } 39 | 40 | //@include icon-png-class('arrival-icon', 11, 11); -------------------------------------------------------------------------------- /src/assets/styles/blur/app/_notifications.scss: -------------------------------------------------------------------------------- 1 | .control { 2 | margin-bottom: 10px; 3 | .form-control { 4 | width: 75%; 5 | } 6 | span { 7 | white-space: pre-line; 8 | } 9 | } 10 | 11 | .notification-panel { 12 | .control, 13 | .radio, 14 | label, 15 | label.custom-checkbox > span, 16 | label.custom-radio > span { 17 | font-weight: $font-light; 18 | } 19 | } 20 | 21 | .radio-controls .custom-radio{ 22 | margin-top: 5px; 23 | } 24 | 25 | @media (max-width: 991px) { 26 | .toastr-radio-setup { 27 | margin-left: 22px; 28 | } 29 | } 30 | 31 | .radio-header { 32 | 33 | margin-bottom: 0; 34 | &.position-header { 35 | margin-top: 15px; 36 | } 37 | } 38 | 39 | .button-row { 40 | line-height: 37px; 41 | button { 42 | width: 125px; 43 | } 44 | } 45 | 46 | .result-toastr { 47 | border-radius: 5px; 48 | color: rgba(255, 255, 255, 0.9); 49 | background-color: rgba(0, 0, 0, 0.33); 50 | border: none; 51 | } 52 | 53 | .sub-label { 54 | margin-top: 5px; 55 | } 56 | 57 | .toast-title { 58 | font-weight: $font-normal; 59 | } 60 | 61 | .toast-message { 62 | font-weight: $font-light; 63 | } 64 | 65 | #toast-container.toast-top-center, #toast-container.toast-bottom-center{ 66 | .toast{ 67 | margin-bottom: 5px; 68 | } 69 | } -------------------------------------------------------------------------------- /src/progress-bar.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | 4 | export class ProgressBar extends React.Component { 5 | 6 | static propTypes = { 7 | type: React.PropTypes.oneOf(['success', 'primary', 'warning', 'danger']), 8 | striped: React.PropTypes.bool, 9 | animated: React.PropTypes.bool, 10 | label: React.PropTypes.string, 11 | percentage: React.PropTypes.number.isRequired, 12 | } 13 | 14 | static defaultProps = { 15 | striped: false, 16 | animated: false, 17 | type: 'primary', 18 | label: '', 19 | 20 | } 21 | 22 | render() { 23 | const classes = cx({ 24 | 'progress-bar': true, 25 | 'progress-bar-success': this.props.type === 'success', 26 | 'progress-bar-primary': this.props.type === 'primary', 27 | 'progress-bar-warning': this.props.type === 'warning', 28 | 'progress-bar-danger': this.props.type === 'danger', 29 | 'progress-bar-striped': this.props.striped || this.props.animated, 30 | 'active': this.props.animated, 31 | }); 32 | 33 | return ( 34 |
    35 |
    36 | {this.props.label} 37 |
    38 |
    39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/textarea.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export class Textarea extends React.Component { 4 | 5 | static propTypes = { 6 | name: React.PropTypes.string, 7 | className: React.PropTypes.string, 8 | placeholder: React.PropTypes.string, 9 | label: React.PropTypes.string, 10 | onChange: React.PropTypes.func.isRequired, 11 | disabled: React.PropTypes.bool, 12 | value: React.PropTypes.node.isRequired, 13 | } 14 | 15 | static defaultProps = { 16 | name: '', 17 | className: '', 18 | value: '', 19 | disabled: false, 20 | } 21 | 22 | renderLabel() { 23 | if (!this.props.label) { 24 | return null; 25 | } 26 | return ( 27 | 28 | ); 29 | } 30 | 31 | renderTextarea() { 32 | return ( 33 | 42 | ); 43 | } 44 | 45 | render() { 46 | return ( 47 |
    48 | {this.renderLabel()} 49 | {this.renderTextarea()} 50 |
    51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/assets/img/app/browsers/opera.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/alert.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import React from 'react'; 3 | 4 | export class Alert extends React.Component { 5 | 6 | static propTypes = { 7 | type: React.PropTypes.string, 8 | className: React.PropTypes.string, 9 | isDismissible: React.PropTypes.bool, 10 | onClose: React.PropTypes.func, 11 | } 12 | 13 | static defaultProps = { 14 | type: 'success', 15 | className: '', 16 | isDismissible: false, 17 | onClose: _.noop, 18 | } 19 | 20 | getAlertClass() { 21 | switch (this.props.type) { 22 | case 'success': 23 | return 'success'; 24 | 25 | case 'remove': 26 | case 'danger': 27 | return 'danger'; 28 | 29 | case 'info': 30 | return 'info'; 31 | 32 | case 'warning': 33 | return 'warning'; 34 | 35 | default: 36 | throw new Error('Unknown Alert Type'); 37 | } 38 | } 39 | 40 | renderCloseButton() { 41 | if (! this.props.isDismissible) { 42 | return null; 43 | } 44 | return ( 45 | 48 | ); 49 | } 50 | 51 | render() { 52 | return ( 53 |
    54 | {this.renderCloseButton()} 55 | {this.props.children} 56 |
    57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/assets/styles/blur/theme/conf/colorScheme/_mint.scss: -------------------------------------------------------------------------------- 1 | $default: #ffffff; 2 | $body-bg: #F0F3F4; 3 | $default-text: #666666; 4 | $help-text: #949494; 5 | $label-text: #ffffff; 6 | 7 | $disabled: #dddddd; 8 | $disabled-bg: tint($disabled, 15%); 9 | $border: #d6d6d6; 10 | $border-light: tint($border, 15%); 11 | $input-border: shade($border, 5%); 12 | $input-background: #ffffff; 13 | 14 | $sidebar: #1C2B36; 15 | $sidebar-text: #ffffff; 16 | $dropdown-text: #7d7d7d; 17 | $bootstrap-panel-text: #7d7d7d; 18 | $bootstrap-panel-bg: #ffffff; 19 | $mail-box: whitesmoke; 20 | $auth-panel-background: #ffffff; 21 | $progress-background: rgba(#000000, 0.07); 22 | $progress-default: rgba(#000000, 0.15); 23 | 24 | $primary: #209e91 !default; 25 | $info: #2dacd1 !default; 26 | $success: #90b900 !default; 27 | $warning: #dfb81c !default; 28 | $danger: #e85656 !default; 29 | 30 | $primary-light: tint($primary, 30%); 31 | $info-light: tint($info, 30%); 32 | $success-light: tint($success, 30%); 33 | $warning-light: tint($warning, 30%); 34 | $danger-light: tint($danger, 30%); 35 | 36 | $primary-dark: shade($primary, 15%); 37 | $info-dark: shade($info, 15%); 38 | $success-dark: shade($success, 15%); 39 | $warning-dark: shade($warning, 15%); 40 | $danger-dark: shade($danger, 15%); 41 | 42 | $primary-bg: tint($primary, 20%); 43 | $info-bg: tint($info, 20%); 44 | $success-bg: tint($success, 20%); 45 | $warning-bg: tint($warning, 20%); 46 | $danger-bg: tint($danger, 20%); 47 | -------------------------------------------------------------------------------- /test/page-test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {shallow} from 'enzyme'; 3 | import {expect} from 'chai'; 4 | 5 | import { Page, Button } from '../src'; 6 | 7 | describe('', function() { 8 | it('Page has title', function() { 9 | const component = shallow(); 10 | expect(component.find('h1').hasClass('al-title')).to.equal(true); 11 | }); 12 | 13 | it('Page does not have title', function() { 14 | const component = shallow(); 15 | expect(component.find('h1')).to.have.length(0); 16 | }); 17 | 18 | it('Title text is being rendered', function() { 19 | const component = shallow(); 20 | expect(component.find('h1').text()).to.equal('Testing text'); 21 | }); 22 | 23 | it('Action bar renders text', function() { 24 | const component = shallow(); 25 | expect(component.find('Col[align="right"]').children().text()).to.contain('Testing text'); 26 | }); 27 | 28 | it('Action bar renders elements', function() { 29 | const button =