@red-hat-developer-hub/backstage-plugin-theme 0.14.11 → 1.0.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +20 -3
  3. package/dist/assets/fonts/font.min.css.esm.js +0 -2
  4. package/dist/assets/fonts/font.min.css.esm.js.map +1 -1
  5. package/dist/backstage.esm.js.map +1 -1
  6. package/dist/components/LogoFull.esm.js.map +1 -1
  7. package/dist/components/LogoIcon.esm.js.map +1 -1
  8. package/dist/components/ThemeProvider.esm.js.map +1 -1
  9. package/dist/darkTheme.esm.js.map +1 -1
  10. package/dist/fonts.esm.js.map +1 -1
  11. package/dist/hooks/useBranding.esm.js +1 -1
  12. package/dist/hooks/useBranding.esm.js.map +1 -1
  13. package/dist/hooks/useTheme.esm.js.map +1 -1
  14. package/dist/hooks/useThemeConfig.esm.js +1 -1
  15. package/dist/hooks/useThemeConfig.esm.js.map +1 -1
  16. package/dist/hooks/useThemeOptions.esm.js.map +1 -1
  17. package/dist/index.d.ts +14 -130
  18. package/dist/index.esm.js +24 -6
  19. package/dist/index.esm.js.map +1 -1
  20. package/dist/legacy.d.ts +127 -0
  21. package/dist/legacy.esm.js +14 -0
  22. package/dist/legacy.esm.js.map +1 -0
  23. package/dist/lightTheme.esm.js.map +1 -1
  24. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +1 -1
  25. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
  26. package/dist/rhdh.esm.js.map +1 -1
  27. package/dist/themes.esm.js.map +1 -1
  28. package/dist/types/LogoIcon.d-CTRMVGhF.d.ts +7 -0
  29. package/dist/typography.esm.js.map +1 -1
  30. package/dist/utils/createComponents.esm.js +13 -13
  31. package/dist/utils/createComponents.esm.js.map +1 -1
  32. package/dist/utils/createPageTheme.esm.js.map +1 -1
  33. package/dist/utils/createPageThemes.esm.js +1 -1
  34. package/dist/utils/createPageThemes.esm.js.map +1 -1
  35. package/dist/utils/mergeTheme.esm.js +2 -2
  36. package/dist/utils/mergeTheme.esm.js.map +1 -1
  37. package/dist/utils/migrateTheme.esm.js.map +1 -1
  38. package/dist/utils/navigationSidebarColors.esm.js +3 -3
  39. package/dist/utils/navigationSidebarColors.esm.js.map +1 -1
  40. package/package.json +26 -22
  41. package/dist/alpha.d.ts +0 -5
  42. package/dist/alpha.esm.js +0 -26
  43. package/dist/alpha.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-theme
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 1afcfdd: **BREAKING**: Graduated the New Frontend System (NFS) theme module to stable API.
8
+
9
+ The NFS theme module has been promoted from the `./alpha` subpath to the primary `.` entry point. The `./alpha` subpath has been removed.
10
+
11
+ Legacy (OFS) exports (`getThemes`, `getAllThemes`, `LogoFull`, `LogoIcon`, etc.) have been moved to the new `./legacy` subpath.
12
+
13
+ **Migration for NFS consumers (previously using `./alpha`):**
14
+
15
+ ```diff
16
+ - import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme/alpha';
17
+ + import rhdhThemeModule from '@red-hat-developer-hub/backstage-plugin-theme';
18
+ ```
19
+
20
+ ### Patch Changes
21
+
22
+ - 10af16d: fix(theme): use MUI theme overrides for sidebar selected states instead of class name selectors
23
+
24
+ Replaced `class*=` CSS selectors with proper `styleOverrides.selected` on `BackstageSidebarItem` and `BackstageSidebarSubmenuItem`. The previous `class*=` approach failed in production where JSS minifies class names.
25
+
26
+ ## 0.15.0
27
+
28
+ ### Minor Changes
29
+
30
+ - 22d09cd: Backstage version bump to v1.52.1
31
+
3
32
  ## 0.14.11
4
33
 
5
34
  ### Patch Changes
