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: contained-list #3145

Merged
merged 37 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
427f8d6
add new mdx pages
laurenmrice Sep 12, 2022
c2b9c8c
add images for usage tab
laurenmrice Sep 12, 2022
0428b55
fix content
laurenmrice Sep 12, 2022
efd6567
fix typos
laurenmrice Sep 12, 2022
c20f9d5
update content
laurenmrice Sep 12, 2022
628db0b
update headers
laurenmrice Sep 12, 2022
41fa89c
Update src/pages/components/contained-list/usage.mdx
laurenmrice Sep 12, 2022
fa909df
Update src/pages/components/contained-list/usage.mdx
laurenmrice Sep 12, 2022
8fef075
Update src/pages/components/contained-list/usage.mdx
laurenmrice Sep 12, 2022
2242e84
Update src/pages/components/contained-list/usage.mdx
laurenmrice Sep 12, 2022
21a21ee
Update src/pages/components/contained-list/usage.mdx
laurenmrice Sep 12, 2022
168a578
add in inline notification
laurenmrice Sep 12, 2022
f1dd71e
fix images
laurenmrice Sep 12, 2022
2b836c1
update side nav
laurenmrice Sep 13, 2022
6cbbd78
update images
laurenmrice Sep 13, 2022
a30452f
add Mike A feedback
laurenmrice Sep 13, 2022
2e77503
add code, accessibility, and style tab content
laurenmrice Sep 13, 2022
2d2a235
add style tab images
laurenmrice Sep 13, 2022
b4cce60
rename tab
laurenmrice Sep 14, 2022
75f0a69
fix style images
laurenmrice Sep 14, 2022
911e9cc
update style content
laurenmrice Sep 14, 2022
97b01a5
update from Jan
laurenmrice Sep 14, 2022
5826ad0
stlye image update
laurenmrice Sep 14, 2022
6f989bf
Merge branch 'main' into contained-list-docs
laurenmrice Sep 14, 2022
bf39a7c
update break
laurenmrice Sep 14, 2022
01125dc
Update src/pages/components/contained-list/style.mdx
laurenmrice Sep 15, 2022
ba5b887
Update src/pages/components/contained-list/style.mdx
laurenmrice Sep 15, 2022
909a334
update style and usage content
laurenmrice Sep 15, 2022
8d2df8b
update style and usage images
laurenmrice Sep 15, 2022
bcd21da
update image bug
laurenmrice Sep 15, 2022
289ab53
insert break
laurenmrice Sep 15, 2022
dbe3aa3
update structure content
laurenmrice Sep 15, 2022
4f1db73
update style images
laurenmrice Sep 15, 2022
abf8271
update image
laurenmrice Sep 15, 2022
cbaf07a
update style tab
laurenmrice Sep 15, 2022
6e17851
style tab updates
laurenmrice Sep 15, 2022
447bece
Merge branch 'main' into contained-list-docs
kodiakhq[bot] Sep 16, 2022
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
2 changes: 2 additions & 0 deletions src/data/nav-items.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
path: /components/checkbox/usage/
- title: Code snippet
path: /components/code-snippet/usage/
- title: Contained list
path: /components/contained-list/usage/
- title: Content switcher
path: /components/content-switcher/usage/
- title: Data table
Expand Down
26 changes: 26 additions & 0 deletions src/pages/components/contained-list/accessibility.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Contained list
description:
Contained lists group content that is similar or related and can contain
read-only or interactive information.
tabs: ['Usage', 'Style', 'Code', 'Accessibility']
---

<PageDescription>

Design annotations are needed for specific instances shown below, but for the
standard accordion component, Carbon already incorporates accessibility.

</PageDescription>

<InlineNotification>

This page is underdevelopment. Please check back later for updates.

</InlineNotification>

<AnchorLinks>
<AnchorLink>What Carbon provides</AnchorLink>
<AnchorLink>Design recommendations</AnchorLink>
<AnchorLink>Development considerations</AnchorLink>
</AnchorLinks>
32 changes: 32 additions & 0 deletions src/pages/components/contained-list/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Contained list
description:
Contained lists group content that is similar or related and can contain
read-only or interactive information.
tabs: ['Usage', 'Style', 'Code', 'Accessibility']
---

