-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into yalb-bugs-1311-1383-1480
- Loading branch information
Showing
36 changed files
with
665 additions
and
203 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
10 changes: 10 additions & 0 deletions
10
components/02-molecules/link-group/_yds-link-group--links.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,10 @@ | ||
{% set link_group__base_class = 'link-group' %} | ||
|
||
<li {{ bem('list-item', [], link_group__base_class) }}> | ||
{% include "@atoms/controls/text-link/yds-text-link.twig" with { | ||
link__content:link_group__link__content|default(link.link_group__link__content), | ||
link__url: link_group__link__url|default(link.link_group__link__url), | ||
link__blockname: link_group__base_class, | ||
link__style: 'no-underline', | ||
}%} | ||
</li> |
101 changes: 101 additions & 0 deletions
101
components/02-molecules/link-group/_yds-link-group.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,101 @@ | ||
@use '../../00-tokens/tokens'; | ||
@use '../../01-atoms/atoms'; | ||
|
||
$break-link-group: tokens.$break-m; | ||
$break-link-group-max: $break-link-group - 0.05; | ||
|
||
.link-group { | ||
.site-footer__columns-inner & { | ||
@media (max-width: $break-link-group-max) { | ||
grid-area: top; | ||
} | ||
} | ||
} | ||
|
||
.link-group__inner { | ||
--color-link-group-border: var(--color-gray-700); | ||
|
||
display: flex; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
|
||
@media (max-width: $break-link-group-max) { | ||
display: grid; | ||
grid-template: | ||
'header-one' | ||
'links-one' | ||
'header-two' | ||
'links-two' | ||
/ 1fr; | ||
} | ||
|
||
// if used in the footer, set border color to site-footer theme color | ||
.site-footer & { | ||
--color-link-group-border: var(--color-site-footer-border-color); | ||
} | ||
} | ||
|
||
.link-group__text { | ||
grid-area: header; | ||
} | ||
|
||
.link-group__heading { | ||
@include tokens.h6-mallory-compact-medium; | ||
|
||
border-left: var(--thickness-divider) solid var(--color-link-group-border); | ||
padding: 0 var(--size-spacing-6) var(--size-spacing-3); | ||
color: var(--color-site-footer-text-color); | ||
|
||
&--one { | ||
@media (max-width: $break-link-group-max) { | ||
grid-area: header-one; | ||
} | ||
|
||
// Needed if only one heading is present. Pushes down the second column. | ||
flex: 1 0 100%; | ||
} | ||
|
||
&--two { | ||
@media (max-width: $break-link-group-max) { | ||
grid-area: header-two; | ||
} | ||
} | ||
|
||
// If two headings, set basis to 50%; | ||
&--two-headings { | ||
flex: 1 0 50%; | ||
} | ||
} | ||
|
||
.link-group__links-column { | ||
@include atoms.list-reset; | ||
|
||
width: 100%; | ||
border-left: var(--thickness-divider) solid var(--color-link-group-border); | ||
margin-bottom: var(--size-spacing-7); | ||
|
||
&--one { | ||
@media (max-width: $break-link-group-max) { | ||
grid-area: links-one; | ||
} | ||
} | ||
|
||
&--two { | ||
@media (max-width: $break-link-group-max) { | ||
grid-area: links-two; | ||
} | ||
} | ||
|
||
@media (min-width: $break-link-group) { | ||
flex: 0 0 50%; | ||
} | ||
} | ||
|
||
.link-group__link { | ||
@include atoms.cta; | ||
|
||
display: block; | ||
text-align: left; | ||
line-height: 1.2; | ||
font-weight: var(--font-weights-mallory-book); | ||
} |
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,23 @@ | ||
import linkGroupTwig from './yds-link-group.twig'; | ||
|
||
import linkGroupData from './link-group.yml'; | ||
|
||
/** | ||
* Storybook Definition. | ||
*/ | ||
export default { | ||
title: 'Molecules/Link group', | ||
argTypes: { | ||
heading: { | ||
name: 'Heading', | ||
type: 'string', | ||
defaultValue: linkGroupData.link_group__heading, | ||
}, | ||
}, | ||
}; | ||
|
||
export const linkGroup = ({ heading }) => | ||
linkGroupTwig({ | ||
...linkGroupData, | ||
link_group__heading: heading, | ||
}); |
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,20 @@ | ||
link_group__heading_one: 'Heading for Link Group One' | ||
link_group__heading_two: 'Heading for Link Group Two' | ||
link_group__links_one: | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is a link' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is another link' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is a very long link that will wrap lines' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'Link #4' | ||
link_group__links_two: | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is a link' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is another link' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'This is a very long link that will wrap lines' | ||
- link_group__link__url: '#' | ||
link_group__link__content: 'Link #4' |
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,53 @@ | ||
{% set link_group__base_class = 'link-group' %} | ||
|
||
{% set link_column_modifiers = [] %} | ||
|
||
{% set link_group__attributes = { | ||
'class': bem(link_group__base_class), | ||
} %} | ||
|
||
{% if link_group__heading_one and link_group__heading_two %} | ||
{% set link_column_modifiers = link_column_modifiers|merge(['two-headings']) %} | ||
{% endif %} | ||
|
||
{# Set variable for all the links #} | ||
{% set link_group_columns %} | ||
{% if link_group__links_one %} | ||
<ul {{ bem('links-column', ['one'], link_group__base_class) }}> | ||
{% for link in link_group__links_one %} | ||
{% include "@molecules/link-group/_yds-link-group--links.twig" %} | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% if link_group__links_two %} | ||
<ul {{ bem('links-column', ['two'], link_group__base_class) }}> | ||
{% for link in link_group__links_two %} | ||
{% include "@molecules/link-group/_yds-link-group--links.twig" %} | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% endset %} | ||
|
||
<div {{ add_attributes(link_group__attributes) }}> | ||
<div {{ bem('inner', [], link_group__base_class) }}> | ||
{% if link_group__heading_one %} | ||
{% include "@atoms/typography/headings/yds-heading.twig" with { | ||
heading__level: '2', | ||
heading__blockname: link_group__base_class, | ||
heading: link_group__heading_one, | ||
heading__modifiers: link_column_modifiers|merge(['one']), | ||
} %} | ||
{% endif %} | ||
{% if link_group__heading_two %} | ||
{% include "@atoms/typography/headings/yds-heading.twig" with { | ||
heading__level: '2', | ||
heading__blockname: link_group__base_class, | ||
heading: link_group__heading_two, | ||
heading__modifiers: link_column_modifiers|merge(['two']), | ||
} %} | ||
{% endif %} | ||
{% block link_group__links %} | ||
{{link_group_columns}} | ||
{% endblock %} | ||
</div> | ||
</div> |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
} %} | ||
</section><br /> | ||
{% endfor %} | ||
</div> | ||
</div> |
Oops, something went wrong.