Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ps - Do not import from index #285

Merged
merged 1 commit into from
Aug 25, 2017
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
5 changes: 4 additions & 1 deletion src/components/AddressInput.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Col, Input, Row, Select, ValidatedFormGroup } from '../';
import { Col, Input, Row } from 'reactstrap';
import flow from 'lodash.flow';
import noop from 'lodash.noop';

import Select from './Select';
import ValidatedFormGroup from './ValidatedFormGroup';

// TODO Dynamic states based on country:
import states from './address/USStates.js';
import COUNTRIES from './address/Countries.js';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Icon } from '../';
import { Alert } from 'reactstrap';
import Icon from './Icon';

const ICON_MAP = {
warning: 'exclamation-circle',
Expand Down
9 changes: 8 additions & 1 deletion src/components/BlockPanel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { Button, Card, CardBlock, CardHeader, CardTitle, Icon } from '../';
import {
Button,
Card,
CardBlock,
CardHeader,
CardTitle
} from 'reactstrap';
import Icon from './Icon';

class BlockPanel extends React.Component {

Expand Down
2 changes: 1 addition & 1 deletion src/components/Calendar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Table } from '../';
import { Table } from 'reactstrap';
import classnames from 'classnames';
import addWeeks from 'date-fns/add_weeks';
import eachDay from 'date-fns/each_day';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreditCardExpiration.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Col, Row } from 'reactstrap';
import { Select } from '../';
import Select from './Select';

const today = new Date();
const MONTHS = [
Expand Down
11 changes: 8 additions & 3 deletions src/components/CreditCardInput.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
Row, Col, PatternInput, ValidatedFormGroup,
CreditCardExpiration, CreditCardNumber,
} from '../';
Row,
Col
} from 'reactstrap';
import PatternInput from './PatternInput';
import ValidatedFormGroup from './ValidatedFormGroup';
import CreditCardExpiration from './CreditCardExpiration';
import CreditCardNumber from './CreditCardNumber.js';


export default class CreditCardInput extends React.Component {
handleCardCVVChange = (event, { value, isValid }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/CreditCardNumber.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Icon, InputGroup } from '../';
import { Input, InputGroupAddon } from 'reactstrap';
import { Input, InputGroup, InputGroupAddon } from 'reactstrap';
import CardValidator from 'card-validator';
import cardTypeInfo from 'credit-card-type';
import Icon from './Icon';

const { number } = CardValidator;

Expand Down
14 changes: 11 additions & 3 deletions src/components/DateInput.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Button, ButtonGroup, DropdownMenu, Icon, Input, InputGroupButton, InputGroup } from '../';
import { Dropdown } from 'reactstrap';
import Calendar from './Calendar.js';
import {
Button,
ButtonGroup,
Dropdown,
DropdownMenu,
Input,
InputGroupButton,
InputGroup
} from 'reactstrap';
import addDays from 'date-fns/add_days';
import addMonths from 'date-fns/add_months';
import addWeeks from 'date-fns/add_weeks';
import addYears from 'date-fns/add_years';
import isValid from 'date-fns/is_valid';
import Fecha from 'fecha'; // TODO replace with date-fns/parse after v2 is released
import format from 'date-fns/format';
import Icon from './Icon';
import Calendar from './Calendar.js';

const { parse } = Fecha;

Expand Down
2 changes: 1 addition & 1 deletion src/components/DeletedNote.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Alert } from '../';
import Alert from './Alert';

class DeletedNote extends React.Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditableNote.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Button, ButtonToolbar, Card, CardBlock, Input } from '../';
import { Button, ButtonToolbar, Card, CardBlock, Input } from 'reactstrap';

class EditableNote extends React.Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExpandableSection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Icon } from '../';
import Icon from './Icon';

import styles from './ExpandableSection.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/FilterList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { LabelBadge } from '../';
import LabelBadge from './LabelBadge';

export default class FilterList extends React.Component {

Expand Down
2 changes: 1 addition & 1 deletion src/components/HelpBubble.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Icon } from '../';
import Icon from './Icon';
import { Popover, PopoverTitle, PopoverContent } from 'reactstrap';

