@red-hat-developer-hub/backstage-plugin-theme 0.4.7 → 0.4.9
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 +13 -0
- package/dist/components/ThemeProvider.esm.js +25 -0
- package/dist/components/ThemeProvider.esm.js.map +1 -0
- package/dist/fonts.esm.js +92 -0
- package/dist/fonts.esm.js.map +1 -0
- package/dist/rhdh.esm.js +3 -3
- package/dist/rhdh.esm.js.map +1 -1
- package/dist/themes.esm.js +2 -15
- package/dist/themes.esm.js.map +1 -1
- package/dist/typography.esm.js +10 -40
- package/dist/typography.esm.js.map +1 -1
- package/dist/utils/createComponents.esm.js +23 -0
- package/dist/utils/createComponents.esm.js.map +1 -1
- package/package.json +6 -14
- package/dist/plugins/theme/fonts/font.css.esm.js +0 -7
- package/dist/plugins/theme/fonts/font.css.esm.js.map +0 -1
- package/fonts/OPEN-FONT-LICENSE +0 -94
- package/fonts/README.md +0 -9
- package/fonts/RedHatDisplay/RedHatDisplay-Black.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-BlackItalic.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-Bold.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-BoldItalic.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-Italic.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-Light.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-LightItalic.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-Medium.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-MediumItalic.woff2 +0 -0
- package/fonts/RedHatDisplay/RedHatDisplay-Regular.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-Bold.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-BoldItalic.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-Italic.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-Light.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-LightItalic.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-Medium.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-MediumItalic.woff2 +0 -0
- package/fonts/RedHatMono/RedHatMono-Regular.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-Bold.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-BoldItalic.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-Italic.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-Light.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-LightItalic.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-Medium.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-MediumItalic.woff2 +0 -0
- package/fonts/RedHatText/RedHatText-Regular.woff2 +0 -0
- package/fonts/font.css +0 -54
- package/fonts/font.min.css +0 -43
- package/fonts/index.html +0 -374
- /package/{fonts → dist/assets/fonts}/RedHatDisplay/RedHatDisplayVF-Italic.woff2 +0 -0
- /package/{fonts → dist/assets/fonts}/RedHatDisplay/RedHatDisplayVF.woff2 +0 -0
- /package/{fonts → dist/assets/fonts}/RedHatMono/RedHatMonoVF-Italic.woff2 +0 -0
- /package/{fonts → dist/assets/fonts}/RedHatMono/RedHatMonoVF.woff2 +0 -0
- /package/{fonts → dist/assets/fonts}/RedHatText/RedHatTextVF-Italic.woff2 +0 -0
- /package/{fonts → dist/assets/fonts}/RedHatText/RedHatTextVF.woff2 +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-theme
|
|
2
2
|
|
|
3
|
+
## 0.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b6efba4: fix font loading after migrating theme
|
|
8
|
+
|
|
9
|
+
## 0.4.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 370d9b1: move the mui v5 package to a peer dependency to ensure that we don't load it twice
|
|
14
|
+
- 67de15b: added a workaround so that `defaultProps` are also picked up from MUI v5 components (like Button disabledRipple or Grid spacing)
|
|
15
|
+
|
|
3
16
|
## 0.4.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UnifiedThemeProvider } from '@backstage/theme';
|
|
3
|
+
import { StyledEngineProvider, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
4
|
+
import { useTheme } from '../hooks/useTheme.esm.js';
|
|
5
|
+
import { useThemeConfig } from '../hooks/useThemeConfig.esm.js';
|
|
6
|
+
|
|
7
|
+
const ThemeProvider = ({
|
|
8
|
+
theme,
|
|
9
|
+
children
|
|
10
|
+
}) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme }, /* @__PURE__ */ React.createElement(StyledEngineProvider, { injectFirst: true }, /* @__PURE__ */ React.createElement(ThemeProvider$1, { theme: theme.getTheme("v5") }, children)));
|
|
11
|
+
const createThemeProvider = (theme) => function RHDHThemeProvider({ children }) {
|
|
12
|
+
return /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, children);
|
|
13
|
+
};
|
|
14
|
+
const createThemeProviderForThemeConfig = (themeConfig) => function RHDHThemeProviderForThemeConfig({ children }) {
|
|
15
|
+
const theme = useTheme(themeConfig);
|
|
16
|
+
return /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, children);
|
|
17
|
+
};
|
|
18
|
+
const createThemeProviderForThemeName = (themeName) => function RHDHThemeProviderForThemeName({ children }) {
|
|
19
|
+
const themeConfig = useThemeConfig(themeName);
|
|
20
|
+
const theme = useTheme(themeConfig);
|
|
21
|
+
return /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, children);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { createThemeProvider, createThemeProviderForThemeConfig, createThemeProviderForThemeName };
|
|
25
|
+
//# sourceMappingURL=ThemeProvider.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport React 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: React.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":";;;;;;AAsCA,MAAM,gBAAgB,CAAC;AAAA,EACrB,KAAA;AAAA,EACA;AACF,CAAA,yCAIG,oBAAqB,EAAA,EAAA,KAAA,EAAA,kBACnB,KAAA,CAAA,aAAA,CAAA,oBAAA,EAAA,EAAqB,aAAW,IAC/B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAACA,eAAa,EAAA,EAAA,KAAA,EAAO,MAAM,QAAS,CAAA,IAAI,CACrC,EAAA,EAAA,QACH,CACF,CACF,CAAA;AAGK,MAAM,sBAAsB,CACjC,KAAA,KAEA,SAAS,iBAAkB,CAAA,EAAE,UAAY,EAAA;AACvC,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAA,EAAe,QAAS,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,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAA,EAAe,QAAS,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,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAA,EAAe,QAAS,CAAA;AAChD;;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import RedHatDisplay from './assets/fonts/RedHatDisplay/RedHatDisplayVF.woff2';
|
|
2
|
+
import RedHatDisplayItalic from './assets/fonts/RedHatDisplay/RedHatDisplayVF-Italic.woff2';
|
|
3
|
+
import RedHatText from './assets/fonts/RedHatText/RedHatTextVF.woff2';
|
|
4
|
+
import RedHatTextItalic from './assets/fonts/RedHatText/RedHatTextVF-Italic.woff2';
|
|
5
|
+
import RedHatMono from './assets/fonts/RedHatMono/RedHatMonoVF.woff2';
|
|
6
|
+
import RedHatMonoItalic from './assets/fonts/RedHatMono/RedHatMonoVF-Italic.woff2';
|
|
7
|
+
|
|
8
|
+
const RedHatDisplayFontFace = {
|
|
9
|
+
fontFamily: "RedHatDisplay",
|
|
10
|
+
src: `url(${RedHatDisplay}) format('woff2-variations')`,
|
|
11
|
+
fontWeight: "300 900",
|
|
12
|
+
fontStyle: "normal",
|
|
13
|
+
fontDisplay: "fallback"
|
|
14
|
+
};
|
|
15
|
+
const RedHatDisplayItalicFontFace = {
|
|
16
|
+
fontFamily: "RedHatDisplay",
|
|
17
|
+
src: `url(${RedHatDisplayItalic}) format('woff2-variations')`,
|
|
18
|
+
fontWeight: "300 900",
|
|
19
|
+
fontStyle: "italic",
|
|
20
|
+
fontDisplay: "fallback"
|
|
21
|
+
};
|
|
22
|
+
const RedHatTextFontFace = {
|
|
23
|
+
fontFamily: "RedHatText",
|
|
24
|
+
src: `url(${RedHatText}) format('woff2-variations')`,
|
|
25
|
+
fontWeight: "300 700",
|
|
26
|
+
fontStyle: "normal",
|
|
27
|
+
fontDisplay: "fallback"
|
|
28
|
+
};
|
|
29
|
+
const RedHatTextItalicFontFace = {
|
|
30
|
+
fontFamily: "RedHatText",
|
|
31
|
+
src: `url(${RedHatTextItalic}) format('woff2-variations')`,
|
|
32
|
+
fontWeight: "300 700",
|
|
33
|
+
fontStyle: "italic",
|
|
34
|
+
fontDisplay: "fallback"
|
|
35
|
+
};
|
|
36
|
+
const RedHatMonoFontFace = {
|
|
37
|
+
fontFamily: "RedHatMono",
|
|
38
|
+
src: `url(${RedHatMono}) format('woff2-variations')`,
|
|
39
|
+
fontWeight: "300 700",
|
|
40
|
+
fontStyle: "normal",
|
|
41
|
+
fontDisplay: "fallback"
|
|
42
|
+
};
|
|
43
|
+
const RedHatMonoItalicFontFace = {
|
|
44
|
+
fontFamily: "RedHatMono",
|
|
45
|
+
src: `url(${RedHatMonoItalic}) format('woff2-variations')`,
|
|
46
|
+
fontWeight: "300 700",
|
|
47
|
+
fontStyle: "italic",
|
|
48
|
+
fontDisplay: "fallback"
|
|
49
|
+
};
|
|
50
|
+
const redHatFontFaces = [
|
|
51
|
+
RedHatDisplayFontFace,
|
|
52
|
+
RedHatDisplayItalicFontFace,
|
|
53
|
+
RedHatTextFontFace,
|
|
54
|
+
RedHatTextItalicFontFace,
|
|
55
|
+
RedHatMonoFontFace,
|
|
56
|
+
RedHatMonoItalicFontFace
|
|
57
|
+
];
|
|
58
|
+
const redHatFonts = {
|
|
59
|
+
text: [
|
|
60
|
+
"RedHatText",
|
|
61
|
+
'"Helvetica Neue"',
|
|
62
|
+
"-apple-system",
|
|
63
|
+
'"Segoe UI"',
|
|
64
|
+
"Roboto",
|
|
65
|
+
"Helvetica",
|
|
66
|
+
"Arial",
|
|
67
|
+
"sans-serif"
|
|
68
|
+
].join(", "),
|
|
69
|
+
heading: [
|
|
70
|
+
"RedHatDisplay",
|
|
71
|
+
'"Helvetica Neue"',
|
|
72
|
+
"-apple-system",
|
|
73
|
+
'"Segoe UI"',
|
|
74
|
+
"Roboto",
|
|
75
|
+
"Helvetica",
|
|
76
|
+
"Arial",
|
|
77
|
+
"sans-serif"
|
|
78
|
+
].join(", "),
|
|
79
|
+
monospace: [
|
|
80
|
+
"RedHatMono",
|
|
81
|
+
'"Liberation Mono"',
|
|
82
|
+
"consolas",
|
|
83
|
+
'"SFMono-Regular"',
|
|
84
|
+
"menlo",
|
|
85
|
+
"monaco",
|
|
86
|
+
'"Courier New"',
|
|
87
|
+
"monospace"
|
|
88
|
+
].join(", ")
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { RedHatTextFontFace, redHatFontFaces, redHatFonts };
|
|
92
|
+
//# sourceMappingURL=fonts.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.esm.js","sources":["../src/fonts.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport RedHatDisplay from './assets/fonts/RedHatDisplay/RedHatDisplayVF.woff2';\nimport RedHatDisplayItalic from './assets/fonts/RedHatDisplay/RedHatDisplayVF-Italic.woff2';\nimport RedHatText from './assets/fonts/RedHatText/RedHatTextVF.woff2';\nimport RedHatTextItalic from './assets/fonts/RedHatText/RedHatTextVF-Italic.woff2';\nimport RedHatMono from './assets/fonts/RedHatMono/RedHatMonoVF.woff2';\nimport RedHatMonoItalic from './assets/fonts/RedHatMono/RedHatMonoVF-Italic.woff2';\n\nconst RedHatDisplayFontFace = {\n fontFamily: 'RedHatDisplay',\n src: `url(${RedHatDisplay}) format('woff2-variations')`,\n fontWeight: '300 900',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatDisplayItalicFontFace = {\n fontFamily: 'RedHatDisplay',\n src: `url(${RedHatDisplayItalic}) format('woff2-variations')`,\n fontWeight: '300 900',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nexport const RedHatTextFontFace = {\n fontFamily: 'RedHatText',\n src: `url(${RedHatText}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatTextItalicFontFace = {\n fontFamily: 'RedHatText',\n src: `url(${RedHatTextItalic}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nconst RedHatMonoFontFace = {\n fontFamily: 'RedHatMono',\n src: `url(${RedHatMono}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'normal',\n fontDisplay: 'fallback',\n};\n\nconst RedHatMonoItalicFontFace = {\n fontFamily: 'RedHatMono',\n src: `url(${RedHatMonoItalic}) format('woff2-variations')`,\n fontWeight: '300 700',\n fontStyle: 'italic',\n fontDisplay: 'fallback',\n};\n\nexport const redHatFontFaces = [\n RedHatDisplayFontFace,\n RedHatDisplayItalicFontFace,\n RedHatTextFontFace,\n RedHatTextItalicFontFace,\n RedHatMonoFontFace,\n RedHatMonoItalicFontFace,\n];\n\nexport const redHatFonts = {\n text: [\n 'RedHatText',\n '\"Helvetica Neue\"',\n '-apple-system',\n '\"Segoe UI\"',\n 'Roboto',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ].join(', '),\n heading: [\n 'RedHatDisplay',\n '\"Helvetica Neue\"',\n '-apple-system',\n '\"Segoe UI\"',\n 'Roboto',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ].join(', '),\n monospace: [\n 'RedHatMono',\n '\"Liberation Mono\"',\n 'consolas',\n '\"SFMono-Regular\"',\n 'menlo',\n 'monaco',\n '\"Courier New\"',\n 'monospace',\n ].join(', '),\n};\n"],"names":[],"mappings":";;;;;;;AAsBA,MAAM,qBAAwB,GAAA;AAAA,EAC5B,UAAY,EAAA,eAAA;AAAA,EACZ,GAAA,EAAK,OAAO,aAAa,CAAA,4BAAA,CAAA;AAAA,EACzB,UA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;AAAA,EACA;AACF;AAEO,MAAM,WAAc,GAAA;AAAA,EACzB,IAAM,EAAA;AAAA,IACJ,YAAA;AAAA,IACA,kBAAA;AAAA,IACA,eAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF,CAAE,KAAK,IAAI,CAAA;AAAA,EACX,OAAS,EAAA;AAAA,IACP,eAAA;AAAA,IACA,kBAAA;AAAA,IACA,eAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF,CAAE,KAAK,IAAI,CAAA;AAAA,EACX,SAAW,EAAA;AAAA,IACT,YAAA;AAAA,IACA,mBAAA;AAAA,IACA,UAAA;AAAA,IACA,kBAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAA;AAAA,IACA;AAAA,GACF,CAAE,KAAK,IAAI;AACb;;;;"}
|
package/dist/rhdh.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import './plugins/theme/fonts/font.css.esm.js';
|
|
2
1
|
import { customDarkTheme } from './darkTheme.esm.js';
|
|
3
2
|
import { customLightTheme } from './lightTheme.esm.js';
|
|
4
|
-
import {
|
|
3
|
+
import { redHatFonts } from './fonts.esm.js';
|
|
4
|
+
import { typography } from './typography.esm.js';
|
|
5
5
|
|
|
6
6
|
const getDefaultThemeConfig = (mode) => {
|
|
7
7
|
const palette = mode === "dark" ? customDarkTheme() : customLightTheme();
|
|
@@ -9,7 +9,7 @@ const getDefaultThemeConfig = (mode) => {
|
|
|
9
9
|
variant: "rhdh",
|
|
10
10
|
mode: mode === "dark" ? "dark" : "light",
|
|
11
11
|
palette,
|
|
12
|
-
fontFamily:
|
|
12
|
+
fontFamily: redHatFonts.text,
|
|
13
13
|
typography,
|
|
14
14
|
defaultPageTheme: "default",
|
|
15
15
|
pageTheme: {
|
package/dist/rhdh.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rhdh.esm.js","sources":["../src/rhdh.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\
|
|
1
|
+
{"version":3,"file":"rhdh.esm.js","sources":["../src/rhdh.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { ThemeConfig } from './types';\nimport { customDarkTheme } from './darkTheme';\nimport { customLightTheme } from './lightTheme';\nimport { redHatFonts } from './fonts';\nimport { typography } from './typography';\n\nexport const getDefaultThemeConfig = (mode: 'light' | 'dark'): ThemeConfig => {\n const palette = mode === 'dark' ? customDarkTheme() : customLightTheme();\n\n return {\n variant: 'rhdh',\n mode: mode === 'dark' ? 'dark' : 'light',\n palette,\n fontFamily: redHatFonts.text,\n typography,\n defaultPageTheme: 'default',\n pageTheme: {\n default: {\n backgroundColor: mode === 'dark' ? '#0f1214' : '#ffffff',\n fontColor: mode === 'dark' ? '#ffffff' : '#000000',\n },\n },\n options: {},\n };\n};\n"],"names":[],"mappings":";;;;;AAqBa,MAAA,qBAAA,GAAwB,CAAC,IAAwC,KAAA;AAC5E,EAAA,MAAM,OAAU,GAAA,IAAA,KAAS,MAAS,GAAA,eAAA,KAAoB,gBAAiB,EAAA;AAEvE,EAAO,OAAA;AAAA,IACL,OAAS,EAAA,MAAA;AAAA,IACT,IAAA,EAAM,IAAS,KAAA,MAAA,GAAS,MAAS,GAAA,OAAA;AAAA,IACjC,OAAA;AAAA,IACA,YAAY,WAAY,CAAA,IAAA;AAAA,IACxB,UAAA;AAAA,IACA,gBAAkB,EAAA,SAAA;AAAA,IAClB,SAAW,EAAA;AAAA,MACT,OAAS,EAAA;AAAA,QACP,eAAA,EAAiB,IAAS,KAAA,MAAA,GAAS,SAAY,GAAA,SAAA;AAAA,QAC/C,SAAA,EAAW,IAAS,KAAA,MAAA,GAAS,SAAY,GAAA;AAAA;AAC3C,KACF;AAAA,IACA,SAAS;AAAC,GACZ;AACF;;;;"}
|
package/dist/themes.esm.js
CHANGED
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { themes
|
|
2
|
+
import { themes } from '@backstage/theme';
|
|
3
3
|
import LightIcon from '@material-ui/icons/WbSunny';
|
|
4
4
|
import DarkIcon from '@material-ui/icons/Brightness2';
|
|
5
5
|
import { createTheme } from '@mui/material/styles';
|
|
6
|
+
import { createThemeProviderForThemeName, createThemeProviderForThemeConfig, createThemeProvider } from './components/ThemeProvider.esm.js';
|
|
6
7
|
import { getDefaultThemeConfig } from './backstage.esm.js';
|
|
7
8
|
import { getDefaultThemeConfig as getDefaultThemeConfig$1 } from './rhdh.esm.js';
|
|
8
|
-
import { useTheme } from './hooks/useTheme.esm.js';
|
|
9
|
-
import { useThemeConfig } from './hooks/useThemeConfig.esm.js';
|
|
10
9
|
|
|
11
|
-
const createThemeProvider = (theme) => function RHDHThemeProvider({ children }) {
|
|
12
|
-
return /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme }, children);
|
|
13
|
-
};
|
|
14
|
-
const createThemeProviderForThemeConfig = (themeConfig) => function RHDHThemeProviderForThemeConfig({ children }) {
|
|
15
|
-
const theme = useTheme(themeConfig);
|
|
16
|
-
return /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme }, children);
|
|
17
|
-
};
|
|
18
|
-
const createThemeProviderForThemeName = (themeName) => function RHDHThemeProviderForThemeName({ children }) {
|
|
19
|
-
const themeConfig = useThemeConfig(themeName);
|
|
20
|
-
const theme = useTheme(themeConfig);
|
|
21
|
-
return /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme }, children);
|
|
22
|
-
};
|
|
23
10
|
const getAllThemes = () => {
|
|
24
11
|
return [
|
|
25
12
|
{
|
package/dist/themes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.esm.js","sources":["../src/themes.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport React from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport {
|
|
1
|
+
{"version":3,"file":"themes.esm.js","sources":["../src/themes.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport React from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport { themes } from '@backstage/theme';\n\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport DarkIcon from '@material-ui/icons/Brightness2';\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 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 React.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 React.useMemo(() => getThemes(), []);\n};\n\nexport const useLoaderTheme = () => {\n return React.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":";;;;;;;;;AA+BO,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,sCAAO,SAAU,EAAA,IAAA,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,sCAAO,QAAS,EAAA,IAAA,CAAA;AAAA,MAChB,QAAA,EAAU,gCAAgC,MAAM;AAAA,KAClD;AAAA,IACA;AAAA,MACE,EAAI,EAAA,kBAAA;AAAA,MACJ,KAAO,EAAA,yBAAA;AAAA,MACP,OAAS,EAAA,OAAA;AAAA,MACT,IAAA,sCAAO,SAAU,EAAA,IAAA,CAAA;AAAA,MACjB,UAAU,iCAAkC,CAAA;AAAA,QAC1C,IAAM,EAAA,OAAA;AAAA,QACN,OAAS,EAAA,MAAA;AAAA,QACT,OAAS,EAAA;AAAA,UACP,OAAA,EAAS,EAAE,IAAA,EAAM,SAAU,EAAA;AAAA,UAC3B,SAAA,EAAW,EAAE,IAAA,EAAM,SAAU;AAAA;AAC/B,OACD;AAAA,KACH;AAAA,IACA;AAAA,MACE,EA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AAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,IAAA,sCAAO,QAAS,EAAA,IAAA,CAAA;AAAA,MAChB,QAAA,EAAU,gCAAgC,MAAM;AAAA;AAClD,GACF;AACF;AAEO,MAAM,YAAY,MAAkB;AACzC,EAAA,OAAO,MAAM,OAAQ,CAAA,MAAM,SAAU,EAAA,EAAG,EAAE,CAAA;AAC5C;AAEO,MAAM,iBAAiB,MAAM;AAClC,EAAO,OAAA,KAAA,CAAM,QAAQ,MAAM;AACzB,IAAM,MAAA,WAAA,GAAc,YAAa,CAAA,OAAA,CAAQ,OAAO,CAAA;AAChD,IAAA,MAAM,IAAO,GAAA,WAAA,EAAa,QAAS,CAAA,MAAM,IAAI,MAAS,GAAA,OAAA;AACtD,IAAA,MAAM,OAAU,GAAA,WAAA,EAAa,QAAS,CAAA,WAAW,IAAI,WAAc,GAAA,MAAA;AACnE,IAAM,MAAA,YAAA,GACJ,YAAY,WACR,GAAAA,sBAAgC,IAAI,CAAA,GACpCC,uBAAK,CAAsB,IAAI,CAAA;AACrC,IAAA,OAAO,YAAY,YAAY,CAAA;AAAA,GACjC,EAAG,EAAE,CAAA;AACP;;;;"}
|
package/dist/typography.esm.js
CHANGED
|
@@ -1,75 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"RedHatText",
|
|
4
|
-
'"Helvetica Neue"',
|
|
5
|
-
"-apple-system",
|
|
6
|
-
'"Segoe UI"',
|
|
7
|
-
"Roboto",
|
|
8
|
-
"Helvetica",
|
|
9
|
-
"Arial",
|
|
10
|
-
"sans-serif"
|
|
11
|
-
].join(", "),
|
|
12
|
-
heading: [
|
|
13
|
-
"RedHatDisplay",
|
|
14
|
-
'"Helvetica Neue"',
|
|
15
|
-
"-apple-system",
|
|
16
|
-
'"Segoe UI"',
|
|
17
|
-
"Roboto",
|
|
18
|
-
"Helvetica",
|
|
19
|
-
"Arial",
|
|
20
|
-
"sans-serif"
|
|
21
|
-
].join(", "),
|
|
22
|
-
monospace: [
|
|
23
|
-
"RedHatMono",
|
|
24
|
-
'"Liberation Mono"',
|
|
25
|
-
"consolas",
|
|
26
|
-
'"SFMono-Regular"',
|
|
27
|
-
"menlo",
|
|
28
|
-
"monaco",
|
|
29
|
-
'"Courier New"',
|
|
30
|
-
"monospace"
|
|
31
|
-
].join(", ")
|
|
32
|
-
};
|
|
1
|
+
import { redHatFonts } from './fonts.esm.js';
|
|
2
|
+
|
|
33
3
|
const typography = {
|
|
34
4
|
htmlFontSize: 16,
|
|
35
|
-
fontFamily:
|
|
5
|
+
fontFamily: redHatFonts.text,
|
|
36
6
|
h1: {
|
|
37
|
-
fontFamily:
|
|
7
|
+
fontFamily: redHatFonts.heading,
|
|
38
8
|
fontSize: 36,
|
|
39
9
|
fontWeight: 400,
|
|
40
10
|
marginBottom: 10
|
|
41
11
|
},
|
|
42
12
|
h2: {
|
|
43
|
-
fontFamily:
|
|
13
|
+
fontFamily: redHatFonts.heading,
|
|
44
14
|
fontSize: 28,
|
|
45
15
|
fontWeight: 400,
|
|
46
16
|
marginBottom: 8
|
|
47
17
|
},
|
|
48
18
|
h3: {
|
|
49
|
-
fontFamily:
|
|
19
|
+
fontFamily: redHatFonts.heading,
|
|
50
20
|
fontSize: 24,
|
|
51
21
|
fontWeight: 400,
|
|
52
22
|
marginBottom: 6
|
|
53
23
|
},
|
|
54
24
|
h4: {
|
|
55
|
-
fontFamily:
|
|
25
|
+
fontFamily: redHatFonts.heading,
|
|
56
26
|
fontSize: 20,
|
|
57
27
|
fontWeight: 400,
|
|
58
28
|
marginBottom: 6
|
|
59
29
|
},
|
|
60
30
|
h5: {
|
|
61
|
-
fontFamily:
|
|
31
|
+
fontFamily: redHatFonts.heading,
|
|
62
32
|
fontSize: 18,
|
|
63
33
|
fontWeight: 500,
|
|
64
34
|
marginBottom: 4
|
|
65
35
|
},
|
|
66
36
|
h6: {
|
|
67
|
-
fontFamily:
|
|
37
|
+
fontFamily: redHatFonts.heading,
|
|
68
38
|
fontSize: 16,
|
|
69
39
|
fontWeight: 500,
|
|
70
40
|
marginBottom: 2
|
|
71
41
|
}
|
|
72
42
|
};
|
|
73
43
|
|
|
74
|
-
export {
|
|
44
|
+
export { typography };
|
|
75
45
|
//# sourceMappingURL=typography.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.esm.js","sources":["../src/typography.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { BackstageTypography } from '@backstage/theme';\n\
|
|
1
|
+
{"version":3,"file":"typography.esm.js","sources":["../src/typography.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { BackstageTypography } from '@backstage/theme';\n\nimport { redHatFonts } from './fonts';\n\n// Font sized based on https://www.patternfly.org/design-foundations/typography\nexport const typography: BackstageTypography = {\n htmlFontSize: 16,\n fontFamily: redHatFonts.text,\n h1: {\n fontFamily: redHatFonts.heading,\n fontSize: 36,\n fontWeight: 400,\n marginBottom: 10,\n },\n h2: {\n fontFamily: redHatFonts.heading,\n fontSize: 28,\n fontWeight: 400,\n marginBottom: 8,\n },\n h3: {\n fontFamily: redHatFonts.heading,\n fontSize: 24,\n fontWeight: 400,\n marginBottom: 6,\n },\n h4: {\n fontFamily: redHatFonts.heading,\n fontSize: 20,\n fontWeight: 400,\n marginBottom: 6,\n },\n h5: {\n fontFamily: redHatFonts.heading,\n fontSize: 18,\n fontWeight: 500,\n marginBottom: 4,\n },\n h6: {\n fontFamily: redHatFonts.heading,\n fontSize: 16,\n fontWeight: 500,\n marginBottom: 2,\n },\n};\n"],"names":[],"mappings":";;AAoBO,MAAM,UAAkC,GAAA;AAAA,EAC7C,YAAc,EAAA,EAAA;AAAA,EACd,YAAY,WAAY,CAAA,IAAA;AAAA,EACxB,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,EAAI,EAAA;AAAA,IACF,YAAY,WAAY,CAAA,OAAA;AAAA,IACxB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,GAAA;AAAA,IACZ,YAAc,EAAA;AAAA;AAElB;;;;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { defaultComponentThemes } from '@backstage/theme';
|
|
2
|
+
import { redHatFontFaces, redHatFonts } from '../fonts.esm.js';
|
|
3
|
+
|
|
1
4
|
const createComponents = (themeConfig) => {
|
|
2
5
|
const options = themeConfig.options ?? {};
|
|
3
6
|
const disableRipple = options?.rippleEffect !== "on";
|
|
@@ -9,6 +12,26 @@ const createComponents = (themeConfig) => {
|
|
|
9
12
|
if (options.components === "backstage" || options.components === "mui") {
|
|
10
13
|
return components;
|
|
11
14
|
}
|
|
15
|
+
components.MuiCssBaseline = {
|
|
16
|
+
styleOverrides: (theme) => {
|
|
17
|
+
const backstageOverrides = defaultComponentThemes.MuiCssBaseline.styleOverrides;
|
|
18
|
+
const backstageStyles = typeof backstageOverrides === "function" ? backstageOverrides(theme) : backstageOverrides;
|
|
19
|
+
return {
|
|
20
|
+
...backstageStyles,
|
|
21
|
+
"@font-face": redHatFontFaces,
|
|
22
|
+
body: {
|
|
23
|
+
...backstageStyles.body,
|
|
24
|
+
fontFamily: redHatFonts.text
|
|
25
|
+
},
|
|
26
|
+
"h1, h2, h3, h4, h5, h6": {
|
|
27
|
+
fontFamily: redHatFonts.heading
|
|
28
|
+
},
|
|
29
|
+
"pre, code": {
|
|
30
|
+
fontFamily: redHatFonts.monospace
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
12
35
|
if (options.buttons !== "mui") {
|
|
13
36
|
components.MuiTypography = {
|
|
14
37
|
styleOverrides: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.esm.js","sources":["../../src/utils/createComponents.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\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 */\nimport { type UnifiedThemeOptions } from '@backstage/theme';\nimport { ThemeConfig, ThemeConfigOptions, RHDHThemePalette } from '../types';\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\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n button: {\n textTransform: 'none',\n fontWeight: 'bold',\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 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 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 border: '0',\n borderRadius: '3px',\n },\n contained: {\n boxShadow: 'none',\n '&:hover': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n containedPrimary: {\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 border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n },\n outlinedPrimary: {\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover': {\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': {\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.inputs !== '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 },\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.tabsBottomBorderColor}`,\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.tabsBottomBorderColor}`,\n padding: 0,\n },\n flexContainerVertical: {\n '& > button:hover': {\n boxShadow: `2px 0 ${general.tabsBottomBorderColor} inset`,\n },\n },\n indicator: {\n left: 0,\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n minWidth: 'initial !important',\n '&:disabled': {\n backgroundColor: general.tabsDisabledBackgroundColor,\n },\n '&:hover': {\n boxShadow: `0 -2px ${general.tabsBottomBorderColor} inset`,\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: '1rem',\n fontWeight: '500',\n color: general.disabled,\n padding: '0.5rem 1rem',\n '&:hover': {\n boxShadow: `0 -3px ${general.tabsBottomBorderColor} inset`,\n },\n },\n tabRoot: {\n '&:hover': {\n backgroundColor: 'unset',\n },\n '&:not(.Mui-selected):hover': {\n color: general.disabled,\n },\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n backgroundColor:\n general.sidebarBackgroundColor ?? general.sideBarBackgroundColor,\n '& a[class*=\"BackstageSidebarItem-selected-\"]': {\n backgroundColor: general.sidebarItemSelectedBackgroundColor,\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: '500',\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.BackstagePage = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\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 borderBottom: `1px solid ${general.headerBottomBorderColor}`,\n },\n title: {\n fontWeight: 'bold',\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: 'bold',\n fontSize: '2rem',\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 },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":[],"mappings":"AAsCa,MAAA,gBAAA,GAAmB,CAAC,WAAyC,KAAA;AAGxE,EAAM,MAAA,OAAA,GAAU,WAAY,CAAA,OAAA,IAAY,EAAC;AACzC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AAc,CAAa,UAAA,EAAA,OAAA,CAAQ,eAAe,CAAA;AAAA,WACpD;AAAA,UACA,mEAAqE,EAAA;AAAA,YACnE,aAAe,EAAA;AAAA;AACjB;AACF;AACF,KACF;AAAA;AAGF,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;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 2024 The Backstage Authors\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 */\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: 'bold',\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 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 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 border: '0',\n borderRadius: '3px',\n },\n contained: {\n boxShadow: 'none',\n '&:hover': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n containedPrimary: {\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 border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n },\n outlinedPrimary: {\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover': {\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': {\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.inputs !== '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 },\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.tabsBottomBorderColor}`,\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.tabsBottomBorderColor}`,\n padding: 0,\n },\n flexContainerVertical: {\n '& > button:hover': {\n boxShadow: `2px 0 ${general.tabsBottomBorderColor} inset`,\n },\n },\n indicator: {\n left: 0,\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n minWidth: 'initial !important',\n '&:disabled': {\n backgroundColor: general.tabsDisabledBackgroundColor,\n },\n '&:hover': {\n boxShadow: `0 -2px ${general.tabsBottomBorderColor} inset`,\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: '1rem',\n fontWeight: '500',\n color: general.disabled,\n padding: '0.5rem 1rem',\n '&:hover': {\n boxShadow: `0 -3px ${general.tabsBottomBorderColor} inset`,\n },\n },\n tabRoot: {\n '&:hover': {\n backgroundColor: 'unset',\n },\n '&:not(.Mui-selected):hover': {\n color: general.disabled,\n },\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n backgroundColor:\n general.sidebarBackgroundColor ?? general.sideBarBackgroundColor,\n '& a[class*=\"BackstageSidebarItem-selected-\"]': {\n backgroundColor: general.sidebarItemSelectedBackgroundColor,\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: '500',\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.BackstagePage = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\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 borderBottom: `1px solid ${general.headerBottomBorderColor}`,\n },\n title: {\n fontWeight: 'bold',\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: 'bold',\n fontSize: '2rem',\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 },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":["backstageComponents"],"mappings":";;;AA4Ca,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,MAAM,aACJ,GAAA,OAAA,CAAQ,IAAM,EAAA,SAAA,IAAc,EAAC;AAE/B,EAAA,MAAM,aAAyB,EAAC;AAChC,EAAA,IAAI,OAAQ,CAAA,UAAA,KAAe,WAAe,IAAA,OAAA,CAAQ,eAAe,KAAO,EAAA;AACtE,IAAO,OAAA,UAAA;AAAA;AAMT,EAAA,UAAA,CAAW,cAAiB,GAAA;AAAA,IAC1B,gBAAgB,CAAS,KAAA,KAAA;AACvB,MAAM,MAAA,kBAAA,GACJA,uBAAqB,cAAgB,CAAA,cAAA;AACvC,MAAA,MAAM,kBACJ,OAAO,kBAAA,KAAuB,UACzB,GAAA,kBAAA,CAAmB,KAAK,CACxB,GAAA,kBAAA;AAEP,MAAO,OAAA;AAAA,QACL,GAAG,eAAA;AAAA,QACH,YAAc,EAAA,eAAA;AAAA,QACd,IAAM,EAAA;AAAA,UACJ,GAAI,eAAgB,CAAA,IAAA;AAAA,UACpB,YAAY,WAAY,CAAA;AAAA,SAC1B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AA;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;AAAA,SACV;AAAA,QACA,QAAU,EAAA;AAAA,UACR,KAAO,EAAA;AAAA;AACT;AACF,KACF;AAAA;AAGF,EAAO,OAAA,UAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-theme",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Red Hat Developer Hub Theme",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,33 +18,26 @@
|
|
|
18
18
|
"backstage": {
|
|
19
19
|
"role": "web-library"
|
|
20
20
|
},
|
|
21
|
-
"sideEffects":
|
|
22
|
-
"./fonts/*.css"
|
|
23
|
-
],
|
|
21
|
+
"sideEffects": false,
|
|
24
22
|
"scripts": {
|
|
25
23
|
"start": "backstage-cli package start",
|
|
26
|
-
"build": "backstage-cli package build
|
|
24
|
+
"build": "backstage-cli package build",
|
|
27
25
|
"lint": "backstage-cli package lint",
|
|
28
26
|
"test": "backstage-cli package test",
|
|
29
27
|
"clean": "backstage-cli package clean",
|
|
30
28
|
"prepack": "backstage-cli package prepack",
|
|
31
|
-
"postpack": "backstage-cli package postpack"
|
|
32
|
-
"prepublish": "./fix-style-inject-imports.sh"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@mui/material": "^5.0.0"
|
|
29
|
+
"postpack": "backstage-cli package postpack"
|
|
36
30
|
},
|
|
37
31
|
"peerDependencies": {
|
|
38
|
-
"@backstage/core-components": "^0.15.1",
|
|
39
32
|
"@backstage/core-plugin-api": "^1.10.0",
|
|
40
33
|
"@backstage/theme": "^0.6.0",
|
|
41
34
|
"@material-ui/icons": "^4.11.3",
|
|
35
|
+
"@mui/material": "^5.0.0",
|
|
42
36
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
43
37
|
},
|
|
44
38
|
"devDependencies": {
|
|
45
39
|
"@backstage/cli": "^0.28.0",
|
|
46
40
|
"@backstage/core-app-api": "^1.15.1",
|
|
47
|
-
"@backstage/core-components": "^0.15.1",
|
|
48
41
|
"@backstage/core-plugin-api": "^1.10.0",
|
|
49
42
|
"@backstage/dev-utils": "^1.1.2",
|
|
50
43
|
"@backstage/test-utils": "^1.7.0",
|
|
@@ -61,8 +54,7 @@
|
|
|
61
54
|
"configSchema": "config.d.ts",
|
|
62
55
|
"files": [
|
|
63
56
|
"config.d.ts",
|
|
64
|
-
"dist"
|
|
65
|
-
"fonts"
|
|
57
|
+
"dist"
|
|
66
58
|
],
|
|
67
59
|
"author": "Red Hat",
|
|
68
60
|
"homepage": "https://red.ht/rhdh",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styleInject from 'style-inject';
|
|
2
|
-
|
|
3
|
-
var css_248z = "@font-face {\n font-family: 'RedHatDisplay';\n src: url('./RedHatDisplay/RedHatDisplayVF.woff2') format('woff2-variations');\n font-weight: 300 900;\n font-style: normal;\n font-display: fallback;\n}\n\n@font-face {\n font-family: 'RedHatDisplay';\n src: url('./RedHatDisplay/RedHatDisplayVF-Italic.woff2')\n format('woff2-variations');\n font-weight: 300 900;\n font-style: italic;\n font-display: fallback;\n}\n\n@font-face {\n font-family: 'RedHatText';\n src: url('./RedHatText/RedHatTextVF.woff2') format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n\n@font-face {\n font-family: 'RedHatText';\n src: url('./RedHatText/RedHatTextVF-Italic.woff2') format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n\n@font-face {\n font-family: 'RedHatMono';\n src: url('./RedHatMono/RedHatMonoVF.woff2') format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n\n@font-face {\n font-family: 'RedHatMono';\n src: url('./RedHatMono/RedHatMonoVF-Italic.woff2') format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n\npre,\ncode {\n font-family: 'RedHatMono', 'Liberation Mono', consolas, 'SFMono-Regular',\n menlo, monaco, 'Courier New', monospace;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
7
|
-
//# sourceMappingURL=font.css.esm.js.map
|