diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..e9a2b0416a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,322 @@
+### Project files ###
+
+# Only used for release server authentication
+/.npmrc
+
+# React Storybook
+storybook/
+storybook-based-tests/
+
+# Publishing and dist build
+.tmp*
+
+# For build server. A copy of itself from master is pulled down in order to publish itself.
+design-system-react
+
+# Allow custom pre-commit
+scripts/pre-commit.sh
+
+# Visual diff images. These are the images that compare differences
+# in the current and previous capture
+__diff_output__
+
+# Dev notes
+dev-notes.txt
+
+# --- MACHINE GENERATED BELOW THIS LINE ---
+
+### Node ###
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Typescript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+
+### Code ###
+# Visual Studio Code - https://code.visualstudio.com/
+.settings/
+.vscode/
+tsconfig.json
+jsconfig.json
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+/dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+projectile-bookmarks.eld
+
+# directory configuration
+.dir-locals.el
+
+# saveplace
+places
+
+# url cache
+url/cache/
+
+# cedet
+ede-projects.el
+
+# smex
+smex-items
+
+# company-statistics
+company-statistics-cache.el
+
+# anaconda-mode
+anaconda-mode/
+
+### macOS ###
+*.DS_Store
+.AppleDouble
+.LSOverride
+
+# Removed due to Icon component not working on NPM.
+# Icon must end with two \r
+# Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+### SublimeText ###
+# cache files for sublime text
+*.tmlanguage.cache
+*.tmPreferences.cache
+*.stTheme.cache
+
+# workspace files are user-specific
+*.sublime-workspace
+
+# project files should be checked into the repository, unless a significant
+# proportion of contributors will probably not be using SublimeText
+# *.sublime-project
+
+# sftp configuration file
+sftp-config.json
+
+# Package control specific files
+Package Control.last-run
+Package Control.ca-list
+Package Control.ca-bundle
+Package Control.system-ca-bundle
+Package Control.cache/
+Package Control.ca-certs/
+Package Control.merged-ca-bundle
+Package Control.user-ca-bundle
+oscrypto-ca-bundle.crt
+bh_unicode_properties.cache
+
+# Sublime-github package stores a github token in this file
+# https://packagecontrol.io/packages/sublime-github
+GitHub.sublime-settings
+
+### Vim ###
+# swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-v][a-z]
+[._]sw[a-p]
+# session
+Session.vim
+# temporary
+.netrwhist
+# auto-generated tag files
+tags
+
+### WebStorm ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff:
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/dictionaries
+
+# Sensitive or high-churn files:
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.xml
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+
+# Gradle:
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# CMake
+cmake-build-debug/
+
+# Mongo Explorer plugin:
+.idea/**/mongoSettings.xml
+
+## File-based project format:
+*.iws
+
+## Plugin-specific files:
+
+# IntelliJ
+/out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Ruby plugin and RubyMine
+/.rakeTasks
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+### WebStorm Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# Intellij IDE
+.idea/*
+*.iml
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000000..5c48ca436c
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,24 @@
+Copyright (c) 2015-present, 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 the 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 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.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..745d1126e0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,54 @@
+# Design System for React
+
+### Accessible, localization-friendly, presentational React components
+
+## Install
+
+```
+$ npm install @salesforce-ux/design-system @salesforce/design-system-react
+```
+
+## Getting Started
+
+Welcome to the project! :wave: This library is the [React](https://facebook.github.io/react/) implementation of the [Salesforce Lightning Design System](https://www.lightningdesignsystem.com/). This library has a peer dependency on `@salesforce-ux/design-system`, `react`, and `react-dom`.
+
+* [Getting Started](https://react.lightningdesignsystem.com/getting-started/)
+* [Documentation and interactive examples](https://react.lightningdesignsystem.com)
+
+### Quick Setup (CommonJS)
+
+A CommonJS-compatible version has been included within the NPM package to allows usage without transpiling. Use the following named `import` syntax to access CommonJS components from `/lib/index.js`:
+
+```
+import { Button } from '@salesforce/design-system-react';
+
+
+```
+
+### Recommended Usage (ES6 modules)
+
+Recommended usage requires that your babel presets are set up correctly. `create-react-app` and environments that do not transpile code within `node_modules` are not compatible with the component import below. All the examples on the [documentation site](https://react.lightningdesignsystem.com/) use this syntax. You can use the Babel preset, `@salesforce/babel-preset-design-system-react`, to get started. [This preset](npmjs.com/package/@salesforce-ux/babel-preset-design-system-react) will keep Babel compatible with Design System React and allow ES6 module benefits such as tree-shaking.
+
+```
+import Button from '@salesforce/design-system-react/components/button';
+
+
+```
+
+#### Transpile with `.babelrc` settings
+
+```json
+{
+ "presets": ["@salesforce/babel-preset-design-system-react"]
+}
+```
+
+## Licenses
+
+* Source code is licensed under [BSD 3-Clause](https://git.io/sfdc-license)
+* All icons and images are licensed under [Creative Commons Attribution-NoDerivatives 4.0](https://github.com/salesforce/licenses/blob/master/LICENSE-icons-images.txt)
+* The Salesforce Sans font is licensed under our [font license](https://github.com/salesforce/licenses/blob/master/LICENSE-font.txt)
+
+## Got feedback?
+
+If you have support questions, please post a question to [StackOverflow](https://stackoverflow.com/questions/tagged/design-system-react) and tag with `design-system-react`. If you find any bugs, create a [GitHub Issue](https://github.com/salesforce/design-system-react/issues).
diff --git a/assets/images/global-header/logo.svg b/assets/images/global-header/logo.svg
new file mode 100644
index 0000000000..aa3d4370d4
--- /dev/null
+++ b/assets/images/global-header/logo.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/assets/images/illustrations/empty-state-no-access.svg b/assets/images/illustrations/empty-state-no-access.svg
new file mode 100644
index 0000000000..736ee6586b
--- /dev/null
+++ b/assets/images/illustrations/empty-state-no-access.svg
@@ -0,0 +1,45 @@
+
\ No newline at end of file
diff --git a/assets/images/illustrations/empty-state-no-results.svg b/assets/images/illustrations/empty-state-no-results.svg
new file mode 100644
index 0000000000..e1f2ef5a4c
--- /dev/null
+++ b/assets/images/illustrations/empty-state-no-results.svg
@@ -0,0 +1,58 @@
+
\ No newline at end of file
diff --git a/assets/images/illustrations/empty-state-not-available-in-lightning.svg b/assets/images/illustrations/empty-state-not-available-in-lightning.svg
new file mode 100644
index 0000000000..7fedf66c18
--- /dev/null
+++ b/assets/images/illustrations/empty-state-not-available-in-lightning.svg
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/assets/styles/override.css b/assets/styles/override.css
new file mode 100644
index 0000000000..f579152973
--- /dev/null
+++ b/assets/styles/override.css
@@ -0,0 +1,3 @@
+html {
+ background-color: transparent;
+}
diff --git a/components/README.md b/components/README.md
new file mode 100644
index 0000000000..f279282426
--- /dev/null
+++ b/components/README.md
@@ -0,0 +1,5 @@
+# Components
+
+* This folder contains approved SLDS components and "lower order" components that get passed in (typically as children) to the approved SLDS components.
+* Components within folders labelled `private` are for internal usage only and are not intended to be a part of the public API of this project.
+* Components in `utilities` are shared components that are not part of the public API of this project.
diff --git a/components/SLDSSettings.js b/components/SLDSSettings.js
new file mode 100644
index 0000000000..fac0dfd6c8
--- /dev/null
+++ b/components/SLDSSettings.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _settings = _interopRequireDefault(require("./settings"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// Alias
+var _default = _settings.default;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/accordion/__docs__/__snapshots__/storybook-stories.storyshot b/components/accordion/__docs__/__snapshots__/storybook-stories.storyshot
new file mode 100644
index 0000000000..aebcf6fdc9
--- /dev/null
+++ b/components/accordion/__docs__/__snapshots__/storybook-stories.storyshot
@@ -0,0 +1,409 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DOM snapshots SLDSAccordion Base 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accordion details - A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accordion details - B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accordion details - C
+
+
+
+
+
+`;
+
+exports[`DOM snapshots SLDSAccordion Base Open 1`] = `
+
+
+
+
+
+
+
+
+
+
+ Accordion details - A
+
+
+
+
+
+
+
+
+
+
+
+ Accordion details - B
+
+
+
+
+
+
+
+
+
+
+
+ Accordion details - C
+
+
+
+
+
+`;
diff --git a/components/accordion/__docs__/storybook-stories.jsx b/components/accordion/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..3fcec27482
--- /dev/null
+++ b/components/accordion/__docs__/storybook-stories.jsx
@@ -0,0 +1,15 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { action } from '@storybook/addon-actions';
+
+import { ACCORDION } from '../../../utilities/constants';
+
+import Base from '../__examples__/base';
+import BaseOpen from '../__examples__/base-open';
+
+storiesOf(ACCORDION, module)
+ .addDecorator((getStory) => (
+
{getStory()}
+ ))
+ .add('Base', () => )
+ .add('Base Open', () => );
diff --git a/components/accordion/__examples__/base-open.jsx b/components/accordion/__examples__/base-open.jsx
new file mode 100644
index 0000000000..d5b1658277
--- /dev/null
+++ b/components/accordion/__examples__/base-open.jsx
@@ -0,0 +1,64 @@
+import React from 'react';
+import Accordion from '~/components/accordion'; // `~` is replaced with design-system-react at runtime
+import Panel from '~/components/accordion/panel'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings'; // `~` is replaced with design-system-react at runtime
+
+class Example extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ expandedPanels: {},
+ items: [
+ {
+ id: '1',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - A',
+ },
+ {
+ id: '2',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - B',
+ },
+ {
+ id: '3',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - C',
+ },
+ ],
+ };
+ }
+
+ togglePanel(event, data) {
+ this.setState((state) => ({
+ ...state,
+ expandedPanels: {
+ ...state.expandedPanels,
+ [data.id]: !state.expandedPanels[data.id],
+ },
+ }));
+ console.log('onClick', data);
+ }
+
+ render() {
+ return (
+
+
+ {this.state.items.map((item) => (
+ this.togglePanel(event, item)}
+ summary={item.summary}
+ >
+ {item.details}
+
+ ))}
+
+
+ );
+ }
+}
+
+Example.displayName = 'AccordionExample'; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
+export default Example;
diff --git a/components/accordion/__examples__/base.jsx b/components/accordion/__examples__/base.jsx
new file mode 100644
index 0000000000..e6206c71ea
--- /dev/null
+++ b/components/accordion/__examples__/base.jsx
@@ -0,0 +1,110 @@
+import React from 'react';
+import Accordion from '~/components/accordion'; // `~` is replaced with design-system-react at runtime
+import AccordionPanel from '~/components/accordion/panel'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings'; // `~` is replaced with design-system-react at runtime
+import Dropdown from '~/components/menu-dropdown'; // `~` is replaced with design-system-react at runtime
+
+class Example extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ expandedPanels: {},
+ items: [
+ {
+ id: '1',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - A',
+ },
+ {
+ id: '2',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - B',
+ },
+ {
+ id: '3',
+ summary: 'Accordion Summary',
+ details: 'Accordion details - C',
+ },
+ ],
+ };
+ }
+
+ menuDropdown(selectedItem) {
+ return (
+ {
+ if (option.label === 'delete') {
+ this.setState((state) => ({
+ ...state,
+ items: state.items.filter((item) => item.id !== selectedItem.id),
+ }));
+ } else if (console) {
+ console.log('onSelect', event, option);
+ }
+ }}
+ options={[
+ {
+ label: 'delete',
+ value: 'A0',
+ },
+ {
+ label: 'redo',
+ value: 'B0',
+ },
+ {
+ label: 'activate',
+ value: 'C0',
+ },
+ ]}
+ iconSize="x-small"
+ />
+ );
+ }
+
+ togglePanel(event, data) {
+ this.setState((state) => ({
+ ...state,
+ expandedPanels: {
+ [data.id]: !state.expandedPanels[data.id],
+ },
+ }));
+ if (this.props.action) {
+ const dataAsArray = Object.keys(data).map((id) => data[id]);
+ this.props.action('onClick')(event, ...dataAsArray);
+ } else if (console) {
+ console.log('[onSelect] (event, data)', event, data);
+ }
+ }
+
+ render() {
+ return (
+
+
+ {this.state.items.map((item, i) => (
+ this.togglePanel(event, item)}
+ summary={item.summary}
+ >
+ {item.details}
+
+ ))}
+
+
+ );
+ }
+}
+
+Example.displayName = 'AccordionExample';
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/accordion/component.json b/components/accordion/component.json
new file mode 100644
index 0000000000..52d9f21267
--- /dev/null
+++ b/components/accordion/component.json
@@ -0,0 +1,21 @@
+{
+ "component": "accordion",
+ "status": "prod",
+ "display-name": "Accordions",
+ "classKey": "Accordion",
+ "last-accessibility-review": {
+ "date-iso-8601": "2018/01/18",
+ "commit-sha": "ad6b6c6523ee21cada11be5f7ea4d99abc530726"
+ },
+ "SLDS-component-path": "/components/accordion",
+ "dependencies": [
+ {
+ "component": "panel",
+ "classKey": "AccordionPanel"
+ }
+ ],
+ "site-stories": [
+ "/__examples__/base.jsx"
+ ],
+ "url-slug": "accordions"
+}
diff --git a/components/accordion/index.js b/components/accordion/index.js
new file mode 100644
index 0000000000..ba376be6c5
--- /dev/null
+++ b/components/accordion/index.js
@@ -0,0 +1,178 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireWildcard(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _classnames = _interopRequireDefault(require("classnames"));
+
+var _shortid = _interopRequireDefault(require("shortid"));
+
+var _constants = require("../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
+
+function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
+
+var propTypes = {
+ /**
+ * CSS class names to be added to the accordion component. _Tested with snapshot testing._
+ */
+ className: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object, _propTypes.default.string]),
+
+ /**
+ * HTML id for accordion component. _Tested with snapshot testing._
+ */
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
+
+ /**
+ * The panel content for the Accordion component. Accordion panels should be added as . Event handler for the accordion panels should be added to ``. Optional `panelContentActions` component may be passed as prop. _Tested with Mocha framework and snapshot testing._
+ *
+ * Example:
+ * ```
+ *
+ *
+ *
+ *
+ *
+ * ```
+ */
+ children: _propTypes.default.node.isRequired
+};
+/**
+ * An accordion allows a user to toggle the display of sections of content.
+ * The accordion component wraps accordion panels that can be selected and expanded. It accepts children to define the content displayed within.
+ */
+
+var Accordion =
+/*#__PURE__*/
+function (_Component) {
+ _inherits(Accordion, _Component);
+
+ function Accordion(props) {
+ var _this;
+
+ _classCallCheck(this, Accordion);
+
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(Accordion).call(this, props));
+ _this.state = {
+ currButtonIndex: 0
+ };
+ _this.summaryButtons = [];
+ _this.generatedId = _shortid.default.generate();
+ return _this;
+ }
+
+ _createClass(Accordion, [{
+ key: "componentDidUpdate",
+ value: function componentDidUpdate(prevProps, prevState) {
+ if (this.state.currButtonIndex !== null && this.state.currButtonIndex !== prevState.currButtonIndex) {
+ this.summaryButtons[this.state.currButtonIndex].focus();
+ }
+ }
+ }, {
+ key: "onClickSummary",
+ value: function onClickSummary() {
+ this.setState({
+ currButtonIndex: null
+ });
+ }
+ }, {
+ key: "onKeyDownSummary",
+ value: function onKeyDownSummary(e) {
+ var buttonIndex = this.state.currButtonIndex;
+
+ if (buttonIndex === null) {
+ buttonIndex = this.summaryButtons.findIndex(function (el) {
+ return el.id === e.target.id;
+ });
+ }
+
+ if (e.key === 'ArrowDown') {
+ e.preventDefault();
+
+ if (buttonIndex < this.props.children.length - 1) {
+ this.setState({
+ currButtonIndex: buttonIndex + 1
+ });
+ } else {
+ this.setState({
+ currButtonIndex: 0
+ });
+ }
+ } else if (e.key === 'ArrowUp') {
+ e.preventDefault();
+
+ if (buttonIndex > 0) {
+ this.setState({
+ currButtonIndex: buttonIndex - 1
+ });
+ } else {
+ this.setState({
+ currButtonIndex: this.props.children.length - 1
+ });
+ }
+ }
+ }
+ }, {
+ key: "addSummaryButton",
+ value: function addSummaryButton(button) {
+ var btnInArr = this.summaryButtons.find(function (el) {
+ return button === el;
+ });
+
+ if (button !== null && btnInArr === undefined) {
+ // eslint-disable-next-line fp/no-mutating-methods
+ this.summaryButtons.push(button);
+ }
+ }
+ }, {
+ key: "render",
+ value: function render() {
+ var _this2 = this;
+
+ return _react.default.createElement("ul", {
+ name: this.props.id || this.generatedId,
+ className: (0, _classnames.default)('slds-accordion', this.props.className)
+ }, _react.default.Children.map(this.props.children, function (child) {
+ return _react.default.cloneElement(child, {
+ refs: {
+ summaryButton: _this2.addSummaryButton.bind(_this2)
+ },
+ onClickSummary: _this2.onClickSummary.bind(_this2),
+ onKeyDownSummary: _this2.onKeyDownSummary.bind(_this2)
+ });
+ }));
+ }
+ }]);
+
+ return Accordion;
+}(_react.Component);
+
+Accordion.displayName = _constants.ACCORDION;
+Accordion.propTypes = propTypes;
+var _default = Accordion;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/accordion/panel.js b/components/accordion/panel.js
new file mode 100644
index 0000000000..e5b99e7a10
--- /dev/null
+++ b/components/accordion/panel.js
@@ -0,0 +1,127 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _classnames = _interopRequireDefault(require("classnames"));
+
+var _button = _interopRequireDefault(require("../button"));
+
+var _constants = require("../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
+
+/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
+// Implements the [Accordion design
+// pattern](https://www.lightningdesignsystem.com/components/accordion/) in
+// React. Based on SLDS v2.3.2
+var propTypes = {
+ /**
+ * The panel content for the Accordion component. Accordion panels should be added as . Event handler for the accordion panels should be added to ``. Optional `panelContentActions` component may be passed as prop. _Tested with Mocha framework and snapshot testing._
+ */
+ children: _propTypes.default.node,
+
+ /**
+ * Indicates whether item is expanded or not, which should be handled by `onTogglePanel`. _Tested with Mocha framework and snapshot testing._
+ */
+ expanded: _propTypes.default.bool.isRequired,
+
+ /**
+ * Id of the item belonging to this panel. _Tested with snapshot testing._
+ */
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
+
+ /**
+ * Component that can be passed as prop to ``. As an example, a menu dropdown could be used here to handle additional actions for each accordion panel. _Tested with Mocha framework._
+ */
+ panelContentActions: _propTypes.default.node,
+
+ /**
+ * Callback that will run whenever there is a keydown on the panel button. Function doesn't change the state of the component.
+ */
+ onKeyDownSummary: _propTypes.default.func,
+
+ /**
+ * Callback that will run whenever a panel is toggled. Function should handle state to toggle `expanded` prop. _Tested with Mocha framework._
+ */
+ onTogglePanel: _propTypes.default.func.isRequired,
+
+ /**
+ * Ref callback that will pass in panel's `input` tag
+ */
+ refs: _propTypes.default.shape({
+ summaryButton: _propTypes.default.func
+ }),
+
+ /**
+ * Summary in the span element in the header of this panel. The summary is truncated and so the title element should contain the full text so that it is accessible on hover. _Tested with snapshot testing._
+ */
+ summary: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]).isRequired,
+
+ /**
+ * HTML title attribute. _Tested with snapshot testing._
+ */
+ title: _propTypes.default.string
+};
+/**
+ * The panel content for the Accordion component.
+ */
+
+var AccordionPanel = function AccordionPanel(_ref) {
+ var children = _ref.children,
+ expanded = _ref.expanded,
+ id = _ref.id,
+ panelContentActions = _ref.panelContentActions,
+ summary = _ref.summary,
+ title = _ref.title,
+ onClickSummary = _ref.onClickSummary,
+ onKeyDownSummary = _ref.onKeyDownSummary,
+ onTogglePanel = _ref.onTogglePanel,
+ refs = _ref.refs;
+ return _react.default.createElement("li", {
+ className: "slds-accordion__list-item"
+ }, _react.default.createElement("section", {
+ className: (0, _classnames.default)('slds-accordion__section', {
+ 'slds-is-open': expanded
+ })
+ }, _react.default.createElement("div", {
+ className: "slds-accordion__summary"
+ }, _react.default.createElement("h3", {
+ className: "slds-text-heading_small slds-accordion__summary-heading slds-has-flexi-truncate"
+ }, _react.default.createElement(_button.default, {
+ "aria-controls": "".concat(id, "-accordion-panel"),
+ "aria-expanded": expanded,
+ buttonRef: refs.summaryButton,
+ className: "slds-button_reset slds-accordion__summary-action",
+ iconCategory: "utility",
+ iconClassName: "slds-accordion__summary-action-icon slds-button__icon slds-button__icon_left",
+ iconName: "switch",
+ id: "".concat(id, "-accordion-button"),
+ onKeyDown: onKeyDownSummary,
+ onClick: function onClick(e) {
+ onClickSummary();
+ onTogglePanel(e);
+ },
+ variant: "base"
+ }, _react.default.createElement("span", {
+ className: "slds-truncate",
+ title: title || summary
+ }, summary))), panelContentActions), _react.default.createElement("div", {
+ "aria-hidden": !expanded,
+ className: "slds-accordion__content",
+ id: "".concat(id, "-accordion-panel")
+ }, children)));
+};
+
+var _default = AccordionPanel;
+exports.default = _default;
+AccordionPanel.propTypes = propTypes;
+AccordionPanel.displayName = _constants.ACCORDION_PANEL;
\ No newline at end of file
diff --git a/components/alert/__docs__/__snapshots__/storybook-stories.storyshot b/components/alert/__docs__/__snapshots__/storybook-stories.storyshot
new file mode 100644
index 0000000000..cb1cdae900
--- /dev/null
+++ b/components/alert/__docs__/__snapshots__/storybook-stories.storyshot
@@ -0,0 +1,355 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DOM snapshots SLDSAlert Close alert 1`] = `
+
+`;
diff --git a/components/avatar/__docs__/site-stories.js b/components/avatar/__docs__/site-stories.js
new file mode 100644
index 0000000000..faf4d9f6c5
--- /dev/null
+++ b/components/avatar/__docs__/site-stories.js
@@ -0,0 +1,14 @@
+// This object is imported into the documentation site. An example for the documentation site should be part of the pull request for the component. The object key is the kabob case of the "URL folder". In the case of `http://localhost:8080/components/app-launcher/`, `app-launcher` is the `key`. The folder name is created by `components.component` value in `package.json`. The following uses webpack's raw-loader plugin to get "text files" that will be eval()'d by CodeMirror within the documentation site on page load.
+
+/* eslint-env node */
+/* eslint-disable global-require */
+
+const siteStories = [
+ require('raw-loader!@salesforce/design-system-react/components/avatar/__examples__/base.jsx'),
+ require('raw-loader!@salesforce/design-system-react/components/avatar/__examples__/user-initials.jsx'),
+ require('raw-loader!@salesforce/design-system-react/components/avatar/__examples__/user-icon.jsx'),
+ require('raw-loader!@salesforce/design-system-react/components/avatar/__examples__/entity-initials.jsx'),
+ require('raw-loader!@salesforce/design-system-react/components/avatar/__examples__/entity-icon.jsx'),
+];
+
+module.exports = siteStories;
diff --git a/components/avatar/__docs__/storybook-stories.jsx b/components/avatar/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..4177cd4bf1
--- /dev/null
+++ b/components/avatar/__docs__/storybook-stories.jsx
@@ -0,0 +1,53 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+
+import { AVATAR } from '../../../utilities/constants';
+import Base from '../__examples__/base';
+import InverseUserInitials from '../__examples__/inverse-user-initials.jsx';
+import UserIcon from '../__examples__/user-icon.jsx';
+import UserInitials from '../__examples__/user-initials.jsx';
+import EntityIcon from '../__examples__/entity-icon.jsx';
+import EntityInitials from '../__examples__/entity-initials.jsx';
+
+/* eslint-disable react/display-name */
+
+storiesOf(AVATAR, module)
+ .addDecorator((getStory) => (
+
{getStory()}
+ ))
+ .add('Base', () => (
+
+
Base Avatar
+
+
+ ))
+ .add('Entity Icon', () => (
+
+
Entity Icon Avatar
+
+
+ ))
+ .add('Entity Initials', () => (
+
+
Entity Initials Avatar
+
+
+ ))
+ .add('User Icon', () => (
+
+
User Icon Avatar
+
+
+ ))
+ .add('User Initials', () => (
+
+
User Initials Avatar
+
+
+ ))
+ .add('Inverse User Initials', () => (
+
+
Inversed User Initials Avatar
+
+
+ ));
diff --git a/components/avatar/__examples__/avatar.jpg b/components/avatar/__examples__/avatar.jpg
new file mode 100644
index 0000000000..be34303339
Binary files /dev/null and b/components/avatar/__examples__/avatar.jpg differ
diff --git a/components/avatar/__examples__/base.jsx b/components/avatar/__examples__/base.jsx
new file mode 100644
index 0000000000..5111eecf74
--- /dev/null
+++ b/components/avatar/__examples__/base.jsx
@@ -0,0 +1,22 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/__examples__/entity-icon.jsx b/components/avatar/__examples__/entity-icon.jsx
new file mode 100644
index 0000000000..01216e74d3
--- /dev/null
+++ b/components/avatar/__examples__/entity-icon.jsx
@@ -0,0 +1,22 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/__examples__/entity-initials.jsx b/components/avatar/__examples__/entity-initials.jsx
new file mode 100644
index 0000000000..d7bc34559c
--- /dev/null
+++ b/components/avatar/__examples__/entity-initials.jsx
@@ -0,0 +1,18 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/__examples__/inverse-user-initials.jsx b/components/avatar/__examples__/inverse-user-initials.jsx
new file mode 100644
index 0000000000..91b5b75f5e
--- /dev/null
+++ b/components/avatar/__examples__/inverse-user-initials.jsx
@@ -0,0 +1,18 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/__examples__/user-icon.jsx b/components/avatar/__examples__/user-icon.jsx
new file mode 100644
index 0000000000..4b48fe1110
--- /dev/null
+++ b/components/avatar/__examples__/user-icon.jsx
@@ -0,0 +1,22 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/__examples__/user-initials.jsx b/components/avatar/__examples__/user-initials.jsx
new file mode 100644
index 0000000000..5565c8a127
--- /dev/null
+++ b/components/avatar/__examples__/user-initials.jsx
@@ -0,0 +1,18 @@
+import React from 'react';
+
+import Avatar from '~/components/avatar'; // `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+
+class Example extends React.Component {
+ static displayName = 'AvatarExample';
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/avatar/check-props.js b/components/avatar/check-props.js
new file mode 100644
index 0000000000..f5f7cdefb4
--- /dev/null
+++ b/components/avatar/check-props.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _sunsetProperty = _interopRequireDefault(require("../../utilities/warning/sunset-property"));
+
+var _getComponentDoc = _interopRequireDefault(require("../../utilities/get-component-doc"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
+
+/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
+
+/* eslint-disable import/no-mutable-exports */
+var checkProps = function checkPropsFunction() {};
+
+if (process.env.NODE_ENV !== 'production') {
+ checkProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {
+ var createDocUrl = (0, _getComponentDoc.default)(jsonDoc);
+
+ if (typeof props.assistiveText === 'string') {
+ (0, _sunsetProperty.default)(COMPONENT, props.assistiveText, 'assistiveText', "`assistiveText` as a string has been deprecated and is now an object to allow for multiple uses in the component. Please use `assistiveText.icon` instead. ".concat(createDocUrl('assistiveText')));
+ }
+ };
+}
+
+var _default = checkProps;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/avatar/component.json b/components/avatar/component.json
new file mode 100644
index 0000000000..2eaa3c5682
--- /dev/null
+++ b/components/avatar/component.json
@@ -0,0 +1,19 @@
+{
+ "component": "avatar",
+ "status": "prod",
+ "display-name": "Avatars",
+ "classKey": "Avatar",
+ "last-accessibility-review": {
+ "date-iso-8601": "2018/01/18",
+ "commit-sha": "ad6b6c6523ee21cada11be5f7ea4d99abc530726"
+ },
+ "SLDS-component-path": "/components/avatar",
+ "site-stories": [
+ "/__examples__/base.jsx",
+ "/__examples__/user-initials.jsx",
+ "/__examples__/user-icon.jsx",
+ "/__examples__/entity-initials.jsx",
+ "/__examples__/entity-icon.jsx"
+ ],
+ "url-slug": "avatars"
+}
diff --git a/components/avatar/index.js b/components/avatar/index.js
new file mode 100644
index 0000000000..afc7fd0e72
--- /dev/null
+++ b/components/avatar/index.js
@@ -0,0 +1,251 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _checkProps = _interopRequireDefault(require("./check-props"));
+
+var _classNames = _interopRequireDefault(require("../../utilities/class-names"));
+
+var _constants = require("../../utilities/constants");
+
+var _icon = _interopRequireDefault(require("../icon"));
+
+var _component = _interopRequireDefault(require("./component.json"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
+
+function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
+
+// ### Display Name Always use the canonical component name as the React display
+// name.
+var displayName = _constants.AVATAR; // ### Prop Types
+
+var propTypes = {
+ /**
+ * **Assistive text for accessibility.**
+ * This object is merged with the default props object on every render.
+ * * `icon`: Assistive text for accessibility that labels the icon.
+ */
+ assistiveText: _propTypes.default.shape({
+ icon: _propTypes.default.string
+ }),
+
+ /**
+ * Alt attribute to be applied to image (base case) element.
+ */
+ imgAlt: _propTypes.default.string,
+
+ /**
+ * Source attribute to be applied to image (base case) element.
+ */
+ imgSrc: _propTypes.default.string,
+
+ /**
+ * Initials attribute to optionally pass in initials directly in case of "initials" fallback case.
+ */
+ initials: _propTypes.default.string,
+
+ /**
+ * Avatar with initials that are dark text on light background
+ */
+ inverse: _propTypes.default.bool,
+
+ /**
+ * Label attibute to display inside "initials" fallback case. Will be passed as title prop in `abbr` element to provide more specificity.
+ */
+ label: _propTypes.default.string,
+
+ /**
+ * Avatar variants to apply relevant styling (circle: user, square: entity) and icon rendering if applicable.
+ */
+ variant: _propTypes.default.oneOf(['entity', 'user']).isRequired,
+
+ /**
+ * Size of the icon in "icon" fallback case.
+ */
+ size: _propTypes.default.oneOf(['x-small', 'small', 'medium', 'large']).isRequired,
+
+ /**
+ * Title attribute for the avatar container.
+ */
+ title: _propTypes.default.string
+};
+var defaultProps = {
+ assistiveText: {
+ icon: 'User or Account Icon'
+ },
+ imgAlt: '',
+ size: 'medium',
+ title: 'user avatar',
+ variant: 'user'
+};
+/**
+ * The avatar component represents an object or entity. An image is the preferred format for an avatar.
+ If the `imgSrc` prop is undefined, and if a `label` or `initials` prop is available, the fallback avatar will render with initials. If initals are passed in directly in the `initials` prop, this will render in the fallback avatar. If `initals` prop is unavailable but a `label` prop is available, the fallback avatar will render with built initials of the user name or entity name.
+
+ Intials built from the `label` prop will apply the following logic: If the label name contains two words, like first and last name, the first letter of each will be capitalized and returned. For labels that only have a single word name, the first two letters of that word, using one capital and one lower case letter, will be returned. For labels that contain three or more words, the first character of the first and last words will be capitalized and returned.
+
+ If `initials` or `label` are not available, the fallback avatar will render a standard icon. If `variant='user'`, a user icon will
+ render. If `variant='entity'`, an account icon will render.
+ */
+
+var Avatar =
+/*#__PURE__*/
+function (_React$Component) {
+ _inherits(Avatar, _React$Component);
+
+ function Avatar(props) {
+ var _this;
+
+ _classCallCheck(this, Avatar);
+
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(Avatar).call(this, props));
+ _this.state = {
+ imgLoadError: false
+ };
+ (0, _checkProps.default)(_constants.AVATAR, props, _component.default);
+ return _this;
+ }
+
+ _createClass(Avatar, [{
+ key: "buildInitials",
+ value: function buildInitials() {
+ var label = this.props.label;
+ var name = label.trim();
+ var nameParts = name.split(' ');
+
+ if (nameParts.length > 1) {
+ return nameParts[0].charAt(0).toUpperCase() + nameParts[nameParts.length - 1].charAt(0).toUpperCase();
+ }
+
+ return (name[0] || '').toUpperCase() + (name[1] || '').toLowerCase();
+ }
+ }, {
+ key: "handleImageError",
+ value: function handleImageError() {
+ return this.setState(function () {
+ return {
+ imgLoadError: true
+ };
+ });
+ }
+ }, {
+ key: "renderBaseAvatar",
+ value: function renderBaseAvatar() {
+ var _this2 = this;
+
+ var _this$props = this.props,
+ imgAlt = _this$props.imgAlt,
+ imgSrc = _this$props.imgSrc,
+ title = _this$props.title;
+ return _react.default.createElement("img", {
+ alt: imgAlt,
+ src: imgSrc,
+ onError: function onError() {
+ return _this2.handleImageError();
+ },
+ title: title
+ });
+ }
+ }, {
+ key: "renderIconAvatar",
+ value: function renderIconAvatar() {
+ var variant = this.props.variant;
+ var iconAssistiveText = typeof this.props.assistiveText === 'string' ? this.props.assistiveText : _objectSpread({}, defaultProps.assistiveText, this.props.assistiveText).icon;
+ return _react.default.createElement(_icon.default, {
+ assistiveText: {
+ label: iconAssistiveText
+ },
+ category: "standard",
+ name: variant === 'entity' ? 'account' : 'user'
+ });
+ }
+ }, {
+ key: "renderInitialsAvatar",
+ value: function renderInitialsAvatar() {
+ var _this$props2 = this.props,
+ initials = _this$props2.initials,
+ inverse = _this$props2.inverse,
+ label = _this$props2.label,
+ variant = _this$props2.variant;
+ return _react.default.createElement("abbr", {
+ className: (0, _classNames.default)('slds-avatar__initials', {
+ 'slds-avatar__initials_inverse': inverse,
+ 'slds-icon-standard-account': variant === 'entity',
+ 'slds-icon-standard-user': variant === 'user'
+ }),
+ title: label
+ }, initials ? initials : this.buildInitials());
+ }
+ }, {
+ key: "render",
+ value: function render() {
+ var _this3 = this;
+
+ var _this$props3 = this.props,
+ imgSrc = _this$props3.imgSrc,
+ initials = _this$props3.initials,
+ variant = _this$props3.variant,
+ label = _this$props3.label,
+ size = _this$props3.size;
+
+ var renderAvatar = function renderAvatar() {
+ /* eslint no-unneeded-ternary: */
+ if (!_this3.state.imgLoadError && imgSrc) {
+ return _this3.renderBaseAvatar();
+ }
+
+ if (initials || label && label.trim()) {
+ return _this3.renderInitialsAvatar();
+ }
+
+ return _this3.renderIconAvatar();
+ };
+
+ return _react.default.createElement("div", null, _react.default.createElement("span", {
+ className: (0, _classNames.default)('slds-avatar', {
+ 'slds-avatar_circle': variant === 'user',
+ 'slds-avatar_x-small': size === 'x-small',
+ 'slds-avatar_small': size === 'small',
+ 'slds-avatar_medium': size === 'medium',
+ 'slds-avatar_large': size === 'large'
+ })
+ }, renderAvatar()));
+ }
+ }]);
+
+ return Avatar;
+}(_react.default.Component);
+
+Avatar.defaultProps = defaultProps;
+Avatar.displayName = displayName;
+Avatar.propTypes = propTypes;
+var _default = Avatar;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/badge/__docs__/__snapshots__/storybook-stories.storyshot b/components/badge/__docs__/__snapshots__/storybook-stories.storyshot
new file mode 100644
index 0000000000..49640d5daa
--- /dev/null
+++ b/components/badge/__docs__/__snapshots__/storybook-stories.storyshot
@@ -0,0 +1,148 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DOM snapshots SLDSBadge Color Variants 1`] = `
+
+ );
+ }
+}
+
+export default Example;
diff --git a/components/carousel/component.json b/components/carousel/component.json
new file mode 100644
index 0000000000..453040291e
--- /dev/null
+++ b/components/carousel/component.json
@@ -0,0 +1,13 @@
+{
+ "component": "carousel",
+ "status": "prod",
+ "display-name": "Carousel",
+ "classKey": "Carousel",
+ "SLDS-component-path": "/components/carousel",
+ "site-stories": [
+ "/__examples__/three-items.jsx",
+ "/__examples__/default.jsx",
+ "/__examples__/default-with-navigation.jsx"
+ ],
+ "url-slug": "carousel"
+}
diff --git a/components/carousel/index.js b/components/carousel/index.js
new file mode 100644
index 0000000000..8dba2f9cd2
--- /dev/null
+++ b/components/carousel/index.js
@@ -0,0 +1,540 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _classnames = _interopRequireDefault(require("classnames"));
+
+var _shortid = _interopRequireDefault(require("shortid"));
+
+var _constants = require("../../utilities/constants");
+
+var _executionEnvironment = require("../../utilities/execution-environment");
+
+var _carouselIndicators = _interopRequireDefault(require("./private/carousel-indicators"));
+
+var _previousNextCarouselNavigator = _interopRequireDefault(require("./private/previous-next-carousel-navigator"));
+
+var _carouselItem = _interopRequireDefault(require("./private/carousel-item"));
+
+var _autoPlayButton = _interopRequireDefault(require("./private/auto-play-button"));
+
+var _keyCode = _interopRequireDefault(require("../../utilities/key-code"));
+
+var _event = _interopRequireDefault(require("../../utilities/event"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
+
+function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
+
+function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+/* eslint-disable jsx-a11y/no-static-element-interactions */
+// ### Default Props
+var defaultProps = {
+ assistiveText: {
+ autoplayButton: 'Start / Stop auto-play',
+ nextPanel: 'Next Panel',
+ previousPanel: 'Previous Panel'
+ },
+ autoplayInterval: 4000,
+ hasAutoplay: false,
+ hasPreviousNextPanelNavigation: false,
+ isInfinite: false,
+ itemsPerPanel: 1
+};
+/**
+ * A carousel allows multiple pieces of featured content to occupy an allocated amount of space.
+ * Currently panel index and auto play cannot be controlled by the app.
+ */
+
+var Carousel =
+/*#__PURE__*/
+function (_React$Component) {
+ _inherits(Carousel, _React$Component);
+
+ // ### Display Name
+ // Always use the canonical component name as the React display name.
+ // ### Prop Types
+ // ### Default Props
+ function Carousel(props) {
+ var _this;
+
+ _classCallCheck(this, Carousel);
+
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(Carousel).call(this, props));
+
+ _defineProperty(_assertThisInitialized(_this), "onNextPanelHandler", function (event) {
+ var next = _this.getCurrentPanel() + 1;
+
+ if (next > _this.nrOfPanels - 1) {
+ next = 0;
+ }
+
+ _this.setCurrentPanel(event, next, _this.changeTranslationAutomatically);
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "onPreviousPanelHandler", function (event) {
+ var prev = _this.getCurrentPanel() - 1;
+
+ if (prev < 0) {
+ prev = _this.nrOfPanels - 1;
+ }
+
+ _this.setCurrentPanel(event, prev, _this.changeTranslationAutomatically);
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "onIndicatorBlur", function () {
+ _this.setState({
+ indicatorsHaveFocus: false
+ });
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "onIndicatorClickHandler", function (event, panel) {
+ _this.setCurrentPanel(event, panel, _this.changeTranslationAutomatically);
+
+ _this.setState({
+ indicatorsHaveFocus: true
+ });
+
+ if (_this.getIsAutoplayOn()) {
+ _this.stopAutoplay(event);
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "onIndicatorFocus", function (event) {
+ _this.setState({
+ indicatorsHaveFocus: true
+ });
+
+ if (_this.getIsAutoplayOn()) {
+ _this.stopAutoplay(event);
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "onAutoplayBtnClick", function (event) {
+ var isAutoplayOn = _this.getIsAutoplayOn();
+
+ if (_this.props.onRequestAutoplayToggle) {
+ _this.props.onRequestAutoplayToggle(event, {
+ isAutoplayOn: isAutoplayOn
+ });
+ } else {
+ var actionToTake = isAutoplayOn ? _this.stopAutoplay : _this.startAutoplay;
+
+ _this.setState({
+ isAutoplayOn: !isAutoplayOn
+ });
+
+ actionToTake(event);
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "getPanelId", function (_ref) {
+ var carouselId = _ref.carouselId,
+ itemId = _ref.itemId;
+ return "content-id-".concat(carouselId, "-").concat(itemId);
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "setDimensions", function () {
+ if (_executionEnvironment.canUseDOM && _this.stageItem !== undefined && _this.stageItem.current !== undefined && _this.stageItem.current.offsetWidth !== undefined) {
+ _this.setState({
+ stageWidth: _this.stageItem.current.offsetWidth
+ }, _this.changeTranslationAutomatically);
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "setTranslationAmount", function (amount, cb) {
+ _this.setState({
+ translateX: amount
+ }, cb);
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "setCurrentPanel", function (event, amount, cb) {
+ if (_this.props.onRequestPanelChange) {
+ _this.props.onRequestPanelChange(event, {
+ currentPanel: _this.getCurrentPanel(),
+ requestedPanel: amount
+ });
+ } else {
+ _this.setState({
+ currentPanel: amount
+ }, cb);
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "startAutoplay", function (event) {
+ _this.autoplayId = setInterval(function () {
+ if (_this.canGoToNext()) {
+ _this.onNextPanelHandler(event);
+ } else if (_this.props.isInfinite) {
+ _this.setCurrentPanel(event, 0, _this.changeTranslationAutomatically);
+ } else {
+ _this.stopAutoplay(event);
+ }
+ }, _this.props.autoplayInterval);
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "stopAutoplay", function (event, ignoreCallbacksAndStateUpdates) {
+ if (_this.autoplayId) {
+ clearInterval(_this.autoplayId);
+ }
+
+ if (!ignoreCallbacksAndStateUpdates) {
+ if (_this.props.onRequestAutoplayToggle) {
+ _this.props.onRequestAutoplayToggle(event, {
+ isAutoplayOn: _this.getIsAutoplayOn()
+ });
+ } else {
+ _this.setState({
+ isAutoplayOn: false
+ });
+ }
+ }
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "changeTranslationAutomatically", function () {
+ _this.setTranslationAmount(-((_this.state.stageWidth || _this.stageWidth) * _this.getCurrentPanel()));
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "canGoToNext", function () {
+ return _this.getCurrentPanel() < _this.nrOfPanels - 1;
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "canGoToPrevious", function () {
+ return _this.getCurrentPanel() > 0;
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
+ var _keyDownCallbacks;
+
+ var keyDownCallbacks = (_keyDownCallbacks = {}, _defineProperty(_keyDownCallbacks, _keyCode.default.LEFT, function () {
+ if (_this.props.isInfinite || _this.canGoToPrevious()) {
+ _this.onPreviousPanelHandler(event);
+
+ _this.setState({
+ indicatorsHaveFocus: true
+ });
+
+ if (_this.getIsAutoplayOn()) {
+ _this.stopAutoplay(event);
+ }
+ }
+ }), _defineProperty(_keyDownCallbacks, _keyCode.default.RIGHT, function () {
+ if (_this.props.isInfinite || _this.canGoToNext()) {
+ _this.onNextPanelHandler(event);
+
+ _this.setState({
+ indicatorsHaveFocus: true
+ });
+
+ if (_this.getIsAutoplayOn()) {
+ _this.stopAutoplay(event);
+ }
+ }
+ }), _keyDownCallbacks);
+
+ if (keyDownCallbacks[event.keyCode]) {
+ _event.default.trapImmediate(event);
+
+ keyDownCallbacks[event.keyCode]();
+ }
+ });
+
+ _this.nrOfPanels = Math.ceil(props.items.length / props.itemsPerPanel);
+ _this.stageItem = _react.default.createRef();
+ _this.state = {
+ currentPanel: props.currentPanel !== undefined ? props.currentPanel : 0,
+ indicatorsHaveFocus: false,
+ isAutoplayOn: props.isAutoplayOn !== undefined ? props.isAutoplayOn : props.hasAutoplay,
+ stageWidth: 0,
+ translateX: -1000000
+ };
+ _this.generatedId = _shortid.default.generate();
+ return _this;
+ }
+
+ _createClass(Carousel, [{
+ key: "componentDidMount",
+ value: function componentDidMount() {
+ if (_executionEnvironment.canUseDOM && this.stageItem !== undefined && this.stageItem.current !== undefined && this.stageItem.current.offsetWidth !== undefined) {
+ this.stageWidth = this.stageItem.current.offsetWidth;
+ }
+
+ if (_executionEnvironment.canUseEventListeners) {
+ window.addEventListener('resize', this.setDimensions, false);
+ }
+
+ this.changeTranslationAutomatically();
+
+ if (this.getIsAutoplayOn()) {
+ this.startAutoplay({
+ mountAutoplayEvent: true
+ });
+ }
+ }
+ }, {
+ key: "componentDidUpdate",
+ value: function componentDidUpdate(prevProps) {
+ if (this.props.currentPanel !== undefined && prevProps.currentPanel !== this.props.currentPanel) {
+ this.changeTranslationAutomatically();
+ }
+
+ if (this.props.isAutoplayOn !== undefined && prevProps.isAutoplayOn !== this.props.isAutoplayOn) {
+ if (this.props.isAutoplayOn) {
+ this.startAutoplay({
+ updateAutoplayEvent: true
+ });
+ } else {
+ this.stopAutoplay({
+ updateAutoplayEvent: true
+ }, true);
+ }
+ }
+
+ if (prevProps.items.length !== this.props.items.length || prevProps.itemsPerPanel !== this.props.itemsPerPanel) {
+ this.nrOfPanels = Math.ceil(this.props.items.length / this.props.itemsPerPanel);
+ }
+ }
+ }, {
+ key: "componentWillUnmount",
+ value: function componentWillUnmount() {
+ if (_executionEnvironment.canUseEventListeners) {
+ window.removeEventListener('resize', this.setDimensions, false);
+ }
+
+ this.stopAutoplay({
+ unmountAutoplayEvent: true
+ }, true);
+ }
+ }, {
+ key: "getCurrentPanel",
+ value: function getCurrentPanel() {
+ return this.props.currentPanel !== undefined ? this.props.currentPanel : this.state.currentPanel;
+ }
+ }, {
+ key: "getIsAutoplayOn",
+ value: function getIsAutoplayOn() {
+ return this.props.isAutoplayOn !== undefined ? this.props.isAutoplayOn : this.state.isAutoplayOn;
+ }
+ }, {
+ key: "render",
+ value: function render() {
+ var _this2 = this;
+
+ var _this$props = this.props,
+ hasAutoplay = _this$props.hasAutoplay,
+ hasPreviousNextPanelNavigation = _this$props.hasPreviousNextPanelNavigation,
+ isInfinite = _this$props.isInfinite;
+ var currentPanel = this.getCurrentPanel();
+ var id = this.props.id || this.generatedId;
+ var isPreviousBtnDisabled = !(isInfinite || this.canGoToPrevious());
+ var isNextBtnDisabled = !(isInfinite || this.canGoToNext());
+ var itemWidth = (this.state.stageWidth || this.stageWidth) / this.props.itemsPerPanel;
+ var carouselMargins = hasPreviousNextPanelNavigation ? {
+ marginLeft: '44px',
+ marginRight: '44px'
+ } : {};
+ return _react.default.createElement("div", {
+ className: (0, _classnames.default)('slds-carousel', this.props.className),
+ id: id,
+ onKeyDown: this.handleKeyDown
+ }, _react.default.createElement("div", {
+ className: "slds-grid_vertical slds-col slds-path__scroller"
+ }, hasAutoplay && _react.default.createElement(_autoPlayButton.default, {
+ assistiveText: this.props.assistiveText.autoplayButton,
+ isAutoplayOn: this.getIsAutoplayOn(),
+ onClick: this.onAutoplayBtnClick
+ }), _react.default.createElement("div", {
+ className: "slds-is-relative",
+ style: carouselMargins
+ }, hasPreviousNextPanelNavigation && _react.default.createElement(_previousNextCarouselNavigator.default, {
+ assistiveText: this.props.assistiveText.previousPanel,
+ iconName: "chevronleft",
+ isDisabled: isPreviousBtnDisabled,
+ onClick: function onClick(event) {
+ if (_this2.getIsAutoplayOn()) {
+ _this2.stopAutoplay(event);
+ }
+
+ _this2.onPreviousPanelHandler(event);
+ },
+ inlineStyle: {
+ left: '-38px'
+ }
+ }), _react.default.createElement("div", {
+ ref: this.stageItem,
+ className: "slds-carousel__stage slds-show"
+ }, _react.default.createElement("div", {
+ className: "slds-carousel__panels slds-is-relative",
+ style: {
+ transform: "translateX(".concat(this.state.translateX, "px)")
+ }
+ }, this.props.items.map(function (item, index) {
+ return _react.default.createElement(_carouselItem.default, _extends({
+ carouselId: id,
+ getPanelId: _this2.getPanelId,
+ onClick: function onClick(event) {
+ _this2.props.onItemClick(event, {
+ item: item
+ });
+ },
+ onFocus: function onFocus(event) {
+ if (_this2.getIsAutoplayOn()) {
+ _this2.stopAutoplay(event);
+ }
+ },
+ onRenderItem: _this2.props.onRenderItem
+ }, item, {
+ isInCurrentPanel: index >= currentPanel * _this2.props.itemsPerPanel && index < currentPanel * _this2.props.itemsPerPanel + _this2.props.itemsPerPanel,
+ itemWidth: itemWidth,
+ key: item.id,
+ panelIndex: Math.ceil((index + 1) / _this2.props.itemsPerPanel) - 1
+ }));
+ }))), hasPreviousNextPanelNavigation && _react.default.createElement(_previousNextCarouselNavigator.default, {
+ assistiveText: this.props.assistiveText.nextPanel,
+ iconName: "chevronright",
+ isDisabled: isNextBtnDisabled,
+ onClick: function onClick(event) {
+ if (_this2.getIsAutoplayOn()) {
+ _this2.stopAutoplay(event);
+ }
+
+ _this2.onNextPanelHandler(event);
+ },
+ inlineStyle: {
+ right: '-38px'
+ }
+ })), _react.default.createElement(_carouselIndicators.default, {
+ noOfIndicators: this.nrOfPanels,
+ carouselId: id,
+ currentIndex: currentPanel,
+ getPanelId: this.getPanelId,
+ hasFocus: this.state.indicatorsHaveFocus,
+ onBlur: this.onIndicatorBlur,
+ onClick: this.onIndicatorClickHandler,
+ onFocus: this.onIndicatorFocus,
+ items: this.props.items,
+ itemsPerPanel: this.props.itemsPerPanel
+ })));
+ }
+ }]);
+
+ return Carousel;
+}(_react.default.Component);
+
+_defineProperty(Carousel, "displayName", _constants.CAROUSEL);
+
+_defineProperty(Carousel, "propTypes", {
+ /**
+ * Description of the carousel items for screen-readers.
+ */
+ assistiveText: _propTypes.default.object,
+
+ /**
+ * Interval for the autoplay iteration
+ */
+ autoplayInterval: _propTypes.default.number,
+
+ /**
+ * CSS classes that are applied to the main 'slds-carousel' classed component container
+ */
+ className: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object, _propTypes.default.string]),
+
+ /**
+ * Dictates the currently active/visible carousel panel. Use with `onRequestPanelChange` for a controlled carousel component. If not provided, the carousel will manage this itself via state.
+ */
+ currentPanel: _propTypes.default.number,
+
+ /**
+ * Boolean showing whether the autoplay button is available or not
+ */
+ hasAutoplay: _propTypes.default.bool,
+
+ /**
+ * Boolean for displaying the navigation indicators (left/right arrows) of the carousel
+ */
+ hasPreviousNextPanelNavigation: _propTypes.default.bool,
+
+ /**
+ * Id of component, if desired. If not provided an id is automatically generated
+ */
+ id: _propTypes.default.string,
+
+ /**
+ * Boolean that dictates whether autoplay is active or not. Use with `onRequestAutoplayToggle` for a controlled carousel component.
+ */
+ isAutoplayOn: _propTypes.default.bool,
+
+ /**
+ * Boolean for infinite loop navigation. Note: if not true autoplay will stop automatically at the last panel.
+ */
+ isInfinite: _propTypes.default.bool,
+
+ /**
+ * * **Array of item objects used by the default carousel item renderer.**
+ * Each object can contain:
+ * * `id`: The id of the carousel item. [REQUIRED]
+ * * `heading`: Primary string that will be used as the heading
+ * * `description`: Secondary string that is used to describe the item
+ * * `buttonLabel`: If assigned a call to button action will be rendered with this text, if unassigned no button is rendered
+ * * `imageAssistiveText`: Image alt text, if not present heading will be used instead
+ * * `href`: Used for item link, if not provided 'javascript:void(0);' is used instead
+ * * `src`: Item image src value
+ */
+ items: _propTypes.default.array.isRequired,
+
+ /**
+ * Number of items to be displayed at a time in the carousel
+ */
+ itemsPerPanel: _propTypes.default.number,
+
+ /**
+ * Accepts a custom carousel item rendering function
+ */
+ onRenderItem: _propTypes.default.func,
+
+ /**
+ * Called whenever `isAutoplayOn` is requested to be toggled on or off. Use with `isAutoplayOn` prop for a controlled carousel component. Passes an event object and a data object with the current `isAutoplayOn` value as an attribute.
+ */
+ onRequestAutoplayToggle: _propTypes.default.func,
+
+ /**
+ * Called whenever the panel is requested to change due to user interaction or auto-play. Use with `currentPanel` for a controlled carousel component. Passes an event object and a data object with `currentPanel` and `requestedPanel` attributes.
+ */
+ onRequestPanelChange: _propTypes.default.func,
+
+ /**
+ * Handler for clicking on a carousel item
+ */
+ onItemClick: _propTypes.default.func
+});
+
+_defineProperty(Carousel, "defaultProps", defaultProps);
+
+var _default = Carousel;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/carousel/private/auto-play-button.js b/components/carousel/private/auto-play-button.js
new file mode 100644
index 0000000000..045ae3e2de
--- /dev/null
+++ b/components/carousel/private/auto-play-button.js
@@ -0,0 +1,69 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _button = _interopRequireDefault(require("../../../components/button"));
+
+var _constants = require("../../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
+
+/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
+// ### React
+
+/**
+ * AutoplayButton is used to start/pause the autoplay iteration of the carousel
+ */
+var AutoplayButton = function AutoplayButton(props) {
+ return _react.default.createElement("span", {
+ className: "slds-carousel__autoplay",
+ style: {
+ left: '66px'
+ }
+ }, _react.default.createElement(_button.default, {
+ assistiveText: {
+ icon: props.assistiveText
+ },
+ className: "slds-button_icon",
+ disabled: props.isDisabled,
+ iconCategory: "utility",
+ iconName: props.isAutoplayOn ? 'pause' : 'play',
+ iconVariant: "border-filled",
+ iconSize: "x-small",
+ onClick: props.onClick,
+ variant: "icon"
+ }));
+};
+
+AutoplayButton.displayName = _constants.CAROUSEL_AUTOPLAY_BUTTON; // ### Prop Types
+
+AutoplayButton.propTypes = {
+ /**
+ * Description of the start/pause autoplay button for screen-readers.
+ */
+ assistiveText: _propTypes.default.string,
+
+ /**
+ * Indicates whether autoplay is enabled
+ */
+ isAutoplayOn: _propTypes.default.bool,
+
+ /**
+ * Triggered when the autoplay button is clicked.
+ */
+ onClick: _propTypes.default.func
+};
+AutoplayButton.defaultProps = {
+ isAutoplayOn: false
+};
+var _default = AutoplayButton;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/carousel/private/carousel-indicators.js b/components/carousel/private/carousel-indicators.js
new file mode 100644
index 0000000000..ea344baa74
--- /dev/null
+++ b/components/carousel/private/carousel-indicators.js
@@ -0,0 +1,217 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _classnames = _interopRequireDefault(require("classnames"));
+
+var _constants = require("../../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
+
+function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
+
+function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
+
+function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
+
+function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
+
+function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+/**
+ * CarouselIndicators is used to display the list of indicators associated to the number of panels
+ * a carousel has
+ */
+var CarouselIndicators =
+/*#__PURE__*/
+function (_React$Component) {
+ _inherits(CarouselIndicators, _React$Component);
+
+ function CarouselIndicators() {
+ var _getPrototypeOf2;
+
+ var _this;
+
+ _classCallCheck(this, CarouselIndicators);
+
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CarouselIndicators)).call.apply(_getPrototypeOf2, [this].concat(args)));
+
+ _defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
+ _this["indicator".concat(_this.props.currentIndex)].focus();
+
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
+ });
+
+ return _this;
+ }
+
+ _createClass(CarouselIndicators, [{
+ key: "componentDidUpdate",
+ value: function componentDidUpdate() {
+ if (this.props.hasFocus && this["indicator".concat(this.props.currentIndex)]) {
+ this["indicator".concat(this.props.currentIndex)].focus();
+ }
+ }
+ }, {
+ key: "render",
+ value: function render() {
+ var _this2 = this;
+
+ var props = this.props;
+ return _react.default.createElement("ul", {
+ className: "slds-carousel__indicators slds-col slds-text-align_center",
+ role: "tablist"
+ }, _toConsumableArray(Array(props.noOfIndicators).keys()).map(function (index) {
+ var isSelectedPanel = index === props.currentIndex;
+ var indicatorActionClassName = (0, _classnames.default)('slds-carousel__indicator-action', props.className, {
+ 'slds-is-active': isSelectedPanel
+ });
+ var assistiveText = "".concat(index);
+ var title = "".concat(index);
+ var id = '';
+
+ if (props.items && props.items.length > 0) {
+ // eslint-disable-next-line prefer-destructuring
+ id = props.items[index].id;
+ var startItemIndex = index * props.itemsPerPanel;
+ var autoIndicatorText = ''; // eslint-disable-next-line fp/no-loops
+
+ for (var i = startItemIndex; i < startItemIndex + props.itemsPerPanel; i += 1) {
+ if (props.items[i] && props.items[i].heading) {
+ autoIndicatorText = !autoIndicatorText ? '' : "".concat(autoIndicatorText, ", ");
+ autoIndicatorText += props.items[i].heading;
+ }
+ }
+
+ if (autoIndicatorText) {
+ assistiveText = autoIndicatorText;
+ title = autoIndicatorText;
+ }
+ }
+
+ return _react.default.createElement("li", {
+ className: "slds-carousel__indicator slds-m-horizontal_xx-small",
+ key: index,
+ role: "presentation",
+ style: {
+ margin: 0,
+ padding: '0 5px'
+ }
+ }, _react.default.createElement("a", {
+ ref: function ref(component) {
+ _this2["indicator".concat(index)] = component;
+ },
+ id: "indicator-id-".concat(props.carouselId, "-").concat(index),
+ className: indicatorActionClassName,
+ role: "tab",
+ tabIndex: isSelectedPanel ? '0' : '-1',
+ "aria-selected": isSelectedPanel,
+ "aria-controls": props.getPanelId({
+ carouselId: props.carouselId,
+ itemId: id
+ }),
+ title: title,
+ onBlur: props.onBlur,
+ onClick: function onClick(event) {
+ return props.onClick(event, index);
+ },
+ onFocus: _this2.onFocus
+ }, _react.default.createElement("span", {
+ className: "slds-assistive-text"
+ }, assistiveText)));
+ }));
+ }
+ }]);
+
+ return CarouselIndicators;
+}(_react.default.Component);
+
+CarouselIndicators.displayName = _constants.CAROUSEL_INDICATORS;
+CarouselIndicators.defaultProps = {
+ currentIndex: 0
+}; // ### Prop Types
+
+CarouselIndicators.propTypes = {
+ /**
+ * Carousel HTML ID
+ */
+ carouselId: _propTypes.default.string,
+
+ /**
+ * CSS classes that are applied to the component
+ */
+ className: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object, _propTypes.default.string]),
+
+ /**
+ * Selected indicator
+ */
+ currentIndex: _propTypes.default.number,
+
+ /**
+ * Passed from carousel parent state, dictates if indicator currently has focus
+ */
+ hasFocus: _propTypes.default.bool,
+
+ /**
+ * Array of objects with shape, needed for building a carousel items
+ */
+ items: _propTypes.default.array,
+
+ /**
+ * Number of items to be displayed at a time in the carousel
+ */
+ itemsPerPanel: _propTypes.default.number,
+
+ /**
+ * Number of indicators to be displayed (corresponds to the number of panels in the carousel)
+ */
+ noOfIndicators: _propTypes.default.number.isRequired,
+
+ /**
+ * Fires on indicator blur, allows parent carousel to adjust indicatorsHaveFocus state accordingly
+ */
+ onBlur: _propTypes.default.func,
+
+ /**
+ * Triggered when the indicator is clicked.
+ */
+ onClick: _propTypes.default.func,
+
+ /**
+ * Fires on indicator focus, allows parent carousel to adjust indicatorsHaveFocus state accordingly
+ */
+ onFocus: _propTypes.default.func
+};
+var _default = CarouselIndicators;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/carousel/private/carousel-item.js b/components/carousel/private/carousel-item.js
new file mode 100644
index 0000000000..4a7a2d62c7
--- /dev/null
+++ b/components/carousel/private/carousel-item.js
@@ -0,0 +1,150 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _button = _interopRequireDefault(require("../../button"));
+
+var _constants = require("../../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
+
+/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
+// # CarouselItem Component
+// Implements the [CarouselItem design pattern](https://www.lightningdesignsystem.com/components/carousel/) in React.
+
+/**
+ * A carousel allows multiple pieces of featured content to occupy an allocated amount of space.
+ */
+var CarouselItem = function CarouselItem(props) {
+ return _react.default.createElement("div", {
+ id: props.getPanelId({
+ carouselId: props.carouselId,
+ itemId: props.id
+ }),
+ className: "slds-carousel__panel slds-m-horizontal_xx-small slds-list_horizontal",
+ role: "tabpanel",
+ "aria-hidden": "false",
+ "aria-labelledby": "indicator-id-".concat(props.carouselId, "-").concat(props.panelIndex),
+ style: {
+ margin: 0,
+ maxWidth: "".concat(props.itemWidth, "px"),
+ padding: '0 6px'
+ }
+ }, props.onRenderItem ? props.onRenderItem({
+ item: props
+ }) : _react.default.createElement("a", {
+ className: "slds-carousel__panel-action slds-text-link_reset",
+ href: props.href,
+ onClick: props.onClick,
+ onFocus: props.onFocus,
+ style: {
+ backgroundColor: 'white',
+ width: '100%'
+ },
+ tabIndex: props.isInCurrentPanel ? '0' : '-1'
+ }, _react.default.createElement("div", {
+ className: "slds-carousel__image"
+ }, _react.default.createElement("img", {
+ src: props.src,
+ alt: props.imageAssistiveText || props.heading
+ })), _react.default.createElement("div", {
+ className: "slds-carousel__content",
+ style: {
+ height: 'auto'
+ }
+ }, _react.default.createElement("h2", {
+ className: "slds-carousel__content-title"
+ }, props.heading), _react.default.createElement("div", {
+ className: "slds-p-bottom_x-small slds-text-body_small",
+ style: {
+ minHeight: '40px'
+ }
+ }, props.description), props.buttonLabel && _react.default.createElement(_button.default, {
+ label: props.buttonLabel,
+ tabIndex: props.isInCurrentPanel ? '0' : '-1',
+ variant: "neutral"
+ }))));
+};
+
+CarouselItem.displayName = _constants.CAROUSEL_ITEM;
+CarouselItem.propTypes = {
+ /**
+ * Label of the button to be displayed. If not provided, no button will be rendered.
+ */
+ buttonLabel: _propTypes.default.string,
+
+ /**
+ * Carousel HTML ID
+ */
+ carouselId: _propTypes.default.string,
+
+ /**
+ * CSS classes that are applied to the component
+ */
+ className: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object, _propTypes.default.string]),
+
+ /**
+ * Visible paragraph text to be displayed on the carousel item
+ */
+ description: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
+
+ /**
+ * Carousel Item's visible heading
+ */
+ heading: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]).isRequired,
+ href: _propTypes.default.string,
+
+ /**
+ * Id of the item component.
+ */
+ id: _propTypes.default.number.isRequired,
+
+ /**
+ * Image alt text
+ */
+ imageAssistiveText: _propTypes.default.string,
+
+ /**
+ * Boolean indicating whether this item is currently visible in the active parent carousel panel
+ */
+ isInCurrentPanel: _propTypes.default.bool,
+
+ /**
+ * Width of the carousel item
+ */
+ itemWidth: _propTypes.default.number,
+
+ /**
+ * Accepts a callback to handle when the a tag is focused on
+ */
+ onFocus: _propTypes.default.func,
+
+ /**
+ * Accepts a custom carousel item rendering function
+ */
+ onRenderItem: _propTypes.default.func,
+
+ /**
+ * Index of the panel this item belongs to, to be used when associating it to an indicator
+ */
+ panelIndex: _propTypes.default.number,
+
+ /**
+ * Path of the image to be used
+ */
+ src: _propTypes.default.string.isRequired
+};
+CarouselItem.defaultProps = {
+ href: 'javascript:void(0);'
+};
+var _default = CarouselItem;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/carousel/private/previous-next-carousel-navigator.js b/components/carousel/private/previous-next-carousel-navigator.js
new file mode 100644
index 0000000000..1bc7993970
--- /dev/null
+++ b/components/carousel/private/previous-next-carousel-navigator.js
@@ -0,0 +1,77 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _button = _interopRequireDefault(require("../../../components/button"));
+
+var _constants = require("../../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+/**
+ * previousNextCarouselNavigator is used to display previous/next navigation items of the carousel
+ */
+var previousNextCarouselNavigator = function previousNextCarouselNavigator(props) {
+ return _react.default.createElement("div", {
+ className: "slds-carousel__col-center slds-is-absolute",
+ style: _objectSpread({}, props.inlineStyle, {
+ margin: '-12px 0 0',
+ top: '50%'
+ })
+ }, _react.default.createElement(_button.default, {
+ assistiveText: {
+ icon: props.assistiveText
+ },
+ className: "slds-button_icon slds-carousel__button",
+ disabled: props.isDisabled,
+ iconCategory: "utility",
+ iconName: props.iconName,
+ iconVariant: "border-filled",
+ iconSize: "small",
+ onClick: props.onClick,
+ variant: "icon"
+ }));
+}; // /assets/icons/utility-sprite/svg/symbols.svg#right
+
+
+previousNextCarouselNavigator.displayName = _constants.CAROUSEL_NAVIGATORS; // ### Prop Types
+
+previousNextCarouselNavigator.propTypes = {
+ /**
+ * Description of the previous/next navigation icons for screen-readers.
+ */
+ assistiveText: _propTypes.default.string,
+
+ /**
+ * Name of icon displayed within the navigation button
+ */
+ iconName: _propTypes.default.oneOf(['chevronleft', 'chevronright']),
+
+ /**
+ * Determines where the navigator indicator has been disabled
+ */
+ isDisabled: _propTypes.default.bool,
+
+ /**
+ * Additional styles to be applied to the container
+ */
+ inlineStyle: _propTypes.default.object,
+
+ /**
+ * Triggered when the indicator is clicked.
+ */
+ onClick: _propTypes.default.func
+};
+var _default = previousNextCarouselNavigator;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/checkbox/__docs__/__snapshots__/storybook-stories.storyshot b/components/checkbox/__docs__/__snapshots__/storybook-stories.storyshot
new file mode 100644
index 0000000000..40e434ead5
--- /dev/null
+++ b/components/checkbox/__docs__/__snapshots__/storybook-stories.storyshot
@@ -0,0 +1,2100 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DOM snapshots SLDSCheckbox Checkbox (assistive text) 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ This example has assistive text. In Safari on Mac you can turn assistive text on by using the keyboard combination:
+
+ Command + F5
+
+ .
+
+
+ Once you have enabled it, use your tab key to focus on the checkbox input, and the system should read you what is supplied to the checkbox as the
+
+ assistiveText
+
+ property.
+
+ This example has assistive text. In Safari on Mac you can turn assistive text on by using the keyboard combination:
+
+ Command + F5
+
+ .
+
+
+ Once you have enabled it, use your tab key to focus on the checkbox input, and the system should read you what is supplied to the checkbox as the
+
+ assistiveText
+
+ property.
+
+ This example has assistive text. In Safari on Mac you can turn
+ assistive text on by using the keyboard combination:
+ Command + F5.
+
+
+ Once you have enabled it, use your tab key to focus on the checkbox
+ input, and the system should read you what is supplied to the checkbox
+ as the assistiveText
+ property.
+
+ This example has assistive text. In Safari on Mac you can turn
+ assistive text on by using the keyboard combination:
+ Command + F5.
+
+
+ Once you have enabled it, use your tab key to focus on the checkbox
+ input, and the system should read you what is supplied to the checkbox
+ as the assistiveText
+ property.
+
+
+
+ ))
+ .add('Checkbox Toggle (checked)', () => (
+
+ ))
+ .add('Doc site Error', () => )
+ .add('Doc site Snapshot Base', () => )
+ .add('Doc site Snapshot Toggle', () => )
+ .add('Doc site Toggle', () => )
+ .add('Grouped with Tristate', () => );
diff --git a/components/checkbox/__examples__/default.jsx b/components/checkbox/__examples__/default.jsx
new file mode 100644
index 0000000000..363be06cd8
--- /dev/null
+++ b/components/checkbox/__examples__/default.jsx
@@ -0,0 +1,78 @@
+import React from 'react';
+// `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+import Checkbox from '~/components/checkbox';
+
+class Example extends React.Component {
+ static displayName = 'CheckboxExample';
+
+ render() {
+ return (
+
+
+
+
+
+
+
+ Account
+
+
+
+
+ Salesforce.com, Inc.
+
+
+
+
+ , Press delete or backspace to remove
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`DOM snapshots SLDSCombobox Base Custom Menu Item 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`DOM snapshots SLDSCombobox Base Custom Menu Item Disabled 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`DOM snapshots SLDSCombobox Base Inherit Menu Width - Right to Left (RTL) 1`] = `
+
+
+
+ 1. Combobox in RTL mode.
+
+
+ Note that
+
+ design-system.css
+
+ styles are in LTR. See example code for more info.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Account
+
+
+
+
+
+ A very very very very very very very very very very very long title to show how menu width will behave
+
+
+ Account • San Francisco
+
+
+
+
+
+
+
+
+
+
+ Account
+
+
+
+
+
+ Salesforce.com, Inc.
+
+
+ Account • San Francisco
+
+
+
+
+`;
diff --git a/components/combobox/__docs__/storybook-stories.jsx b/components/combobox/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..c3ea294c5c
--- /dev/null
+++ b/components/combobox/__docs__/storybook-stories.jsx
@@ -0,0 +1,190 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { action } from '@storybook/addon-actions';
+
+import { COMBOBOX } from '../../../utilities/constants';
+
+import Base from '../__examples__/base';
+import BaseCustomMenuItem from '../__examples__/base-custom-menu-item';
+import BaseCustomMenuItemDisabled from '../__examples__/base-custom-menu-item-disabled';
+import BaseInheritMenuWidth from '../__examples__/base-inherit-menu-width.jsx';
+import BaseInheritMenuWidthRTL from '../__examples__/base-inherit-menu-width-RTL';
+import BaseInlineHelpTooltip from '../__examples__/base-inline-help-tooltip';
+import BaseMenuSubHeader from '../__examples__/base-menu-subheader';
+import BaseMenuSeparator from '../__examples__/base-menu-separator';
+import BaseMenuItemDisabled from '../__examples__/base-menu-item-disabled';
+import BaseMenuItemDisabledTooltipOpen from '../__examples__/base-menu-item-disabled-tooltip-open';
+import BaseMenuItemDisabledTooltip from '../__examples__/base-menu-item-disabled-tooltip';
+import BaseWithScroll from '../__examples__/base-with-scroll';
+import Dialog from '../__examples__/dialog.jsx';
+import InlineSingle from '../__examples__/inline-single';
+import InlineSingleEntityCombobox from '../__examples__/inline-single-entity-combobox';
+import InlineSingleSearchAddEntities from '../__examples__/inline-single-search-add-entities';
+import InlineMultiple from '../__examples__/inline-multiple';
+import InlineMultipleLoading from '../__examples__/inline-multiple-loading';
+import InputProp from '../__examples__/input-prop';
+import PredefinedOptionsOnly from '../__examples__/base-predefined-options-only';
+import ReadOnly from '../__examples__/readonly-single';
+import ReadOnlyRTL from '../__examples__/readonly-single-RTL';
+import ReadOnlyDisabled from '../__examples__/readonly-single-disabled';
+import ReadOnlyMenuItemDisabled from '../__examples__/readonly-menu-item-disabled';
+import ReadOnlySingleSelectionCustomMenuItem from '../__examples__/readonly-single-selection-custom-menu-item';
+import ReadOnlyMultiple from '../__examples__/readonly-multiple';
+import RequiredInputErrorState from '../__examples__/required-input-error-state';
+
+import SnapshotBaseOpen from '../__examples__/snapshot/base-open';
+import SnapshotBaseOpenMenuSubHeaderSeparator from '../__examples__/snapshot/base-open-menu-sub-header';
+import SnapshotBaseOpenMenuInheritWidthOf from '../__examples__/snapshot/base-open-menu-inheritWidthOf';
+import SnapshotBaseCustomMenuItemOpen from '../__examples__/snapshot/base-custom-menu-item-open';
+import SnapshotBaseLabelRequired from '../__examples__/snapshot/base-label-required';
+import SnapshotBaseSelected from '../__examples__/snapshot/base-selected';
+import SnapshotDialogOpen from '../__examples__/snapshot/dialog-open';
+import SnapshotInlineMultipleOpenLoading from '../__examples__/snapshot/inline-multiple-open-loading';
+import SnapshotInlineMultipleSelection from '../__examples__/snapshot/inline-multiple-selection';
+import SnapshotInlineMultipleSelectionSelected from '../__examples__/snapshot/inline-multiple-selection-selected';
+import SnapshotInlineSingleEntityCombobox from '../__examples__/snapshot/inline-single-entity-combobox';
+import SnapshotInlineSingleSelection from '../__examples__/snapshot/inline-single-selection';
+import SnapshotInlineSingleSelectionSelected from '../__examples__/snapshot/inline-single-selection-selected';
+import SnapshotInlineSingleSearchAddEntitiesOpen from '../__examples__/snapshot/inline-single-search-add-entities-open';
+import SnapshotReadonlyMultipleSelection from '../__examples__/snapshot/readonly-multiple-selection';
+import SnapshotReadonlyMultipleSelectionMultipleItemsSelected from '../__examples__/snapshot/readonly-multiple-selection-multiple-items-selected';
+import SnapshotReadonlyMultipleSelectionSingleItemSelected from '../__examples__/snapshot/readonly-multiple-selection-single-item-selected';
+import SnapshotReadonlySingleSelection from '../__examples__/snapshot/readonly-single-selection';
+import SnapshotReadonlySingleSelectionDisabled from '../__examples__/snapshot/readonly-single-selection-disabled';
+import SnapshotReadonlySingleSelectionCustomMenuItemOpen from '../__examples__/snapshot/readonly-single-selection-custom-menu-item';
+import SnapshotReadonlySingleSelectionSelected from '../__examples__/snapshot/readonly-single-selection-selected';
+import SnapshotReadonlySingleSelectionSelectedOpen from '../__examples__/snapshot/readonly-single-selection-selected-open';
+
+storiesOf(COMBOBOX, module)
+ .addDecorator((getStory) => (
+
+
+
+
+ Toggle visibility of section
+
+
+ Section Title
+
+
+
+
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus eget urna mollis ornare vel eu leo.
+
+
+
+
+ Toggle visibility of section
+
+
+ Section Title
+
+
+
+
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus eget urna mollis ornare vel eu leo.
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus eget urna mollis ornare vel eu leo.
+
+
+
+
+`;
diff --git a/components/expandable-section/__docs__/storybook-stories.jsx b/components/expandable-section/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..45a75c4a14
--- /dev/null
+++ b/components/expandable-section/__docs__/storybook-stories.jsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { action } from '@storybook/addon-actions';
+
+import { EXPANDABLE_SECTION } from '../../../utilities/constants';
+
+import ControlledExample from '../__examples__/controlled';
+import DefaultExample from '../__examples__/default';
+import NonCollapsibleExample from '../__examples__/non-collapsible';
+
+storiesOf(EXPANDABLE_SECTION, module)
+ .addDecorator((getStory) => (
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis
+ vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris
+ condimentum nibh, ut fermentum massa justo sit amet risus. Lorem
+ ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus
+ eget urna mollis ornare vel eu leo.
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/expandable-section/__examples__/default.jsx b/components/expandable-section/__examples__/default.jsx
new file mode 100644
index 0000000000..e7c18161ab
--- /dev/null
+++ b/components/expandable-section/__examples__/default.jsx
@@ -0,0 +1,29 @@
+import React from 'react';
+// `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+import ExpandableSection from '~/components/expandable-section';
+
+class Example extends React.Component {
+ static displayName = 'ExpandableSectionDefaultExample';
+
+ render() {
+ return (
+
+
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis
+ vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris
+ condimentum nibh, ut fermentum massa justo sit amet risus. Lorem
+ ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus
+ eget urna mollis ornare vel eu leo.
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/expandable-section/__examples__/non-collapsible.jsx b/components/expandable-section/__examples__/non-collapsible.jsx
new file mode 100644
index 0000000000..8345ab4853
--- /dev/null
+++ b/components/expandable-section/__examples__/non-collapsible.jsx
@@ -0,0 +1,30 @@
+import React from 'react';
+// `~` is replaced with design-system-react at runtime
+import IconSettings from '~/components/icon-settings';
+import ExpandableSection from '~/components/expandable-section';
+
+class Example extends React.Component {
+ static displayName = 'ExpandableSectionNonCollapsibleExample';
+
+ render() {
+ return (
+
+
+
+ Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis
+ vestibulum. Fusce dapibus, tellus ac cursus commodo, tortor mauris
+ condimentum nibh, ut fermentum massa justo sit amet risus. Lorem
+ ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus
+ eget urna mollis ornare vel eu leo.
+
+
+
+ );
+ }
+}
+
+export default Example; // export is replaced with `ReactDOM.render(, mountNode);` at runtime
diff --git a/components/expandable-section/component.json b/components/expandable-section/component.json
new file mode 100644
index 0000000000..68b22ee8fb
--- /dev/null
+++ b/components/expandable-section/component.json
@@ -0,0 +1,13 @@
+{
+ "component": "expandable-section",
+ "status": "prod",
+ "display-name": "Expandable Section",
+ "classKey": "ExpandableSection",
+ "SLDS-component-path": "/components/expandable-section",
+ "site-stories": [
+ "/__examples__/default.jsx",
+ "/__examples__/controlled.jsx",
+ "/__examples__/non-collapsible.jsx"
+ ],
+ "url-slug": "expandable-section"
+}
diff --git a/components/expandable-section/index.js b/components/expandable-section/index.js
new file mode 100644
index 0000000000..d7b8d71349
--- /dev/null
+++ b/components/expandable-section/index.js
@@ -0,0 +1,185 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _react = _interopRequireDefault(require("react"));
+
+var _propTypes = _interopRequireDefault(require("prop-types"));
+
+var _classnames = _interopRequireDefault(require("classnames"));
+
+var _shortid = _interopRequireDefault(require("shortid"));
+
+var _button = _interopRequireDefault(require("../button"));
+
+var _constants = require("../../utilities/constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
+
+function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
+
+function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var propTypes = {
+ /**
+ * **Assistive text for accessibility.**
+ * * `toggleSection`: Label for the icon that expands / collapses the section
+ */
+ assistiveText: _propTypes.default.shape({
+ toggleSection: _propTypes.default.string
+ }),
+
+ /**
+ * Contents of the section
+ */
+ children: _propTypes.default.node,
+
+ /**
+ * Class names to be added to the `slds-section` classed node
+ */
+ className: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object, _propTypes.default.string]),
+
+ /**
+ * Unique identifier for the expandable section. The id is automatically generated if not provided
+ */
+ id: _propTypes.default.string,
+
+ /**
+ * Specifies whether the section is expanded or collapsed. If not provided, component will use its own state to manage this itself
+ */
+ isOpen: _propTypes.default.bool,
+
+ /**
+ * Specifies whether the section can be expanded or collapsed. Defaults to `false`
+ */
+ nonCollapsible: _propTypes.default.bool,
+
+ /**
+ * Callback for when the section is expanded or collapsed. Passes event object and data object with `isOpen` bool.
+ */
+ onToggleOpen: _propTypes.default.func,
+
+ /**
+ * The title for the section
+ */
+ title: _propTypes.default.string.isRequired
+};
+var defaultProps = {
+ assistiveText: {
+ toggleSection: 'Toggle visibility of section'
+ },
+ nonCollapsible: false
+};
+/**
+ * Toggle visibility of section content with the Expandable Section
+ */
+
+var ExpandableSection =
+/*#__PURE__*/
+function (_React$Component) {
+ _inherits(ExpandableSection, _React$Component);
+
+ function ExpandableSection(props) {
+ var _this;
+
+ _classCallCheck(this, ExpandableSection);
+
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandableSection).call(this, props));
+
+ _defineProperty(_assertThisInitialized(_this), "getId", function () {
+ return _this.props.id || _this.generatedId;
+ });
+
+ _defineProperty(_assertThisInitialized(_this), "toggleOpen", function (event) {
+ if (_this.props.onToggleOpen) {
+ _this.props.onToggleOpen(event, {
+ isOpen: _this.props.isOpen
+ });
+ } else {
+ _this.setState(function (prevState) {
+ return {
+ isOpen: !prevState.isOpen
+ };
+ });
+ }
+ });
+
+ _this.generatedId = _shortid.default.generate();
+ _this.state = {
+ isOpen: true
+ };
+ return _this;
+ }
+
+ _createClass(ExpandableSection, [{
+ key: "render",
+ value: function render() {
+ var contentId = "".concat(this.getId(), "-expanded-section-content");
+ var isOpen = this.props.isOpen !== undefined ? this.props.isOpen : this.state.isOpen;
+ var buttonAriaProps = {
+ 'aria-controls': contentId,
+ 'aria-expanded': !!isOpen
+ };
+
+ var titleNode = _react.default.createElement("span", {
+ className: (0, _classnames.default)('slds-truncate', {
+ 'slds-p-horizontal_small': !!this.props.nonCollapsible
+ }),
+ title: this.props.title
+ }, this.props.title);
+
+ return _react.default.createElement("div", {
+ className: (0, _classnames.default)('slds-section', {
+ 'slds-is-open': isOpen
+ }, this.props.className)
+ }, _react.default.createElement("h3", {
+ className: (0, _classnames.default)('slds-section__title', {
+ 'slds-theme_shade': !!this.props.nonCollapsible
+ })
+ }, !this.props.nonCollapsible ? _react.default.createElement(_button.default, _extends({
+ assistiveText: {
+ icon: this.props.assistiveText.toggleSection
+ },
+ iconCategory: "utility",
+ iconClassName: "slds-section__title-action-icon slds-button__icon_left",
+ iconName: "switch",
+ onClick: this.toggleOpen,
+ className: "slds-section__title-action",
+ variant: "base"
+ }, buttonAriaProps), titleNode) : titleNode), _react.default.createElement("div", {
+ "aria-hidden": !isOpen,
+ className: "slds-section__content",
+ id: contentId
+ }, this.props.children));
+ }
+ }]);
+
+ return ExpandableSection;
+}(_react.default.Component);
+
+ExpandableSection.displayName = _constants.EXPANDABLE_SECTION;
+ExpandableSection.propTypes = propTypes;
+ExpandableSection.defaultProps = defaultProps;
+var _default = ExpandableSection;
+exports.default = _default;
\ No newline at end of file
diff --git a/components/expression/__docs__/__snapshots__/storybook-stories.storyshot b/components/expression/__docs__/__snapshots__/storybook-stories.storyshot
new file mode 100644
index 0000000000..84e3909aa3
--- /dev/null
+++ b/components/expression/__docs__/__snapshots__/storybook-stories.storyshot
@@ -0,0 +1,3382 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DOM snapshots SLDSExpression Initial State 1`] = `
+
+`;
diff --git a/components/global-header/__docs__/storybook-stories.jsx b/components/global-header/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..1e78fdacdb
--- /dev/null
+++ b/components/global-header/__docs__/storybook-stories.jsx
@@ -0,0 +1,306 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { action } from '@storybook/addon-actions';
+
+import Avatar from '../../avatar';
+import Combobox from '../../combobox';
+import Dropdown from '../../menu-dropdown';
+import GlobalHeader from '../../global-header';
+import GlobalHeaderFavorites from '../../global-header/favorites';
+import GlobalHeaderHelp from '../../global-header/help';
+import GlobalHeaderNotifications from '../../global-header/notifications';
+import GlobalHeaderProfile from '../../global-header/profile';
+import GlobalHeaderSearch from '../../global-header/search';
+import GlobalHeaderSetup from '../../global-header/setup';
+import GlobalHeaderTask from '../../global-header/task';
+import IconSettings from '../../icon-settings';
+import Popover from '../../popover';
+
+import { GLOBAL_HEADER } from '../../../utilities/constants';
+
+import Default from '../__examples__/default';
+
+/* eslint-disable max-len */
+/* eslint-disable no-script-url */
+/* eslint-disable react/prop-types */
+
+const ipsum =
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec bibendum fermentum eros, vel porta metus dignissim vitae. Fusce finibus sed magna vitae tempus. Suspendisse condimentum, arcu eu viverra vulputate, mauris odio dictum velit, in dictum lorem augue id augue. Proin nec leo convallis, aliquet mi ut, interdum nunc.';
+
+// Notifications content is currently the contents of a generic `Popover` with markup copied from https://www.lightningdesignsystem.com/components/global-header/#Notifications. This allows content to have tab stops and focus trapping. If you need a more specific/explicit `GlobalHeaderNotification` content, please create an issue.
+const HeaderNotificationsCustomContent = (props) => (
+
+);
+HeaderNotificationsCustomContent.displayName =
+ 'HeaderNotificationsCustomContent';
+
+// Profile content is currently the contents of a generic `Popover` with markup copied from https://www.lightningdesignsystem.com/components/global-header/. This allows content to have tab stops and focus trapping. If you need a more specific/explicit `GlobalHeaderProfile` content, please create an issue.
+const HeaderProfileCustomContent = (props) => (
+
+ ))
+ .add('Search + Navigation', () => )
+ .add('Fewer Elements', () => (
+
+
+ }
+ />
+ }
+ id="header-profile-popover-id"
+ />
+ }
+ userName="Art Vandelay"
+ />
+
+ ))
+ .add('With custom ', () => (
+ } />
+ ))
+ .add('Doc site Default', () => );
diff --git a/components/global-header/__examples__/default.jsx b/components/global-header/__examples__/default.jsx
new file mode 100644
index 0000000000..be07226d71
--- /dev/null
+++ b/components/global-header/__examples__/default.jsx
@@ -0,0 +1,266 @@
+import React from 'react';
+
+import Combobox from '~/components/combobox';
+import Dropdown from '~/components/menu-dropdown';
+import GlobalHeader from '~/components/global-header'; // `~` is replaced with design-system-react at runtime
+import GlobalHeaderFavorites from '~/components/global-header/favorites';
+import GlobalHeaderHelp from '~/components/global-header/help';
+import GlobalHeaderNotifications from '~/components/global-header/notifications';
+import GlobalHeaderProfile from '~/components/global-header/profile';
+import GlobalHeaderSearch from '~/components/global-header/search';
+import GlobalHeaderSetup from '~/components/global-header/setup';
+import GlobalHeaderTask from '~/components/global-header/task';
+import IconSettings from '~/components/icon-settings';
+import Popover from '~/components/popover';
+
+/* eslint-disable max-len */
+/* eslint-disable no-script-url */
+/* eslint-disable react/prop-types */
+
+const ipsum =
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec bibendum fermentum eros, vel porta metus dignissim vitae. Fusce finibus sed magna vitae tempus. Suspendisse condimentum, arcu eu viverra vulputate, mauris odio dictum velit, in dictum lorem augue id augue. Proin nec leo convallis, aliquet mi ut, interdum nunc.';
+
+// Notifications content is currently the contents of a generic `Popover` with markup copied from https://www.lightningdesignsystem.com/components/global-header/#Notifications. This allows content to have tab stops and focus trapping. If you need a more specific/explicit `GlobalHeaderNotification` content, please create an issue.
+const HeaderNotificationsCustomContent = (props) => (
+
+);
+HeaderNotificationsCustomContent.displayName =
+ 'HeaderNotificationsCustomContent';
+
+// Profile content is currently the contents of a generic `Popover` with markup copied from https://www.lightningdesignsystem.com/components/global-header/. This allows content to have tab stops and focus trapping. If you need a more specific/explicit `GlobalHeaderProfile` content, please create an issue.
+const HeaderProfileCustomContent = (props) => (
+
+`;
diff --git a/components/icon/__docs__/storybook-stories.jsx b/components/icon/__docs__/storybook-stories.jsx
new file mode 100644
index 0000000000..a36d92f214
--- /dev/null
+++ b/components/icon/__docs__/storybook-stories.jsx
@@ -0,0 +1,93 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { ICON } from '../../../utilities/constants';
+import Icon from '../../icon';
+import IconSettings from '../../icon-settings';
+import download from '../../../icons/utility/download';
+import Standard from '../__examples__/standard';
+import Utility from '../__examples__/utility';
+import Action from '../__examples__/action';
+import Doctype from '../__examples__/doctype';
+import Custom from '../__examples__/custom';
+import ExternalPath from '../__examples__/external-path';
+import ColorBase from '../__examples__/color-base';
+import ColorDefault from '../__examples__/color-default';
+import ColorError from '../__examples__/color-error';
+import ColorWarning from '../__examples__/color-warning';
+import ColorLight from '../__examples__/color-light';
+import SizesExtraSmall from '../__examples__/sizes-extra-small';
+import SizesSmall from '../__examples__/sizes-small';
+import SizesMedium from '../__examples__/sizes-medium';
+import SizesLarge from '../__examples__/sizes-large';
+import Categories from '../__examples__/categories';
+import Colors from '../__examples__/colors';
+import Sizes from '../__examples__/sizes';
+// eslint-disable-next-line camelcase
+import UNSAFE_DirectionSettings from '../../utilities/UNSAFE_direction';
+import ProductThemes from '../__examples__/product-themes.jsx';
+
+const makeRtl = (component) => (
+ // eslint-disable-next-line
+
+