-
Notifications
You must be signed in to change notification settings - Fork 31
DP-4176 Service page documentation #521
Changes from 172 commits
019005e
7e08d04
fb62369
ffc83a1
41cbd1c
5576165
5252623
2199e94
5155a97
ffbf270
a332c9e
aa388a8
aacc49d
bc04ffa
010273a
e27dd2d
1812d9d
5321706
22578ed
7c8c04e
89a2ef7
ad648ef
330c301
a6b8eea
2757e2c
c31de50
4934d9a
2db7592
d2d1f39
4dcb5bb
31b4872
e29f591
bc8beca
9287cb4
68f1f44
f1c9aa9
f3e8818
c1b2864
ccf17c0
d6323d5
d6d9ff5
6b9c7fd
830aab5
d0afcfa
c0f8dc6
355ee8f
63d4393
e480243
697a8ae
51335a1
47df5cb
715bb99
90c1124
dd9038a
eedad80
4066e7e
98718d7
8e3b38a
e3192f3
5ad608e
204b093
6a6263b
8662b1f
c667e7f
56f7c30
5fa898a
232296f
700b3b7
c77e3cc
0a1664a
ad16e9c
17c18f3
8015c8e
8edde43
e0f7206
31957c7
5c713e5
06aeea9
b06e445
6f5ab99
e6c68ed
031b2bc
cfd5087
f0db750
f3e6dd7
1011eb3
34e5e46
58beead
72ade22
355c572
cef2d8b
348c13a
4c7c21b
593d82b
842c6b8
b29c177
51903e8
f508b57
d9b7300
3f539d5
fb8b7a8
96f34ba
c042dd5
4d7c86d
29c26e7
abda85f
ca4388e
243f6d6
a32f1fa
7fd162e
95c4718
bc00f70
c16a4f8
0b14948
8e00148
dc368dc
d4fdd8c
aacbec8
d502a2a
b14b397
7188b15
fc1ef06
88c9f3a
c4153c0
62df2ad
777bdc8
11a653f
9c9fcc9
6232107
0491c0d
b5f0c0c
605e552
52a2333
93a7197
4014afd
2eaedcc
0f9eb44
7c32634
eca96ed
830110c
d0b777f
d764475
5b11ef6
9530661
f125c5b
d89380a
65d480d
42b931a
c9a805f
7d7d621
04492cc
b5e1b33
1b8b99d
1cc4d8b
58eed5c
6aff0fb
5a46115
e0cb1e5
f508347
cf3741b
df0a2d0
ce4c461
5403625
3639b3c
106f2b6
71f7096
e4742b1
4ebb61f
b3eab14
49df990
39c93d3
c730918
c38094f
c385a23
1fe9c27
3ee70c6
cf02035
b532c65
baac8de
ef3a1a0
5ea0b24
bb73be8
e485671
1117e5e
05bcc1d
2b055fb
1cefde3
9e7ac8d
1927def
6040180
30362b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Description | ||
This is a variant of the [Button](./?p=atoms-button) pattern showing an example in gray. | ||
|
||
### How to generate | ||
* set the 'color' variable to 'gray' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Description | ||
This is a variant of the [Button](./?p=atoms-button) pattern showing a small button example in green with an outline. | ||
|
||
### How to generate | ||
* set the 'color' variable to 'green' | ||
* set the 'outline' variable to true | ||
* set the 'size' variable to 'small' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Description | ||
This is a variant of the [Button](./?p=atoms-button) pattern showing an example using a link instead of a button. | ||
|
||
### How to generate | ||
* Populate the 'href' variable |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Description | ||
This is a variant of the [Button](./?p=atoms-button) pattern showing an example styled as an outline. | ||
|
||
### How to generate | ||
* set the 'outline' variable to true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Description | ||
This is a variant of the [Button](./?p=atoms-button) pattern showing an example of a small button. | ||
|
||
### How to generate | ||
* set the 'size' variable to 'small' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
--- | ||
title: Button Search | ||
--- | ||
Description: A `<button> [type='submit']` element which contains a visually hidden `<span>` element and an `<svg>` icon element. | ||
### Description | ||
A Button used for keyword search. | ||
|
||
## State: ALPHA | ||
### Used In: | ||
- [@molecules/header-search](/?p=molecules-header-search) | ||
- [@molecules/keyword-search](/?p=molecules-keyword-search) | ||
### Status | ||
* Stable as of 5.0.0 | ||
|
||
### Contains: | ||
- [@atoms/05-icons/svg-search.twig](/?p=atoms-svg-search) | ||
|
||
### Required Variables: | ||
### Variables | ||
~~~ | ||
buttonSearch { | ||
text: | ||
type: string/required | ||
buttonSearch: { | ||
text: | ||
type: string / required | ||
} | ||
~~~ | ||
|
||
~~~ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "", | ||
"info": "", | ||
"text": "Button", | ||
"type": "button", | ||
"size": "", | ||
"theme": "", | ||
"color": "", | ||
"outline": false | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
--- | ||
title: Button | ||
--- | ||
Description: A `<button>` element styled solid or outline and regular or small size | ||
### Description | ||
This is the standard button pattern | ||
|
||
## State: ALPHA | ||
### Status | ||
* Stable as of 6.0.0 | ||
|
||
### Notes: | ||
- 'theme' eventually needs to be changed to 'color' and used as a modifier class (--color) | ||
### Variant options | ||
* Using a [link](./?p=atoms-button-as-link) instead of a button | ||
* [small](./?p=atoms-button-as-small) | ||
* [outline](./?p=atoms-button-as-outline) | ||
* [gray](./?p=atoms-button-as-alt-color) color | ||
* [green with an outline](./?p=atoms-button-as-alt-color) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above: Should this be |
||
|
||
### Used In: | ||
|
||
### Variables: | ||
### Variables | ||
~~~ | ||
buttonMain { | ||
button: { | ||
href: | ||
type: string (url) / optional | ||
info: | ||
type: string / optional | ||
text: | ||
type: string / required | ||
type: | ||
type: string / optional (ex: "button", "submit") | ||
size: | ||
type: string / optional ("" or "small") | ||
theme: | ||
type: string / optional ("" or "alt") | ||
color: | ||
type: string / optional ("" or "gray") | ||
outline: | ||
type: boolean | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
{% set buttonClassSize = button.size ? "ma__button--" ~ button.size : "" %} | ||
{% set buttonClass = "ma__button" %} | ||
{% set buttonSize = button.size ? "ma__button--" ~ button.size : "" %} | ||
|
||
{% if button.outline %} | ||
{% set buttonClass = buttonClass ~ "-minor" %} | ||
{% endif %} | ||
{% set buttonStyle = button.outline ? "ma__button--minor" : "" %} | ||
|
||
{% if button.theme %} | ||
{% set buttonClass = buttonClass ~ "-" ~ button.theme %} | ||
{% endif %} | ||
{# Depreciated after version 5.0 #} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice 👍 |
||
{% set buttonColor = button.theme ? "ma__button--" ~ button.theme %} | ||
|
||
<button type="{{ button.type }}" class="{{ buttonClass }} {{ buttonClassSize }}">{{ button.text }}</button> | ||
{% set buttonColor = button.color ? "ma__button--" ~ button.color %} | ||
|
||
{% if button.href %} | ||
<a | ||
href="{{ button.href }}" | ||
class="ma__button {{ buttonSize }} {{buttonColor}} {{buttonStyle}}" | ||
title="{{ button.info }}"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious as to the motivation behind using the title attribute here vs a visually hidden span? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Title is designed for this purpose so why not use it over doing a hack with a hidden span tag. Also using the attribute allows you to pass a string that doesn't have to be an extension of the button's text. "view more" + "about this thing" can instead be "click here to read more about this thing" |
||
{{ button.text }} | ||
</a> | ||
{% else %} | ||
<button type="{{ button.type }}" class="ma__button {{ buttonSize }} {{buttonColor}} {{buttonStyle}}" aria-label="{{ button.info }}">{{ button.text }}</button> | ||
{% endif %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "", | ||
"info": "", | ||
"text": "Button", | ||
"type": "button", | ||
"size": "", | ||
"theme": "alt", | ||
"color": "gray", | ||
"outline": false | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "", | ||
"info": "", | ||
"text": "Button", | ||
"type": "button", | ||
"size": "small", | ||
"color": "green", | ||
"outline": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "#", | ||
"info": "", | ||
"text": "Button", | ||
"type": "", | ||
"size": "", | ||
"color": "", | ||
"outline": false | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "", | ||
"info": "", | ||
"text": "Button", | ||
"type": "button", | ||
"size": "", | ||
"theme": "", | ||
"color": "", | ||
"outline": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"button": { | ||
"href": "", | ||
"info": "", | ||
"text": "Button", | ||
"type": "button", | ||
"size": "small", | ||
"theme": "", | ||
"color": "", | ||
"outline": false | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
--- | ||
title: Comp Heading Centered | ||
--- | ||
Description: Centered Variant of Comp Heading. | ||
### Description | ||
This is a variant of the [Comp Heading](./?p=atoms-comp-heading) showing an example with a centered underline. | ||
|
||
### Notes | ||
- _centered variable is set to 'true'_ | ||
|
||
### Base | ||
- [@atoms/04-headings/comp-heading](/?p=atoms-comp-heading) | ||
### How to generate | ||
* Set the 'centered' variable equal to boolean value true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
--- | ||
title: Comp Subheading | ||
--- | ||
Description: Subheading Variant of Comp Heading. | ||
### Description | ||
This is a variant of the [Comp Heading](./?p=atoms-comp-heading) showing an example as a sub heading (H3). | ||
|
||
### Notes | ||
- _sub variable is set to 'true'_ | ||
|
||
### Base | ||
- [@atoms/04-headings/comp-heading](/?p=atoms-comp-heading) | ||
### How to generate | ||
* Set the 'sub' variable equal to the boolean value true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
--- | ||
title: Comp Heading Yellow | ||
--- | ||
Description: Yellow Variant of Comp Heading. | ||
### Description | ||
This is a variant of the [Comp Heading](./?p=atoms-comp-heading) showing an example with a yellow underline. | ||
|
||
### Notes: | ||
- _color variable is set to 'yellow'_ | ||
|
||
### Base | ||
- [@atoms/04-headings/comp-heading](/?p=atoms-comp-heading) | ||
### How to generate | ||
* Set the 'color' variable equal to "yellow" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"compHeading": { | ||
"title": "Employment", | ||
"title": "Title text", | ||
"sub": "", | ||
"color": "", | ||
"id": "employment", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth updating the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The id value doesn't have to match the title value. Id could be GUID89173489 instead which would actually be better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd still be in favor of updating the id to something like GUID9827924. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,26 @@ | ||
--- | ||
title: Comp Heading | ||
--- | ||
Description: An `<h2>` or `<h3>` element with a styled underline color designated by its CSS class. | ||
### Description | ||
An `<h2>` element with a styled underline color | ||
|
||
## State: ALPHA | ||
### Status | ||
* Stable as of 5.0.0 | ||
|
||
### Notes: | ||
### Variant options | ||
* [Sub Heading](./?p=atoms-comp-heading-subheading) by setting 'sub' to true. | ||
* [Centered](./?p=atoms-comp-heading-centered) by setting 'centered' to true | ||
* [Yelllow Underline](./?p=atoms-comp-heading-yellow) by setting 'color' to "yellow" | ||
|
||
|
||
### Used In: | ||
- [@molecules/action-section](/?p=molecules-action-section) | ||
- [@organisms/by-author/key-actions](/?p=organisms-key-actions) | ||
- [@organisms/by-author/helpful-links](/?p=organisms-helpful-links) | ||
- [@organisms/by-author/form-download](/?p=organisms-form-download) | ||
- [@organisms/by-author/multi-row-section](/?p=organisms-multi-row-section) | ||
|
||
### Variables: | ||
### Variables | ||
~~~ | ||
compHeading: { | ||
title: | ||
type: string / required | ||
sub: | ||
type: string ("true" || "" ) | ||
type: string ("true" || "" ) / optional | ||
color: | ||
type: string ("yellow") | ||
type: string ("yellow") / optional | ||
id: | ||
type: string | ||
type: string (unique per page) / optional | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unique per page - 👍 |
||
centered: | ||
type: boolean | ||
} | ||
~~~ | ||
|
||
### Variations | ||
- [@atoms/04-headings/comp-heading](/?p=atoms-comp-heading) | ||
- [@atoms/04-headings/comp-heading-subheading](/?p=atoms-comp-heading-subheading) | ||
- [@atoms/04-headings/comp-heading-yellow](/?p=atoms-comp-heading-yellow) | ||
- [@atoms/04-headings/comp-heading-centered](/?p=atoms-comp-heading-centered) |
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.
Should this be
button-as-alt-color
orbutton-as-gray
? (the link doesn't actually work for me locally) I actually kind of like the non-color variable names so that if we ever decided to change colors schemes, we don't have to rename patterns. What do you think?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.
I fixed the links in a later PR so I'll cherry pick them into this PR.
We can't really use 'alt' anymore since we have the green and gray alternatives. I could write them as --secondary (green) and --tertiary (gray)
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.
I went with 'quaternary' for gray, because that match the color themes for the site. 'tertiary' is currently yellow so I wrote the CSS to support this, but didn't add it as a variant.