The FULCRUM is “one stop shop” for access to a wide range of training and learning opportunities on Wipro’s Hybrid Crowd. Designed to strengthen the skills of employees, the hub offers physical and online platforms to learn skills on demand, gain hands-on experience, and be future ready.
@@ -76,7 +86,8 @@ exports[`Match shadow snapshot 1`] = `
diff --git a/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap
index 60d1959217..22bc09b25b 100644
--- a/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap
+++ b/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap
@@ -3,7 +3,8 @@
exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -68,17 +78,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -86,17 +100,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -118,17 +136,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -136,17 +158,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -168,17 +194,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -186,17 +216,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -207,7 +241,8 @@ exports[`Snapshot match 1`] = `
Through Topcoder TaskForce you can easily and quickly get quality design, development, and data tasks accomplished. No matchmaking, no searching for talent, simply tell us what you need done and we’ll take care of the rest.
@@ -109,7 +121,8 @@ exports[`Match shadow snapshot 1`] = `
First things first, ...make sure you sign up for Topcoder. It's quick and painless and opens the door to a whole new world.
@@ -65,17 +75,21 @@ exports[`Snapshot match 1`] = `
It's likely that you'll be working on code in a specific git repo. We have many of them, so be sure to ask if you're not sure which one you shoudl be looking at.
@@ -86,17 +100,21 @@ exports[`Snapshot match 1`] = `
Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis,
@@ -118,17 +136,21 @@ exports[`Snapshot match 1`] = `
If you'd like to be a copilot for Topcoder projects, send an email to support@topcoder.com and tell us a little about yourself.
@@ -156,17 +178,21 @@ exports[`Snapshot match 1`] = `
Make sure you've setup your payment preferences at https://community.topcoder.com/tc?module=EditPaymentPreferences. When you've earned some money and want to withdraw it, you can do that at https://community.topcoder.com/PactsMemberServlet?module=PaymentHistory&full_list=false
@@ -174,17 +200,21 @@ exports[`Snapshot match 1`] = `
Everything to do with managing your profile and preferences can be found at https://www.topcoder.com/settings/account/. If you can't find what you're looking for, send us a note at support@topcoder.com.
@@ -195,7 +225,8 @@ exports[`Snapshot match 1`] = `
diff --git a/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap
index 6becf4f94a..a30c76c062 100644
--- a/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap
+++ b/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap
@@ -3,7 +3,8 @@
exports[`Snapshot match 1`] = `
Continue
diff --git a/config/jest/setup.js b/config/jest/setup.js
index 7eaa35225e..c17f1c1edd 100644
--- a/config/jest/setup.js
+++ b/config/jest/setup.js
@@ -1,5 +1,7 @@
/* global Event, jest */
+import _ from 'lodash';
+
global.window.matchMedia = global.window.matchMedia || function matchMedia() {
return {
matches: false,
@@ -8,6 +10,8 @@ global.window.matchMedia = global.window.matchMedia || function matchMedia() {
};
};
+global.window.requestAnimationFrame = _.noop;
+
global.window.resizeTo = (width, height) => {
global.window.innerWidth = width || global.window.innerWidth;
global.window.innerHeight = height || global.window.innerHeight;
diff --git a/config/webpack/default.js b/config/webpack/default.js
index f8a4f53b4a..4430aaef62 100644
--- a/config/webpack/default.js
+++ b/config/webpack/default.js
@@ -114,6 +114,7 @@ module.exports = {
/* NOTE: Aliases related to .jsx and .jsx files are defined in Babel
* config. */
assets: path.resolve(__dirname, '../../src/assets'),
+ components: path.resolve(__dirname, '../../src/shared/components'),
styles: path.resolve(__dirname, '../../src/styles'),
},
extensions: ['.js', '.json', '.jsx', '.scss'],
diff --git a/docs/coding-standards.md b/docs/coding-standards.md
index d74b969a5e..245a4e92a7 100644
--- a/docs/coding-standards.md
+++ b/docs/coding-standards.md
@@ -57,7 +57,7 @@ Don't put the actual HTTP calls directly into actions. Always implement them as
Redux reducers live in [`reducers`](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/reducers) folder. We use *reducer factories* as our custom solution for async server-side rendering. Details are given in [this document](./why-reducer-factories-and-how-to-use-them.md). Mind that in many cases you should not care much about proper server-side rendering until your code works properly without it.
### Styling
-We use CSS Modules ([`babel-plugin-react-css-modules`](https://github.com/gajus/babel-plugin-react-css-modules)) for simple styling all around. In the cases when some components can be reused in multiple places with somewhat different styling (i.e. you see that for some component the same JS code can be reused, while styles should be different), we use [`react-css-themr`](https://github.com/javivelasco/react-css-themr).
+We use CSS Modules ([`babel-plugin-react-css-modules`](https://github.com/gajus/babel-plugin-react-css-modules)) for simple styling all around. In the cases when some components can be reused in multiple places with somewhat different styling (i.e. you see that for some component the same JS code can be reused, while styles should be different), we use [`react-css-super-themr`](https://github.com/javivelasco/react-css-super-themr).
Generally, there is no need to nest your SCSS code, trying to reproduce nesting of the related HTML markup. During the build, React CSS Modules plugin replaces class names from your stylesheets with specially generated ones, that ensure that there is no clushes between SCSS classes of the same names defined in different SCSS modules. Mind that this replacement is done differently in dev and prod; it is wrong to use generated class names anywhere by taking them from the resulting HTML markup and hard-coding anywhere in the code. The correct way to get class names generated by React CSS Modules plugin is
```js
@@ -77,7 +77,7 @@ Avoid using **transform** rules for components that may have arbitrary children.
- [Lodash](https://lodash.com/) for all utility function missing in the standard JS.
- [MomentJS](https://momentjs.com) for advanced date- / time-related functionality.
- We have [money service](https://github.com/topcoder-platform/community-app/blob/develop/src/shared/services/money.js), which allows to make conversions between currencies, using real up-to-date rates from [https://openexchangerates.org](https://openexchangerates.org).
-- We have standard [buttons](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/buttons) and [tags](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/tags) (it is also a good example of react-css-themr use). Depending on props these components act either as real buttons, or as button-like links (they are implemented in such way, that switching between these options does not demand any efforts to keep the style).
+- We have standard [buttons](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/buttons) and [tags](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/tags) (it is also a good example of react-css-super-themr use). Depending on props these components act either as real buttons, or as button-like links (they are implemented in such way, that switching between these options does not demand any efforts to keep the style).
- [Modal](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/Modal) is the base for all modal windows in our app.
- [LoadingIndicator](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/LoadingIndicator) says for itself (at the moment it works correctly only against a solid white background).
diff --git a/package-lock.json b/package-lock.json
index 2d2b31ac46..c49e27d2dc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4935,11 +4935,6 @@
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz",
"integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA="
},
- "is_js": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz",
- "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0="
- },
"is-absolute-url": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz",
@@ -5177,6 +5172,11 @@
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
+ "is_js": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz",
+ "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0="
+ },
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -10509,10 +10509,10 @@
"pure-color": "1.3.0"
}
},
- "react-css-themr": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/react-css-themr/-/react-css-themr-2.1.2.tgz",
- "integrity": "sha1-4BdRTkccIy9Dp1SlW0nYH69dr7g=",
+ "react-css-super-themr": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/react-css-super-themr/-/react-css-super-themr-2.2.0.tgz",
+ "integrity": "sha512-fcSRGHVhYEBU8zx530RViXd7rjosirUjv0PFXimKNHRsoGuhnu1wb0lYDJ1xwhUfehJ/rr3O60+H3jRFP78KaQ==",
"requires": {
"hoist-non-react-statics": "1.2.0",
"invariant": "2.2.2"
@@ -11822,14 +11822,6 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
- "string_decoder": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
- "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
- "requires": {
- "safe-buffer": "5.1.1"
- }
- },
"string-convert": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz",
@@ -11859,6 +11851,14 @@
"strip-ansi": "3.0.1"
}
},
+ "string_decoder": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
+ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
+ "requires": {
+ "safe-buffer": "5.1.1"
+ }
+ },
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@@ -12394,6 +12394,10 @@
"resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.5.tgz",
"integrity": "sha512-z7zOXZKEFOloIeSMtsDpudWWfXd7L2qmhyxOAve4ZGFYwBn98zYBd2R4CIlPWMpcm4ZwfhIMTVUxCDgSSXrPKw=="
},
+ "Base64": {
+ "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz",
+ "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4="
+ },
"abbrev": {
"version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
"integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8="
@@ -13484,10 +13488,6 @@
"version": "https://registry.npmjs.org/base62/-/base62-1.2.0.tgz",
"integrity": "sha1-MeflYNyEbJ9EwaUx32UU2jVHQVc="
},
- "Base64": {
- "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz",
- "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4="
- },
"base64-js": {
"version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
"integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY="
@@ -14964,18 +14964,12 @@
"abbrev": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
- "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=",
- "optional": true
+ "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8="
},
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
- "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
- "optional": true,
- "requires": {
- "co": "4.6.0",
- "json-stable-stringify": "1.0.1"
- }
+ "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY="
},
"ansi-regex": {
"version": "2.1.1",
@@ -14985,8 +14979,7 @@
"aproba": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
- "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=",
- "optional": true
+ "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s="
},
"are-we-there-yet": {
"version": "1.1.4",
@@ -14996,32 +14989,27 @@
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
- "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
- "optional": true
+ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
},
"assert-plus": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
- "optional": true
+ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "optional": true
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
- "optional": true
+ "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
},
"aws4": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
- "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
- "optional": true
+ "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
},
"balanced-match": {
"version": "0.4.2",
@@ -15036,27 +15024,17 @@
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
- "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
- "requires": {
- "inherits": "2.0.3"
- }
+ "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo="
},
"boom": {
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
- "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
- "requires": {
- "hoek": "2.16.3"
- }
+ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8="
},
"brace-expansion": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
- "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
- "requires": {
- "balanced-match": "0.4.2",
- "concat-map": "0.0.1"
- }
+ "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k="
},
"buffer-shims": {
"version": "1.0.0",
@@ -15066,14 +15044,12 @@
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "optional": true
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "optional": true
+ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
},
"code-point-at": {
"version": "1.1.0",
@@ -15083,10 +15059,7 @@
"combined-stream": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
- "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
- "requires": {
- "delayed-stream": "1.0.0"
- }
+ "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk="
},
"concat-map": {
"version": "0.0.1",
@@ -15106,43 +15079,29 @@
"cryptiles": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "optional": true,
- "requires": {
- "boom": "2.10.1"
- }
+ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g="
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"debug": {
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
- "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
- "optional": true,
- "requires": {
- "ms": "2.0.0"
- }
+ "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw="
},
"deep-extend": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
- "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=",
- "optional": true
+ "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8="
},
"delayed-stream": {
"version": "1.0.0",
@@ -15152,23 +15111,17 @@
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
- "optional": true
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"ecc-jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
- "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
- "optional": true,
- "requires": {
- "jsbn": "0.1.1"
- }
+ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU="
},
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "optional": true
+ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
},
"extsprintf": {
"version": "1.0.2",
@@ -15178,19 +15131,12 @@
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
- "optional": true
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
- "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
- "optional": true,
- "requires": {
- "asynckit": "0.4.0",
- "combined-stream": "1.0.5",
- "mime-types": "2.1.15"
- }
+ "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE="
},
"fs.realpath": {
"version": "1.0.0",
@@ -15216,16 +15162,11 @@
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
@@ -15242,24 +15183,17 @@
"har-schema": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
- "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
- "optional": true
+ "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4="
},
"har-validator": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
- "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
- "optional": true,
- "requires": {
- "ajv": "4.11.8",
- "har-schema": "1.0.5"
- }
+ "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio="
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
- "optional": true
+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
},
"hawk": {
"version": "3.1.3",
@@ -15289,22 +15223,17 @@
"ini": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
- "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
- "optional": true
+ "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "requires": {
- "number-is-nan": "1.0.1"
- }
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
- "optional": true
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isarray": {
"version": "1.0.0",
@@ -15314,50 +15243,37 @@
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
- "optional": true
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jodid25519": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
- "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=",
- "optional": true,
- "requires": {
- "jsbn": "0.1.1"
- }
+ "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "optional": true
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "optional": true
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-stable-stringify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "optional": true,
- "requires": {
- "jsonify": "0.0.0"
- }
+ "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "optional": true
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "optional": true
+ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM="
},
"jsprim": {
"version": "1.4.0",
@@ -15367,8 +15283,7 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
@@ -15380,18 +15295,12 @@
"mime-types": {
"version": "2.1.15",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
- "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
- "requires": {
- "mime-db": "1.27.0"
- }
+ "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0="
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "requires": {
- "brace-expansion": "1.1.7"
- }
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA=="
},
"minimist": {
"version": "0.0.8",
@@ -15401,16 +15310,12 @@
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "requires": {
- "minimist": "0.0.8"
- }
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "optional": true
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node-pre-gyp": {
"version": "0.6.36",
@@ -15435,14 +15340,12 @@
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
- "optional": true
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "optional": true
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"once": {
"version": "1.4.0",
@@ -15452,8 +15355,7 @@
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "optional": true
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-tmpdir": {
"version": "1.0.2",
@@ -15554,16 +15456,16 @@
}
}
},
- "string_decoder": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
- "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg="
- },
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M="
},
+ "string_decoder": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
+ "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg="
+ },
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@@ -18903,10 +18805,6 @@
"version": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
- "string_decoder": {
- "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
- },
"string-width": {
"version": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
@@ -18916,6 +18814,10 @@
"strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz"
}
},
+ "string_decoder": {
+ "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ },
"stringstream": {
"version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
diff --git a/package.json b/package.json
index 53b1c7d72c..1b709eef48 100644
--- a/package.json
+++ b/package.json
@@ -68,7 +68,7 @@
"rc-tooltip": "^3.4.9",
"react": "^15.6.1",
"react-addons-shallow-compare": "^15.6.0",
- "react-css-themr": "^2.1.2",
+ "react-css-super-themr": "^2.2.0",
"react-dates": "^12.6.0",
"react-dom": "^15.6.1",
"react-dropdown": "^1.3.0",
diff --git a/src/shared/components/Avatar/index.jsx b/src/shared/components/Avatar/index.jsx
index 91cbda7781..3df6ebb5e5 100644
--- a/src/shared/components/Avatar/index.jsx
+++ b/src/shared/components/Avatar/index.jsx
@@ -8,7 +8,7 @@
*
* Styling:
* By default the avatar is round-shaped. Custom styling may be applied using
- * react-css-themr.
+ * react-css-super-themr.
*
* Usage:
*
@@ -20,7 +20,7 @@
import PT from 'prop-types';
import React from 'react';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import DefaultAvatar from '../../../assets/images/ico-user-default.svg';
import defaultStyle from './style.scss';
diff --git a/src/shared/components/LoadingIndicator/index.jsx b/src/shared/components/LoadingIndicator/index.jsx
index aa33ceaadf..66be73cb78 100644
--- a/src/shared/components/LoadingIndicator/index.jsx
+++ b/src/shared/components/LoadingIndicator/index.jsx
@@ -1,17 +1,81 @@
+/**
+ * Waiting indicator: two co-centric circles periodically increasing their
+ * radiuses till maximum value, then resetting it to zero.
+ *
+ * NOTE: It is implemented as class component because stand-alone animated SVG
+ * images are not well supported across all browsers yet.
+ */
+
+/* global window */
+
import PT from 'prop-types';
-import Source from 'assets/images/ripple.gif';
import React from 'react';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import style from './styles.scss';
-function LoadingIndicator({ theme }) {
- return (
-
- );
+class LoadingIndicator extends React.Component {
+ /**
+ * Calculates animation phase for the specified timestamp.
+ * @param {Number} timestamp Current animation time in [ms].
+ * @param {Number} shift Optional phase shift [dimensionless].
+ * @return {Number} Returns animation phase: a number in [0.0; 1.0] range,
+ * specifying current position inside animation loop. You may note that
+ * the result does not change linearly with time, instead it goes quadratic
+ * in a way that makes animation progress faster in the beginning, and
+ * slower in the end of a cycle.
+ */
+ static calcPhase(timestamp, shift = 0) {
+ const PERIOD = 2; /* [s] */
+ return ((timestamp / 1000 / PERIOD) + shift) % 1;
+ }
+
+ componentDidMount() {
+ this.animationId = window.requestAnimationFrame(ts => this.animation(ts));
+ }
+
+ componentWillUnmount() {
+ window.cancelAnimationFrame(this.animationId);
+ }
+
+ /* Moves animation forward. */
+ animation(timestamp) {
+ if (this.circle1) {
+ const phase1 = LoadingIndicator.calcPhase(timestamp);
+ this.circle1.setAttribute('r', 28 * phase1 * (2.0 - phase1));
+ this.circle1.setAttribute('opacity', 1.0 - (phase1 * phase1));
+ }
+ if (this.circle2) {
+ const phase2 = LoadingIndicator.calcPhase(timestamp, 0.5);
+ this.circle2.setAttribute('r', 28 * phase2 * (2.0 - phase2));
+ this.circle2.setAttribute('opacity', 1.0 - (phase2 * phase2));
+ }
+ this.animationId = window.requestAnimationFrame(ts => this.animation(ts));
+ }
+
+ render() {
+ const { theme } = this.props;
+ return (
+
+ );
+ }
}
LoadingIndicator.propTypes = {
diff --git a/src/shared/components/LoadingIndicator/styles.scss b/src/shared/components/LoadingIndicator/styles.scss
index 24d2fba379..626da9c3dc 100644
--- a/src/shared/components/LoadingIndicator/styles.scss
+++ b/src/shared/components/LoadingIndicator/styles.scss
@@ -1,7 +1,21 @@
-@import '~styles/tc-styles';
+@import '~styles/mixins';
-.style {
+.container {
display: block;
+ height: 64px;
margin: 0 auto;
text-align: center;
+ width: 64px;
+}
+
+.circle1 {
+ fill: none;
+ stroke: #149efe;
+ stroke-width: 2;
+}
+
+.circle2 {
+ fill: none;
+ stroke: #e3e4e5;
+ stroke-width: 2;
}
diff --git a/src/shared/components/Modal/index.jsx b/src/shared/components/Modal/index.jsx
index ed9ea070a2..5f46167eab 100644
--- a/src/shared/components/Modal/index.jsx
+++ b/src/shared/components/Modal/index.jsx
@@ -9,7 +9,7 @@
import React from 'react';
import PT from 'prop-types';
import _ from 'lodash';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import defaultStyle from './styles.scss';
function Modal(props) {
diff --git a/src/shared/components/Switch/index.jsx b/src/shared/components/Switch/index.jsx
index d3f1030a6c..9607402363 100644
--- a/src/shared/components/Switch/index.jsx
+++ b/src/shared/components/Switch/index.jsx
@@ -7,7 +7,7 @@
import React from 'react';
import PT from 'prop-types';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import defaultStyle from './style.scss';
function Switch(props) {
diff --git a/src/shared/components/SwitchWithLabel/index.jsx b/src/shared/components/SwitchWithLabel/index.jsx
index 8585ca4282..92d76f8756 100644
--- a/src/shared/components/SwitchWithLabel/index.jsx
+++ b/src/shared/components/SwitchWithLabel/index.jsx
@@ -7,7 +7,7 @@
import React from 'react';
import PT from 'prop-types';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import Switch from '../Switch';
import defaultStyle from './style.scss';
diff --git a/src/shared/components/buttons/danger.scss b/src/shared/components/buttons/danger.scss
index adea0f26f3..76033e26fa 100644
--- a/src/shared/components/buttons/danger.scss
+++ b/src/shared/components/buttons/danger.scss
@@ -2,7 +2,7 @@
* Primary button, colored with colors of design track (blue).
*/
-@import "./default";
+@import "default";
@mixin feedback {
&:active {
diff --git a/src/shared/components/buttons/default.scss b/src/shared/components/buttons/default.scss
index f423c1d241..0d7a3fdb80 100644
--- a/src/shared/components/buttons/default.scss
+++ b/src/shared/components/buttons/default.scss
@@ -3,7 +3,7 @@
* a bit rounded corners.
*/
-@import "~styles/tc-styles";
+@import "~styles/mixins";
@mixin feedback {
&:active {
diff --git a/src/shared/components/buttons/index.jsx b/src/shared/components/buttons/index.jsx
index 3cd612cf26..06fd2526bc 100644
--- a/src/shared/components/buttons/index.jsx
+++ b/src/shared/components/buttons/index.jsx
@@ -6,11 +6,12 @@
* the props passed in.
*
* The button uses react-css-themr for styling, and it is exported mupltiple
- * times, differently wrapped with react-css-themr decorator. The intent behind
+ * times, differently wrapped with react-css-super-themr decorator. The intent
+ * behind
* it is to provide a standard button implementation, which can be easily styled
* according to the context of use. E.g. in new pages of the main Topcoder site
* the design assumes that primary buttons are colored with the colors of
- * competition track to which the page relates. react-css-themr allows to
+ * competition track to which the page relates. react-css-super-themr allows to
* wrap entire page into ThemeProvider which overrides the styling of all
* PrimaryButton instances in the page; it still allows to further customise
* each of these buttons passing theme object directly into each button
@@ -40,7 +41,7 @@
import PT from 'prop-types';
import React from 'react';
-import { themr } from 'react-css-themr';
+import { themr } from 'react-css-super-themr';
import { Link } from 'utils/router';
import dangerButton from './danger.scss';
diff --git a/src/shared/components/buttons/primaryDataScience.scss b/src/shared/components/buttons/primaryDataScience.scss
index 3f3bb8a38c..9a500fe67c 100644
--- a/src/shared/components/buttons/primaryDataScience.scss
+++ b/src/shared/components/buttons/primaryDataScience.scss
@@ -2,7 +2,7 @@
* Primary button, colored with colors of design track (blue).
*/
-@import "./default";
+@import "default";
@mixin feedback {
&:active {
diff --git a/src/shared/components/buttons/primaryDesign.scss b/src/shared/components/buttons/primaryDesign.scss
index 3a51b97524..66c3d2516d 100644
--- a/src/shared/components/buttons/primaryDesign.scss
+++ b/src/shared/components/buttons/primaryDesign.scss
@@ -2,7 +2,7 @@
* Primary button, colored with colors of design track (blue).
*/
-@import "./default";
+@import "default";
@mixin feedback {
&:active {
diff --git a/src/shared/components/buttons/primaryDevelop.scss b/src/shared/components/buttons/primaryDevelop.scss
index 43bb8ab03d..395cb5e92f 100644
--- a/src/shared/components/buttons/primaryDevelop.scss
+++ b/src/shared/components/buttons/primaryDevelop.scss
@@ -2,7 +2,7 @@
* Primary button, colored with colors of design track (blue).
*/
-@import "./default";
+@import "default";
@mixin feedback {
&:active {
diff --git a/src/shared/components/buttons/secondary.scss b/src/shared/components/buttons/secondary.scss
index e856560a3c..34cab910b4 100644
--- a/src/shared/components/buttons/secondary.scss
+++ b/src/shared/components/buttons/secondary.scss
@@ -2,7 +2,7 @@
* Primary button, colored with colors of design track (blue).
*/
-@import "./default";
+@import "default";
@mixin feedback {
&:active {
diff --git a/src/shared/components/challenge-detail/Header/index.jsx b/src/shared/components/challenge-detail/Header/index.jsx
index 4c7230dcd3..87f5c2aedd 100755
--- a/src/shared/components/challenge-detail/Header/index.jsx
+++ b/src/shared/components/challenge-detail/Header/index.jsx
@@ -11,7 +11,7 @@ import React from 'react';
import PT from 'prop-types';
import moment from 'moment';
import { DangerButton, PrimaryButton } from 'components/buttons';
-import { ThemeProvider } from 'react-css-themr';
+import { ThemeProvider } from 'react-css-super-themr';
import ArrowUp from '../../../../assets/images/icon-arrow-up.svg';
import ArrowDown from '../../../../assets/images/icon-arrow-down.svg';
diff --git a/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx b/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx
index d4276633fd..e4f2366171 100644
--- a/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx
+++ b/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx
@@ -37,6 +37,7 @@ class DateRangePicker extends React.Component {
endDate={this.props.endDate}
anchorDirection={'right'}
displayFormat={'MMM DD, YYYY'}
+ readOnly={this.props.readOnly}
/>
);
}
@@ -44,6 +45,7 @@ class DateRangePicker extends React.Component {
DateRangePicker.defaultProps = {
onDatesChange: () => true,
+ readOnly: true,
};
DateRangePicker.propTypes = {
diff --git a/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss b/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss
index ed0663f59e..66cdbaf1df 100644
--- a/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss
+++ b/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss
@@ -6,7 +6,7 @@ $switch-radius-2: $corner-radius;
$switch-radius-4: $corner-radius * 2;
.FiltersSwitch {
- background: $tc-gray-30;
+ background: $tc-white;
border: 1px solid $tc-gray-30;
color: $tc-black;
min-width: $switch-space-100 + 2;
diff --git a/src/shared/components/examples/Buttons/index.jsx b/src/shared/components/examples/Buttons/index.jsx
index 32f1682404..0b4b53da9e 100644
--- a/src/shared/components/examples/Buttons/index.jsx
+++ b/src/shared/components/examples/Buttons/index.jsx
@@ -5,7 +5,7 @@ import {
PrimaryButton,
SecondaryButton,
} from 'components/buttons';
-import { ThemeProvider } from 'react-css-themr';
+import { ThemeProvider } from 'react-css-super-themr';
import primaryDataScienceButtonStyle from '../../buttons/primaryDataScience.scss';
import primaryDevelopButtonStyle from '../../buttons/primaryDevelop.scss';
diff --git a/src/shared/components/examples/LoadingIndicators/green-red-theme.scss b/src/shared/components/examples/LoadingIndicators/green-red-theme.scss
new file mode 100644
index 0000000000..998943a160
--- /dev/null
+++ b/src/shared/components/examples/LoadingIndicators/green-red-theme.scss
@@ -0,0 +1,22 @@
+/**
+ * A sample green / red theme for the loading indicator.
+ * It is here just to demonstrate customization of the indicator,
+ * do not use this very style inside the app (it is aesthetically ugly).
+ */
+
+.container {
+ display: inline-block !important;
+ height: 128px !important;
+ vertical-align: middle;
+ width: 128px !important;
+}
+
+.circle1 {
+ stroke: green !important;
+ stroke-width: 1 !important;
+}
+
+.circle2 {
+ stroke: red !important;
+ stroke-width: 1 !important;
+}
diff --git a/src/shared/components/examples/LoadingIndicators/index.jsx b/src/shared/components/examples/LoadingIndicators/index.jsx
index 30f92b674d..31e96dfc93 100644
--- a/src/shared/components/examples/LoadingIndicators/index.jsx
+++ b/src/shared/components/examples/LoadingIndicators/index.jsx
@@ -1,30 +1,43 @@
import LoadingIndicator from 'components/LoadingIndicator';
import React from 'react';
-import './style.scss';
+import greenRedTheme from './green-red-theme.scss';
+import yellowPinkTheme from './yellow-pink-theme.scss';
+import style from './style.scss';
-export default function Buttons() {
+export default function LoadingIndicators() {
return (
-
+
Loading Indicators
- Demo of loading indicators we have in the code base (at the moment just
- a single one, and it works fine against white background only, as
- demonstrated below).
+ Demo of loading indicators we have in the code base. At the moment we
+ have just one type, but you can flexibly tune its size / coloring using
+ SCSS: