@@ -893,7 +913,7 @@ export class ListItem extends LitElement implements InteractiveComponent, Sortab
@@ -954,8 +974,8 @@ export class ListItem extends LitElement implements InteractiveComponent, Sortab
override render(): JsxNode {
const {
- openable,
- open,
+ expandable,
+ expanded,
level,
active,
label,
@@ -987,7 +1007,7 @@ export class ListItem extends LitElement implements InteractiveComponent, Sortab
{this.renderDragHandle()}
{this.renderSelected()}
- {this.renderOpen()}
+ {this.renderExpanded()}
html`
export const nestedItems = (): string => html`
@@ -4083,19 +4083,17 @@ export const groupedItems = (): string => html`
html`
-
+
-
+
@@ -4185,10 +4183,10 @@ export const contentBottomSlots = (): string =>
export const contentBottomSlotsNested = (): string =>
html`
-
+
Some value or something and a thing.
+ >
Some value or something and a thing.
@@ -4503,7 +4501,7 @@ export const filteredChildListItems_TestOnly = (): string =>
-
+
-
+
export const sortableNestedList_TestOnly = (): string =>
html`
-
+
-
+
-
+
selection-mode="multiple"
>
-
+
-
+
-
-
+
+
`;
-export const emptyOpenLists_TestOnly = (): string =>
+export const emptyExpandedLists_TestOnly = (): string =>
html`
-
+
-
+
-
+
@@ -4826,7 +4824,7 @@ export const emptyOpenLists_TestOnly = (): string =>
selection-mode="multiple"
>
-
+
-
+
-
+
selection-mode="multiple"
>
-
+
export const listWithEmptyChildList_TestOnly = (): string =>
html`
-
+
export const nestingLists_TestOnly = (): string => html`Nesting List Items
-
+
@@ -4943,7 +4941,7 @@ export const nestingLists_TestOnly = (): string => html`Nesting List Items
Nesting Lists
-
+
@@ -5018,9 +5016,9 @@ export const closedItems_TestOnly = (): string =>
export const dragEnabledNestedLists = (): string =>
html`
-
+
-
+
@@ -5038,10 +5036,10 @@ export const dragEnabledNestedLists = (): string =>
export const dragEnabledNestedListsIndirectChildren = (): string =>
html`
-
+
-
+
diff --git a/packages/calcite-components/src/components/list/list.tsx b/packages/calcite-components/src/components/list/list.tsx
index 589cde7b859..42457e1ed82 100755
--- a/packages/calcite-components/src/components/list/list.tsx
+++ b/packages/calcite-components/src/components/list/list.tsx
@@ -17,7 +17,7 @@ import {
listItemGroupSelector,
listItemSelector,
listSelector,
- openAncestors,
+ expandedAncestors,
updateListItemChildren,
} from "../list-item/utils";
import {
@@ -617,7 +617,7 @@ export class List extends LitElement implements InteractiveComponent, SortableCo
}
onDragMove({ relatedEl }: ListMoveDetail): void {
- relatedEl.open = true;
+ relatedEl.expanded = true;
}
onDragStart(detail: ListDragDetail): void {
@@ -708,21 +708,21 @@ export class List extends LitElement implements InteractiveComponent, SortableCo
});
}
- private allParentListItemsOpen(item: ListItem["el"]): boolean {
+ private allParentListItemsExpanded(item: ListItem["el"]): boolean {
const parentItem = item.parentElement?.closest(listItemSelector);
if (!parentItem) {
return true;
- } else if (!parentItem.open) {
+ } else if (!parentItem.expanded) {
return false;
}
- return this.allParentListItemsOpen(parentItem);
+ return this.allParentListItemsExpanded(parentItem);
}
private borderItems(): void {
const visibleItems = this.visibleItems.filter(
- (item) => !item.filterHidden && this.allParentListItemsOpen(item),
+ (item) => !item.filterHidden && this.allParentListItemsExpanded(item),
);
visibleItems.forEach(
@@ -870,7 +870,7 @@ export class List extends LitElement implements InteractiveComponent, SortableCo
return true;
}
- return parentListItemEl.open && this.isNavigable(parentListItemEl);
+ return parentListItemEl.expanded && this.isNavigable(parentListItemEl);
}
private handleListKeydown(event: KeyboardEvent): void {
@@ -947,7 +947,7 @@ export class List extends LitElement implements InteractiveComponent, SortableCo
this.disconnectObserver();
toEl.prepend(dragEl);
- openAncestors(dragEl);
+ expandedAncestors(dragEl);
const toElItems = Array.from(toEl.children).filter(isListItem);
const newIndex = toElItems.indexOf(dragEl);
diff --git a/packages/calcite-components/src/demos/list.html b/packages/calcite-components/src/demos/list.html
index 362607e1ff8..895f81d0056 100644
--- a/packages/calcite-components/src/demos/list.html
+++ b/packages/calcite-components/src/demos/list.html
@@ -5334,7 +5334,7 @@ List
-
+
@@ -5450,9 +5450,9 @@ List
-
+
-
+
-
-
+
+
@@ -60,8 +60,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Erik Harper
|
-
-
+
+
@@ -104,8 +104,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Patrick Arlt
|
-
-
+
+
@@ -148,8 +148,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Ditwan Price
|
-
-
+
+
@@ -192,8 +192,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Justin Hough
|
-
-
+
+
@@ -236,8 +236,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Ben Patterson
|
-
-
+
+
@@ -280,8 +280,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Ethan Borgen
|
-
-
+
+
@@ -324,8 +324,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Alex Abreu
|
-
-
+
+
@@ -368,8 +368,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Ninad Kulkarni
|
-
-
+
+
@@ -412,8 +412,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Bjorn Svensson
|
-
-
+
+
@@ -435,8 +435,8 @@ We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.m
Aaron Shetland
|
-
-
+
+