-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix backdrop flashing on page load * Fix all file names to be what the CSS expects to prevent 404s. * Jump nav: Allow empty list. * Fixing color contrast ratios * Datefinder conditionals (#153) * Conditionally include portions of datefinder. * Adjust indentation. * Test list element * Updating tile component * Card variant needs to be passed in order to work. (#160) * Image rendering option needs to be in the image object. (#159) * Fixing read more icon * Fixing wrapping header and line heights for accordions * Action list component (#161) * Refactor link-button. * Action list component. * Fix code style. Co-authored-by: Marcin Jędras <[email protected]> Co-authored-by: Jacine Luisi <[email protected]> Co-authored-by: zakiya <[email protected]>
- Loading branch information
1 parent
d3682e9
commit 5f91b0a
Showing
43 changed files
with
446 additions
and
136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
text: 'Click me!' | ||
url: "#" | ||
style: 'primary' | ||
link_button: | ||
text: 'Click me!' | ||
url: "#" | ||
style: 'primary' |
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,7 +1,9 @@ | ||
{% if patternlab %} | ||
{% set renderer = image.renderer|default(patternlab) %} | ||
|
||
{% if renderer == 'patternlab' %} | ||
{% if image.src %} | ||
<img src="{{- image.src -}}"{% if image.alt %} alt="{{ image.alt }}"{% endif %} /> | ||
{% endif %} | ||
{% else %} | ||
{{ image }} | ||
{% endif %} | ||
{% endif %} |
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
76 changes: 76 additions & 0 deletions
76
source/_patterns/02-molecules/blocks/action-list/_action-list.scss
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,76 @@ | ||
.jcc-action-list { | ||
&, | ||
.usa-prose > & { | ||
@include add-list-reset; | ||
@include u-border-top(1px); | ||
@include u-border-top(base-light); | ||
|
||
[class*="has-background-color--dark"] & { | ||
@include u-border-top(secondary-dark); | ||
} | ||
} | ||
|
||
@include at-media(tablet) { | ||
@supports (display: grid) { | ||
display: grid; | ||
grid-template-columns: 1fr max-content; | ||
grid-template-areas: "content button"; | ||
} | ||
} | ||
|
||
li { | ||
@include u-margin-bottom(3); | ||
@include at-media(tablet) { | ||
@include grid-row; | ||
|
||
@supports (display: grid) { | ||
display: contents; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.jcc-action-list__content, | ||
.jcc-action-list__action { | ||
@include u-width(full); | ||
@include u-padding-top(3); | ||
} | ||
|
||
.jcc-action-list__content { | ||
@include at-media(tablet) { | ||
@include u-padding-bottom(3); | ||
@include u-padding-right(1); | ||
@include u-border-bottom(base-light); | ||
@include u-border-bottom(1px); | ||
@include grid-col(9); | ||
|
||
[class*="has-background-color--dark"] & { | ||
@include u-border-bottom(secondary-dark); | ||
} | ||
|
||
@supports (display: grid) { | ||
@include grid-col-reset; | ||
@include u-padding-right(1); | ||
grid-column: content; | ||
} | ||
} | ||
} | ||
|
||
.jcc-action-list__action { | ||
@include u-border-bottom(base-light); | ||
@include u-border-bottom(1px); | ||
@include u-padding-bottom(3); | ||
|
||
[class*="has-background-color--dark"] & { | ||
@include u-border-bottom(secondary-dark); | ||
} | ||
|
||
@include at-media(tablet) { | ||
@include grid-col(3); | ||
|
||
@supports (display: grid) { | ||
@include grid-col-reset; | ||
grid-column: button; | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
source/_patterns/02-molecules/blocks/action-list/action-list.twig
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,33 @@ | ||
{% if action_list.items|length > 0 %} | ||
<ul class="jcc-action-list"{% if id %} id="{{ id }}"{% endif %}> | ||
|
||
{% for item in action_list.items %} | ||
<li class="jcc-action-list__item"> | ||
<div class="jcc-action-list__content"> | ||
{% if item.title %} | ||
<p><strong>{{ item.title }}</strong></p> | ||
{% endif %} | ||
|
||
{% if item.description %} | ||
<p>{{ item.description }}</p> | ||
{% endif %} | ||
</div> | ||
|
||
{% if item.button %} | ||
<div class="jcc-action-list__action"> | ||
|
||
{# Use 'secondary' button style, unless explicitly provided. #} | ||
{% set button = item.button|merge({ | ||
style: item.button.style|default('secondary') | ||
}) %} | ||
|
||
{% include "@atoms/buttons/link-button.twig" with { | ||
link_button: button | ||
} only %} | ||
</div> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
|
||
</ul> | ||
{% endif %} |
18 changes: 18 additions & 0 deletions
18
source/_patterns/02-molecules/blocks/action-list/action-list.yml
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,18 @@ | ||
action_list: | ||
items: | ||
- title: "First brief sentence describing the action" | ||
description: "One to two sentences providing addition details about the action link." | ||
button: | ||
text: "Click 1" | ||
url: "#" | ||
style: 'primary' | ||
- title: "Second brief sentence describing the action" | ||
description: "One to two sentences providing addition details about the action link." | ||
button: | ||
text: "Click 2 longer" | ||
url: "#" | ||
- title: "Third brief sentence describing the action" | ||
description: "One to two sentences providing addition details about the action link." | ||
button: | ||
text: "Click 3" | ||
url: "#" |
Oops, something went wrong.