@@ -30,68 +30,7 @@ export class PfAccordionHeaderChangeEvent extends Event {
30
30
31
31
/**
32
32
* Accordion Header
33
- * @csspart text - inline element containing the heading text or slotted heading content
34
- * @csspart accents - container for accents within the header
35
- * @csspart icon - caret icon
36
- * @slot
37
- * We expect the light DOM of the pf-accordion-header to be a heading level tag (h1, h2, h3, h4, h5, h6)
38
- * @slot accents
39
- * These elements will appear inline with the accordion header, between the header and the chevron
40
- * (or after the chevron and header in disclosure mode).
41
33
* @fires {AccordionHeaderChangeEvent } change - when the open panels change
42
- * @cssprop {<color>} [--pf-c-accordion__toggle--Color=var(--pf-global--Color--100, #151515)]
43
- * Sets the font color for the accordion header.
44
- *
45
- * @cssprop {<color>} [--pf-c-accordion__toggle--BackgroundColor=transparent]
46
- * Sets the background color for the accordion header toggle element.
47
- *
48
- * @cssprop {<color>} [--pf-c-accordion__toggle--after--BackgroundColor=transparent]
49
- * Sets the background color for the after element for the accordion header toggle element.
50
- *
51
- * @cssprop {<length>} [--pf-c-accordion__toggle--PaddingTop=var(--pf-global--spacer--sm, 0.5rem)]
52
- * Sets the top padding for the accordion header.
53
- *
54
- * @cssprop {<length>} [--pf-c-accordion__toggle--PaddingRight=var(--pf-global--spacer--md, 1rem)]
55
- * Sets the right padding for the accordion header.
56
- *
57
- * @cssprop {<length>} [--pf-c-accordion__toggle--PaddingBottom=var(--pf-global--spacer--sm, 0.5rem)]
58
- * Sets the bottom padding for the accordion header.
59
- *
60
- * @cssprop {<length>} [--pf-c-accordion__toggle--PaddingLeft=var(--pf-global--spacer--md, 1rem)]
61
- * Sets the left padding for the accordion header.
62
- *
63
- * @cssprop {<length>} [--pf-c-accordion__toggle--FontSize=var(--pf-global--FontSize--lg, 1rem)]
64
- * Sets the sidebar background color for the accordion header.
65
- *
66
- * @cssprop {<color>} [--pf-c-accordion__toggle--FontFamily=var(--pf-global--FontFamily--redhat-updated--heading--sans-serif, "RedHatDisplayUpdated", helvetica, arial, sans-serif)]
67
- * Sets the font family for the accordion header.
68
- *
69
- * @cssprop [--pf-c-accordion__toggle--FontWeight=var(--pf-global--FontWeight--normal, 400)]
70
- * Sets the font weight for the accordion header.
71
- *
72
- * @cssprop {<color>} [--pf-c-accordion__toggle--active--BackgroundColor=var(--pf-global--BackgroundColor--200, #f0f0f0)]
73
- * Sets the active backgrdound color for the accordion header.
74
- *
75
- * @cssprop {<color>} [--pf-c-accordion__toggle--active-text--Color=var(--pf-global--link--Color, #0066cc)]
76
- * Sets the active text color for the accordion header.
77
- *
78
- * @cssprop [--pf-c-accordion__toggle--active-text--FontWeight=var(--pf-global--FontWeight--semi-bold, 700)]
79
- * Sets the active text font weight for the accordion header.
80
- *
81
- * @cssprop {<color>} [--pf-c-accordion__toggle--expanded--before--BackgroundColor=var(--pf-global--link--Color, #0066cc)]
82
- * Sets the hover expanded before background color for the accordion header.
83
- *
84
- * @cssprop [--pf-c-accordion__toggle--expanded-icon--Rotate=90deg]
85
- * Sets the expanded icon rotation degrees for the accordion header.
86
- *
87
- * @cssprop {<length>} [--pf-c-accordion__toggle-text--MaxWidth=calc(100 - var(--pf-global--spacer--lg, 1.5rem))]
88
- * Sets the max width for the text inside the accordion header.
89
- *
90
- * @cssprop [--pf-c-accordion__toggle--before--Width=var(--pf-global--BorderWidth--lg, 3px)]
91
- * Sets the sidebar width for the accordion header.
92
- *
93
- * @cssprop [--pf-c-accordion__toggle-icon--Transition=0.2s ease-in 0s]
94
- * Sets the transition animation for the accordion header.
95
34
*
96
35
*/
97
36
@customElement ( 'pf-accordion-header' )
@@ -136,12 +75,21 @@ export class PfAccordionHeader extends LitElement {
136
75
class ="toggle "
137
76
@click ="${ this . #onClick} "
138
77
aria-expanded ="${ String ( ! ! this . expanded ) as 'true' | 'false' } ">
78
+ <!-- summary: inline element containing the heading text or slotted heading content -->
139
79
< span part ="text "> ${ headingText ?? html `
80
+ <!-- summary: A heading level tag (h1, h2, h3, h4, h5, h6) -->
140
81
< slot > </ slot > ` }
141
82
</ span >
83
+ <!-- summary: container for accents within the header -->
142
84
< span part ="accents " ?hidden ="${ this . #slots. isEmpty ( 'accents' ) } ">
85
+ <!-- summary: Header accent elements like tag or icon
86
+ description: |
87
+ These elements will appear inline with the accordion header,
88
+ between the header and the chevron
89
+ (or after the chevron and header in disclosure mode). -->
143
90
< slot name ="accents "> </ slot >
144
91
</ span >
92
+ <!-- summary: caret icon -->
145
93
< pf-icon part ="icon "
146
94
class ="icon "
147
95
size ="lg "
0 commit comments