@backstage/theme 0.4.1-next.0 → 0.4.1

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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage/theme
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4f28914d9f0e: Overwrite `PaletteOptions` & `ThemeOptions` type to allow use of `createTheme` from `@backstage/theme` as well as `@material-ui/core/styles` with the same type. Also replaced the default `CSSBaseline` with v4 instead of v5 for better backwards compatibility for now.
8
+ - 41c5aa0ab589: Applying the modified `theme.spacing` method only to overrides instead of replacing it in the whole theme.
9
+ - 9395baa82413: You can now customize the typography of your theme by passing in your own custom typography defaults
10
+ - 8174cf4c0edf: Fixing MUI / Material UI references
11
+ - f0444f094396: Removed the hard coded color and background color in the `MuiChip` overrides so that they work better with custom themes
12
+ - 874c3e8bf909: Override the spacing to a v5 compliant method
13
+
14
+ ## 0.4.1-next.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 8174cf4c0edf: Fixing MUI / Material UI references
19
+
3
20
  ## 0.4.1-next.0
4
21
 
5
22
  ### Patch Changes
@@ -11,9 +28,9 @@
11
28
 
12
29
  ### Minor Changes
13
30
 
14
- - 1fd38bc4141a: **MUI v5 Support:** Adding platform-wide support for MUI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
31
+ - 1fd38bc4141a: **Material UI v5 Support:** Adding platform-wide support for Material UI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
15
32
 
16
- To allow the future support of plugins & components using MUI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
33
+ To allow the future support of plugins & components using Material UI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
17
34
 
18
35
  ```diff
19
36
  Provider: ({ children }) => (
@@ -38,9 +55,9 @@
38
55
 
39
56
  ### Minor Changes
40
57
 
41
- - 1fd38bc4141a: **MUI v5 Support:** Adding platform-wide support for MUI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
58
+ - 1fd38bc4141a: **Material UI v5 Support:** Adding platform-wide support for Material UI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
42
59
 
43
- To allow the future support of plugins & components using MUI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
60
+ To allow the future support of plugins & components using Material UI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
44
61
 
45
62
  ```diff
