@red-hat-developer-hub/backstage-plugin-theme 0.8.2 → 0.9.0
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 +12 -0
- package/dist/components/ThemeProvider.esm.js +5 -5
- package/dist/components/ThemeProvider.esm.js.map +1 -1
- package/dist/darkTheme.esm.js +2 -0
- package/dist/darkTheme.esm.js.map +1 -1
- package/dist/hooks/useBranding.esm.js +2 -2
- package/dist/hooks/useBranding.esm.js.map +1 -1
- package/dist/hooks/useTheme.esm.js +2 -2
- package/dist/hooks/useTheme.esm.js.map +1 -1
- package/dist/hooks/useThemeConfig.esm.js +2 -2
- package/dist/hooks/useThemeConfig.esm.js.map +1 -1
- package/dist/hooks/useThemeOptions.esm.js +2 -2
- package/dist/hooks/useThemeOptions.esm.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/lightTheme.esm.js +2 -0
- package/dist/lightTheme.esm.js.map +1 -1
- package/dist/themes.esm.js +13 -12
- package/dist/themes.esm.js.map +1 -1
- package/dist/utils/createComponents.esm.js +53 -17
- package/dist/utils/createComponents.esm.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-theme
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c353c97: Bump to backstage version 1.39.1
|
|
8
|
+
|
|
9
|
+
## 0.8.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 142818d: Added `theme.rhdh.general.pageInset` option for easier customizability. Removed broken global header styles.
|
|
14
|
+
|
|
3
15
|
## 0.8.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { UnifiedThemeProvider } from '@backstage/theme';
|
|
3
3
|
import { StyledEngineProvider, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
4
4
|
import { useTheme } from '../hooks/useTheme.esm.js';
|
|
@@ -7,18 +7,18 @@ import { useThemeConfig } from '../hooks/useThemeConfig.esm.js';
|
|
|
7
7
|
const ThemeProvider = ({
|
|
8
8
|
theme,
|
|
9
9
|
children
|
|
10
|
-
}) => /* @__PURE__ */
|
|
10
|
+
}) => /* @__PURE__ */ jsx(UnifiedThemeProvider, { theme, children: /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme: theme.getTheme("v5"), children }) }) });
|
|
11
11
|
const createThemeProvider = (theme) => function RHDHThemeProvider({ children }) {
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsx(ThemeProvider, { theme, children });
|
|
13
13
|
};
|
|
14
14
|
const createThemeProviderForThemeConfig = (themeConfig) => function RHDHThemeProviderForThemeConfig({ children }) {
|
|
15
15
|
const theme = useTheme(themeConfig);
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(ThemeProvider, { theme, children });
|
|
17
17
|
};
|
|
18
18
|
const createThemeProviderForThemeName = (themeName) => function RHDHThemeProviderForThemeName({ children }) {
|
|
19
19
|
const themeConfig = useThemeConfig(themeName);
|
|
20
20
|
const theme = useTheme(themeConfig);
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsx(ThemeProvider, { theme, children });
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { createThemeProvider, createThemeProviderForThemeConfig, createThemeProviderForThemeName };
|
|
@@ -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
|
|
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 } from 'react';\nimport { AppTheme } 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';\n\nimport { useTheme } from '../hooks/useTheme';\nimport { useThemeConfig } from '../hooks/useThemeConfig';\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 theme,\n children,\n}: {\n theme: UnifiedTheme;\n children: ReactNode;\n}) => (\n <UnifiedThemeProvider theme={theme}>\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={theme.getTheme('v5') as Mui5Theme}>\n {children}\n </Mui5Provider>\n </StyledEngineProvider>\n </UnifiedThemeProvider>\n);\n\nexport const createThemeProvider = (\n theme: UnifiedTheme,\n): AppTheme['Provider'] =>\n function RHDHThemeProvider({ children }) {\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n };\n\nexport const createThemeProviderForThemeConfig = (\n themeConfig: ThemeConfig,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeConfig({ children }) {\n const theme = useTheme(themeConfig);\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n };\n\nexport const createThemeProviderForThemeName = (\n themeName: string,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeName({ children }) {\n const themeConfig = useThemeConfig(themeName);\n const theme = useTheme(themeConfig);\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n };\n"],"names":["Mui5Provider"],"mappings":";;;;;;AAuCA,MAAM,gBAAgB,CAAC;AAAA,EACrB,KAAA;AAAA,EACA;AACF,CAAA,yBAIG,oBAAqB,EAAA,EAAA,KAAA,EACpB,QAAC,kBAAA,GAAA,CAAA,oBAAA,EAAA,EAAqB,aAAW,IAC/B,EAAA,QAAA,kBAAA,GAAA,CAACA,eAAa,EAAA,EAAA,KAAA,EAAO,MAAM,QAAS,CAAA,IAAI,CACrC,EAAA,QAAA,EACH,GACF,CACF,EAAA,CAAA;AAGK,MAAM,sBAAsB,CACjC,KAAA,KAEA,SAAS,iBAAkB,CAAA,EAAE,UAAY,EAAA;AACvC,EAAO,uBAAA,GAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAe,QAAS,EAAA,CAAA;AAChD;AAEK,MAAM,oCAAoC,CAC/C,WAAA,KAEA,SAAS,+BAAgC,CAAA,EAAE,UAAY,EAAA;AACrD,EAAM,MAAA,KAAA,GAAQ,SAAS,WAAW,CAAA;AAClC,EAAO,uBAAA,GAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAe,QAAS,EAAA,CAAA;AAChD;AAEK,MAAM,kCAAkC,CAC7C,SAAA,KAEA,SAAS,6BAA8B,CAAA,EAAE,UAAY,EAAA;AACnD,EAAM,MAAA,WAAA,GAAc,eAAe,SAAS,CAAA;AAC5C,EAAM,MAAA,KAAA,GAAQ,SAAS,WAAW,CAAA;AAClC,EAAO,uBAAA,GAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAe,QAAS,EAAA,CAAA;AAChD;;;;"}
|
package/dist/darkTheme.esm.js
CHANGED
|
@@ -29,6 +29,7 @@ const darkThemeOverrides = {
|
|
|
29
29
|
},
|
|
30
30
|
rhdh: {
|
|
31
31
|
general: {
|
|
32
|
+
pageInset: "1.5rem",
|
|
32
33
|
disabled: "#AAABAC",
|
|
33
34
|
disabledBackground: "#444548",
|
|
34
35
|
paperBackgroundImage: "none",
|
|
@@ -50,6 +51,7 @@ const darkThemeOverrides = {
|
|
|
50
51
|
tableBackgroundColor: "#292929",
|
|
51
52
|
tabsLinkHoverBackgroundColor: "rgba(199, 199, 199, 0.1500)",
|
|
52
53
|
contrastText: "#FFF",
|
|
54
|
+
appBarBackgroundScheme: "dark",
|
|
53
55
|
appBarBackgroundColor: "#151515",
|
|
54
56
|
appBarForegroundColor: "#ffffff",
|
|
55
57
|
appBarBackgroundImage: "none"
|
|
@@ -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 background: '#292929',\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 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 appBarBackgroundColor: '#151515',\n appBarForegroundColor: '#ffffff',\n appBarBackgroundImage: 'none',\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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AA;AAAA,MACtB,4BAA8B,EAAA,6BAAA;AAAA,MAE9B,YAAc,EAAA,MAAA;AAAA,MAEd,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA,KACzB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,eAAiB,EAAA,MAAA;AAAA,MACjB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA;AACzB;AAEJ;AAEO,MAAM,kBAAkB,MAA0B;AACvD,EAAA,MAAM,UAAsD,QAAS,CAAA,IAAA;AACrE,EAAO,OAAA;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
|
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 background: '#292929',\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\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 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,kBAAkD,GAAA;AAAA,EAC7D,OAAS,EAAA;AAAA,IACP,IAAM,EAAA;A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MAEd,sBAAwB,EAAA,MAAA;AAAA,MAExB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA,KACzB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,eAAiB,EAAA,MAAA;AAAA,MACjB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA;AACzB;AAEJ;AAEO,MAAM,kBAAkB,MAA0B;AACvD,EAAA,MAAM,UAAsD,QAAS,CAAA,IAAA;AACrE,EAAO,OAAA;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
3
3
|
|
|
4
4
|
const useBranding = () => {
|
|
@@ -7,7 +7,7 @@ const useBranding = () => {
|
|
|
7
7
|
configApi = useApi(configApiRef);
|
|
8
8
|
} catch (err) {
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return useMemo(() => {
|
|
11
11
|
const branding = configApi?.getOptional("app.branding");
|
|
12
12
|
return branding;
|
|
13
13
|
}, [configApi]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBranding.esm.js","sources":["../../src/hooks/useBranding.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
|
|
1
|
+
{"version":3,"file":"useBranding.esm.js","sources":["../../src/hooks/useBranding.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 { useMemo } from 'react';\nimport { ConfigApi, configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { Branding } from '../types';\n\nexport const useBranding = (): Branding | undefined => {\n let configApi: ConfigApi | undefined = undefined;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n configApi = useApi(configApiRef);\n } catch (err) {\n // useApi won't be initialized initially in createApp theme provider, and will get updated later\n }\n return useMemo(() => {\n const branding = configApi?.getOptional<Branding>('app.branding');\n return branding;\n }, [configApi]);\n};\n"],"names":[],"mappings":";;;AAoBO,MAAM,cAAc,MAA4B;AACrD,EAAA,IAAI,SAAmC,GAAA,SAAA;AACvC,EAAI,IAAA;AAEF,IAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AAAA,WACxB,GAAK,EAAA;AAAA;AAGd,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAM,MAAA,QAAA,GAAW,SAAW,EAAA,WAAA,CAAsB,cAAc,CAAA;AAChE,IAAO,OAAA,QAAA;AAAA,GACT,EAAG,CAAC,SAAS,CAAC,CAAA;AAChB;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { createUnifiedTheme } from '@backstage/theme';
|
|
3
3
|
import { useThemeOptions } from './useThemeOptions.esm.js';
|
|
4
4
|
|
|
5
5
|
const useTheme = (themeConfig) => {
|
|
6
6
|
const unifiedThemeOptions = useThemeOptions(themeConfig);
|
|
7
|
-
const theme =
|
|
7
|
+
const theme = useMemo(
|
|
8
8
|
() => createUnifiedTheme(unifiedThemeOptions),
|
|
9
9
|
[unifiedThemeOptions]
|
|
10
10
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.esm.js","sources":["../../src/hooks/useTheme.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
|
|
1
|
+
{"version":3,"file":"useTheme.esm.js","sources":["../../src/hooks/useTheme.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 { useMemo } from 'react';\nimport { createUnifiedTheme, type UnifiedTheme } from '@backstage/theme';\nimport type { ThemeConfig } from '../types';\nimport { useThemeOptions } from './useThemeOptions';\n\n/** Creates a memorized Backstage UnifiedTheme based on the given ThemeConfig. */\nexport const useTheme = (themeConfig: ThemeConfig): UnifiedTheme => {\n const unifiedThemeOptions = useThemeOptions(themeConfig);\n const theme = useMemo<UnifiedTheme>(\n () => createUnifiedTheme(unifiedThemeOptions),\n [unifiedThemeOptions],\n );\n return theme;\n};\n"],"names":[],"mappings":";;;;AAsBa,MAAA,QAAA,GAAW,CAAC,WAA2C,KAAA;AAClE,EAAM,MAAA,mBAAA,GAAsB,gBAAgB,WAAW,CAAA;AACvD,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MAAM,mBAAmB,mBAAmB,CAAA;AAAA,IAC5C,CAAC,mBAAmB;AAAA,GACtB;AACA,EAAO,OAAA,KAAA;AACT;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
3
3
|
|
|
4
4
|
const useThemeConfig = (themeName) => {
|
|
@@ -7,7 +7,7 @@ const useThemeConfig = (themeName) => {
|
|
|
7
7
|
configApi = useApi(configApiRef);
|
|
8
8
|
} catch (err) {
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return useMemo(() => {
|
|
11
11
|
if (!configApi) {
|
|
12
12
|
return {
|
|
13
13
|
mode: themeName.includes("dark") ? "dark" : "light"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeConfig.esm.js","sources":["../../src/hooks/useThemeConfig.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
|
|
1
|
+
{"version":3,"file":"useThemeConfig.esm.js","sources":["../../src/hooks/useThemeConfig.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 { useMemo } from 'react';\nimport { ConfigApi, configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { ThemeConfig } from '../types';\n\nexport const useThemeConfig = (themeName: string): ThemeConfig => {\n let configApi: ConfigApi | undefined = undefined;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n configApi = useApi<ConfigApi>(configApiRef); // NOSONAR\n } catch (err) {\n // useApi won't be initialized initially in createApp theme provider, and will get updated later\n }\n return useMemo(() => {\n if (!configApi) {\n return {\n mode: themeName.includes('dark') ? 'dark' : 'light',\n };\n }\n const themeConfig =\n configApi.getOptional<ThemeConfig>(`app.branding.theme.${themeName}`) ??\n {};\n if (!themeConfig.mode) {\n themeConfig.mode = themeName.includes('dark') ? 'dark' : 'light';\n }\n\n if (Array.isArray(themeConfig?.pageTheme?.default?.fontColor)) {\n themeConfig.pageTheme.default.fontColor =\n themeConfig.pageTheme.default.fontColor[0];\n }\n\n return themeConfig;\n }, [themeName, configApi]);\n};\n"],"names":[],"mappings":";;;AAoBa,MAAA,cAAA,GAAiB,CAAC,SAAmC,KAAA;AAChE,EAAA,IAAI,SAAmC,GAAA,SAAA;AACvC,EAAI,IAAA;AAEF,IAAA,SAAA,GAAY,OAAkB,YAAY,CAAA;AAAA,WACnC,GAAK,EAAA;AAAA;AAGd,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,IAAI,CAAC,SAAW,EAAA;AACd,MAAO,OAAA;AAAA,QACL,IAAM,EAAA,SAAA,CAAU,QAAS,CAAA,MAAM,IAAI,MAAS,GAAA;AAAA,OAC9C;AAAA;AAEF,IAAA,MAAM,cACJ,SAAU,CAAA,WAAA,CAAyB,sBAAsB,SAAS,CAAA,CAAE,KACpE,EAAC;AACH,IAAI,IAAA,CAAC,YAAY,IAAM,EAAA;AACrB,MAAA,WAAA,CAAY,IAAO,GAAA,SAAA,CAAU,QAAS,CAAA,MAAM,IAAI,MAAS,GAAA,OAAA;AAAA;AAG3D,IAAA,IAAI,MAAM,OAAQ,CAAA,WAAA,EAAa,SAAW,EAAA,OAAA,EAAS,SAAS,CAAG,EAAA;AAC7D,MAAA,WAAA,CAAY,UAAU,OAAQ,CAAA,SAAA,GAC5B,YAAY,SAAU,CAAA,OAAA,CAAQ,UAAU,CAAC,CAAA;AAAA;AAG7C,IAAO,OAAA,WAAA;AAAA,GACN,EAAA,CAAC,SAAW,EAAA,SAAS,CAAC,CAAA;AAC3B;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { getDefaultThemeConfig } from '../backstage.esm.js';
|
|
3
3
|
import { getDefaultThemeConfig as getDefaultThemeConfig$1 } from '../rhdh.esm.js';
|
|
4
4
|
import { migrateThemeConfig } from '../utils/migrateTheme.esm.js';
|
|
@@ -7,7 +7,7 @@ import { createPageThemes } from '../utils/createPageThemes.esm.js';
|
|
|
7
7
|
import { createComponents } from '../utils/createComponents.esm.js';
|
|
8
8
|
|
|
9
9
|
const useThemeOptions = (themeConfig) => {
|
|
10
|
-
const theme =
|
|
10
|
+
const theme = useMemo(() => {
|
|
11
11
|
const mode = themeConfig.mode ?? "light";
|
|
12
12
|
const variant = themeConfig.variant ?? "rhdh";
|
|
13
13
|
let defaultThemeConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeOptions.esm.js","sources":["../../src/hooks/useThemeOptions.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
|
|
1
|
+
{"version":3,"file":"useThemeOptions.esm.js","sources":["../../src/hooks/useThemeOptions.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 { useMemo } from 'react';\nimport { type UnifiedThemeOptions } from '@backstage/theme';\nimport type { ThemeConfig } from '../types';\nimport * as backstage from '../backstage';\nimport * as rhdh from '../rhdh';\nimport { migrateThemeConfig } from '../utils/migrateTheme';\nimport { mergeUnifiedThemeOptions } from '../utils/mergeTheme';\nimport { createPageThemes } from '../utils/createPageThemes';\nimport { createComponents } from '../utils/createComponents';\n\n/** Creates a memorized Backstage UnifiedThemeOptions based on the given ThemeConfig. */\nexport const useThemeOptions = (\n themeConfig: ThemeConfig,\n): UnifiedThemeOptions => {\n const theme = useMemo<UnifiedThemeOptions>(() => {\n const mode = themeConfig.mode ?? 'light';\n const variant = themeConfig.variant ?? 'rhdh';\n\n let defaultThemeConfig: ThemeConfig;\n if (variant === 'backstage') {\n defaultThemeConfig = backstage.getDefaultThemeConfig(mode);\n } else {\n defaultThemeConfig = rhdh.getDefaultThemeConfig(mode);\n }\n\n const migratedThemeConfig = migrateThemeConfig(themeConfig);\n const mergedThemeConfig = mergeUnifiedThemeOptions(\n defaultThemeConfig,\n migratedThemeConfig,\n );\n\n const unifiedThemeOption: UnifiedThemeOptions = {\n palette: mergedThemeConfig.palette as UnifiedThemeOptions['palette'],\n defaultPageTheme: mergedThemeConfig.defaultPageTheme,\n fontFamily: mergedThemeConfig.fontFamily,\n htmlFontSize: mergedThemeConfig.htmlFontSize,\n typography: mergedThemeConfig.typography,\n };\n\n unifiedThemeOption.pageTheme = createPageThemes(mergedThemeConfig);\n\n if (variant !== 'backstage') {\n unifiedThemeOption.components = createComponents(mergedThemeConfig);\n }\n\n return unifiedThemeOption;\n }, [themeConfig]);\n return theme;\n};\n"],"names":["backstage.getDefaultThemeConfig","rhdh.getDefaultThemeConfig"],"mappings":";;;;;;;;AA2Ba,MAAA,eAAA,GAAkB,CAC7B,WACwB,KAAA;AACxB,EAAM,MAAA,KAAA,GAAQ,QAA6B,MAAM;AAC/C,IAAM,MAAA,IAAA,GAAO,YAAY,IAAQ,IAAA,OAAA;AACjC,IAAM,MAAA,OAAA,GAAU,YAAY,OAAW,IAAA,MAAA;AAEvC,IAAI,IAAA,kBAAA;AACJ,IAAA,IAAI,YAAY,WAAa,EAAA;AAC3B,MAAqB,kBAAA,GAAAA,sBAAgC,IAAI,CAAA;AAAA,KACpD,MAAA;AACL,MAAqB,kBAAA,GAAAC,wBAA2B,IAAI,CAAA;AAAA;AAGtD,IAAM,MAAA,mBAAA,GAAsB,mBAAmB,WAAW,CAAA;AAC1D,IAAA,MAAM,iBAAoB,GAAA,wBAAA;AAAA,MACxB,kBAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,kBAA0C,GAAA;AAAA,MAC9C,SAAS,iBAAkB,CAAA,OAAA;AAAA,MAC3B,kBAAkB,iBAAkB,CAAA,gBAAA;AAAA,MACpC,YAAY,iBAAkB,CAAA,UAAA;AAAA,MAC9B,cAAc,iBAAkB,CAAA,YAAA;AAAA,MAChC,YAAY,iBAAkB,CAAA;AAAA,KAChC;AAEA,IAAmB,kBAAA,CAAA,SAAA,GAAY,iBAAiB,iBAAiB,CAAA;AAEjE,IAAA,IAAI,YAAY,WAAa,EAAA;AAC3B,MAAmB,kBAAA,CAAA,UAAA,GAAa,iBAAiB,iBAAiB,CAAA;AAAA;AAGpE,IAAO,OAAA,kBAAA;AAAA,GACT,EAAG,CAAC,WAAW,CAAC,CAAA;AAChB,EAAO,OAAA,KAAA;AACT;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';
|
|
2
3
|
export { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';
|
|
3
4
|
import { UnifiedThemeOptions } from '@backstage/theme';
|
|
4
5
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
5
|
-
import
|
|
6
|
+
import * as react from 'react';
|
|
6
7
|
import { AppTheme } from '@backstage/core-plugin-api';
|
|
7
8
|
|
|
8
9
|
type BackstageThemePalette = UnifiedThemeOptions['palette'];
|
|
9
10
|
interface RHDHThemePalette {
|
|
10
11
|
general: {
|
|
12
|
+
pageInset: string;
|
|
11
13
|
disabled: string;
|
|
12
14
|
disabledBackground: string;
|
|
13
15
|
paperBackgroundImage: string;
|
|
@@ -28,6 +30,7 @@ interface RHDHThemePalette {
|
|
|
28
30
|
tableBackgroundColor: string;
|
|
29
31
|
tabsLinkHoverBackgroundColor: string;
|
|
30
32
|
contrastText: string;
|
|
33
|
+
appBarBackgroundScheme: 'light' | 'dark';
|
|
31
34
|
appBarBackgroundColor: string;
|
|
32
35
|
appBarForegroundColor: string;
|
|
33
36
|
appBarBackgroundImage: string;
|
|
@@ -107,10 +110,10 @@ declare const useThemeConfig: (themeName: string) => ThemeConfig;
|
|
|
107
110
|
declare const useThemeOptions: (themeConfig: ThemeConfig) => UnifiedThemeOptions;
|
|
108
111
|
|
|
109
112
|
declare const lightThemeProvider: (props: {
|
|
110
|
-
children:
|
|
113
|
+
children: react.ReactNode;
|
|
111
114
|
}) => JSX.Element | null;
|
|
112
115
|
declare const darkThemeProvider: (props: {
|
|
113
|
-
children:
|
|
116
|
+
children: react.ReactNode;
|
|
114
117
|
}) => JSX.Element | null;
|
|
115
118
|
declare const getAllThemes: () => AppTheme[];
|
|
116
119
|
declare const useAllThemes: () => AppTheme[];
|
package/dist/lightTheme.esm.js
CHANGED
|
@@ -29,6 +29,7 @@ const lightThemeOverrides = {
|
|
|
29
29
|
},
|
|
30
30
|
rhdh: {
|
|
31
31
|
general: {
|
|
32
|
+
pageInset: "1.5rem",
|
|
32
33
|
disabled: "#6A6E73",
|
|
33
34
|
disabledBackground: "#D2D2D2",
|
|
34
35
|
paperBackgroundImage: "none",
|
|
@@ -50,6 +51,7 @@ const lightThemeOverrides = {
|
|
|
50
51
|
tableBackgroundColor: "#FFF",
|
|
51
52
|
tabsLinkHoverBackgroundColor: "rgba(199, 199, 199, 0.2500)",
|
|
52
53
|
contrastText: "#FFF",
|
|
54
|
+
appBarBackgroundScheme: "light",
|
|
53
55
|
appBarBackgroundColor: "#f2f2f2",
|
|
54
56
|
appBarForegroundColor: "#1f1f1f",
|
|
55
57
|
appBarBackgroundImage: "none"
|
|
@@ -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: '#222427',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#222427',\n },\n },\n text: {\n primary: '#151515',\n secondary: '#757575',\n },\n background: {\n default: '#FFFFFF',\n paper: '#FFFFFF',\n },\n rhdh: {\n general: {\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 appBarBackgroundColor: '#f2f2f2',\n appBarForegroundColor: '#1f1f1f',\n appBarBackgroundImage: 'none',\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,m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,MAE9B,YAAc,EAAA,MAAA;AAAA,MAEd,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA,KACzB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,eAAiB,EAAA,SAAA;AAAA,MACjB,qBAAuB,EAAA,MAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA;AACzB;AAEJ;AAEO,MAAM,mBAAmB,MAA0B;AACxD,EAAA,MAAM,UAAuD,QAAS,CAAA,KAAA;AACtE,EAAO,OAAA;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
|
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: '#222427',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#222427',\n },\n },\n text: {\n primary: '#151515',\n secondary: '#757575',\n },\n background: {\n default: '#FFFFFF',\n paper: '#FFFFFF',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\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 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,mBAAmD,GAAA;AAAA,EAC9D,OAAS,EAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA,SAAW,EAAA;AA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ExB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA,SAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA,KACzB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,SAAA;AAAA,MACN,kBAAoB,EAAA;AAAA,KACtB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,eAAiB,EAAA,SAAA;AAAA,MACjB,qBAAuB,EAAA,MAAA;AAAA,MACvB,qBAAuB,EAAA;AAAA;AACzB;AAEJ;AAEO,MAAM,mBAAmB,MAA0B;AACxD,EAAA,MAAM,UAAuD,QAAS,CAAA,KAAA;AACtE,EAAO,OAAA;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
|
package/dist/themes.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { themes } from '@backstage/theme';
|
|
3
4
|
import LightIcon from '@mui/icons-material/WbSunnyRounded';
|
|
4
5
|
import DarkIcon from '@mui/icons-material/Brightness2Rounded';
|
|
@@ -15,21 +16,21 @@ const getAllThemes = () => {
|
|
|
15
16
|
id: "light",
|
|
16
17
|
title: "RHDH Light (latest)",
|
|
17
18
|
variant: "light",
|
|
18
|
-
icon: /* @__PURE__ */
|
|
19
|
+
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
19
20
|
Provider: createThemeProviderForThemeName("light")
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
id: "dark",
|
|
23
24
|
title: "RHDH Dark (latest)",
|
|
24
25
|
variant: "dark",
|
|
25
|
-
icon: /* @__PURE__ */
|
|
26
|
+
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
26
27
|
Provider: createThemeProviderForThemeName("dark")
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
id: "light-customized",
|
|
30
31
|
title: "RHDH Light (customized)",
|
|
31
32
|
variant: "light",
|
|
32
|
-
icon: /* @__PURE__ */
|
|
33
|
+
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
33
34
|
Provider: createThemeProviderForThemeConfig({
|
|
34
35
|
mode: "light",
|
|
35
36
|
variant: "rhdh",
|
|
@@ -43,7 +44,7 @@ const getAllThemes = () => {
|
|
|
43
44
|
id: "dark-customized",
|
|
44
45
|
title: "RHDH Dark (customized)",
|
|
45
46
|
variant: "dark",
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
+
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
47
48
|
Provider: createThemeProviderForThemeConfig({
|
|
48
49
|
mode: "dark",
|
|
49
50
|
variant: "rhdh",
|
|
@@ -57,20 +58,20 @@ const getAllThemes = () => {
|
|
|
57
58
|
id: "backstage-light",
|
|
58
59
|
title: "Backstage Light",
|
|
59
60
|
variant: "light",
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
+
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
61
62
|
Provider: createThemeProvider(themes.light)
|
|
62
63
|
},
|
|
63
64
|
{
|
|
64
65
|
id: "backstage-dark",
|
|
65
66
|
title: "Backstage Dark",
|
|
66
67
|
variant: "dark",
|
|
67
|
-
icon: /* @__PURE__ */
|
|
68
|
+
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
68
69
|
Provider: createThemeProvider(themes.dark)
|
|
69
70
|
}
|
|
70
71
|
];
|
|
71
72
|
};
|
|
72
73
|
const useAllThemes = () => {
|
|
73
|
-
return
|
|
74
|
+
return useMemo(() => getAllThemes(), []);
|
|
74
75
|
};
|
|
75
76
|
const getThemes = () => {
|
|
76
77
|
return [
|
|
@@ -78,23 +79,23 @@ const getThemes = () => {
|
|
|
78
79
|
id: "light",
|
|
79
80
|
title: "Light",
|
|
80
81
|
variant: "light",
|
|
81
|
-
icon: /* @__PURE__ */
|
|
82
|
+
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
82
83
|
Provider: createThemeProviderForThemeName("light")
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
86
|
id: "dark",
|
|
86
87
|
title: "Dark",
|
|
87
88
|
variant: "dark",
|
|
88
|
-
icon: /* @__PURE__ */
|
|
89
|
+
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
89
90
|
Provider: createThemeProviderForThemeName("dark")
|
|
90
91
|
}
|
|
91
92
|
];
|
|
92
93
|
};
|
|
93
94
|
const useThemes = () => {
|
|
94
|
-
return
|
|
95
|
+
return useMemo(() => getThemes(), []);
|
|
95
96
|
};
|
|
96
97
|
const useLoaderTheme = () => {
|
|
97
|
-
return
|
|
98
|
+
return useMemo(() => {
|
|
98
99
|
const latestTheme = localStorage.getItem("theme");
|
|
99
100
|
const mode = latestTheme?.includes("dark") ? "dark" : "light";
|
|
100
101
|
const variant = latestTheme?.includes("backstage") ? "backstage" : "rhdh";
|
package/dist/themes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.esm.js","sources":["../src/themes.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
|
|
1
|
+
{"version":3,"file":"themes.esm.js","sources":["../src/themes.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 { useMemo } from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport { themes } from '@backstage/theme';\n\nimport LightIcon from '@mui/icons-material/WbSunnyRounded';\nimport DarkIcon from '@mui/icons-material/Brightness2Rounded';\nimport { createTheme } from '@mui/material/styles';\n\nimport {\n createThemeProvider,\n createThemeProviderForThemeName,\n createThemeProviderForThemeConfig,\n} from './components/ThemeProvider';\nimport * as backstage from './backstage';\nimport * as rhdh from './rhdh';\n\nexport const lightThemeProvider = createThemeProviderForThemeName('light');\n\nexport const darkThemeProvider = createThemeProviderForThemeName('dark');\n\nexport const getAllThemes = (): AppTheme[] => {\n return [\n {\n id: 'light',\n title: 'RHDH Light (latest)',\n variant: 'light',\n icon: <LightIcon />,\n Provider: createThemeProviderForThemeName('light'),\n },\n {\n id: 'dark',\n title: 'RHDH Dark (latest)',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: createThemeProviderForThemeName('dark'),\n },\n {\n id: 'light-customized',\n title: 'RHDH Light (customized)',\n variant: 'light',\n icon: <LightIcon />,\n Provider: createThemeProviderForThemeConfig({\n mode: 'light',\n variant: 'rhdh',\n palette: {\n primary: { main: '#ff0000' },\n secondary: { main: '#00ff00' },\n },\n }),\n },\n {\n id: 'dark-customized',\n title: 'RHDH Dark (customized)',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: createThemeProviderForThemeConfig({\n mode: 'dark',\n variant: 'rhdh',\n palette: {\n primary: { main: '#ff0000' },\n secondary: { main: '#00ff00' },\n },\n }),\n },\n {\n id: 'backstage-light',\n title: 'Backstage Light',\n variant: 'light',\n icon: <LightIcon />,\n Provider: createThemeProvider(themes.light),\n },\n {\n id: 'backstage-dark',\n title: 'Backstage Dark',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: createThemeProvider(themes.dark),\n },\n ];\n};\n\nexport const useAllThemes = (): AppTheme[] => {\n return useMemo(() => getAllThemes(), []);\n};\n\nexport const getThemes = (): AppTheme[] => {\n return [\n {\n id: 'light',\n title: 'Light',\n variant: 'light',\n icon: <LightIcon />,\n Provider: createThemeProviderForThemeName('light'),\n },\n {\n id: 'dark',\n title: 'Dark',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: createThemeProviderForThemeName('dark'),\n },\n ];\n};\n\nexport const useThemes = (): AppTheme[] => {\n return useMemo(() => getThemes(), []);\n};\n\nexport const useLoaderTheme = () => {\n return useMemo(() => {\n const latestTheme = localStorage.getItem('theme');\n const mode = latestTheme?.includes('dark') ? 'dark' : 'light';\n const variant = latestTheme?.includes('backstage') ? 'backstage' : 'rhdh';\n const themeOptions =\n variant === 'backstage'\n ? backstage.getDefaultThemeConfig(mode)\n : rhdh.getDefaultThemeConfig(mode);\n return createTheme(themeOptions);\n }, []);\n};\n"],"names":["backstage.getDefaultThemeConfig","rhdh.getDefaultThemeConfig"],"mappings":";;;;;;;;;;AAgCa,MAAA,kBAAA,GAAqB,gCAAgC,OAAO;AAE5D,MAAA,iBAAA,GAAoB,gCAAgC,MAAM;AAEhE,MAAM,eAAe,MAAkB;AAC5C,EAAO,OAAA;AAAA,IACL;AAAA,MACE,EAAI,EAAA,OAAA;AAAA,MACJ,KAAO,EAAA,qBAAA;AAAA,MACP,OAAS,EAAA,OAAA;AAAA,MACT,IAAA,sBAAO,SAAU,EAAA,EAAA,CAAA;AAAA,MACjB,QAAA,EAAU,gCAAgC,OAAO;AAAA,KACnD;AAAA,IACA;AAAA,MACE,EAAI,EAAA,MAAA;AAAA,MACJ,KAAO,EAAA,oBAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,IAAA,sBAAO,QAAS,EAAA,EAAA,CAAA;AAAA,MAChB,QAAA,EAAU,gCAAgC,MAAM;AAAA,KAClD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|
37
37
|
styleOverrides: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fontWeight: "normal"
|
|
38
|
+
root: {
|
|
39
|
+
fontFamily: redHatFonts.text,
|
|
40
|
+
fontWeight: "normal",
|
|
41
|
+
letterSpacing: "0.01em",
|
|
42
|
+
// This is required to override the default MUI styles
|
|
43
|
+
// that set the `font-weight` to `500` for the `h1` element.
|
|
44
|
+
"&.MuiTypography-h1": {
|
|
45
|
+
fontWeight: "normal"
|
|
46
|
+
}
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
};
|
|
@@ -531,7 +537,11 @@ const createComponents = (themeConfig) => {
|
|
|
531
537
|
root: {
|
|
532
538
|
borderRadius: "6px",
|
|
533
539
|
width: "calc(100% - 0.5rem) !important",
|
|
534
|
-
marginLeft: "0.5rem !important"
|
|
540
|
+
marginLeft: "0.5rem !important",
|
|
541
|
+
textDecorationLine: "none",
|
|
542
|
+
"&:hover, &:focus-visible": {
|
|
543
|
+
backgroundColor: general.sidebarItemSelectedBackgroundColor
|
|
544
|
+
}
|
|
535
545
|
},
|
|
536
546
|
label: {
|
|
537
547
|
'&[class*="MuiTypography-subtitle2"]': {
|
|
@@ -591,29 +601,55 @@ const createComponents = (themeConfig) => {
|
|
|
591
601
|
};
|
|
592
602
|
}
|
|
593
603
|
if (options.pages !== "mui") {
|
|
604
|
+
components.RHDHPageWithoutFixHeight = {
|
|
605
|
+
styleOverrides: {
|
|
606
|
+
root: {
|
|
607
|
+
// Cancel out the spacing produced by the page inset border when
|
|
608
|
+
// the global header is present in the above-sidebar position.
|
|
609
|
+
"@media (min-width: 600px)": {
|
|
610
|
+
'#above-sidebar-header-container:has(*) ~ [class*="sidebarLayout"]': {
|
|
611
|
+
"& [class*='BackstagePage-root'], & [class*='MuiLinearProgress-root']": {
|
|
612
|
+
marginTop: "0 !important"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
sidebarLayout: {
|
|
618
|
+
// Cancel out the spacing produced by the page inset border when
|
|
619
|
+
// the global header is present in the above-main-content position.
|
|
620
|
+
"@media (min-width: 600px)": {
|
|
621
|
+
"#above-main-content-header-container:has(*)": {
|
|
622
|
+
"& ~ [class*='BackstagePage-root'], & ~ [class*='MuiLinearProgress-root']": {
|
|
623
|
+
marginTop: "0 !important"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
};
|
|
594
630
|
components.BackstageSidebarPage = {
|
|
595
631
|
styleOverrides: {
|
|
596
632
|
root: {
|
|
597
633
|
// Controls the page inset as in PF6 -- only in desktop view
|
|
598
634
|
"@media (min-width: 600px)": {
|
|
599
|
-
// The size of the page inset border
|
|
600
|
-
"--rhdh-v1-page-inset": "1.5rem",
|
|
601
635
|
backgroundColor: general.sidebarBackgroundColor,
|
|
602
|
-
//
|
|
603
|
-
|
|
604
|
-
"& #global-header ~ main, & #global-header ~ [class*='MuiLinearProgress-root'], & #above-main-content-header-container ~ main, & #above-main-content-header-container ~ [class*='MuiLinearProgress-root']": {
|
|
605
|
-
marginTop: "calc(-1 * var(--rhdh-v1-page-inset))"
|
|
606
|
-
},
|
|
636
|
+
// Prevents the main content from scrolling weird
|
|
637
|
+
overflowY: "auto",
|
|
607
638
|
// Cancel out the spacing produced by the page inset border when
|
|
608
639
|
// the sidebar is present
|
|
609
|
-
"& nav
|
|
610
|
-
|
|
640
|
+
"& nav": {
|
|
641
|
+
"& ~ main, & ~ [class*='MuiLinearProgress-root']": {
|
|
642
|
+
marginLeft: "0 !important"
|
|
643
|
+
}
|
|
611
644
|
},
|
|
612
|
-
// The border + border radius emulates the PF6 page inset look without
|
|
613
|
-
// needing to change the markup
|
|
614
645
|
"& > [class*='MuiLinearProgress-root'], & > main": {
|
|
615
|
-
|
|
616
|
-
border
|
|
646
|
+
// clip-path clips the scrollbar properly in Chrome compared to
|
|
647
|
+
// border-radius. 1rem is the hardcoded border-radius of the page content.
|
|
648
|
+
clipPath: "rect(0 100% 100% 0 round 1rem)",
|
|
649
|
+
// Emulate the PatternFly 6 page inset using a margin
|
|
650
|
+
margin: general.pageInset,
|
|
651
|
+
// Prevent overflow in the main container due to the margin
|
|
652
|
+
maxHeight: `calc(100vh - 2 * ${general.pageInset})`
|
|
617
653
|
},
|
|
618
654
|
// The Backstage suspense is an MUI LinearProgress that is not wrapped by
|
|
619
655
|
// a `main`. We need to give it 100vh height to fill the page for the page
|
|
@@ -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';\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 BackstagePage?: Component;\n BackstageContent?: Component;\n BackstageContentHeader?: Component;\n BackstageHeader?: Component;\n BackstageItemCardHeader?: Component;\n BackstageTableToolbar?: Component;\n CatalogReactUserListPicker?: Component;\n PrivateTabIndicator?: 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 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 return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\n },\n };\n },\n };\n\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n button: {\n textTransform: 'none',\n fontWeight: 'normal',\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: 4,\n borderBottomRightRadius: 4,\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\n if (options.appBar !== 'mui') {\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n backgroundColor: general.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.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 // @ts-expect-error: MUI types are not up to date\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 components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n borderRight: `0.5rem solid ${general.sidebarBackgroundColor}`,\n paddingBottom: '1.5rem',\n backgroundColor: general.sidebarBackgroundColor,\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 0.5rem) !important',\n marginLeft: '0.5rem !important',\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: general.sidebarItemSelectedBackgroundColor,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${general.sidebarBackgroundColor} !important`,\n borderColor: `${general.sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${palette.text?.primary} !important`,\n backgroundColor: `${general.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: `${general.sidebarItemSelectedBackgroundColor} !important`,\n },\n },\n selected: {\n backgroundColor: `${general.sidebarItemSelectedBackgroundColor} !important`,\n color: `${palette.text?.primary} !important`,\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${general.sidebarBackgroundColor} !important`,\n },\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Controls the page inset as in PF6 -- only in desktop view\n '@media (min-width: 600px)': {\n // The size of the page inset border\n '--rhdh-v1-page-inset': '1.5rem',\n backgroundColor: general.sidebarBackgroundColor,\n // Cancel out the spacing produced by the page inset border when\n // the global header is present\n \"& #global-header ~ main, & #global-header ~ [class*='MuiLinearProgress-root'], & #above-main-content-header-container ~ main, & #above-main-content-header-container ~ [class*='MuiLinearProgress-root']\":\n {\n marginTop: 'calc(-1 * var(--rhdh-v1-page-inset))',\n },\n // Cancel out the spacing produced by the page inset border when\n // the sidebar is present\n \"& nav ~ main, & nav ~ [class*='MuiLinearProgress-root']\": {\n marginLeft: 'calc(-1 * var(--rhdh-v1-page-inset))',\n },\n // The border + border radius emulates the PF6 page inset look without\n // needing to change the markup\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n borderRadius: 'calc(1rem + var(--rhdh-v1-page-inset))',\n border: `var(--rhdh-v1-page-inset) solid ${general.sidebarBackgroundColor}`,\n },\n // The Backstage suspense is an MUI LinearProgress that is not wrapped by\n // a `main`. We need to give it 100vh height to fill the page for the page\n // inset to look right.\n \"& > [class*='MuiLinearProgress-root']\": {\n backgroundColor: general.mainSectionBackgroundColor,\n height: '100vh',\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\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":";;;AA6Ca,MAAA,gBAAA,GAAmB,CAAC,WAAyC,KAAA;AAGxE,EAAM,MAAA,OAAA,GAAU,WAAY,CAAA,OAAA,IAAY,EAAC;AACzC,EAAM,MAAA,aAAA,GAAgB,SAAS,YAAiB,KAAA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AGF,EAAI,IAAA,OAAA,CAAQ,aAAa,KAAO,EAAA;AAC9B,IAAA,UAAA,CAAW,qBAAwB,GAAA;AAAA,MACjC,cAAgB,EAAA;AAAA,QACd,IAAM,EAAA;AAAA,UACJ,MAAQ,EAAA;AAAA,YACN,UAAY,EAAA;AAAA;AACd,SACF;AAAA,QACA,KAAO,EAAA;AAAA,UACL,QAAU,EAAA;AAAA,YACR,UAAY,EAAA;AAAA;AACd;AACF;AACF,KACF;AAAA;AAMF,EAAA,UAAA,CAAW,0BAA6B,GAAA;AAAA,IACtC,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA;AAAA,OAChB;AAAA,MACA,KAAO,EAAA;AAAA,QACL,aAAe,EAAA;AAAA;AACjB;AACF,GACF;AAEA,EAAI,IAAA,OAAA,CAAQ,SAAS,KAAO,EAAA;AAC1B,IAAA,UAAA,CAAW,mBAAsB,GAAA;AAAA,MAC/B,cAAgB,EAAA;AAAA,QACd,IAAM,EAAA;AAAA,UACJ,MAAQ,EAAA,KAAA;AAAA,UACR,MAAQ,EAAA;AAAA,SACV;AAAA,QACA,QAAU,EAAA;AAAA,UACR,KAAO,EAAA;AAAA;AACT;AACF,KACF;AAAA;AAGF,EAAO,OAAA,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';\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 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 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 return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\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 },\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: 4,\n borderBottomRightRadius: 4,\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\n if (options.appBar !== 'mui') {\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n backgroundColor: general.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.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 // @ts-expect-error: MUI types are not up to date\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 components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n borderRight: `0.5rem solid ${general.sidebarBackgroundColor}`,\n paddingBottom: '1.5rem',\n backgroundColor: general.sidebarBackgroundColor,\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 0.5rem) !important',\n marginLeft: '0.5rem !important',\n textDecorationLine: 'none',\n '&:hover, &:focus-visible': {\n backgroundColor: general.sidebarItemSelectedBackgroundColor,\n },\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: general.sidebarItemSelectedBackgroundColor,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${general.sidebarBackgroundColor} !important`,\n borderColor: `${general.sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${palette.text?.primary} !important`,\n backgroundColor: `${general.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: `${general.sidebarItemSelectedBackgroundColor} !important`,\n },\n },\n selected: {\n backgroundColor: `${general.sidebarItemSelectedBackgroundColor} !important`,\n color: `${palette.text?.primary} !important`,\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${general.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 '#above-sidebar-header-container:has(*) ~ [class*=\"sidebarLayout\"]':\n {\n \"& [class*='BackstagePage-root'], & [class*='MuiLinearProgress-root']\":\n {\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 '#above-main-content-header-container:has(*)': {\n \"& ~ [class*='BackstagePage-root'], & ~ [class*='MuiLinearProgress-root']\":\n {\n marginTop: '0 !important',\n },\n },\n },\n },\n },\n };\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Controls the page inset as in PF6 -- only in desktop view\n '@media (min-width: 600px)': {\n backgroundColor: general.sidebarBackgroundColor,\n // Prevents the main content from scrolling weird\n overflowY: 'auto',\n // Cancel out the spacing produced by the page inset border when\n // the sidebar is present\n '& nav': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginLeft: '0 !important',\n },\n },\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n // clip-path clips the scrollbar properly in Chrome compared to\n // border-radius. 1rem is the hardcoded border-radius of the page content.\n clipPath: 'rect(0 100% 100% 0 round 1rem)',\n // Emulate the PatternFly 6 page inset using a margin\n margin: general.pageInset,\n // Prevent overflow in the main container due to the margin\n maxHeight: `calc(100vh - 2 * ${general.pageInset})`,\n },\n // The Backstage suspense is an MUI LinearProgress that is not wrapped by\n // a `main`. We need to give it 100vh height to fill the page for the page\n // inset to look right.\n \"& > [class*='MuiLinearProgress-root']\": {\n backgroundColor: general.mainSectionBackgroundColor,\n height: '100vh',\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\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":";;;AA8Ca,MAAA,gBAAA,GAAmB,CAAC,WAAyC,KAAA;AAGxE,EAAM,MAAA,OAAA,GAAU,WAAY,CAAA,OAAA,IAAY,EAAC;AACzC,EAAM,MAAA,aAAA,GAAgB,SAAS,YAAiB,KAAA,IAAA;AAEhD,EAAM,MAAA,OAAA,GAAU,WAAY,CAAA,OAAA,IAAW,EAAC;AAExC,EAAA,MAAM,OAAU,GAAA,OAAA,CAAQ,IAAM,EAAA,OAAA,IAAY,EAAC;AAC3C,EAAA,MAAM,WACJ,GAAA,OAAA,CAAQ,IAAM,EAAA,OAAA,IAAY,EAAC;AAC7B,EAAA,MA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6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Red Hat Developer Hub Theme",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
"postpack": "backstage-cli package postpack"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
37
|
-
"@backstage/theme": "^0.6.
|
|
36
|
+
"@backstage/core-plugin-api": "^1.10.7",
|
|
37
|
+
"@backstage/theme": "^0.6.6",
|
|
38
38
|
"@material-ui/icons": "^4.11.3",
|
|
39
39
|
"@mui/icons-material": "^5.17.1",
|
|
40
40
|
"@mui/material": "^5.0.0",
|
|
41
41
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@backstage/cli": "^0.
|
|
45
|
-
"@backstage/core-app-api": "^1.
|
|
46
|
-
"@backstage/core-components": "^0.
|
|
47
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
48
|
-
"@backstage/dev-utils": "^1.1.
|
|
49
|
-
"@backstage/plugin-user-settings": "^0.8.
|
|
50
|
-
"@backstage/test-utils": "^1.7.
|
|
51
|
-
"@backstage/theme": "^0.6.
|
|
44
|
+
"@backstage/cli": "^0.32.1",
|
|
45
|
+
"@backstage/core-app-api": "^1.17.0",
|
|
46
|
+
"@backstage/core-components": "^0.17.2",
|
|
47
|
+
"@backstage/core-plugin-api": "^1.10.7",
|
|
48
|
+
"@backstage/dev-utils": "^1.1.10",
|
|
49
|
+
"@backstage/plugin-user-settings": "^0.8.22",
|
|
50
|
+
"@backstage/test-utils": "^1.7.8",
|
|
51
|
+
"@backstage/theme": "^0.6.6",
|
|
52
52
|
"@backstage/types": "^1.2.1",
|
|
53
53
|
"@material-ui/icons": "^4.11.3",
|
|
54
54
|
"@testing-library/jest-dom": "^6.0.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
},
|
|
84
84
|
"typesVersions": {
|
|
85
85
|
"*": {
|
|
86
|
-
"
|
|
87
|
-
"
|
|
86
|
+
"package.json": [
|
|
87
|
+
"package.json"
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
},
|