Skip to content

Commit

Permalink
Merge pull request #1947 from dxc-technology/rarrojolopez/chip-specs
Browse files Browse the repository at this point in the history
Update Chip specs
  • Loading branch information
Mil4n0r authored Apr 16, 2024
2 parents b18ba60 + 4b21616 commit e360842
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 58 deletions.
1 change: 0 additions & 1 deletion lib/src/common/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export const componentTokens = {
focusColor: CoreTokens.color_blue_600,
focusBorderStyle: CoreTokens.border_solid,
focusBorderThickness: CoreTokens.border_width_2,
focusBorderRadius: CoreTokens.border_radius_medium,
},
dateInput: {
pickerBackgroundColor: CoreTokens.color_white,
Expand Down
5 changes: 1 addition & 4 deletions website/screens/common/themes/advanced-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,11 @@
},
"chip": {
"backgroundColor": "#e6e6e6",
"disabledBackgroundColor": "#f2f2f2",
"fontFamily": "Open Sans, sans-serif",
"fontSize": "1rem",
"fontStyle": "normal",
"fontWeight": "400",
"fontColor": "#000000",
"disabledFontColor": "#999999",
"borderColor": "transparent",
"borderRadius": "80px",
"borderThickness": "0px",
Expand All @@ -214,8 +212,7 @@
"disabledIconColor": "#999999",
"focusColor": "#0095ff",
"focusBorderStyle": "solid",
"focusBorderThickness": "2px",
"focusBorderRadius": "0.25rem"
"focusBorderThickness": "2px"
},
"dateInput": {
"pickerBackgroundColor": "#ffffff",
Expand Down
5 changes: 4 additions & 1 deletion website/screens/components/chip/code/ChipCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ const sections = [
<td>
<TableCode>boolean</TableCode>
</td>
<td>If true, the component will be disabled.</td>
<td>
If true, action prefix icon or action suffix icon (if defined)
will be disabled.
</td>
<td>
<TableCode>false</TableCode>
</td>
Expand Down
58 changes: 10 additions & 48 deletions website/screens/components/chip/specs/ChipSpecsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Figure from "@/common/Figure";
import Image from "@/common/Image";
import Code from "@/common/Code";
import specsImage from "./images/chip_specs.png";
import statesImage from "./images/chip_states_container.png";
import prefixSuffixStatesImage from "./images/chip_states_action.png";
import anatomyImage from "./images/chip_anatomy.png";

Expand All @@ -28,13 +27,6 @@ const sections = [
title: "States",
content: (
<>
<DxcParagraph>
The chip component container states are <strong>enabled</strong> and{" "}
<strong>disabled</strong>:
</DxcParagraph>
<Figure caption="Chip states">
<Image src={statesImage} alt="Chip states" />
</Figure>
<DxcParagraph>
The chip action item has the following states:{" "}
<strong>enabled</strong>, <strong>hover</strong>,{" "}
Expand Down Expand Up @@ -114,26 +106,6 @@ const sections = [
</td>
<td>transparent</td>
</tr>
<tr>
<td>
<Code>disabledBackgroundColor</Code>
</td>
<td>Container:disabled</td>
<td>
<Code>color-grey-100</Code>
</td>
<td>#f2f2f2</td>
</tr>
<tr>
<td>
<Code>disabledFontcolor</Code>
</td>
<td>Label:disabled</td>
<td>
<Code>color-grey-500</Code>
</td>
<td>#999999</td>
</tr>
<tr>
<td>
<Code>disabledIconColor</Code>
Expand Down Expand Up @@ -327,7 +299,7 @@ const sections = [
<tbody>
<tr>
<td>
<Code>border-width</Code>
<Code>borderThickness</Code>
</td>
<td>Chip container</td>
<td>
Expand All @@ -337,27 +309,27 @@ const sections = [
</tr>
<tr>
<td>
<Code>border-style</Code>
<Code>borderStyle</Code>
</td>
<td>Chip container</td>
<td>
<Code>border-style-none</Code>
<Code>border-style-solid</Code>
</td>
<td>none</td>
<td>solid</td>
</tr>
<tr>
<td>
<Code>border-radius</Code>
<Code>borderRadius</Code>
</td>
<td>Chip container</td>
<td>
<Code>border-radius-full</Code>
<Code>-</Code>
</td>
<td>9999px</td>
<td>80px</td>
</tr>
<tr>
<td>
<Code>border-width</Code>
<Code>focusBorderThickness</Code>
</td>
<td>Focus border</td>
<td>
Expand All @@ -367,24 +339,14 @@ const sections = [
</tr>
<tr>
<td>
<Code>border-style</Code>
<Code>focusBorderStyle</Code>
</td>
<td>Focus border</td>
<td>
<Code>border-style-solid</Code>
</td>
<td>solid</td>
</tr>
<tr>
<td>
<Code>border-radius</Code>
</td>
<td>Focus border</td>
<td>
<Code>border-radius-medium</Code>
</td>
<td>0.25rem / 4px</td>
</tr>
</tbody>
</DxcTable>
),
Expand All @@ -410,7 +372,7 @@ const sections = [
<td>
<Code>size-icon-large</Code>
</td>
<td>24x24px</td>
<td>24px</td>
</tr>
</tbody>
</DxcTable>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@
},
"chip": {
"backgroundColor": "color",
"disabledBackgroundColor": "color",
"disabledFontColor": "color",
"fontColor": "color",
"fontFamily": "fFamily",
"fontSize": "length",
Expand All @@ -214,8 +212,7 @@
"disabledIconColor": "color",
"focusColor": "color",
"focusBorderStyle": "bStyle",
"focusBorderThickness": "length",
"focusBorderRadius": "length"
"focusBorderThickness": "length"
},
"dateInput": {
"pickerBackgroundColor": "color",
Expand Down

0 comments on commit e360842

Please sign in to comment.