46
63
  Provider: ({ children }) => (
@@ -208,7 +225,7 @@
208
225
 
209
226
  ### Patch Changes
210
227
 
211
- - 2089de76b: Deprecated `ItemCard`. Added `ItemCardGrid` and `ItemCardHeader` instead, that can be used to compose functionality around regular Material-UI `Card` components instead.
228
+ - 2089de76b: Deprecated `ItemCard`. Added `ItemCardGrid` and `ItemCardHeader` instead, that can be used to compose functionality around regular Material UI `Card` components instead.
212
229
 
213
230
  ## 0.2.3
214
231
 
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import * as _material_ui_core from '@material-ui/core';
8
8
  import { ThemeOptions as ThemeOptions$2, Theme as Theme$2 } from '@material-ui/core';
9
9
 
10
10
  /**
11
- * Transform MUI v5 component themes into a v4 theme props and overrides.
11
+ * Transform Material UI v5 component themes into a v4 theme props and overrides.
12
12
  *
13
13
  * @public
14
14
  */
@@ -114,6 +114,45 @@ type BackstageThemeAdditions = {
114
114
  page: PageTheme;
115
115
  getPageTheme: (selector: PageThemeSelector) => PageTheme;
116
116
  };
117
+ /**
118
+ * Custom Typography
119
+ *
120
+ * @public
121
+ */
122
+ type BackstageTypography = {
123
+ htmlFontSize: number;
124
+ fontFamily: string;
125
+ h1: {
126
+ fontSize: number;
127
+ fontWeight: number;
128
+ marginBottom: number;
129
+ };
130
+ h2: {
131
+ fontSize: number;
132
+ fontWeight: number;
133
+ marginBottom: number;
134
+ };
135
+ h3: {
136
+ fontSize: number;
137
+ fontWeight: number;
138
+ marginBottom: number;
139
+ };
140
+ h4: {
141
+ fontSize: number;
142
+ fontWeight: number;
143
+ marginBottom: number;
144
+ };
145
+ h5: {
146
+ fontSize: number;
147
+ fontWeight: number;
148
+ marginBottom: number;
149
+ };
150
+ h6: {
151
+ fontSize: number;
152
+ fontWeight: number;
153
+ marginBottom: number;
154
+ };
155
+ };
117
156
 
118
157
  /**
119
158
  * Supported Material UI Versions
@@ -130,7 +169,7 @@ type SupportedVersions = 'v4' | 'v5';
130
169
  */
131
170
  type SupportedThemes = Theme$1 | Theme;
132
171
  /**
133
- * A container of one theme for multiple different MUI versions.
172
+ * A container of one theme for multiple different Material UI versions.
134
173
  *
135
174
  * Currently known keys are 'v4' and 'v5'.
136
175
  *
@@ -152,6 +191,7 @@ interface UnifiedThemeOptions {
152
191
  fontFamily?: string;
153
192
  htmlFontSize?: number;
154
193
  components?: ThemeOptions['components'];
194
+ typography?: BackstageTypography;
155
195
  }
156
196
  /**
157
197
  * Creates a new {@link UnifiedTheme} using the provided options.
@@ -160,15 +200,15 @@ interface UnifiedThemeOptions {
160
200
  */
161
201
  declare function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme;
162
202
  /**
163
- * Creates a new {@link UnifiedTheme} using MUI v4 theme options.
164
- * Note that this uses `adaptV4Theme` from MUI v5, which is deprecated.
203
+ * Creates a new {@link UnifiedTheme} using Material UI v4 theme options.
204
+ * Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.
165
205
  *
166
206
  * @public
167
207
  */
168
208
  declare function createUnifiedThemeFromV4(options: ThemeOptions$1): UnifiedTheme;
169
209
 
170
210
  /**
171
- * Built-in Backstage MUI themes.
211
+ * Built-in Backstage Material UI themes.
172
212
  *
173
213
  * @public
174
214
  */
@@ -188,7 +228,7 @@ interface UnifiedThemeProviderProps {
188
228
  noCssBaseline?: boolean;
189
229
  }
190
230
  /**
191
- * Provides themes for all MUI versions supported by the provided unified theme.
231
+ * Provides themes for all Material UI versions supported by the provided unified theme.
192
232
  *
193
233
  * @public
194
234
  */
@@ -205,6 +245,7 @@ interface BaseThemeOptionsInput<PaletteOptions> {
205
245
  pageTheme?: Record<string, PageTheme>;
206
246
  fontFamily?: string;
207
247
  htmlFontSize?: number;
248
+ typography?: BackstageTypography;
208
249
  }
209
250
  /**
210
251
  * A helper for creating theme options.
@@ -213,40 +254,7 @@ interface BaseThemeOptionsInput<PaletteOptions> {
213
254
  */
214
255
  declare function createBaseThemeOptions<PaletteOptions>(options: BaseThemeOptionsInput<PaletteOptions>): {
215
256
  palette: PaletteOptions;
216
- typography: {
217
- htmlFontSize: number;
218
- fontFamily: string;
219
- h1: {
220
- fontSize: number;
221
- fontWeight: number;
222
- marginBottom: number;
223
- };
224
- h2: {
225
- fontSize: number;
226
- fontWeight: number;
227
- marginBottom: number;
228
- };
229
- h3: {
230
- fontSize: number;
231
- fontWeight: number;
232
- marginBottom: number;
233
- };
234
- h4: {
235
- fontWeight: number;
236
- fontSize: number;
237
- marginBottom: number;
238
- };
239
- h5: {
240
- fontWeight: number;
241
- fontSize: number;
242
- marginBottom: number;
243
- };
244
- h6: {
245
- fontWeight: number;
246
- fontSize: number;
247
- marginBottom: number;
248
- };
249
- };
257
+ typography: BackstageTypography;
250
258
  page: PageTheme;
251
259
  getPageTheme: ({ themeId }: PageThemeSelector) => PageTheme;
252
260
  };
@@ -450,14 +458,14 @@ declare const palettes: {
450
458
  };
451
459
 
452
460
  /**
453
- * The old MUI v4 Backstage light theme.
461
+ * The old Material UI v4 Backstage light theme.
454
462
  *
455
463
  * @public
456
464
  * @deprecated Use {@link themes.light} instead.
457
465
  */
458
466
  declare const lightTheme: _material_ui_core.Theme;
459
467
  /**
460
- * The old MUI v4 Backstage dark theme.
468
+ * The old Material UI v4 Backstage dark theme.
461
469
  *
462
470
  * @public
463
471
  * @deprecated Use {@link themes.dark} instead.
@@ -468,21 +476,21 @@ declare const darkTheme: _material_ui_core.Theme;
468
476
  * The full Backstage palette.
469
477
  *
470
478
  * @public
471
- * @deprecated This type is deprecated, the MUI Palette type is now always extended instead.
479
+ * @deprecated This type is deprecated, the Material UI Palette type is now always extended instead.
472
480
  */
473
481
  type BackstagePalette = Palette & BackstagePaletteAdditions;
474
482
  /**
475
483
  * The full Backstage palette options.
476
484
  *
477
485
  * @public
478
- * @deprecated This type is deprecated, the MUI PaletteOptions type is now always extended instead.
486
+ * @deprecated This type is deprecated, the Material UI PaletteOptions type is now always extended instead.
479
487
  */
480
488
  type BackstagePaletteOptions = PaletteOptions & BackstagePaletteAdditions;
481
489
  /**
482
490
  * Backstage theme options.
483
491
  *
484
492
  * @public
485
- * @deprecated This type is deprecated, the MUI ThemeOptions type is now always extended instead.
493
+ * @deprecated This type is deprecated, the Material UI ThemeOptions type is now always extended instead.
486
494
  * @remarks
487
495
  *
488
496
  * This is essentially a partial theme definition made by the user, that then
@@ -499,7 +507,7 @@ interface BackstageThemeOptions extends ThemeOptions$2 {
499
507
  * A Backstage theme.
500
508
  *
501
509
  * @public
502
- * @deprecated This type is deprecated, the MUI Theme type is now always extended instead.
510
+ * @deprecated This type is deprecated, the Material UI Theme type is now always extended instead.
503
511
  */
504
512
  interface BackstageTheme extends Theme$2 {
505
513
  palette: BackstagePalette;
@@ -519,6 +527,7 @@ type SimpleThemeOptions = {
519
527
  pageTheme?: Record<string, PageTheme>;
520
528
  fontFamily?: string;
521
529
  htmlFontSize?: number;
530
+ typography?: BackstageTypography;
522
531
  };
523
532
  declare module '@material-ui/core/styles/createPalette' {
524
533
  interface Palette extends BackstagePaletteAdditions {
@@ -534,21 +543,21 @@ declare module '@material-ui/core/styles/createTheme' {
534
543
  }
535
544
 
536
545
  /**
537
- * An old helper for creating MUI v4 theme options.
546
+ * An old helper for creating Material UI v4 theme options.
538
547
  *
539
548
  * @public
540
549
  * @deprecated Use {@link createBaseThemeOptions} instead.
541
550
  */
542
551
  declare function createThemeOptions(options: SimpleThemeOptions): ThemeOptions$2;
543
552
  /**
544
- * * An old helper for creating MUI v4 theme overrides.
553
+ * * An old helper for creating Material UI v4 theme overrides.
545
554
  *
546
555
  * @public
547
556
  * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.
548
557
  */
549
558
  declare function createThemeOverrides(theme: Theme$2): Overrides;
550
559
  /**
551
- * The old method to create a Backstage MUI v4 theme using a palette.
560
+ * The old method to create a Backstage Material UI v4 theme using a palette.
552
561
  * The theme is created with the common Backstage options and component styles.
553
562
  *
554
563
  * @public
@@ -580,4 +589,4 @@ declare module '@mui/private-theming/defaultTheme' {
580
589
  */
581
590
  declare const defaultComponentThemes: ThemeOptions['components'];
582
591
 
583
- export { BackstagePalette, BackstagePaletteAdditions, BackstagePaletteOptions, BackstageTheme, BackstageThemeAdditions, BackstageThemeOptions, BaseThemeOptionsInput, PageTheme, PageThemeSelector, SimpleThemeOptions, SupportedThemes, SupportedVersions, UnifiedTheme, UnifiedThemeOptions, UnifiedThemeProvider, UnifiedThemeProviderProps, colorVariants, createBaseThemeOptions, createTheme, createThemeOptions, createThemeOverrides, createUnifiedTheme, createUnifiedThemeFromV4, darkTheme, defaultComponentThemes, genPageTheme, lightTheme, pageTheme, palettes, shapes, themes, transformV5ComponentThemesToV4 };
592
+ export { BackstagePalette, BackstagePaletteAdditions, BackstagePaletteOptions, BackstageTheme, BackstageThemeAdditions, BackstageThemeOptions, BackstageTypography, BaseThemeOptionsInput, PageTheme, PageThemeSelector, SimpleThemeOptions, SupportedThemes, SupportedVersions, UnifiedTheme, UnifiedThemeOptions, UnifiedThemeProvider, UnifiedThemeProviderProps, colorVariants, createBaseThemeOptions, createTheme, createThemeOptions, createThemeOverrides, createUnifiedTheme, createUnifiedThemeFromV4, darkTheme, defaultComponentThemes, genPageTheme, lightTheme, pageTheme, palettes, shapes, themes, transformV5ComponentThemesToV4 };
package/dist/index.esm.js CHANGED
@@ -32,14 +32,15 @@ function adaptV5Override(theme, overrides) {
32
32
  return void 0;
33
33
  }
34
34
  if (typeof overrides === "object") {
35
+ const _theme = { ...theme };
36
+ const defaultSpacing = theme.spacing(1);
37
+ if (typeof defaultSpacing === "number") {
38
+ _theme.spacing = __v5Spacing(defaultSpacing);
39
+ }
35
40
  return Object.fromEntries(
36
41
  Object.entries(overrides).map(([className, style]) => {
37
42
  if (typeof style === "function") {
38
- const defaultSpacing = theme.spacing(1);
39
- if (typeof defaultSpacing === "number") {
40
- theme.spacing = __v5Spacing(defaultSpacing);
41
- }
42
- return [className, style({ theme })];
43
+ return [className, style({ theme: _theme })];
43
44
  }
44
45
  return [className, style];
45
46
  })
@@ -162,47 +163,49 @@ function createBaseThemeOptions(options) {
162
163
  htmlFontSize = DEFAULT_HTML_FONT_SIZE,
163
164
  fontFamily = DEFAULT_FONT_FAMILY,
164
165
  defaultPageTheme = DEFAULT_PAGE_THEME,
165
- pageTheme: pageTheme$1 = pageTheme
166
+ pageTheme: pageTheme$1 = pageTheme,
167
+ typography
166
168
  } = options;
167
169
  if (!pageTheme$1[defaultPageTheme]) {
168
170
  throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);
169
171
  }
172
+ const defaultTypography = {
173
+ htmlFontSize,
174
+ fontFamily,
175
+ h1: {
176
+ fontSize: 54,
177
+ fontWeight: 700,
178
+ marginBottom: 10
179
+ },
180
+ h2: {
181
+ fontSize: 40,
182
+ fontWeight: 700,
183
+ marginBottom: 8
184
+ },
185
+ h3: {
186
+ fontSize: 32,
187
+ fontWeight: 700,
188
+ marginBottom: 6
189
+ },
190
+ h4: {
191
+ fontWeight: 700,
192
+ fontSize: 28,
193
+ marginBottom: 6
194
+ },
195
+ h5: {
196
+ fontWeight: 700,
197
+ fontSize: 24,
198
+ marginBottom: 4
199
+ },
200
+ h6: {
201
+ fontWeight: 700,
202
+ fontSize: 20,
203
+ marginBottom: 2
204
+ }
205
+ };
170
206
  return {
171
207
  palette,
172
- typography: {
173
- htmlFontSize,
174
- fontFamily,
175
- h1: {
176
- fontSize: 54,
177
- fontWeight: 700,
178
- marginBottom: 10
179
- },
180
- h2: {
181
- fontSize: 40,
182
- fontWeight: 700,
183
- marginBottom: 8
184
- },
185
- h3: {
186
- fontSize: 32,
187
- fontWeight: 700,
188
- marginBottom: 6
189
- },
190
- h4: {
191
- fontWeight: 700,
192
- fontSize: 28,
193
- marginBottom: 6
194
- },
195
- h5: {
196
- fontWeight: 700,
197
- fontSize: 24,
198
- marginBottom: 4
199
- },
200
- h6: {
201
- fontWeight: 700,
202
- fontSize: 20,
203
- marginBottom: 2
204
- }
205
- },
208
+ typography: typography != null ? typography : defaultTypography,
206
209
  page: pageTheme$1[defaultPageTheme],
207
210
  getPageTheme: ({ themeId }) => {
208
211
  var _a;
@@ -358,14 +361,9 @@ const defaultComponentThemes = {
358
361
  MuiChip: {
359
362
  styleOverrides: {
360
363
  root: ({ theme }) => ({
361
- backgroundColor: "#D9D9D9",
362
364
  // By default there's no margin, but it's usually wanted, so we add some trailing margin
363
365
  marginRight: theme.spacing(1),
364
- marginBottom: theme.spacing(1),
365
- color: theme.palette.grey[900]
366
- }),
367
- outlined: ({ theme }) => ({
368
- color: theme.palette.text.primary
366
+ marginBottom: theme.spacing(1)
369
367
  }),
370
368
  label: ({ theme }) => ({
371
369
  lineHeight: theme.spacing(2.5),
@@ -376,15 +374,14 @@ const defaultComponentThemes = {
376
374
  fontSize: theme.spacing(1.5)
377
375
  }),
378
376
  deleteIcon: ({ theme }) => ({
379
- color: theme.palette.grey[500],
380
377
  width: theme.spacing(3),
381
378
  height: theme.spacing(3),
382
- margin: `0 ${theme.spacing(0.75)} 0 -${theme.spacing(0.75)}`
379
+ margin: theme.spacing(0, 0.75, 0, -0.75)
383
380
  }),
384
381
  deleteIconSmall: ({ theme }) => ({
385
382
  width: theme.spacing(2),
386
383
  height: theme.spacing(2),
387
- margin: `0 ${theme.spacing(0.5)} 0 -${theme.spacing(0.5)}`
384
+ margin: theme.spacing(0, 0.5, 0, -0.5)
388
385
  })
389
386
  }
390
387
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/unified/overrides.ts","../src/base/pageTheme.ts","../src/base/createBaseThemeOptions.ts","../src/v5/defaultComponentThemes.ts","../src/unified/UnifiedTheme.tsx","../src/base/palettes.ts","../src/unified/themes.ts","../src/unified/MuiClassNameSetup.ts","../src/unified/UnifiedThemeProvider.tsx","../src/v4/baseTheme.ts","../src/v4/themes.ts"],"sourcesContent":["/*\n * Copyright 2022 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 */\n\nimport type { Overrides } from '@material-ui/core/styles/overrides';\nimport type { ComponentsProps } from '@material-ui/core/styles/props';\nimport { ComponentsOverrides, Theme, ThemeOptions } from '@mui/material/styles';\nimport { CSSProperties } from 'react';\n\ntype V5Override = ComponentsOverrides[Exclude<\n keyof ComponentsOverrides,\n 'MuiCssBaseline'\n>];\ntype V4Override = Overrides[keyof Overrides];\ntype StaticStyleRules = Record<\n string,\n CSSProperties | Record<string, CSSProperties>\n>;\n\n// Utility function based on v5 `createSpacing`: https://github.com/mui/material-ui/blob/master/packages/mui-system/src/createTheme/createSpacing.ts#L42C3-L59C5\nconst __v5Spacing =\n (defaultSpacing: number) =>\n (...argsInput: ReadonlyArray<number | string>) => {\n const args = argsInput.length === 0 ? [1] : argsInput;\n const transform = (argument: string | number, themeSpacing: number) => {\n if (typeof argument === 'string') {\n return argument;\n }\n return themeSpacing * argument;\n };\n\n return args\n .map(argument => {\n const output = transform(argument, defaultSpacing);\n return typeof output === 'number' ? `${output}px` : output;\n })\n .join(' ');\n };\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5CssBaselineOverride(\n theme: Theme,\n overrides: ComponentsOverrides['MuiCssBaseline'],\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n\n const styles = typeof overrides === 'function' ? overrides(theme) : overrides;\n if (styles) {\n return { '@global': styles } as StaticStyleRules;\n }\n\n return undefined;\n}\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5Override(\n theme: Theme,\n overrides: V5Override,\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n if (typeof overrides === 'object') {\n return Object.fromEntries(\n Object.entries(overrides).map(([className, style]) => {\n if (typeof style === 'function') {\n const defaultSpacing = theme.spacing(1);\n if (typeof defaultSpacing === 'number') {\n // Override potential v4 spacing method: https://mui.com/material-ui/migration/v5-style-changes/#%E2%9C%85-remove-px-suffix\n // `adaptV4Theme as reference: https://github.com/mui/material-ui/blob/v5.x/packages/mui-material/src/styles/adaptV4Theme.js#L54C41-L54C41\n theme.spacing = __v5Spacing(defaultSpacing);\n }\n return [className, style({ theme })];\n }\n return [className, style];\n }),\n );\n }\n return overrides as StaticStyleRules;\n}\n\nconst stateStyleKeyPattern = /^&.Mui-([\\w-]+)$/;\n\n// Move state style overrides to the top level, e.g.\n// { root: { '&.Mui-active': { color: 'red' } } } -> { active: { color: 'red' } }\nfunction extractV5StateOverrides(\n overrides: StaticStyleRules | undefined,\n): StaticStyleRules | undefined {\n let output = overrides;\n if (!overrides || typeof overrides !== 'object') {\n return output;\n }\n for (const className of Object.keys(overrides)) {\n const styles = overrides[className];\n if (!styles || typeof styles !== 'object') {\n continue;\n }\n for (const _styleKey of Object.keys(styles)) {\n const styleKey = _styleKey as keyof typeof styles;\n const match = styleKey.match(stateStyleKeyPattern);\n if (match) {\n const [, state] = match;\n const { [styleKey]: stateStyles, ...restStyles } = styles;\n if (stateStyles) {\n output = {\n ...output,\n [className]: restStyles,\n [state]: stateStyles,\n };\n }\n }\n }\n }\n return output;\n}\n\n/**\n * Transform MUI v5 component themes into a v4 theme props and overrides.\n *\n * @public\n */\nexport function transformV5ComponentThemesToV4(\n theme: Theme,\n components: ThemeOptions['components'] = {},\n): { overrides: Overrides; props: ComponentsProps } {\n const overrides: Record<string, V4Override> = {};\n const props: Record<string, ComponentsProps[keyof ComponentsProps]> = {};\n\n for (const name of Object.keys(components)) {\n const component = components[name as keyof typeof components];\n if (!component) {\n continue;\n }\n if ('styleOverrides' in component) {\n if (name === 'MuiCssBaseline') {\n overrides[name] = adaptV5CssBaselineOverride(\n theme,\n component.styleOverrides as ComponentsOverrides['MuiCssBaseline'],\n );\n } else {\n overrides[name] = extractV5StateOverrides(\n adaptV5Override(theme, component.styleOverrides as V5Override),\n );\n }\n }\n if ('defaultProps' in component) {\n props[name] = component.defaultProps;\n }\n }\n\n return { overrides, props };\n}\n","/*\n * Copyright 2020 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 */\n\nimport { PageTheme } from './types';\n\n/**\n * The default predefined burst shapes.\n *\n * @public\n * @remarks\n *\n * How to add a shape:\n *\n * 1. Get the SVG shape from figma, should be ~1400 wide, ~400 high\n * and only the white-to-transparent mask, no colors.\n * 2. Run it through https://jakearchibald.github.io/svgomg/\n * 3. Run that through https://github.com/tigt/mini-svg-data-uri\n * with something like https://npm.runkit.com/mini-svg-data-uri\n * 4. Wrap the output in `url(\"\")`\n * 5. Give it a name and paste it into the `shapes` object below.\n */\nexport const shapes: Record<string, string> = {\n wave: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n wave2: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n round: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n};\n\n/**\n * The color range variants that are used in e.g. colorful bursts.\n *\n * @public\n */\nexport const colorVariants: Record<string, string[]> = {\n darkGrey: ['#171717', '#383838'],\n marineBlue: ['#006D8F', '#0049A1'],\n veryBlue: ['#0027AF', '#270094'],\n rubyRed: ['#98002B', '#8D1134'],\n toastyOrange: ['#BE2200', '#A41D00'],\n purpleSky: ['#8912CA', '#3E00EA'],\n eveningSea: ['#00FFF2', '#035355'],\n teal: ['#005B4B'],\n pinkSea: ['#C8077A', '#C2297D'],\n greens: ['#4BB8A5', '#187656'],\n};\n\n/**\n * Utility to not have to write colors and shapes twice.\n *\n * @public\n * @remarks\n *\n * As the background shapes and colors are decorative, we place them onto the\n * page as a CSS `background-image` instead of an HTML element of its own.\n */\nexport function genPageTheme(props: {\n colors: string[];\n shape: string;\n options?: {\n fontColor?: string;\n };\n}): PageTheme {\n const { colors, shape, options } = props;\n const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors;\n const gradient = `linear-gradient(90deg, ${gradientColors.join(', ')})`;\n const backgroundImage = `${shape}, ${gradient}`;\n const fontColor = options?.fontColor ?? '#FFFFFF';\n\n return {\n colors: colors,\n shape: shape,\n backgroundImage: backgroundImage,\n fontColor: fontColor,\n };\n}\n\n/**\n * All of the builtin page themes.\n *\n * @public\n */\nexport const pageTheme: Record<string, PageTheme> = {\n home: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave }),\n documentation: genPageTheme({\n colors: colorVariants.pinkSea,\n shape: shapes.wave2,\n }),\n tool: genPageTheme({ colors: colorVariants.purpleSky, shape: shapes.round }),\n service: genPageTheme({\n colors: colorVariants.marineBlue,\n shape: shapes.wave,\n }),\n website: genPageTheme({ colors: colorVariants.veryBlue, shape: shapes.wave }),\n library: genPageTheme({ colors: colorVariants.rubyRed, shape: shapes.wave }),\n other: genPageTheme({ colors: colorVariants.darkGrey, shape: shapes.wave }),\n app: genPageTheme({ colors: colorVariants.toastyOrange, shape: shapes.wave }),\n apis: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave2 }),\n card: genPageTheme({ colors: colorVariants.greens, shape: shapes.wave }),\n};\n","/*\n * Copyright 2022 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 */\n\nimport { PageTheme, PageThemeSelector } from './types';\nimport { pageTheme as defaultPageThemes } from './pageTheme';\n\nconst DEFAULT_HTML_FONT_SIZE = 16;\nconst DEFAULT_FONT_FAMILY =\n '\"Helvetica Neue\", Helvetica, Roboto, Arial, sans-serif';\nconst DEFAULT_PAGE_THEME = 'home';\n\n/**\n * Options for {@link createBaseThemeOptions}.\n *\n * @public\n */\nexport interface BaseThemeOptionsInput<PaletteOptions> {\n palette: PaletteOptions;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n}\n\n/**\n * A helper for creating theme options.\n *\n * @public\n */\nexport function createBaseThemeOptions<PaletteOptions>(\n options: BaseThemeOptionsInput<PaletteOptions>,\n) {\n const {\n palette,\n htmlFontSize = DEFAULT_HTML_FONT_SIZE,\n fontFamily = DEFAULT_FONT_FAMILY,\n defaultPageTheme = DEFAULT_PAGE_THEME,\n pageTheme = defaultPageThemes,\n } = options;\n\n if (!pageTheme[defaultPageTheme]) {\n throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);\n }\n\n return {\n palette,\n typography: {\n htmlFontSize,\n fontFamily,\n h1: {\n fontSize: 54,\n fontWeight: 700,\n marginBottom: 10,\n },\n h2: {\n fontSize: 40,\n fontWeight: 700,\n marginBottom: 8,\n },\n h3: {\n fontSize: 32,\n fontWeight: 700,\n marginBottom: 6,\n },\n h4: {\n fontWeight: 700,\n fontSize: 28,\n marginBottom: 6,\n },\n h5: {\n fontWeight: 700,\n fontSize: 24,\n marginBottom: 4,\n },\n h6: {\n fontWeight: 700,\n fontSize: 20,\n marginBottom: 2,\n },\n },\n page: pageTheme[defaultPageTheme],\n getPageTheme: ({ themeId }: PageThemeSelector) =>\n pageTheme[themeId] ?? pageTheme[defaultPageTheme],\n };\n}\n","/*\n * Copyright 2022 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 */\n\nimport { darken, lighten, ThemeOptions } from '@mui/material/styles';\n\n/**\n * A helper for creating theme overrides.\n *\n * @public\n */\nexport const defaultComponentThemes: ThemeOptions['components'] = {\n MuiCssBaseline: {\n styleOverrides: theme => ({\n html: {\n height: '100%',\n fontFamily: theme.typography.fontFamily,\n },\n body: {\n height: '100%',\n fontFamily: theme.typography.fontFamily,\n overscrollBehaviorY: 'none',\n fontSize: '0.875rem',\n lineHeight: 1.43,\n },\n a: {\n color: 'inherit',\n textDecoration: 'none',\n },\n }),\n },\n MuiGrid: {\n defaultProps: {\n spacing: 2,\n },\n },\n MuiSwitch: {\n defaultProps: {\n color: 'primary',\n },\n },\n MuiTableRow: {\n styleOverrides: {\n // Alternating row backgrounds\n root: ({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.background.default,\n },\n }),\n // Use pointer for hoverable rows\n hover: {\n '&:hover': {\n cursor: 'pointer',\n },\n },\n // Alternating head backgrounds\n head: ({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.background.paper,\n },\n }),\n },\n },\n // Tables are more dense than default mui tables\n MuiTableCell: {\n styleOverrides: {\n root: ({ theme }) => ({\n wordBreak: 'break-word',\n overflow: 'hidden',\n verticalAlign: 'middle',\n lineHeight: '1',\n margin: 0,\n padding: theme.spacing(3, 2, 3, 2.5),\n borderBottom: 0,\n }),\n sizeSmall: ({ theme }) => ({\n padding: theme.spacing(1.5, 2, 1.5, 2.5),\n }),\n head: ({ theme }) => ({\n wordBreak: 'break-word',\n overflow: 'hidden',\n color: theme.palette.textSubtle,\n fontWeight: 'normal',\n lineHeight: '1',\n }),\n },\n },\n MuiTabs: {\n styleOverrides: {\n // Tabs are smaller than default mui tab rows\n root: {\n minHeight: 24,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n // Tabs are smaller and have a hover background\n root: ({ theme }) => ({\n color: theme.palette.link,\n minHeight: 24,\n textTransform: 'initial',\n letterSpacing: '0.07em',\n '&:hover': {\n color: darken(theme.palette.link, 0.3),\n background: lighten(theme.palette.link, 0.95),\n },\n [theme.breakpoints.up('md')]: {\n minWidth: 120,\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 500,\n },\n }),\n textColorPrimary: ({ theme }) => ({\n color: theme.palette.link,\n }),\n },\n },\n MuiTableSortLabel: {\n styleOverrides: {\n // No color change on hover, just rely on the arrow showing up instead.\n root: {\n color: 'inherit',\n '&:hover': {\n color: 'inherit',\n },\n '&:focus': {\n color: 'inherit',\n },\n // Bold font for highlighting selected column\n '&.Mui-active': {\n fontWeight: 'bold',\n color: 'inherit',\n },\n },\n },\n },\n MuiListItemText: {\n styleOverrides: {\n dense: {\n // Default dense list items to adding ellipsis for really long str...\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n text: {\n // Text buttons have less padding by default, but we want to keep the original padding\n padding: undefined,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: ({ theme }) => ({\n backgroundColor: '#D9D9D9',\n // By default there's no margin, but it's usually wanted, so we add some trailing margin\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n color: theme.palette.grey[900],\n }),\n outlined: ({ theme }) => ({\n color: theme.palette.text.primary,\n }),\n label: ({ theme }) => ({\n lineHeight: theme.spacing(2.5),\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.spacing(1.75),\n }),\n labelSmall: ({ theme }) => ({\n fontSize: theme.spacing(1.5),\n }),\n deleteIcon: ({ theme }) => ({\n color: theme.palette.grey[500],\n width: theme.spacing(3),\n height: theme.spacing(3),\n margin: `0 ${theme.spacing(0.75)} 0 -${theme.spacing(0.75)}`,\n }),\n deleteIconSmall: ({ theme }) => ({\n width: theme.spacing(2),\n height: theme.spacing(2),\n margin: `0 ${theme.spacing(0.5)} 0 -${theme.spacing(0.5)}`,\n }),\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n display: 'flex',\n flexDirection: 'column',\n },\n },\n },\n MuiCardHeader: {\n styleOverrides: {\n root: {\n // Reduce padding between header and content\n paddingBottom: 0,\n },\n },\n },\n MuiCardContent: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n flexGrow: 1,\n '&:last-child': {\n paddingBottom: undefined,\n },\n },\n },\n },\n MuiCardActions: {\n styleOverrides: {\n root: {\n // We default to putting the card actions at the end\n justifyContent: 'flex-end',\n },\n },\n },\n MuiLink: {\n defaultProps: {\n underline: 'hover',\n },\n },\n};\n","/*\n * Copyright 2022 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 */\n\nimport {\n Theme as Mui4Theme,\n ThemeOptions as ThemeOptionsV4,\n createTheme,\n} from '@material-ui/core/styles';\nimport type { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';\nimport {\n DeprecatedThemeOptions,\n Theme as Mui5Theme,\n PaletteOptions as PaletteOptionsV5,\n ThemeOptions as ThemeOptionsV5,\n adaptV4Theme,\n createTheme as createV5Theme,\n} from '@mui/material/styles';\nimport { createBaseThemeOptions } from '../base/createBaseThemeOptions';\nimport { PageTheme } from '../base/types';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from './overrides';\nimport { SupportedThemes, SupportedVersions, UnifiedTheme } from './types';\n\nexport class UnifiedThemeHolder implements UnifiedTheme {\n #themes = new Map<SupportedVersions, SupportedThemes>();\n\n constructor(v4?: Mui4Theme, v5?: Mui5Theme) {\n this.#themes = new Map();\n if (v4) {\n this.#themes.set('v4', v4);\n }\n if (v5) {\n this.#themes.set('v5', v5);\n }\n }\n\n getTheme(version: SupportedVersions): SupportedThemes | undefined {\n return this.#themes.get(version);\n }\n}\n\n/**\n * Options for creating a new {@link UnifiedTheme}.\n *\n * @public\n */\nexport interface UnifiedThemeOptions {\n palette: PaletteOptionsV4 & PaletteOptionsV5;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n components?: ThemeOptionsV5['components'];\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using the provided options.\n *\n * @public\n */\nexport function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme {\n const themeOptions = createBaseThemeOptions(options);\n const components = { ...defaultComponentThemes, ...options.components };\n const v5Theme = createV5Theme({ ...themeOptions, components });\n\n const v4Overrides = transformV5ComponentThemesToV4(v5Theme, components);\n const v4Theme = { ...createTheme(themeOptions), ...v4Overrides };\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using MUI v4 theme options.\n * Note that this uses `adaptV4Theme` from MUI v5, which is deprecated.\n *\n * @public\n */\nexport function createUnifiedThemeFromV4(\n options: ThemeOptionsV4,\n): UnifiedTheme {\n const v5Theme = adaptV4Theme(options as DeprecatedThemeOptions);\n const v4Theme = createTheme(options);\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n","/*\n * Copyright 2020 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 */\n\n/**\n * Built-in Backstage color palettes.\n *\n * @public\n */\nexport const palettes = {\n light: {\n type: 'light' as const,\n mode: 'light' as const,\n background: {\n default: '#F8F8F8',\n paper: '#FFFFFF',\n },\n status: {\n ok: '#1DB954',\n warning: '#FF9800',\n error: '#E22134',\n running: '#1F5493',\n pending: '#FFED51',\n aborted: '#757575',\n },\n bursts: {\n fontColor: '#FEFEFE',\n slackChannelText: '#ddd',\n backgroundColor: {\n default: '#7C3699',\n },\n gradient: {\n linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',\n },\n },\n primary: {\n main: '#1F5493',\n },\n banner: {\n info: '#2E77D0',\n error: '#E22134',\n text: '#FFFFFF',\n link: '#000000',\n closeButtonColor: '#FFFFFF',\n warning: '#FF9800',\n },\n border: '#E6E6E6',\n textContrast: '#000000',\n textVerySubtle: '#DDD',\n textSubtle: '#6E6E6E',\n highlight: '#FFFBCC',\n errorBackground: '#FFEBEE',\n warningBackground: '#F59B23',\n infoBackground: '#ebf5ff',\n errorText: '#CA001B',\n infoText: '#004e8a',\n warningText: '#000000',\n linkHover: '#2196F3',\n link: '#0A6EBE',\n gold: '#FFD600',\n navigation: {\n background: '#171717',\n indicator: '#9BF0E1',\n color: '#b5b5b5',\n selectedColor: '#FFF',\n navItem: {\n hoverBackground: '#404040',\n },\n submenu: {\n background: '#404040',\n },\n },\n pinSidebarButton: {\n icon: '#181818',\n background: '#BDBDBD',\n },\n tabbar: {\n indicator: '#9BF0E1',\n },\n },\n dark: {\n type: 'dark' as const,\n mode: 'dark' as const,\n background: {\n default: '#333333',\n paper: '#424242',\n },\n status: {\n ok: '#71CF88',\n warning: '#FFB84D',\n error: '#F84C55',\n running: '#3488E3',\n pending: '#FEF071',\n aborted: '#9E9E9E',\n },\n bursts: {\n fontColor: '#FEFEFE',\n slackChannelText: '#ddd',\n backgroundColor: {\n default: '#7C3699',\n },\n gradient: {\n linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',\n },\n },\n primary: {\n main: '#9CC9FF',\n dark: '#82BAFD',\n },\n secondary: {\n main: '#FF88B2',\n },\n banner: {\n info: '#2E77D0',\n error: '#E22134',\n text: '#FFFFFF',\n link: '#000000',\n closeButtonColor: '#FFFFFF',\n warning: '#FF9800',\n },\n border: '#E6E6E6',\n textContrast: '#FFFFFF',\n textVerySubtle: '#727272',\n textSubtle: '#CCCCCC',\n highlight: '#FFFBCC',\n errorBackground: '#FFEBEE',\n warningBackground: '#F59B23',\n infoBackground: '#ebf5ff',\n errorText: '#CA001B',\n infoText: '#004e8a',\n warningText: '#000000',\n linkHover: '#82BAFD',\n link: '#9CC9FF',\n gold: '#FFD600',\n navigation: {\n background: '#424242',\n indicator: '#9BF0E1',\n color: '#b5b5b5',\n selectedColor: '#FFF',\n navItem: {\n hoverBackground: '#404040',\n },\n submenu: {\n background: '#404040',\n },\n },\n pinSidebarButton: {\n icon: '#404040',\n background: '#BDBDBD',\n },\n tabbar: {\n indicator: '#9BF0E1',\n },\n },\n};\n","/*\n * Copyright 2022 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 */\n\nimport { palettes } from '../base';\nimport { createUnifiedTheme } from './UnifiedTheme';\n\n/**\n * Built-in Backstage MUI themes.\n *\n * @public\n */\nexport const themes = {\n light: createUnifiedTheme({ palette: palettes.light }),\n dark: createUnifiedTheme({ palette: palettes.dark }),\n};\n","/*\n * Copyright 2022 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 */\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\n/**\n * This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 MUI components from `@mui/*`\n */\nClassNameGenerator.configure(componentName => {\n return `v5-${componentName}`;\n});\n","/*\n * Copyright 2022 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 */\n\nimport React, { ReactNode } from 'react';\nimport './MuiClassNameSetup';\nimport { CssBaseline } from '@material-ui/core';\nimport {\n ThemeProvider,\n StylesProvider,\n createGenerateClassName,\n Theme as Mui4Theme,\n} from '@material-ui/core/styles';\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\nimport { UnifiedTheme } from './types';\n\n/**\n * Props for {@link UnifiedThemeProvider}.\n *\n * @public\n */\nexport interface UnifiedThemeProviderProps {\n children: ReactNode;\n theme: UnifiedTheme;\n noCssBaseline?: boolean;\n}\n\n// Background at https://mui.com/x/migration/migration-data-grid-v4/#using-mui-core-v4-with-v5\n// Rather than disabling globals and custom seed, we instead only set a production prefix that\n// won't collide with MUI 5 styles. We've already got a separate class name generator for v5 set\n// up in MuiClassNameSetup.ts, so only the production JSS needs deduplication.\nconst generateV4ClassName = createGenerateClassName({\n productionPrefix: 'jss4-',\n});\n\n/**\n * Provides themes for all MUI versions supported by the provided unified theme.\n *\n * @public\n */\nexport function UnifiedThemeProvider(\n props: UnifiedThemeProviderProps,\n): JSX.Element {\n const { children, theme, noCssBaseline = false } = props;\n\n const v4Theme = theme.getTheme('v4') as Mui4Theme;\n const v5Theme = theme.getTheme('v5') as Mui5Theme;\n\n let cssBaseline: JSX.Element | undefined = undefined;\n if (!noCssBaseline) {\n cssBaseline = <CssBaseline />;\n }\n\n let result = (\n <>\n {cssBaseline}\n {children}\n </>\n );\n\n if (v4Theme) {\n result = (\n <StylesProvider generateClassName={generateV4ClassName}>\n <ThemeProvider theme={v4Theme}>{result}</ThemeProvider>\n </StylesProvider>\n );\n }\n\n if (v5Theme) {\n result = (\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={v5Theme}>{result}</Mui5Provider>\n </StyledEngineProvider>\n );\n }\n\n return result;\n}\n","/*\n * Copyright 2020 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 */\n\nimport { Theme as Mui5Theme } from '@mui/material/styles';\nimport { createTheme as createMuiTheme } from '@material-ui/core/styles';\nimport type {\n GridProps,\n SwitchProps,\n Theme,\n ThemeOptions,\n} from '@material-ui/core';\nimport { Overrides } from '@material-ui/core/styles/overrides';\nimport { SimpleThemeOptions } from './types';\nimport { createBaseThemeOptions } from '../base';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from '../unified/overrides';\n\n/**\n * An old helper for creating MUI v4 theme options.\n *\n * @public\n * @deprecated Use {@link createBaseThemeOptions} instead.\n */\nexport function createThemeOptions(options: SimpleThemeOptions): ThemeOptions {\n return {\n props: {\n MuiGrid: defaultComponentThemes?.MuiGrid\n ?.defaultProps as Partial<GridProps>,\n MuiSwitch: defaultComponentThemes?.MuiSwitch\n ?.defaultProps as Partial<SwitchProps>,\n },\n ...createBaseThemeOptions(options),\n };\n}\n\n/**\n * * An old helper for creating MUI v4 theme overrides.\n *\n * @public\n * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.\n */\nexport function createThemeOverrides(theme: Theme): Overrides {\n return transformV5ComponentThemesToV4(\n // Safe but we have to make sure we don't use mui5 specific stuff in the default component themes\n theme as unknown as Mui5Theme,\n defaultComponentThemes,\n ).overrides;\n}\n\n/**\n * The old method to create a Backstage MUI v4 theme using a palette.\n * The theme is created with the common Backstage options and component styles.\n *\n * @public\n * @deprecated Use {@link createUnifiedTheme} instead.\n */\nexport function createTheme(options: SimpleThemeOptions): Theme {\n const themeOptions = createThemeOptions(options);\n const baseTheme = createMuiTheme(themeOptions);\n const overrides = createThemeOverrides(baseTheme);\n const theme = { ...baseTheme, overrides };\n return theme;\n}\n","/*\n * Copyright 2020 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 */\n\nimport { createTheme } from './baseTheme';\nimport { palettes } from '../base';\n\n/**\n * The old MUI v4 Backstage light theme.\n *\n * @public\n * @deprecated Use {@link themes.light} instead.\n */\nexport const lightTheme = createTheme({\n palette: palettes.light,\n});\n\n/**\n * The old MUI v4 Backstage dark theme.\n *\n * @public\n * @deprecated Use {@link themes.dark} instead.\n */\nexport const darkTheme = createTheme({\n palette: palettes.dark,\n});\n"],"names":["pageTheme","defaultPageThemes","createV5Theme","createTheme","ClassNameGenerator","Mui5Provider","createMuiTheme"],"mappings":";;;;;;AAgCA,MAAM,WACJ,GAAA,CAAC,cACD,KAAA,CAAA,GAAI,SAA8C,KAAA;AAChD,EAAA,MAAM,OAAO,SAAU,CAAA,MAAA,KAAW,CAAI,GAAA,CAAC,CAAC,CAAI,GAAA,SAAA,CAAA;AAC5C,EAAM,MAAA,SAAA,GAAY,CAAC,QAAA,EAA2B,YAAyB,KAAA;AACrE,IAAI,IAAA,OAAO,aAAa,QAAU,EAAA;AAChC,MAAO,OAAA,QAAA,CAAA;AAAA,KACT;AACA,IAAA,OAAO,YAAe,GAAA,QAAA,CAAA;AAAA,GACxB,CAAA;AAEA,EAAO,OAAA,IAAA,CACJ,IAAI,CAAY,QAAA,KAAA;AACf,IAAM,MAAA,MAAA,GAAS,SAAU,CAAA,QAAA,EAAU,cAAc,CAAA,CAAA;AACjD,IAAA,OAAO,OAAO,MAAA,KAAW,QAAW,GAAA,CAAA,EAAG,MAAa,CAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAA,GACrD,CACA,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AACb,CAAA,CAAA;AAIF,SAAS,0BAAA,CACP,OACA,SAC8B,EAAA;AAC9B,EAAA,IAAI,CAAC,SAAA,IAAa,OAAO,SAAA,KAAc,QAAU,EAAA;AAC/C,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AAEA,EAAA,MAAM,SAAS,OAAO,SAAA,KAAc,UAAa,GAAA,SAAA,CAAU,KAAK,CAAI,GAAA,SAAA,CAAA;AACpE,EAAA,IAA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,IAAA;AACpB,CAAC;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/unified/overrides.ts","../src/base/pageTheme.ts","../src/base/createBaseThemeOptions.ts","../src/v5/defaultComponentThemes.ts","../src/unified/UnifiedTheme.tsx","../src/base/palettes.ts","../src/unified/themes.ts","../src/unified/MuiClassNameSetup.ts","../src/unified/UnifiedThemeProvider.tsx","../src/v4/baseTheme.ts","../src/v4/themes.ts"],"sourcesContent":["/*\n * Copyright 2022 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 */\n\nimport type { Overrides } from '@material-ui/core/styles/overrides';\nimport type { ComponentsProps } from '@material-ui/core/styles/props';\nimport { ComponentsOverrides, Theme, ThemeOptions } from '@mui/material/styles';\nimport { CSSProperties } from 'react';\n\ntype V5Override = ComponentsOverrides[Exclude<\n keyof ComponentsOverrides,\n 'MuiCssBaseline'\n>];\ntype V4Override = Overrides[keyof Overrides];\ntype StaticStyleRules = Record<\n string,\n CSSProperties | Record<string, CSSProperties>\n>;\n\n// Utility function based on v5 `createSpacing`: https://github.com/mui/material-ui/blob/master/packages/mui-system/src/createTheme/createSpacing.ts#L42C3-L59C5\nconst __v5Spacing =\n (defaultSpacing: number) =>\n (...argsInput: ReadonlyArray<number | string>) => {\n const args = argsInput.length === 0 ? [1] : argsInput;\n const transform = (argument: string | number, themeSpacing: number) => {\n if (typeof argument === 'string') {\n return argument;\n }\n return themeSpacing * argument;\n };\n\n return args\n .map(argument => {\n const output = transform(argument, defaultSpacing);\n return typeof output === 'number' ? `${output}px` : output;\n })\n .join(' ');\n };\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5CssBaselineOverride(\n theme: Theme,\n overrides: ComponentsOverrides['MuiCssBaseline'],\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n\n const styles = typeof overrides === 'function' ? overrides(theme) : overrides;\n if (styles) {\n return { '@global': styles } as StaticStyleRules;\n }\n\n return undefined;\n}\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5Override(\n theme: Theme,\n overrides: V5Override,\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n if (typeof overrides === 'object') {\n const _theme = { ...theme };\n const defaultSpacing = theme.spacing(1);\n if (typeof defaultSpacing === 'number') {\n // Override potential v4 spacing method: https://mui.com/material-ui/migration/v5-style-changes/#%E2%9C%85-remove-px-suffix\n // `adaptV4Theme as reference: https://github.com/mui/material-ui/blob/v5.x/packages/mui-material/src/styles/adaptV4Theme.js#L54C41-L54C41\n _theme.spacing = __v5Spacing(defaultSpacing);\n }\n return Object.fromEntries(\n Object.entries(overrides).map(([className, style]) => {\n if (typeof style === 'function') {\n return [className, style({ theme: _theme })];\n }\n return [className, style];\n }),\n );\n }\n return overrides as StaticStyleRules;\n}\n\nconst stateStyleKeyPattern = /^&.Mui-([\\w-]+)$/;\n\n// Move state style overrides to the top level, e.g.\n// { root: { '&.Mui-active': { color: 'red' } } } -> { active: { color: 'red' } }\nfunction extractV5StateOverrides(\n overrides: StaticStyleRules | undefined,\n): StaticStyleRules | undefined {\n let output = overrides;\n if (!overrides || typeof overrides !== 'object') {\n return output;\n }\n for (const className of Object.keys(overrides)) {\n const styles = overrides[className];\n if (!styles || typeof styles !== 'object') {\n continue;\n }\n for (const _styleKey of Object.keys(styles)) {\n const styleKey = _styleKey as keyof typeof styles;\n const match = styleKey.match(stateStyleKeyPattern);\n if (match) {\n const [, state] = match;\n const { [styleKey]: stateStyles, ...restStyles } = styles;\n if (stateStyles) {\n output = {\n ...output,\n [className]: restStyles,\n [state]: stateStyles,\n };\n }\n }\n }\n }\n return output;\n}\n\n/**\n * Transform Material UI v5 component themes into a v4 theme props and overrides.\n *\n * @public\n */\nexport function transformV5ComponentThemesToV4(\n theme: Theme,\n components: ThemeOptions['components'] = {},\n): { overrides: Overrides; props: ComponentsProps } {\n const overrides: Record<string, V4Override> = {};\n const props: Record<string, ComponentsProps[keyof ComponentsProps]> = {};\n\n for (const name of Object.keys(components)) {\n const component = components[name as keyof typeof components];\n if (!component) {\n continue;\n }\n if ('styleOverrides' in component) {\n if (name === 'MuiCssBaseline') {\n overrides[name] = adaptV5CssBaselineOverride(\n theme,\n component.styleOverrides as ComponentsOverrides['MuiCssBaseline'],\n );\n } else {\n overrides[name] = extractV5StateOverrides(\n adaptV5Override(theme, component.styleOverrides as V5Override),\n );\n }\n }\n if ('defaultProps' in component) {\n props[name] = component.defaultProps;\n }\n }\n\n return { overrides, props };\n}\n","/*\n * Copyright 2020 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 */\n\nimport { PageTheme } from './types';\n\n/**\n * The default predefined burst shapes.\n *\n * @public\n * @remarks\n *\n * How to add a shape:\n *\n * 1. Get the SVG shape from figma, should be ~1400 wide, ~400 high\n * and only the white-to-transparent mask, no colors.\n * 2. Run it through https://jakearchibald.github.io/svgomg/\n * 3. Run that through https://github.com/tigt/mini-svg-data-uri\n * with something like https://npm.runkit.com/mini-svg-data-uri\n * 4. Wrap the output in `url(\"\")`\n * 5. Give it a name and paste it into the `shapes` object below.\n */\nexport const shapes: Record<string, string> = {\n wave: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n wave2: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n round: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\")`,\n};\n\n/**\n * The color range variants that are used in e.g. colorful bursts.\n *\n * @public\n */\nexport const colorVariants: Record<string, string[]> = {\n darkGrey: ['#171717', '#383838'],\n marineBlue: ['#006D8F', '#0049A1'],\n veryBlue: ['#0027AF', '#270094'],\n rubyRed: ['#98002B', '#8D1134'],\n toastyOrange: ['#BE2200', '#A41D00'],\n purpleSky: ['#8912CA', '#3E00EA'],\n eveningSea: ['#00FFF2', '#035355'],\n teal: ['#005B4B'],\n pinkSea: ['#C8077A', '#C2297D'],\n greens: ['#4BB8A5', '#187656'],\n};\n\n/**\n * Utility to not have to write colors and shapes twice.\n *\n * @public\n * @remarks\n *\n * As the background shapes and colors are decorative, we place them onto the\n * page as a CSS `background-image` instead of an HTML element of its own.\n */\nexport function genPageTheme(props: {\n colors: string[];\n shape: string;\n options?: {\n fontColor?: string;\n };\n}): PageTheme {\n const { colors, shape, options } = props;\n const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors;\n const gradient = `linear-gradient(90deg, ${gradientColors.join(', ')})`;\n const backgroundImage = `${shape}, ${gradient}`;\n const fontColor = options?.fontColor ?? '#FFFFFF';\n\n return {\n colors: colors,\n shape: shape,\n backgroundImage: backgroundImage,\n fontColor: fontColor,\n };\n}\n\n/**\n * All of the builtin page themes.\n *\n * @public\n */\nexport const pageTheme: Record<string, PageTheme> = {\n home: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave }),\n documentation: genPageTheme({\n colors: colorVariants.pinkSea,\n shape: shapes.wave2,\n }),\n tool: genPageTheme({ colors: colorVariants.purpleSky, shape: shapes.round }),\n service: genPageTheme({\n colors: colorVariants.marineBlue,\n shape: shapes.wave,\n }),\n website: genPageTheme({ colors: colorVariants.veryBlue, shape: shapes.wave }),\n library: genPageTheme({ colors: colorVariants.rubyRed, shape: shapes.wave }),\n other: genPageTheme({ colors: colorVariants.darkGrey, shape: shapes.wave }),\n app: genPageTheme({ colors: colorVariants.toastyOrange, shape: shapes.wave }),\n apis: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave2 }),\n card: genPageTheme({ colors: colorVariants.greens, shape: shapes.wave }),\n};\n","/*\n * Copyright 2022 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 */\n\nimport { BackstageTypography, PageTheme, PageThemeSelector } from './types';\nimport { pageTheme as defaultPageThemes } from './pageTheme';\n\nconst DEFAULT_HTML_FONT_SIZE = 16;\nconst DEFAULT_FONT_FAMILY =\n '\"Helvetica Neue\", Helvetica, Roboto, Arial, sans-serif';\nconst DEFAULT_PAGE_THEME = 'home';\n\n/**\n * Options for {@link createBaseThemeOptions}.\n *\n * @public\n */\nexport interface BaseThemeOptionsInput<PaletteOptions> {\n palette: PaletteOptions;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n typography?: BackstageTypography;\n}\n\n/**\n * A helper for creating theme options.\n *\n * @public\n */\nexport function createBaseThemeOptions<PaletteOptions>(\n options: BaseThemeOptionsInput<PaletteOptions>,\n) {\n const {\n palette,\n htmlFontSize = DEFAULT_HTML_FONT_SIZE,\n fontFamily = DEFAULT_FONT_FAMILY,\n defaultPageTheme = DEFAULT_PAGE_THEME,\n pageTheme = defaultPageThemes,\n typography,\n } = options;\n\n if (!pageTheme[defaultPageTheme]) {\n throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);\n }\n\n const defaultTypography = {\n htmlFontSize,\n fontFamily,\n h1: {\n fontSize: 54,\n fontWeight: 700,\n marginBottom: 10,\n },\n h2: {\n fontSize: 40,\n fontWeight: 700,\n marginBottom: 8,\n },\n h3: {\n fontSize: 32,\n fontWeight: 700,\n marginBottom: 6,\n },\n h4: {\n fontWeight: 700,\n fontSize: 28,\n marginBottom: 6,\n },\n h5: {\n fontWeight: 700,\n fontSize: 24,\n marginBottom: 4,\n },\n h6: {\n fontWeight: 700,\n fontSize: 20,\n marginBottom: 2,\n },\n };\n\n return {\n palette,\n typography: typography ?? defaultTypography,\n page: pageTheme[defaultPageTheme],\n getPageTheme: ({ themeId }: PageThemeSelector) =>\n pageTheme[themeId] ?? pageTheme[defaultPageTheme],\n };\n}\n","/*\n * Copyright 2022 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 */\n\nimport { darken, lighten, ThemeOptions } from '@mui/material/styles';\n\n/**\n * A helper for creating theme overrides.\n *\n * @public\n */\nexport const defaultComponentThemes: ThemeOptions['components'] = {\n MuiCssBaseline: {\n styleOverrides: theme => ({\n html: {\n height: '100%',\n fontFamily: theme.typography.fontFamily,\n },\n body: {\n height: '100%',\n fontFamily: theme.typography.fontFamily,\n overscrollBehaviorY: 'none',\n fontSize: '0.875rem',\n lineHeight: 1.43,\n },\n a: {\n color: 'inherit',\n textDecoration: 'none',\n },\n }),\n },\n MuiGrid: {\n defaultProps: {\n spacing: 2,\n },\n },\n MuiSwitch: {\n defaultProps: {\n color: 'primary',\n },\n },\n MuiTableRow: {\n styleOverrides: {\n // Alternating row backgrounds\n root: ({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.background.default,\n },\n }),\n // Use pointer for hoverable rows\n hover: {\n '&:hover': {\n cursor: 'pointer',\n },\n },\n // Alternating head backgrounds\n head: ({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.background.paper,\n },\n }),\n },\n },\n // Tables are more dense than default mui tables\n MuiTableCell: {\n styleOverrides: {\n root: ({ theme }) => ({\n wordBreak: 'break-word',\n overflow: 'hidden',\n verticalAlign: 'middle',\n lineHeight: '1',\n margin: 0,\n padding: theme.spacing(3, 2, 3, 2.5),\n borderBottom: 0,\n }),\n sizeSmall: ({ theme }) => ({\n padding: theme.spacing(1.5, 2, 1.5, 2.5),\n }),\n head: ({ theme }) => ({\n wordBreak: 'break-word',\n overflow: 'hidden',\n color: theme.palette.textSubtle,\n fontWeight: 'normal',\n lineHeight: '1',\n }),\n },\n },\n MuiTabs: {\n styleOverrides: {\n // Tabs are smaller than default mui tab rows\n root: {\n minHeight: 24,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n // Tabs are smaller and have a hover background\n root: ({ theme }) => ({\n color: theme.palette.link,\n minHeight: 24,\n textTransform: 'initial',\n letterSpacing: '0.07em',\n '&:hover': {\n color: darken(theme.palette.link, 0.3),\n background: lighten(theme.palette.link, 0.95),\n },\n [theme.breakpoints.up('md')]: {\n minWidth: 120,\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 500,\n },\n }),\n textColorPrimary: ({ theme }) => ({\n color: theme.palette.link,\n }),\n },\n },\n MuiTableSortLabel: {\n styleOverrides: {\n // No color change on hover, just rely on the arrow showing up instead.\n root: {\n color: 'inherit',\n '&:hover': {\n color: 'inherit',\n },\n '&:focus': {\n color: 'inherit',\n },\n // Bold font for highlighting selected column\n '&.Mui-active': {\n fontWeight: 'bold',\n color: 'inherit',\n },\n },\n },\n },\n MuiListItemText: {\n styleOverrides: {\n dense: {\n // Default dense list items to adding ellipsis for really long str...\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n text: {\n // Text buttons have less padding by default, but we want to keep the original padding\n padding: undefined,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: ({ theme }) => ({\n // By default there's no margin, but it's usually wanted, so we add some trailing margin\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n }),\n label: ({ theme }) => ({\n lineHeight: theme.spacing(2.5),\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.spacing(1.75),\n }),\n labelSmall: ({ theme }) => ({\n fontSize: theme.spacing(1.5),\n }),\n deleteIcon: ({ theme }) => ({\n width: theme.spacing(3),\n height: theme.spacing(3),\n margin: theme.spacing(0, 0.75, 0, -0.75),\n }),\n deleteIconSmall: ({ theme }) => ({\n width: theme.spacing(2),\n height: theme.spacing(2),\n margin: theme.spacing(0, 0.5, 0, -0.5),\n }),\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n display: 'flex',\n flexDirection: 'column',\n },\n },\n },\n MuiCardHeader: {\n styleOverrides: {\n root: {\n // Reduce padding between header and content\n paddingBottom: 0,\n },\n },\n },\n MuiCardContent: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n flexGrow: 1,\n '&:last-child': {\n paddingBottom: undefined,\n },\n },\n },\n },\n MuiCardActions: {\n styleOverrides: {\n root: {\n // We default to putting the card actions at the end\n justifyContent: 'flex-end',\n },\n },\n },\n MuiLink: {\n defaultProps: {\n underline: 'hover',\n },\n },\n};\n","/*\n * Copyright 2022 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 */\n\nimport {\n Theme as Mui4Theme,\n ThemeOptions as ThemeOptionsV4,\n createTheme,\n} from '@material-ui/core/styles';\nimport type { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';\nimport {\n DeprecatedThemeOptions,\n Theme as Mui5Theme,\n PaletteOptions as PaletteOptionsV5,\n ThemeOptions as ThemeOptionsV5,\n adaptV4Theme,\n createTheme as createV5Theme,\n} from '@mui/material/styles';\nimport { createBaseThemeOptions } from '../base/createBaseThemeOptions';\nimport { BackstageTypography, PageTheme } from '../base/types';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from './overrides';\nimport { SupportedThemes, SupportedVersions, UnifiedTheme } from './types';\n\nexport class UnifiedThemeHolder implements UnifiedTheme {\n #themes = new Map<SupportedVersions, SupportedThemes>();\n\n constructor(v4?: Mui4Theme, v5?: Mui5Theme) {\n this.#themes = new Map();\n if (v4) {\n this.#themes.set('v4', v4);\n }\n if (v5) {\n this.#themes.set('v5', v5);\n }\n }\n\n getTheme(version: SupportedVersions): SupportedThemes | undefined {\n return this.#themes.get(version);\n }\n}\n\n/**\n * Options for creating a new {@link UnifiedTheme}.\n *\n * @public\n */\nexport interface UnifiedThemeOptions {\n palette: PaletteOptionsV4 & PaletteOptionsV5;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n components?: ThemeOptionsV5['components'];\n typography?: BackstageTypography;\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using the provided options.\n *\n * @public\n */\nexport function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme {\n const themeOptions = createBaseThemeOptions(options);\n const components = { ...defaultComponentThemes, ...options.components };\n const v5Theme = createV5Theme({ ...themeOptions, components });\n\n const v4Overrides = transformV5ComponentThemesToV4(v5Theme, components);\n const v4Theme = { ...createTheme(themeOptions), ...v4Overrides };\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using Material UI v4 theme options.\n * Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.\n *\n * @public\n */\nexport function createUnifiedThemeFromV4(\n options: ThemeOptionsV4,\n): UnifiedTheme {\n const v5Theme = adaptV4Theme(options as DeprecatedThemeOptions);\n const v4Theme = createTheme(options);\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n","/*\n * Copyright 2020 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 */\n\n/**\n * Built-in Backstage color palettes.\n *\n * @public\n */\nexport const palettes = {\n light: {\n type: 'light' as const,\n mode: 'light' as const,\n background: {\n default: '#F8F8F8',\n paper: '#FFFFFF',\n },\n status: {\n ok: '#1DB954',\n warning: '#FF9800',\n error: '#E22134',\n running: '#1F5493',\n pending: '#FFED51',\n aborted: '#757575',\n },\n bursts: {\n fontColor: '#FEFEFE',\n slackChannelText: '#ddd',\n backgroundColor: {\n default: '#7C3699',\n },\n gradient: {\n linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',\n },\n },\n primary: {\n main: '#1F5493',\n },\n banner: {\n info: '#2E77D0',\n error: '#E22134',\n text: '#FFFFFF',\n link: '#000000',\n closeButtonColor: '#FFFFFF',\n warning: '#FF9800',\n },\n border: '#E6E6E6',\n textContrast: '#000000',\n textVerySubtle: '#DDD',\n textSubtle: '#6E6E6E',\n highlight: '#FFFBCC',\n errorBackground: '#FFEBEE',\n warningBackground: '#F59B23',\n infoBackground: '#ebf5ff',\n errorText: '#CA001B',\n infoText: '#004e8a',\n warningText: '#000000',\n linkHover: '#2196F3',\n link: '#0A6EBE',\n gold: '#FFD600',\n navigation: {\n background: '#171717',\n indicator: '#9BF0E1',\n color: '#b5b5b5',\n selectedColor: '#FFF',\n navItem: {\n hoverBackground: '#404040',\n },\n submenu: {\n background: '#404040',\n },\n },\n pinSidebarButton: {\n icon: '#181818',\n background: '#BDBDBD',\n },\n tabbar: {\n indicator: '#9BF0E1',\n },\n },\n dark: {\n type: 'dark' as const,\n mode: 'dark' as const,\n background: {\n default: '#333333',\n paper: '#424242',\n },\n status: {\n ok: '#71CF88',\n warning: '#FFB84D',\n error: '#F84C55',\n running: '#3488E3',\n pending: '#FEF071',\n aborted: '#9E9E9E',\n },\n bursts: {\n fontColor: '#FEFEFE',\n slackChannelText: '#ddd',\n backgroundColor: {\n default: '#7C3699',\n },\n gradient: {\n linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',\n },\n },\n primary: {\n main: '#9CC9FF',\n dark: '#82BAFD',\n },\n secondary: {\n main: '#FF88B2',\n },\n banner: {\n info: '#2E77D0',\n error: '#E22134',\n text: '#FFFFFF',\n link: '#000000',\n closeButtonColor: '#FFFFFF',\n warning: '#FF9800',\n },\n border: '#E6E6E6',\n textContrast: '#FFFFFF',\n textVerySubtle: '#727272',\n textSubtle: '#CCCCCC',\n highlight: '#FFFBCC',\n errorBackground: '#FFEBEE',\n warningBackground: '#F59B23',\n infoBackground: '#ebf5ff',\n errorText: '#CA001B',\n infoText: '#004e8a',\n warningText: '#000000',\n linkHover: '#82BAFD',\n link: '#9CC9FF',\n gold: '#FFD600',\n navigation: {\n background: '#424242',\n indicator: '#9BF0E1',\n color: '#b5b5b5',\n selectedColor: '#FFF',\n navItem: {\n hoverBackground: '#404040',\n },\n submenu: {\n background: '#404040',\n },\n },\n pinSidebarButton: {\n icon: '#404040',\n background: '#BDBDBD',\n },\n tabbar: {\n indicator: '#9BF0E1',\n },\n },\n};\n","/*\n * Copyright 2022 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 */\n\nimport { palettes } from '../base';\nimport { createUnifiedTheme } from './UnifiedTheme';\n\n/**\n * Built-in Backstage Material UI themes.\n *\n * @public\n */\nexport const themes = {\n light: createUnifiedTheme({ palette: palettes.light }),\n dark: createUnifiedTheme({ palette: palettes.dark }),\n};\n","/*\n * Copyright 2022 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 */\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\n/**\n * This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 Material UI components from `@mui/*`\n */\nClassNameGenerator.configure(componentName => {\n return `v5-${componentName}`;\n});\n","/*\n * Copyright 2022 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 */\n\nimport React, { ReactNode } from 'react';\nimport './MuiClassNameSetup';\nimport { CssBaseline } from '@material-ui/core';\nimport {\n ThemeProvider,\n StylesProvider,\n createGenerateClassName,\n Theme as Mui4Theme,\n} from '@material-ui/core/styles';\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\nimport { UnifiedTheme } from './types';\n\n/**\n * Props for {@link UnifiedThemeProvider}.\n *\n * @public\n */\nexport interface UnifiedThemeProviderProps {\n children: ReactNode;\n theme: UnifiedTheme;\n noCssBaseline?: boolean;\n}\n\n// Background at https://mui.com/x/migration/migration-data-grid-v4/#using-mui-core-v4-with-v5\n// Rather than disabling globals and custom seed, we instead only set a production prefix that\n// won't collide with Material UI 5 styles. We've already got a separate class name generator for v5 set\n// up in MuiClassNameSetup.ts, so only the production JSS needs deduplication.\nconst generateV4ClassName = createGenerateClassName({\n productionPrefix: 'jss4-',\n});\n\n/**\n * Provides themes for all Material UI versions supported by the provided unified theme.\n *\n * @public\n */\nexport function UnifiedThemeProvider(\n props: UnifiedThemeProviderProps,\n): JSX.Element {\n const { children, theme, noCssBaseline = false } = props;\n\n const v4Theme = theme.getTheme('v4') as Mui4Theme;\n const v5Theme = theme.getTheme('v5') as Mui5Theme;\n\n let cssBaseline: JSX.Element | undefined = undefined;\n if (!noCssBaseline) {\n cssBaseline = <CssBaseline />;\n }\n\n let result = (\n <>\n {cssBaseline}\n {children}\n </>\n );\n\n if (v4Theme) {\n result = (\n <StylesProvider generateClassName={generateV4ClassName}>\n <ThemeProvider theme={v4Theme}>{result}</ThemeProvider>\n </StylesProvider>\n );\n }\n\n if (v5Theme) {\n result = (\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={v5Theme}>{result}</Mui5Provider>\n </StyledEngineProvider>\n );\n }\n\n return result;\n}\n","/*\n * Copyright 2020 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 */\n\nimport { Theme as Mui5Theme } from '@mui/material/styles';\nimport { createTheme as createMuiTheme } from '@material-ui/core/styles';\nimport type {\n GridProps,\n SwitchProps,\n Theme,\n ThemeOptions,\n} from '@material-ui/core';\nimport { Overrides } from '@material-ui/core/styles/overrides';\nimport { SimpleThemeOptions } from './types';\nimport { createBaseThemeOptions } from '../base';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from '../unified/overrides';\n\n/**\n * An old helper for creating Material UI v4 theme options.\n *\n * @public\n * @deprecated Use {@link createBaseThemeOptions} instead.\n */\nexport function createThemeOptions(options: SimpleThemeOptions): ThemeOptions {\n return {\n props: {\n MuiGrid: defaultComponentThemes?.MuiGrid\n ?.defaultProps as Partial<GridProps>,\n MuiSwitch: defaultComponentThemes?.MuiSwitch\n ?.defaultProps as Partial<SwitchProps>,\n },\n ...createBaseThemeOptions(options),\n };\n}\n\n/**\n * * An old helper for creating Material UI v4 theme overrides.\n *\n * @public\n * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.\n */\nexport function createThemeOverrides(theme: Theme): Overrides {\n return transformV5ComponentThemesToV4(\n // Safe but we have to make sure we don't use mui5 specific stuff in the default component themes\n theme as unknown as Mui5Theme,\n defaultComponentThemes,\n ).overrides;\n}\n\n/**\n * The old method to create a Backstage Material UI v4 theme using a palette.\n * The theme is created with the common Backstage options and component styles.\n *\n * @public\n * @deprecated Use {@link createUnifiedTheme} instead.\n */\nexport function createTheme(options: SimpleThemeOptions): Theme {\n const themeOptions = createThemeOptions(options);\n const baseTheme = createMuiTheme(themeOptions);\n const overrides = createThemeOverrides(baseTheme);\n const theme = { ...baseTheme, overrides };\n return theme;\n}\n","/*\n * Copyright 2020 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 */\n\nimport { createTheme } from './baseTheme';\nimport { palettes } from '../base';\n\n/**\n * The old Material UI v4 Backstage light theme.\n *\n * @public\n * @deprecated Use {@link themes.light} instead.\n */\nexport const lightTheme = createTheme({\n palette: palettes.light,\n});\n\n/**\n * The old Material UI v4 Backstage dark theme.\n *\n * @public\n * @deprecated Use {@link themes.dark} instead.\n */\nexport const darkTheme = createTheme({\n palette: palettes.dark,\n});\n"],"names":["pageTheme","defaultPageThemes","createV5Theme","createTheme","ClassNameGenerator","Mui5Provider","createMuiTheme"],"mappings":";;;;;;AAgCA,MAAM,WACJ,GAAA,CAAC,cACD,KAAA,CAAA,GAAI,SAA8C,KAAA;AAChD,EAAA,MAAM,OAAO,SAAU,CAAA,MAAA,KAAW,CAAI,GAAA,CAAC,CAAC,CAAI,GAAA,SAAA,CAAA;AAC5C,EAAM,MAAA,SAAA,GAAY,CAAC,QAAA,EAA2B,YAAyB,KAAA;AACrE,IAAI,IAAA,OAAO,aAAa,QAAU,EAAA;AAChC,MAAO,OAAA,QAAA,CAAA;AAAA,KACT;AACA,IAAA,OAAO,YAAe,GAAA,QAAA,CAAA;AAAA,GACxB,CAAA;AAEA,EAAO,OAAA,IAAA,CACJ,IAAI,CAAY,QAAA,KAAA;AACf,IAAM,MAAA,MAAA,GAAS,SAAU,CAAA,QAAA,EAAU,cAAc,CAAA,CAAA;AACjD,IAAA,OAAO,OAAO,MAAA,KAAW,QAAW,GAAA,CAAA,EAAG,MAAM,CAAO,EAAA,CAAA,GAAA,MAAA,CAAA;AAAA,GACrD,CACA,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AACb,CAAA,CAAA;AAIF,SAAS,0BAAA,CACP,OACA,SAC8B,EAAA;AAC9B,EAAA,IAAI,CAAC,SAAA,IAAa,OAAO,SAAA,KAAc,QAAU,EAAA;AAC/C,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AAEA,EAAA,MAAM,SAAS,OAAO,SAAA,KAAc,UAAa,GAAA,SAAA,C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,OAAA;AAAA,IACL,KAAO,EAAA;AAAA,MACL,OAAA,EAAA,CAAS,EAAwB,GAAA,CAAA,EAAA,GAAA,sBAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAxB,IACL,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA;AAAA,MACJ,SAAA,EAAA,CAAW,EAAwB,GAAA,CAAA,EAAA,GAAA,sBAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,KAAxB,IACP,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA;AAAA,KACN;AAAA,IACA,GAAG,uBAAuB,OAAO,CAAA;AAAA,GACnC,CAAA;AACF,CAAA;AAQO,SAAS,qBAAqB,KAAyB,EAAA;AAC5D,EAAO,OAAA,8BAAA;AAAA;AAAA,IAEL,KAAA;AAAA,IACA,sBAAA;AAAA,GACA,CAAA,SAAA,CAAA;AACJ,CAAA;AASO,SAAS,YAAY,OAAoC,EAAA;AAC9D,EAAM,MAAA,YAAA,GAAe,mBAAmB,OAAO,CAAA,CAAA;AAC/C,EAAM,MAAA,SAAA,GAAYC,cAAe,YAAY,CAAA,CAAA;AAC7C,EAAM,MAAA,SAAA,GAAY,qBAAqB,SAAS,CAAA,CAAA;AAChD,EAAA,MAAM,KAAQ,GAAA,EAAE,GAAG,SAAA,EAAW,SAAU,EAAA,CAAA;AACxC,EAAO,OAAA,KAAA,CAAA;AACT;;AClDO,MAAM,aAAa,WAAY,CAAA;AAAA,EACpC,SAAS,QAAS,CAAA,KAAA;AACpB,CAAC,EAAA;AAQM,MAAM,YAAY,WAAY,CAAA;AAAA,EACnC,SAAS,QAAS,CAAA,IAAA;AACpB,CAAC;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/theme",
3
3
  "description": "material-ui theme for use with Backstage.",
4
- "version": "0.4.1-next.0",
4
+ "version": "0.4.1",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "main": "dist/index.esm.js",
@@ -43,7 +43,7 @@
43
43
  "react-dom": "^16.13.1 || ^17.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@backstage/cli": "^0.22.9-next.0",
46
+ "@backstage/cli": "^0.22.9",
47
47
  "@types/react": "^16.13.1 || ^17.0.0"
48
48
  },
49
49
  "files": [