Skip to content

Commit bf88343

Browse files
committed
fixup! docs(cdk-experimental/listbox): add docs & examples
1 parent 2998a6a commit bf88343

File tree

12 files changed

+89
-34
lines changed

12 files changed

+89
-34
lines changed

src/components-examples/cdk-experimental/listbox/cdk-listbox-activedescendant/cdk-listbox-activedescendant-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-listbox:focus .cdk-option-active {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-compare-with/cdk-listbox-compare-with-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-custom-navigation/cdk-listbox-custom-navigation-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,20 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

2934
.example-option[aria-disabled] {
3035
opacity: 0.5;
3136
}
3237

33-
.example-option.cdk-option-active {
38+
.example-option:not([aria-disabled]):focus {
3439
background: rgba(0, 0, 0, 0.2);
3540
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-custom-typeahead/cdk-listbox-custom-typeahead-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-disabled/cdk-listbox-disabled-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,21 @@
2929
}
3030

3131
.example-option[aria-selected]::before {
32-
content: '✓';
32+
content: '';
33+
display: block;
34+
width: 20px;
35+
height: 20px;
36+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
37+
background-size: cover;
3338
position: absolute;
34-
left: 5px;
39+
left: 2px;
3540
}
3641

3742
.example-option[aria-disabled] {
3843
opacity: 0.5;
3944
}
4045

41-
.example-option.cdk-option-active {
46+
.example-option:not([aria-disabled]):focus {
4247
background: rgba(0, 0, 0, 0.2);
4348
}
4449

src/components-examples/cdk-experimental/listbox/cdk-listbox-forms-validation/cdk-listbox-forms-validation-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@
3131
}
3232

3333
.example-option[aria-selected]::before {
34-
content: '✓';
34+
content: '';
35+
display: block;
36+
width: 20px;
37+
height: 20px;
38+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
39+
background-size: cover;
3540
position: absolute;
36-
left: 5px;
41+
left: 2px;
3742
}
3843

39-
.example-option.cdk-option-active {
44+
.example-option:focus {
4045
background: rgba(0, 0, 0, 0.2);
4146
}
4247

src/components-examples/cdk-experimental/listbox/cdk-listbox-horizontal/cdk-listbox-horizontal-example.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
right: 3px;
3131
}
3232

33-
.example-option.cdk-option-active {
33+
.example-option:focus {
3434
background: rgba(0, 0, 0, 0.2);
3535
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-multiple/cdk-listbox-multiple-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-overview/cdk-listbox-overview-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-reactive-forms/cdk-listbox-reactive-forms-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-template-forms/cdk-listbox-template-forms-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

src/components-examples/cdk-experimental/listbox/cdk-listbox-value-binding/cdk-listbox-value-binding-example.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
}
2222

2323
.example-option[aria-selected]::before {
24-
content: '✓';
24+
content: '';
25+
display: block;
26+
width: 20px;
27+
height: 20px;
28+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/></svg>'); /* stylelint-disable-line */
29+
background-size: cover;
2530
position: absolute;
26-
left: 5px;
31+
left: 2px;
2732
}
2833

29-
.example-option.cdk-option-active {
34+
.example-option:focus {
3035
background: rgba(0, 0, 0, 0.2);
3136
}

0 commit comments

Comments
 (0)