-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from TechnologyAdvice/feature/restructure
Restructure to Semantic structure
- Loading branch information
Showing
43 changed files
with
112 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,65 @@ | ||
import Button from './src/components/Button/Button'; | ||
import Checkbox from './src/components/Checkbox/Checkbox'; | ||
import Column from './src/components/Grid/Column'; | ||
import Container from './src/components/Container/Container'; | ||
import Confirm from './src/components/Confirm/Confirm'; | ||
import Field from './src/components/Field/Field'; | ||
import Form from './src/components/Form/Form'; | ||
import Grid from './src/components/Grid/Grid'; | ||
import Row from './src/components/Grid/Row'; | ||
import Input from './src/components/Input/Input'; | ||
import Menu from './src/components/Menu/Menu'; | ||
import MenuItem from './src/components/Menu/MenuItem'; | ||
import Modal from './src/components/Modal/Modal'; | ||
import ModalContent from './src/components/Modal/ModalContent'; | ||
import ModalFooter from './src/components/Modal/ModalFooter'; | ||
import ModalHeader from './src/components/Modal/ModalHeader'; | ||
import Segment from './src/components/Segment/Segment'; | ||
import Select from './src/components/Select/Select'; | ||
import Table from './src/components/Table/Table'; | ||
import TableColumn from './src/components/Table/TableColumn'; | ||
import TableCell from './src/components/Table/TableCell'; | ||
import TableHeader from './src/components/Table/TableHeader'; | ||
import TableRow from './src/components/Table/TableRow'; | ||
import Textarea from './src/components/Textarea/Textarea'; | ||
// Addons | ||
import Confirm from 'src/addons/Confirm/Confirm'; | ||
import Textarea from 'src/addons/Textarea/Textarea'; | ||
|
||
// Collections | ||
import Column from 'src/collections/Grid/Column'; | ||
import Field from 'src/collections/Form/Field'; | ||
import Form from 'src/collections/Form/Form'; | ||
import Grid from 'src/collections/Grid/Grid'; | ||
import Row from 'src/collections/Grid/Row'; | ||
import Menu from 'src/collections/Menu/Menu'; | ||
import MenuItem from 'src/collections/Menu/MenuItem'; | ||
import Table from 'src/collections/Table/Table'; | ||
import TableColumn from 'src/collections/Table/TableColumn'; | ||
import TableCell from 'src/collections/Table/TableCell'; | ||
import TableHeader from 'src/collections/Table/TableHeader'; | ||
import TableRow from 'src/collections/Table/TableRow'; | ||
|
||
// Elements | ||
import Button from 'src/elements/Button/Button'; | ||
import Container from 'src/elements/Container/Container'; | ||
import Input from 'src/elements/Input/Input'; | ||
import Segment from 'src/elements/Segment/Segment'; | ||
|
||
// Modules | ||
import Checkbox from 'src/modules/Checkbox/Checkbox'; | ||
import Modal from 'src/modules/Modal/Modal'; | ||
import ModalContent from 'src/modules/Modal/ModalContent'; | ||
import ModalFooter from 'src/modules/Modal/ModalFooter'; | ||
import ModalHeader from 'src/modules/Modal/ModalHeader'; | ||
import Dropdown from 'src/modules/Dropdown/Dropdown'; | ||
|
||
export default { | ||
Button, | ||
Checkbox, | ||
Column, | ||
Container, | ||
// Addons | ||
Confirm, | ||
Textarea, | ||
|
||
// Collections | ||
Column, | ||
Field, | ||
Form, | ||
Grid, | ||
Input, | ||
Row, | ||
Menu, | ||
MenuItem, | ||
Modal, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
Row, | ||
Segment, | ||
Select, | ||
Table, | ||
TableColumn, | ||
TableCell, | ||
TableHeader, | ||
TableRow, | ||
Textarea, | ||
|
||
// Elements | ||
Button, | ||
Container, | ||
Input, | ||
Segment, | ||
|
||
// Modules | ||
Checkbox, | ||
Modal, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
Dropdown, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/components/Confirm/Confirm.js → src/addons/Confirm/Confirm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/Textarea/Textarea.js → src/addons/Textarea/Textarea.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions
18
src/components/Checkbox/Checkbox.js → src/modules/Checkbox/Checkbox.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/Select/Select.js → src/modules/Dropdown/Dropdown.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/src/components/Confirm-test.js → test/specs/addons/Confirm-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Textarea-test.js → test/specs/addons/Textarea-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Field-test.js → test/specs/collections/Form/Field-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Grid-test.js → test/specs/collections/Grid/Grid-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/src/components/Menu-test.js → test/specs/collections/Menu/Menu-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/src/components/Table-test.js → test/specs/collections/Table/Table-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Button-test.js → test/specs/elements/Button/Button-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Input-test.js → test/specs/elements/Input/Input-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Segment-test.js → test/specs/elements/Segment/Segment-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/src/components/Checkbox-test.js → test/specs/modules/Checkbox/Checkbox-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import {Dropdown} from 'stardust'; | ||
|
||
describe('Dropdown', () => { | ||
it('has a default value', () => { | ||
let options = [ | ||
{value: '', text: 'Please select a role'}, | ||
{value: 'admin', text: 'Admin'}, | ||
{value: 'editor', text: 'Editor'} | ||
]; | ||
let renderedDropdown = render(<Dropdown label='Roles' value='admin' options={options} />).findTag('select'); | ||
renderedDropdown.props.value.should.equal('admin'); | ||
}); | ||
it('has assigned amount of options', () => { | ||
let options = [ | ||
{value: '', text: 'Please select a color'}, | ||
{value: 'red', text: 'red'}, | ||
{value: 'green', text: 'green'}, | ||
{value: 'orange', text: 'orange'}, | ||
{value: 'purple', text: 'purple'}, | ||
{value: 'blue', text: 'blue'} | ||
]; | ||
let renderedDropdown = render(<Dropdown options={options} />); | ||
renderedDropdown.findTag('select').props.children.length.should.equal(6); | ||
renderedDropdown.scryTag('option')[2].props.value.should.equal('green'); | ||
}); | ||
}); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/src/utils/numberToWord-test.js → test/specs/utils/numberToWord-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.