-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add icon list component #3876
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
Add icon list component #3876
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
eb916fa
Merge branch 'accelerator/icons' into accelerator/3774-Icon-List
mitchmoccia 1518eef
Merge branch 'accelerator/3777-fancy-ordered-list' into accelerator/3…
mitchmoccia c9ea6a3
3772 Icon list initial commit
mitchmoccia 95521c1
Merge branch 'develop' into accelerator/3772-icon-list
mitchmoccia 487e6df
Merge branch 'develop' into accelerator/3772-icon-list
mitchmoccia 78a49fb
3772 Icon list initial commit
mitchmoccia 7565cb7
Use framed template instead of hardcoded container
thisisdano 1695c58
Use config data to drive component content
thisisdano 2532c17
Strip whitespace in template
thisisdano 1dc81ff
Use standard utility for layout container
thisisdano 1585745
Use framed layout to avoid prose scope
thisisdano d209207
Override prose scope for all component items
thisisdano 7927453
Use flex not float for items
thisisdano 0b4798a
Use space-above instead of space-below for item-item spacing
thisisdano 0bf84a7
Use block display for icons for more predictable spacing
thisisdano 7975f1b
Use relative position to facilitate custom vertical allignment with b…
thisisdano 4ea7486
Generate list-level variants for all project theme and state colors...
thisisdano 8609a4f
Add list-level variants for icon size...
thisisdano 17e998d
Add color and size variants to data and template
thisisdano af4bc0e
Add do-list and dont-list examples
thisisdano 1e7c75c
Use a better default size for the icon and tighter item-item padding
thisisdano 7efc333
Add some more custom style to the do/dontlist
thisisdano 09ab5c0
Tie icon/content spacing to the content size
thisisdano 9f023e3
Use a long string of text in one of the do-list items
thisisdano 361cbcd
Lighten the border to focus on the content
thisisdano b2c5176
Add smart punctuation
thisisdano 2f2d3a3
Add a default max-width of measure-5
thisisdano 8a9987c
Improve mobile performance of column layout
thisisdano 1ef92f5
Remove top-margin from the first child to correct spacing
thisisdano a4ba3e2
Add a complex list example with long text
thisisdano d1a1811
Remove prose override — no longer needed with override-prose()
thisisdano 127cd03
Use standard disc for content uls
thisisdano 3235942
Don't allow custom sizing at icon level to preserve left alignment
thisisdano 2f78b16
Allow manual icon positioning
thisisdano 1471757
Configure complex list content
thisisdano 5e2067e
Merge pull request #3879 from uswds/dw-icon-list-changes
mitchmoccia 2530633
Update sample text to exclude words like first and last
mitchmoccia 54cc13c
Merge branch 'develop' into accelerator/3772-icon-list
thisisdano bb10e68
Merge branch 'develop' into accelerator/3772-icon-list
thisisdano 599b2a2
Small change to invoke more recent Federalist build
mitchmoccia 831dd0d
Merge branch 'develop' into accelerator/3772-icon-list
mitchmoccia 50fb6c5
Update Icon list examples
mitchmoccia 1ab4234
Update snyk to try to get valid build
mitchmoccia fbca5fc
Add new variant class usa-icon-list__heading that changes the size of…
mitchmoccia f869f12
Merge lastest from develop and resolve conflict with .snyk
mitchmoccia d461cb7
Update each examples with suggestions from weekly sync with Dan
mitchmoccia 888459c
Reduce adjacent p tag top margin to reduce space between heading and …
mitchmoccia 19017c3
Tie the Icon list size variant to specific font size tokens
mitchmoccia ed6fc98
The usa-icon-list__heading class now gets the font family from the th…
mitchmoccia 7ee1ce8
A margin top factor was added to account for smaller icon size varian…
mitchmoccia df6b611
Change the size variant class from number based to t-shirt token base…
mitchmoccia 9eddc5d
Improve Icon list font size and padding between content area and icon
mitchmoccia 38aedbb
Change __heading to __title in the class name designation
mitchmoccia fe97882
Fine tune the title text and icons sizes to better match the Sketch file
mitchmoccia f11943c
Add comments to Icon list Sass file
mitchmoccia becc24e
Allow "none" to be passed to at-media(), resulting in no MQ output
thisisdano d196dfd
Don't give examples of long, complex text — this is running text not …
thisisdano 7649742
[see details]
thisisdano a2ce0a1
Simplify rich content
thisisdano 4cb2d75
Autoformat only untagged text in content areas
thisisdano 48679f5
Return the balanced space under content titles
thisisdano 060abd7
[see details]
thisisdano 1bbb427
[see details]
thisisdano c9016a5
Clean up comments; use var for magic padding number
thisisdano c73deba
Use appropriate data
thisisdano 2fb7137
[see details]
thisisdano 97927ba
Refine scaling factors
thisisdano eef7801
Use conventional colors for icons
thisisdano 634d7b1
Be specific about the elements meant not to get custom sizing
thisisdano 6622b3a
Fix typo
thisisdano 7d3118c
Clarify block-level element comment
thisisdano 1521123
Use alpha order for rules
thisisdano 4cbcf9a
Merge pull request #3991 from uswds/dw-icon-list-modifications
mitchmoccia 274e9ec
Use theme defaults for icon list defaults
thisisdano aaedca1
Merge branch 'develop' into accelerator/3772-icon-list
mitchmoccia 4134228
Update icon list examples to new spec
mitchmoccia a00a74e
update package-lock.json
jaredcunha fbe4886
Merge branch 'accelerator/3772-icon-list' of https://github.com/uswds…
thisisdano 478ca5b
Merge branch 'uswds-2.11.0' into accelerator/3772-icon-list
thisisdano d4bebc8
Use theme font family
thisisdano dc09846
Get fixed size for icon, based on non-normalized size token
thisisdano 5f4973a
Use proper keys for component data
thisisdano b7ad8f3
Removed unused size key from individual item icons
thisisdano 42fa829
Move or remove styles that aren't affected by specific MQs
thisisdano b806ae7
[see details]
thisisdano 4031206
[see details]
thisisdano 4ca3437
Sync settings
thisisdano d68b735
Add usa-icon-list package
thisisdano c6ea22e
Merge branch 'uswds-2.11.0' into accelerator/3772-icon-list
thisisdano df23ae9
Update component status
thisisdano 8dc2132
Use alpha order for icon list settings
thisisdano f4acd53
Consolidate media queries
thisisdano 4a49f5c
Remove custom color from example icons
thisisdano 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
3772 Icon list initial commit
- Loading branch information
commit 78a49fbecb4210f1ded0d25507314312e95d85cd
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 |
|---|---|---|
| @@ -1,30 +1,40 @@ | ||
| <div class="grid-container"> | ||
| <svg class="usa-icon usa-icon--size-4" aria-hidden="true" role="img"> | ||
| <use xlink:href="../../dist/img/sprite.svg#check"></use> | ||
| </svg> | ||
|
|
||
| <svg class="usa-icon usa-icon--size-4" aria-hidden="true" role="img"> | ||
| <use xlink:href="../../dist/img/sprite.svg#arrow_forward"></use> | ||
| </svg> | ||
|
|
||
| <ol class="usa-icon-list"> | ||
| <ul class="usa-icon-list"> | ||
| <li class="usa-icon-list__item"> | ||
| <h4 class="usa-icon-list__heading">Icon list item</h4> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <ul> | ||
| <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.</li> | ||
| <li>Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum.</li> | ||
| <li>Aliquam erat volutpat. Sed quis velit.</li> | ||
| </ul> | ||
| <div class="usa-icon-list__icon"> | ||
| <svg class="usa-icon usa-icon--size-4" aria-hidden="true" role="img"> | ||
| <use xlink:href="../../dist/img/sprite.svg#star"></use> | ||
| </svg> | ||
| </div> | ||
| <div class="usa-icon-list__content"> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <ul> | ||
| <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.</li> | ||
| <li>Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum.</li> | ||
| <li>Aliquam erat volutpat. Sed quis velit.</li> | ||
| </ul> | ||
| </div> | ||
| </li> | ||
| <li class="usa-icon-list__item"> | ||
| <h4 class="usa-icon-list__heading">Icon list item</h4> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <div class="usa-icon-list__icon"> | ||
| <svg class="usa-icon usa-icon--size-4" aria-hidden="true" role="img"> | ||
| <use xlink:href="../../dist/img/sprite.svg#check"></use> | ||
| </svg> | ||
| </div> | ||
| <div class="usa-icon-list__content"> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| </div> | ||
| </li> | ||
| <li class="usa-icon-list__item"> | ||
| <h4 class="usa-icon-list__heading">Icon list item</h4> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| <div class="usa-icon-list__icon"> | ||
| <svg class="usa-icon usa-icon--size-4" aria-hidden="true" role="img"> | ||
| <use xlink:href="../../dist/img/sprite.svg#alarm"></use> | ||
| </svg> | ||
| </div> | ||
| <div class="usa-icon-list__content"> | ||
| <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien.</p> | ||
| </div> | ||
| </li> | ||
| </ol> | ||
| </ul> | ||
| </div> |
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 |
|---|---|---|
| @@ -1,74 +1,25 @@ | ||
| // PROCESS LIST | ||
| $theme-icon-list-counter-border-width: units( | ||
| $theme-icon-list-connector-width | ||
| ) / 2; | ||
| $theme-icon-list-counter-content-padding: ( | ||
| units($theme-icon-list-counter-size) / 2 | ||
| ) - units(0.5); | ||
| $theme-icon-list-counter-line-x-position: ( | ||
| (units($theme-icon-list-counter-size) / 2) - | ||
| (units($theme-icon-list-connector-width) / 2) | ||
| ); | ||
|
|
||
| // ICON LIST | ||
| .usa-icon-list { | ||
| @include typeset($theme-icon-list-font-family); | ||
| @include unstyled-list; | ||
| counter-reset: usa-numbered-list; | ||
| padding: 20px 0 0 $theme-icon-list-counter-line-x-position; | ||
| position: relative; | ||
| } | ||
|
|
||
| .usa-icon-list__item { | ||
| border-left: units($theme-icon-list-connector-width) solid | ||
| color($theme-icon-list-connector-color); | ||
| font-size: size( | ||
| $theme-icon-list-font-family, | ||
| $theme-icon-list-font-size | ||
| ); | ||
| font-size: size($theme-icon-list-font-family, $theme-icon-list-font-size); | ||
| padding-bottom: units(4); | ||
| padding-left: calc(#{$theme-icon-list-counter-content-padding} * 2); | ||
| &:last-child { | ||
| border-left: units($theme-icon-list-connector-width) solid transparent; | ||
| } | ||
| &::before { | ||
| @include u-flex("row", "align-center", "justify-center"); | ||
| $half-of-font-size: -0.4rem; | ||
| @include u-circle($theme-icon-list-counter-size); | ||
| background-color: color($theme-icon-list-counter-background-color); | ||
| box-shadow: 0 0 0 $theme-icon-list-counter-border-width | ||
| color($theme-icon-list-counter-border-color); | ||
| color: color($theme-icon-list-counter-text-color); | ||
| content: counter(usa-numbered-list, decimal); | ||
| counter-increment: usa-numbered-list; | ||
| display: flex; | ||
| font-family: family($theme-icon-list-counter-font-family); | ||
| font-size: size( | ||
| $theme-icon-list-counter-font-family, | ||
| $theme-icon-list-counter-font-size | ||
| ); | ||
| font-weight: font-weight("bold"); | ||
| height: units($theme-icon-list-counter-size); | ||
| left: 0; | ||
| line-height: lh($theme-icon-list-counter-font-family, 1); | ||
| margin-top: $half-of-font-size; | ||
| position: absolute; | ||
| width: units($theme-icon-list-counter-size); | ||
| } | ||
| padding-left: 0; | ||
| } | ||
|
|
||
| .usa-prose { | ||
| > .usa-icon-list { | ||
| padding-left: $theme-icon-list-counter-content-padding; | ||
| } | ||
| .usa-icon-list__icon { | ||
| float: left; | ||
| } | ||
|
|
||
| .usa-icon-list__heading { | ||
| color: color($theme-icon-list-heading-color); | ||
| font-family: family($theme-icon-list-heading-font-family); | ||
| font-size: size( | ||
| $theme-icon-list-heading-font-family, | ||
| $theme-icon-list-heading-font-size | ||
| ); | ||
| font-weight: font-weight("bold"); | ||
| margin: 0; | ||
| .usa-icon-list__content { | ||
| padding-left: units(6); | ||
| } | ||
|
|
||
| .usa-prose { | ||
| > .usa-icon-list { | ||
| padding-left: 0; | ||
| } | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.