@red-hat-developer-hub/backstage-plugin-theme 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/components/ThemeProvider.esm.js +43 -2
- package/dist/components/ThemeProvider.esm.js.map +1 -1
- package/dist/darkTheme.esm.js +13 -2
- package/dist/darkTheme.esm.js.map +1 -1
- package/dist/fonts.esm.js +13 -1
- package/dist/fonts.esm.js.map +1 -1
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.esm.js +4 -1
- package/dist/legacy.esm.js.map +1 -1
- package/dist/lightTheme.esm.js +7 -2
- package/dist/lightTheme.esm.js.map +1 -1
- package/dist/utils/contrastTextForBackground.esm.js +14 -0
- package/dist/utils/contrastTextForBackground.esm.js.map +1 -0
- package/dist/utils/createComponents.esm.js +62 -1
- package/dist/utils/createComponents.esm.js.map +1 -1
- package/package.json +8 -2
- package/dist/assets/fonts/font.min.css.esm.js +0 -5
- package/dist/assets/fonts/font.min.css.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-theme
|
|
2
2
|
|
|
3
|
+
## 1.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c44e797: Fix Red Hat font loading in production app bundles by injecting @font-face from the package entrypoints via `fonts.ts` (webpack-resolved woff2 URLs) instead of `font.min.css` styleInject paths that stay relative and fail under publicPath.
|
|
8
|
+
|
|
9
|
+
## 1.5.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c161b0e: Cap BUI dialog max-height under the global header without forcing full viewport height, so content-sized dialogs such as Scorecard data sources keep their natural size.
|
|
14
|
+
- 62b3c25: Fix dark-theme error button WCAG contrast (lighter error.main for text/outlined; darker containedError fill) so axe can enforce RHDHBUGS-2242.
|
|
15
|
+
- 14d7103: Fix NFS contained primary buttons (e.g. CreateButton / Register Existing API) so they match OFS: solid primary fill, correct padding, and readable contrastText when app-config overrides primary.main.
|
|
16
|
+
|
|
3
17
|
## 1.5.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -3,11 +3,13 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { useApi, appThemeApiRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { UnifiedThemeProvider } from '@backstage/theme';
|
|
5
5
|
import { StyledEngineProvider, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
6
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
6
7
|
import GlobalStyles from '@mui/material/GlobalStyles';
|
|
7
8
|
import { useTheme } from '../hooks/useTheme.esm.js';
|
|
8
9
|
import { useThemeConfig } from '../hooks/useThemeConfig.esm.js';
|
|
9
10
|
import { useBranding } from '../hooks/useBranding.esm.js';
|
|
10
11
|
import { buiTokensToCSS } from '../utils/buiTokensToCSS.esm.js';
|
|
12
|
+
import { contrastTextForBackground } from '../utils/contrastTextForBackground.esm.js';
|
|
11
13
|
|
|
12
14
|
const ThemeProvider = ({
|
|
13
15
|
themeName,
|
|
@@ -17,16 +19,20 @@ const ThemeProvider = ({
|
|
|
17
19
|
const branding = useBranding();
|
|
18
20
|
const mui5Theme = theme.getTheme("v5");
|
|
19
21
|
const secondary = mui5Theme.palette.text.secondary;
|
|
22
|
+
const primaryMain = mui5Theme.palette.primary.main;
|
|
23
|
+
const primaryDark = mui5Theme.palette.primary.dark;
|
|
24
|
+
const primaryContrast = contrastTextForBackground(primaryMain);
|
|
25
|
+
const primaryDarkContrast = contrastTextForBackground(primaryDark);
|
|
20
26
|
const buiTokenStyles = useMemo(() => {
|
|
21
27
|
const themes = branding?.theme;
|
|
22
28
|
if (!themes) return null;
|
|
23
29
|
const styles = {};
|
|
24
|
-
for (const [
|
|
30
|
+
for (const [brandingThemeName, themeConfig] of Object.entries(themes)) {
|
|
25
31
|
const tokens = themeConfig?.bui?.tokens;
|
|
26
32
|
if (!tokens) continue;
|
|
27
33
|
const cssMap = buiTokensToCSS(tokens);
|
|
28
34
|
if (Object.keys(cssMap).length === 0) continue;
|
|
29
|
-
const mode = themeConfig.mode ?? (
|
|
35
|
+
const mode = themeConfig.mode ?? (brandingThemeName.includes("dark") ? "dark" : "light");
|
|
30
36
|
styles[`[data-theme-mode='${mode}']`] = {
|
|
31
37
|
...styles[`[data-theme-mode='${mode}']`],
|
|
32
38
|
...cssMap
|
|
@@ -36,10 +42,45 @@ const ThemeProvider = ({
|
|
|
36
42
|
}, [branding?.theme]);
|
|
37
43
|
const customCSS = branding?.customCSS ?? "";
|
|
38
44
|
return /* @__PURE__ */ jsx(UnifiedThemeProvider, { themeName, theme, children: /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsxs(ThemeProvider$1, { theme: mui5Theme, children: [
|
|
45
|
+
/* @__PURE__ */ jsx(CssBaseline, {}),
|
|
39
46
|
/* @__PURE__ */ jsx("style", { children: `
|
|
40
47
|
:root, [data-theme-mode='light'], [data-theme-mode='dark'] {
|
|
41
48
|
--bui-fg-secondary: ${secondary} !important;
|
|
42
49
|
}
|
|
50
|
+
/*
|
|
51
|
+
RHDHBUGS-4042: CreateButton \u2192 <a class="MuiButton-containedPrimary">
|
|
52
|
+
inside BUI HeaderPage. MuiButtonBase (transparent/padding:0) +
|
|
53
|
+
injectFirst beat containedPrimary; unlayered !important restores
|
|
54
|
+
the OFS contained look even if Emotion CssBaseline loses cascade.
|
|
55
|
+
*/
|
|
56
|
+
a.MuiButton-containedPrimary,
|
|
57
|
+
a[class*="MuiButton-containedPrimary"] {
|
|
58
|
+
color: ${primaryContrast} !important;
|
|
59
|
+
background-color: ${primaryMain} !important;
|
|
60
|
+
background-image: none !important;
|
|
61
|
+
border: 0 !important;
|
|
62
|
+
border-radius: 99em !important;
|
|
63
|
+
box-shadow: none !important;
|
|
64
|
+
padding: 6px 16px !important;
|
|
65
|
+
min-height: 36px !important;
|
|
66
|
+
min-width: 64px;
|
|
67
|
+
line-height: 1.75;
|
|
68
|
+
text-decoration: none !important;
|
|
69
|
+
text-transform: none;
|
|
70
|
+
}
|
|
71
|
+
a.MuiButton-containedPrimary:hover,
|
|
72
|
+
a.MuiButton-containedPrimary:focus-visible,
|
|
73
|
+
a[class*="MuiButton-containedPrimary"]:hover,
|
|
74
|
+
a[class*="MuiButton-containedPrimary"]:focus-visible,
|
|
75
|
+
a.MuiButton-containedPrimary:active,
|
|
76
|
+
a[class*="MuiButton-containedPrimary"]:active {
|
|
77
|
+
color: ${primaryDarkContrast} !important;
|
|
78
|
+
background-color: ${primaryDark} !important;
|
|
79
|
+
background-image: none !important;
|
|
80
|
+
border: 0 !important;
|
|
81
|
+
box-shadow: none !important;
|
|
82
|
+
text-decoration: none !important;
|
|
83
|
+
}
|
|
43
84
|
` }),
|
|
44
85
|
buiTokenStyles && /* @__PURE__ */ jsx(GlobalStyles, { styles: buiTokenStyles }),
|
|
45
86
|
customCSS && /* @__PURE__ */ jsx("style", { children: customCSS }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type ReactNode, useMemo } from 'react';\nimport {\n type AppTheme,\n appThemeApiRef,\n type AppThemeApi,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { UnifiedTheme, UnifiedThemeProvider } from '@backstage/theme';\n\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\nimport GlobalStyles from '@mui/material/GlobalStyles';\n\nimport { useTheme } from '../hooks/useTheme';\nimport { useThemeConfig } from '../hooks/useThemeConfig';\nimport { useBranding } from '../hooks/useBranding';\nimport { buiTokensToCSS } from '../utils/buiTokensToCSS';\nimport { ThemeConfig } from '../types';\n\n/**\n * Uses the UnifiedThemeProvider to style MUI v4 and v5 components.\n *\n * This component duplicated the StyledEngineProvider and MUI v5 ThemeProvider\n * to solve an issue that the defaultProps from the component configurations\n * (see `utils/createComponents.ts`) wasn't picked up.\n *\n * https://github.com/backstage/backstage/blob/master/packages/theme/src/unified/UnifiedThemeProvider.tsx#L94-L100\n */\nconst ThemeProvider = ({\n themeName,\n theme,\n children,\n}: {\n themeName: string;\n theme: UnifiedTheme;\n children: ReactNode;\n}) => {\n const branding = useBranding();\n const mui5Theme = theme.getTheme('v5') as Mui5Theme;\n const secondary = mui5Theme.palette.text.secondary;\n\n const buiTokenStyles = useMemo(() => {\n const themes = branding?.theme;\n if (!themes) return null;\n const styles: Record<string, Record<string, string>> = {};\n for (const [themeName, themeConfig] of Object.entries(themes)) {\n const tokens = themeConfig?.bui?.tokens;\n if (!tokens) continue;\n const cssMap = buiTokensToCSS(tokens);\n if (Object.keys(cssMap).length === 0) continue;\n const mode =\n themeConfig.mode ?? (themeName.includes('dark') ? 'dark' : 'light');\n styles[`[data-theme-mode='${mode}']`] = {\n ...styles[`[data-theme-mode='${mode}']`],\n ...cssMap,\n };\n }\n return Object.keys(styles).length > 0 ? styles : null;\n }, [branding?.theme]);\n\n const customCSS = branding?.customCSS ?? '';\n\n return (\n <UnifiedThemeProvider themeName={themeName} theme={theme}>\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={mui5Theme}>\n {/*\n Native style tag (not Emotion) so the declaration is unlayered and\n reliably overrides @backstage/ui @layer tokens for --bui-fg-secondary.\n */}\n <style>{`\n :root, [data-theme-mode='light'], [data-theme-mode='dark'] {\n --bui-fg-secondary: ${secondary} !important;\n }\n `}</style>\n {buiTokenStyles && <GlobalStyles styles={buiTokenStyles} />}\n {customCSS && <style>{customCSS}</style>}\n {children}\n </Mui5Provider>\n </StyledEngineProvider>\n </UnifiedThemeProvider>\n );\n};\n\nexport const createThemeProvider = (\n themeName: string,\n theme: UnifiedTheme,\n): AppTheme['Provider'] =>\n function RHDHThemeProvider({ children }) {\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeConfig = (\n themeName: string,\n themeConfig: ThemeConfig,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeConfig({ children }) {\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeName = (\n themeName: string,\n themeNameForConfig = themeName,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeName({ children }) {\n const themeConfig = useThemeConfig(themeNameForConfig);\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nconst resolveActiveKey = (\n activeId: string | undefined,\n keys: string[],\n): string => {\n if (activeId && keys.includes(activeId)) {\n return activeId;\n }\n const prefersDark = activeId\n ? activeId.includes('dark')\n : window.matchMedia?.('(prefers-color-scheme: dark)')?.matches;\n return prefersDark\n ? (keys.find(n => n.includes('dark')) ?? keys[0])\n : (keys.find(n => !n.includes('dark')) ?? keys[0]);\n};\n\nconst useActiveThemeId = (): string | undefined => {\n let appThemeApi: AppThemeApi | undefined;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n appThemeApi = useApi<AppThemeApi>(appThemeApiRef); // NOSONAR\n } catch {\n // appThemeApi may not be available during createApp initialization\n }\n return appThemeApi?.getActiveThemeId();\n};\n\nexport type SharedThemeEntry = {\n name?: string;\n config?: ThemeConfig;\n theme?: UnifiedTheme;\n};\n\nexport const createSharedThemeProvider = (\n entries: Record<string, SharedThemeEntry>,\n): AppTheme['Provider'] => {\n const keys = Object.keys(entries);\n\n function RHDHSharedThemeProvider({ children }: { children: ReactNode }) {\n const activeId = useActiveThemeId();\n const key = resolveActiveKey(activeId, keys);\n const entry = entries[key];\n\n // Always call hooks unconditionally (Rules of Hooks).\n // For entries that don't need them the results are simply unused.\n const configFromName = useThemeConfig(entry.name ?? key);\n const resolvedConfig = entry.config ?? configFromName;\n const themeFromHook = useTheme(resolvedConfig);\n\n const theme = entry.theme ?? themeFromHook;\n return (\n <ThemeProvider theme={theme} themeName={entry.name ?? key}>\n {children}\n </ThemeProvider>\n );\n }\n return RHDHSharedThemeProvider;\n};\n"],"names":["themeName","Mui5Provider"],"mappings":";;;;;;;;;;;AA+CA,MAAM,gBAAgB,CAAC;AAAA,EACrB,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,SAAA,GAAY,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA;AACrC,EAAA,MAAM,SAAA,GAAY,SAAA,CAAU,OAAA,CAAQ,IAAA,CAAK,SAAA;AAEzC,EAAA,MAAM,cAAA,GAAiB,QAAQ,MAAM;AACnC,IAAA,MAAM,SAAS,QAAA,EAAU,KAAA;AACzB,IAAA,IAAI,CAAC,QAAQ,OAAO,IAAA;AACpB,IAAA,MAAM,SAAiD,EAAC;AACxD,IAAA,KAAA,MAAW,CAACA,UAAAA,EAAW,WAAW,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAC7D,MAAA,MAAM,MAAA,GAAS,aAAa,GAAA,EAAK,MAAA;AACjC,MAAA,IAAI,CAAC,MAAA,EAAQ;AACb,MAAA,MAAM,MAAA,GAAS,eAAe,MAAM,CAAA;AACpC,MAAA,IAAI,MAAA,CAAO,IAAA,CAAK,MAAM,CAAA,CAAE,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EAAA,EAAc,KAAA,EAAc,WAAW,KAAA,CAAM,IAAA,IAAQ,KACnD,QAAA,EACH,CAAA;AAAA,EAEJ;AACA,EAAA,OAAO,uBAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type ReactNode, useMemo } from 'react';\nimport {\n type AppTheme,\n appThemeApiRef,\n type AppThemeApi,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { UnifiedTheme, UnifiedThemeProvider } from '@backstage/theme';\n\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport GlobalStyles from '@mui/material/GlobalStyles';\n\nimport { useTheme } from '../hooks/useTheme';\nimport { useThemeConfig } from '../hooks/useThemeConfig';\nimport { useBranding } from '../hooks/useBranding';\nimport { buiTokensToCSS } from '../utils/buiTokensToCSS';\nimport { contrastTextForBackground } from '../utils/contrastTextForBackground';\nimport { ThemeConfig } from '../types';\n\n/**\n * Uses the UnifiedThemeProvider to style MUI v4 and v5 components.\n *\n * This component duplicated the StyledEngineProvider and MUI v5 ThemeProvider\n * to solve an issue that the defaultProps from the component configurations\n * (see `utils/createComponents.ts`) wasn't picked up.\n *\n * https://github.com/backstage/backstage/blob/master/packages/theme/src/unified/UnifiedThemeProvider.tsx#L94-L100\n */\nconst ThemeProvider = ({\n themeName,\n theme,\n children,\n}: {\n themeName: string;\n theme: UnifiedTheme;\n children: ReactNode;\n}) => {\n const branding = useBranding();\n const mui5Theme = theme.getTheme('v5') as Mui5Theme;\n const secondary = mui5Theme.palette.text.secondary;\n const primaryMain = mui5Theme.palette.primary.main;\n const primaryDark = mui5Theme.palette.primary.dark;\n // Derive from fill so app-config `primary.main` overrides don't keep a\n // stale merged contrastText (dark default #151515 on customized blues).\n const primaryContrast = contrastTextForBackground(primaryMain);\n const primaryDarkContrast = contrastTextForBackground(primaryDark);\n\n const buiTokenStyles = useMemo(() => {\n const themes = branding?.theme;\n if (!themes) return null;\n const styles: Record<string, Record<string, string>> = {};\n for (const [brandingThemeName, themeConfig] of Object.entries(themes)) {\n const tokens = themeConfig?.bui?.tokens;\n if (!tokens) continue;\n const cssMap = buiTokensToCSS(tokens);\n if (Object.keys(cssMap).length === 0) continue;\n const mode =\n themeConfig.mode ??\n (brandingThemeName.includes('dark') ? 'dark' : 'light');\n styles[`[data-theme-mode='${mode}']`] = {\n ...styles[`[data-theme-mode='${mode}']`],\n ...cssMap,\n };\n }\n return Object.keys(styles).length > 0 ? styles : null;\n }, [branding?.theme]);\n\n const customCSS = branding?.customCSS ?? '';\n\n return (\n <UnifiedThemeProvider themeName={themeName} theme={theme}>\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={mui5Theme}>\n {/*\n NFS does not mount CssBaseline elsewhere. Without it,\n MuiCssBaseline.styleOverrides (shell chrome, CreateButton, …)\n never reach the DOM. Backstage UnifiedThemeProvider also omits it.\n */}\n <CssBaseline />\n {/*\n Native style tag (not Emotion) so the declaration is unlayered and\n reliably overrides @backstage/ui @layer tokens for --bui-fg-secondary.\n */}\n <style>{`\n :root, [data-theme-mode='light'], [data-theme-mode='dark'] {\n --bui-fg-secondary: ${secondary} !important;\n }\n /*\n RHDHBUGS-4042: CreateButton → <a class=\"MuiButton-containedPrimary\">\n inside BUI HeaderPage. MuiButtonBase (transparent/padding:0) +\n injectFirst beat containedPrimary; unlayered !important restores\n the OFS contained look even if Emotion CssBaseline loses cascade.\n */\n a.MuiButton-containedPrimary,\n a[class*=\"MuiButton-containedPrimary\"] {\n color: ${primaryContrast} !important;\n background-color: ${primaryMain} !important;\n background-image: none !important;\n border: 0 !important;\n border-radius: 99em !important;\n box-shadow: none !important;\n padding: 6px 16px !important;\n min-height: 36px !important;\n min-width: 64px;\n line-height: 1.75;\n text-decoration: none !important;\n text-transform: none;\n }\n a.MuiButton-containedPrimary:hover,\n a.MuiButton-containedPrimary:focus-visible,\n a[class*=\"MuiButton-containedPrimary\"]:hover,\n a[class*=\"MuiButton-containedPrimary\"]:focus-visible,\n a.MuiButton-containedPrimary:active,\n a[class*=\"MuiButton-containedPrimary\"]:active {\n color: ${primaryDarkContrast} !important;\n background-color: ${primaryDark} !important;\n background-image: none !important;\n border: 0 !important;\n box-shadow: none !important;\n text-decoration: none !important;\n }\n `}</style>\n {buiTokenStyles && <GlobalStyles styles={buiTokenStyles} />}\n {customCSS && <style>{customCSS}</style>}\n {children}\n </Mui5Provider>\n </StyledEngineProvider>\n </UnifiedThemeProvider>\n );\n};\n\nexport const createThemeProvider = (\n themeName: string,\n theme: UnifiedTheme,\n): AppTheme['Provider'] =>\n function RHDHThemeProvider({ children }) {\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeConfig = (\n themeName: string,\n themeConfig: ThemeConfig,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeConfig({ children }) {\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeName = (\n themeName: string,\n themeNameForConfig = themeName,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeName({ children }) {\n const themeConfig = useThemeConfig(themeNameForConfig);\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nconst resolveActiveKey = (\n activeId: string | undefined,\n keys: string[],\n): string => {\n if (activeId && keys.includes(activeId)) {\n return activeId;\n }\n const prefersDark = activeId\n ? activeId.includes('dark')\n : window.matchMedia?.('(prefers-color-scheme: dark)')?.matches;\n return prefersDark\n ? (keys.find(n => n.includes('dark')) ?? keys[0])\n : (keys.find(n => !n.includes('dark')) ?? keys[0]);\n};\n\nconst useActiveThemeId = (): string | undefined => {\n let appThemeApi: AppThemeApi | undefined;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n appThemeApi = useApi<AppThemeApi>(appThemeApiRef); // NOSONAR\n } catch {\n // appThemeApi may not be available during createApp initialization\n }\n return appThemeApi?.getActiveThemeId();\n};\n\nexport type SharedThemeEntry = {\n name?: string;\n config?: ThemeConfig;\n theme?: UnifiedTheme;\n};\n\nexport const createSharedThemeProvider = (\n entries: Record<string, SharedThemeEntry>,\n): AppTheme['Provider'] => {\n const keys = Object.keys(entries);\n\n function RHDHSharedThemeProvider({ children }: { children: ReactNode }) {\n const activeId = useActiveThemeId();\n const key = resolveActiveKey(activeId, keys);\n const entry = entries[key];\n\n // Always call hooks unconditionally (Rules of Hooks).\n // For entries that don't need them the results are simply unused.\n const configFromName = useThemeConfig(entry.name ?? key);\n const resolvedConfig = entry.config ?? configFromName;\n const themeFromHook = useTheme(resolvedConfig);\n\n const theme = entry.theme ?? themeFromHook;\n return (\n <ThemeProvider theme={theme} themeName={entry.name ?? key}>\n {children}\n </ThemeProvider>\n );\n }\n return RHDHSharedThemeProvider;\n};\n"],"names":["Mui5Provider"],"mappings":";;;;;;;;;;;;;AAiDA,MAAM,gBAAgB,CAAC;AAAA,EACrB,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,SAAA,GAAY,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA;AACrC,EAAA,MAAM,SAAA,GAAY,SAAA,CAAU,OAAA,CAAQ,IAAA,CAA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|
@@ -2,10 +2,21 @@ import { palettes } from '@backstage/theme';
|
|
|
2
2
|
|
|
3
3
|
const darkThemeOverrides = {
|
|
4
4
|
primary: {
|
|
5
|
-
main: "#92c5f9"
|
|
5
|
+
main: "#92c5f9",
|
|
6
|
+
// Hover lighter on dark surfaces (PF brand hover), not MUI darken.
|
|
7
|
+
dark: "#b9dafc",
|
|
8
|
+
contrastText: "#151515"
|
|
6
9
|
},
|
|
7
10
|
secondary: {
|
|
8
|
-
main: "#92c5f9"
|
|
11
|
+
main: "#92c5f9",
|
|
12
|
+
dark: "#b9dafc",
|
|
13
|
+
contrastText: "#151515"
|
|
14
|
+
},
|
|
15
|
+
// MUI default error (#f44336) fails WCAG AA as text/outline on #292929 (~3.95:1)
|
|
16
|
+
// and as contained fill with white (~3.68:1). Lighter main covers text/outlined;
|
|
17
|
+
// createComponents uses a darker containedError fill for white label text.
|
|
18
|
+
error: {
|
|
19
|
+
main: "#FF5252"
|
|
9
20
|
},
|
|
10
21
|
navigation: {
|
|
11
22
|
// Match page-inset / app-bar / sidebar chrome (PatternFly shell).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darkTheme.esm.js","sources":["../src/darkTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const darkThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#92c5f9',\n },\n secondary: {\n main: '#92c5f9',\n },\n navigation: {\n // Match page-inset / app-bar / sidebar chrome (PatternFly shell).\n background: '#151515',\n indicator: 'transparent',\n color: '#ffffff',\n selectedColor: '#ffffff',\n navItem: {\n hoverBackground: '#292929',\n },\n submenu: {\n background: '#292929',\n },\n },\n text: {\n primary: '#ffffff',\n secondary: '#c7c7c7',\n },\n background: {\n default: '#292929',\n paper: '#292929',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\n pageInsetBackgroundColor: '#151515',\n\n disabled: '#AAABAC',\n disabledBackground: '#444548',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#A3A3A3',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.48), 0 0 0.25rem 0 rgba(3, 3, 3, 0.24)',\n\n cardBackgroundColor: '#292929',\n cardBorderColor: '#A3A3A3',\n\n mainSectionBackgroundColor: '#292929',\n formControlBackgroundColor: '#36373A',\n\n sidebarBackgroundColor: '#151515',\n sidebarDividerColor: '#383838',\n sidebarItemSelectedBackgroundColor: '#292929',\n\n tableTitleColor: '#E0E0E0',\n tableSubtitleColor: '#E0E0E0',\n tableColumnTitleColor: '#E0E0E0',\n tableRowHover: '#292929',\n tableBorderColor: '#515151',\n tableBackgroundColor: '#292929',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.1500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'dark',\n\n appBarBackgroundColor: '#151515',\n appBarForegroundColor: '#ffffff',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n secondary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n cards: {\n headerTextColor: '#FFF',\n headerBackgroundColor: '#292929',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customDarkTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['dark'] & PaletteOptions = palettes.dark;\n return {\n ...palette,\n ...darkThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,kBAAA,GAAkD;AAAA,EAC7D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM;AAAA,
|
|
1
|
+
{"version":3,"file":"darkTheme.esm.js","sources":["../src/darkTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const darkThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#92c5f9',\n // Hover lighter on dark surfaces (PF brand hover), not MUI darken.\n dark: '#b9dafc',\n contrastText: '#151515',\n },\n secondary: {\n main: '#92c5f9',\n dark: '#b9dafc',\n contrastText: '#151515',\n },\n // MUI default error (#f44336) fails WCAG AA as text/outline on #292929 (~3.95:1)\n // and as contained fill with white (~3.68:1). Lighter main covers text/outlined;\n // createComponents uses a darker containedError fill for white label text.\n error: {\n main: '#FF5252',\n },\n navigation: {\n // Match page-inset / app-bar / sidebar chrome (PatternFly shell).\n background: '#151515',\n indicator: 'transparent',\n color: '#ffffff',\n selectedColor: '#ffffff',\n navItem: {\n hoverBackground: '#292929',\n },\n submenu: {\n background: '#292929',\n },\n },\n text: {\n primary: '#ffffff',\n secondary: '#c7c7c7',\n },\n background: {\n default: '#292929',\n paper: '#292929',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\n pageInsetBackgroundColor: '#151515',\n\n disabled: '#AAABAC',\n disabledBackground: '#444548',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#A3A3A3',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.48), 0 0 0.25rem 0 rgba(3, 3, 3, 0.24)',\n\n cardBackgroundColor: '#292929',\n cardBorderColor: '#A3A3A3',\n\n mainSectionBackgroundColor: '#292929',\n formControlBackgroundColor: '#36373A',\n\n sidebarBackgroundColor: '#151515',\n sidebarDividerColor: '#383838',\n sidebarItemSelectedBackgroundColor: '#292929',\n\n tableTitleColor: '#E0E0E0',\n tableSubtitleColor: '#E0E0E0',\n tableColumnTitleColor: '#E0E0E0',\n tableRowHover: '#292929',\n tableBorderColor: '#515151',\n tableBackgroundColor: '#292929',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.1500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'dark',\n\n appBarBackgroundColor: '#151515',\n appBarForegroundColor: '#ffffff',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n secondary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n cards: {\n headerTextColor: '#FFF',\n headerBackgroundColor: '#292929',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customDarkTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['dark'] & PaletteOptions = palettes.dark;\n return {\n ...palette,\n ...darkThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,kBAAA,GAAkD;AAAA,EAC7D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,SAAA;AAAA;AAAA,IAEN,IAAA,EAAM,SAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,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,SAAA;AAAA,MACtB,4BAAA,EAA8B,6BAAA;AAAA,MAE9B,YAAA,EAAc,MAAA;AAAA,MAEd,sBAAA,EAAwB,MAAA;AAAA,MAExB,qBAAA,EAAuB,SAAA;AAAA,MACvB,qBAAA,EAAuB,SAAA;AAAA,MACvB,qBAAA,EAAuB,MAAA;AAAA,MAEvB,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,SAAA;AAAA,MACN,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,KAAA,EAAO;AAAA,MACL,eAAA,EAAiB,MAAA;AAAA,MACjB,qBAAA,EAAuB,SAAA;AAAA,MACvB,qBAAA,EAAuB;AAAA;AACzB;AAEJ;AAEO,MAAM,kBAAkB,MAA0B;AACvD,EAAA,MAAM,UAAsD,QAAA,CAAS,IAAA;AACrE,EAAA,OAAO;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
package/dist/fonts.esm.js
CHANGED
|
@@ -87,6 +87,18 @@ const redHatFonts = {
|
|
|
87
87
|
"monospace"
|
|
88
88
|
].join(", ")
|
|
89
89
|
};
|
|
90
|
+
function injectRedHatFontFaces() {
|
|
91
|
+
if (typeof document === "undefined" || document.querySelector('style[data-rhdh-fonts="redhat"]')) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const css = redHatFontFaces.map(
|
|
95
|
+
({ fontFamily, src, fontWeight, fontStyle, fontDisplay }) => `@font-face{font-family:'${fontFamily}';src:${src};font-weight:${fontWeight};font-style:${fontStyle};font-display:${fontDisplay};}`
|
|
96
|
+
).join("");
|
|
97
|
+
const style = document.createElement("style");
|
|
98
|
+
style.dataset.rhdhFonts = "redhat";
|
|
99
|
+
style.appendChild(document.createTextNode(css));
|
|
100
|
+
document.head.appendChild(style);
|
|
101
|
+
}
|
|
90
102
|
|
|
91
|
-
export { RedHatTextFontFace, redHatFontFaces, redHatFonts };
|
|
103
|
+
export { RedHatTextFontFace, injectRedHatFontFaces, redHatFontFaces, redHatFonts };
|
|
92
104
|
//# sourceMappingURL=fonts.esm.js.map
|
package/dist/fonts.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.esm.js","sources":["../src/fonts.
|
|
1
|
+
{"version":3,"file":"fonts.esm.js","sources":["../src/fonts.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport RedHatDisplay from './assets/fonts/RedHatDisplay/RedHatDisplayVF.woff2';\nimport RedHatDisplayItalic from './assets/fonts/RedHatDisplay/RedHatDisplayVF-Italic.woff2';\nimport RedHatText from './assets/fonts/RedHatText/RedHatTextVF.woff2';\nimport RedHatTextItalic from './assets/fonts/RedHatText/RedHatTextVF-Italic.woff2';\nimport RedHatMono from './assets/fonts/RedHatMono/RedHatMonoVF.woff2';\nimport RedHatMonoItalic from './assets/fonts/RedHatMono/RedHatMonoVF-Italic.woff2';\n\nconst RedHatDisplayFontFace = {\n fontFamily: 'RedHatDisplay',\n src: `url(${RedHatDisplay}) format('woff2-variations')`,\n fontWeight: '300 900',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatDisplayItalicFontFace = {\n fontFamily: 'RedHatDisplay',\n src: `url(${RedHatDisplayItalic}) format('woff2-variations')`,\n fontWeight: '300 900',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nexport const RedHatTextFontFace = {\n fontFamily: 'RedHatText',\n src: `url(${RedHatText}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatTextItalicFontFace = {\n fontFamily: 'RedHatText',\n src: `url(${RedHatTextItalic}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nconst RedHatMonoFontFace = {\n fontFamily: 'RedHatMono',\n src: `url(${RedHatMono}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatMonoItalicFontFace = {\n fontFamily: 'RedHatMono',\n src: `url(${RedHatMonoItalic}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nexport const redHatFontFaces = [\n RedHatDisplayFontFace,\n RedHatDisplayItalicFontFace,\n RedHatTextFontFace,\n RedHatTextItalicFontFace,\n RedHatMonoFontFace,\n RedHatMonoItalicFontFace,\n];\n\nexport const redHatFonts = {\n text: [\n 'RedHatText',\n '\"Helvetica Neue\"',\n '-apple-system',\n '\"Segoe UI\"',\n 'Roboto',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ].join(', '),\n heading: [\n 'RedHatDisplay',\n '\"Helvetica Neue\"',\n '-apple-system',\n '\"Segoe UI\"',\n 'Roboto',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ].join(', '),\n monospace: [\n 'RedHatMono',\n '\"Liberation Mono\"',\n 'consolas',\n '\"SFMono-Regular\"',\n 'menlo',\n 'monaco',\n '\"Courier New\"',\n 'monospace',\n ].join(', '),\n};\n\n/**\n * Inject @font-face rules using webpack-resolved woff2 URLs.\n * CSS url() paths must not be baked into published *.css.esm.js — those stay\n * relative and break under app publicPath. Call from package entrypoints.\n */\nexport function injectRedHatFontFaces(): void {\n if (\n typeof document === 'undefined' ||\n document.querySelector('style[data-rhdh-fonts=\"redhat\"]')\n ) {\n return;\n }\n const css = redHatFontFaces\n .map(\n ({ fontFamily, src, fontWeight, fontStyle, fontDisplay }) =>\n `@font-face{font-family:'${fontFamily}';src:${src};font-weight:${fontWeight};font-style:${fontStyle};font-display:${fontDisplay};}`,\n )\n .join('');\n const style = document.createElement('style');\n style.dataset.rhdhFonts = 'redhat';\n style.appendChild(document.createTextNode(css));\n document.head.appendChild(style);\n}\n"],"names":[],"mappings":";;;;;;;AAuBA,MAAM,qBAAA,GAAwB;AAAA,EAC5B,UAAA,EAAY,eAAA;AAAA,EACZ,GAAA,EAAK,OAAO,aAAa,CAAA,4BAAA,CAAA;AAAA,EACzB,UAAA,EAAY,SAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACf,CAAA;AAEA,MAAM,2BAAA,GAA8B;AAAA,EAClC,UAAA,EAAY,eAAA;AAAA,EACZ,GAAA,EAAK,OAAO,mBAAmB,CAAA,4BAAA,CAAA;AAAA,EAC/B,UAAA,EAAY,SAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACf,CAAA;AAEO,MAAM,kBAAA,GAAqB;AAAA,EAChC,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,OAAO,UAAU,CAAA,4BAAA,CAAA;AAAA,EACtB,UAAA,EAAY,SAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACf;AAEA,MAAM,wBAAA,GAA2B;AAAA,EAC/B,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,OAAO,gBAAgB,CAAA,4BAAA,CAAA;AAAA,EAC5B,UAAA,EAAY,SAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACf,CAAA;AAEA,MAAM,kBAAA,GAAqB;AAAA,EACzB,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,OAAO,UAAU,CAAA,4BAAA,CAAA;AAAA,EACtB,U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AA,EAAK,UAAA,EAAY,WAAW,WAAA,EAAY,KACrD,CAAA,wBAAA,EAA2B,UAAU,SAAS,GAAG,CAAA,aAAA,EAAgB,UAAU,CAAA,YAAA,EAAe,SAAS,iBAAiB,WAAW,CAAA,EAAA;AAAA,GACnI,CACC,KAAK,EAAE,CAAA;AACV,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AAC5C,EAAA,KAAA,CAAM,QAAQ,SAAA,GAAY,QAAA;AAC1B,EAAA,KAAA,CAAM,WAAA,CAAY,QAAA,CAAS,cAAA,CAAe,GAAG,CAAC,CAAA;AAC9C,EAAA,QAAA,CAAS,IAAA,CAAK,YAAY,KAAK,CAAA;AACjC;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { ThemeBlueprint } from '@backstage/plugin-app-react';
|
|
3
3
|
import { getThemes } from './themes.esm.js';
|
|
4
|
-
import './
|
|
4
|
+
import { injectRedHatFontFaces } from './fonts.esm.js';
|
|
5
5
|
import './assets/bui/tokens.css.esm.js';
|
|
6
6
|
import './assets/bui/component-overrides.css.esm.js';
|
|
7
7
|
export { LogoFull } from './components/LogoFull.esm.js';
|
|
@@ -11,8 +11,10 @@ import 'react';
|
|
|
11
11
|
import '@backstage/core-plugin-api';
|
|
12
12
|
import '@backstage/theme';
|
|
13
13
|
import '@mui/material/styles';
|
|
14
|
+
import '@mui/material/CssBaseline';
|
|
14
15
|
import '@mui/material/GlobalStyles';
|
|
15
16
|
|
|
17
|
+
injectRedHatFontFaces();
|
|
16
18
|
const rhdhThemeModule = createFrontendModule({
|
|
17
19
|
pluginId: "app",
|
|
18
20
|
extensions: getThemes().map(
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH Theme plugin for Backstage.\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport { getThemes } from './themes';\
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH Theme plugin for Backstage.\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport { getThemes } from './themes';\nimport { injectRedHatFontFaces } from './fonts';\nimport './assets/bui/tokens.css';\nimport './assets/bui/component-overrides.css';\n\n// Side-effect: inject Red Hat @font-face rules with webpack-resolved woff2 URLs.\ninjectRedHatFontFaces();\n\nexport { LogoFull, LogoIcon } from './components';\n\n/**\n * RHDH themes as NFS extensions (ThemeBlueprint).\n * Only the app can register ThemeBlueprint; we use the same theme definitions\n * from the theme plugin (getThemes()) so the app exposes only the current RHDH\n * light and dark themes.\n *\n * @public\n */\nconst rhdhThemeModule = createFrontendModule({\n pluginId: 'app',\n extensions: getThemes().map(appTheme =>\n ThemeBlueprint.make({\n name: appTheme.id,\n params: {\n theme: {\n id: appTheme.id,\n title: appTheme.title,\n variant: appTheme.variant,\n icon: appTheme.icon,\n Provider: appTheme.Provider,\n },\n },\n }),\n ),\n});\n\nexport default rhdhThemeModule;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8BA,qBAAA,EAAsB;AAYtB,MAAM,kBAAkB,oBAAA,CAAqB;AAAA,EAC3C,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY,WAAU,CAAE,GAAA;AAAA,IAAI,CAAA,QAAA,KAC1B,eAAe,IAAA,CAAK;AAAA,MAClB,MAAM,QAAA,CAAS,EAAA;AAAA,MACf,MAAA,EAAQ;AAAA,QACN,KAAA,EAAO;AAAA,UACL,IAAI,QAAA,CAAS,EAAA;AAAA,UACb,OAAO,QAAA,CAAS,KAAA;AAAA,UAChB,SAAS,QAAA,CAAS,OAAA;AAAA,UAClB,MAAM,QAAA,CAAS,IAAA;AAAA,UACf,UAAU,QAAA,CAAS;AAAA;AACrB;AACF,KACD;AAAA;AAEL,CAAC;;;;"}
|
package/dist/legacy.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';
|
|
2
2
|
export { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';
|
|
3
|
-
import './
|
|
3
|
+
import { injectRedHatFontFaces } from './fonts.esm.js';
|
|
4
4
|
export { useBranding } from './hooks/useBranding.esm.js';
|
|
5
5
|
export { useThemeConfig } from './hooks/useThemeConfig.esm.js';
|
|
6
6
|
export { useThemeOptions } from './hooks/useThemeOptions.esm.js';
|
|
@@ -12,5 +12,8 @@ import 'react';
|
|
|
12
12
|
import '@backstage/core-plugin-api';
|
|
13
13
|
import '@backstage/theme';
|
|
14
14
|
import '@mui/material/styles';
|
|
15
|
+
import '@mui/material/CssBaseline';
|
|
15
16
|
import '@mui/material/GlobalStyles';
|
|
17
|
+
|
|
18
|
+
injectRedHatFontFaces();
|
|
16
19
|
//# sourceMappingURL=legacy.esm.js.map
|
package/dist/legacy.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legacy.esm.js","sources":["../src/legacyExports.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';\nexport { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';\n\nimport { injectRedHatFontFaces } from './fonts';\n\n// Side-effect: inject Red Hat @font-face rules with webpack-resolved woff2 URLs.\ninjectRedHatFontFaces();\n\nexport * from './hooks';\nexport * from './themes';\nexport { LogoFull, LogoIcon } from './components';\nexport type {\n BackstageThemePalette,\n RHDHThemePalette,\n ThemeConfigPalette,\n ThemeConfigPageTheme,\n ThemeConfigOptions,\n ThemeConfig,\n BUITokens,\n Branding,\n Config,\n} from './types';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAsBA,qBAAA,EAAsB"}
|
package/dist/lightTheme.esm.js
CHANGED
|
@@ -2,10 +2,15 @@ import { palettes } from '@backstage/theme';
|
|
|
2
2
|
|
|
3
3
|
const lightThemeOverrides = {
|
|
4
4
|
primary: {
|
|
5
|
-
main: "#0066CC"
|
|
5
|
+
main: "#0066CC",
|
|
6
|
+
// OFS CreateButton hover (MUI darken of #0066CC → rgb(0,71,142)).
|
|
7
|
+
dark: "#00478e",
|
|
8
|
+
contrastText: "#ffffff"
|
|
6
9
|
},
|
|
7
10
|
secondary: {
|
|
8
|
-
main: "#0066CC"
|
|
11
|
+
main: "#0066CC",
|
|
12
|
+
dark: "#00478e",
|
|
13
|
+
contrastText: "#ffffff"
|
|
9
14
|
},
|
|
10
15
|
navigation: {
|
|
11
16
|
background: "#f2f2f2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightTheme.esm.js","sources":["../src/lightTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const lightThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n },\n navigation: {\n background: '#f2f2f2',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#FFF',\n },\n },\n text: {\n primary: '#151515',\n // PatternFly --pf-v5-global--Color--200; AA on white and #f2f2f2 nav chrome\n secondary: '#6A6E73',\n },\n // MUI defaults (#0288d1 / #ed6c02) fail WCAG AA on white (~3.1–3.9:1)\n info: {\n main: '#0066CC',\n },\n warning: {\n main: '#C05600',\n },\n background: {\n default: '#FFFFFF',\n paper: '#FFFFFF',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\n pageInsetBackgroundColor: '#f2f2f2',\n\n disabled: '#6A6E73',\n disabledBackground: '#D2D2D2',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#C7C7C7',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)',\n\n cardBackgroundColor: '#FFF',\n cardBorderColor: '#C7C7C7',\n\n mainSectionBackgroundColor: '#FFF',\n formControlBackgroundColor: '#FFF',\n\n sidebarBackgroundColor: '#f2f2f2',\n sidebarDividerColor: '#c7c7c7',\n sidebarItemSelectedBackgroundColor: '#FFF',\n\n tableTitleColor: '#181818',\n tableSubtitleColor: '#616161',\n tableColumnTitleColor: '#151515',\n tableRowHover: '#F5F5F5',\n tableBorderColor: '#E0E0E0',\n tableBackgroundColor: '#FFF',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.2500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'light',\n\n appBarBackgroundColor: '#f2f2f2',\n appBarForegroundColor: '#1f1f1f',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n cards: {\n headerTextColor: '#151515',\n headerBackgroundColor: '#FFF',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customLightTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['light'] & PaletteOptions = palettes.light;\n return {\n ...palette,\n ...lightThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,mBAAA,GAAmD;AAAA,EAC9D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM;AAAA,
|
|
1
|
+
{"version":3,"file":"lightTheme.esm.js","sources":["../src/lightTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const lightThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#0066CC',\n // OFS CreateButton hover (MUI darken of #0066CC → rgb(0,71,142)).\n dark: '#00478e',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#0066CC',\n dark: '#00478e',\n contrastText: '#ffffff',\n },\n navigation: {\n background: '#f2f2f2',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#FFF',\n },\n },\n text: {\n primary: '#151515',\n // PatternFly --pf-v5-global--Color--200; AA on white and #f2f2f2 nav chrome\n secondary: '#6A6E73',\n },\n // MUI defaults (#0288d1 / #ed6c02) fail WCAG AA on white (~3.1–3.9:1)\n info: {\n main: '#0066CC',\n },\n warning: {\n main: '#C05600',\n },\n background: {\n default: '#FFFFFF',\n paper: '#FFFFFF',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\n pageInsetBackgroundColor: '#f2f2f2',\n\n disabled: '#6A6E73',\n disabledBackground: '#D2D2D2',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#C7C7C7',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)',\n\n cardBackgroundColor: '#FFF',\n cardBorderColor: '#C7C7C7',\n\n mainSectionBackgroundColor: '#FFF',\n formControlBackgroundColor: '#FFF',\n\n sidebarBackgroundColor: '#f2f2f2',\n sidebarDividerColor: '#c7c7c7',\n sidebarItemSelectedBackgroundColor: '#FFF',\n\n tableTitleColor: '#181818',\n tableSubtitleColor: '#616161',\n tableColumnTitleColor: '#151515',\n tableRowHover: '#F5F5F5',\n tableBorderColor: '#E0E0E0',\n tableBackgroundColor: '#FFF',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.2500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'light',\n\n appBarBackgroundColor: '#f2f2f2',\n appBarForegroundColor: '#1f1f1f',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n cards: {\n headerTextColor: '#151515',\n headerBackgroundColor: '#FFF',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customLightTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['light'] & PaletteOptions = palettes.light;\n return {\n ...palette,\n ...lightThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,mBAAA,GAAmD;AAAA,EAC9D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,SAAA;AAAA;AAAA,IAEN,IAAA,EAAM,SAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAA,EAAY,SAAA;AAAA,IACZ,SAAA,EAAW,aAAA;AAAA,IACX,KAAA,EAAO,SAAA;AAAA,IACP,aAAA,EAAe,SAAA;AAAA,IACf,OAAA,EAAS;AAAA,MACP,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,UAAA,EAAY;AAAA;AACd,GACF;AAAA,EACA,IAAA,EAAM;AAAA,I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,IAAA,EAAM,SAAA;AAAA,MACN,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,KAAA,EAAO;AAAA,MACL,eAAA,EAAiB,SAAA;AAAA,MACjB,qBAAA,EAAuB,MAAA;AAAA,MACvB,qBAAA,EAAuB;AAAA;AACzB;AAEJ;AAEO,MAAM,mBAAmB,MAA0B;AACxD,EAAA,MAAM,UAAuD,QAAA,CAAS,KAAA;AACtE,EAAA,OAAO;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getContrastRatio } from '@mui/material/styles';
|
|
2
|
+
|
|
3
|
+
const contrastTextForBackground = (background, contrastThreshold = 3) => {
|
|
4
|
+
try {
|
|
5
|
+
if (getContrastRatio(background, "#ffffff") >= contrastThreshold) {
|
|
6
|
+
return "#ffffff";
|
|
7
|
+
}
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
return "#151515";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { contrastTextForBackground };
|
|
14
|
+
//# sourceMappingURL=contrastTextForBackground.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrastTextForBackground.esm.js","sources":["../../src/utils/contrastTextForBackground.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getContrastRatio } from '@mui/material/styles';\n\n/**\n * Same rule as MUI `palette.getContrastText`: prefer white when it meets the\n * contrast threshold, otherwise dark text. Needed because app-config often\n * overrides `primary.main` while deep-merge keeps a stale `contrastText`\n * (e.g. dark default `#151515` for `#92c5f9` left on customized `#0093F0`).\n */\nexport const contrastTextForBackground = (\n background: string,\n contrastThreshold = 3,\n): string => {\n try {\n if (getContrastRatio(background, '#ffffff') >= contrastThreshold) {\n return '#ffffff';\n }\n } catch {\n // Invalid color — fall through to dark text.\n }\n return '#151515';\n};\n"],"names":[],"mappings":";;AAwBO,MAAM,yBAAA,GAA4B,CACvC,UAAA,EACA,iBAAA,GAAoB,CAAA,KACT;AACX,EAAA,IAAI;AACF,IAAA,IAAI,gBAAA,CAAiB,UAAA,EAAY,SAAS,CAAA,IAAK,iBAAA,EAAmB;AAChE,MAAA,OAAO,SAAA;AAAA,IACT;AAAA,EACF,CAAA,CAAA,MAAQ;AAAA,EAER;AACA,EAAA,OAAO,SAAA;AACT;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defaultComponentThemes } from '@backstage/theme';
|
|
2
2
|
import { redHatFonts, redHatFontFaces } from '../fonts.esm.js';
|
|
3
|
+
import { contrastTextForBackground } from './contrastTextForBackground.esm.js';
|
|
3
4
|
import { resolveNavigationSidebarColors } from './navigationSidebarColors.esm.js';
|
|
4
5
|
|
|
5
6
|
const createComponents = (themeConfig) => {
|
|
@@ -9,6 +10,12 @@ const createComponents = (themeConfig) => {
|
|
|
9
10
|
const general = palette.rhdh?.general || {};
|
|
10
11
|
const rhdhPrimary = palette.rhdh?.primary || {};
|
|
11
12
|
const rhdhSecondary = palette.rhdh?.secondary || {};
|
|
13
|
+
const isDarkMode = palette.mode === "dark" || palette.type === "dark";
|
|
14
|
+
const primaryPalette = palette.primary;
|
|
15
|
+
const primaryMain = primaryPalette?.main ?? rhdhPrimary.main ?? "#0066CC";
|
|
16
|
+
const primaryDark = primaryPalette?.dark ?? "#00478e";
|
|
17
|
+
const primaryContrast = contrastTextForBackground(primaryMain);
|
|
18
|
+
const primaryDarkContrast = contrastTextForBackground(primaryDark);
|
|
12
19
|
const chromeBackgroundColor = general.pageInsetBackgroundColor ?? general.appBarBackgroundColor ?? general.sidebarBackgroundColor;
|
|
13
20
|
const appBarBackgroundColor = general.appBarBackgroundColor ?? chromeBackgroundColor;
|
|
14
21
|
const pageInset = general.pageInset || "1.5rem";
|
|
@@ -53,7 +60,6 @@ const createComponents = (themeConfig) => {
|
|
|
53
60
|
zIndex: 1300
|
|
54
61
|
},
|
|
55
62
|
':root:has(#global-header) [class*="bui-DialogOverlay"] > [class*="bui-Dialog"]': {
|
|
56
|
-
height: `calc(100vh - ${dialogMastheadOffset} - 3rem) !important`,
|
|
57
63
|
maxHeight: `calc(100vh - ${dialogMastheadOffset} - 3rem) !important`
|
|
58
64
|
},
|
|
59
65
|
// Masthead shares the shell chrome color (config or RHDH defaults).
|
|
@@ -118,6 +124,36 @@ const createComponents = (themeConfig) => {
|
|
|
118
124
|
},
|
|
119
125
|
"[class*='BackstagePage-root-'] > [class*='MuiToolbar-root']": {
|
|
120
126
|
backgroundColor: theme.palette.background.paper
|
|
127
|
+
},
|
|
128
|
+
// NFS: CreateButton → <a class="MuiButton-containedPrimary"> in BUI
|
|
129
|
+
// HeaderPage. StyledEngineProvider injectFirst + MuiButtonBase
|
|
130
|
+
// (background:transparent; padding:0) win over containedPrimary, so the
|
|
131
|
+
// control renders as a bare link. Force OFS contained look (!important).
|
|
132
|
+
'a.MuiButton-containedPrimary, a[class*="MuiButton-containedPrimary"]': {
|
|
133
|
+
color: `${primaryContrast} !important`,
|
|
134
|
+
backgroundColor: `${primaryMain} !important`,
|
|
135
|
+
backgroundImage: "none !important",
|
|
136
|
+
border: "0 !important",
|
|
137
|
+
borderRadius: "99em !important",
|
|
138
|
+
boxShadow: "none !important",
|
|
139
|
+
padding: "6px 16px !important",
|
|
140
|
+
minHeight: "36px !important",
|
|
141
|
+
minWidth: "64px",
|
|
142
|
+
lineHeight: 1.75,
|
|
143
|
+
textDecoration: "none !important",
|
|
144
|
+
textTransform: "none"
|
|
145
|
+
},
|
|
146
|
+
'a.MuiButton-containedPrimary:hover, a.MuiButton-containedPrimary:focus-visible, a[class*="MuiButton-containedPrimary"]:hover, a[class*="MuiButton-containedPrimary"]:focus-visible': {
|
|
147
|
+
color: `${primaryDarkContrast} !important`,
|
|
148
|
+
backgroundColor: `${primaryDark} !important`,
|
|
149
|
+
backgroundImage: "none !important",
|
|
150
|
+
border: "0 !important",
|
|
151
|
+
boxShadow: "none !important",
|
|
152
|
+
textDecoration: "none !important"
|
|
153
|
+
},
|
|
154
|
+
'a.MuiButton-containedPrimary:active, a[class*="MuiButton-containedPrimary"]:active': {
|
|
155
|
+
color: `${primaryDarkContrast} !important`,
|
|
156
|
+
backgroundColor: `${primaryDark} !important`
|
|
121
157
|
}
|
|
122
158
|
};
|
|
123
159
|
}
|
|
@@ -230,8 +266,22 @@ const createComponents = (themeConfig) => {
|
|
|
230
266
|
outlineOffset: "0"
|
|
231
267
|
}
|
|
232
268
|
},
|
|
269
|
+
// OFS CreateButton look: solid primary.main, hover primary.dark.
|
|
270
|
+
// !important beats MuiButtonBase (transparent; padding:0) when
|
|
271
|
+
// StyledEngineProvider injectFirst puts Emotion sheets first (NFS).
|
|
233
272
|
containedPrimary: {
|
|
234
273
|
borderRadius: "99em",
|
|
274
|
+
color: `${primaryContrast} !important`,
|
|
275
|
+
backgroundColor: `${primaryMain} !important`,
|
|
276
|
+
backgroundImage: "none !important",
|
|
277
|
+
boxShadow: "none",
|
|
278
|
+
padding: "6px 16px !important",
|
|
279
|
+
"&:hover, &:focus-visible, &:active": {
|
|
280
|
+
color: `${primaryDarkContrast} !important`,
|
|
281
|
+
backgroundColor: `${primaryDark} !important`,
|
|
282
|
+
backgroundImage: "none !important",
|
|
283
|
+
boxShadow: "none"
|
|
284
|
+
},
|
|
235
285
|
"&:focus-visible": {
|
|
236
286
|
boxShadow: `inset 0 0 0 1px ${rhdhPrimary.focusVisibleBorder}`,
|
|
237
287
|
outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`
|
|
@@ -251,6 +301,17 @@ const createComponents = (themeConfig) => {
|
|
|
251
301
|
backgroundColor: general.disabledBackground
|
|
252
302
|
}
|
|
253
303
|
},
|
|
304
|
+
// Dark error.main is light enough for outlined/text on #292929; contained
|
|
305
|
+
// needs a darker fill so white labels stay AA (RHDHBUGS-2242).
|
|
306
|
+
...isDarkMode ? {
|
|
307
|
+
containedError: {
|
|
308
|
+
backgroundColor: "#C62828",
|
|
309
|
+
color: "#ffffff",
|
|
310
|
+
"&:hover, &:focus-visible": {
|
|
311
|
+
backgroundColor: "#B71C1C"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
} : {},
|
|
254
315
|
outlined: {
|
|
255
316
|
borderRadius: "99em",
|
|
256
317
|
border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.esm.js","sources":["../../src/utils/createComponents.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type UnifiedThemeOptions,\n defaultComponentThemes as backstageComponents,\n} from '@backstage/theme';\nimport { type CSSObject } from '@mui/material/styles';\n\nimport { ThemeConfig, ThemeConfigOptions, RHDHThemePalette } from '../types';\nimport { redHatFontFaces, redHatFonts } from '../fonts';\nimport { resolveNavigationSidebarColors } from './navigationSidebarColors';\n\nexport type Component = {\n defaultProps?: unknown;\n styleOverrides?: unknown;\n variants?: unknown;\n};\n\nexport type Components = UnifiedThemeOptions['components'] & {\n BackstageHeaderTabs?: Component;\n BackstageSidebar?: Component;\n BackstageSidebarItem?: Component;\n BackstageSidebarSubmenuItem?: Component;\n BackstagePage?: Component;\n BackstageContent?: Component;\n BackstageContentHeader?: Component;\n BackstageHeader?: Component;\n BackstageItemCardHeader?: Component;\n BackstageTableToolbar?: Component;\n CatalogReactUserListPicker?: Component;\n PrivateTabIndicator?: Component;\n RHDHPageWithoutFixHeight?: Component;\n};\n\nexport const createComponents = (themeConfig: ThemeConfig): Components => {\n // Short hands to ensure that the code doesn't break if one of the properties is not defined.\n\n const options = themeConfig.options ?? ({} as ThemeConfigOptions);\n const disableRipple = options?.rippleEffect !== 'on'; // by default ripple effect is disabled\n\n const palette = themeConfig.palette ?? {};\n\n const general = palette.rhdh?.general || ({} as RHDHThemePalette['general']);\n const rhdhPrimary =\n palette.rhdh?.primary || ({} as RHDHThemePalette['primary']);\n const rhdhSecondary =\n palette.rhdh?.secondary || ({} as RHDHThemePalette['secondary']);\n\n // PatternFly shell chrome (page inset + masthead + sidebar). Prefer\n // pageInsetBackgroundColor, then app-bar / sidebar tokens from app-config.\n const chromeBackgroundColor =\n general.pageInsetBackgroundColor ??\n general.appBarBackgroundColor ??\n general.sidebarBackgroundColor;\n const appBarBackgroundColor =\n general.appBarBackgroundColor ?? chromeBackgroundColor;\n const pageInset = general.pageInset || '1.5rem';\n\n const components: Components = {};\n if (options.components === 'backstage' || options.components === 'mui') {\n return components;\n }\n\n //\n // MUI components\n //\n components.MuiCssBaseline = {\n styleOverrides: theme => {\n const backstageOverrides =\n backstageComponents!.MuiCssBaseline!.styleOverrides!;\n const backstageStyles =\n typeof backstageOverrides === 'function'\n ? (backstageOverrides(theme) as CSSObject)\n : (backstageOverrides as CSSObject);\n\n // Sticky AppBar is z-index 1100. BUI Dialog overlay is 1000 and\n // InspectEntityDialog uses height 100vh, so the masthead covers the\n // title and close control (RHDHBUGS-3603). 64px fallback matches the\n // MUI Toolbar default when --rhdh-global-header-height is unset.\n const dialogMastheadOffset = 'var(--rhdh-global-header-height, 64px)';\n // Prefer branding chrome tokens; fall back to MUI default for empty configs.\n const shellBackground =\n chromeBackgroundColor ?? theme.palette.background.default;\n\n return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n // Full-width PF/OFS masthead: publish height for fixed sidebar + overlays.\n ':root:has(#global-header)': {\n '--rhdh-global-header-height': '64px',\n },\n // Offset the fixed sidebar root below the masthead; drawer fills root.\n // (Do not offset the absolute drawer by header height — that stacks\n // with the root offset and leaves a gap under the header.)\n ':root:has(#global-header) [data-testid=\"sidebar-root\"]': {\n top: 'var(--rhdh-global-header-height, 64px) !important',\n height:\n 'calc(100vh - var(--rhdh-global-header-height, 64px)) !important',\n bottom: 'auto !important',\n },\n ':root:has(#global-header) [data-testid=\"sidebar-root\"] > *': {\n top: '0 !important',\n height: '100% !important',\n bottom: '0 !important',\n },\n // Branding lives in the masthead; hide the sidebar mark to avoid a\n // duplicate company logo (PatternFly header + nav pattern).\n ':root:has(#global-header) [data-testid=\"sidebar-company-logo\"], :root:has(#global-header) [data-testid=\"sidebar-home-logo\"]':\n {\n display: 'none',\n },\n ':root:has(#global-header) [class*=\"bui-DialogOverlay\"]': {\n top: `${dialogMastheadOffset} !important`,\n height: `calc(100% - ${dialogMastheadOffset}) !important`,\n zIndex: 1300,\n },\n ':root:has(#global-header) [class*=\"bui-DialogOverlay\"] > [class*=\"bui-Dialog\"]':\n {\n height: `calc(100vh - ${dialogMastheadOffset} - 3rem) !important`,\n maxHeight: `calc(100vh - ${dialogMastheadOffset} - 3rem) !important`,\n },\n // Masthead shares the shell chrome color (config or RHDH defaults).\n '#global-header': {\n backgroundColor: `${appBarBackgroundColor ?? shellBackground} !important`,\n backgroundImage: `${general.appBarBackgroundImage ?? 'none'} !important`,\n },\n // Sidebar menu scroller: keep item alignment stable when the classic\n // scrollbar appears (app-defaults uses data-testid=\"sidebar-menu-scroll\";\n // also cover Backstage's hover-to-scroll wrapper as a fallback).\n '[data-testid=\"sidebar-menu-scroll\"]': {\n overflowY: 'auto',\n scrollbarGutter: 'stable',\n },\n // Shell chrome (page-inset gutter). BUI tokens.css hardcodes\n // --bui-redhat-theme-page-inset-bg (#f2f2f2 / #151515) and\n // component-overrides.css paints body with that var using a high-\n // specificity attribute selector — which otherwise ignores branding\n // pageInsetBackgroundColor / appBar / sidebar overrides from\n // app-config. Sync the vars and use !important so customized dark\n // chrome (e.g. #212830) matches sidebar + global-header.\n html: {\n backgroundColor: `${shellBackground} !important`,\n '--bui-redhat-theme-page-inset-bg': shellBackground,\n '--bui-bg-app': shellBackground,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n overscrollBehavior: 'none',\n },\n },\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n backgroundColor: `${shellBackground} !important`,\n '--bui-redhat-theme-page-inset-bg': shellBackground,\n '--bui-bg-app': shellBackground,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n overscrollBehavior: 'none',\n },\n },\n '#root': {\n backgroundColor: `${shellBackground} !important`,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n // Shows through SidebarPage's page-inset margin (clip-path well).\n },\n },\n '#rhdh-sidebar-layout': {\n '@media (min-width: 600px)': {\n backgroundColor: `${shellBackground} !important`,\n },\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\n },\n \"[class*='BackstagePage-root-'] > [class*='MuiToolbar-root']\": {\n backgroundColor: theme.palette.background.paper,\n },\n };\n },\n };\n\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n root: {\n fontFamily: redHatFonts.text,\n fontWeight: 'normal',\n letterSpacing: '0.01em',\n // This is required to override the default MUI styles\n // that set the `font-weight` to `500` for the `h1` element.\n '&.MuiTypography-h1': {\n fontWeight: 'normal',\n },\n },\n button: {\n textTransform: 'none',\n },\n },\n };\n }\n\n // MUI container\n if (options.paper !== 'mui') {\n const elevationStyle = {\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n '& > hr[class|=\"MuiDivider-root\"]': {\n backgroundColor: general.paperBorderColor,\n },\n };\n const noElevationStyle = {\n boxShadow: 'none',\n outline: 'none',\n };\n\n components.MuiPaper = {\n styleOverrides: {\n root: {\n // This works for all MUI v5 components, but in MUI v4\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n // Required only for MUI v5 components because a gradient `backgroundImage`\n // overrides the default background.paper color otherwise.\n backgroundImage: general.paperBackgroundImage,\n // hide the first child element which is a divider with MuiDivider-root classname in MuiPaper\n '& > hr:first-child[class|=\"MuiDivider-root\"]': {\n height: 0,\n },\n },\n rounded: {\n '& > :last-child': {\n borderBottomLeftRadius: 16,\n borderBottomRightRadius: 16,\n },\n },\n elevation0: noElevationStyle,\n },\n };\n components.MuiPopover = {\n styleOverrides: {\n paper: {\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n boxShadow: general.popoverBoxShadow,\n // `Popover` has no outline by default, but since we're adding it to the `Paper`\n // components, this ensures that the `Popover` doesn't has a shadow and an outline.\n outline: 0,\n },\n },\n };\n\n // Required for MUI v4, not MUI v5\n const elevations = Array.from(\n { length: 24 },\n (_, i) => `elevation${i + 1}`,\n ) as 'elevation1'[];\n elevations.forEach(elevation => {\n components.MuiPaper!.styleOverrides![elevation] = elevationStyle;\n });\n }\n\n // MUI AppBar (global-header masthead uses this)\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n ...(options.appBar !== 'mui' && {\n backgroundColor: appBarBackgroundColor,\n backgroundImage: general.appBarBackgroundImage,\n outline: 'none',\n }),\n },\n },\n };\n\n // MUI buttons\n // Don't disableRipple for MuiButtonBase as it will affect all the buttons\n // and we need to ensure that the buttons have a right touch and focus styling.\n if (options.buttons !== 'mui') {\n components.MuiButton = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n borderRadius: '3px',\n fontWeight: 'normal',\n },\n contained: {\n border: '0',\n borderRadius: '99em',\n boxShadow: 'none',\n '&:hover, &:focus-visible': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n containedPrimary: {\n borderRadius: '99em',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhPrimary.focusVisibleBorder}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n containedSecondary: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhSecondary.focusVisibleBorder}`,\n outline: `${rhdhSecondary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n outlined: {\n borderRadius: '99em',\n border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroudColor: general.disabledBackground,\n border: `1px solid ${general.disabledBackground}`,\n },\n },\n outlinedPrimary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n text: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${rhdhPrimary.main}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n },\n },\n };\n components.MuiToggleButton = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n },\n },\n };\n components.MuiToggleButtonGroup = {\n styleOverrides: {\n root: {\n flexWrap: 'wrap',\n rowGap: '8px',\n maxWidth: '100%',\n },\n },\n };\n components.MuiIconButton = {\n styleOverrides: {\n root: {\n '&:disabled': {\n color: general.disabled,\n },\n },\n },\n };\n components.MuiLink = {\n styleOverrides: {\n underlineHover: {\n '&:hover, &:focus-visible': {\n textDecoration: 'none',\n },\n },\n },\n };\n }\n\n // MUI input fields\n if (options.inputs !== 'mui') {\n components.MuiInputBase = {\n styleOverrides: {\n input: {\n '&::placeholder': {\n color: general.disabled,\n opacity: 1,\n },\n },\n },\n };\n components.MuiOutlinedInput = {\n styleOverrides: {\n input: {\n '&:autofill': {\n boxShadow: `0 0 0 100px ${general.formControlBackgroundColor} inset`,\n borderRadius: 'unset',\n },\n },\n },\n };\n }\n\n if (options.checkbox !== 'mui') {\n components.MuiCheckbox = {\n defaultProps: {\n color: 'primary',\n },\n };\n }\n\n // MUI accordion\n if (options.accordions !== 'mui') {\n components.MuiAccordion = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n },\n rounded: {\n '&:first-child': {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '0',\n borderBottomRightRadius: '0',\n },\n },\n },\n };\n }\n\n // MUI cards\n if (options.cards !== 'mui') {\n components.MuiCard = {\n styleOverrides: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: general.cardBackgroundColor,\n borderRadius: '16px',\n },\n },\n };\n components.MuiCardHeader = {\n styleOverrides: {\n content: {\n '& > span > nav span': {\n textTransform: 'unset',\n letterSpacing: 'normal',\n fountweight: 'normal',\n },\n },\n title: {\n fontSize: '1.125rem',\n },\n action: {\n '& > a > span > svg': {\n fontSize: '1.125rem',\n },\n '& > a[class*=\"MuiIconButton-root\"]:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n };\n components.MuiCardContent = {\n styleOverrides: {\n root: {\n flexGrow: '1',\n backgroundColor: general.cardBackgroundColor,\n '& > div > div > h2[class*=\"MuiTypography-h2-\"]': {\n textTransform: 'unset',\n opacity: '40%',\n },\n '& > div > div > div[class*=\"MuiChip-sizeSmall\"]': {\n backgroundColor: 'transparent',\n borderRadius: '8px',\n outline: `1px solid ${general.disabled}`,\n },\n '& > div[class*=\"Mui-expanded\"]': {\n margin: 'auto',\n },\n '& > div[class*=\"MuiAccordion-root\"]:before': {\n height: 0,\n },\n // Override the default line-clamp from 10 to 2 for the Software template catalog\n '& > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-container-\"][class*=\"MuiGrid-spacing-xs-2-\"] > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-item-\"][class*=\"MuiGrid-grid-xs-12-\"] > div[class*=\"MuiBox-root-\"]':\n {\n '-webkit-line-clamp': '2',\n },\n },\n },\n };\n }\n\n // MUI table\n if (options.tables !== 'mui') {\n components.MuiTable = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n };\n components.MuiTableRow = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n '&:not([class*=\"MuiTableRow-footer\"]):hover': {\n backgroundColor: `${general.tableRowHover} !important`,\n },\n '& > th[class*=\"MuiTableCell-head\"]': {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n },\n };\n components.MuiTableCell = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n '&[class*=\"BackstageTableHeader-header\"]': {\n borderTop: 'unset',\n borderBottom: `1px solid ${general.tableBorderColor}`,\n },\n },\n head: {\n textTransform: 'unset !important',\n color: `${general.tableColumnTitleColor} !important`,\n '& > span[class*=\"MuiTableSortLabel-active\"]': {\n color: `${rhdhPrimary.main} !important`,\n },\n '& > span > svg[class*=\"MuiTableSortLabel-icon\"]': {\n color: 'inherit !important',\n },\n },\n body: {\n color: general.tableTitleColor,\n '& > div[class*=\"MuiChip-sizeSmall\"]': {\n margin: '2px',\n },\n },\n },\n };\n components.MuiTableFooter = {\n styleOverrides: {\n root: {\n '& > tr > td': {\n borderBottom: 'none',\n },\n },\n },\n };\n }\n\n // MUI toolbar\n if (options.toolbars !== 'mui') {\n components.MuiToolbar = {\n styleOverrides: {\n regular: {\n '& > div > h2[class*=\"MuiTypography-h5\"]': {\n fontSize: '1.25rem',\n color: general.tableTitleColor,\n },\n },\n },\n };\n }\n\n // MUI dialogs\n if (options.dialogs !== 'mui') {\n components.MuiDialogContent = {\n styleOverrides: {\n root: {\n '& > div': {\n backgroundColor: general.cardBackgroundColor,\n },\n },\n },\n };\n }\n\n // MUI tabs\n if (options.tabs !== 'mui') {\n components.MuiTabs = {\n defaultProps: {\n indicatorColor: 'primary',\n },\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${general.paperBorderColor}`,\n padding: '0 1.5rem',\n },\n vertical: {\n '& > div > div > button[class*=\"v5\"]': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n '& > div > div > button > span': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n borderBottom: `none`,\n borderLeft: `1px solid ${general.paperBorderColor}`,\n padding: 0,\n \"& span[class*='MuiTabs-indicator']\": {\n width: '3px',\n },\n },\n indicator: {\n left: 0,\n height: '3px',\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n fontWeight: '400',\n minWidth: 'initial !important',\n padding: '0.25em 1em',\n position: 'relative',\n textTransform: 'none',\n zIndex: 1,\n '&:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n top: '0.75em',\n left: '0.5em',\n right: '0.5em',\n bottom: '0.75em',\n borderRadius: '4px',\n zIndex: -1,\n },\n '&.Mui-selected': {\n color: `${palette.text?.primary} !important`,\n },\n '&[class*=\"v5\"]': {\n lineHeight: 1.75,\n },\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent !important',\n '&:before': {\n backgroundColor: general.tabsLinkHoverBackgroundColor,\n },\n },\n '&:disabled': {\n color: general.disabled,\n '&:before': {\n backgroundColor: general.disabledBackground,\n },\n },\n },\n },\n };\n\n // MUI Breadcrumbs\n if (options.breadcrumbs !== 'mui') {\n components.MuiBreadcrumbs = {\n defaultProps: {\n separator: '>',\n },\n styleOverrides: {\n separator: {\n fontWeight: 'bold',\n },\n root: {\n fontWeight: '400',\n },\n li: {\n fontSize: '0.875rem !important',\n fontStyle: 'normal !important',\n },\n },\n };\n }\n }\n\n //\n // Backstage\n //\n if (options.tabs !== 'mui') {\n components.BackstageHeaderTabs = {\n styleOverrides: {\n tabsWrapper: {\n paddingLeft: '0',\n backgroundColor: general.mainSectionBackgroundColor,\n },\n defaultTab: {\n textTransform: 'none',\n fontSize: '0.875rem',\n fontWeight: '400',\n color: 'unset',\n padding: '0.25em 1em',\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n const {\n sidebarBackgroundColor,\n sidebarItemInteractionBackgroundColor,\n navigationItemColor,\n navigationSelectedColor,\n } = resolveNavigationSidebarColors(themeConfig);\n\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n paddingBottom: '1.5rem',\n backgroundColor: sidebarBackgroundColor,\n alignItems: 'stretch',\n // Drawer is position:absolute inside the fixed sidebar-root.\n // Masthead clearance is applied on the root (CssBaseline); keep the\n // drawer filling the root so offsets do not stack.\n top: '0 !important',\n height: '100% !important',\n bottom: '0 !important',\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n '#rhdh-sidebar-layout & a[aria-current=\"page\"], & a[aria-current=\"page\"]':\n {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n '& .MuiTypography-root': {\n color: 'inherit !important',\n },\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 1rem) !important',\n marginLeft: '0.5rem !important',\n textDecorationLine: 'none',\n '&:hover, &:focus-visible': {\n backgroundColor: sidebarItemInteractionBackgroundColor,\n },\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.BackstageSidebarSubmenuItem = {\n styleOverrides: {\n selected: {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderColor: `${sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${navigationItemColor} !important`,\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderRadius: '6px',\n borderTop: '3px solid transparent !important', // default mui selected styling\n paddingTop: '6px !important', // default mui selected styling\n marginTop: '-1px !important', // default mui selected styling\n '&:hover, &:focus-visible': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n },\n '&.Mui-selected': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n },\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.RHDHPageWithoutFixHeight = {\n styleOverrides: {\n root: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-sidebar position.\n '@media (min-width: 600px)': {\n '#rhdh-above-sidebar-header-container:has(*) ~ #rhdh-sidebar-layout':\n {\n // Page inset is margin on SidebarPage; don't double-gap under the masthead.\n \"& [class*='BackstageSidebarPage-root']\": {\n marginTop: '0 !important',\n },\n \"& main, & [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n sidebarLayout: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-main-content position.\n '@media (min-width: 600px)': {\n '#rhdh-above-main-content-header-container:has(*)': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n },\n };\n components.BackstageIconLinkVertical = {\n styleOverrides: {\n label: {\n textTransform: 'none',\n },\n },\n };\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Fill the viewport so short pages don't leave a gap below the shell.\n // App root wrappers (e.g. ApplicationDrawer) can collapse to content\n // height; without a min-height here the page-inset background stops\n // early and body/html shows through (RHDHBUGS-3498).\n minHeight: '100vh',\n // All viewports: paint the content well. Page-inset chrome below is\n // desktop-only; without this, mobile falls through to body\n // (--bui-bg-app / page-inset) instead of mainSectionBackgroundColor.\n backgroundColor: general.mainSectionBackgroundColor,\n // Controls the page inset as in PF6 -- only in desktop view.\n // CSS-only: SidebarPage is the sole scrollport so BUI siblings\n // (PluginHeader + Containers) and classic <main> share one rounded\n // well without an extra DOM wrapper (PageMainContainer).\n //\n // Scrollbar clipping: border-radius alone does not clip Chromium\n // scrollbars. clip-path on this same scrollport does. Margin (not\n // border) forms the page inset so the clipped edge is the well\n // edge — the overflow/scrollbar edge — not the outer border-box.\n //\n // Backstage SidebarPage sets width:100%; horizontal margins would\n // otherwise overflow and get clipped (right gutter disappears).\n '@media (min-width: 600px)': {\n boxSizing: 'border-box',\n // Override Backstage `width: 100%` so margin-right is not pushed\n // off-screen by the parent overflow:hidden.\n width: `calc(100% - ${pageInset}) !important`,\n // Default: top + bottom page inset (no masthead).\n marginTop: pageInset,\n marginRight: pageInset,\n marginBottom: pageInset,\n marginLeft: 0,\n height: `calc(100vh - 2 * ${pageInset})`,\n maxHeight: `calc(100vh - 2 * ${pageInset})`,\n minHeight: '0 !important',\n overflowX: 'hidden',\n overflowY: 'auto',\n // `contain` still allows rubber-band overscroll, which reveals an\n // empty rounded well above the content. `none` disables that.\n overscrollBehavior: 'none',\n // Round only the free (right) edge of the border-box. Left corners\n // stay square so clip-path does not bite the drawer spacer under\n // the fixed sidebar. Left curves of the *content* well are painted\n // by the sticky ::before masks below (after paddingLeft).\n borderRadius: '0 1rem 1rem 0',\n // Clips the scrollbar into the rounded well (border-radius cannot).\n clipPath: 'inset(0 round 0 1rem 1rem 0)',\n // Masthead (or any #global-header) sits above this well in-flow.\n // Drop the top inset and subtract only the header + bottom inset\n // from 100vh so the bottom margin remains visible.\n ':root:has(#global-header) &': {\n marginTop: '0 !important',\n height: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}) !important`,\n maxHeight: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}) !important`,\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: '1rem',\n // Only bottom-right on the border-box; left content curve is ::before.\n clipPath: 'inset(0 round 0 0 1rem 0)',\n '&::before': {\n height: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset})`,\n marginBottom: `calc(0px - (100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}))`,\n },\n },\n // Sticky masks sit in the content box (after paddingLeft), so their\n // left tiles round the main well against the sidebar without\n // clipping the drawer spacer. Right tiles match the free edge.\n // Keep overscroll-behavior: none so rubber-band does not show a\n // second well. z-index must sit above Backstage Header (100).\n '&::before': {\n content: '\"\"',\n position: 'sticky',\n top: 0,\n display: 'block',\n width: '100%',\n height: `calc(100vh - 2 * ${pageInset})`,\n marginBottom: `calc(0px - (100vh - 2 * ${pageInset}))`,\n pointerEvents: 'none',\n zIndex: 101,\n // Prefer branding chrome hex; fall back to the CSS var synced\n // on html/body above so customized dark themes stay consistent.\n backgroundImage: [\n `radial-gradient(circle at 100% 100%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 0% 100%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 100% 0%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 0% 0%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n ].join(', '),\n backgroundPosition:\n 'top left, top right, bottom left, bottom right',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '1rem 1rem',\n },\n // No nested scroll/radius on children — the shell scrolls as one.\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n margin: 0,\n borderRadius: 0,\n clipPath: 'none',\n backgroundColor: general.mainSectionBackgroundColor,\n overflow: 'visible',\n height: 'auto',\n maxHeight: 'none',\n },\n \"& > [class*='bui-Container']:not([class*='bui-Header'])\": {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // When a BackstagePage-root is present, the MUI page already has\n // its own header; hide the sibling BUI PluginHeader to avoid duplication.\n \"&:has([class*='BackstagePage-root']) > .bui-PluginHeader\": {\n display: 'none',\n },\n '& > article, & > [class*=\"BackstageContent-root\"]': {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // TechDocs ToC has its own scrollbar — avoid forcing a nested main well.\n \"& > main:has([data-testid='techdocs-native-shadowroot'])\": {\n height: 'auto !important',\n maxHeight: 'none !important',\n marginRight: '0.5rem',\n },\n \"& > [class*='MuiLinearProgress-root']\": {\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\n },\n // DependencyGraph's IconButton is `position:absolute; right:0` but\n // `.fullscreen` is not positioned. Our clip-path on SidebarPage\n // becomes the absolute containing block, so the control sticks to\n // the page-well corner. Re-contain it to the graph, then inset it\n // slightly so the 1rem curve does not shear the icon.\n '& .fullscreen': {\n position: 'relative',\n },\n '& .fullscreen > .MuiIconButton-root, & .fullscreen .MuiIconButton-root[class*=\"fullscreenButton\"]':\n {\n top: '0.5rem !important',\n right: '0.5rem !important',\n zIndex: 3,\n },\n },\n },\n },\n };\n components.BackstageContent = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n },\n };\n components.BackstageContentHeader = {\n styleOverrides: {\n leftItemsBox: {\n '& > h2[class*=\"BackstageContentHeader-title-\"][class*=\"MuiTypography-h4-\"]':\n {\n fontWeight: 'bold',\n fontSize: '1.75rem',\n },\n },\n },\n };\n }\n\n if (options.headers !== 'mui') {\n components.BackstageHeader = {\n styleOverrides: {\n header: {\n boxShadow: 'none',\n },\n title: {\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: '500',\n fontSize: '1.5rem',\n },\n },\n subtitle: {\n '&[class*=\"BackstageHeader-subtitle-\"]': {\n fontWeight: 'normal',\n fontSize: '0.875rem',\n opacity: 1,\n },\n },\n breadcrumb: {\n marginBottom: '0.5rem',\n },\n },\n };\n components.BreadcrumbsCurrentPage = {\n styleOverrides: {\n root: {\n '& p': {\n fontStyle: 'normal',\n fontSize: 'inherit',\n },\n },\n },\n };\n components.BackstageBreadcrumbsStyledBox = {\n styleOverrides: {\n root: {\n textDecoration: 'underline !important',\n color: palette.rhdh?.primary.main,\n '&:hover': {\n color: `color-mix(in srgb, ${palette.rhdh?.primary.main} 50%, ${palette.text?.primary})`,\n },\n },\n },\n };\n components.BackstageItemCardHeader = {\n styleOverrides: {\n root: {\n // This is required to increase the css specificity, to OVERRIDE the styles from\n // BackstageItemCardHeader (https://github.com/backstage/backstage/blob/master/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx)\n // These are applied with a CSS class as well.\n\n // This variant is used when running the Storybook locally (dev mode) and in Backstage/RHDH!\n '&[class*=\"MuiBox-root-\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n // This variant is used when building a static Storybook (`storybook:build`)\n '&[class~=\"MuiBox-root\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n '& > h3[class*=\"MuiTypography-subtitle2-\"] > div > div:first-child': {\n textTransform: 'capitalize',\n },\n },\n },\n };\n }\n\n if (options.toolbars !== 'mui') {\n components.BackstageTableToolbar = {\n styleOverrides: {\n root: {\n '& h2': {\n fontWeight: 'bold',\n },\n },\n title: {\n '& > h2': {\n fontWeight: 'bold',\n },\n },\n },\n };\n }\n\n //\n // Others\n //\n components.CatalogReactUserListPicker = {\n styleOverrides: {\n root: {\n borderRadius: '4px',\n },\n title: {\n textTransform: 'none',\n },\n },\n };\n\n if (options.tabs !== 'mui') {\n components.PrivateTabIndicator = {\n styleOverrides: {\n root: {\n height: '3px',\n zIndex: 1,\n },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":["backstageComponents"],"mappings":";;;;AAgDO,MAAM,gBAAA,GAAmB,CAAC,WAAA,KAAyC;AAGxE,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAY,EAAC;AACzC,EAAA,MAAM,aAAA,GAAgB,SAAS,YAAA,KAAiB,IAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAW,EAAC;AAExC,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC3C,EAAA,MAAM,WAAA,GACJ,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC7B,EAAA,MAAM,aAAA,GACJ,OAAA,CAAQ,IAAA,EAAM,SAAA,IAAc,EAAC;AAI/B,EAAA,MAAM,qBAAA,GACJ,OAAA,CAAQ,wBAAA,IACR,OAAA,CAAQ,yBACR,OAAA,CAAQ,sBAAA;AACV,EAAA,MAAM,qBAAA,GACJ,QAAQ,qBAAA,IAAyB,qBAAA;AACnC,EAAA,MAAM,SAAA,GAAY,QAAQ,SAAA,IAAa,QAAA;AAEvC,EAAA,MAAM,aAAyB,EAAC;AAChC,EAAA,IAAI,OAAA,CAAQ,UAAA,KAAe,WAAA,IAAe,OAAA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AAAA;AACd;AACF;AACF,KACF;AAAA,EACF;AAKA,EAAA,UAAA,CAAW,0BAAA,GAA6B;AAAA,IACtC,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc;AAAA,OAChB;AAAA,MACA,KAAA,EAAO;AAAA,QACL,aAAA,EAAe;AAAA;AACjB;AACF,GACF;AAEA,EAAA,IAAI,OAAA,CAAQ,SAAS,KAAA,EAAO;AAC1B,IAAA,UAAA,CAAW,mBAAA,GAAsB;AAAA,MAC/B,cAAA,EAAgB;AAAA,QACd,IAAA,EAAM;AAAA,UACJ,MAAA,EAAQ,KAAA;AAAA,UACR,MAAA,EAAQ;AAAA,SACV;AAAA,QACA,QAAA,EAAU;AAAA,UACR,KAAA,EAAO;AAAA;AACT;AACF,KACF;AAAA,EACF;AAEA,EAAA,OAAO,UAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"createComponents.esm.js","sources":["../../src/utils/createComponents.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type UnifiedThemeOptions,\n defaultComponentThemes as backstageComponents,\n} from '@backstage/theme';\nimport { type CSSObject } from '@mui/material/styles';\n\nimport { ThemeConfig, ThemeConfigOptions, RHDHThemePalette } from '../types';\nimport { redHatFontFaces, redHatFonts } from '../fonts';\nimport { contrastTextForBackground } from './contrastTextForBackground';\nimport { resolveNavigationSidebarColors } from './navigationSidebarColors';\n\nexport type Component = {\n defaultProps?: unknown;\n styleOverrides?: unknown;\n variants?: unknown;\n};\n\nexport type Components = UnifiedThemeOptions['components'] & {\n BackstageHeaderTabs?: Component;\n BackstageSidebar?: Component;\n BackstageSidebarItem?: Component;\n BackstageSidebarSubmenuItem?: Component;\n BackstagePage?: Component;\n BackstageContent?: Component;\n BackstageContentHeader?: Component;\n BackstageHeader?: Component;\n BackstageItemCardHeader?: Component;\n BackstageTableToolbar?: Component;\n CatalogReactUserListPicker?: Component;\n PrivateTabIndicator?: Component;\n RHDHPageWithoutFixHeight?: Component;\n};\n\nexport const createComponents = (themeConfig: ThemeConfig): Components => {\n // Short hands to ensure that the code doesn't break if one of the properties is not defined.\n\n const options = themeConfig.options ?? ({} as ThemeConfigOptions);\n const disableRipple = options?.rippleEffect !== 'on'; // by default ripple effect is disabled\n\n const palette = themeConfig.palette ?? {};\n\n const general = palette.rhdh?.general || ({} as RHDHThemePalette['general']);\n const rhdhPrimary =\n palette.rhdh?.primary || ({} as RHDHThemePalette['primary']);\n const rhdhSecondary =\n palette.rhdh?.secondary || ({} as RHDHThemePalette['secondary']);\n const isDarkMode =\n palette.mode === 'dark' || (palette as { type?: string }).type === 'dark';\n\n // MUI primary palette (OFS CreateButton fill / hover / label).\n const primaryPalette = palette.primary as\n | { main?: string; dark?: string; contrastText?: string }\n | undefined;\n const primaryMain = primaryPalette?.main ?? rhdhPrimary.main ?? '#0066CC';\n const primaryDark = primaryPalette?.dark ?? '#00478e';\n // Derive label color from the fill — do not trust merged contrastText alone.\n const primaryContrast = contrastTextForBackground(primaryMain);\n const primaryDarkContrast = contrastTextForBackground(primaryDark);\n\n // PatternFly shell chrome (page inset + masthead + sidebar). Prefer\n // pageInsetBackgroundColor, then app-bar / sidebar tokens from app-config.\n const chromeBackgroundColor =\n general.pageInsetBackgroundColor ??\n general.appBarBackgroundColor ??\n general.sidebarBackgroundColor;\n const appBarBackgroundColor =\n general.appBarBackgroundColor ?? chromeBackgroundColor;\n const pageInset = general.pageInset || '1.5rem';\n\n const components: Components = {};\n if (options.components === 'backstage' || options.components === 'mui') {\n return components;\n }\n\n //\n // MUI components\n //\n components.MuiCssBaseline = {\n styleOverrides: theme => {\n const backstageOverrides =\n backstageComponents!.MuiCssBaseline!.styleOverrides!;\n const backstageStyles =\n typeof backstageOverrides === 'function'\n ? (backstageOverrides(theme) as CSSObject)\n : (backstageOverrides as CSSObject);\n\n // Sticky AppBar is z-index 1100. BUI Dialog overlay is 1000 and\n // InspectEntityDialog uses height 100vh, so the masthead covers the\n // title and close control (RHDHBUGS-3603). Cap max-height only — do not\n // force height, or content-sized dialogs (e.g. Scorecard data sources)\n // fill the viewport. 64px fallback matches the MUI Toolbar default when\n // --rhdh-global-header-height is unset.\n const dialogMastheadOffset = 'var(--rhdh-global-header-height, 64px)';\n // Prefer branding chrome tokens; fall back to MUI default for empty configs.\n const shellBackground =\n chromeBackgroundColor ?? theme.palette.background.default;\n\n return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n // Full-width PF/OFS masthead: publish height for fixed sidebar + overlays.\n ':root:has(#global-header)': {\n '--rhdh-global-header-height': '64px',\n },\n // Offset the fixed sidebar root below the masthead; drawer fills root.\n // (Do not offset the absolute drawer by header height — that stacks\n // with the root offset and leaves a gap under the header.)\n ':root:has(#global-header) [data-testid=\"sidebar-root\"]': {\n top: 'var(--rhdh-global-header-height, 64px) !important',\n height:\n 'calc(100vh - var(--rhdh-global-header-height, 64px)) !important',\n bottom: 'auto !important',\n },\n ':root:has(#global-header) [data-testid=\"sidebar-root\"] > *': {\n top: '0 !important',\n height: '100% !important',\n bottom: '0 !important',\n },\n // Branding lives in the masthead; hide the sidebar mark to avoid a\n // duplicate company logo (PatternFly header + nav pattern).\n ':root:has(#global-header) [data-testid=\"sidebar-company-logo\"], :root:has(#global-header) [data-testid=\"sidebar-home-logo\"]':\n {\n display: 'none',\n },\n ':root:has(#global-header) [class*=\"bui-DialogOverlay\"]': {\n top: `${dialogMastheadOffset} !important`,\n height: `calc(100% - ${dialogMastheadOffset}) !important`,\n zIndex: 1300,\n },\n ':root:has(#global-header) [class*=\"bui-DialogOverlay\"] > [class*=\"bui-Dialog\"]':\n {\n maxHeight: `calc(100vh - ${dialogMastheadOffset} - 3rem) !important`,\n },\n // Masthead shares the shell chrome color (config or RHDH defaults).\n '#global-header': {\n backgroundColor: `${appBarBackgroundColor ?? shellBackground} !important`,\n backgroundImage: `${general.appBarBackgroundImage ?? 'none'} !important`,\n },\n // Sidebar menu scroller: keep item alignment stable when the classic\n // scrollbar appears (app-defaults uses data-testid=\"sidebar-menu-scroll\";\n // also cover Backstage's hover-to-scroll wrapper as a fallback).\n '[data-testid=\"sidebar-menu-scroll\"]': {\n overflowY: 'auto',\n scrollbarGutter: 'stable',\n },\n // Shell chrome (page-inset gutter). BUI tokens.css hardcodes\n // --bui-redhat-theme-page-inset-bg (#f2f2f2 / #151515) and\n // component-overrides.css paints body with that var using a high-\n // specificity attribute selector — which otherwise ignores branding\n // pageInsetBackgroundColor / appBar / sidebar overrides from\n // app-config. Sync the vars and use !important so customized dark\n // chrome (e.g. #212830) matches sidebar + global-header.\n html: {\n backgroundColor: `${shellBackground} !important`,\n '--bui-redhat-theme-page-inset-bg': shellBackground,\n '--bui-bg-app': shellBackground,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n overscrollBehavior: 'none',\n },\n },\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n backgroundColor: `${shellBackground} !important`,\n '--bui-redhat-theme-page-inset-bg': shellBackground,\n '--bui-bg-app': shellBackground,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n overscrollBehavior: 'none',\n },\n },\n '#root': {\n backgroundColor: `${shellBackground} !important`,\n '@media (min-width: 600px)': {\n height: '100%',\n overflow: 'hidden',\n // Shows through SidebarPage's page-inset margin (clip-path well).\n },\n },\n '#rhdh-sidebar-layout': {\n '@media (min-width: 600px)': {\n backgroundColor: `${shellBackground} !important`,\n },\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\n },\n \"[class*='BackstagePage-root-'] > [class*='MuiToolbar-root']\": {\n backgroundColor: theme.palette.background.paper,\n },\n // NFS: CreateButton → <a class=\"MuiButton-containedPrimary\"> in BUI\n // HeaderPage. StyledEngineProvider injectFirst + MuiButtonBase\n // (background:transparent; padding:0) win over containedPrimary, so the\n // control renders as a bare link. Force OFS contained look (!important).\n 'a.MuiButton-containedPrimary, a[class*=\"MuiButton-containedPrimary\"]':\n {\n color: `${primaryContrast} !important`,\n backgroundColor: `${primaryMain} !important`,\n backgroundImage: 'none !important',\n border: '0 !important',\n borderRadius: '99em !important',\n boxShadow: 'none !important',\n padding: '6px 16px !important',\n minHeight: '36px !important',\n minWidth: '64px',\n lineHeight: 1.75,\n textDecoration: 'none !important',\n textTransform: 'none',\n },\n 'a.MuiButton-containedPrimary:hover, a.MuiButton-containedPrimary:focus-visible, a[class*=\"MuiButton-containedPrimary\"]:hover, a[class*=\"MuiButton-containedPrimary\"]:focus-visible':\n {\n color: `${primaryDarkContrast} !important`,\n backgroundColor: `${primaryDark} !important`,\n backgroundImage: 'none !important',\n border: '0 !important',\n boxShadow: 'none !important',\n textDecoration: 'none !important',\n },\n 'a.MuiButton-containedPrimary:active, a[class*=\"MuiButton-containedPrimary\"]:active':\n {\n color: `${primaryDarkContrast} !important`,\n backgroundColor: `${primaryDark} !important`,\n },\n };\n },\n };\n\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n root: {\n fontFamily: redHatFonts.text,\n fontWeight: 'normal',\n letterSpacing: '0.01em',\n // This is required to override the default MUI styles\n // that set the `font-weight` to `500` for the `h1` element.\n '&.MuiTypography-h1': {\n fontWeight: 'normal',\n },\n },\n button: {\n textTransform: 'none',\n },\n },\n };\n }\n\n // MUI container\n if (options.paper !== 'mui') {\n const elevationStyle = {\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n '& > hr[class|=\"MuiDivider-root\"]': {\n backgroundColor: general.paperBorderColor,\n },\n };\n const noElevationStyle = {\n boxShadow: 'none',\n outline: 'none',\n };\n\n components.MuiPaper = {\n styleOverrides: {\n root: {\n // This works for all MUI v5 components, but in MUI v4\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n // Required only for MUI v5 components because a gradient `backgroundImage`\n // overrides the default background.paper color otherwise.\n backgroundImage: general.paperBackgroundImage,\n // hide the first child element which is a divider with MuiDivider-root classname in MuiPaper\n '& > hr:first-child[class|=\"MuiDivider-root\"]': {\n height: 0,\n },\n },\n rounded: {\n '& > :last-child': {\n borderBottomLeftRadius: 16,\n borderBottomRightRadius: 16,\n },\n },\n elevation0: noElevationStyle,\n },\n };\n components.MuiPopover = {\n styleOverrides: {\n paper: {\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n boxShadow: general.popoverBoxShadow,\n // `Popover` has no outline by default, but since we're adding it to the `Paper`\n // components, this ensures that the `Popover` doesn't has a shadow and an outline.\n outline: 0,\n },\n },\n };\n\n // Required for MUI v4, not MUI v5\n const elevations = Array.from(\n { length: 24 },\n (_, i) => `elevation${i + 1}`,\n ) as 'elevation1'[];\n elevations.forEach(elevation => {\n components.MuiPaper!.styleOverrides![elevation] = elevationStyle;\n });\n }\n\n // MUI AppBar (global-header masthead uses this)\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n ...(options.appBar !== 'mui' && {\n backgroundColor: appBarBackgroundColor,\n backgroundImage: general.appBarBackgroundImage,\n outline: 'none',\n }),\n },\n },\n };\n\n // MUI buttons\n // Don't disableRipple for MuiButtonBase as it will affect all the buttons\n // and we need to ensure that the buttons have a right touch and focus styling.\n if (options.buttons !== 'mui') {\n components.MuiButton = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n borderRadius: '3px',\n fontWeight: 'normal',\n },\n contained: {\n border: '0',\n borderRadius: '99em',\n boxShadow: 'none',\n '&:hover, &:focus-visible': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n // OFS CreateButton look: solid primary.main, hover primary.dark.\n // !important beats MuiButtonBase (transparent; padding:0) when\n // StyledEngineProvider injectFirst puts Emotion sheets first (NFS).\n containedPrimary: {\n borderRadius: '99em',\n color: `${primaryContrast} !important`,\n backgroundColor: `${primaryMain} !important`,\n backgroundImage: 'none !important',\n boxShadow: 'none',\n padding: '6px 16px !important',\n '&:hover, &:focus-visible, &:active': {\n color: `${primaryDarkContrast} !important`,\n backgroundColor: `${primaryDark} !important`,\n backgroundImage: 'none !important',\n boxShadow: 'none',\n },\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhPrimary.focusVisibleBorder}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n containedSecondary: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhSecondary.focusVisibleBorder}`,\n outline: `${rhdhSecondary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n // Dark error.main is light enough for outlined/text on #292929; contained\n // needs a darker fill so white labels stay AA (RHDHBUGS-2242).\n ...(isDarkMode\n ? {\n containedError: {\n backgroundColor: '#C62828',\n color: '#ffffff',\n '&:hover, &:focus-visible': {\n backgroundColor: '#B71C1C',\n },\n },\n }\n : {}),\n outlined: {\n borderRadius: '99em',\n border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroudColor: general.disabledBackground,\n border: `1px solid ${general.disabledBackground}`,\n },\n },\n outlinedPrimary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n text: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${rhdhPrimary.main}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n },\n },\n };\n components.MuiToggleButton = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n },\n },\n };\n components.MuiToggleButtonGroup = {\n styleOverrides: {\n root: {\n flexWrap: 'wrap',\n rowGap: '8px',\n maxWidth: '100%',\n },\n },\n };\n components.MuiIconButton = {\n styleOverrides: {\n root: {\n '&:disabled': {\n color: general.disabled,\n },\n },\n },\n };\n components.MuiLink = {\n styleOverrides: {\n underlineHover: {\n '&:hover, &:focus-visible': {\n textDecoration: 'none',\n },\n },\n },\n };\n }\n\n // MUI input fields\n if (options.inputs !== 'mui') {\n components.MuiInputBase = {\n styleOverrides: {\n input: {\n '&::placeholder': {\n color: general.disabled,\n opacity: 1,\n },\n },\n },\n };\n components.MuiOutlinedInput = {\n styleOverrides: {\n input: {\n '&:autofill': {\n boxShadow: `0 0 0 100px ${general.formControlBackgroundColor} inset`,\n borderRadius: 'unset',\n },\n },\n },\n };\n }\n\n if (options.checkbox !== 'mui') {\n components.MuiCheckbox = {\n defaultProps: {\n color: 'primary',\n },\n };\n }\n\n // MUI accordion\n if (options.accordions !== 'mui') {\n components.MuiAccordion = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n },\n rounded: {\n '&:first-child': {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '0',\n borderBottomRightRadius: '0',\n },\n },\n },\n };\n }\n\n // MUI cards\n if (options.cards !== 'mui') {\n components.MuiCard = {\n styleOverrides: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: general.cardBackgroundColor,\n borderRadius: '16px',\n },\n },\n };\n components.MuiCardHeader = {\n styleOverrides: {\n content: {\n '& > span > nav span': {\n textTransform: 'unset',\n letterSpacing: 'normal',\n fountweight: 'normal',\n },\n },\n title: {\n fontSize: '1.125rem',\n },\n action: {\n '& > a > span > svg': {\n fontSize: '1.125rem',\n },\n '& > a[class*=\"MuiIconButton-root\"]:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n };\n components.MuiCardContent = {\n styleOverrides: {\n root: {\n flexGrow: '1',\n backgroundColor: general.cardBackgroundColor,\n '& > div > div > h2[class*=\"MuiTypography-h2-\"]': {\n textTransform: 'unset',\n opacity: '40%',\n },\n '& > div > div > div[class*=\"MuiChip-sizeSmall\"]': {\n backgroundColor: 'transparent',\n borderRadius: '8px',\n outline: `1px solid ${general.disabled}`,\n },\n '& > div[class*=\"Mui-expanded\"]': {\n margin: 'auto',\n },\n '& > div[class*=\"MuiAccordion-root\"]:before': {\n height: 0,\n },\n // Override the default line-clamp from 10 to 2 for the Software template catalog\n '& > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-container-\"][class*=\"MuiGrid-spacing-xs-2-\"] > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-item-\"][class*=\"MuiGrid-grid-xs-12-\"] > div[class*=\"MuiBox-root-\"]':\n {\n '-webkit-line-clamp': '2',\n },\n },\n },\n };\n }\n\n // MUI table\n if (options.tables !== 'mui') {\n components.MuiTable = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n };\n components.MuiTableRow = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n '&:not([class*=\"MuiTableRow-footer\"]):hover': {\n backgroundColor: `${general.tableRowHover} !important`,\n },\n '& > th[class*=\"MuiTableCell-head\"]': {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n },\n };\n components.MuiTableCell = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n '&[class*=\"BackstageTableHeader-header\"]': {\n borderTop: 'unset',\n borderBottom: `1px solid ${general.tableBorderColor}`,\n },\n },\n head: {\n textTransform: 'unset !important',\n color: `${general.tableColumnTitleColor} !important`,\n '& > span[class*=\"MuiTableSortLabel-active\"]': {\n color: `${rhdhPrimary.main} !important`,\n },\n '& > span > svg[class*=\"MuiTableSortLabel-icon\"]': {\n color: 'inherit !important',\n },\n },\n body: {\n color: general.tableTitleColor,\n '& > div[class*=\"MuiChip-sizeSmall\"]': {\n margin: '2px',\n },\n },\n },\n };\n components.MuiTableFooter = {\n styleOverrides: {\n root: {\n '& > tr > td': {\n borderBottom: 'none',\n },\n },\n },\n };\n }\n\n // MUI toolbar\n if (options.toolbars !== 'mui') {\n components.MuiToolbar = {\n styleOverrides: {\n regular: {\n '& > div > h2[class*=\"MuiTypography-h5\"]': {\n fontSize: '1.25rem',\n color: general.tableTitleColor,\n },\n },\n },\n };\n }\n\n // MUI dialogs\n if (options.dialogs !== 'mui') {\n components.MuiDialogContent = {\n styleOverrides: {\n root: {\n '& > div': {\n backgroundColor: general.cardBackgroundColor,\n },\n },\n },\n };\n }\n\n // MUI tabs\n if (options.tabs !== 'mui') {\n components.MuiTabs = {\n defaultProps: {\n indicatorColor: 'primary',\n },\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${general.paperBorderColor}`,\n padding: '0 1.5rem',\n },\n vertical: {\n '& > div > div > button[class*=\"v5\"]': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n '& > div > div > button > span': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n borderBottom: `none`,\n borderLeft: `1px solid ${general.paperBorderColor}`,\n padding: 0,\n \"& span[class*='MuiTabs-indicator']\": {\n width: '3px',\n },\n },\n indicator: {\n left: 0,\n height: '3px',\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n fontWeight: '400',\n minWidth: 'initial !important',\n padding: '0.25em 1em',\n position: 'relative',\n textTransform: 'none',\n zIndex: 1,\n '&:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n top: '0.75em',\n left: '0.5em',\n right: '0.5em',\n bottom: '0.75em',\n borderRadius: '4px',\n zIndex: -1,\n },\n '&.Mui-selected': {\n color: `${palette.text?.primary} !important`,\n },\n '&[class*=\"v5\"]': {\n lineHeight: 1.75,\n },\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent !important',\n '&:before': {\n backgroundColor: general.tabsLinkHoverBackgroundColor,\n },\n },\n '&:disabled': {\n color: general.disabled,\n '&:before': {\n backgroundColor: general.disabledBackground,\n },\n },\n },\n },\n };\n\n // MUI Breadcrumbs\n if (options.breadcrumbs !== 'mui') {\n components.MuiBreadcrumbs = {\n defaultProps: {\n separator: '>',\n },\n styleOverrides: {\n separator: {\n fontWeight: 'bold',\n },\n root: {\n fontWeight: '400',\n },\n li: {\n fontSize: '0.875rem !important',\n fontStyle: 'normal !important',\n },\n },\n };\n }\n }\n\n //\n // Backstage\n //\n if (options.tabs !== 'mui') {\n components.BackstageHeaderTabs = {\n styleOverrides: {\n tabsWrapper: {\n paddingLeft: '0',\n backgroundColor: general.mainSectionBackgroundColor,\n },\n defaultTab: {\n textTransform: 'none',\n fontSize: '0.875rem',\n fontWeight: '400',\n color: 'unset',\n padding: '0.25em 1em',\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n const {\n sidebarBackgroundColor,\n sidebarItemInteractionBackgroundColor,\n navigationItemColor,\n navigationSelectedColor,\n } = resolveNavigationSidebarColors(themeConfig);\n\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n paddingBottom: '1.5rem',\n backgroundColor: sidebarBackgroundColor,\n alignItems: 'stretch',\n // Drawer is position:absolute inside the fixed sidebar-root.\n // Masthead clearance is applied on the root (CssBaseline); keep the\n // drawer filling the root so offsets do not stack.\n top: '0 !important',\n height: '100% !important',\n bottom: '0 !important',\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n '#rhdh-sidebar-layout & a[aria-current=\"page\"], & a[aria-current=\"page\"]':\n {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n '& .MuiTypography-root': {\n color: 'inherit !important',\n },\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 1rem) !important',\n marginLeft: '0.5rem !important',\n textDecorationLine: 'none',\n '&:hover, &:focus-visible': {\n backgroundColor: sidebarItemInteractionBackgroundColor,\n },\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.BackstageSidebarSubmenuItem = {\n styleOverrides: {\n selected: {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderColor: `${sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${navigationItemColor} !important`,\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderRadius: '6px',\n borderTop: '3px solid transparent !important', // default mui selected styling\n paddingTop: '6px !important', // default mui selected styling\n marginTop: '-1px !important', // default mui selected styling\n '&:hover, &:focus-visible': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n },\n '&.Mui-selected': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n },\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.RHDHPageWithoutFixHeight = {\n styleOverrides: {\n root: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-sidebar position.\n '@media (min-width: 600px)': {\n '#rhdh-above-sidebar-header-container:has(*) ~ #rhdh-sidebar-layout':\n {\n // Page inset is margin on SidebarPage; don't double-gap under the masthead.\n \"& [class*='BackstageSidebarPage-root']\": {\n marginTop: '0 !important',\n },\n \"& main, & [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n sidebarLayout: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-main-content position.\n '@media (min-width: 600px)': {\n '#rhdh-above-main-content-header-container:has(*)': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n },\n };\n components.BackstageIconLinkVertical = {\n styleOverrides: {\n label: {\n textTransform: 'none',\n },\n },\n };\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Fill the viewport so short pages don't leave a gap below the shell.\n // App root wrappers (e.g. ApplicationDrawer) can collapse to content\n // height; without a min-height here the page-inset background stops\n // early and body/html shows through (RHDHBUGS-3498).\n minHeight: '100vh',\n // All viewports: paint the content well. Page-inset chrome below is\n // desktop-only; without this, mobile falls through to body\n // (--bui-bg-app / page-inset) instead of mainSectionBackgroundColor.\n backgroundColor: general.mainSectionBackgroundColor,\n // Controls the page inset as in PF6 -- only in desktop view.\n // CSS-only: SidebarPage is the sole scrollport so BUI siblings\n // (PluginHeader + Containers) and classic <main> share one rounded\n // well without an extra DOM wrapper (PageMainContainer).\n //\n // Scrollbar clipping: border-radius alone does not clip Chromium\n // scrollbars. clip-path on this same scrollport does. Margin (not\n // border) forms the page inset so the clipped edge is the well\n // edge — the overflow/scrollbar edge — not the outer border-box.\n //\n // Backstage SidebarPage sets width:100%; horizontal margins would\n // otherwise overflow and get clipped (right gutter disappears).\n '@media (min-width: 600px)': {\n boxSizing: 'border-box',\n // Override Backstage `width: 100%` so margin-right is not pushed\n // off-screen by the parent overflow:hidden.\n width: `calc(100% - ${pageInset}) !important`,\n // Default: top + bottom page inset (no masthead).\n marginTop: pageInset,\n marginRight: pageInset,\n marginBottom: pageInset,\n marginLeft: 0,\n height: `calc(100vh - 2 * ${pageInset})`,\n maxHeight: `calc(100vh - 2 * ${pageInset})`,\n minHeight: '0 !important',\n overflowX: 'hidden',\n overflowY: 'auto',\n // `contain` still allows rubber-band overscroll, which reveals an\n // empty rounded well above the content. `none` disables that.\n overscrollBehavior: 'none',\n // Round only the free (right) edge of the border-box. Left corners\n // stay square so clip-path does not bite the drawer spacer under\n // the fixed sidebar. Left curves of the *content* well are painted\n // by the sticky ::before masks below (after paddingLeft).\n borderRadius: '0 1rem 1rem 0',\n // Clips the scrollbar into the rounded well (border-radius cannot).\n clipPath: 'inset(0 round 0 1rem 1rem 0)',\n // Masthead (or any #global-header) sits above this well in-flow.\n // Drop the top inset and subtract only the header + bottom inset\n // from 100vh so the bottom margin remains visible.\n ':root:has(#global-header) &': {\n marginTop: '0 !important',\n height: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}) !important`,\n maxHeight: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}) !important`,\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: '1rem',\n // Only bottom-right on the border-box; left content curve is ::before.\n clipPath: 'inset(0 round 0 0 1rem 0)',\n '&::before': {\n height: `calc(100vh - var(--rhdh-global-header-height, 64px) - ${pageInset})`,\n marginBottom: `calc(0px - (100vh - var(--rhdh-global-header-height, 64px) - ${pageInset}))`,\n },\n },\n // Sticky masks sit in the content box (after paddingLeft), so their\n // left tiles round the main well against the sidebar without\n // clipping the drawer spacer. Right tiles match the free edge.\n // Keep overscroll-behavior: none so rubber-band does not show a\n // second well. z-index must sit above Backstage Header (100).\n '&::before': {\n content: '\"\"',\n position: 'sticky',\n top: 0,\n display: 'block',\n width: '100%',\n height: `calc(100vh - 2 * ${pageInset})`,\n marginBottom: `calc(0px - (100vh - 2 * ${pageInset}))`,\n pointerEvents: 'none',\n zIndex: 101,\n // Prefer branding chrome hex; fall back to the CSS var synced\n // on html/body above so customized dark themes stay consistent.\n backgroundImage: [\n `radial-gradient(circle at 100% 100%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 0% 100%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 100% 0%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n `radial-gradient(circle at 0% 0%, transparent 1rem, ${chromeBackgroundColor ?? 'var(--bui-redhat-theme-page-inset-bg)'} 1.01rem)`,\n ].join(', '),\n backgroundPosition:\n 'top left, top right, bottom left, bottom right',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '1rem 1rem',\n },\n // No nested scroll/radius on children — the shell scrolls as one.\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n margin: 0,\n borderRadius: 0,\n clipPath: 'none',\n backgroundColor: general.mainSectionBackgroundColor,\n overflow: 'visible',\n height: 'auto',\n maxHeight: 'none',\n },\n \"& > [class*='bui-Container']:not([class*='bui-Header'])\": {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // When a BackstagePage-root is present, the MUI page already has\n // its own header; hide the sibling BUI PluginHeader to avoid duplication.\n \"&:has([class*='BackstagePage-root']) > .bui-PluginHeader\": {\n display: 'none',\n },\n '& > article, & > [class*=\"BackstageContent-root\"]': {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // TechDocs ToC has its own scrollbar — avoid forcing a nested main well.\n \"& > main:has([data-testid='techdocs-native-shadowroot'])\": {\n height: 'auto !important',\n maxHeight: 'none !important',\n marginRight: '0.5rem',\n },\n \"& > [class*='MuiLinearProgress-root']\": {\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\n },\n // DependencyGraph's IconButton is `position:absolute; right:0` but\n // `.fullscreen` is not positioned. Our clip-path on SidebarPage\n // becomes the absolute containing block, so the control sticks to\n // the page-well corner. Re-contain it to the graph, then inset it\n // slightly so the 1rem curve does not shear the icon.\n '& .fullscreen': {\n position: 'relative',\n },\n '& .fullscreen > .MuiIconButton-root, & .fullscreen .MuiIconButton-root[class*=\"fullscreenButton\"]':\n {\n top: '0.5rem !important',\n right: '0.5rem !important',\n zIndex: 3,\n },\n },\n },\n },\n };\n components.BackstageContent = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n },\n };\n components.BackstageContentHeader = {\n styleOverrides: {\n leftItemsBox: {\n '& > h2[class*=\"BackstageContentHeader-title-\"][class*=\"MuiTypography-h4-\"]':\n {\n fontWeight: 'bold',\n fontSize: '1.75rem',\n },\n },\n },\n };\n }\n\n if (options.headers !== 'mui') {\n components.BackstageHeader = {\n styleOverrides: {\n header: {\n boxShadow: 'none',\n },\n title: {\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: '500',\n fontSize: '1.5rem',\n },\n },\n subtitle: {\n '&[class*=\"BackstageHeader-subtitle-\"]': {\n fontWeight: 'normal',\n fontSize: '0.875rem',\n opacity: 1,\n },\n },\n breadcrumb: {\n marginBottom: '0.5rem',\n },\n },\n };\n components.BreadcrumbsCurrentPage = {\n styleOverrides: {\n root: {\n '& p': {\n fontStyle: 'normal',\n fontSize: 'inherit',\n },\n },\n },\n };\n components.BackstageBreadcrumbsStyledBox = {\n styleOverrides: {\n root: {\n textDecoration: 'underline !important',\n color: palette.rhdh?.primary.main,\n '&:hover': {\n color: `color-mix(in srgb, ${palette.rhdh?.primary.main} 50%, ${palette.text?.primary})`,\n },\n },\n },\n };\n components.BackstageItemCardHeader = {\n styleOverrides: {\n root: {\n // This is required to increase the css specificity, to OVERRIDE the styles from\n // BackstageItemCardHeader (https://github.com/backstage/backstage/blob/master/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx)\n // These are applied with a CSS class as well.\n\n // This variant is used when running the Storybook locally (dev mode) and in Backstage/RHDH!\n '&[class*=\"MuiBox-root-\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n // This variant is used when building a static Storybook (`storybook:build`)\n '&[class~=\"MuiBox-root\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n '& > h3[class*=\"MuiTypography-subtitle2-\"] > div > div:first-child': {\n textTransform: 'capitalize',\n },\n },\n },\n };\n }\n\n if (options.toolbars !== 'mui') {\n components.BackstageTableToolbar = {\n styleOverrides: {\n root: {\n '& h2': {\n fontWeight: 'bold',\n },\n },\n title: {\n '& > h2': {\n fontWeight: 'bold',\n },\n },\n },\n };\n }\n\n //\n // Others\n //\n components.CatalogReactUserListPicker = {\n styleOverrides: {\n root: {\n borderRadius: '4px',\n },\n title: {\n textTransform: 'none',\n },\n },\n };\n\n if (options.tabs !== 'mui') {\n components.PrivateTabIndicator = {\n styleOverrides: {\n root: {\n height: '3px',\n zIndex: 1,\n },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":["backstageComponents"],"mappings":";;;;;AAiDO,MAAM,gBAAA,GAAmB,CAAC,WAAA,KAAyC;AAGxE,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAY,EAAC;AACzC,EAAA,MAAM,aAAA,GAAgB,SAAS,YAAA,KAAiB,IAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAW,EAAC;AAExC,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC3C,EAAA,MAAM,WAAA,GACJ,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC7B,EAAA,MAAM,aAAA,G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EAAO;AAC1B,IAAA,UAAA,CAAW,mBAAA,GAAsB;AAAA,MAC/B,cAAA,EAAgB;AAAA,QACd,IAAA,EAAM;AAAA,UACJ,MAAA,EAAQ,KAAA;AAAA,UACR,MAAA,EAAQ;AAAA,SACV;AAAA,QACA,QAAA,EAAU;AAAA,UACR,KAAA,EAAO;AAAA;AACT;AACF,KACF;AAAA,EACF;AAEA,EAAA,OAAO,UAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-theme",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Red Hat Developer Hub Theme",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,13 @@
|
|
|
26
26
|
"sideEffects": [
|
|
27
27
|
"*.css",
|
|
28
28
|
"*.css.esm.js",
|
|
29
|
-
"**/*.css.esm.js"
|
|
29
|
+
"**/*.css.esm.js",
|
|
30
|
+
"./src/fonts.ts",
|
|
31
|
+
"./dist/fonts.esm.js",
|
|
32
|
+
"./src/index.ts",
|
|
33
|
+
"./dist/index.esm.js",
|
|
34
|
+
"./src/legacyExports.ts",
|
|
35
|
+
"./dist/legacyExports.esm.js"
|
|
30
36
|
],
|
|
31
37
|
"exports": {
|
|
32
38
|
".": {
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = "@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF.woff2) format('woff2-variations');\n font-weight: 300 900;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF-Italic.woff2)\n format('woff2-variations');\n font-weight: 300 900;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
//# sourceMappingURL=font.min.css.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font.min.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|