Skip to content

Commit

Permalink
Release commit for 0.0.32-commonjs [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
David Brainer-Banker committed Jun 23, 2016
0 parents commit 498c50b
Show file tree
Hide file tree
Showing 102 changed files with 44,643 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# filesystem
.DS_Store

# dependencies
node_modules

# gh-pages
_site/*

# Editors / IDEs
.idea
*.sublime-project
*.sublime-workspace

# node_module cache for TravisCI, etc.
node_modules.tar.gz

npm-debug.log
.esformatter
.npm
.tmp*
server/node_modules
server/public/assets/bundle
scripts/pre-commit.sh
coverage/
storybook/
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributing Code

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.
2. Fork off this repository.
3. Create a topic branch for the issue that you are trying to add.
4. Edit the code in your fork.
5. Send us a well documented pull request when you are done.

**GitHub pull requests** should meet the following criteria:

- descriptive title
- brief summary
- @mention several relevant people to review the code
- add helpful GitHub comments on lines where you have questions or concerns

We'll review your code, suggest any needed changes, and merge it in. Thank you.

## Code Guidelines

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).

2. `displayName`, `propTypes`, and `defaultProps` should be in that order.

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.

4. Below is a react component template. Note that `displayName`, `propTypes`, and `defaultProps` are required.

```jsx
const MyComponent = React.createClass({
displayName: 'MyComponent',

propTypes: {
...
},

defaultProps: {
...
},

render () {
return (
<div>My Component here</div>
);
}
});

export default MyComponent;
```

## Finalize new component/features

1. Write tests for your new component/feature.
2. Run `npm test`.
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:
* [Donielle Berg](https://github.com/donnieberg)
* [Ivan Bogdanov](https://github.com/madpotato)
* [David Brainer](https://github.com/tweettypography)
4. Get your component/feature approved by the UX Accessibility Team (refer to the link above).
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Copyright (c) 2015, Salesforce.com, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* 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.
* 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.

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.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Welcome to [Design System React](https://design-system-react.herokuapp.com).

Presented here are Javascript components based on [Lightning Design System](https://www.lightningdesignsystem.com/) and designed for React.

* Tailored for building Salesforce apps: Using Design System React ensures that your app's UI reflect the Salesforce Lightning look, feel, and behaviors.
* 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.

## Documentation

[Design System React website](https://design-system-react.herokuapp.com)

[Salesforce Lightning Design System website](https://www.lightningdesignsystem.com)
40 changes: 40 additions & 0 deletions components/SLDSSettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
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.
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.
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.
*/

'use strict';

var _reactModal = require('react-modal');

var _reactModal2 = _interopRequireDefault(_reactModal);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var assetsPath = 'assets/';
var appRoot = void 0;
module.exports = {
setAssetsPath: function setAssetsPath(path) {
if (path) {
assetsPath = path;
}
},
getAssetsPath: function getAssetsPath() {
return String(assetsPath);
},
setAppElement: function setAppElement(el) {
if (el) {
appRoot = el;
_reactModal2.default.setAppElement(el);
}
},
getAppElement: function getAppElement() {
return appRoot;
}
};
54 changes: 54 additions & 0 deletions components/bread-crumb/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _constants = require('../../utilities/constants');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var BreadCrumb = function BreadCrumb(props) {
var assistiveText = props.assistiveText;
var trail = props.trail;


return _react2.default.createElement(
'nav',
{ role: 'navigation' },
_react2.default.createElement(
'p',
{ id: 'bread-crumb-label', className: 'slds-assistive-text' },
assistiveText
),
_react2.default.createElement(
'ol',
{ className: 'slds-breadcrumb slds-list--horizontal', 'aria-labelledby': 'bread-crumb-label' },
trail.map(function (crumb, index) {
return _react2.default.createElement(
'li',
{
key: 'BreadCrumb.' + index,
className: 'slds-list__item slds-text-heading--label'
},
crumb
);
})
)
);
};

BreadCrumb.displayName = _constants.BREAD_CRUMB;

BreadCrumb.propTypes = {
/**
* The assistive text for the breadcrumb trail
*/
assistiveText: _react2.default.PropTypes.string,
/**
* An array of react elements presumably anchor elements.
*/
trail: _react2.default.PropTypes.array
};

module.exports = BreadCrumb;
48 changes: 48 additions & 0 deletions components/button-group/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _constants = require('../../utilities/constants');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var propTypes = {
/**
* Children are expected to be components. If last button triggers a dropdown menu, use Dropdown instead of Button.
*/
children: _react2.default.PropTypes.node.isRequired,
className: _react2.default.PropTypes.string
};

/**
* The ButtonGroup component wraps other components (ie. Button, MenuDropdown, PopoverTooltip, etc).
*/
/*
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
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.
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.
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.
*/

var ButtonGroup = function ButtonGroup(props) {
return _react2.default.createElement(
'div',
{ className: (0, _classnames2.default)('slds-button-group', props.className), role: 'group' },
props.children
);
};

ButtonGroup.displayName = _constants.BUTTON_GROUP;
ButtonGroup.propTypes = propTypes;

module.exports = ButtonGroup;
Loading

0 comments on commit 498c50b

Please sign in to comment.