├── .babelrc
├── .eslintrc
├── .gitignore
├── .npmignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── demo
├── .babelrc
├── dist
│ ├── bootstrap.css
│ ├── index.html
│ └── main.js
├── package.json
├── src
│ └── index.js
└── webpack.config.js
├── docs
└── gifs
│ └── demo.gif
├── package-lock.json
├── package.json
├── src
├── ButtonLoader.jsx
└── Spinner.jsx
├── test
├── ButtonLoader.spec.js
└── setup.js
└── webpack.release.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env",
4 | "@babel/preset-react"
5 | ]
6 | }
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 |
4 | "plugins": [
5 | "react"
6 | ],
7 |
8 | "env": {
9 | "browser": true,
10 | "node": true,
11 | "mocha": true,
12 | "es6": true
13 | },
14 |
15 | "ecmaFeatures": {
16 | "arrowFunctions": true,
17 | "blockBindings": true,
18 | "classes": true,
19 | "defaultParams": true,
20 | "destructuring": true,
21 | "forOf": true,
22 | "generators": false,
23 | "modules": true,
24 | "objectLiteralComputedProperties": true,
25 | "objectLiteralDuplicateProperties": false,
26 | "objectLiteralShorthandMethods": true,
27 | "objectLiteralShorthandProperties": true,
28 | "restParams": true,
29 | "spread": true,
30 | "superInFunctions": true,
31 | "templateStrings": true,
32 | "jsx": true
33 | },
34 |
35 | "rules":{
36 | // Possible errors
37 | "comma-dangle": [2, "never"],
38 | "no-cond-assign": [2, "always"],
39 | "no-constant-condition": 2,
40 | "no-control-regex": 2,
41 | "no-dupe-args": 2,
42 | "no-dupe-keys": 2,
43 | "no-duplicate-case": 2,
44 | "no-empty-character-class": 2,
45 | "no-empty": 2,
46 | "no-ex-assign": 2,
47 | "no-extra-boolean-cast": 0,
48 | "no-extra-parens": [2, "functions"],
49 | "no-extra-semi": 2,
50 | "no-func-assign": 2,
51 | "no-inner-declarations": 2,
52 | "no-invalid-regexp": 2,
53 | "no-irregular-whitespace": 2,
54 | "no-negated-in-lhs": 2,
55 | "no-obj-calls": 2,
56 | "no-regex-spaces": 2,
57 | "no-sparse-arrays": 2,
58 | "no-unreachable": 2,
59 | "use-isnan": 2,
60 | "valid-typeof": 2,
61 | "no-unexpected-multiline": 0,
62 |
63 | // Best Practices
64 | "block-scoped-var": 2,
65 | "complexity": [2, 40],
66 | "curly": [2, "multi-line"],
67 | "default-case": 2,
68 | "dot-notation": [2, { "allowKeywords": true }],
69 | "eqeqeq": 2,
70 | "guard-for-in": 2,
71 | "no-alert": 1,
72 | "no-caller": 2,
73 | "no-case-declarations": 2,
74 | "no-div-regex": 0,
75 | "no-else-return": 2,
76 | "no-eq-null": 2,
77 | "no-eval": 2,
78 | "no-extend-native": 2,
79 | "no-extra-bind": 2,
80 | "no-fallthrough": 2,
81 | "no-floating-decimal": 2,
82 | "no-implied-eval": 2,
83 | "no-iterator": 2,
84 | "no-labels": 2,
85 | "no-lone-blocks": 2,
86 | "no-loop-func": 2,
87 | // "no-multi-spaces": [2, { exceptions: { "VariableDeclarator": true, "ImportDeclaration": true } }],
88 | "no-multi-str": 2,
89 | "no-native-reassign": 2,
90 | "no-new": 2,
91 | "no-new-func": 2,
92 | "no-new-wrappers": 2,
93 | "no-octal": 2,
94 | "no-octal-escape": 2,
95 | "no-param-reassign": [2, { "props": true }],
96 | "no-proto": 2,
97 | "no-redeclare": 2,
98 | "no-script-url": 2,
99 | "no-self-compare": 2,
100 | "no-sequences": 2,
101 | // "no-throw-literal": 2,
102 | "no-unused-expressions": 2,
103 | "no-useless-call": 2,
104 | "no-with": 2,
105 | "radix": 2,
106 | "wrap-iife": [2, "outside"],
107 | "yoda": 2,
108 |
109 | // ES2015
110 | "arrow-parens": 0,
111 | "arrow-spacing": [2, { "before": true, "after": true }],
112 | "constructor-super": 2,
113 | "no-class-assign": 2,
114 | "no-const-assign": 2,
115 | "no-this-before-super": 0,
116 | "no-var": 2,
117 | "object-shorthand": [2, "always"],
118 | "prefer-arrow-callback": 2,
119 | "prefer-const": 2,
120 | "prefer-spread": 2,
121 | "prefer-template": 2,
122 |
123 | // Strict Mode
124 | "strict": [2, "never"],
125 |
126 | // Variables
127 | "no-catch-shadow": 2,
128 | "no-delete-var": 2,
129 | "no-label-var": 2,
130 | "no-shadow-restricted-names": 2,
131 | "no-shadow": 2,
132 | "no-undef-init": 2,
133 | "no-undef": 2,
134 | "no-unused-vars": 2,
135 |
136 | // Node.js
137 | "callback-return": 2,
138 | "no-mixed-requires": 2,
139 | "no-path-concat": 2,
140 | "no-sync": 2,
141 | "handle-callback-err": 1,
142 | "no-new-require": 2,
143 |
144 | // Stylistic
145 | "array-bracket-spacing": [2, "never", {
146 | "singleValue": true,
147 | "objectsInArrays": true,
148 | "arraysInArrays": true
149 | }],
150 | "newline-after-var": [1, "always"],
151 | "brace-style": [2, "1tbs"],
152 | // "camelcase": [2, { "properties": "always" }],
153 | "comma-spacing": [2, { "before": false, "after": true }],
154 | "comma-style": [2, "last"],
155 | "computed-property-spacing": [2, "never"],
156 | "eol-last": 2,
157 | "func-names": 1,
158 | "func-style": [2, "declaration"],
159 | "indent": [2, 2, { "SwitchCase": 1 }],
160 | "jsx-quotes": [2, "prefer-single"],
161 | // "key-spacing": [2, {
162 | // "singleLine": {
163 | // "beforeColon": false,
164 | // "afterColon": true
165 | // },
166 | // "multiLine": {
167 | // "beforeColon": true,
168 | // "afterColon": true,
169 | // "align": "colon"
170 | // }
171 | // }],
172 | "linebreak-style": [2, "unix"],
173 | "max-len": [2, 128, 4, {
174 | "ignoreUrls": true,
175 | "ignoreComments": false
176 | }],
177 | "max-nested-callbacks": [2, 4],
178 | "new-parens": 2,
179 | "no-array-constructor": 2,
180 | "no-lonely-if": 2,
181 | "no-mixed-spaces-and-tabs": 2,
182 | "no-multiple-empty-lines": [2, { "max": 2, "maxEOF": 1 }],
183 | "no-nested-ternary": 2,
184 | "no-new-object": 2,
185 | "no-spaced-func": 2,
186 | "no-trailing-spaces": 2,
187 | "no-unneeded-ternary": 2,
188 | "object-curly-spacing": [2, "always"],
189 | "one-var": [2, "never"],
190 | "padded-blocks": [2, "never"],
191 | "quotes": [1, "single", "avoid-escape"],
192 | "semi-spacing": [2, { "before": false, "after": true }],
193 | "semi": [2, "always"],
194 | "keyword-spacing": 2,
195 | "space-before-blocks": 2,
196 | "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
197 | "space-in-parens": [2, "never"],
198 | "space-infix-ops": 2,
199 | "space-unary-ops": [2, { "words": true, "nonwords": false }],
200 | "spaced-comment": [2, "always", {
201 | "exceptions": ["-", "+"],
202 | "markers": ["=", "!"]
203 | }],
204 |
205 | // React
206 | "react/jsx-boolean-value": 2,
207 | "react/jsx-closing-bracket-location": 2,
208 | "react/jsx-curly-spacing": [2, "never"],
209 | "react/jsx-handler-names": 2,
210 | "react/jsx-indent-props": [2, 2],
211 | "react/jsx-indent": [2, 2],
212 | "react/jsx-key": 2,
213 | "react/jsx-max-props-per-line": [2, {maximum: 3}],
214 | "react/jsx-no-bind": [2, {
215 | "ignoreRefs": true,
216 | "allowBind": true,
217 | "allowArrowFunctions": true
218 | }],
219 | "react/jsx-no-duplicate-props": 2,
220 | "react/jsx-no-undef": 2,
221 | "react/jsx-pascal-case": 2,
222 | "react/jsx-uses-react": 2,
223 | "react/jsx-uses-vars": 2,
224 | // "react/no-danger": 2,
225 | "react/no-deprecated": 2,
226 | "react/no-did-mount-set-state": 0,
227 | "react/no-did-update-set-state": 2,
228 | "react/no-direct-mutation-state": 2,
229 | "react/no-is-mounted": 2,
230 | "react/no-multi-comp": 2,
231 | "react/no-string-refs": 2,
232 | "react/no-unknown-property": 2,
233 | "react/prefer-es6-class": 2,
234 | "react/prop-types": 2,
235 | "react/react-in-jsx-scope": 2,
236 | "react/self-closing-comp": 2,
237 | "react/sort-comp": [2, {
238 | "order": [
239 | "lifecycle",
240 | "/^handle.+$/",
241 | "/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/",
242 | "everything-else",
243 | "/^render.+$/",
244 | "render"
245 | ]
246 | }],
247 | "react/wrap-multilines": 2,
248 |
249 | // Legacy
250 | "max-depth": [0, 4],
251 | "max-params": [2, 4],
252 | "no-bitwise": 2
253 | },
254 |
255 | "globals":{
256 | "$": true,
257 | "ga": true
258 | }
259 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # nyc test coverage
18 | .nyc_output
19 |
20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21 | .grunt
22 |
23 | # node-waf configuration
24 | .lock-wscript
25 |
26 | # Compiled binary addons (http://nodejs.org/api/addons.html)
27 | build/Release
28 |
29 | # Dependency directories
30 | node_modules
31 | jspm_packages
32 |
33 | # Optional npm cache directory
34 | .npm
35 |
36 | # Optional REPL history
37 | .node_repl_history
38 |
39 | .idea
40 | /dist
41 | dist/*.js
42 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .babelrc
3 | .eslintrc
4 | .istanbul.yml
5 | .travis.yml
6 | coverage
7 | demo
8 | docs
9 | src
10 | test
11 | webpack.release.js
12 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "11"
4 | - "10"
5 | - "8"
6 | - "node"
7 | env:
8 | - CXX=g++-4.8
9 | before_install:
10 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
11 | - sudo apt-get -qq update
12 | - sudo apt-get -qq install g++-4.8
13 | install: "npm install && npm run release"
14 | after_success: "npm install -g coveralls && npm run coverage && cat ./coverage/lcov.info | coveralls"
15 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ### 17th June 2019 - Version 2.0.0
2 | - Support for react-bootstrap 1.0.0 and deps update
3 |
4 | ### 17th June 2019 - Version 1.0.13
5 | - Max version for react-bootstrap
6 |
7 | ### 15th June 2018 - Version 1.0.12
8 | - Deps update
9 |
10 | ### 8th December 2017 - Version 1.0.11
11 | - Fixed typo in default spinner style (https://github.com/yury-dymov/react-bootstrap-button-loader/pull/5)
12 |
13 | ### 17th October 2017 - Version 1.0.9
14 | - Added prop `spinAlignment` to control spin alignment
15 |
16 | ### 19th May 2017 - Version 1.0.8
17 | - Added `prop-types` package to support React 16+
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Yury Dymov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-bootstrap-button-loader
2 | Bootstrap Button with Spinner feature
3 |
4 | [](https://github.com/yury-dymov/react-bootstrap-button-loader)
5 |
6 | [](https://www.npmjs.com/package/react-bootstrap-button-loader)
7 | [](https://npmjs.org/package/react-bootstrap-button-loader)
8 | [](https://travis-ci.org/yury-dymov/react-bootstrap-button-loader)
9 | [](https://coveralls.io/github/yury-dymov/react-bootstrap-button-loader?branch=master)
10 |
11 | # Versioning
12 | * v2 supports React Bootstrap v1.0.0+
13 | * v1 supports React Bootstrap v0.x.x
14 |
15 | # Demo
16 | Demo and playground are available [here](https://yury-dymov.github.io/react-bootstrap-button-loader/)
17 |
18 | # Usage Example
19 | ```
20 | import Button from 'react-bootstrap-button-loader';
21 |
22 |
23 | ```
24 |
25 | # Configurable Props
26 | *Note*: All props are optional.
27 |
28 | ### ~bsStyle: string, default: null~
29 | Bootstrap style, supported values: `default`, `primary`, `success`, `info`, `warning`, `danger`, `link`.
30 |
31 | *Deprecated in a favor of `variant`*
32 |
33 | ### disabled: boolean, default: false
34 | Set this prop `true` to disable button.
35 |
36 | *Note:* button in loading state is disabled and this behavior is not overridable even if `false` value is explicitly provided.
37 |
38 | ### loading: boolean, default: false
39 | This prop controls Button loading state.
40 |
41 | While loading, Button is disabled and icon provided via props is replaced with Spinner.
42 |
43 | ### icon: node, default: null
44 | Buttons with icons are better!
45 |
46 | Provided icon is shown if Button is not in a loading state. Otherwise Spinner is rendered.
47 |
48 | ### spinAlignment: string, default 'left'
49 | Controls spinAlignment, supported values: 'left' and 'right'
50 |
51 | ### spinColor: string, default: '#fff'
52 | Spinner color for loading state.
53 |
54 | While white color used by default works fine for most cases, for different bootstrap themes and bsStyles it might be better to use other colors instead.
55 |
56 | ### variant: string, default: 'primary'
57 | Bootstrap style, supported values: `primary`, ``secondary`, `success`, `info`, `warning`, `danger`, `link`, `light`, `dark`.
58 |
59 |
60 | # License
61 | MIT (c) Yury Dymov
62 |
--------------------------------------------------------------------------------
/demo/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-0"]
3 | }
4 |
--------------------------------------------------------------------------------
/demo/dist/bootstrap.css:
--------------------------------------------------------------------------------
1 | .btn {
2 | display: inline-block;
3 | margin-bottom: 0;
4 | font-weight: normal;
5 | text-align: center;
6 | vertical-align: middle;
7 | -ms-touch-action: manipulation;
8 | touch-action: manipulation;
9 | cursor: pointer;
10 | background-image: none;
11 | border: 1px solid transparent;
12 | white-space: nowrap;
13 | padding: 7px 10px;
14 | font-size: 15px;
15 | line-height: 1.42857143;
16 | border-radius: 4px;
17 | -webkit-user-select: none;
18 | -moz-user-select: none;
19 | -ms-user-select: none;
20 | user-select: none;
21 | }
22 | .btn:focus,
23 | .btn:active:focus,
24 | .btn.active:focus,
25 | .btn.focus,
26 | .btn:active.focus,
27 | .btn.active.focus {
28 | outline: thin dotted;
29 | outline: 5px auto -webkit-focus-ring-color;
30 | outline-offset: -2px;
31 | }
32 | .btn:hover,
33 | .btn:focus,
34 | .btn.focus {
35 | color: #ffffff;
36 | text-decoration: none;
37 | }
38 | .btn:active,
39 | .btn.active {
40 | outline: 0;
41 | background-image: none;
42 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
43 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
44 | }
45 | .btn.disabled,
46 | .btn[disabled],
47 | fieldset[disabled] .btn {
48 | cursor: not-allowed;
49 | opacity: 0.65;
50 | filter: alpha(opacity=65);
51 | -webkit-box-shadow: none;
52 | box-shadow: none;
53 | }
54 | a.btn.disabled,
55 | fieldset[disabled] a.btn {
56 | pointer-events: none;
57 | }
58 | .btn-default {
59 | color: #ffffff;
60 | background-color: #95a5a6;
61 | border-color: #95a5a6;
62 | }
63 | .btn-default:focus,
64 | .btn-default.focus {
65 | color: #ffffff;
66 | background-color: #798d8f;
67 | border-color: #566566;
68 | }
69 | .btn-default:hover {
70 | color: #ffffff;
71 | background-color: #798d8f;
72 | border-color: #74898a;
73 | }
74 | .btn-default:active,
75 | .btn-default.active,
76 | .open > .dropdown-toggle.btn-default {
77 | color: #ffffff;
78 | background-color: #798d8f;
79 | border-color: #74898a;
80 | }
81 |
82 | .btn-default:active:hover,
83 | .btn-default.active:hover,
84 | .open > .dropdown-toggle.btn-default:hover,
85 | .btn-default:active:focus,
86 | .btn-default.active:focus,
87 | .open > .dropdown-toggle.btn-default:focus,
88 | .btn-default:active.focus,
89 | .btn-default.active.focus,
90 | .open > .dropdown-toggle.btn-default.focus {
91 | color: #ffffff;
92 | background-color: #687b7c;
93 | border-color: #566566;
94 | }
95 | .btn-default:active,
96 | .btn-default.active,
97 | .open > .dropdown-toggle.btn-default {
98 | background-image: none;
99 | }
100 | .btn-default.disabled:hover,
101 | .btn-default[disabled]:hover,
102 | fieldset[disabled] .btn-default:hover,
103 | .btn-default.disabled:focus,
104 | .btn-default[disabled]:focus,
105 | fieldset[disabled] .btn-default:focus,
106 | .btn-default.disabled.focus,
107 | .btn-default[disabled].focus,
108 | fieldset[disabled] .btn-default.focus {
109 | background-color: #95a5a6;
110 | border-color: #95a5a6;
111 | }
112 | .btn-default .badge {
113 | color: #95a5a6;
114 | background-color: #ffffff;
115 | }
116 | .btn-primary {
117 | color: #ffffff;
118 | background-color: #2c3e50;
119 | border-color: #2c3e50;
120 | }
121 | .btn-primary:focus,
122 | .btn-primary.focus {
123 | color: #ffffff;
124 | background-color: #1a242f;
125 | border-color: #000000;
126 | }
127 | .btn-primary:hover {
128 | color: #ffffff;
129 | background-color: #1a242f;
130 | border-color: #161f29;
131 | }
132 | .btn-primary:active,
133 | .btn-primary.active,
134 | .open > .dropdown-toggle.btn-primary {
135 | color: #ffffff;
136 | background-color: #1a242f;
137 | border-color: #161f29;
138 | }
139 | .btn-primary:active:hover,
140 | .btn-primary.active:hover,
141 | .open > .dropdown-toggle.btn-primary:hover,
142 | .btn-primary:active:focus,
143 | .btn-primary.active:focus,
144 | .open > .dropdown-toggle.btn-primary:focus,
145 | .btn-primary:active.focus,
146 | .btn-primary.active.focus,
147 | .open > .dropdown-toggle.btn-primary.focus {
148 | color: #ffffff;
149 | background-color: #0d1318;
150 | border-color: #000000;
151 | }
152 | .btn-primary:active,
153 | .btn-primary.active,
154 | .open > .dropdown-toggle.btn-primary {
155 | background-image: none;
156 | }
157 | .btn-primary.disabled:hover,
158 | .btn-primary[disabled]:hover,
159 | fieldset[disabled] .btn-primary:hover,
160 | .btn-primary.disabled:focus,
161 | .btn-primary[disabled]:focus,
162 | fieldset[disabled] .btn-primary:focus,
163 | .btn-primary.disabled.focus,
164 | .btn-primary[disabled].focus,
165 | fieldset[disabled] .btn-primary.focus {
166 | background-color: #2c3e50;
167 | border-color: #2c3e50;
168 | }
169 | .btn-primary .badge {
170 | color: #2c3e50;
171 | background-color: #ffffff;
172 | }
173 | .btn-success {
174 | color: #ffffff;
175 | background-color: #18bc9c;
176 | border-color: #18bc9c;
177 | }
178 | .btn-success:focus,
179 | .btn-success.focus {
180 | color: #ffffff;
181 | background-color: #128f76;
182 | border-color: #0a4b3e;
183 | }
184 | .btn-success:hover {
185 | color: #ffffff;
186 | background-color: #128f76;
187 | border-color: #11866f;
188 | }
189 | .btn-success:active,
190 | .btn-success.active,
191 | .open > .dropdown-toggle.btn-success {
192 | color: #ffffff;
193 | background-color: #128f76;
194 | border-color: #11866f;
195 | }
196 | .btn-success:active:hover,
197 | .btn-success.active:hover,
198 | .open > .dropdown-toggle.btn-success:hover,
199 | .btn-success:active:focus,
200 | .btn-success.active:focus,
201 | .open > .dropdown-toggle.btn-success:focus,
202 | .btn-success:active.focus,
203 | .btn-success.active.focus,
204 | .open > .dropdown-toggle.btn-success.focus {
205 | color: #ffffff;
206 | background-color: #0e6f5c;
207 | border-color: #0a4b3e;
208 | }
209 | .btn-success:active,
210 | .btn-success.active,
211 | .open > .dropdown-toggle.btn-success {
212 | background-image: none;
213 | }
214 | .btn-success.disabled:hover,
215 | .btn-success[disabled]:hover,
216 | fieldset[disabled] .btn-success:hover,
217 | .btn-success.disabled:focus,
218 | .btn-success[disabled]:focus,
219 | fieldset[disabled] .btn-success:focus,
220 | .btn-success.disabled.focus,
221 | .btn-success[disabled].focus,
222 | fieldset[disabled] .btn-success.focus {
223 | background-color: #18bc9c;
224 | border-color: #18bc9c;
225 | }
226 | .btn-success .badge {
227 | color: #18bc9c;
228 | background-color: #ffffff;
229 | }
230 | .btn-info {
231 | color: #ffffff;
232 | background-color: #3498db;
233 | border-color: #3498db;
234 | }
235 | .btn-info:focus,
236 | .btn-info.focus {
237 | color: #ffffff;
238 | background-color: #217dbb;
239 | border-color: #16527a;
240 | }
241 | .btn-info:hover {
242 | color: #ffffff;
243 | background-color: #217dbb;
244 | border-color: #2077b2;
245 | }
246 | .btn-info:active,
247 | .btn-info.active,
248 | .open > .dropdown-toggle.btn-info {
249 | color: #ffffff;
250 | background-color: #217dbb;
251 | border-color: #2077b2;
252 | }
253 | .btn-info:active:hover,
254 | .btn-info.active:hover,
255 | .open > .dropdown-toggle.btn-info:hover,
256 | .btn-info:active:focus,
257 | .btn-info.active:focus,
258 | .open > .dropdown-toggle.btn-info:focus,
259 | .btn-info:active.focus,
260 | .btn-info.active.focus,
261 | .open > .dropdown-toggle.btn-info.focus {
262 | color: #ffffff;
263 | background-color: #1c699d;
264 | border-color: #16527a;
265 | }
266 | .btn-info:active,
267 | .btn-info.active,
268 | .open > .dropdown-toggle.btn-info {
269 | background-image: none;
270 | }
271 | .btn-info.disabled:hover,
272 | .btn-info[disabled]:hover,
273 | fieldset[disabled] .btn-info:hover,
274 | .btn-info.disabled:focus,
275 | .btn-info[disabled]:focus,
276 | fieldset[disabled] .btn-info:focus,
277 | .btn-info.disabled.focus,
278 | .btn-info[disabled].focus,
279 | fieldset[disabled] .btn-info.focus {
280 | background-color: #3498db;
281 | border-color: #3498db;
282 | }
283 | .btn-info .badge {
284 | color: #3498db;
285 | background-color: #ffffff;
286 | }
287 | .btn-warning {
288 | color: #ffffff;
289 | background-color: #f39c12;
290 | border-color: #f39c12;
291 | }
292 | .btn-warning:focus,
293 | .btn-warning.focus {
294 | color: #ffffff;
295 | background-color: #c87f0a;
296 | border-color: #7f5006;
297 | }
298 | .btn-warning:hover {
299 | color: #ffffff;
300 | background-color: #c87f0a;
301 | border-color: #be780a;
302 | }
303 | .btn-warning:active,
304 | .btn-warning.active,
305 | .open > .dropdown-toggle.btn-warning {
306 | color: #ffffff;
307 | background-color: #c87f0a;
308 | border-color: #be780a;
309 | }
310 | .btn-warning:active:hover,
311 | .btn-warning.active:hover,
312 | .open > .dropdown-toggle.btn-warning:hover,
313 | .btn-warning:active:focus,
314 | .btn-warning.active:focus,
315 | .open > .dropdown-toggle.btn-warning:focus,
316 | .btn-warning:active.focus,
317 | .btn-warning.active.focus,
318 | .open > .dropdown-toggle.btn-warning.focus {
319 | color: #ffffff;
320 | background-color: #a66908;
321 | border-color: #7f5006;
322 | }
323 | .btn-warning:active,
324 | .btn-warning.active,
325 | .open > .dropdown-toggle.btn-warning {
326 | background-image: none;
327 | }
328 | .btn-warning.disabled:hover,
329 | .btn-warning[disabled]:hover,
330 | fieldset[disabled] .btn-warning:hover,
331 | .btn-warning.disabled:focus,
332 | .btn-warning[disabled]:focus,
333 | fieldset[disabled] .btn-warning:focus,
334 | .btn-warning.disabled.focus,
335 | .btn-warning[disabled].focus,
336 | fieldset[disabled] .btn-warning.focus {
337 | background-color: #f39c12;
338 | border-color: #f39c12;
339 | }
340 | .btn-warning .badge {
341 | color: #f39c12;
342 | background-color: #ffffff;
343 | }
344 | .btn-danger {
345 | color: #ffffff;
346 | background-color: #e74c3c;
347 | border-color: #e74c3c;
348 | }
349 | .btn-danger:focus,
350 | .btn-danger.focus {
351 | color: #ffffff;
352 | background-color: #d62c1a;
353 | border-color: #921e12;
354 | }
355 | .btn-danger:hover {
356 | color: #ffffff;
357 | background-color: #d62c1a;
358 | border-color: #cd2a19;
359 | }
360 | .btn-danger:active,
361 | .btn-danger.active,
362 | .open > .dropdown-toggle.btn-danger {
363 | color: #ffffff;
364 | background-color: #d62c1a;
365 | border-color: #cd2a19;
366 | }
367 | .btn-danger:active:hover,
368 | .btn-danger.active:hover,
369 | .open > .dropdown-toggle.btn-danger:hover,
370 | .btn-danger:active:focus,
371 | .btn-danger.active:focus,
372 | .open > .dropdown-toggle.btn-danger:focus,
373 | .btn-danger:active.focus,
374 | .btn-danger.active.focus,
375 | .open > .dropdown-toggle.btn-danger.focus {
376 | color: #ffffff;
377 | background-color: #b62516;
378 | border-color: #921e12;
379 | }
380 | .btn-danger:active,
381 | .btn-danger.active,
382 | .open > .dropdown-toggle.btn-danger {
383 | background-image: none;
384 | }
385 | .btn-danger.disabled:hover,
386 | .btn-danger[disabled]:hover,
387 | fieldset[disabled] .btn-danger:hover,
388 | .btn-danger.disabled:focus,
389 | .btn-danger[disabled]:focus,
390 | fieldset[disabled] .btn-danger:focus,
391 | .btn-danger.disabled.focus,
392 | .btn-danger[disabled].focus,
393 | fieldset[disabled] .btn-danger.focus {
394 | background-color: #e74c3c;
395 | border-color: #e74c3c;
396 | }
397 | .btn-danger .badge {
398 | color: #e74c3c;
399 | background-color: #ffffff;
400 | }
401 | .btn-link {
402 | color: #18bc9c;
403 | font-weight: normal;
404 | border-radius: 0;
405 | }
406 | .btn-link,
407 | .btn-link:active,
408 | .btn-link.active,
409 | .btn-link[disabled],
410 | fieldset[disabled] .btn-link {
411 | background-color: transparent;
412 | -webkit-box-shadow: none;
413 | box-shadow: none;
414 | }
415 | .btn-link,
416 | .btn-link:hover,
417 | .btn-link:focus,
418 | .btn-link:active {
419 | border-color: transparent;
420 | }
421 | .btn-link:hover,
422 | .btn-link:focus {
423 | color: #18bc9c;
424 | text-decoration: underline;
425 | background-color: transparent;
426 | }
427 | .btn-link[disabled]:hover,
428 | fieldset[disabled] .btn-link:hover,
429 | .btn-link[disabled]:focus,
430 | fieldset[disabled] .btn-link:focus {
431 | color: #b4bcc2;
432 | text-decoration: none;
433 | }
434 | .btn-lg,
435 | .btn-group-lg > .btn {
436 | padding: 18px 27px;
437 | font-size: 19px;
438 | line-height: 1.3333333;
439 | border-radius: 6px;
440 | }
441 | .btn-sm,
442 | .btn-group-sm > .btn {
443 | padding: 6px 9px;
444 | font-size: 13px;
445 | line-height: 1.5;
446 | border-radius: 3px;
447 | }
448 | .btn-xs,
449 | .btn-group-xs > .btn {
450 | padding: 1px 5px;
451 | font-size: 13px;
452 | line-height: 1.5;
453 | border-radius: 3px;
454 | }
455 | .btn-block {
456 | display: block;
457 | width: 100%;
458 | }
459 | .btn-block + .btn-block {
460 | margin-top: 5px;
461 | }
462 | input[type="submit"].btn-block,
463 | input[type="reset"].btn-block,
464 | input[type="button"].btn-block {
465 | width: 100%;
466 | }
467 |
--------------------------------------------------------------------------------
/demo/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | react-bootstrap-button-loader demo
7 |
8 |
48 |
49 |
50 |
51 |
react-bootstrap-button-loader demo
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/demo/dist/main.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n1){for(var m=Array(v),g=0;g1){for(var b=Array(y),C=0;C]/;e.exports=r},function(e,t,n){"use strict";var r,o=n(6),i=n(63),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(77),l=s(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="";for(var n=r.firstChild.childNodes,o=0;o";for(t.style.display="none",n(160).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),l=e.F;r--;)delete l[s][i[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(u[s]=r(e),n=new u,u[s]=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(24).f,o=n(20),i=n(26)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(57)("keys"),o=n(41);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(14),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(32);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(14),o=n(13),i=n(52),a=n(61),u=n(24).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(26)},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var c=n(27),p=n(193),d=n(119),f=(n(5),n(7),n(77)),h=n(46),v=n(132),m=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n-1?void 0:a("96",e),!l.plugins[n]){t.extractEvents?void 0:a("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a("98",i,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]?a("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),u=(n(1),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a("101"):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?a("102",n):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=u.get(e);if(!n){return null}return n}var a=n(2),u=(n(17),n(36)),s=(n(7),n(10)),l=(n(1),n(3),{isMounted:function(e){var t=u.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,o(e)):void 0}});e.exports=l},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";/**
3 | * Checks if an event is supported in the current execution environment.
4 | *
5 | * NOTE: This will not work correctly for non-generic events such as `change`,
6 | * `reset`, `load`, `error`, and `select`.
7 | *
8 | * Borrows from Modernizr.
9 | *
10 | * @param {string} eventNameSuffix Event name, e.g. "click".
11 | * @param {?boolean} capture Check if the capture phase is supported.
12 | * @return {boolean} True if the event is supported.
13 | * @internal
14 | * @license Modernizr 3.0.0pre (Custom Build) | MIT
15 | */
16 | function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(6);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||u.isValidElement(e))return n(i,e,""===t?c+r(e,0):t),1;var f,h,v=0,m=""===t?c:t+p;if(Array.isArray(e))for(var g=0;g1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(92),i=r(o);t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(148),i=r(o),a=n(147),u=r(a),s="function"==typeof u["default"]&&"symbol"==typeof i["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof u["default"]&&e.constructor===u["default"]?"symbol":typeof e};t["default"]="function"==typeof u["default"]&&"symbol"===s(i["default"])?function(e){return"undefined"==typeof e?"undefined":s(e)}:function(e){return e&&"function"==typeof u["default"]&&e.constructor===u["default"]?"symbol":"undefined"==typeof e?"undefined":s(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(156);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(32),o=n(14).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){e.exports=!n(22)&&!n(31)(function(){return 7!=Object.defineProperty(n(95)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(93);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var r=n(52),o=n(19),i=n(103),a=n(23),u=n(20),s=n(51),l=n(162),c=n(55),p=n(169),d=n(26)("iterator"),f=!([].keys&&"next"in[].keys()),h="@@iterator",v="keys",m="values",g=function(){return this};e.exports=function(e,t,n,y,b,C,_){l(n,t,y);var E,x,w,T=function(e){if(!f&&e in N)return N[e];switch(e){case v:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},P=t+" Iterator",S=b==m,k=!1,N=e.prototype,M=N[d]||N[h]||b&&N[b],O=M||T(b),R=b?S?T("entries"):O:void 0,I="Array"==t?N.entries||M:M;if(I&&(w=p(I.call(new e)),w!==Object.prototype&&(c(w,P,!0),r||u(w,d)||a(w,d,g))),S&&M&&M.name!==m&&(k=!0,O=function(){return M.call(this)}),r&&!_||!f&&!k&&N[d]||a(N,d,O),s[t]=O,s[P]=g,b)if(E={values:S?O:T(m),keys:C?O:T(v),entries:R},_)for(x in E)x in N||i(N,x,E[x]);else o(o.P+o.F*(f||k),t,E);return E}},function(e,t,n){var r=n(33),o=n(40),i=n(15),a=n(59),u=n(20),s=n(96),l=Object.getOwnPropertyDescriptor;t.f=n(22)?l:function(e,t){if(e=i(e),t=a(t,!0),s)try{return l(e,t)}catch(n){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(101),o=n(50).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(20),o=n(15),i=n(158)(!1),a=n(56)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,l=[];for(n in u)n!=a&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(25),o=n(15),i=n(33).f;e.exports=function(e){return function(t){for(var n,a=o(t),u=r(a),s=u.length,l=0,c=[];s>l;)i.call(a,n=u[l++])&&c.push(e?[n,a[n]]:a[n]);return c}}},function(e,t,n){e.exports=n(23)},function(e,t,n){var r=n(49);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r,o){var a=e[t],s="undefined"==typeof a?"undefined":i(a);return u["default"].isValidElement(a)?new Error("Invalid "+r+" `"+o+"` of type ReactElement "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):"function"!==s&&"string"!==s?new Error("Invalid "+r+" `"+o+"` of value `"+a+"` "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):null}t.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(21),u=r(a),s=n(188),l=r(s);t["default"]=(0,l["default"])(o)},function(e,t,n){"use strict";e.exports=n(202)},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(2),i=n(4),a=n(16);n(1);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,u=C(F,null,null,null,null,null,t);if(e){var s=E.get(e);a=s._processChildContext(s._context)}else a=S;var c=d(n);if(c){var p=c._currentElement,h=p.props;if(M(h,t)){var v=c._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return j._updateRootComponent(c,u,a,n,m),v}j.unmountComponentAtNode(n)}var g=o(n),y=g&&!!i(g),b=l(n),_=y&&!c&&!b,x=j._renderNewRootComponent(u,n,_,a)._renderedComponent.getPublicInstance();return r&&r.call(x),x},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(R);return!1}return delete L[t._instance.rootID],P.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(c(t)?void 0:f("41"),i){var u=o(t);if(x.canReuseMarkup(e,u))return void g.precacheNode(n,u);var s=u.getAttribute(x.CHECKSUM_ATTR_NAME);u.removeAttribute(x.CHECKSUM_ATTR_NAME);var l=u.outerHTML;u.setAttribute(x.CHECKSUM_ATTR_NAME,s);var p=e,d=r(p,l),v=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===A?f("42",v):void 0}if(t.nodeType===A?f("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else N(t,e),g.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var r=n(47),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(2),o=n(9),i=(n(1),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,u,s){i=i||P,u=u||r;if(null==n[r]){var l=E[a];return t?new o("Required "+l+" `"+u+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,a,u)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,u){var s=t[n],l=y(s);if(l!==e){var c=E[i],p=b(s);return new o("Invalid "+c+" `"+a+"` of type "+("`"+p+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function u(){return i(w.thatReturns(null))}function s(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){var s=E[i],l=y(u);return new o("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c>"),S={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:u(),arrayOf:s,element:l(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:v};o.prototype=Error.prototype,e.exports=S},function(e,t){"use strict";e.exports="15.3.1"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(2);n(1);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(120);e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(6),i=null;e.exports=r},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||e===!1)n=l.create(i);else if("object"==typeof e){var u=e;!u||"function"!=typeof u.type&&"string"!=typeof u.type?a("130",null==u.type?u.type:typeof u.type,r(u._owner)):void 0,"string"==typeof u.type?n=c.createInternalComponent(u):o(u.type)?(n=new u.type(u),
17 | n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(u)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=n(2),u=n(4),s=n(201),l=n(114),c=n(116),p=(n(1),n(3),function(e){this.construct(e)});u(p.prototype,s.Mixin,{_instantiateReactComponent:i});e.exports=i},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!r[e.type]:"textarea"===t}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";var r=n(6),o=n(45),i=n(46),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";var r=n(8),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){function t(){return m?(console.log(y),s["default"].createElement(d["default"],{spinColor:y})):h}var n=e.bsStyle,r=void 0===n?"default":n,i=e.children,u=void 0===i?null:i,l=e.disabled,p=void 0!==l&&l,f=e.icon,h=void 0===f?null:f,v=e.loading,m=void 0!==v&&v,g=e.spinColor,y=void 0===g?"#fff":g,b=o(e,["bsStyle","children","disabled","icon","loading","spinColor"]),C=p||m;return s["default"].createElement(c["default"],a({bsStyle:r,disabled:C},b),t()," ",u)}Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=t.ButtonLoader=void 0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){var t=e.spinColor,n=void 0===t?"#fff":t,r=e.spinConfig,i=void 0===r?{length:4,lines:15,radius:3,width:2}:r,u=o(e,["spinColor","spinConfig"]),l={display:"inline-block",height:"11px",position:"relative",width:"16px"};return s["default"].createElement("div",a({style:{display:"inline-block"}},u),s["default"].createElement("div",{style:l},s["default"].createElement(c["default"],a({},i,{color:n,loaded:!1}))))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t',n)}c.addRule(".spin-vml","behavior:url(#default#VML)"),u.prototype.lines=function(e,r){function i(){return o(n("group",{coordsize:c+" "+c,coordorigin:-l+" "+-l}),{width:c,height:c})}function u(e,u,s){t(d,t(o(i(),{rotation:360/r.lines*e+"deg",left:~~u}),t(o(n("roundrect",{arcsize:r.corners}),{width:l,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:s}),n("fill",{color:a(r.color,e),opacity:r.opacity}),n("stroke",{opacity:0}))))}var s,l=r.scale*(r.length+r.width),c=2*r.scale*l,p=-(r.width+r.length)*r.scale*2+"px",d=o(i(),{position:"absolute",top:p,left:p});if(r.shadow)for(s=1;s<=r.lines;s++)u(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=r.lines;s++)u(s);return t(e,d)},u.prototype.opacity=function(e,t,n,r){var o=e.firstChild;r=r.shadow&&r.lines||0,o&&t+r>1)+"px"})}for(var s,c=0,p=(i.lines-1)*(1-i.direction)/2;c1?t-1:0),r=1;rc;)if(u=s[c++],u!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(25),o=n(54),i=n(33);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,l=0;u.length>l;)s.call(e,a=u[l++])&&t.push(a);return t}},function(e,t,n){e.exports=n(14).document&&document.documentElement},function(e,t,n){var r=n(93);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(53),o=n(40),i=n(55),a={};n(23)(a,n(26)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(25),o=n(15);e.exports=function(e,t){for(var n,i=o(e),a=r(i),u=a.length,s=0;u>s;)if(i[n=a[s++]]===t)return n}},function(e,t,n){var r=n(41)("meta"),o=n(32),i=n(20),a=n(24).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(31)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},d=function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},f=function(e){return l&&h.NEED&&s(e)&&!i(e,r)&&c(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:d,onFreeze:f}},function(e,t,n){"use strict";var r=n(25),o=n(54),i=n(33),a=n(104),u=n(97),s=Object.assign;e.exports=!s||n(31)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=a(e),s=arguments.length,l=1,c=o.f,p=i.f;s>l;)for(var d,f=u(arguments[l++]),h=c?r(f).concat(c(f)):r(f),v=h.length,m=0;v>m;)p.call(f,d=h[m++])&&(n[d]=f[d]);return n}:s},function(e,t,n){var r=n(24),o=n(30),i=n(25);e.exports=n(22)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(15),o=n(100).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(r(e))}},function(e,t,n){var r=n(20),o=n(104),i=n(56)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(32),o=n(30),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(94)(Function.call,n(99).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){var r=n(58),o=n(49);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var r=n(58),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(58),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(157),o=n(163),i=n(51),a=n(15);e.exports=n(98)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(166)})},function(e,t,n){var r=n(19);r(r.S,"Object",{create:n(53)})},function(e,t,n){var r=n(19);r(r.S,"Object",{setPrototypeOf:n(170).set})},function(e,t){},function(e,t,n){"use strict";var r=n(171)(!0);n(98)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(14),o=n(20),i=n(22),a=n(19),u=n(103),s=n(165).KEY,l=n(31),c=n(57),p=n(55),d=n(41),f=n(26),h=n(61),v=n(60),m=n(164),g=n(159),y=n(161),b=n(30),C=n(15),_=n(59),E=n(40),x=n(53),w=n(168),T=n(99),P=n(24),S=n(25),k=T.f,N=P.f,M=w.f,O=r.Symbol,R=r.JSON,I=R&&R.stringify,A="prototype",D=f("_hidden"),L=f("toPrimitive"),U={}.propertyIsEnumerable,F=c("symbol-registry"),j=c("symbols"),B=c("op-symbols"),V=Object[A],W="function"==typeof O,H=r.QObject,q=!H||!H[A]||!H[A].findChild,K=i&&l(function(){return 7!=x(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=k(V,t);r&&delete V[t],N(e,t,n),r&&e!==V&&N(V,t,r)}:N,z=function(e){var t=j[e]=x(O[A]);return t._k=e,t},Y=W&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},G=function(e,t,n){return e===V&&G(B,t,n),b(e),t=_(t,!0),b(n),o(j,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1),n=x(n,{enumerable:E(0,!1)})):(o(e,D)||N(e,D,E(1,{})),e[D][t]=!0),K(e,t,n)):N(e,t,n)},X=function(e,t){b(e);for(var n,r=g(t=C(t)),o=0,i=r.length;i>o;)G(e,n=r[o++],t[n]);return e},Q=function(e,t){return void 0===t?x(e):X(x(e),t)},$=function(e){var t=U.call(this,e=_(e,!0));return!(this===V&&o(j,e)&&!o(B,e))&&(!(t||!o(this,e)||!o(j,e)||o(this,D)&&this[D][e])||t)},Z=function(e,t){if(e=C(e),t=_(t,!0),e!==V||!o(j,t)||o(B,t)){var n=k(e,t);return!n||!o(j,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=M(C(e)),r=[],i=0;n.length>i;)o(j,t=n[i++])||t==D||t==s||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=M(n?B:C(e)),i=[],a=0;r.length>a;)!o(j,t=r[a++])||n&&!o(V,t)||i.push(j[t]);return i};W||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(B,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),K(this,e,E(1,n))};return i&&q&&K(V,e,{configurable:!0,set:t}),z(e)},u(O[A],"toString",function(){return this._k}),T.f=Z,P.f=G,n(100).f=w.f=J,n(33).f=$,n(54).f=ee,i&&!n(52)&&u(V,"propertyIsEnumerable",$,!0),h.f=function(e){return z(f(e))}),a(a.G+a.W+a.F*!W,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var te=S(f.store),ne=0;te.length>ne;)v(te[ne++]);a(a.S+a.F*!W,"Symbol",{"for":function(e){return o(F,e+="")?F[e]:F[e]=O(e)},keyFor:function(e){if(Y(e))return m(F,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!W,"Object",{create:Q,defineProperty:G,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee}),R&&a(a.S+a.F*(!W||l(function(){var e=O();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Y(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,I.apply(R,r)}}}),O[A][L]||n(23)(O[A],L,O[A].valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){var r=n(19),o=n(102)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){var r=n(19),o=n(102)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){n(60)("asyncIterator")},function(e,t,n){n(60)("observable")},function(e,t,n){n(174);for(var r=n(14),o=n(23),i=n(51),a=n(26)("toStringTag"),u=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],s=0;s<5;s++){var l=u[s],c=r[l],p=c&&c.prototype;p&&!p[a]&&o(p,a,l),i[l]=i.Array}},function(e,t,n){var r,o;/*!
18 | Copyright (c) 2016 Jed Watson.
19 | Licensed under the MIT License (MIT), see
20 | http://jedwatson.github.io/classnames
21 | */
22 | !function(){"use strict";function n(){for(var e=[],t=0;t>",s=a||r;if(null==n[r])return t?new Error("Required "+i+" `"+s+"` was not specified "+("in `"+u+"`.")):null;for(var l=arguments.length,c=Array(l>6?l-6:0),p=6;p8&&x<=11),P=32,S=String.fromCharCode(P),k=f.topLevelTypes,N={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[k.topCompositionEnd,k.topKeyPress,k.topTextInput,k.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[k.topBlur,k.topCompositionEnd,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[k.topBlur,k.topCompositionStart,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[k.topBlur,k.topCompositionUpdate,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]}},M=!1,O=null,R={eventTypes:N,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};e.exports=R},function(e,t,n){"use strict";var r=n(107),o=n(6),i=(n(7),n(254),n(244)),a=n(261),u=n(264),s=(n(3),u(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(d){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=c),u)o[a]=u;else{var s=l&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};e.exports=f},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=w.getPooled(M.change,R,e,T(e));C.accumulateTwoPhaseDispatches(t),x.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){O=e,R=t,O.attachEvent("onchange",o)}function u(){O&&(O.detachEvent("onchange",o),O=null,R=null)}function s(e,t){if(e===N.topChange)return t}function l(e,t,n){e===N.topFocus?(u(),a(t,n)):e===N.topBlur&&u()}function c(e,t){O=e,R=t,I=e.value,A=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(O,"value",U),O.attachEvent?O.attachEvent("onpropertychange",d):O.addEventListener("propertychange",d,!1)}function p(){O&&(delete O.value,O.detachEvent?O.detachEvent("onpropertychange",d):O.removeEventListener("propertychange",d,!1),O=null,R=null,I=null,A=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==I&&(I=t,o(e))}}function f(e,t){if(e===N.topInput)return t}function h(e,t,n){e===N.topFocus?(p(),c(t,n)):e===N.topBlur&&p()}function v(e,t){if((e===N.topSelectionChange||e===N.topKeyUp||e===N.topKeyDown)&&O&&O.value!==I)return I=O.value,R}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if(e===N.topClick)return t}var y=n(11),b=n(34),C=n(35),_=n(6),E=n(5),x=n(10),w=n(12),T=n(80),P=n(81),S=n(131),k=n(18),N=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:k({onChange:null}),captured:k({onChangeCapture:null})},dependencies:[N.topBlur,N.topChange,N.topClick,N.topFocus,N.topInput,N.topKeyDown,N.topKeyUp,N.topSelectionChange]}},O=null,R=null,I=null,A=null,D=!1;_.canUseDOM&&(D=P("change")&&(!("documentMode"in document)||document.documentMode>8));var L=!1;_.canUseDOM&&(L=P("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return A.get.call(this)},set:function(e){I=""+e,A.set.call(this,e)}},F={eventTypes:M,extractEvents:function(e,t,n,o){var i,a,u=t?E.getNodeFromInstance(t):window;if(r(u)?D?i=s:a=l:S(u)?L?i=f:(i=v,a=h):m(u)&&(i=g),i){var c=i(e,t);if(c){var p=w.getPooled(M.change,c,n,o);return p.type="change",C.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};e.exports=F},function(e,t,n){"use strict";var r=n(2),o=n(27),i=n(6),a=n(257),u=n(8),s=(n(1),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";var r=n(18),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(11),o=n(35),i=n(5),a=n(44),u=n(18),s=r.topLevelTypes,l={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},c={eventTypes:l,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var c=r.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var p,d;if(e===s.topMouseOut){p=t;var f=n.relatedTarget||n.toElement;d=f?i.getClosestInstanceFromNode(f):null}else p=null,d=t;if(p===d)return null;var h=null==p?u:i.getNodeFromInstance(p),v=null==d?u:i.getNodeFromInstance(d),m=a.getPooled(l.mouseLeave,p,n,r);m.type="mouseleave",m.target=h,m.relatedTarget=v;var g=a.getPooled(l.mouseEnter,d,n,r);return g.type="mouseenter",g.target=v,g.relatedTarget=h,o.accumulateEnterLeaveDispatches(m,g,p,d),[m,g]}};e.exports=c},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(4),i=n(16),a=n(129);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(28),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=l},function(e,t,n){"use strict";var r=n(4),o=n(110),i=n(68),a=n(224),u=n(111),s=n(207),l=n(9),c=n(121),p=n(122),d=n(250),f=(n(3),l.createElement),h=l.createFactory,v=l.cloneElement,m=r,g={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:d},Component:i,PureComponent:a,createElement:f,cloneElement:v,isValidElement:l.isValidElement,PropTypes:c,createClass:u.createClass,createFactory:h,createMixin:function(e){return e},DOM:s,version:p,__spread:m};e.exports=g},function(e,t,n){(function(t){"use strict";function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}var o=n(29),i=n(130),a=(n(66),n(82)),u=n(83),s=(n(3),{instantiateChildren:function(e,t,n,o){if(null==e)return null;var i={};return u(e,r,i),i},updateChildren:function(e,t,n,r,u,s,l,c,p){if(t||e){var d,f;for(d in t)if(t.hasOwnProperty(d)){f=e&&e[d];var h=f&&f._currentElement,v=t[d];if(null!=f&&a(h,v))o.receiveComponent(f,v,u,c),t[d]=f;else{f&&(r[d]=o.getHostNode(f),o.unmountComponent(f,!1));var m=i(v,!0);t[d]=m;var g=o.mountComponent(m,u,s,l,c,p);n.push(g)}}for(d in e)!e.hasOwnProperty(d)||t&&t.hasOwnProperty(d)||(f=e[d],r[d]=o.getHostNode(f),o.unmountComponent(f,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s}).call(t,n(86))},function(e,t,n){"use strict";var r=n(62),o=n(209),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";function r(e){}function o(e,t){}function i(e){return!(!e.prototype||!e.prototype.isReactComponent)}function a(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var u=n(2),s=n(4),l=n(69),c=n(17),p=n(9),d=n(71),f=n(36),h=(n(7),n(120)),v=(n(74),n(29)),m=n(243),g=n(39),y=(n(1),n(85)),b=n(82),C=(n(3),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var _=1,E={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,s){this._context=s,this._mountOrder=_++,this._hostParent=t,this._hostContainerInfo=n;var l,c=this._currentElement.props,d=this._processContext(s),h=this._currentElement.type,v=e.getUpdateQueue(),m=i(h),y=this._constructComponent(m,c,d,v);m||null!=y&&null!=y.render?a(h)?this._compositeType=C.PureClass:this._compositeType=C.ImpureClass:(l=y,o(h,l),null===y||y===!1||p.isValidElement(y)?void 0:u("105",h.displayName||h.name||"Component"),y=new r(h),this._compositeType=C.StatelessFunctional);y.props=c,y.context=d,y.refs=g,y.updater=v,this._instance=y,f.set(y,this);var b=y.state;void 0===b&&(y.state=b=null),"object"!=typeof b||Array.isArray(b)?u("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var E;return E=y.unstable_handleError?this.performInitialMountWithErrorHandling(l,t,n,e,s):this.performInitialMount(l,t,n,e,s),y.componentDidMount&&e.getReactMountReady().enqueue(y.componentDidMount,y),E},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o,i=this._currentElement.type;return o=e?new i(t,n,r):i(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var a=h.getType(e);this._renderedNodeType=a;var u=this._instantiateReactComponent(e,a!==h.EMPTY);this._renderedComponent=u;var s=0,l=v.mountComponent(u,r,t,n,this._processChildContext(o),s);return l},getHostNode:function(){return v.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return g;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?u("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in r)o in t.childContextTypes?void 0:u("108",this.getName()||"ReactCompositeComponent",o);return s({},e,r)}return e},_checkContextTypes:function(e,t,n){m(e,t,n,this.getName(),null,this._debugID)},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?v.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i=this._instance;null==i?u("136",this.getName()||"ReactCompositeComponent"):void 0;var a,s=!1;this._context===o?a=i.context:(a=this._processContext(o),s=!0);var l=t.props,c=n.props;t!==n&&(s=!0),s&&i.componentWillReceiveProps&&i.componentWillReceiveProps(c,a);var p=this._processPendingState(c,a),d=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?d=i.shouldComponentUpdate(c,p,a):this._compositeType===C.PureClass&&(d=!y(l,c)||!y(i.state,p))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,p,a,e,o)):(this._currentElement=n,this._context=o,i.props=c,i.state=p,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=s({},o?r[0]:n.state),a=o?1:0;a=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(2),m=n(4),g=n(189),y=n(191),b=n(27),C=n(63),_=n(28),E=n(109),x=n(11),w=n(34),T=n(64),P=n(43),S=n(203),k=n(112),N=n(5),M=n(210),O=n(211),R=n(113),I=n(214),A=(n(7),n(222)),D=n(227),L=(n(8),n(45)),U=(n(1),n(81),n(18)),F=(n(85),n(84),n(3),k),j=w.deleteListener,B=N.getNodeFromInstance,V=P.listenTo,W=T.registrationNameModules,H={string:!0,number:!0},q=U({style:null}),K=U({__html:null}),z={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},Y=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=m({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":i=S.getHostProps(this,i,t);break;case"input":M.mountWrapper(this,i,t),i=M.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"option":O.mountWrapper(this,i,t),i=O.getHostProps(this,i);break;case"select":R.mountWrapper(this,i,t),i=R.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"textarea":I.mountWrapper(this,i,t),i=I.getHostProps(this,i),e.getReactMountReady().enqueue(c,this)}o(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===C.svg&&"foreignobject"===p)&&(a=C.html),a===C.html&&("svg"===this._tag?a=C.svg:"math"===this._tag&&(a=C.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(a===C.html)if("script"===this._tag){var v=h.createElement("div"),m=this._currentElement.type;v.innerHTML="<"+m+">"+m+">",f=v.removeChild(v.firstChild)}else f=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else f=h.createElementNS(a,this._currentElement.type);N.precacheNode(this,f),this._flags|=F.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(f),this._updateDOMProperties(null,i,e);var y=b(f);this._createInitialChildren(e,i,r,y),d=y}else{var _=this._createOpenTagMarkupAndPutListeners(e,i),x=this._createContentMarkup(e,i,r);d=!x&&X[this._tag]?_+"/>":_+">"+x+""+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&i(this,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=m({},t.style)),o=y.createMarkupForStyles(o,this));var a=null;null!=this._tag&&f(this._tag,t)?z.hasOwnProperty(r)||(a=E.createMarkupForCustomAttribute(r,o)):a=E.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=H[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=L(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&b.queueHTML(r,o.__html);else{var i=H[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)b.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";var r=n(9),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),"var":o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(62),o=n(5),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=c.getNodeFromInstance(this),u=a;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=l(e,o),s=l(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(6),l=n(248),c=n(129),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=d},function(e,t,n){"use strict";var r=n(2),o=n(4),i=n(62),a=n(27),u=n(5),s=n(45),l=(n(1),n(84),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(i),d=c.createComment(l),f=a(c.createDocumentFragment());return a.queueChild(f,a(p)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(d)),u.precacheNode(this,p),this._closingComment=d,f}var h=s(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=u.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var i=n(2),a=n(4),u=n(42),s=n(67),l=n(5),c=n(10),p=(n(1),n(3),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?i("91"):void 0;var n=a({},u.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var a=t.defaultValue,u=t.children;null!=u&&(null!=a?i("92"):void 0,Array.isArray(u)&&(u.length<=1?void 0:i("93"),u=u[0]),a=""+u),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});e.exports=p},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:s("33"),"_hostNode"in t?void 0:s("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:s("35"),"_hostNode"in t?void 0:s("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:s("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o0;)n(s[l],!1,i)}var s=n(2);n(1);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(4),i=n(10),a=n(38),u=n(8),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:i.flushBatchedUpdates.bind(i)},c=[l,s];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=d},function(e,t,n){"use strict";function r(){E||(E=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(a),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(f),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:C,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(s),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(v),g.Component.injectEnvironment(l))}var o=n(190),i=n(192),a=n(194),u=n(195),s=n(197),l=n(200),c=n(204),p=n(5),d=n(206),f=n(215),h=n(213),v=n(216),m=n(219),g=n(220),y=n(225),b=n(229),C=n(230),_=n(231),E=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(34),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=n(2),p=n(69),d=(n(36),n(7),n(119)),f=(n(17),n(29)),h=n(199),v=(n(8),n(246)),m=(n(1),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a,u=0;return a=v(t,u),h.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i,u),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=0,l=f.mountComponent(u,t,this,this._hostContainerInfo,n,s);u._mountIndex=i++,o.push(l)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[u(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var u,c=null,p=0,d=0,h=0,v=null;for(u in a)if(a.hasOwnProperty(u)){var m=r&&r[u],g=a[u];m===g?(c=s(c,this.moveChild(m,v,p,d)),d=Math.max(m._mountIndex,d),m._mountIndex=p):(m&&(d=Math.max(m._mountIndex,d)),c=s(c,this._mountChildAtIndex(g,i[h],v,p,t,n)),h++),p++,v=f.getHostNode(g)}for(u in o)o.hasOwnProperty(u)&&(c=s(c,this._unmountChild(r[u],o[u])));c&&l(this,c),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=n(6),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=n(2),i=n(9);n(1);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(45);e.exports=r},function(e,t,n){"use strict";var r=n(118);e.exports=r.renderSubtreeIntoContainer},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(253),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(263);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;o":a.innerHTML="<"+e+">"+e+">",u[e]=!a.firstChild),u[e]?d[e]:null}var o=n(6),i=n(1),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],l=[1,""],c=[3,""],p=[1,'"],d={"*":[1,"?","
"],area:[1,""],col:[2,""],legend:[1,""],param:[1,""],tr:[2,""],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(260),i=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(262);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n}]);
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rbbl-demo",
3 | "version": "1.0.0",
4 | "description": "react-bootstrap-button-loader demo",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "node node_modules/webpack/bin/webpack -p"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "devDependencies": {
12 | "babel-core": "^6.14.0",
13 | "babel-loader": "^6.2.5",
14 | "babel-preset-es2015": "^6.14.0",
15 | "babel-preset-react": "^6.11.1",
16 | "babel-preset-stage-0": "^6.5.0",
17 | "webpack": "^1.13.2"
18 | },
19 | "dependencies": {
20 | "react": "^15.3.1",
21 | "react-bootstrap": "^0.30.3",
22 | "react-bootstrap-button-loader": "^1.0.4",
23 | "react-dom": "^15.3.1"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/demo/src/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { render } from 'react-dom';
3 | import Button from 'react-bootstrap-button-loader';
4 |
5 | class App extends Component {
6 | static svgIcon() {
7 | return (
8 |
9 |
26 |
27 | );
28 | }
29 |
30 | constructor() {
31 | super();
32 |
33 | this.handleClick = this.handleClick.bind(this);
34 |
35 | this.state = {
36 | disabled: false,
37 | forceLoading: false,
38 | loading: 0,
39 | showIcon: true,
40 | spinColor: '#fff',
41 | style: 'default',
42 | };
43 | }
44 |
45 | componentWillUnmount() {
46 | clearInterval(this.interval);
47 | }
48 |
49 | handleClick() {
50 | this.setState({ loading: 5 });
51 | this.interval = setInterval(() => {
52 | const nextLoading = this.state.loading - 1;
53 |
54 | if (nextLoading <= 0) {
55 | clearInterval(this.interval);
56 | }
57 |
58 | this.setState({ loading: Math.max(nextLoading, 0) });
59 |
60 | }, 1000);
61 | }
62 |
63 | render() {
64 | const bsButtons = ['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].map((bsStyle) => (
65 |
73 | ));
74 |
75 | const spinColorButtons = ['#fff', '#444'].map((color) => (
76 |
83 | ));
84 |
85 | return (
86 |
87 |
88 |
98 | {!!this.state.loading &&
I am loading for {this.state.loading} more seconds
}
99 |
100 |
101 |
102 | Configurable props
103 | bsStype
104 | {bsButtons}
105 | disabled
106 |
107 | loading
108 |
109 | icon
110 |
111 | spinColor
112 | {spinColorButtons}
113 |
114 |
115 | );
116 | }
117 | }
118 |
119 | render(, document.getElementById('app'));
120 |
--------------------------------------------------------------------------------
/demo/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | module.exports = {
5 | entry: './src/index.js',
6 | output: {
7 | path: path.join(__dirname, 'dist'),
8 | filename: '[name].js',
9 | },
10 | plugins: [
11 | new webpack.DefinePlugin({
12 | 'process.env': {
13 | 'NODE_ENV': JSON.stringify('production')
14 | }
15 | }),
16 | new webpack.optimize.DedupePlugin(),
17 | new webpack.optimize.OccurenceOrderPlugin()
18 | ],
19 | module: {
20 | loaders: [
21 | { include: /\.jsx?$/, loader: 'babel', exclude: /node_modules/ }
22 | ]
23 | },
24 | resolve: {
25 | root: path.join(__dirname, 'src'),
26 | modulesDirectories: [ 'node_modules' ],
27 | extensions: ['', '.js', '.jsx']
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/docs/gifs/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yury-dymov/react-bootstrap-button-loader/4c6d01ecd8ee26f2b4926db886c95131035ab28f/docs/gifs/demo.gif
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-bootstrap-button-loader",
3 | "version": "2.0.0",
4 | "description": "React ButtonLoader with Bootstrap flavor",
5 | "main": "dist/index.js",
6 | "scripts": {
7 | "release": "./node_modules/.bin/webpack --verbose --colors --display-error-details --config webpack.release.js -p",
8 | "test": "mocha --require @babel/register --require test/setup.js test/*.spec.js",
9 | "coverage": "NODE_ENV=production webpack && nyc _mocha --require @babel/register && NODE_ENV=production webpack -p"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "https://github.com/yury-dymov/react-bootstrap-button-loader.git"
14 | },
15 | "keywords": [
16 | "react",
17 | "react-bootstrap",
18 | "button",
19 | "spinner"
20 | ],
21 | "author": "Yury Dymov",
22 | "license": "MIT",
23 | "bugs": {
24 | "url": "https://github.com/yury-dymov/react-bootstrap-button-loader/issues"
25 | },
26 | "homepage": "https://github.com/yury-dymov/react-bootstrap-button-loader#readme",
27 | "dependencies": {
28 | "prop-types": "^15.5.10",
29 | "react-loader": "^2.4.5"
30 | },
31 | "peerDependencies": {
32 | "react": "*",
33 | "react-bootstrap": ">=1.0.0-alpha"
34 | },
35 | "devDependencies": {
36 | "@babel/core": "^7.2.2",
37 | "@babel/preset-env": "^7.2.3",
38 | "@babel/preset-react": "^7.0.0",
39 | "@babel/register": "^7.0.0",
40 | "babel-loader": "^8.0.6",
41 | "chai": "^4.2.0",
42 | "chai-enzyme": "^1.0.0-beta.1",
43 | "cheerio": "^1.0.0-rc.3",
44 | "enzyme": "^3.10.0",
45 | "enzyme-adapter-react-16": "^1.14.0",
46 | "jsdom": "^15.1.1",
47 | "mocha": "^5.2.0",
48 | "nyc": "^13.1.0",
49 | "react": "^16.8.6",
50 | "react-bootstrap": "^1.0.0-beta.8",
51 | "react-dom": "^16.8.6",
52 | "webpack": "^3.12.0",
53 | "webpack-node-externals": "^1.7.2"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/ButtonLoader.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import Button from 'react-bootstrap/Button';
4 | import Spinner from './Spinner';
5 |
6 | const propTypes = {
7 | bsStyle: PropTypes.string,
8 | children: PropTypes.node,
9 | disabled: PropTypes.bool,
10 | icon: PropTypes.node,
11 | loading: PropTypes.bool,
12 | spinColor: PropTypes.string,
13 | spinAlignment: PropTypes.string,
14 | variant: PropTypes.string,
15 | };
16 |
17 | function ButtonLoader({
18 | bsStyle = null,
19 | children = null,
20 | disabled = false,
21 | icon = null,
22 | loading = false,
23 | spinColor = '#fff',
24 | spinAlignment = 'left',
25 | variant = 'primary',
26 | ...rest
27 | }) {
28 | function renderIcon() {
29 | if (loading) {
30 | return ;
31 | }
32 |
33 | return icon;
34 | }
35 |
36 | const buttonDisabled = disabled || loading;
37 |
38 | return ;
39 | }
40 |
41 | ButtonLoader.propTypes = propTypes;
42 |
43 | export default ButtonLoader;
44 |
45 | export { ButtonLoader, Spinner };
46 |
--------------------------------------------------------------------------------
/src/Spinner.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import SpinnerIcon from 'react-loader';
4 |
5 | const propTypes = {
6 | spinColor: PropTypes.string,
7 | spinConfig: PropTypes.object,
8 | spinAlignment: PropTypes.string
9 | };
10 |
11 | function Spinner({
12 | spinColor = '#fff',
13 | spinConfig = {
14 | length: 4,
15 | lines: 15,
16 | radius: 3,
17 | width: 2,
18 | },
19 | spinAlignment = 'left',
20 | ...rest
21 | }) {
22 | const style = {
23 | display: 'inline-block',
24 | height: '11px',
25 | position: 'relative',
26 | width: '16px',
27 | };
28 |
29 | const spinAlignmentStyle = {
30 | display: 'inline-block',
31 | float: spinAlignment + ' !important',
32 | padding: '0 10px'
33 | };
34 |
35 | return (
36 |
41 | );
42 | }
43 |
44 | Spinner.propTypes = propTypes;
45 |
46 | export default Spinner;
47 |
--------------------------------------------------------------------------------
/test/ButtonLoader.spec.js:
--------------------------------------------------------------------------------
1 | // We don't need to mutate props as ButtonLoader is stateless component
2 |
3 | import React from 'react';
4 | import chai, { expect } from 'chai';
5 | import chaiEnzyme from 'chai-enzyme';
6 | import Enzyme, { shallow, mount, render } from 'enzyme';
7 | import EnzymeAdapter from 'enzyme-adapter-react-16';
8 | import ButtonLoader, { Spinner } from '../dist';
9 |
10 | Enzyme.configure({ adapter: new EnzymeAdapter() });
11 | chai.use(chaiEnzyme());
12 |
13 | const icon = ;
14 |
15 | describe('loading and disabled. If loading then button is disabled, disabled prop value might be any', () => {
16 | it('loading: true, disabled: undefined => disabled', () => {
17 | const component = mount(Press me!);
18 |
19 | expect(component.find('button')).to.be.disabled()
20 | });
21 |
22 | it('loading: true, disabled: true => disabled', () => {
23 | const component = mount(Press me!);
24 |
25 | expect(component.find('button')).to.be.disabled();
26 | });
27 |
28 | it('loading: true, disabled: any => disabled', () => {
29 | const component = mount(Press me!);
30 |
31 | expect(component.find('button')).to.be.disabled();
32 | });
33 | });
34 |
35 | describe('disabled and loading. Button can be in loading state even if it was disabled', () => {
36 | it('disabled: true, loading: undefined => loading: false', () => {
37 | const component = render(Press me!);
38 |
39 | expect(component.find('.loader')).to.have.length(0);
40 | });
41 |
42 | it('disabled: true, loading: false => loading: false', () => {
43 | const component = render(Press me!);
44 |
45 | expect(component.find('.loader')).to.have.length(0);
46 | });
47 |
48 | it('disabled: true, loading: true => loading: true', () => {
49 | const component = render(Press me!);
50 |
51 | expect(component.find('.loader')).to.have.length(1);
52 | });
53 | });
54 |
55 | describe('Provided icon is rendered if not loading. Otherwise showing spinner', () => {
56 | it('icon: undefined, loading: false => icon: undefined', () => {
57 | const component = render(Press me!);
58 |
59 | expect(component.find('.providedIcon')).to.have.length(0);
60 | expect(component.find('.loader')).to.have.length(0);
61 | });
62 |
63 | it('icon: undefined, loading: undefined => icon: undefined', () => {
64 | const component = render(Press me!);
65 |
66 | expect(component.find('.providedIcon')).to.have.length(0);
67 | expect(component.find('.loader')).to.have.length(0);
68 | });
69 |
70 | it('icon: , loading: false => icon: ', () => {
71 | const component = render(Press me!);
72 |
73 | expect(component.find('.providedIcon')).to.have.length(1);
74 | expect(component.find('.loader')).to.have.length(0);
75 | });
76 |
77 | it('icon: , loading: undefined => icon: ', () => {
78 | const component = render(Press me!);
79 |
80 | expect(component.find('.providedIcon')).to.have.length(1);
81 | expect(component.find('.loader')).to.have.length(0);
82 | });
83 |
84 | it('icon: , loading: true => icon: spinner', () => {
85 | const component = render(Press me!);
86 |
87 | expect(component.find('.providedIcon')).to.have.length(0);
88 | expect(component.find('.loader')).to.have.length(1);
89 | });
90 |
91 | it('icon: undefined, loading: true => icon: spinner', () => {
92 | const component = render(Press me!);
93 |
94 | expect(component.find('.providedIcon')).to.have.length(0);
95 | expect(component.find('.loader')).to.have.length(1);
96 | });
97 | });
98 |
99 | describe('children prop is used', () => {
100 | it('passed as children prop', () => {
101 | const component = mount();
102 |
103 | expect(component.find('button')).to.have.html().match(/Press me/);
104 | });
105 |
106 | it('passed as xml', () => {
107 | const component = mount(Press me);
108 |
109 | expect(component.find('button')).to.have.html().match(/Press me/);
110 | });
111 | });
112 |
113 | describe('bsStyle, spinColor, style and className props are propagated', () => {
114 |
115 | it('bsStyle: success -> .btn-success', () => {
116 | const component = mount();
117 |
118 | expect(component.find('.btn-success')).to.have.length(1);
119 | });
120 |
121 | it('expect Spinner to have color #333', () => {
122 | const component = mount();
123 |
124 | expect(component.find(Spinner).props().spinColor).to.equal('#333');
125 | });
126 |
127 | it('className: "temp"', () => {
128 | const component = render();
129 |
130 | expect(component).to.have.attr('class').match(/temp/);
131 | });
132 |
133 | it('style: {{ zIndex: "-9999" }}', () => {
134 | const component = render();
135 |
136 | expect(component).to.have.attr('style').match(/\-9999/);
137 | });
138 | });
139 |
--------------------------------------------------------------------------------
/test/setup.js:
--------------------------------------------------------------------------------
1 | import jsdom from 'jsdom';
2 |
3 | const doc = new jsdom.JSDOM('');
4 |
5 | global.window = doc.window;
6 | global.document = doc.window.document;
7 | global.navigator = {
8 | userAgent: 'node.js',
9 | };
10 |
--------------------------------------------------------------------------------
/webpack.release.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 | var nodeExternals = require('webpack-node-externals');
4 |
5 | module.exports = {
6 | entry: {
7 | Spinner: ['./src/Spinner'],
8 | index: './src/ButtonLoader'
9 | },
10 | output: {
11 | path: path.join(__dirname, 'dist'),
12 | filename: '[name].js',
13 | libraryTarget: 'commonjs2'
14 | },
15 | externals: [nodeExternals()],
16 | plugins: [
17 | new webpack.DefinePlugin({
18 | 'process.env': {
19 | 'NODE_ENV': JSON.stringify('production')
20 | }
21 | }),
22 | ],
23 | module: {
24 | rules: [
25 | { test: /\.jsx?$/, use: 'babel-loader', exclude: /node_modules/ }
26 | ]
27 | },
28 | resolve: {
29 | modules: [
30 | path.join(__dirname, 'src'),
31 | 'node_modules'
32 | ],
33 | extensions: ['.js', '.jsx']
34 | }
35 | };
36 |
37 |
38 |
--------------------------------------------------------------------------------