);
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 |
19 |
--------------------------------------------------------------------------------
/src/assets/img/arrow-red-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
--------------------------------------------------------------------------------
/src/assets/img/theme/icon/feed/feed-location.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
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 = ;
30 | const component = shallow();
31 | expect(component.containsMatchingElement(button)).to.equal(true);
32 | });
33 |
34 | it('Renders children', function() {
35 | const button = ;
36 | const component = shallow( {button} );
37 | expect(component.containsMatchingElement(button)).to.equal(true);
38 | });
39 | });
40 |
--------------------------------------------------------------------------------
/src/assets/styles/blur/theme/conf/colorScheme/_blur.scss:
--------------------------------------------------------------------------------
1 | $default: rgba(#000000, 0.2);
2 | $body-bg: #F0F3F4;
3 | $default-text: #ffffff;
4 | $help-text: #eeeeee;
5 | $label-text: #ffffff;
6 |
7 | $disabled: #dddddd;
8 | $disabled-bg: transparent;
9 | $border: #ffffff;
10 | $border-light: rgba(#ffffff, 0.2);
11 | $input-border: transparent;
12 | $input-background: rgba(#000000, 0.15);
13 |
14 | $sidebar: rgba(#000000, 0.5);
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: rgba(#000000, 0.55);
21 | $progress-background: rgba(#000000, 0.15);
22 | $progress-default: #ffffff;
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 |
--------------------------------------------------------------------------------
/src/assets/img/shopping-cart.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
49 |
--------------------------------------------------------------------------------
/src/panel.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class Panel extends React.Component {
4 |
5 | static propTypes = {
6 | title: React.PropTypes.string,
7 | className: React.PropTypes.string,
8 | size: React.PropTypes.string,
9 | withScroll: React.PropTypes.bool,
10 | }
11 |
12 | static defaultProps = {
13 | className: '',
14 | size: 'auto',
15 | withScroll: false,
16 | }
17 |
18 | renderHeader() {
19 | if (! this.props.title) {
20 | return null;
21 | }
22 |
23 | return (
24 |
25 |
26 | {this.props.title}
27 |
28 |
29 | );
30 | }
31 |
32 | renderPanelSize() {
33 | switch (this.props.size) {
34 | case 'xs':
35 | case 'extra-small':
36 | return 'xsmall-panel';
37 |
38 | case 'sm':
39 | case 'small':
40 | return 'small-panel';
41 |
42 | case 'md':
43 | case 'medium':
44 | return 'medium-panel';
45 |
46 | case 'lg':
47 | case 'large':
48 | return 'large-panel';
49 |
50 | case 'auto':
51 | case 'none':
52 | default:
53 | return '';
54 | }
55 | }
56 |
57 | render() {
58 | return (
59 |
60 | {this.renderHeader()}
61 |
62 | {this.props.children}
63 |
64 |
65 | );
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/assets/img/app/browsers/ie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/styles/blur/theme/_socicon.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'socicon';
3 | src: url('#{$fonts-root}socicon.eot');
4 | src: url('#{$fonts-root}socicon.eot?#iefix') format('embedded-opentype'),
5 | url('#{$fonts-root}socicon.woff') format('woff'),
6 | url('#{$fonts-root}socicon.woff2') format('woff2'),
7 | url('#{$fonts-root}socicon.ttf') format('truetype'),
8 | url('#{$fonts-root}socicon.svg#sociconregular') format('svg');
9 | font-weight: $font-normal;
10 | font-style: normal;
11 | text-transform: initial;
12 | }
13 |
14 | .socicon {
15 | font-family: 'socicon' !important;
16 | }
17 |
18 | .socicon {
19 | position: relative;
20 | top: 1px;
21 | display: inline-block;
22 | font-family: 'socicon';
23 | font-style: normal;
24 | font-weight: $font-normal;
25 | line-height: 1;
26 | -webkit-font-smoothing: antialiased;
27 | }
28 |
29 | .socicon:empty {
30 | width: 1em;
31 | }
32 |
33 | @mixin socicon($background, $content) {
34 | background-color: $background;
35 | &:before {
36 | content: $content;
37 | }
38 | }
39 |
40 | .socicon-twitter {
41 | @include socicon($twitter-color, "a");
42 | }
43 |
44 | .socicon-facebook {
45 | @include socicon($facebook-color, "b");
46 | }
47 |
48 | .socicon-google {
49 | @include socicon($google-color, "c");
50 | }
51 |
52 | .socicon-linkedin {
53 | @include socicon($linkedin-color, "j");
54 | }
55 |
56 | .socicon-github {
57 | @include socicon($github-color, "Q");
58 | }
59 |
60 | .socicon-stackoverflow {
61 | @include socicon($stackoverflow-color, "(");
62 | }
63 |
64 | .socicon-dribble {
65 | @include socicon($dribble-color, "D");
66 | }
67 |
68 | .socicon-behace {
69 | @include socicon($behace-color, "H");
70 | }
--------------------------------------------------------------------------------
/src/assets/styles/blur/theme/skins/_02_transparent.scss:
--------------------------------------------------------------------------------
1 | body.badmin-transparent {
2 | &.mobile{
3 | background: none;
4 | .body-bg{
5 | display: block;
6 | position: fixed;
7 | top: 0;
8 | left: 0;
9 | bottom: 0;
10 | right: 0;
11 | @include main-background();
12 | background-attachment: inherit;
13 | }
14 | .panel-blur {
15 | background: transparent;
16 | }
17 | }
18 | @include overrideColors(#fff);
19 | @include overridePanelBg(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9));
20 | .default-color {
21 | color: $default-text !important;;
22 | }
23 | .panel.panel-blur {
24 | background-attachment: fixed;
25 | @include scrollbars(.4em, rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.8));
26 | border-radius: 5px;
27 | color: $default;
28 | .panel-heading {
29 | border-bottom: 1px solid rgba(0, 0, 0, 0.12);
30 | box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.12);
31 | transform: translate3d(0,0,0);
32 | }
33 | .panel-body {
34 | /* Commenting out translate3d due to drop downs appearing beneath panels
35 | and not above. Not sure if transform is used on any panels. Adjust if so.
36 | transform: translate3d(0,0,0); */
37 | }
38 | }
39 | .button-wrapper .btn-default {
40 | color: $default;
41 | }
42 | .form-control, .bootstrap-tagsinput input {
43 | @include placeholderStyle($default, 0.7);
44 | background-color: rgba(0, 0, 0, .15);
45 | border-radius: 5px;
46 | color: $default;
47 | }
48 | .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
49 | @include placeholderStyle($default, 0.5);
50 | }
51 | .irs-grid-text {
52 | color: $default;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/messages-alert-container.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class MessagesAlertContainer extends React.Component {
4 |
5 | static propTypes = {
6 | mailCount: React.PropTypes.number.isRequired,
7 | settingsOnClick: React.PropTypes.func,
8 | allMessagesOnClick: React.PropTypes.func,
9 | markAllAsReadOnClick: React.PropTypes.func,
10 | }
11 |
12 | constructor(props) {
13 | super(props);
14 |
15 | this.state = {
16 | isExpanded: false,
17 | };
18 | }
19 |
20 | onClick() {
21 | this.setState({
22 | isExpanded: !this.state.isExpanded,
23 | });
24 | }
25 |
26 | render() {
27 | return (
28 |
29 |
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/notifications-alert.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export class NotificationsAlert extends React.Component {
4 |
5 | static propTypes = {
6 | notificationCount: React.PropTypes.number.isRequired,
7 | settingsOnClick: React.PropTypes.func,
8 | allNotificationsOnClick: React.PropTypes.func,
9 | markAllAsReadOnClick: React.PropTypes.func,
10 | }
11 |
12 | constructor(props) {
13 | super(props);
14 |
15 | this.state = {
16 | isExpanded: false,
17 | };
18 | }
19 |
20 | onClick() {
21 | this.setState({
22 | isExpanded: !this.state.isExpanded,
23 | });
24 | }
25 |
26 | render() {
27 | return (
28 |
29 |
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/assets/img/theme/icon/feed/feed-image.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
25 |
--------------------------------------------------------------------------------
/src/assets/styles/blur/app/_buttonsPage.scss:
--------------------------------------------------------------------------------
1 | .basic-btns {
2 | padding-top: 8px;
3 | margin-bottom: -8px;
4 | h5 {
5 | line-height: 35px;
6 | font-size: 12px;
7 | &.row-sm {
8 | line-height: 30px;
9 | }
10 | &.row-xs {
11 | line-height: 22px;
12 | }
13 | }
14 | & > .row {
15 | padding-bottom: 4px;
16 | }
17 | }
18 |
19 | .btns-row {
20 | & > div {
21 | margin-bottom: 12px;
22 | }
23 | }
24 |
25 | .btns-same-width-sm {
26 | .btn {
27 | width: 48px;
28 | }
29 | }
30 |
31 | .btns-same-width-md {
32 | .btn {
33 | width: 79px;
34 | }
35 | }
36 |
37 | .btns-same-width-lg {
38 | .btn {
39 | width: 112px;
40 | }
41 | }
42 |
43 | ul.btn-list {
44 | margin: 0 0 0 -18px;
45 | padding: 0;
46 | padding-top: 6px;
47 | clear: both;
48 | li {
49 | margin: 0px 0 12px 18px;
50 | padding: 0;
51 | list-style: none;
52 | float: left;
53 | }
54 | }
55 |
56 | .btn-group-wrapper {
57 | margin-bottom: 12px;
58 | }
59 |
60 | $btn-icon-size: 34px;
61 | .btn-icon {
62 | width: $btn-icon-size;
63 | height: $btn-icon-size;
64 | line-height: $btn-icon-size;
65 | padding: 0;
66 | text-align: center;
67 | }
68 |
69 | .btn-group-example {
70 | float: left;
71 | margin-right: 30px;
72 | margin-bottom: 12px;
73 | }
74 |
75 | .btn-toolbar-example {
76 | float: left;
77 | }
78 |
79 | .progress-buttons-container {
80 | text-align: center;
81 | font-size: 16px;
82 | span.button-title {
83 | display: inline-block;
84 | width: 100%;
85 | line-height: 1;
86 | font-size: 14px;
87 | margin-bottom: 10px;
88 | margin-top: 10px;
89 | }
90 | .row + .row {
91 | margin-top: 30px;
92 | }
93 | }
94 |
95 | .large-buttons-panel{
96 | height: 202px;
97 | }
98 |
99 | .button-wrapper{
100 | margin: 5px 0;
101 | }
102 |
103 | .editable-buttons button {
104 | margin-left: 5px;
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/src/switch.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import React from 'react';
3 |
4 | export class Switch extends React.Component {
5 |
6 | static propTypes = {
7 | isOn: React.PropTypes.bool,
8 | onLabel: React.PropTypes.string,
9 | offLabel: React.PropTypes.string,
10 | onChange: React.PropTypes.func.isRequired,
11 | type: React.PropTypes.oneOf(['primary', 'info', 'warning', 'success', 'danger']),
12 | className: React.PropTypes.string,
13 | disabled: React.PropTypes.bool,
14 | }
15 |
16 | static defaultProps = {
17 | isOn: true,
18 | onLabel: 'ON',
19 | offLabel: 'OFF',
20 | type: 'primary',
21 | className: '',
22 | disabled: false,
23 | onChange: _.noop,
24 | }
25 |
26 | onChange() {
27 | if (this.props.disabled) {
28 | return false;
29 | }
30 |
31 | return this.props.onChange();
32 | }
33 |
34 | renderOn() {
35 | return (
36 |
37 | {this.props.onLabel}
38 |
39 |
40 | );
41 | }
42 |
43 | renderOff() {
44 | return (
45 |
46 |
47 | {this.props.offLabel}
48 |
49 | );
50 | }
51 |
52 | render() {
53 | return (
54 | this.onChange()}>
55 |
56 | {this.props.isOn ? this.renderOn() : this.renderOff()}
57 |
58 |
59 | );
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/test/notifications-alert-test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {expect} from 'chai';
3 | import {mount} from 'enzyme';
4 | import { noop } from 'lodash';
5 |
6 | import { NotificationsAlert } from '../src';
7 |
8 | describe('', function() {
9 | const component = mount();
10 | it('Has a outermost ul', function() {
11 | expect(component.find('ul').length).to.equal(1);
12 | });
13 | it('contains one li', function() {
14 | expect(component.find('li').length).to.equal(1);
15 | });
16 | it('has an a tag with dropdown toggle', function() {
17 | expect(component.find('a.dropdown-toggle').length).to.equal(1);
18 | });
19 | it('has a bell icon', function() {
20 | expect(component.find('i').at(0).hasClass('fa-bell-o')).to.equal(true);
21 | });
22 | it('has a span', function() {
23 | expect(component.find('span').length).to.equal(1);
24 | });
25 | it('has a div with notification ring class', function() {
26 | expect(component.find('div.notification-ring').length).to.equal(1);
27 | });
28 | it('has an i with dropdown-arr class', function() {
29 | expect(component.find('i').at(1).hasClass('dropdown-arr')).to.equal(true);
30 | });
31 | it('has a div with header clearfix class', function() {
32 | expect(component.find('div.header').hasClass('clearfix')).to.equal(true);
33 | });
34 | it('has a text of Notifications', function() {
35 | expect(component.find('strong').text()).to.equal('Notifications');
36 | });
37 | it('has a text of Mark All as Read', function() {
38 | expect(component.find('a').at(1).text()).to.equal('Mark All as Read');
39 | });
40 | it('has a text of Settings', function() {
41 | expect(component.find('a').at(2).text()).to.equal('Settings');
42 | });
43 | it('has a text of See all notifications', function() {
44 | expect(component.find('a').at(3).text()).to.equal('See all notifications');
45 | });
46 | it('has a div with msg-list class', function() {
47 | expect(component.find('div.msg-list').length).to.equal(1);
48 | });
49 | it('has a span with notification count', function() {
50 | expect(component.find('span').text()).to.equal('3');
51 | });
52 | });
53 |
--------------------------------------------------------------------------------
/readme.MD:
--------------------------------------------------------------------------------
1 | # React Blur Admin
2 | All credit for the theme goes to [akveo](http://akveo.com/blur-admin/), this is just a React implementation.
3 |
4 | Note: This is currently partial implementation of Blur Admin. This repo includes styles from Blur Admin that are required for pages and components to load correctly and the components themselves.
5 |
6 | Individual pages/demos/layouts can be found in the [React Webpack Skeleton repo](https://github.com/knledg/react-webpack-skeleton).
7 |
8 | ### Build Status
9 |
10 | [](https://circleci.com/gh/knledg/react-blur-admin/tree/master)
11 |
12 | ### Currently Implemented
13 |
14 | - Text Inputs
15 | - Buttons
16 | - Editable Fields
17 | - Loading Spinner
18 | - Tables (not including smart tables)
19 | - Tabs
20 | - Switches
21 | - Select Dropdowns
22 | - Progress Bars
23 | - Panels
24 | - Pages
25 | - Textareas
26 | - Pagination (diverged from Blur's implementation slightly for additional flexibility)
27 | - Notifications
28 | - Alerts
29 |
30 | ### Needs Implementation
31 |
32 | - Accordions
33 | - Sliders
34 | - Searchable table columns
35 | - Tags Inputs
36 |
37 | ## Semver
38 |
39 | Before the v1.0.0 release, a minor update will represent breaking changes and a patch will represent feature enhancements or bug fixes.
40 |
41 | ## Contributing
42 |
43 | This is an active project and we'd love your help! Please submit small pull requests. You can make sure tests and lint passes by running `npm run lint && npm run test` before committing.
44 |
45 | You can also add the `.git/hooks/pre-push` with the following:
46 |
47 | ```
48 | #!/usr/bin/env bash
49 |
50 | npm run lint && npm run test
51 | ```
52 |
53 | And making it executable with `chmod ugo+x .git/hooks/pre-push`
54 |
55 | ## Example Usage
56 |
57 | A React Webpack Skeleton implementing the layout for React Blur Admin and using it's components will be uploaded and linked shortly. You can see how each component is implemented by looking at the source code for each of the demo pages.
58 |
59 | ## Dependencies
60 | - Bootstrap CSS
61 | - Bootstrap-Select CSS
62 | - Bootstrap-Switch CSS
63 | - Blur CSS
64 | - EventEmitter implemented in lib/event-bus so that notifications can listen for a new notification from anywhere without any specific implementation of flux
65 | - Utilizes Flexbox for columns/rows
66 |
67 |
--------------------------------------------------------------------------------
/test/textarea-test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import sinon from 'sinon';
3 | import {noop} from 'lodash';
4 | import {expect} from 'chai';
5 | import {shallow} from 'enzyme';
6 |
7 | import { Textarea, Button } from '../src';
8 |
9 | describe('', function() {
10 | it('Has a name', function() {
11 | const component = shallow();
12 | expect(component.find('textarea').prop('name')).to.equal('Testing name');
13 | });
14 |
15 | it('Has a label', function() {
16 | const component = shallow();
17 | expect(component.find('label').text()).to.contain('Testing label');
18 | });
19 |
20 | it('Has a className', function() {
21 | const component = shallow();
22 | expect(component.find('textarea').hasClass('form-control')).to.equal(true);
23 | });
24 |
25 | it('Has a placeHolder', function() {
26 | const component = shallow();
27 | expect(component.find('textarea').prop('placeholder')).to.equal('Testing placeholder');
28 | });
29 |
30 | it('Is disabled', function() {
31 | const component = shallow(