<PageDescription>

Preview the contained list component with the React live demo. For detailed code
usage documentation, see the Storybooks for each framework below.

</PageDescription>

## Documentation

<InlineNotification>

**Coming soon:** The storybook code for contained list is underdevelopment and
will be available soon.

</InlineNotification>

## Live demo

<InlineNotification>

**Coming soon:** The live demo for contained list is underdevelopment and will
be available soon.

</InlineNotification>
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
153 changes: 153 additions & 0 deletions src/pages/components/contained-list/style.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
title: Contained list
description:
Contained lists group content that is similar or related and can contain
read-only or interactive information.
tabs: ['Usage', 'Style', 'Code', 'Accessibility']
---

## Color

| Element | Property | Color token |
| ---------------- | ---------------- | ------------------ |
| Title: on page | text color | `$text-primary` |
| | background-color | `$background` |
| Title: disclosed | text color | `$text-secondary` |
| | background-color | `$layer`\* |
| Item | text color | `$text-primary` |
| | background-color | transparent |
| Icon (optional) | svg | `$icon-primary` |
| Row divider | border-bottom | `$border-subtle`\* |

<Caption>
* Denotes a contextual color token that will change values based on the layer
it is placed on.
</Caption>

<Row>
<Column colLg={8}>

![Enabled states for contained list variants](images/contained-list-style-1.png)

</Column>
</Row>

<Caption>Example of enabled states for contained list variants.</Caption>

### Interactive states

| Element | Property | Color token |
| -------- | ---------------- | ------------------ |
| Hover | background-color | `$layer-hover`\* |
| Focus | border | `$focus` |
| Active | background-color | `$layer-active`\* |
| Disabled | text color | `$text-disabled` |
| | border | `$border-disabled` |

<Caption>
* Denotes a contextual color token that will change values based on the layer
it is placed on.
</Caption>

<Row>
<Column colLg={12}>

![States for contained list item rows](images/contained-list-style-2.png)

</Column>
</Row>

<Caption>Example of states for contained list item rows.</Caption>

<br />

<Row>
<Column colLg={12}>

![States for contained list inline actions](images/contained-list-style-3.png)

</Column>
</Row>

<Caption>Example of states for contained list inline actions.</Caption>

## Typography

All contained list text should be set in sentence case, with only the first word
in a phrase and any proper nouns capitalized.

| Element | Font-size (px/rem) | Font-weight | Type token |
| ---------------- | ------------------ | -------------- | --------------------- |
| Title: on page | 14 / 0.875 | SemiBold / 600 | `$heading-compact-01` |
| Title: disclosed | 12 / 0.75 | Regular / 400 | `$label-01` |
| Item | 14 / 0.875 | Regular / 400 | `$body-01` |

## Structure

| Element | Property | px / rem | Spacing token |
| ----------------- | --------------------------- | -------- | ------------- |
| Header: on page | height | 32 / 2 | `$spacing-07` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| Header: disclosed | height | 48 / 3 | `$spacing-09` |
| | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| Item | padding-left, padding-right | 16 / 1 | `$spacing-05` |
| Icon (optional) | height, width | 16 / 1 | — |

<div className="image--fixed">

![Structure and spacing measurements for the on page list variant.](images/contained-list-style-4.png)

</div>

<Caption>
Structure and spacing measurements for the on page list variant. | px / rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for the disclosed list variant.](images/contained-list-style-5.png)

</div>

<Caption>
Structure and spacing measurements for the disclosed list variant. | px / rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for height and width of row content.](images/contained-list-style-6.png)

</div>

<Caption>
Structure and spacing measurements for height and width of row content. | px /
rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for padding and rule alignment.](images/contained-list-style-7.png)

</div>

<Caption>
Structure and spacing measurements for padding and rule alignment. | px / rem
</Caption>

<br />

<div className="image--fixed">

![Structure and spacing measurements for inline actions.](images/contained-list-style-8.png)

</div>

<Caption>
Structure and spacing measurements for inline actions. | px / rem
</Caption>
Loading