Skip to content
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

docs: add non-interactive icon and search guidance to contained list #4429

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 37 additions & 8 deletions src/pages/components/contained-list/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,19 @@ in a phrase and any proper nouns capitalized.

## Structure

| Element | Property | px / rem | Spacing token |
| --------------------------- | --------------------------- | -------- | ------------- |
| List header area: on-page | height | 32 / 2 | `$spacing-07` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| List header area: disclosed | height | 48 / 3 | `$spacing-09` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| List item | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| Icon (optional) | height, width | 16 / 1 | — |
| Element | Property | px / rem | Spacing token |
| ------------------------------- | --------------------------- | -------- | ------------- |
| List header area: on-page | height | 32 / 2 | `$spacing-07` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| List header area: disclosed | height | 48 / 3 | `$spacing-09` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| List item | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| Non-interactive icon (optional) | height, width | 16px | — |
| | padding left, padding-right | 16 / 1 | `$spacing-05` |
| Inline action icon (optional) | height, width | 16px | — |
| | padding left, padding-right | 16 / 1 | `$spacing-05` |
| Search icon (optional) | height, width | 16px | — |
| | padding left, padding-right | 16 / 1 | `$spacing-05` |

<div className="image--fixed">

Expand Down Expand Up @@ -171,6 +176,30 @@ in a phrase and any proper nouns capitalized.
Structure and spacing measurements for inline actions. | px / rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for non-interactive icons.](images/contained-list-decorative-icons-style.png)

</div>

<Caption>
Structure and spacing measurements for non-interactive icons. | px / rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for search and filtering.](images/contained-list-search-style.png)

</div>

<Caption>
Structure and spacing measurements for search and filtering. | px / rem
</Caption>

## Size

### On-page list
Expand Down
29 changes: 25 additions & 4 deletions src/pages/components/contained-list/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ and optional interactive elements.
</Row>

1. **List header area:** Area to group the succeeding list items.
2. **List title:** Descriptive name for the group of list items.
3. **List item:** The content with in a list item row.
4. **Interactive element** (optional): An interactive element in the header or
row such as a button, link, icon, or toggle.
2. **List item area:** Area to group text and elements in a list row.
3. **List title:** Descriptive name for the group of list items.
4. **List item:** The content in a list item row.
5. **Non-interactive icon (optional):** A decorative icon to help visually
describe a list item.
6. **Search icon (optional):** An icon to represent search or filtering
functionality in the contained list.
7. **Interactive element (optional):** An interactive element in the header or
row such as a button, link, icon, tag, or toggle.

### Alignment

Expand Down Expand Up @@ -334,6 +339,22 @@ multiple column headers, we recommend using a data table instead.
</Column>
</Row>

### Non-interactive icons

Contained lists can have non-interactive icons positioned before the text in
each row to help visually describe the list item, category, or status. These
icons are decorative elements and are used for visual purposes only. Icons
should typically be the same color as the text in the row unless they are status
indicators.

<Row>
<Column colLg={8}>

![Contained list non-interactive icons](images/contained-list-non-interactive-icons-usage.png)

</Column>
</Row>

### Search and filtering

Contained lists can include a search or filter functionality. The search or
Expand Down
Loading