Skip to content

Commit af9d5e9

Browse files
committed
Merge branch '2887' into beta
2 parents 0c851d0 + 790fcc6 commit af9d5e9

File tree

10 files changed

+34
-57
lines changed

10 files changed

+34
-57
lines changed

src/lib/output/themes/default/partials/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ export function index(context: DefaultThemeRenderContext, props: ContainerReflec
5656
<section class="tsd-panel tsd-index-panel">
5757
<details class="tsd-index-content tsd-accordion" open={true}>
5858
<summary class="tsd-accordion-summary tsd-index-summary">
59-
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex={0}>
60-
{context.icons.chevronSmall()} {i18n.theme_index()}
59+
{context.icons.chevronSmall()}
60+
<h5 class="tsd-index-heading uppercase">
61+
{i18n.theme_index()}
6162
</h5>
6263
</summary>
6364
<div class="tsd-accordion-details">{content}</div>

src/lib/output/themes/default/partials/members.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ export function members(context: DefaultThemeRenderContext, props: ContainerRefl
1414
return (
1515
<details class="tsd-panel-group tsd-member-group tsd-accordion" open>
1616
<summary class="tsd-accordion-summary" data-key={"section-" + title}>
17+
{context.icons.chevronDown()}
1718
<h2>
18-
{context.icons.chevronDown()} {title}
19+
{title}
1920
</h2>
2021
</summary>
2122
<section>{children.map((item) => context.member(item))}</section>

src/lib/output/themes/default/partials/moduleReflection.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ export function moduleReflection(context: DefaultThemeRenderContext, mod: Declar
3535
return (
3636
<details class="tsd-panel-group tsd-member-group tsd-accordion" open>
3737
<summary class="tsd-accordion-summary" data-key={"section-" + title}>
38+
{context.icons.chevronDown()}
3839
<h2>
39-
{context.icons.chevronDown()} {title}
40+
{title}
4041
</h2>
4142
</summary>
4243
{description && (

src/lib/output/themes/default/partials/navigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export function settings(context: DefaultThemeRenderContext) {
9191
<div class="tsd-navigation settings">
9292
<details class="tsd-accordion" open={false}>
9393
<summary class="tsd-accordion-summary">
94+
{context.icons.chevronDown()}
9495
<h3>
95-
{context.icons.chevronDown()}
9696
{i18n.theme_settings()}
9797
</h3>
9898
</summary>
@@ -221,8 +221,8 @@ export function pageNavigation(context: DefaultThemeRenderContext, props: PageEv
221221
return (
222222
<details open={true} class="tsd-accordion tsd-page-navigation">
223223
<summary class="tsd-accordion-summary">
224+
{context.icons.chevronDown()}
224225
<h3>
225-
{context.icons.chevronDown()}
226226
{i18n.theme_on_this_page()}
227227
</h3>
228228
</summary>

src/test/renderer/specs/classes/GenericClass.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,7 @@
9595
"children": [
9696
{
9797
"summary.tsd-accordion-summary.tsd-index-summary": {
98-
"tag": "h5.tsd-index-heading.uppercase",
99-
"props": {
100-
"role": "button",
101-
"aria-expanded": "false",
102-
"tabIndex": "0"
103-
},
104-
"children": " Index"
98+
"h5.tsd-index-heading.uppercase": "Index"
10599
}
106100
},
107101
{
@@ -172,7 +166,7 @@
172166
"data-key": "section-Constructors"
173167
},
174168
"children": {
175-
"h2": " Constructors"
169+
"h2": "Constructors"
176170
}
177171
},
178172
{
@@ -356,7 +350,7 @@
356350
"data-key": "section-Methods"
357351
},
358352
"children": {
359-
"h2": " Methods"
353+
"h2": "Methods"
360354
}
361355
},
362356
{

src/test/renderer/specs/classes/RenderClass.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,7 @@
142142
"children": [
143143
{
144144
"summary.tsd-accordion-summary.tsd-index-summary": {
145-
"tag": "h5.tsd-index-heading.uppercase",
146-
"props": {
147-
"role": "button",
148-
"aria-expanded": "false",
149-
"tabIndex": "0"
150-
},
151-
"children": " Index"
145+
"h5.tsd-index-heading.uppercase": "Index"
152146
}
153147
},
154148
{
@@ -291,7 +285,7 @@
291285
"data-key": "section-Constructors"
292286
},
293287
"children": {
294-
"h2": " Constructors"
288+
"h2": "Constructors"
295289
}
296290
},
297291
{
@@ -461,7 +455,7 @@
461455
"data-key": "section-Properties"
462456
},
463457
"children": {
464-
"h2": " Properties"
458+
"h2": "Properties"
465459
}
466460
},
467461
{
@@ -800,7 +794,7 @@
800794
"data-key": "section-Methods"
801795
},
802796
"children": {
803-
"h2": " Methods"
797+
"h2": "Methods"
804798
}
805799
},
806800
{

src/test/renderer/specs/enums/Enumeration.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@
7777
"children": [
7878
{
7979
"summary.tsd-accordion-summary.tsd-index-summary": {
80-
"tag": "h5.tsd-index-heading.uppercase",
81-
"props": {
82-
"role": "button",
83-
"aria-expanded": "false",
84-
"tabIndex": "0"
85-
},
86-
"children": " Index"
80+
"h5.tsd-index-heading.uppercase": "Index"
8781
}
8882
},
8983
{
@@ -135,7 +129,7 @@
135129
"data-key": "section-Enumeration Members"
136130
},
137131
"children": {
138-
"h2": " Enumeration Members"
132+
"h2": "Enumeration Members"
139133
}
140134
},
141135
{

src/test/renderer/specs/modules.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"data-key": "section-Documents"
3838
},
3939
"children": {
40-
"h2": " Documents"
40+
"h2": "Documents"
4141
}
4242
},
4343
{
@@ -81,7 +81,7 @@
8181
"data-key": "section-Enumerations"
8282
},
8383
"children": {
84-
"h2": " Enumerations"
84+
"h2": "Enumerations"
8585
}
8686
},
8787
{
@@ -125,7 +125,7 @@
125125
"data-key": "section-Classes"
126126
},
127127
"children": {
128-
"h2": " Classes"
128+
"h2": "Classes"
129129
}
130130
},
131131
{
@@ -282,7 +282,7 @@
282282
"data-key": "section-Type Aliases"
283283
},
284284
"children": {
285-
"h2": " Type Aliases"
285+
"h2": "Type Aliases"
286286
}
287287
},
288288
{
@@ -349,7 +349,7 @@
349349
"data-key": "section-Functions"
350350
},
351351
"children": {
352-
"h2": " Functions"
352+
"h2": "Functions"
353353
}
354354
},
355355
{

src/test/renderer/specs/types/Nested.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,7 @@
197197
"children": [
198198
{
199199
"summary.tsd-accordion-summary.tsd-index-summary": {
200-
"tag": "h5.tsd-index-heading.uppercase",
201-
"props": {
202-
"role": "button",
203-
"aria-expanded": "false",
204-
"tabIndex": "0"
205-
},
206-
"children": " Index"
200+
"h5.tsd-index-heading.uppercase": "Index"
207201
}
208202
},
209203
{
@@ -245,7 +239,7 @@
245239
"data-key": "section-Properties"
246240
},
247241
"children": {
248-
"h2": " Properties"
242+
"h2": "Properties"
249243
}
250244
},
251245
{

static/style.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,10 @@
10371037
.tsd-accordion-summary {
10381038
list-style-type: none; /* hide marker on non-safari */
10391039
outline: none; /* broken on safari, so just hide it */
1040+
display: flex;
1041+
align-items: center;
1042+
gap: 0.25rem;
1043+
box-sizing: border-box;
10401044
}
10411045
.tsd-accordion-summary::-webkit-details-marker {
10421046
display: none; /* hide marker on safari */
@@ -1059,29 +1063,23 @@
10591063
padding-top: 0;
10601064
padding-bottom: 0;
10611065
}
1062-
.tsd-accordion .tsd-accordion-summary > svg {
1063-
margin-left: 0.25rem;
1064-
vertical-align: text-top;
1065-
}
10661066
/*
10671067
* We need to be careful to target the arrow indicating whether the accordion
10681068
* is open, but not any other SVGs included in the details element.
10691069
*/
1070-
.tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child,
1071-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h1 > svg:first-child,
1072-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h2 > svg:first-child,
1073-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h3 > svg:first-child,
1074-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h4 > svg:first-child,
1075-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h5 > svg:first-child {
1070+
.tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child {
10761071
transform: rotate(-90deg);
10771072
}
10781073
.tsd-index-content > :not(:first-child) {
10791074
margin-top: 0.75rem;
10801075
}
1081-
.tsd-index-heading {
1076+
.tsd-index-summary {
10821077
margin-top: 1.5rem;
10831078
margin-bottom: 0.75rem;
10841079
}
1080+
.tsd-index-heading {
1081+
margin: 0;
1082+
}
10851083

10861084
.tsd-no-select {
10871085
-webkit-user-select: none;

0 commit comments

Comments
 (0)