Skip to content

Commit 679e0cd

Browse files
Release commit for 0.2.1-commonjs [ci skip]
0 parents  commit 679e0cd

File tree

746 files changed

+51425
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

746 files changed

+51425
-0
lines changed

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# filesystem
2+
.DS_Store
3+
4+
# dependencies
5+
node_modules
6+
7+
# gh-pages
8+
_site/*
9+
10+
# Editors / IDEs
11+
.idea
12+
*.sublime-project
13+
*.sublime-workspace
14+
15+
# node_module cache for TravisCI, etc.
16+
node_modules.tar.gz
17+
18+
npm-debug.log
19+
.esformatter
20+
.npm
21+
.tmp*
22+
server/node_modules
23+
server/public/assets/bundle
24+
scripts/pre-commit.sh
25+
coverage/
26+
storybook/

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing Code
2+
3+
1. Create a new issue before starting your project so that we can keep track of what you are trying to add/fix. That way, we can also offer suggestions or let you know if there is already an effort in progress.
4+
2. Fork off this repository.
5+
3. Create a topic branch for the issue that you are trying to add.
6+
4. Edit the code in your fork.
7+
5. Send us a well documented pull request when you are done.
8+
9+
**GitHub pull requests** should meet the following criteria:
10+
11+
- descriptive title
12+
- brief summary
13+
- @mention several relevant people to review the code
14+
- add helpful GitHub comments on lines where you have questions or concerns
15+
16+
We'll review your code, suggest any needed changes, and merge it in. Thank you.
17+
18+
## Code Guidelines
19+
20+
1. We use es6 and make use of a [shared eslint repository](https://github.com/salesforce-ux/eslint-config-slds) based on [Airbnb's Code guidelines](https://github.com/airbnb/javascript). You can refer to our [.eslintrc](https://github.com/salesforce-ux/design-system-react/blob/master/.eslintrc).
21+
22+
2. `displayName`, `propTypes`, and `defaultProps` should be in that order.
23+
24+
3. Component lifecyle methods (`componentDidMount`, `componentWillUnmount`, etc.) should be near the top so that developers know where to look for them and don't create duplicate methods.
25+
26+
4. Below is a react component template. Note that `displayName`, `propTypes`, and `defaultProps` are required.
27+
28+
```jsx
29+
const MyComponent = React.createClass({
30+
displayName: 'MyComponent',
31+
32+
propTypes: {
33+
...
34+
},
35+
36+
defaultProps: {
37+
...
38+
},
39+
40+
render () {
41+
return (
42+
<div>My Component here</div>
43+
);
44+
}
45+
});
46+
47+
export default MyComponent;
48+
```
49+
50+
## Finalize new component/features
51+
52+
1. Write tests for your new component/feature.
53+
2. Run `npm test`.
54+
3. After your PR is merged, make sure it appears here: [https://design-system-react-components.herokuapp.com](https://preview:8f2924b3d2232a37f63c32f70d9b3aba@design-system-react-components.herokuapp.com/). If it doesn't, reach out to one of the following people:
55+
* [Donielle Berg](https://github.com/donnieberg)
56+
* [Ivan Bogdanov](https://github.com/madpotato)
57+
* [David Brainer](https://github.com/tweettypography)
58+
4. Get your component/feature approved by the UX Accessibility Team (refer to the link above).

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Copyright (c) 2015, Salesforce.com, Inc. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6+
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
7+
8+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
Welcome to [Design System React](https://react.lightningdesignsystem.com/).
3+
4+
Presented here are Javascript components based on [Lightning Design System](https://www.lightningdesignsystem.com/) and designed for React.
5+
6+
* Tailored for building Salesforce apps: Using Design System React ensures that your app's UI reflect the Salesforce Lightning look, feel, and behaviors.
7+
* Continuously updated: As long as you’re using the latest version of Design System React, your pages are always up to date with Salesforce UI changes.
8+
9+
## Documentation
10+
11+
[Design System React website](https://react.lightningdesignsystem.com/)
12+
13+
[Salesforce Lightning Design System website](https://www.lightningdesignsystem.com/)

components/SLDSSettings.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
8+
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10+
*/
11+
12+
'use strict';
13+
14+
var _reactModal = require('react-modal');
15+
16+
var _reactModal2 = _interopRequireDefault(_reactModal);
17+
18+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19+
20+
var assetsPath = 'assets/';
21+
var appRoot = void 0;
22+
module.exports = {
23+
setAssetsPath: function setAssetsPath(path) {
24+
if (path) {
25+
assetsPath = path;
26+
}
27+
},
28+
getAssetsPath: function getAssetsPath() {
29+
return String(assetsPath);
30+
},
31+
setAppElement: function setAppElement(el) {
32+
if (el) {
33+
appRoot = el;
34+
_reactModal2.default.setAppElement(el);
35+
}
36+
},
37+
getAppElement: function getAppElement() {
38+
return appRoot;
39+
}
40+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
7+
var _oneOfComponent = require('../../utilities/warning/one-of-component');
8+
9+
var _oneOfComponent2 = _interopRequireDefault(_oneOfComponent);
10+
11+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12+
13+
var checkProps = function checkProps() {}; /*
14+
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
15+
16+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
17+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
18+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
19+
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22+
*/
23+
/* eslint-disable import/no-mutable-exports */
24+
25+
if (process.env.NODE_ENV !== 'production') {
26+
checkProps = function checkProps(COMPONENT, props) {
27+
if (props.modalHeaderButton !== undefined) {
28+
(0, _oneOfComponent2.default)(COMPONENT, props, 'modalHeaderButton', ['SLDSButton']);
29+
}
30+
};
31+
}
32+
33+
exports.default = checkProps;

0 commit comments

Comments
 (0)