Skip to content

Commit d7b36d7

Browse files
committed
docs(aria/combobox): dev app ui changes
1 parent 7cfc15a commit d7b36d7

File tree

7 files changed

+29
-15
lines changed

7 files changed

+29
-15
lines changed

src/components-examples/aria/combobox/combobox-auto-select/combobox-auto-select-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class ComboboxAutoSelectExample {
6262

6363
if (comboboxRect) {
6464
popoverEl.style.width = `${comboboxRect.width}px`;
65-
popoverEl.style.top = `${comboboxRect.bottom}px`;
65+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
6666
popoverEl.style.left = `${comboboxRect.left - 1}px`;
6767
}
6868

src/components-examples/aria/combobox/combobox-examples.css

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@
22
position: relative;
33
width: 300px;
44
display: flex;
5-
overflow: hidden;
65
flex-direction: column;
76
border: 1px solid var(--mat-sys-outline);
87
border-radius: var(--mat-sys-corner-extra-small);
98
}
109

11-
.example-combobox-container:has(.example-combobox-input[aria-expanded='true']) {
12-
border-bottom-right-radius: 0;
13-
border-bottom-left-radius: 0;
14-
}
15-
1610
.example-combobox-input-container {
1711
display: flex;
18-
overflow: hidden;
1912
position: relative;
2013
align-items: center;
14+
border-radius: var(--mat-sys-corner-extra-small);
15+
}
16+
17+
.example-combobox-input {
18+
border-radius: var(--mat-sys-corner-extra-small);
19+
}
20+
21+
.example-combobox-container:focus-within .example-combobox-input {
22+
outline: 1.5px solid var(--mat-sys-primary);
23+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--mat-sys-primary) 25%, transparent);
2124
}
2225

2326
.example-icon {
@@ -35,6 +38,18 @@
3538
opacity: 0.8;
3639
}
3740

41+
.example-arrow-icon {
42+
padding: 0 0.5rem;
43+
position: absolute;
44+
right: 0;
45+
opacity: 0.8;
46+
transition: transform 0.2s ease;
47+
}
48+
49+
.example-combobox-input[aria-expanded='true'] + .example-arrow-icon {
50+
transform: rotate(180deg);
51+
}
52+
3853
.example-combobox-input {
3954
width: 100%;
4055
border: none;
@@ -48,8 +63,7 @@
4863
margin: 0;
4964
padding: 0;
5065
border: 1px solid var(--mat-sys-outline);
51-
border-bottom-right-radius: var(--mat-sys-corner-extra-small);
52-
border-bottom-left-radius: var(--mat-sys-corner-extra-small);
66+
border-radius: var(--mat-sys-corner-extra-small);
5367
background-color: var(--mat-sys-surface);
5468
}
5569

src/components-examples/aria/combobox/combobox-highlight/combobox-highlight-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class ComboboxHighlightExample {
7171

7272
if (comboboxRect) {
7373
popoverEl.style.width = `${comboboxRect.width}px`;
74-
popoverEl.style.top = `${comboboxRect.bottom}px`;
74+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
7575
popoverEl.style.left = `${comboboxRect.left - 1}px`;
7676
}
7777

src/components-examples/aria/combobox/combobox-manual/combobox-manual-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class ComboboxManualExample {
7171

7272
if (comboboxRect) {
7373
popoverEl.style.width = `${comboboxRect.width}px`;
74-
popoverEl.style.top = `${comboboxRect.bottom}px`;
74+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
7575
popoverEl.style.left = `${comboboxRect.left - 1}px`;
7676
}
7777

src/components-examples/aria/combobox/combobox-tree-auto-select/combobox-tree-auto-select-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class ComboboxTreeAutoSelectExample {
9797

9898
if (comboboxRect) {
9999
popoverEl.style.width = `${comboboxRect.width}px`;
100-
popoverEl.style.top = `${comboboxRect.bottom}px`;
100+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
101101
popoverEl.style.left = `${comboboxRect.left - 1}px`;
102102
}
103103

src/components-examples/aria/combobox/combobox-tree-highlight/combobox-tree-highlight-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class ComboboxTreeHighlightExample {
9797

9898
if (comboboxRect) {
9999
popoverEl.style.width = `${comboboxRect.width}px`;
100-
popoverEl.style.top = `${comboboxRect.bottom}px`;
100+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
101101
popoverEl.style.left = `${comboboxRect.left - 1}px`;
102102
}
103103

src/components-examples/aria/combobox/combobox-tree-manual/combobox-tree-manual-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class ComboboxTreeManualExample {
9797

9898
if (comboboxRect) {
9999
popoverEl.style.width = `${comboboxRect.width}px`;
100-
popoverEl.style.top = `${comboboxRect.bottom}px`;
100+
popoverEl.style.top = `${comboboxRect.bottom + 4}px`;
101101
popoverEl.style.left = `${comboboxRect.left - 1}px`;
102102
}
103103

0 commit comments

Comments
 (0)