Skip to content

Commit f78eb80

Browse files
authored
Merge pull request #2157 from dxc-technology/rarrojolopez/accordion
Refactor Accordion component
2 parents 7e9af4c + 512886f commit f78eb80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2053
-1990
lines changed

apps/website/screens/common/themes/advanced-theme.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,43 @@
22
"accordion": {
33
"backgroundColor": "#ffffff",
44
"hoverBackgroundColor": "#f2eafa",
5+
"focusBackgroundColor": "transparent",
6+
"activeBackgroundColor": "#f2eafa",
57
"arrowColor": "#5f249f",
68
"disabledArrowColor": "#999999",
9+
"subLabelFontFamily": "Open Sans, sans-serif",
10+
"subLabelFontSize": "0.75rem",
11+
"subLabelFontWeight": "400",
12+
"subLabelFontStyle": "normal",
13+
"subLabelFontColor": "#666666",
14+
"disabledSubLabelFontColor": "#999999",
715
"assistiveTextFontFamily": "Open Sans, sans-serif",
8-
"assistiveTextFontSize": "1rem",
9-
"assistiveTextFontWeight": "300",
10-
"assistiveTextFontStyle": "italic",
11-
"assistiveTextLetterSpacing": "0.025em",
16+
"assistiveTextFontSize": "0.75rem",
17+
"assistiveTextFontWeight": "400",
18+
"assistiveTextFontStyle": "normal",
1219
"assistiveTextFontColor": "#666666",
1320
"disabledAssistiveTextFontColor": "#999999",
14-
"assistiveTextMinWidth": "100px",
15-
"assistiveTextPaddingRight": "1.5rem",
16-
"assistiveTextPaddingLeft": "0rem",
1721
"titleLabelFontFamily": "Open Sans, sans-serif",
1822
"titleLabelFontSize": "1rem",
1923
"titleLabelFontWeight": "400",
2024
"titleLabelFontStyle": "normal",
21-
"titleLabelFontColor": "#000000",
25+
"titleLabelFontColor": "#333333",
2226
"disabledTitleLabelFontColor": "#999999",
23-
"titleLabelPaddingTop": "0rem",
24-
"titleLabelPaddingBottom": "0rem",
25-
"titleLabelPaddingLeft": "0rem",
26-
"titleLabelPaddingRight": "1rem",
2727
"focusBorderColor": "#0095ff",
2828
"focusBorderStyle": "solid",
2929
"focusBorderThickness": "2px",
3030
"borderRadius": "4px",
3131
"boxShadowOffsetX": "0px",
32-
"boxShadowOffsetY": "6px",
33-
"boxShadowBlur": "10px",
32+
"boxShadowOffsetY": "12px",
33+
"boxShadowBlur": "12px",
34+
"boxShadowSpread": "0px",
3435
"boxShadowColor": "#0000001a",
3536
"iconColor": "#5f249f",
3637
"disabledIconColor": "#999999",
3738
"iconSize": "24px",
38-
"iconMarginLeft": "0rem",
39-
"iconMarginRight": "0.75rem",
40-
"accordionGroupSeparatorBorderColor": "#0000001a",
41-
"accordionGroupSeparatorBorderThickness": "1px",
42-
"accordionGroupSeparatorBorderRadius": "0px",
43-
"accordionGroupSeparatorBorderStyle": "solid"
39+
"accordionSeparatorBorderColor": "#e6e6e6",
40+
"accordionSeparatorBorderThickness": "1px",
41+
"accordionSeparatorBorderStyle": "solid"
4442
},
4543
"alert": {
4644
"overlayColor": "#000000b3",

apps/website/screens/common/themes/opinionated-theme.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"accordion": {
33
"accentColor": "#5f249f",
4-
"titleFontColor": "#000000",
4+
"titleFontColor": "#333333",
5+
"subLabelFontColor": "#666666",
56
"assistiveTextFontColor": "#666666"
67
},
78
"button": {

apps/website/screens/components/accordion/AccordionPageLayout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ const AccordionPageHeading = ({ children }: { children: ReactNode }) => {
1717
<DxcFlex direction="column" gap="2rem">
1818
<ComponentHeading name="Accordion" />
1919
<DxcParagraph>
20-
Accordions are used to group similar content and hide or show it depending on user needs or preferences.
21-
Accordions give users more granular control over the interface and help digest content in stages, rather
22-
than all at once.
20+
The accordion component is a vertical stack of interactive headers used to group related content into
21+
collapsible sections, allowing users to expand or hide content based on their needs or preferences. It
22+
enhances the user experience by organizing information into smaller, digestible chunks, helping reduce
23+
cognitive load and save screen space.
2324
</DxcParagraph>
2425
<TabsPageHeading tabs={tabs}></TabsPageHeading>
2526
</DxcFlex>

0 commit comments

Comments
 (0)