-
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.
feat(Input): update to v1 API (#281)
* Input Component updated to v1 API * fix(Input): fix props references * refactor(docs): update Input docs to v1 files * fix(docs): fix input variations typo * refactor(docs): go stateless and rename Input docs * fix(Sidebar): remove input ref * docs(Input): update examples to v1 API * feat(Input): update states to v1 API * feat(Input): add v1 icon support * feat(Input): add labeled support * feat(Input): support labeled inputs * feat(Input): begin labeled and action variations * fix(docs): cleanup example layout * feat(Dropdown): add missing `basic` prop * test(Dropdown): add missing className tests * feat(Input): support action inputs * test(Input): add v1 API tests * docs(Input): add icon child example * feat(factories): allow deafultProps function * refactor(common): complete Input todos * fix(docs): fix linter issues * fix(BreadcrumbDivider-test): restore to original * fix(FormField): do not pass label to all controls * refactor(ExampleSection): restore header style * refactor(factories): add defaultProps object default
- Loading branch information
1 parent
8128a9a
commit 38cb682
Showing
73 changed files
with
888 additions
and
502 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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputDisabled = () => ( | ||
<Input disabled placeholder='Search...' /> | ||
) | ||
|
||
export default InputDisabled |
10 changes: 0 additions & 10 deletions
10
docs/app/Examples/elements/Input/States/InputDisabledExample.js
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputError = () => ( | ||
<Input error placeholder='Search...' /> | ||
) | ||
|
||
export default InputError |
10 changes: 0 additions & 10 deletions
10
docs/app/Examples/elements/Input/States/InputErrorExample.js
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputFocus = () => ( | ||
<Input focus placeholder='Search...' /> | ||
) | ||
|
||
export default InputFocus |
10 changes: 0 additions & 10 deletions
10
docs/app/Examples/elements/Input/States/InputFocusExample.js
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputLeftLoading = () => ( | ||
<Input loading icon='user' iconPosition='left' placeholder='Search...' /> | ||
) | ||
|
||
export default InputLeftLoading |
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputLoading = () => ( | ||
<Input loading icon='user' placeholder='Search...' /> | ||
) | ||
|
||
export default InputLoading |
10 changes: 0 additions & 10 deletions
10
docs/app/Examples/elements/Input/States/InputLoadingExample.js
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
docs/app/Examples/elements/Input/States/InputStatesExamples.js
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
import React from 'react' | ||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
import { Message } from 'src' | ||
|
||
const InputStates = () => ( | ||
<ExampleSection title='States'> | ||
<ComponentExample | ||
title='Focus' | ||
description='An input field can show a user is currently interacting with it' | ||
examplePath='elements/Input/States/InputFocus' | ||
/> | ||
<ComponentExample | ||
title='Loading' | ||
description='An icon input field can show that it is currently loading data' | ||
examplePath='elements/Input/States/InputLoading' | ||
> | ||
<Message> | ||
Loading inputs automatically modify the input's icon on loading state to show loading indication | ||
</Message> | ||
</ComponentExample> | ||
<ComponentExample examplePath='elements/Input/States/InputLeftLoading' /> | ||
<ComponentExample | ||
title='Disabled' | ||
description='An input field can show that it is disabled' | ||
examplePath='elements/Input/States/InputDisabled' | ||
/> | ||
<ComponentExample | ||
title='Error' | ||
description='An input field can show that the data contains errors' | ||
examplePath='elements/Input/States/InputError' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default InputStates |
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,8 @@ | ||
import React from 'react' | ||
import { Input } from 'stardust' | ||
|
||
const InputInput = () => ( | ||
<Input placeholder='Search...' /> | ||
) | ||
|
||
export default InputInput |
10 changes: 0 additions & 10 deletions
10
docs/app/Examples/elements/Input/Types/InputInputExample.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.