let count = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoBox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Icon } from '../';
import Icon from './Icon';
import styles from './InfoBox.scss';

export default class InfoBox extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Note.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Button, Card, CardBlock, CardHeader, CardText, Flag } from '../';
import { Button, Card, CardBlock, CardHeader, CardText, Badge } from 'reactstrap';
import DeletedNote from './DeletedNote.js';
import EditableNote from './EditableNote.js';

Expand Down Expand Up @@ -49,7 +49,7 @@ class Note extends React.Component {
/> :
<Card color="info" outline>
<CardHeader className="d-flex justify-content-start p-2 bg-info">
{edited ? <span ref="edited"><Flag color="primary text-uppercase mr-2">Edited</Flag></span> : null}
{edited ? <span ref="edited"><Badge color="primary text-uppercase mr-2">Edited</Badge></span> : null}
<span className="text-muted">
<span className="hidden-xs-down">
{edited ? 'Last edited' : 'Posted'} {from ? <span ref="from">by {from}</span> : ' '} on <span ref="date">{dateFormat(date, 'ddd, MMMM D, YYYY "at" h:mm A')}</span>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Notes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import { HelpBubble, Row, Col, Button, Icon, Note } from '../';
import { Row, Col, Button } from 'reactstrap';
import HelpBubble from './HelpBubble';
import Icon from './Icon';
import Note from './Note';

export default class Notes extends React.Component {

Expand Down
3 changes: 2 additions & 1 deletion src/components/Paginator.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Page from './Paginator/Page';
import PropTypes from 'prop-types';
import React from 'react';
import { Pagination, Row } from 'reactstrap';
import ShortcutLink from './Paginator/ShortcutLink';
import State from './Paginator/State';
import Summary from './Paginator/Summary';
import { Icon, Pagination, Row } from '../';
import Icon from './Icon';

const DEFAULT_PER_PAGE = 20;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Paginator/Page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { PaginationItem, PaginationLink } from '../../';
import { PaginationItem, PaginationLink } from 'reactstrap';

/**
* A clickable link to a page in the pagination bar
Expand Down
2 changes: 1 addition & 1 deletion src/components/Paginator/ShortcutLink.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { PaginationItem, PaginationLink } from '../../';
import { PaginationItem, PaginationLink } from 'reactstrap';

/**
* A clickable link to the first/previous/next/last page in the pagination bar
Expand Down
3 changes: 2 additions & 1 deletion src/components/Select.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import PropTypes from 'prop-types';
import React from 'react';
import ReactSelect from 'react-select-plus';
import { Close, Icon } from '../';
import Close from './Close';
import Icon from './Icon';
import noop from 'lodash.noop';
import Option from './SelectOption.js';

Expand Down
2 changes: 1 addition & 1 deletion src/components/SummaryBox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { CardGroup } from '../';
import { CardGroup } from 'reactstrap';
import SummaryBoxItem from './SummaryBoxItem.js';

const SummaryBox = (props) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/SummaryBoxItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Card, CardBlock } from '../';
import { Card, CardBlock } from 'reactstrap';

const SummaryBoxItem = (props) => (
<Card color="secondary" outline className="rounded-0">
Expand Down
2 changes: 1 addition & 1 deletion src/components/ValidatedFormGroup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormFeedback, FormGroup } from '../';
import { FormFeedback, FormGroup } from 'reactstrap';

const ValidatedFormGroup = ({ children, error, label, labelTag: Tag, ...props }) => (
<FormGroup color={error && 'danger'} {...props}>
Expand Down
15 changes: 12 additions & 3 deletions src/components/datemonth/DateMonth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { Button, ButtonGroup, Col, Input,
InputGroupButton, InputGroup, Row } from 'reactstrap';
import { Dropdown, DropdownMenu, Icon } from '../../';
import {
Button,
ButtonGroup,
Col,
Dropdown,
DropdownMenu,
Input,
InputGroupButton,
InputGroup,
Row
} from 'reactstrap';
import Icon from '../Icon';
import Label from './DateMonthLabel.js';
import React from 'react';
import fecha from 'fecha';
Expand Down