-
Notifications
You must be signed in to change notification settings - Fork 51
FileInput - Add 100% width style (HDS-5106)
#3318
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a2edd39
HDS-5106 Add 100% width style to file input, use Grid layout in Showc…
KristinLBradley b4c4e7e
Update changeset
KristinLBradley 1c70fc9
HDS-5106 Change number of columns in example from 3 to 4
KristinLBradley b3a559b
Apply suggestions from code review
KristinLBradley 2d23671
HDS-5106 Add new Containers sub-section
KristinLBradley 3e7dfc3
HDS-5106 Add ShwOutliner as the container for FileInput example
KristinLBradley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 @@ | ||
| --- | ||
| "@hashicorp/design-system-components": patch | ||
| --- | ||
|
|
||
| <!-- START components/form/file-input --> | ||
| `FileInput` - Added width of 100% to prevent the component from overflowing its container and making it consistent with other Input components | ||
| <!-- END --> |
This file contains hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
showcase/app/components/page-components/form/file-input/sub-sections/containers.gts
This file contains hidden or 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,43 @@ | ||
| /** | ||
| * Copyright (c) HashiCorp, Inc. | ||
| * SPDX-License-Identifier: MPL-2.0 | ||
| */ | ||
| import type { TemplateOnlyComponent } from '@ember/component/template-only'; | ||
| import style from 'ember-style-modifier'; | ||
|
|
||
| import ShwFlex from 'showcase/components/shw/flex'; | ||
| import ShwTextH2 from 'showcase/components/shw/text/h2'; | ||
| import ShwOutliner from 'showcase/components/shw/outliner'; | ||
|
|
||
| import { HdsFormFileInputField } from '@hashicorp/design-system-components/components'; | ||
|
|
||
| export interface SubSectionContainersSignature { | ||
| Args: { | ||
| showHighlight: boolean; | ||
| }; | ||
| } | ||
|
|
||
| const SubSectionContainers: TemplateOnlyComponent<SubSectionContainersSignature> = | ||
| <template> | ||
| <ShwTextH2>Containers</ShwTextH2> | ||
|
|
||
| <div | ||
| class="{{if | ||
| @showHighlight | ||
| 'shw-component-form-file-input-layout-highlight' | ||
| }}" | ||
| > | ||
| <ShwFlex @gap="2rem" as |SF|> | ||
| <SF.Item @label="Within a fixed-width container"> | ||
| <ShwOutliner {{style width="220px"}}> | ||
| <HdsFormFileInputField as |F|> | ||
| <F.Label>This is the label text</F.Label> | ||
| <F.HelperText>This is the helper text with longer wrapping text</F.HelperText> | ||
| </HdsFormFileInputField> | ||
| </ShwOutliner> | ||
| </SF.Item> | ||
| </ShwFlex> | ||
| </div> | ||
| </template>; | ||
|
|
||
| export default SubSectionContainers; |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
max-widthmade no difference, so I left it out