package/README.md CHANGED
@@ -8,6 +8,8 @@ a [Storybook test-runner](https://github.com/storybookjs/test-runner) for automa
8
8
 
9
9
  ## API
10
10
 
11
+ ### Legacy (OFS) — `@red-hat-developer-hub/backstage-plugin-theme/legacy`
12
+
11
13
  Returns all testable themes (incl. the backstage default color scheme and older RHDH versions):
12
14
 
13
15
  - `getAllThemes: () => AppTheme[]`
@@ -19,6 +21,21 @@ Returns the latest, not released RHDH light and dark theme for your backstage/RH
19
21
  - `useThemes: () => AppTheme[]`
20
22
  - `useLoaderTheme: () => MUIv5.Theme`
21
23
 
24
+ ### New Frontend System (NFS)
25
+
26
+ NFS is the primary package entry point. OFS (legacy) theme helpers are available at `./legacy`.
27
+
28
+ Register the theme module in an NFS app:
29
+
30
+ ```tsx
31
+ import { createApp } from '@backstage/frontend-defaults';
32
+ import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme';
33
+
34
+ export default createApp({
35
+ features: [rhdhThemeModule /* ...other features */],
36
+ });
37
+ ```
38
+
22
39
  ## Install dependencies
23
40
 
24
41
  ```shell
@@ -46,7 +63,7 @@ On older RHDH instances you can install it:
46
63
  2. In `packages/app/src/components/DynamicRoot/DynamicRoot.tsx`
47
64
 
48
65
  ```tsx
49
- import { useThemes } from '@red-hat-developer-hub/backstage-plugin-theme';
66
+ import { useThemes } from '@red-hat-developer-hub/backstage-plugin-theme/legacy';
50
67
 
51
68
  // ...
52
69
 
@@ -73,7 +90,7 @@ On older RHDH instances you can install it:
73
90
  2. Update `packages/app/src/App.tsx` and apply the themes to `createApp`:
74
91
 
75
92
  ```tsx
76
- import { getThemes } from '@red-hat-developer-hub/backstage-plugin-theme';
93
+ import { getThemes } from '@red-hat-developer-hub/backstage-plugin-theme/legacy';
77
94
 
78
95
  // ...
79
96
 
@@ -94,7 +111,7 @@ On older RHDH instances you can install it:
94
111
  2. Add to your `*/dev/index.tsx`:
95
112
 
96
113
  ```tsx
97
- import { getAllThemes } from '@red-hat-developer-hub/backstage-plugin-theme';
114
+ import { getAllThemes } from '@red-hat-developer-hub/backstage-plugin-theme/legacy';
98
115
 
99
116
  // ...
100
117
 
@@ -2,6 +2,4 @@ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.
2
2
 
3
3
  var css_248z = "@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF.woff2) format('woff2-variations');\n font-weight: 300 900;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF-Italic.woff2)\n format('woff2-variations');\n font-weight: 300 900;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n";
4
4
  styleInject(css_248z);
5
-
6
- export { css_248z as default };
7
5
  //# sourceMappingURL=font.min.css.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"font.min.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"font.min.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"backstage.esm.js","sources":["../src/backstage.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';\n\nimport { ThemeConfig } from './types';\n\nexport const getDefaultThemeConfig = (mode: 'light' | 'dark'): ThemeConfig => {\n const palette = mode === 'dark' ? palettes.dark : palettes.light;\n\n return {\n variant: 'backstage',\n mode: mode === 'dark' ? 'dark' : 'light',\n palette,\n };\n};\n"],"names":[],"mappings":";;AAoBa,MAAA,qBAAA,GAAwB,CAAC,IAAwC,KAAA;AAC5E,EAAA,MAAM,OAAU,GAAA,IAAA,KAAS,MAAS,GAAA,QAAA,CAAS,OAAO,QAAS,CAAA,KAAA;AAE3D,EAAO,OAAA;AAAA,IACL,OAAS,EAAA,WAAA;AAAA,IACT,IAAA,EAAM,IAAS,KAAA,MAAA,GAAS,MAAS,GAAA,OAAA;AAAA,IACjC;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"backstage.esm.js","sources":["../src/backstage.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';\n\nimport { ThemeConfig } from './types';\n\nexport const getDefaultThemeConfig = (mode: 'light' | 'dark'): ThemeConfig => {\n const palette = mode === 'dark' ? palettes.dark : palettes.light;\n\n return {\n variant: 'backstage',\n mode: mode === 'dark' ? 'dark' : 'light',\n palette,\n };\n};\n"],"names":[],"mappings":";;AAoBO,MAAM,qBAAA,GAAwB,CAAC,IAAA,KAAwC;AAC5E,EAAA,MAAM,OAAA,GAAU,IAAA,KAAS,MAAA,GAAS,QAAA,CAAS,OAAO,QAAA,CAAS,KAAA;AAE3D,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,WAAA;AAAA,IACT,IAAA,EAAM,IAAA,KAAS,MAAA,GAAS,MAAA,GAAS,OAAA;AAAA,IACjC;AAAA,GACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LogoFull.esm.js","sources":["../../src/components/LogoFull.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 */\nimport { useTheme } from '@mui/material/styles';\n\nexport const LogoFull = (props: React.ComponentProps<'svg'>) => {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n return (\n <svg\n viewBox=\"0 0 931.8 244\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"default-full-logo\"\n width=\"170\"\n {...props}\n >\n <path\n fill=\"#e00\"\n d=\"M129,85c12.5,0,30.6-2.6,30.6-17.5c0-1.2,0-2.3-0.3-3.4l-7.4-32.4c-1.7-7.1-3.2-10.3-15.7-16.6\n\t\t\t\tC126.4,10.2,105.3,2,99,2c-5.8,0-7.5,7.5-14.4,7.5c-6.7,0-11.6-5.6-17.9-5.6c-6,0-9.9,4.1-12.9,12.5c0,0-8.4,23.7-9.5,27.2\n\t\t\t\tC44,44.3,44,45,44,45.5C44,54.8,80.3,85,129,85 M161.5,73.6c1.7,8.2,1.7,9.1,1.7,10.1c0,14-15.7,21.8-36.4,21.8\n\t\t\t\tC80,105.5,39.1,78.1,39.1,60c0-2.8,0.6-5.4,1.5-7.3C23.8,53.5,2,56.5,2,75.7C2,107.2,76.6,146,135.7,146\n\t\t\t\tc45.3,0,56.7-20.5,56.7-36.6C192.3,96.6,181.4,82.2,161.5,73.6\"\n />\n <path\n fill=\"#000\"\n d=\"M161.5,73.6c1.7,8.2,1.7,9.1,1.7,10.1c0,14-15.7,21.8-36.4,21.8C80,105.5,39.1,78.1,39.1,60c0-2.8,0.6-5.4,1.5-7.3\n\t\t\t\tl3.7-9.1C44,44.3,44,45,44,45.5C44,54.8,80.3,85,129,85c12.5,0,30.6-2.6,30.6-17.5c0-1.2,0-2.3-0.3-3.4L161.5,73.6z\"\n />\n <g fill={isDarkMode ? '#fff' : '#000'}>\n <path\n d=\"M581.2,94.3c0,11.9,7.2,17.7,20.2,17.7c3.2,0,8.6-0.7,11.9-1.7V96.5c-2.8,0.8-4.9,1.2-7.7,1.2c-5.4,0-7.4-1.7-7.4-6.7\n\t\t\tV69.8h15.6V55.6h-15.6v-18l-17,3.7v14.3H570v14.2h11.3V94.3z M528.3,94.6c0-3.7,3.7-5.5,9.3-5.5c3.7,0,7,0.5,10.1,1.3v7.2\n\t\t\tc-3.2,1.8-6.8,2.6-10.6,2.6C531.6,100.2,528.3,98.1,528.3,94.6 M533.5,112.2c6,0,10.8-1.3,15.4-4.3v3.4h16.8V75.6\n\t\t\tc0-13.6-9.1-21-24.4-21c-8.5,0-16.9,2-26,6.1l6.1,12.5c6.5-2.7,12-4.4,16.8-4.4c7,0,10.6,2.7,10.6,8.3v2.7\n\t\t\tc-4-1.1-8.2-1.6-12.6-1.6c-14.3,0-22.9,6-22.9,16.7C513.3,104.7,521.1,112.2,533.5,112.2 M441.1,111.2h18.1V82.4h30.3v28.8h18.1\n\t\t\tV37.6h-18.1v28.3h-30.3V37.6h-18.1V111.2z M372.1,83.4c0-8,6.3-14.1,14.6-14.1c4.6,0,8.8,1.6,11.8,4.3V93c-3,2.9-7,4.4-11.8,4.4\n\t\t\tC378.5,97.5,372.1,91.4,372.1,83.4 M398.7,111.2h16.8V33.9l-17,3.7v20.9c-4.2-2.4-9-3.7-14.2-3.7c-16.2,0-28.9,12.5-28.9,28.5\n\t\t\tc0,16,12.5,28.6,28.4,28.6c5.5,0,10.6-1.7,14.9-4.8V111.2z M321.5,68.5c5.4,0,9.9,3.5,11.7,8.8H310\n\t\t\tC311.7,71.8,315.9,68.5,321.5,68.5 M292.8,83.5c0,16.2,13.3,28.8,30.3,28.8c9.4,0,16.2-2.5,23.2-8.4l-11.3-10\n\t\t\tc-2.6,2.7-6.5,4.2-11.1,4.2c-6.3,0-11.5-3.5-13.7-8.8h39.6V85c0-17.7-11.9-30.4-28.1-30.4C305.6,54.7,292.8,67.3,292.8,83.5\n\t\t\t M263.5,53.1c6,0,9.4,3.8,9.4,8.3s-3.4,8.3-9.4,8.3h-17.9V53.1H263.5z M227.5,111.2h18.1V84.4h13.8l13.9,26.8h20.2l-16.2-29.4\n\t\t\tc8.7-3.8,13.9-11.7,13.9-20.7c0-13.3-10.4-23.5-26-23.5h-37.7V111.2z\"\n />\n <path\n d=\"M228.7,219.5v-72.8h25.7c5.5,0,10.7,0.9,15.4,2.8c4.7,1.9,8.8,4.4,12.2,7.7c3.4,3.3,6,7.1,8,11.6\n\t\t\tc1.9,4.5,2.9,9.3,2.9,14.4c0,5.1-1,9.9-2.9,14.4c-1.9,4.4-4.6,8.3-8,11.5c-3.4,3.2-7.5,5.8-12.2,7.6c-4.7,1.9-9.8,2.8-15.4,2.8\n\t\t\tH228.7z M254.5,156.5h-15v53.2h15c3.8,0,7.4-0.7,10.7-2c3.3-1.4,6.1-3.2,8.5-5.6c2.4-2.4,4.3-5.2,5.7-8.4\n\t\t\tc1.4-3.2,2.1-6.7,2.1-10.5s-0.7-7.2-2.1-10.5c-1.4-3.3-3.3-6.1-5.7-8.5c-2.4-2.4-5.2-4.3-8.5-5.7\n\t\t\tC261.9,157.2,258.4,156.5,254.5,156.5z M300.7,193c0-3.7,0.7-7.3,2-10.6c1.4-3.3,3.2-6.2,5.6-8.7c2.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5.8,7.3v35.5H681.9z M743.7,219.5v-72.8h10.9v31.2h38.7v-31.2h10.9v72.8h-10.9v-31.7h-38.7v31.7H743.7z M828,166.6v31.5c0,4.1,1.2,7.3,3.5,9.8c2.4,2.4,5.6,3.6,9.7,3.6c2.8,0,5.3-0.6,7.5-1.8c2.2-1.2,4.1-2.9,5.5-5.1v-38.1\n\t\t\th10.4v52.9h-10.4v-5.3c-2.1,2.1-4.5,3.7-7.1,4.7c-2.7,1.1-5.6,1.6-8.8,1.6c-6,0-11-1.9-14.8-5.8c-3.8-3.9-5.8-8.8-5.8-14.9v-33.3\n\t\t\tH828z M929.9,193c0,3.8-0.7,7.4-2.1,10.7c-1.4,3.3-3.3,6.2-5.7,8.7c-2.4,2.5-5.3,4.4-8.6,5.8c-3.3,1.4-6.9,2.1-10.7,2.1\n\t\t\tc-3,0-5.8-0.5-8.5-1.4s-5.2-2.2-7.4-4v4.5h-10.3v-72.8l10.4-2.3v27c2.2-1.9,4.7-3.3,7.4-4.3c2.7-1,5.6-1.5,8.7-1.5\n\t\t\tc3.7,0,7.2,0.7,10.5,2.1c3.3,1.4,6.1,3.4,8.5,5.8c2.4,2.5,4.3,5.4,5.7,8.7C929.2,185.7,929.9,189.3,929.9,193z M901.7,174.8\n\t\t\tc-3.1,0-5.8,0.6-8.3,1.7c-2.5,1.1-4.6,2.6-6.3,4.6v24.1c1.7,1.9,3.8,3.4,6.3,4.5c2.6,1.1,5.3,1.7,8.3,1.7c5.1,0,9.4-1.8,12.8-5.3\n\t\t\tc3.4-3.5,5.1-7.8,5.1-12.9c0-5.2-1.8-9.6-5.3-13.1C911,176.6,906.7,174.8,901.7,174.8z\"\n />\n </g>\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAiBa,MAAA,QAAA,GAAW,CAAC,KAAuC,KAAA;AAC9D,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,OAAA,CAAQ,IAAS,KAAA,MAAA;AAE1C,EACE,uBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,eAAA;AAAA,MACR,KAAM,EAAA,4BAAA;AAAA,MACN,aAAY,EAAA,mBAAA;AAAA,MACZ,KAAM,EAAA,KAAA;AAAA,MACL,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAK,EAAA,MAAA;AAAA,YACL,CAAE,EAAA;AAAA;AAAA,SAKJ;AAAA,wBACA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAK,EAAA,MAAA;AAAA,YACL,CAAE,EAAA;AAAA;AAAA,SAEJ;AAAA,wBACC,IAAA,CAAA,GAAA,EAAA,EAAE,IAAM,EAAA,UAAA,GAAa,SAAS,MAC7B,EAAA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,CAAE,EAAA;AAAA;AAAA,WAYJ;AAAA,0BACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,CAAE,EAAA;AAAA;AAAA;AAkCJ,SACF,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"LogoFull.esm.js","sources":["../../src/components/LogoFull.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 */\nimport { useTheme } from '@mui/material/styles';\n\nexport const LogoFull = (props: React.ComponentProps<'svg'>) => {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n return (\n <svg\n viewBox=\"0 0 931.8 244\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"default-full-logo\"\n width=\"170\"\n {...props}\n >\n <path\n fill=\"#e00\"\n d=\"M129,85c12.5,0,30.6-2.6,30.6-17.5c0-1.2,0-2.3-0.3-3.4l-7.4-32.4c-1.7-7.1-3.2-10.3-15.7-16.6\n\t\t\t\tC126.4,10.2,105.3,2,99,2c-5.8,0-7.5,7.5-14.4,7.5c-6.7,0-11.6-5.6-17.9-5.6c-6,0-9.9,4.1-12.9,12.5c0,0-8.4,23.7-9.5,27.2\n\t\t\t\tC44,44.3,44,45,44,45.5C44,54.8,80.3,85,129,85 M161.5,73.6c1.7,8.2,1.7,9.1,1.7,10.1c0,14-15.7,21.8-36.4,21.8\n\t\t\t\tC80,105.5,39.1,78.1,39.1,60c0-2.8,0.6-5.4,1.5-7.3C23.8,53.5,2,56.5,2,75.7C2,107.2,76.6,146,135.7,146\n\t\t\t\tc45.3,0,56.7-20.5,56.7-36.6C192.3,96.6,181.4,82.2,161.5,73.6\"\n />\n <path\n fill=\"#000\"\n d=\"M161.5,73.6c1.7,8.2,1.7,9.1,1.7,10.1c0,14-15.7,21.8-36.4,21.8C80,105.5,39.1,78.1,39.1,60c0-2.8,0.6-5.4,1.5-7.3\n\t\t\t\tl3.7-9.1C44,44.3,44,45,44,45.5C44,54.8,80.3,85,129,85c12.5,0,30.6-2.6,30.6-17.5c0-1.2,0-2.3-0.3-3.4L161.5,73.6z\"\n />\n <g fill={isDarkMode ? '#fff' : '#000'}>\n <path\n d=\"M581.2,94.3c0,11.9,7.2,17.7,20.2,17.7c3.2,0,8.6-0.7,11.9-1.7V96.5c-2.8,0.8-4.9,1.2-7.7,1.2c-5.4,0-7.4-1.7-7.4-6.7\n\t\t\tV69.8h15.6V55.6h-15.6v-18l-17,3.7v14.3H570v14.2h11.3V94.3z M528.3,94.6c0-3.7,3.7-5.5,9.3-5.5c3.7,0,7,0.5,10.1,1.3v7.2\n\t\t\tc-3.2,1.8-6.8,2.6-10.6,2.6C531.6,100.2,528.3,98.1,528.3,94.6 M533.5,112.2c6,0,10.8-1.3,15.4-4.3v3.4h16.8V75.6\n\t\t\tc0-13.6-9.1-21-24.4-21c-8.5,0-16.9,2-26,6.1l6.1,12.5c6.5-2.7,12-4.4,16.8-4.4c7,0,10.6,2.7,10.6,8.3v2.7\n\t\t\tc-4-1.1-8.2-1.6-12.6-1.6c-14.3,0-22.9,6-22.9,16.7C513.3,104.7,521.1,112.2,533.5,112.2 M441.1,111.2h18.1V82.4h30.3v28.8h18.1\n\t\t\tV37.6h-18.1v28.3h-30.3V37.6h-18.1V111.2z M372.1,83.4c0-8,6.3-14.1,14.6-14.1c4.6,0,8.8,1.6,11.8,4.3V93c-3,2.9-7,4.4-11.8,4.4\n\t\t\tC378.5,97.5,372.1,91.4,372.1,83.4 M398.7,111.2h16.8V33.9l-17,3.7v20.9c-4.2-2.4-9-3.7-14.2-3.7c-16.2,0-28.9,12.5-28.9,28.5\n\t\t\tc0,16,12.5,28.6,28.4,28.6c5.5,0,10.6-1.7,14.9-4.8V111.2z M321.5,68.5c5.4,0,9.9,3.5,11.7,8.8H310\n\t\t\tC311.7,71.8,315.9,68.5,321.5,68.5 M292.8,83.5c0,16.2,13.3,28.8,30.3,28.8c9.4,0,16.2-2.5,23.2-8.4l-11.3-10\n\t\t\tc-2.6,2.7-6.5,4.2-11.1,4.2c-6.3,0-11.5-3.5-13.7-8.8h39.6V85c0-17.7-11.9-30.4-28.1-30.4C305.6,54.7,292.8,67.3,292.8,83.5\n\t\t\t M263.5,53.1c6,0,9.4,3.8,9.4,8.3s-3.4,8.3-9.4,8.3h-17.9V53.1H263.5z M227.5,111.2h18.1V84.4h13.8l13.9,26.8h20.2l-16.2-29.4\n\t\t\tc8.7-3.8,13.9-11.7,13.9-20.7c0-13.3-10.4-23.5-26-23.5h-37.7V111.2z\"\n />\n <path\n d=\"M228.7,219.5v-72.8h25.7c5.5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;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,CAAA,EAAE;AAAA;AAAA;AAkCJ,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LogoIcon.esm.js","sources":["../../src/components/LogoIcon.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 */\nexport const LogoIcon = (props: React.ComponentProps<'svg'>) => {\n return (\n <svg\n viewBox=\"0 0 192 145\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"default-icon-logo\"\n width=\"28\"\n {...props}\n >\n <path\n fill=\"#000\"\n d=\"M157.77,62.61a14,14,0,0,1,.31,3.42c0,14.88-18.1,17.46-30.61,17.46C78.83,83.49,42.53,53.26,42.53,44a6.43,6.43,0,0,1,.22-1.94l-3.66,9.06a18.45,18.45,0,0,0-1.51,7.33c0,18.11,41,45.48,87.74,45.48,20.69,0,36.43-7.76,36.43-21.77,0-1.08,0-1.94-1.73-10.13Z\"\n />\n <path\n fill=\"#e00\"\n d=\"M127.47,83.49c12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42l-7.45-32.36c-1.72-7.12-3.23-10.35-15.73-16.6C124.89,8.69,103.76.5,97.51.5,91.69.5,90,8,83.06,8c-6.68,0-11.64-5.6-17.89-5.6-6,0-9.91,4.09-12.93,12.5,0,0-8.41,23.72-9.49,27.16A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33C22.27,52,.5,55,.5,74.22c0,31.48,74.59,70.28,133.65,70.28,45.28,0,56.7-20.48,56.7-36.65,0-12.72-11-27.16-30.83-35.78\"\n />\n </svg>\n );\n};\n"],"names":[],"mappings":";;AAea,MAAA,QAAA,GAAW,CAAC,KAAuC,KAAA;AAC9D,EACE,uBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,aAAA;AAAA,MACR,KAAM,EAAA,4BAAA;AAAA,MACN,aAAY,EAAA,mBAAA;AAAA,MACZ,KAAM,EAAA,IAAA;AAAA,MACL,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAK,EAAA,MAAA;AAAA,YACL,CAAE,EAAA;AAAA;AAAA,SACJ;AAAA,wBACA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAK,EAAA,MAAA;AAAA,YACL,CAAE,EAAA;AAAA;AAAA;AACJ;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"LogoIcon.esm.js","sources":["../../src/components/LogoIcon.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 */\nexport const LogoIcon = (props: React.ComponentProps<'svg'>) => {\n return (\n <svg\n viewBox=\"0 0 192 145\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"default-icon-logo\"\n width=\"28\"\n {...props}\n >\n <path\n fill=\"#000\"\n d=\"M157.77,62.61a14,14,0,0,1,.31,3.42c0,14.88-18.1,17.46-30.61,17.46C78.83,83.49,42.53,53.26,42.53,44a6.43,6.43,0,0,1,.22-1.94l-3.66,9.06a18.45,18.45,0,0,0-1.51,7.33c0,18.11,41,45.48,87.74,45.48,20.69,0,36.43-7.76,36.43-21.77,0-1.08,0-1.94-1.73-10.13Z\"\n />\n <path\n fill=\"#e00\"\n d=\"M127.47,83.49c12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42l-7.45-32.36c-1.72-7.12-3.23-10.35-15.73-16.6C124.89,8.69,103.76.5,97.51.5,91.69.5,90,8,83.06,8c-6.68,0-11.64-5.6-17.89-5.6-6,0-9.91,4.09-12.93,12.5,0,0-8.41,23.72-9.49,27.16A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33C22.27,52,.5,55,.5,74.22c0,31.48,74.59,70.28,133.65,70.28,45.28,0,56.7-20.48,56.7-36.65,0-12.72-11-27.16-30.83-35.78\"\n />\n </svg>\n );\n};\n"],"names":[],"mappings":";;AAeO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAuC;AAC9D,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,aAAA;AAAA,MACR,KAAA,EAAM,4BAAA;AAAA,MACN,aAAA,EAAY,mBAAA;AAAA,MACZ,KAAA,EAAM,IAAA;AAAA,MACL,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,MAAA;AAAA,YACL,CAAA,EAAE;AAAA;AAAA,SACJ;AAAA,wBACA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,MAAA;AAAA,YACL,CAAA,EAAE;AAAA;AAAA;AACJ;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ReactNode } 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;;;;"}
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,oBAAA,EAAA,EAAqB,KAAA,EACpB,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,aAAW,IAAA,EAC/B,QAAA,kBAAA,GAAA,CAACA,eAAA,EAAA,EAAa,KAAA,EAAO,MAAM,QAAA,CAAS,IAAI,CAAA,EACrC,QAAA,EACH,GACF,CAAA,EACF,CAAA;AAGK,MAAM,sBAAsB,CACjC,KAAA,KAEA,SAAS,iBAAA,CAAkB,EAAE,UAAS,EAAG;AACvC,EAAA,uBAAO,GAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAe,QAAA,EAAS,CAAA;AAChD;AAEK,MAAM,oCAAoC,CAC/C,WAAA,KAEA,SAAS,+BAAA,CAAgC,EAAE,UAAS,EAAG;AACrD,EAAA,MAAM,KAAA,GAAQ,SAAS,WAAW,CAAA;AAClC,EAAA,uBAAO,GAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAe,QAAA,EAAS,CAAA;AAChD;AAEK,MAAM,kCAAkC,CAC7C,SAAA,KAEA,SAAS,6BAAA,CAA8B,EAAE,UAAS,EAAG;AACnD,EAAA,MAAM,WAAA,GAAc,eAAe,SAAS,CAAA;AAC5C,EAAA,MAAM,KAAA,GAAQ,SAAS,WAAW,CAAA;AAClC,EAAA,uBAAO,GAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAe,QAAA,EAAS,CAAA;AAChD;;;;"}
@@ -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 pageInset: '1.5rem',\n pageInsetBackgroundColor: '#151515',\n\n disabled: '#AAABAC',\n disabledBackground: '#444548',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#A3A3A3',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.48), 0 0 0.25rem 0 rgba(3, 3, 3, 0.24)',\n\n cardBackgroundColor: '#292929',\n cardBorderColor: '#A3A3A3',\n\n mainSectionBackgroundColor: '#292929',\n formControlBackgroundColor: '#36373A',\n\n sidebarBackgroundColor: '#151515',\n sidebarDividerColor: '#383838',\n sidebarItemSelectedBackgroundColor: '#292929',\n\n tableTitleColor: '#E0E0E0',\n tableSubtitleColor: '#E0E0E0',\n tableColumnTitleColor: '#E0E0E0',\n tableRowHover: '#292929',\n tableBorderColor: '#515151',\n tableBackgroundColor: '#292929',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.1500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'dark',\n\n appBarBackgroundColor: '#151515',\n appBarForegroundColor: '#ffffff',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n secondary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n cards: {\n headerTextColor: '#FFF',\n headerBackgroundColor: '#292929',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customDarkTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['dark'] & PaletteOptions = palettes.dark;\n return {\n ...palette,\n ...darkThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,kBAAkD,GAAA;AAAA,EAC7D,OAAS,EAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAY,EAAA,SAAA;AAAA,IACZ,SAAW,EAAA,aAAA;AAAA,IACX,KAAO,EAAA,SAAA;AAAA,IACP,aAAe,EAAA,SAAA;AAAA,IACf,OAAS,EAAA;AAAA,MACP,eAAiB,EAAA;AAAA,KACnB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,UAAY,EAAA;AAAA;AACd,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,SAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,SAA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AA,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 pageInsetBackgroundColor: '#151515',\n\n disabled: '#AAABAC',\n disabledBackground: '#444548',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#A3A3A3',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.48), 0 0 0.25rem 0 rgba(3, 3, 3, 0.24)',\n\n cardBackgroundColor: '#292929',\n cardBorderColor: '#A3A3A3',\n\n mainSectionBackgroundColor: '#292929',\n formControlBackgroundColor: '#36373A',\n\n sidebarBackgroundColor: '#151515',\n sidebarDividerColor: '#383838',\n sidebarItemSelectedBackgroundColor: '#292929',\n\n tableTitleColor: '#E0E0E0',\n tableSubtitleColor: '#E0E0E0',\n tableColumnTitleColor: '#E0E0E0',\n tableRowHover: '#292929',\n tableBorderColor: '#515151',\n tableBackgroundColor: '#292929',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.1500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'dark',\n\n appBarBackgroundColor: '#151515',\n appBarForegroundColor: '#ffffff',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n secondary: {\n main: '#92c5f9',\n focusVisibleBorder: '#ADD6FF',\n },\n cards: {\n headerTextColor: '#FFF',\n headerBackgroundColor: '#292929',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customDarkTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['dark'] & PaletteOptions = palettes.dark;\n return {\n ...palette,\n ...darkThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,kBAAA,GAAkD;AAAA,EAC7D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM;AAAA,GACR;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAA,EAAY,SAAA;AAAA,IACZ,SAAA,EAAW,aAAA;AAAA,IACX,KAAA,EAAO,SAAA;AAAA,IACP,aAAA,EAAe,SAAA;AAAA,IACf,OAAA,EAAS;AAAA,MACP,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,UAAA,EAAY;AAAA;AACd,GACF;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,SAAA;AAAA,IACT,SAAA,E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AAAA,MACL,eAAA,EAAiB,MAAA;AAAA,MACjB,qBAAA,EAAuB,SAAA;AAAA,MACvB,qBAAA,EAAuB;AAAA;AACzB;AAEJ;AAEO,MAAM,kBAAkB,MAA0B;AACvD,EAAA,MAAM,UAAsD,QAAA,CAAS,IAAA;AACrE,EAAA,OAAO;AAAA,IACL,GAAG,OAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.esm.js","sources":["../src/fonts.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 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":";;;;;;;AAuBA,MAAM,qBAAwB,GAAA;AAAA,EAC5B,UAAY,EAAA,eAAA;AAAA,EACZ,GAAA,EAAK,OAAO,aAAa,CAAA,4BAAA,CAAA;AAAA,EACzB,UAAY,EAAA,SAAA;AAAA,EACZ,SAAW,EAAA,QAAA;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,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;;;;"}
1
+ {"version":3,"file":"fonts.esm.js","sources":["../src/fonts.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 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 '\"Liber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AK,OAAO,gBAAgB,CAAA,4BAAA,CAAA;AAAA,EAC5B,UAAA,EAAY,SAAA;AAAA,EACZ,SAAA,EAAW,QAAA;AAAA,EACX,WAAA,EAAa;AACf,CAAA;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,qBAAA;AAAA,EACA,2BAAA;AAAA,EACA,kBAAA;AAAA,EACA,wBAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF;AAEO,MAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM;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,OAAA,EAAS;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,SAAA,EAAW;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;;;;"}
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
2
2
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
3
3
 
4
4
  const useBranding = () => {
5
- let configApi = undefined;
5
+ let configApi = void 0;
6
6
  try {
7
7
  configApi = useApi(configApiRef);
8
8
  } catch (err) {
@@ -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 { 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
+ {"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,SAAA,GAAmC,MAAA;AACvC,EAAA,IAAI;AAEF,IAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AAAA,EACjC,SAAS,GAAA,EAAK;AAAA,EAEd;AACA,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,MAAM,QAAA,GAAW,SAAA,EAAW,WAAA,CAAsB,cAAc,CAAA;AAChE,IAAA,OAAO,QAAA;AAAA,EACT,CAAA,EAAG,CAAC,SAAS,CAAC,CAAA;AAChB;;;;"}
@@ -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 { 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
+ {"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":";;;;AAsBO,MAAM,QAAA,GAAW,CAAC,WAAA,KAA2C;AAClE,EAAA,MAAM,mBAAA,GAAsB,gBAAgB,WAAW,CAAA;AACvD,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MAAM,mBAAmB,mBAAmB,CAAA;AAAA,IAC5C,CAAC,mBAAmB;AAAA,GACtB;AACA,EAAA,OAAO,KAAA;AACT;;;;"}
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
2
2
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
3
3
 
4
4
  const useThemeConfig = (themeName) => {
5
- let configApi = undefined;
5
+ let configApi = void 0;
6
6
  try {
7
7
  configApi = useApi(configApiRef);
8
8
  } catch (err) {
@@ -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 { 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
+ {"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":";;;AAoBO,MAAM,cAAA,GAAiB,CAAC,SAAA,KAAmC;AAChE,EAAA,IAAI,SAAA,GAAmC,MAAA;AACvC,EAAA,IAAI;AAEF,IAAA,SAAA,GAAY,OAAkB,YAAY,CAAA;AAAA,EAC5C,SAAS,GAAA,EAAK;AAAA,EAEd;AACA,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,IAAI,CAAC,SAAA,EAAW;AACd,MAAA,OAAO;AAAA,QACL,IAAA,EAAM,SAAA,CAAU,QAAA,CAAS,MAAM,IAAI,MAAA,GAAS;AAAA,OAC9C;AAAA,IACF;AACA,IAAA,MAAM,cACJ,SAAA,CAAU,WAAA,CAAyB,sBAAsB,SAAS,CAAA,CAAE,KACpE,EAAC;AACH,IAAA,IAAI,CAAC,YAAY,IAAA,EAAM;AACrB,MAAA,WAAA,CAAY,IAAA,GAAO,SAAA,CAAU,QAAA,CAAS,MAAM,IAAI,MAAA,GAAS,OAAA;AAAA,IAC3D;AAEA,IAAA,IAAI,MAAM,OAAA,CAAQ,WAAA,EAAa,SAAA,EAAW,OAAA,EAAS,SAAS,CAAA,EAAG;AAC7D,MAAA,WAAA,CAAY,UAAU,OAAA,CAAQ,SAAA,GAC5B,YAAY,SAAA,CAAU,OAAA,CAAQ,UAAU,CAAC,CAAA;AAAA,IAC7C;AAEA,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,EAAG,CAAC,SAAA,EAAW,SAAS,CAAC,CAAA;AAC3B;;;;"}
@@ -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 { 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;;;;"}
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":";;;;;;;;AA2BO,MAAM,eAAA,GAAkB,CAC7B,WAAA,KACwB;AACxB,EAAA,MAAM,KAAA,GAAQ,QAA6B,MAAM;AAC/C,IAAA,MAAM,IAAA,GAAO,YAAY,IAAA,IAAQ,OAAA;AACjC,IAAA,MAAM,OAAA,GAAU,YAAY,OAAA,IAAW,MAAA;AAEvC,IAAA,IAAI,kBAAA;AACJ,IAAA,IAAI,YAAY,WAAA,EAAa;AAC3B,MAAA,kBAAA,GAAqBA,sBAAgC,IAAI,CAAA;AAAA,IAC3D,CAAA,MAAO;AACL,MAAA,kBAAA,GAAqBC,wBAA2B,IAAI,CAAA;AAAA,IACtD;AAEA,IAAA,MAAM,mBAAA,GAAsB,mBAAmB,WAAW,CAAA;AAC1D,IAAA,MAAM,iBAAA,GAAoB,wBAAA;AAAA,MACxB,kBAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,kBAAA,GAA0C;AAAA,MAC9C,SAAS,iBAAA,CAAkB,OAAA;AAAA,MAC3B,kBAAkB,iBAAA,CAAkB,gBAAA;AAAA,MACpC,YAAY,iBAAA,CAAkB,UAAA;AAAA,MAC9B,cAAc,iBAAA,CAAkB,YAAA;AAAA,MAChC,YAAY,iBAAA,CAAkB;AAAA,KAChC;AAEA,IAAA,kBAAA,CAAmB,SAAA,GAAY,iBAAiB,iBAAiB,CAAA;AAEjE,IAAA,IAAI,YAAY,WAAA,EAAa;AAC3B,MAAA,kBAAA,CAAmB,UAAA,GAAa,iBAAiB,iBAAiB,CAAA;AAAA,IACpE;AAEA,IAAA,OAAO,kBAAA;AAAA,EACT,CAAA,EAAG,CAAC,WAAW,CAAC,CAAA;AAChB,EAAA,OAAO,KAAA;AACT;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,130 +1,14 @@
1
- export { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';
2
- export { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';
3
- import { UnifiedThemeOptions } from '@backstage/theme';
4
- import * as _mui_material from '@mui/material';
5
- import * as react from 'react';
6
- import { AppTheme } from '@backstage/core-plugin-api';
7
- import * as react_jsx_runtime from 'react/jsx-runtime';
8
-
9
- type BackstageThemePalette = UnifiedThemeOptions['palette'];
10
- interface RHDHThemePalette {
11
- general: {
12
- pageInset: string;
13
- pageInsetBackgroundColor: string;
14
- disabled: string;
15
- disabledBackground: string;
16
- paperBackgroundImage: string;
17
- paperBorderColor: string;
18
- popoverBoxShadow: string;
19
- cardBackgroundColor: string;
20
- cardBorderColor: string;
21
- mainSectionBackgroundColor: string;
22
- formControlBackgroundColor: string;
23
- sidebarBackgroundColor: string;
24
- sidebarDividerColor: string;
25
- sidebarItemSelectedBackgroundColor: string;
26
- tableTitleColor: string;
27
- tableSubtitleColor: string;
28
- tableColumnTitleColor: string;
29
- tableRowHover: string;
30
- tableBorderColor: string;
31
- tableBackgroundColor: string;
32
- tabsLinkHoverBackgroundColor: string;
33
- contrastText: string;
34
- appBarBackgroundScheme: 'light' | 'dark';
35
- appBarBackgroundColor: string;
36
- appBarForegroundColor: string;
37
- appBarBackgroundImage: string;
38
- starredItemsColor: string;
39
- };
40
- primary: {
41
- main: string;
42
- focusVisibleBorder: string;
43
- };
44
- secondary: {
45
- main: string;
46
- focusVisibleBorder: string;
47
- };
48
- cards?: {
49
- headerTextColor: string;
50
- headerBackgroundColor: string;
51
- headerBackgroundImage: string;
52
- };
53
- }
54
- type ThemeConfigPalette = BackstageThemePalette & {
55
- rhdh?: RHDHThemePalette;
56
- };
57
- interface ThemeConfigPageTheme {
58
- backgroundColor?: string | string[];
59
- colors?: string | string[];
60
- shape?: string;
61
- backgroundImage?: string;
62
- fontColor?: string;
63
- }
64
- interface ThemeConfigOptions {
65
- components?: 'rhdh' | 'backstage' | 'mui';
66
- rippleEffect?: 'on' | 'off';
67
- paper?: 'patternfly' | 'mui';
68
- buttons?: 'patternfly' | 'mui';
69
- inputs?: 'patternfly' | 'mui';
70
- checkbox?: 'patternfly' | 'mui';
71
- accordions?: 'patternfly' | 'mui';
72
- sidebars?: 'patternfly' | 'mui';
73
- pages?: 'patternfly' | 'mui';
74
- headers?: 'patternfly' | 'mui';
75
- toolbars?: 'patternfly' | 'mui';
76
- dialogs?: 'patternfly' | 'mui';
77
- cards?: 'patternfly' | 'mui';
78
- tables?: 'patternfly' | 'mui';
79
- tabs?: 'patternfly' | 'mui';
80
- appBar?: 'patternfly' | 'mui';
81
- breadcrumbs?: 'patternfly' | 'mui';
82
- }
83
- interface ThemeConfig {
84
- /** Optional key to load different defaults. Fallbacks to the latest `rhdh` theme if not defined. */
85
- variant?: 'rhdh' | 'backstage';
86
- /** Light or dark theme. Automatically selects `dark` if the theme name contains the keyword "dark". */
87
- mode?: 'light' | 'dark';
88
- palette?: ThemeConfigPalette;
89
- fontFamily?: UnifiedThemeOptions['fontFamily'];
90
- htmlFontSize?: UnifiedThemeOptions['htmlFontSize'];
91
- typography?: UnifiedThemeOptions['typography'];
92
- defaultPageTheme?: string;
93
- pageTheme?: Record<string, ThemeConfigPageTheme>;
94
- options?: ThemeConfigOptions;
95
- }
96
- interface Branding {
97
- theme?: {
98
- [key: string]: ThemeConfig;
99
- };
100
- }
101
- interface Config {
102
- app: {
103
- branding?: Branding;
104
- };
105
- }
106
-
107
- declare const useBranding: () => Branding | undefined;
108
-
109
- declare const useThemeConfig: (themeName: string) => ThemeConfig;
110
-
111
- /** Creates a memorized Backstage UnifiedThemeOptions based on the given ThemeConfig. */
112
- declare const useThemeOptions: (themeConfig: ThemeConfig) => UnifiedThemeOptions;
113
-
114
- declare const lightThemeProvider: (props: {
115
- children: react.ReactNode;
116
- }) => JSX.Element | null;
117
- declare const darkThemeProvider: (props: {
118
- children: react.ReactNode;
119
- }) => JSX.Element | null;
120
- declare const getAllThemes: () => AppTheme[];
121
- declare const useAllThemes: () => AppTheme[];
122
- declare const getThemes: () => AppTheme[];
123
- declare const useThemes: () => AppTheme[];
124
- declare const useLoaderTheme: () => _mui_material.Theme;
125
-
126
- declare const LogoFull: (props: React.ComponentProps<"svg">) => react_jsx_runtime.JSX.Element;
127
-
128
- declare const LogoIcon: (props: React.ComponentProps<"svg">) => react_jsx_runtime.JSX.Element;
129
-
130
- export { type BackstageThemePalette, type Branding, type Config, LogoFull, LogoIcon, type RHDHThemePalette, type ThemeConfig, type ThemeConfigOptions, type ThemeConfigPageTheme, type ThemeConfigPalette, darkThemeProvider, getAllThemes, getThemes, lightThemeProvider, useAllThemes, useBranding, useLoaderTheme, useThemeConfig, useThemeOptions, useThemes };
1
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
+ export { L as LogoFull, a as LogoIcon } from './types/LogoIcon.d-CTRMVGhF.js';
3
+ import 'react/jsx-runtime';
4
+
5
+ /**
6
+ * RHDH themes as NFS extensions (ThemeBlueprint).
7
+ * Only the app can register ThemeBlueprint; we use the same theme definitions
8
+ * from the theme plugin (getAllThemes()) so behavior matches the legacy app.
9
+ *
10
+ * @public
11
+ */
12
+ declare const rhdhThemeModule: _backstage_frontend_plugin_api.FrontendModule;
13
+
14
+ export { rhdhThemeModule as default };
package/dist/index.esm.js CHANGED
@@ -1,14 +1,32 @@
1
- export { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';
2
- export { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';
1
+ import { createFrontendModule } from '@backstage/frontend-plugin-api';
2
+ import { ThemeBlueprint } from '@backstage/plugin-app-react';
3
3
  import './assets/fonts/font.min.css.esm.js';
4
- export { useBranding } from './hooks/useBranding.esm.js';
5
- export { useThemeConfig } from './hooks/useThemeConfig.esm.js';
6
- export { useThemeOptions } from './hooks/useThemeOptions.esm.js';
7
- export { darkThemeProvider, getAllThemes, getThemes, lightThemeProvider, useAllThemes, useLoaderTheme, useThemes } from './themes.esm.js';
4
+ import { getAllThemes } from './themes.esm.js';
8
5
  export { LogoFull } from './components/LogoFull.esm.js';
9
6
  export { LogoIcon } from './components/LogoIcon.esm.js';
10
7
  import 'react/jsx-runtime';
11
8
  import '@backstage/theme';
12
9
  import '@mui/material/styles';
13
10
  import 'react';
11
+ import '@backstage/core-plugin-api';
12
+
13
+ const rhdhThemeModule = createFrontendModule({
14
+ pluginId: "app",
15
+ extensions: getAllThemes().map(
16
+ (appTheme) => ThemeBlueprint.make({
17
+ name: appTheme.id,
18
+ params: {
19
+ theme: {
20
+ id: appTheme.id,
21
+ title: appTheme.title,
22
+ variant: appTheme.variant,
23
+ icon: appTheme.icon,
24
+ Provider: appTheme.Provider
25
+ }
26
+ }
27
+ })
28
+ )
29
+ });
30
+
31
+ export { rhdhThemeModule as default };
14
32
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH Theme plugin for Backstage.\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport './assets/fonts/font.min.css';\nimport { getAllThemes } from './themes';\n\nexport { LogoFull, LogoIcon } from './components';\n\n/**\n * RHDH themes as NFS extensions (ThemeBlueprint).\n * Only the app can register ThemeBlueprint; we use the same theme definitions\n * from the theme plugin (getAllThemes()) so behavior matches the legacy app.\n *\n * @public\n */\nconst rhdhThemeModule = createFrontendModule({\n pluginId: 'app',\n extensions: getAllThemes().map(appTheme =>\n ThemeBlueprint.make({\n name: appTheme.id,\n params: {\n theme: {\n id: appTheme.id,\n title: appTheme.title,\n variant: appTheme.variant,\n icon: appTheme.icon,\n Provider: appTheme.Provider,\n },\n },\n }),\n ),\n});\n\nexport default rhdhThemeModule;\n"],"names":[],"mappings":";;;;;;;;;;;;AAoCA,MAAM,kBAAkB,oBAAA,CAAqB;AAAA,EAC3C,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY,cAAa,CAAE,GAAA;AAAA,IAAI,CAAA,QAAA,KAC7B,eAAe,IAAA,CAAK;AAAA,MAClB,MAAM,QAAA,CAAS,EAAA;AAAA,MACf,MAAA,EAAQ;AAAA,QACN,KAAA,EAAO;AAAA,UACL,IAAI,QAAA,CAAS,EAAA;AAAA,UACb,OAAO,QAAA,CAAS,KAAA;AAAA,UAChB,SAAS,QAAA,CAAS,OAAA;AAAA,UAClB,MAAM,QAAA,CAAS,IAAA;AAAA,UACf,UAAU,QAAA,CAAS;AAAA;AACrB;AACF,KACD;AAAA;AAEL,CAAC;;;;"}