-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10350 from department-of-veterans-affairs/doc-jw-…
…design-system-radio-button Add radio button documentation to doc site
- Loading branch information
Showing
17 changed files
with
59 additions
and
257 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
VAMobile/documentation/design/Components/Selection and input/RadioButton.md
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,37 @@ | ||
--- | ||
title: Radio button | ||
--- | ||
|
||
Radio buttons allow users to select exactly one choice from a group. | ||
|
||
## Examples | ||
|
||
### Default | ||
**Open in**: [Storybook](https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/docs/radio-button--default) | [Figma](https://www.figma.com/design/Zzt8z60hCtdEzXx2GFWghH/%F0%9F%93%90-Component-Library---Design-System---VA-Mobile?node-id=6703-12221&t=Dj0bTSPSPnEJEFCa-4) | ||
<iframe width="620" height="500" title="Image of component in Storybook" src="https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/story/radio-button--default&full=1&shortcuts=false&singleStory=true" allowfullscreen></iframe> | ||
|
||
### Tile | ||
**Open in**: [Storybook](https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/docs/radio-button--tile) | [Figma](https://www.figma.com/design/Zzt8z60hCtdEzXx2GFWghH/%F0%9F%93%90-Component-Library---Design-System---VA-Mobile?node-id=6703-12221&t=Dj0bTSPSPnEJEFCa-4) | ||
<iframe width="620" height="500" title="Image of component in Storybook" src="https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/story/radio-button--tile&full=1&shortcuts=false&singleStory=true" allowfullscreen></iframe> | ||
|
||
### Error | ||
**Open in**: [Storybook](https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/docs/radio-button--error) | [Figma](https://www.figma.com/design/Zzt8z60hCtdEzXx2GFWghH/%F0%9F%93%90-Component-Library---Design-System---VA-Mobile?node-id=6703-12221&t=Dj0bTSPSPnEJEFCa-4) | ||
<iframe width="620" height="500" title="Image of component in Storybook" src="https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/story/radio-button--error&full=1&shortcuts=false&singleStory=true" allowfullscreen></iframe> | ||
|
||
## Usage | ||
[Refer to the VA Design System for usage guidance](https://design.va.gov/components/form/radio-button) | ||
|
||
## Code usage | ||
[Open Storybook](https://department-of-veterans-affairs.github.io/va-mobile-library/?path=/docs/radio-button--docs) | ||
|
||
## Content considerations | ||
* Refer to the [VA Design System for content considerations](https://design.va.gov/components/form/radio-button#content-considerations) | ||
|
||
## Accessibility considerations | ||
* Refer to the [VA Design System for accessibility considerations](https://design.va.gov/components/form/radio-button#accessibility-considerations) | ||
* Screenreaders should announce the name, role, and state of each radio button. | ||
|
||
## Related | ||
* [Radio button - VA Design System](https://design.va.gov/components/form/radio-button) | ||
* [Radio buttons - USWDS](https://designsystem.digital.gov/components/radio-buttons/) | ||
* [Radio button - Material Design](https://m3.material.io/components/radio-button/overview) |
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
5 changes: 0 additions & 5 deletions
5
VAMobile/documentation/docs/Flagship design library/Foundation/Icons/_category_.json
This file was deleted.
Oops, something went wrong.
Empty file removed
0
...ocumentation/docs/Flagship design library/Foundation/Icons/_iconPathSection.mdx
Empty file.
18 changes: 0 additions & 18 deletions
18
...le/documentation/docs/Flagship design library/Foundation/Icons/checkboxIcons.md
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
...bile/documentation/docs/Flagship design library/Foundation/Icons/commonIcons.md
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
VAMobile/documentation/docs/Flagship design library/Foundation/Icons/index.md
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
VAMobile/documentation/docs/Flagship design library/Foundation/Icons/linksIcons.md
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...le/documentation/docs/Flagship design library/Foundation/Icons/radioBtnIcons.md
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...ile/documentation/docs/Flagship design library/Foundation/Icons/webviewIcons.md
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
VAMobile/documentation/docs/Flagship design library/Foundation/color-palette.md
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
VAMobile/documentation/docs/Flagship design library/Foundation/color.md
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,6 @@ | ||
--- | ||
title: Color | ||
sidebar_position: 2 | ||
--- | ||
|
||
See documentation in [Design System](/va-mobile-app/design/Foundation/Design%20tokens/Color). |
6 changes: 6 additions & 0 deletions
6
VAMobile/documentation/docs/Flagship design library/Foundation/icons.md
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,6 @@ | ||
--- | ||
title: Icons | ||
sidebar_position: 5 | ||
--- | ||
|
||
See documentation in [Design System](/va-mobile-app/design/Foundation/Icons). |
8 changes: 0 additions & 8 deletions
8
VAMobile/documentation/docs/Flagship design library/Foundation/layout.md
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
VAMobile/documentation/docs/Flagship design library/Foundation/spacing.md
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,6 @@ | ||
--- | ||
title: Spacing | ||
sidebar_position: 4 | ||
--- | ||
|
||
See documentation in [Design System](/va-mobile-app/design/Foundation/Design%20tokens/Spacing). |
68 changes: 2 additions & 66 deletions
68
VAMobile/documentation/docs/Flagship design library/Foundation/typography.md
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,70 +1,6 @@ | ||
--- | ||
title: Typography | ||
sidebar_position: 5 | ||
sidebar_position: 3 | ||
--- | ||
|
||
Typography generally follows [VA.gov’s guidance](https://design.va.gov/foundation/typography) with some adjustments. | ||
|
||
* The mobile app doesn’t use CSS pixel measurements to define font sizes. Instead, we use points (PT) on iOS and density-independent pixels (DP) on Android. This allows our fonts to scale appropriately for all screen densities across devices. Below are resources that describe this in more detail: | ||
* [Guidance from W3C](https://w3c.github.io/wcag2ict/#guidance-when-applying-css-pixel-to-non-web-documents-and-software) | ||
* [Fonts in mobile apps for developers](https://www.skoumal.com/en/fonts-in-mobile-apps-for-developers/) | ||
* [Mobile design 101: pixels, points and resolutions](https://medium.com/@fluidui/mobile-design-101-pixels-points-and-resolutions-f60413035243) | ||
* With native and OS specific components, we utilize OS defined typography. | ||
|
||
<!-- <table> | ||
<caption>Mobile app typography styles</caption> | ||
<tr> | ||
<th>Use</th> | ||
<th>Font</th> | ||
<th>Font Size</th> | ||
<th>Line Height</th> | ||
<th>Style</th> | ||
</tr> | ||
<tr> | ||
<td>Heading</td> | ||
<td>Bitter Bold</td> | ||
<td>24px</td> | ||
<td>30px</td> | ||
<td>N/A</td> | ||
</tr> | ||
<tr> | ||
<td>Mobile Body</td> | ||
<td>Source Sans Pro Regular</td> | ||
<td>20px</td> | ||
<td>30px</td> | ||
<td>N/A</td> | ||
</tr> | ||
<tr> | ||
<td>Mobile Body Bold</td> | ||
<td>Source Sans Pro Bold</td> | ||
<td>20px</td> | ||
<td>20px</td> | ||
<td>N/A</td> | ||
</tr> | ||
<tr> | ||
<td>Mobile Body Link</td> | ||
<td>Source Sans Pro Regular</td> | ||
<td>20px</td> | ||
<td>30px</td> | ||
<td>Underline</td> | ||
</tr> | ||
<tr> | ||
<td>Mobile Body Required</td> | ||
<td>Source Sans Pro Regular</td> | ||
<td>20px</td> | ||
<td>30px</td> | ||
<td>Asterisk before text</td> | ||
</tr> | ||
<tr> | ||
<td>Helper Text</td> | ||
<td>Source Sans Pro Regular</td> | ||
<td>16px</td> | ||
<td>22px</td> | ||
<td>N/A</td> | ||
</tr> | ||
</table> --> | ||
|
||
<iframe width="550" height="500" title="Flagship library typography" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FQVLPB3eOunmKrgQOuOt0SU%2F%25F0%259F%2593%2590-DesignLibrary2.0---VAMobile%3Ftype%3Ddesign%26node-id%3D3859%253A7737%26t%3DLWuS4oyNuplsuZBa-1" allowfullscreen></iframe> | ||
|
||
## Front-end | ||
To support the common usage of colors for each font style, defaults colors have been set for each type of font under `src/styles/themes/standardTheme.ts`(See `buildTypography` function). Colors for each font style are based on the [Design Tokens - Design Library](https://www.figma.com/file/bGO6g5cCvWycrNjoK66PXc/%F0%9F%93%90-DesignTokens1.0---Library---VAMobile?node-id=115%3A157&t=RpifEcByzqSp4on7-1) file. | ||
See documentation in [Design System](/va-mobile-app/design/Foundation/Design%20tokens/Typography). |