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
77 changes: 76 additions & 1 deletion apps/website/screens/foundations/tokens/TokensPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ import DxcQuickNavContainer from "@/common/QuickNavContainer";
import { DxcAlert, DxcBulletedList, DxcFlex, DxcHeading, DxcLink, DxcParagraph } from "@dxc-technology/halstack-react";
import Link from "next/link";
import componentTokens from "./images/component_tokens.gif";
import {
AbsoluteTokens,
AlphaTokens,
NeutralTokens,
PrimaryTokens,
SecondaryTokens,
Semantic01Tokens,
Semantic02Tokens,
Semantic03Tokens,
Semantic04Tokens,
TertiaryTokens,
} from "./tables/CoreColorTokens";
import DimensionsTokens from "./tables/CoreDimensionsTokens";
import { FontFamilyTokens, FontSizesTokens, FontStylesTokens, FontWeightTokens } from "./tables/CoreFontTokens";
import BorderTokens from "./tables/CoreBorderTokens";

const sections = [
{
Expand Down Expand Up @@ -288,7 +303,67 @@ const sections = [
title: "Tokens in Development",
content: (
<>
<DxcParagraph>Work in Progress.</DxcParagraph>
<DxcParagraph>
We have overhauled our token system to improve consistency in naming and usability. To achieve this, we
chose an implementation with CSS variables over our previous JavaScript-based implementation. There are
other advantages to using CSS variables, including less re-rendering, better performance and the ability
to update them at runtime.
</DxcParagraph>
<DxcParagraph>
As explained in the previous section, the token structure has been updated from a two-layer system to a
three-layer system. This new structure will allow developers to customize both the first and third layers.
</DxcParagraph>
<DxcParagraph>
The first layer (composed of core tokens) can be customized when using the opinionated theming approach.
Below is the list of available core tokens:
</DxcParagraph>
<>
{/* Color Tokens */}
<DxcHeading level={4} text="Colors" />
<DxcHeading level={5} text="Absolute color tokens" />
<AbsoluteTokens />
<DxcHeading level={5} text="Primary color tokens" />
<PrimaryTokens />
<DxcHeading level={5} text="Secondary color tokens" />
<SecondaryTokens />
<DxcHeading level={5} text="Tertiary color tokens" />
<TertiaryTokens />
<DxcHeading level={5} text="Neutral color tokens" />
<NeutralTokens />
<DxcHeading level={5} text="Semantic 01 color tokens" />
<Semantic01Tokens />
<DxcHeading level={5} text="Semantic 02 color tokens" />
<Semantic02Tokens />
<DxcHeading level={5} text="Semantic 03 color tokens" />
<Semantic03Tokens />
<DxcHeading level={5} text="Semantic 04 color tokens" />
<Semantic04Tokens />
<DxcHeading level={5} text="Alpha color tokens" />
<AlphaTokens />
</>
<>
{/* Dimensions Tokens */}
<DxcHeading level={4} text="Dimensions" />
<DimensionsTokens />
</>
<>
{/* Font Tokens */}
<DxcHeading level={4} text="Font" />
<DxcHeading level={5} text="Font size tokens" />
<FontSizesTokens />
<DxcHeading level={5} text="Font weight tokens" />
<FontWeightTokens />
<DxcHeading level={5} text="Font family tokens" />
<FontFamilyTokens />
<DxcHeading level={5} text="Font style tokens" />
<FontStylesTokens />
</>
<>
{/* Border Tokens */}
<DxcHeading level={4} text="Border" />
<BorderTokens />
</>
<DxcParagraph>The component layer is still under development.</DxcParagraph>
</>
),
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { TableCode } from "@/common/Code";
import { DxcTable } from "@dxc-technology/halstack-react";

const BorderTokens = () => (
<DxcTable>
<thead>
<tr>
<th>Token</th>
<th>Default value</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<TableCode>line-style-dashed</TableCode>
</td>
<td>dashed</td>
</tr>
<tr>
<td>
<TableCode>line-style-solid</TableCode>
</td>
<td>solid</td>
</tr>
</tbody>
</DxcTable>
);

export default BorderTokens;
Loading