File tree Expand file tree Collapse file tree 4 files changed +67
-6
lines changed
packages/calcite-components/src/components Expand file tree Collapse file tree 4 files changed +67
-6
lines changed Original file line number Diff line number Diff line change 4
4
--calcite-list-item-spacing-indent : theme (" spacing.4" );
5
5
}
6
6
7
- :host ([filter-hidden ]) {
8
- @apply hidden ;
9
- }
10
-
11
7
@include disabled ();
12
8
13
9
.container {
Original file line number Diff line number Diff line change @@ -653,6 +653,7 @@ export class ListItem
653
653
selectionMode,
654
654
closed,
655
655
visualLevel,
656
+ filterHidden,
656
657
} = this ;
657
658
658
659
const showBorder = selectionMode !== "none" && selectionAppearance === "border" ;
@@ -676,7 +677,7 @@ export class ListItem
676
677
[ CSS . containerBorderSelected ] : borderSelected ,
677
678
[ CSS . containerBorderUnselected ] : borderUnselected ,
678
679
} }
679
- hidden = { closed }
680
+ hidden = { closed || filterHidden }
680
681
onFocus = { this . focusCellNull }
681
682
onFocusin = { this . emitInternalListItemActive }
682
683
onKeyDown = { this . handleItemKeyDown }
Original file line number Diff line number Diff line change 28
28
--calcite-stack-padding-block : 0 ;
29
29
}
30
30
31
- ::slotted(calcite-list-item) {
31
+ ::slotted(calcite-list-item :not ([ filter-hidden ], [ closed ]) ) {
32
32
@apply shadow-border-top ;
33
33
margin-block-start : 1px ;
34
34
}
Original file line number Diff line number Diff line change @@ -954,3 +954,67 @@ export const nestingLists_TestOnly = (): string => html`<h4>Nesting List Items</
954
954
</ calcite-list >
955
955
</ calcite-list-item >
956
956
</ calcite-list > ` ;
957
+
958
+ export const closedItems_TestOnly = ( ) : string =>
959
+ html ` < calcite-list >
960
+ < calcite-list-item
961
+ closable
962
+ label ="Hiking trails "
963
+ description ="Designated routes for hikers to use. "
964
+ value ="hiking-trails "
965
+ >
966
+ </ calcite-list-item >
967
+ < calcite-list-item closed closable label ="Waterfalls " description ="Vertical drops from a river. " value ="waterfalls ">
968
+ </ calcite-list-item >
969
+ < calcite-list-item
970
+ closed
971
+ closable
972
+ label ="Rivers "
973
+ description ="Large naturally flowing watercourses. "
974
+ value ="rivers "
975
+ >
976
+ </ calcite-list-item >
977
+ < calcite-list-item
978
+ closed
979
+ closable
980
+ label ="Hiking trails "
981
+ description ="Designated routes for hikers to use. "
982
+ value ="hiking-trails "
983
+ >
984
+ </ calcite-list-item >
985
+ < calcite-list-item closed closable label ="Waterfalls " description ="Vertical drops from a river. " value ="waterfalls ">
986
+ </ calcite-list-item >
987
+ < calcite-list-item
988
+ closed
989
+ closable
990
+ label ="Rivers "
991
+ description ="Large naturally flowing watercourses. "
992
+ value ="rivers "
993
+ >
994
+ </ calcite-list-item >
995
+ < calcite-list-item
996
+ closed
997
+ closable
998
+ label ="Hiking trails "
999
+ description ="Designated routes for hikers to use. "
1000
+ value ="hiking-trails "
1001
+ >
1002
+ </ calcite-list-item >
1003
+ < calcite-list-item closed closable label ="Waterfalls " description ="Vertical drops from a river. " value ="waterfalls ">
1004
+ </ calcite-list-item >
1005
+ < calcite-list-item
1006
+ closed
1007
+ closable
1008
+ label ="Rivers "
1009
+ description ="Large naturally flowing watercourses. "
1010
+ value ="rivers "
1011
+ >
1012
+ </ calcite-list-item >
1013
+ < calcite-list-item
1014
+ closable
1015
+ label ="Hiking trails "
1016
+ description ="Designated routes for hikers to use. "
1017
+ value ="hiking-trails "
1018
+ >
1019
+ </ calcite-list-item >
1020
+ </ calcite-list > ` ;
You can’t perform that action at this time.
0 commit comments