From 531359eef125fe1e42917a97612bb2a08cd39e3c Mon Sep 17 00:00:00 2001 From: Zohar Manor-Abel Date: Mon, 16 Nov 2026 14:57:35 +0000 Subject: [PATCH] Move DiamondDS CSS up a level and fix doc file names - Move DiamondDSTokens.css and DiamondDSTypography.css to src/styles/ - Update imports in DiamondDSTheme and its test - Replace non-existent diamond-ds-roles.css and diamond-ds-tokens.css in the readme and Installation docs --- readme.md | 2 +- src/storybook/Installation.mdx | 4 ++-- src/styles/{diamondDS => }/DiamondDSTokens.css | 0 src/styles/{diamondDS => }/DiamondDSTypography.css | 0 src/themes/DiamondDSTheme.test.ts | 4 ++-- src/themes/DiamondDSTheme.ts | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/styles/{diamondDS => }/DiamondDSTokens.css (100%) rename src/styles/{diamondDS => }/DiamondDSTypography.css (100%) diff --git a/readme.md b/readme.md index ef2ccdc7..7668b28f 100644 --- a/readme.md +++ b/readme.md @@ -60,7 +60,7 @@ root.render( Use the provided `DiamondDSTheme` with the ThemeProvider, or create your own. The theme controls colour via semantic surface tokens and consists of two parts: - Theme configuration (`DiamondDSTheme.ts`) -- Semantic role tokens (`diamond-ds-roles.css`) +- Semantic tokens (`DiamondDSTokens.css`) Navigation components support either static links (with href) or the use of a routing library (with linkComponent and to). For NavLink and FooterLink, if both linkComponent and to are provided, it will use linkComponent. If not, it falls back to using href. diff --git a/src/storybook/Installation.mdx b/src/storybook/Installation.mdx index 26ff9150..519bbc7c 100644 --- a/src/storybook/Installation.mdx +++ b/src/storybook/Installation.mdx @@ -75,7 +75,7 @@ Use this page to install SciReactUI, configure the Diamond Design System theme, The design system theme consists of two parts: - Theme configuration (DiamondDSTheme.ts) - - Semantic role tokens (diamond-ds-roles.css) + - Semantic tokens (DiamondDSTokens.css) ### Finally, add the Components @@ -176,7 +176,7 @@ Use this page to install SciReactUI, configure the Diamond Design System theme, 1. Copy the base files and rename them for your own project: - DiamondDSTheme.ts -> MyDSTheme.ts - - diamond-ds-tokens.css -> my-ds-tokens.css + - DiamondDSTokens.css -> MyDSTokens.css 2. Update the CSS tokens diff --git a/src/styles/diamondDS/DiamondDSTokens.css b/src/styles/DiamondDSTokens.css similarity index 100% rename from src/styles/diamondDS/DiamondDSTokens.css rename to src/styles/DiamondDSTokens.css diff --git a/src/styles/diamondDS/DiamondDSTypography.css b/src/styles/DiamondDSTypography.css similarity index 100% rename from src/styles/diamondDS/DiamondDSTypography.css rename to src/styles/DiamondDSTypography.css diff --git a/src/themes/DiamondDSTheme.test.ts b/src/themes/DiamondDSTheme.test.ts index 57c77bdd..78d4d1c2 100644 --- a/src/themes/DiamondDSTheme.test.ts +++ b/src/themes/DiamondDSTheme.test.ts @@ -8,7 +8,7 @@ import { dirname, resolve } from "node:path"; const tokensCss = readFileSync( resolve( dirname(fileURLToPath(import.meta.url)), - "../styles/diamondDS/DiamondDSTokens.css", + "../styles/DiamondDSTokens.css", ), "utf8", ); @@ -16,7 +16,7 @@ const tokensCss = readFileSync( const typographyCss = readFileSync( resolve( dirname(fileURLToPath(import.meta.url)), - "../styles/diamondDS/DiamondDSTypography.css", + "../styles/DiamondDSTypography.css", ), "utf8", ); diff --git a/src/themes/DiamondDSTheme.ts b/src/themes/DiamondDSTheme.ts index 89d8fe65..24687f2e 100644 --- a/src/themes/DiamondDSTheme.ts +++ b/src/themes/DiamondDSTheme.ts @@ -5,7 +5,7 @@ * into MUI's theme system, component model and runtime styling APIs. * * CSS variables are the source of truth. - * These are defined in diamond-ds-tokens.css. + * These are defined in DiamondDSTokens.css. * * Tokens are the CSS variables. * Roles are the semantic values exposed through the MUI palette and component APIs. @@ -19,8 +19,8 @@ import "@fontsource-variable/inter"; import "@fontsource-variable/outfit"; import "@fontsource/ibm-plex-mono/latin-400.css"; import "@fontsource/ibm-plex-mono/latin-600.css"; -import "../styles/diamondDS/DiamondDSTokens.css"; -import "../styles/diamondDS/DiamondDSTypography.css"; +import "../styles/DiamondDSTokens.css"; +import "../styles/DiamondDSTypography.css"; // Enables `theme.vars` typings for MUI CSS variable themes. import type {} from "@mui/material/themeCssVarsAugmentation";