Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/src/HalstackContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const parseTheme = (theme) => {
chipTokens.backgroundColor = theme?.chip?.baseColor ?? chipTokens.backgroundColor;
chipTokens.fontColor = theme?.chip?.fontColor ?? chipTokens.fontColor;
chipTokens.iconColor = theme?.chip?.iconColor ?? chipTokens.iconColor;
chipTokens.hoverIconColor = subLightness(theme?.chip?.iconColor, 10) ?? chipTokens.hoverIconColor;
chipTokens.activeIconColor = subLightness(theme?.chip?.iconColor, 30) ?? chipTokens.activeIconColor;

const dateTokens = componentTokensCopy.dateInput;
dateTokens.pickerSelectedBackgroundColor = theme?.dateInput?.baseColor ?? dateTokens.pickerSelectedBackgroundColor;
Expand Down Expand Up @@ -193,6 +195,7 @@ const parseTheme = (theme) => {
progressBarTokens.valueFontColor = theme?.progressBar?.fontColor ?? progressBarTokens.valueFontColor;
progressBarTokens.helperTextFontColor = theme?.progressBar?.fontColor ?? progressBarTokens.helperTextFontColor;
progressBarTokens.overlayColor = theme?.progressBar?.overlayColor ?? progressBarTokens.overlayColor;
progressBarTokens.overlayFontColor = theme?.progressBar?.overlayFontColor ?? progressBarTokens.overlayFontColor;

const quickNavTokens = componentTokensCopy.quickNav;
quickNavTokens.fontColor = theme?.quickNav?.fontColor ?? quickNavTokens.fontColor;
Expand Down Expand Up @@ -322,7 +325,7 @@ const parseTheme = (theme) => {

const wizardTokens = componentTokensCopy.wizard;
wizardTokens.selectedStepBackgroundColor = theme?.wizard?.baseColor ?? wizardTokens.selectedStepBackgroundColor;
wizardTokens.selectedStepFontColor = theme?.wizard?.selectedFontColor ?? wizardTokens.selectedStepFontColor;
wizardTokens.selectedStepFontColor = theme?.wizard?.selectedStepFontColor ?? wizardTokens.selectedStepFontColor;
wizardTokens.selectedStepBorderColor = theme?.wizard?.baseColor ?? wizardTokens.selectedStepBorderColor;
wizardTokens.visitedLabelFontColor = theme?.wizard?.fontColor ?? wizardTokens.visitedLabelFontColor;
wizardTokens.selectedLabelFontColor = theme?.wizard?.fontColor ?? wizardTokens.selectedLabelFontColor;
Expand Down
1 change: 1 addition & 0 deletions lib/src/common/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ export const componentTokens = {
thickness: "9px",
borderRadius: "5px",
overlayColor: globalTokens.color_grey_a_800,
overlayFontColor: globalTokens.hal_white,
},
quickNav: {
fontColor: globalTokens.hal_grey_s_40,
Expand Down
1 change: 1 addition & 0 deletions lib/src/progress-bar/ProgressBar.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const opinionatedTheme = {
baseColor: "#e6e6e6",
fontColor: "#000000",
overlayColor: "#000000b3",
overlayFontColor: "#ffffff",
},
};

Expand Down
6 changes: 3 additions & 3 deletions lib/src/progress-bar/ProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const ProgressBarLabel = styled.div<LabelProps>`
props.backgroundType === "dark"
? props.theme.labelFontColorOnDark
: props.overlay === true
? "#FFFFFF"
? props.theme.overlayFontColor
: props.theme.labelFontColor};
overflow: hidden;
text-overflow: ellipsis;
Expand All @@ -155,7 +155,7 @@ const ProgressBarProgress = styled.div<ProgressProps>`
props.backgroundType === "dark"
? props.theme.valueFontColorOnDark
: props.overlay === true
? "#FFFFFF"
? props.theme.overlayFontColor
: props.theme.valueFontColor};
display: ${(props) =>
(props.value !== undefined && props.value !== null && props.showValue === true && "block") || "none"};
Expand All @@ -172,7 +172,7 @@ const HelperText = styled.span<HelperTextProps>`
props.backgroundType === "dark"
? props.theme.helperTextFontColorOnDark
: props.overlay === true
? "#FFFFFF"
? props.theme.overlayFontColor
: props.theme.helperTextFontColor};
font-family: ${(props) => props.theme.helperTextFontFamily};
font-size: ${(props) => props.theme.helperTextFontSize};
Expand Down
2 changes: 1 addition & 1 deletion lib/src/wizard/Wizard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const opinionatedTheme = {
wizard: {
baseColor: "#5f249f",
fontColor: "#000000",
selectedFontColor: "#ffffff",
selectedStepFontColor: "#ffffff",
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ const sections = [
</td>
<td>#000000b3</td>
</tr>
<tr>
<td>
<Code>overlayFontColor</Code>
</td>
<td>Overlay font color</td>
<td>
<Code>color-white</Code>
</td>
<td>#ffffff</td>
</tr>
</tbody>
</DxcTable>
),
Expand Down
14 changes: 13 additions & 1 deletion website/screens/principles/themes/ThemesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@ const sections = [
<td>Icon color</td>
<td>
<Code>iconColor</Code>
<br />
<br />
<Code>hoverIconColor</Code> (+10% lightness)
<br />
<br />
<Code>activeIconColor</Code> (+30% lightness)
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -753,6 +759,12 @@ const sections = [
<Code>overlayColor</Code>
</td>
</tr>
<tr>
<td>Overlay font color</td>
<td>
<Code>overlayFontColor</Code>
</td>
</tr>
</tbody>
</DxcTable>
),
Expand Down Expand Up @@ -1318,7 +1330,7 @@ const sections = [
</td>
</tr>
<tr>
<td>Selected font color</td>
<td>Selected step font color</td>
<td>
<Code>selectedStepFontColor</Code>
</td>
Expand Down
15 changes: 8 additions & 7 deletions website/screens/theme-generator/themes/opinionated-theme.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"alert": {
"baseColor": "#e6f4ff",
"accentColor": "#0067b3",
"overlayColor": "#000000b3"
},
"accordion": {
"accentColor": "#5f249f",
"titleFontColor": "#000000",
"assistiveTextFontColor": "#666666"
},
"alert": {
"baseColor": "#e6f4ff",
"accentColor": "#0067b3",
"overlayColor": "#000000b3"
},
"box": {
"baseColor": "#ffffff"
},
Expand Down Expand Up @@ -72,7 +72,8 @@
"accentColor": "#5f249f",
"baseColor": "#e6e6e6",
"fontColor": "#000000",
"overlayColor": "#000000b3"
"overlayColor": "#000000b3",
"overlayFontColor": "#ffffff"
},
"quickNav": {
"fontColor": "#666666",
Expand Down Expand Up @@ -136,6 +137,6 @@
"wizard": {
"baseColor": "#5f249f",
"fontColor": "#000000",
"selectedFontColor": "#ffffff"
"selectedStepFontColor": "#ffffff"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"accentColor": "color",
"baseColor": "color",
"fontColor": "color",
"overlayColor": "color"
"overlayColor": "color",
"overlayFontColor": "color"
},
"quickNav": {
"fontColor": "color",
Expand Down Expand Up @@ -120,8 +121,8 @@
"iconColor": "color"
},
"textarea": {
"fontColor": "#000000",
"hoverBorderColor": "#a46ede"
"fontColor": "color",
"hoverBorderColor": "color"
},
"textInput": {
"fontColor": "color",
Expand All @@ -136,6 +137,6 @@
"wizard": {
"baseColor": "color",
"fontColor": "color",
"selectedFontColor": "color"
"selectedStepFontColor": "color"
}
}