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

fix(list-item): Reserve space for empty open lists. #8239

Merged
merged 5 commits into from
Nov 21, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,8 @@ td:focus {
@apply border-solid border-0 border-t border-color-3;
}

::slotted(calcite-list:empty) {
@apply py-3;
}

@include base-component();
37 changes: 37 additions & 0 deletions packages/calcite-components/src/components/list/list.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,43 @@ export const sortableNestedList_TestOnly = (): string => html`<calcite-list
<calcite-list-item label="Hi! 7" description="hello world"></calcite-list-item>
</calcite-list>`;

export const emptyOpenLists_TestOnly = (): string => html`<calcite-list
drag-enabled
group="nested"
label="test"
selection-mode="multiple"
>
<calcite-list-item open label="Hi! 1" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple">
<calcite-list-item open label="Hi! 2" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple">
<calcite-list-item open label="Hi! 3" description="hello world">
<calcite-action-menu overlay-positioning="fixed" slot="actions-end">
<calcite-action text-enabled text="Edit" icon="pencil"></calcite-action>
<calcite-action text-enabled text="Delete" icon="trash"></calcite-action>
<calcite-action text-enabled text="Delete" icon="trash"></calcite-action>
<calcite-action text-enabled text="Delete" icon="trash"></calcite-action>
<calcite-action text-enabled text="Delete" icon="trash"></calcite-action>
</calcite-action-menu>
<calcite-list drag-enabled group="nested" selection-mode="multiple"></calcite-list>
</calcite-list-item>
<calcite-list-item open label="Hi! 4" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple"></calcite-list>
</calcite-list-item>
</calcite-list>
</calcite-list-item>
<calcite-list-item open label="Hi! 5" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple"></calcite-list>
</calcite-list-item>
</calcite-list>
</calcite-list-item>
<calcite-list-item open label="Hi! 6" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple"></calcite-list>
</calcite-list-item>
<calcite-list-item open label="Hi! 7" description="hello world">
<calcite-list drag-enabled group="nested" selection-mode="multiple"></calcite-list></calcite-list-item
></calcite-list>`;

export const listWithEmptyChildList_TestOnly = (): string => html`<calcite-list
drag-enabled
group="nested"
Expand Down
Loading