Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,088 changes: 1,130 additions & 958 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
},
"homepage": "https://github.com/Bandwidth/shared-components#readme",
"peerDependencies": {
"prop-types": "15.5.8",
"react": "16.0.0",
"react-dom": "16.0.0",
"styled-components": "4.0.2"
"prop-types": "^15.5.8",
"react": "^16.8.0",
"react-dom": "^16.0.0",
"styled-components": "^4.0.2"
},
"dependencies": {
"animation-timer": "1.0.12",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Accordion extends React.Component {
startExpanded: false,
isCollapsed: null,
onToggle: null,
className: null,
className: "scl-accordion",
id: null,
disabled: false,
unmountClosed: false,
Expand Down Expand Up @@ -145,7 +145,7 @@ class Accordion extends React.Component {
} = this.props;

return (
<Border disabled={disabled} {...rest}>
<Border className="scl-accordion-border" disabled={disabled} {...rest}>
<ExpandToggle
id={id}
className={className}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class Alert extends React.PureComponent {
static defaultProps = {
type: 'info',
textOnly: false,
className: null,
className: "scl-alert",
id: null,
spacing: '0',
Border: styles.Border,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Badge.propTypes = {
};

Badge.defaultProps = {
className: null,
className: "scl-badge",
id: null,
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Breadcrumb/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Breadcrumb = styled.div`

Breadcrumb.defaultProps = {
spacing: { bottom: 'md', top: 'md' },
className: "scl-breadcrumb"
};

/**
Expand Down
6 changes: 5 additions & 1 deletion src/components/Breadcrumb/BreadcrumbGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ const Breadcrumbs = styled.div`
}
`;

Breadcrumbs.defaultProps = {
className: "scl-breadcrumb-group"
}

Breadcrumbs.propTypes = {
children: props => {
if (!props.children) return;
Expand All @@ -35,7 +39,7 @@ Breadcrumbs.propTypes = {
const childName = child.type.displayName || child.type.name || child.type;
return new Error(dedent`Invalid child component for Breadcrumbs: ${childName}. Only ${
Breadcrumb.displayName
} \
} \
components may be nested within Breadcrumbs.`);
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Button.defaultProps = {
leftIcon: null,
rightIcon: null,
iconHelper: icons,
className: null,
className: "scl-button",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/SubmitButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SubmitButton extends React.Component {
leftIcon: null,
pristineContents: 'Up to Date',
id: null,
className: null,
className: "scl-button-submit",
onClick: () => null,
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Card extends React.Component {

static defaultProps = {
CardWrapper: styles.Wrapper,
className: "scl-card"
};

static styles = styles;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class Checkbox extends React.PureComponent {
};

static defaultProps = {
className: null,
className: "scl-checkbox",
id: null,
value: undefined,
checked: undefined,
Expand Down
1 change: 1 addition & 0 deletions src/components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DatePicker extends React.PureComponent {
};

static defaultProps = {
className: "scl-date-picker",
Wrapper: styles.Wrapper,
displayFormat: 'MMM DD YYYY',
invalid: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/DatePicker/DateRangePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class DateRangePicker extends React.PureComponent {
};

static defaultProps = {
className: "scl-date-range-picker",
Wrapper: styles.RangeWrapper,
LineSeparator: styles.LineSeparator,
invalid: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/DateTimePicker/DateTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class DateTimePicker extends React.PureComponent {
};

static defaultProps = {
className: "scl-date-time-picker",
onChange: noop,
displayFormat: 'MMM DD YYYY [at] hh:mm A',
utc: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/DateTimePicker/DateTimeRangePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class DateTimeRangePicker extends React.PureComponent {
};

static defaultProps = {
className: "scl-date-time-range-picker",
onChange: noop,
displayFormat: 'MMM DD YYYY [at] hh:mm A',
timeDisplayFormat: 'hh:mm',
Expand Down
1 change: 1 addition & 0 deletions src/components/DragList/DragList.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DragList extends React.PureComponent {
static Container = DragContainer;

static propTypes = {
className: "scl-drag-list",
children: PropTypes.node.isRequired,
};

Expand Down
4 changes: 4 additions & 0 deletions src/components/DragList/DragListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class DragListItem extends React.PureComponent {
onMove: PropTypes.func.isRequired,
};

static defaultProps = {
className: "scl-drag-list-item"
}

componentDidMount() {
// Use empty image as a drag preview so browsers don't draw it
// and we can draw whatever we want on the custom drag layer instead.
Expand Down
2 changes: 1 addition & 1 deletion src/components/FileLoader/FileLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class FileLoader extends React.Component {
static defaultProps = {
required: false,
disabled: false,
className: null,
className: "scl-file-loader",
id: null,
DropArea: styles.DropArea,
Preview: styles.Preview,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Gutter/Gutter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gutter.propTypes = {
};

Gutter.defaultProps = {
className: null,
className: "scl-gutter",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/H/H1.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ H1.propTypes = {

H1.defaultProps = {
spacing: { bottom: 'lg' },
className: null,
className: "scl-header-1",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/H/H2.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ H2.propTypes = {

H2.defaultProps = {
spacing: { bottom: 'lg' },
className: null,
className: "scl-header-2",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/H/H3.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ H3.propTypes = {

H3.defaultProps = {
spacing: { bottom: 'lg' },
className: null,
className: "scl-header-3",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/H/H4.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ H4.propTypes = {

H4.defaultProps = {
spacing: { bottom: 'lg' },
className: null,
className: "scl-header-4",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/H/H5.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ H5.propTypes = {

H5.defaultProps = {
spacing: { bottom: 'lg' },
className: null,
className: "scl-header-5",
id: null,
};
H5.Skeleton = () => <Skeleton width="200px" height="1.15em" />;
Expand Down
4 changes: 4 additions & 0 deletions src/components/HeaderBar/HeaderBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const HeaderBar = styled.div.withConfig({ displayName: 'HeaderBar' })`
padding-left: ${themeGet('spacing.medium')};
`;

HeaderBar.defaultProps = {
className: "scl-header-bar"
}

/**
* @component
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/HelpText/HelpText.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ HelpText.propTypes = {
};

HelpText.defaultProps = {
className: null,
className: "scl-helptext",
id: null,
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Icon = styled.i.withConfig({ displayName: 'Icon' })`
cursor: ${({ onClick }) => (onClick ? 'pointer' : 'inherit')};
&::before {
content: "${({ name, iconsHelper }) =>
iconsHelper(name) || iconsHelper('help_2')}";
iconsHelper(name) || iconsHelper('help_2')}";
display: block;
color: inherit;
}
Expand Down Expand Up @@ -43,7 +43,7 @@ Icon.propTypes = {
};

Icon.defaultProps = {
className: null,
className: "scl-icon",
id: null,
iconsHelper: icons,
color: null,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Input extends React.PureComponent {
onBlur: () => null,
onFocus: () => null,
onKeyDown: () => null,
className: null,
className: "scl-input",
invalid: false,
error: false,
placeholder: '',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Label/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Label.propTypes = {

Label.defaultProps = {
disabled: false,
className: null,
className: "scl-label",
id: null,
required: false,
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Link/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Link.defaultProps = Link.Positive.defaultProps = Link.Negative.defaultProps = Li
appearFocused: false,
newTab: undefined,
icon: null,
className: "scl-link"
};

Link.Wrap.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/List/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ListItem.propTypes = {
};

ListItem.defaultProps = {
className: null,
className: "scl-list-item",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/List/OrderedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ OrderedList.propTypes = {
};

OrderedList.defaultProps = {
className: null,
className: "scl-ordered-list",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/List/UnorderedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ UnorderedList.propTypes = {
};

UnorderedList.defaultProps = {
className: null,
className: "scl-unordered-list",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Loader/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Loader extends React.PureComponent {
static defaultProps = {
size: '20px',
color: null,
className: null,
className: "scl-loader",
id: null,
Ring: styles.Ring,
Container: styles.Container,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logo/Logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Logo.propTypes = {
};

Logo.defaultProps = {
className: null,
className: "scl-logo",
id: null,
color: null,
height: null,
Expand Down
2 changes: 1 addition & 1 deletion src/components/MethodTag/MethodTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MethodTag.propTypes = {
};

MethodTag.defaultProps = {
className: null,
className: "scl-method-tag",
id: null,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Modal extends React.Component {
static defaultProps = {
title: null,
onBlockerClicked: () => null,
className: null,
className: "scl-modal",
id: null,
actionContent: null,
ActionContent: styles.ActionContent,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Money/Money.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Money extends React.Component {

static defaultProps = {
showSign: true,
className: null,
className: "scl-money",
id: null,
value: 0,
Styles: styles.MoneyStyles,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/NavigationTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LogoHeader extends React.Component {

static defaultProps = {
children: 'Bandwidth',
className: null,
className: "scl-navigation-title",
id: null,
LogoPairWrapper: styles.LogoPairWrapper,
Logo: DefaultLogo,
Expand Down
4 changes: 4 additions & 0 deletions src/components/Navigation/styles/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const NavigationBar = styled.header.withConfig({
}
`;

NavigationBar.defaultProps = {
className: 'scl-navigation-bar'
}

NavigationBar.Sub = styled(NavigationBar)`
background: ${get('colors.gray.light')};
color: ${get('colors.text.default')};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/styles/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ NavigationItem.propTypes = {
};

NavigationItem.defaultProps = {
className: null,
className: "scl-nav-item",
id: null,
active: false,
disabled: false,
Expand Down
Loading