@backstage/theme 0.4.0-next.1 → 0.4.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/index.d.ts +25 -11
- package/dist/index.esm.js +132 -110
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage/theme
|
|
2
2
|
|
|
3
|
+
## 0.4.1-next.0
|
|
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
|
+
- 874c3e8bf909: Override the spacing to a v5 compliant method
|
|
9
|
+
|
|
10
|
+
## 0.4.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
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
|
|
15
|
+
|
|
16
|
+
To allow the future support of plugins & components using MUI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
|
|
17
|
+
|
|
18
|
+
```diff
|
|
19
|
+
Provider: ({ children }) => (
|
|
20
|
+
- <ThemeProvider theme={lightTheme}>
|
|
21
|
+
- <CssBaseline>{children}</CssBaseline>
|
|
22
|
+
- </ThemeProvider>
|
|
23
|
+
+ <UnifiedThemeProvider theme={builtinThemes.light} children={children} />
|
|
24
|
+
),
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 5065a5e8ebd6: Tweaked `UnifiedThemeProvider` to avoid overlapping JSS class names in production.
|
|
30
|
+
|
|
3
31
|
## 0.4.0-next.1
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Overrides } from '@material-ui/core/styles/overrides';
|
|
2
2
|
import { ComponentsProps } from '@material-ui/core/styles/props';
|
|
3
3
|
import { Theme, ThemeOptions, PaletteOptions as PaletteOptions$1 } from '@mui/material/styles';
|
|
4
|
-
import { ThemeOptions as ThemeOptions$1 } from '@material-ui/core/styles';
|
|
4
|
+
import { Theme as Theme$1, ThemeOptions as ThemeOptions$1 } from '@material-ui/core/styles';
|
|
5
5
|
import { PaletteOptions, Palette } from '@material-ui/core/styles/createPalette';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import * as _material_ui_core from '@material-ui/core';
|
|
8
|
-
import { ThemeOptions as ThemeOptions$2, Theme as Theme$
|
|
8
|
+
import { ThemeOptions as ThemeOptions$2, Theme as Theme$2 } from '@material-ui/core';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Transform MUI v5 component themes into a v4 theme props and overrides.
|
|
@@ -115,6 +115,20 @@ type BackstageThemeAdditions = {
|
|
|
115
115
|
getPageTheme: (selector: PageThemeSelector) => PageTheme;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Supported Material UI Versions
|
|
120
|
+
*
|
|
121
|
+
* Currently: 'v4' and 'v5'.
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
type SupportedVersions = 'v4' | 'v5';
|
|
126
|
+
/**
|
|
127
|
+
* Supported Material UI Theme Types for `SupportedVersions`
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
type SupportedThemes = Theme$1 | Theme;
|
|
118
132
|
/**
|
|
119
133
|
* A container of one theme for multiple different MUI versions.
|
|
120
134
|
*
|
|
@@ -123,7 +137,7 @@ type BackstageThemeAdditions = {
|
|
|
123
137
|
* @public
|
|
124
138
|
*/
|
|
125
139
|
interface UnifiedTheme {
|
|
126
|
-
getTheme(version:
|
|
140
|
+
getTheme(version: SupportedVersions): SupportedThemes | undefined;
|
|
127
141
|
}
|
|
128
142
|
|
|
129
143
|
/**
|
|
@@ -487,7 +501,7 @@ interface BackstageThemeOptions extends ThemeOptions$2 {
|
|
|
487
501
|
* @public
|
|
488
502
|
* @deprecated This type is deprecated, the MUI Theme type is now always extended instead.
|
|
489
503
|
*/
|
|
490
|
-
interface BackstageTheme extends Theme$
|
|
504
|
+
interface BackstageTheme extends Theme$2 {
|
|
491
505
|
palette: BackstagePalette;
|
|
492
506
|
page: PageTheme;
|
|
493
507
|
getPageTheme: (selector: PageThemeSelector) => PageTheme;
|
|
@@ -509,13 +523,13 @@ type SimpleThemeOptions = {
|
|
|
509
523
|
declare module '@material-ui/core/styles/createPalette' {
|
|
510
524
|
interface Palette extends BackstagePaletteAdditions {
|
|
511
525
|
}
|
|
512
|
-
interface PaletteOptions extends BackstagePaletteAdditions {
|
|
526
|
+
interface PaletteOptions extends Partial<BackstagePaletteAdditions> {
|
|
513
527
|
}
|
|
514
528
|
}
|
|
515
529
|
declare module '@material-ui/core/styles/createTheme' {
|
|
516
530
|
interface Theme extends BackstageThemeAdditions {
|
|
517
531
|
}
|
|
518
|
-
interface ThemeOptions extends BackstageThemeAdditions {
|
|
532
|
+
interface ThemeOptions extends Partial<BackstageThemeAdditions> {
|
|
519
533
|
}
|
|
520
534
|
}
|
|
521
535
|
|
|
@@ -532,7 +546,7 @@ declare function createThemeOptions(options: SimpleThemeOptions): ThemeOptions$2
|
|
|
532
546
|
* @public
|
|
533
547
|
* @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.
|
|
534
548
|
*/
|
|
535
|
-
declare function createThemeOverrides(theme: Theme$
|
|
549
|
+
declare function createThemeOverrides(theme: Theme$2): Overrides;
|
|
536
550
|
/**
|
|
537
551
|
* The old method to create a Backstage MUI v4 theme using a palette.
|
|
538
552
|
* The theme is created with the common Backstage options and component styles.
|
|
@@ -540,18 +554,18 @@ declare function createThemeOverrides(theme: Theme$1): Overrides;
|
|
|
540
554
|
* @public
|
|
541
555
|
* @deprecated Use {@link createUnifiedTheme} instead.
|
|
542
556
|
*/
|
|
543
|
-
declare function createTheme(options: SimpleThemeOptions): Theme$
|
|
557
|
+
declare function createTheme(options: SimpleThemeOptions): Theme$2;
|
|
544
558
|
|
|
545
559
|
declare module '@mui/material/styles' {
|
|
546
560
|
interface Palette extends BackstagePaletteAdditions {
|
|
547
561
|
}
|
|
548
|
-
interface PaletteOptions extends BackstagePaletteAdditions {
|
|
562
|
+
interface PaletteOptions extends Partial<BackstagePaletteAdditions> {
|
|
549
563
|
}
|
|
550
564
|
}
|
|
551
565
|
declare module '@mui/material/styles' {
|
|
552
566
|
interface Theme extends BackstageThemeAdditions {
|
|
553
567
|
}
|
|
554
|
-
interface ThemeOptions extends BackstageThemeAdditions {
|
|
568
|
+
interface ThemeOptions extends Partial<BackstageThemeAdditions> {
|
|
555
569
|
}
|
|
556
570
|
}
|
|
557
571
|
declare module '@mui/private-theming/defaultTheme' {
|
|
@@ -566,4 +580,4 @@ declare module '@mui/private-theming/defaultTheme' {
|
|
|
566
580
|
*/
|
|
567
581
|
declare const defaultComponentThemes: ThemeOptions['components'];
|
|
568
582
|
|
|
569
|
-
export { BackstagePalette, BackstagePaletteAdditions, BackstagePaletteOptions, BackstageTheme, BackstageThemeAdditions, BackstageThemeOptions, BaseThemeOptionsInput, PageTheme, PageThemeSelector, SimpleThemeOptions, UnifiedTheme, UnifiedThemeOptions, UnifiedThemeProvider, UnifiedThemeProviderProps, colorVariants, createBaseThemeOptions, createTheme, createThemeOptions, createThemeOverrides, createUnifiedTheme, createUnifiedThemeFromV4, darkTheme, defaultComponentThemes, genPageTheme, lightTheme, pageTheme, palettes, shapes, themes, transformV5ComponentThemesToV4 };
|
|
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -2,8 +2,21 @@ import { createTheme as createTheme$2, createGenerateClassName, StylesProvider,
|
|
|
2
2
|
import { darken, lighten, createTheme as createTheme$1, adaptV4Theme, StyledEngineProvider, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { unstable_ClassNameGenerator } from '@mui/material/className';
|
|
5
|
-
import
|
|
5
|
+
import { CssBaseline } from '@material-ui/core';
|
|
6
6
|
|
|
7
|
+
const __v5Spacing = (defaultSpacing) => (...argsInput) => {
|
|
8
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
9
|
+
const transform = (argument, themeSpacing) => {
|
|
10
|
+
if (typeof argument === "string") {
|
|
11
|
+
return argument;
|
|
12
|
+
}
|
|
13
|
+
return themeSpacing * argument;
|
|
14
|
+
};
|
|
15
|
+
return args.map((argument) => {
|
|
16
|
+
const output = transform(argument, defaultSpacing);
|
|
17
|
+
return typeof output === "number" ? `${output}px` : output;
|
|
18
|
+
}).join(" ");
|
|
19
|
+
};
|
|
7
20
|
function adaptV5CssBaselineOverride(theme, overrides) {
|
|
8
21
|
if (!overrides || typeof overrides === "string") {
|
|
9
22
|
return void 0;
|
|
@@ -22,6 +35,10 @@ function adaptV5Override(theme, overrides) {
|
|
|
22
35
|
return Object.fromEntries(
|
|
23
36
|
Object.entries(overrides).map(([className, style]) => {
|
|
24
37
|
if (typeof style === "function") {
|
|
38
|
+
const defaultSpacing = theme.spacing(1);
|
|
39
|
+
if (typeof defaultSpacing === "number") {
|
|
40
|
+
theme.spacing = __v5Spacing(defaultSpacing);
|
|
41
|
+
}
|
|
25
42
|
return [className, style({ theme })];
|
|
26
43
|
}
|
|
27
44
|
return [className, style];
|
|
@@ -86,6 +103,114 @@ function transformV5ComponentThemesToV4(theme, components = {}) {
|
|
|
86
103
|
return { overrides, props };
|
|
87
104
|
}
|
|
88
105
|
|
|
106
|
+
const shapes = {
|
|
107
|
+
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")`,
|
|
108
|
+
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")`,
|
|
109
|
+
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")`
|
|
110
|
+
};
|
|
111
|
+
const colorVariants = {
|
|
112
|
+
darkGrey: ["#171717", "#383838"],
|
|
113
|
+
marineBlue: ["#006D8F", "#0049A1"],
|
|
114
|
+
veryBlue: ["#0027AF", "#270094"],
|
|
115
|
+
rubyRed: ["#98002B", "#8D1134"],
|
|
116
|
+
toastyOrange: ["#BE2200", "#A41D00"],
|
|
117
|
+
purpleSky: ["#8912CA", "#3E00EA"],
|
|
118
|
+
eveningSea: ["#00FFF2", "#035355"],
|
|
119
|
+
teal: ["#005B4B"],
|
|
120
|
+
pinkSea: ["#C8077A", "#C2297D"],
|
|
121
|
+
greens: ["#4BB8A5", "#187656"]
|
|
122
|
+
};
|
|
123
|
+
function genPageTheme(props) {
|
|
124
|
+
var _a;
|
|
125
|
+
const { colors, shape, options } = props;
|
|
126
|
+
const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors;
|
|
127
|
+
const gradient = `linear-gradient(90deg, ${gradientColors.join(", ")})`;
|
|
128
|
+
const backgroundImage = `${shape}, ${gradient}`;
|
|
129
|
+
const fontColor = (_a = options == null ? void 0 : options.fontColor) != null ? _a : "#FFFFFF";
|
|
130
|
+
return {
|
|
131
|
+
colors,
|
|
132
|
+
shape,
|
|
133
|
+
backgroundImage,
|
|
134
|
+
fontColor
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const pageTheme = {
|
|
138
|
+
home: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave }),
|
|
139
|
+
documentation: genPageTheme({
|
|
140
|
+
colors: colorVariants.pinkSea,
|
|
141
|
+
shape: shapes.wave2
|
|
142
|
+
}),
|
|
143
|
+
tool: genPageTheme({ colors: colorVariants.purpleSky, shape: shapes.round }),
|
|
144
|
+
service: genPageTheme({
|
|
145
|
+
colors: colorVariants.marineBlue,
|
|
146
|
+
shape: shapes.wave
|
|
147
|
+
}),
|
|
148
|
+
website: genPageTheme({ colors: colorVariants.veryBlue, shape: shapes.wave }),
|
|
149
|
+
library: genPageTheme({ colors: colorVariants.rubyRed, shape: shapes.wave }),
|
|
150
|
+
other: genPageTheme({ colors: colorVariants.darkGrey, shape: shapes.wave }),
|
|
151
|
+
app: genPageTheme({ colors: colorVariants.toastyOrange, shape: shapes.wave }),
|
|
152
|
+
apis: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave2 }),
|
|
153
|
+
card: genPageTheme({ colors: colorVariants.greens, shape: shapes.wave })
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const DEFAULT_HTML_FONT_SIZE = 16;
|
|
157
|
+
const DEFAULT_FONT_FAMILY = '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';
|
|
158
|
+
const DEFAULT_PAGE_THEME = "home";
|
|
159
|
+
function createBaseThemeOptions(options) {
|
|
160
|
+
const {
|
|
161
|
+
palette,
|
|
162
|
+
htmlFontSize = DEFAULT_HTML_FONT_SIZE,
|
|
163
|
+
fontFamily = DEFAULT_FONT_FAMILY,
|
|
164
|
+
defaultPageTheme = DEFAULT_PAGE_THEME,
|
|
165
|
+
pageTheme: pageTheme$1 = pageTheme
|
|
166
|
+
} = options;
|
|
167
|
+
if (!pageTheme$1[defaultPageTheme]) {
|
|
168
|
+
throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
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
|
+
},
|
|
206
|
+
page: pageTheme$1[defaultPageTheme],
|
|
207
|
+
getPageTheme: ({ themeId }) => {
|
|
208
|
+
var _a;
|
|
209
|
+
return (_a = pageTheme$1[themeId]) != null ? _a : pageTheme$1[defaultPageTheme];
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
89
214
|
const defaultComponentThemes = {
|
|
90
215
|
MuiCssBaseline: {
|
|
91
216
|
styleOverrides: (theme) => ({
|
|
@@ -304,117 +429,14 @@ const defaultComponentThemes = {
|
|
|
304
429
|
justifyContent: "flex-end"
|
|
305
430
|
}
|
|
306
431
|
}
|
|
432
|
+
},
|
|
433
|
+
MuiLink: {
|
|
434
|
+
defaultProps: {
|
|
435
|
+
underline: "hover"
|
|
436
|
+
}
|
|
307
437
|
}
|
|
308
438
|
};
|
|
309
439
|
|
|
310
|
-
const shapes = {
|
|
311
|
-
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")`,
|
|
312
|
-
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")`,
|
|
313
|
-
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")`
|
|
314
|
-
};
|
|
315
|
-
const colorVariants = {
|
|
316
|
-
darkGrey: ["#171717", "#383838"],
|
|
317
|
-
marineBlue: ["#006D8F", "#0049A1"],
|
|
318
|
-
veryBlue: ["#0027AF", "#270094"],
|
|
319
|
-
rubyRed: ["#98002B", "#8D1134"],
|
|
320
|
-
toastyOrange: ["#BE2200", "#A41D00"],
|
|
321
|
-
purpleSky: ["#8912CA", "#3E00EA"],
|
|
322
|
-
eveningSea: ["#00FFF2", "#035355"],
|
|
323
|
-
teal: ["#005B4B"],
|
|
324
|
-
pinkSea: ["#C8077A", "#C2297D"],
|
|
325
|
-
greens: ["#4BB8A5", "#187656"]
|
|
326
|
-
};
|
|
327
|
-
function genPageTheme(props) {
|
|
328
|
-
var _a;
|
|
329
|
-
const { colors, shape, options } = props;
|
|
330
|
-
const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors;
|
|
331
|
-
const gradient = `linear-gradient(90deg, ${gradientColors.join(", ")})`;
|
|
332
|
-
const backgroundImage = `${shape}, ${gradient}`;
|
|
333
|
-
const fontColor = (_a = options == null ? void 0 : options.fontColor) != null ? _a : "#FFFFFF";
|
|
334
|
-
return {
|
|
335
|
-
colors,
|
|
336
|
-
shape,
|
|
337
|
-
backgroundImage,
|
|
338
|
-
fontColor
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
const pageTheme = {
|
|
342
|
-
home: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave }),
|
|
343
|
-
documentation: genPageTheme({
|
|
344
|
-
colors: colorVariants.pinkSea,
|
|
345
|
-
shape: shapes.wave2
|
|
346
|
-
}),
|
|
347
|
-
tool: genPageTheme({ colors: colorVariants.purpleSky, shape: shapes.round }),
|
|
348
|
-
service: genPageTheme({
|
|
349
|
-
colors: colorVariants.marineBlue,
|
|
350
|
-
shape: shapes.wave
|
|
351
|
-
}),
|
|
352
|
-
website: genPageTheme({ colors: colorVariants.veryBlue, shape: shapes.wave }),
|
|
353
|
-
library: genPageTheme({ colors: colorVariants.rubyRed, shape: shapes.wave }),
|
|
354
|
-
other: genPageTheme({ colors: colorVariants.darkGrey, shape: shapes.wave }),
|
|
355
|
-
app: genPageTheme({ colors: colorVariants.toastyOrange, shape: shapes.wave }),
|
|
356
|
-
apis: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave2 }),
|
|
357
|
-
card: genPageTheme({ colors: colorVariants.greens, shape: shapes.wave })
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
const DEFAULT_HTML_FONT_SIZE = 16;
|
|
361
|
-
const DEFAULT_FONT_FAMILY = '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';
|
|
362
|
-
const DEFAULT_PAGE_THEME = "home";
|
|
363
|
-
function createBaseThemeOptions(options) {
|
|
364
|
-
const {
|
|
365
|
-
palette,
|
|
366
|
-
htmlFontSize = DEFAULT_HTML_FONT_SIZE,
|
|
367
|
-
fontFamily = DEFAULT_FONT_FAMILY,
|
|
368
|
-
defaultPageTheme = DEFAULT_PAGE_THEME,
|
|
369
|
-
pageTheme: pageTheme$1 = pageTheme
|
|
370
|
-
} = options;
|
|
371
|
-
if (!pageTheme$1[defaultPageTheme]) {
|
|
372
|
-
throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);
|
|
373
|
-
}
|
|
374
|
-
return {
|
|
375
|
-
palette,
|
|
376
|
-
typography: {
|
|
377
|
-
htmlFontSize,
|
|
378
|
-
fontFamily,
|
|
379
|
-
h1: {
|
|
380
|
-
fontSize: 54,
|
|
381
|
-
fontWeight: 700,
|
|
382
|
-
marginBottom: 10
|
|
383
|
-
},
|
|
384
|
-
h2: {
|
|
385
|
-
fontSize: 40,
|
|
386
|
-
fontWeight: 700,
|
|
387
|
-
marginBottom: 8
|
|
388
|
-
},
|
|
389
|
-
h3: {
|
|
390
|
-
fontSize: 32,
|
|
391
|
-
fontWeight: 700,
|
|
392
|
-
marginBottom: 6
|
|
393
|
-
},
|
|
394
|
-
h4: {
|
|
395
|
-
fontWeight: 700,
|
|
396
|
-
fontSize: 28,
|
|
397
|
-
marginBottom: 6
|
|
398
|
-
},
|
|
399
|
-
h5: {
|
|
400
|
-
fontWeight: 700,
|
|
401
|
-
fontSize: 24,
|
|
402
|
-
marginBottom: 4
|
|
403
|
-
},
|
|
404
|
-
h6: {
|
|
405
|
-
fontWeight: 700,
|
|
406
|
-
fontSize: 20,
|
|
407
|
-
marginBottom: 2
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
page: pageTheme$1[defaultPageTheme],
|
|
411
|
-
getPageTheme: ({ themeId }) => {
|
|
412
|
-
var _a;
|
|
413
|
-
return (_a = pageTheme$1[themeId]) != null ? _a : pageTheme$1[defaultPageTheme];
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
|
|
418
440
|
var __accessCheck = (obj, member, msg) => {
|
|
419
441
|
if (!member.has(obj))
|
|
420
442
|
throw TypeError("Cannot " + msg);
|
|
@@ -629,7 +651,7 @@ function UnifiedThemeProvider(props) {
|
|
|
629
651
|
const v5Theme = theme.getTheme("v5");
|
|
630
652
|
let cssBaseline = void 0;
|
|
631
653
|
if (!noCssBaseline) {
|
|
632
|
-
cssBaseline = /* @__PURE__ */ React.createElement(
|
|
654
|
+
cssBaseline = /* @__PURE__ */ React.createElement(CssBaseline, null);
|
|
633
655
|
}
|
|
634
656
|
let result = /* @__PURE__ */ React.createElement(React.Fragment, null, cssBaseline, children);
|
|
635
657
|
if (v4Theme) {
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/unified/overrides.ts","../src/v5/defaultComponentThemes.ts","../src/base/pageTheme.ts","../src/base/createBaseThemeOptions.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// 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 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 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};\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 {\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 { PaletteOptions as PaletteOptionsV5 } from '@mui/material/styles';\nimport {\n adaptV4Theme,\n Theme as Mui5Theme,\n createTheme as createV5Theme,\n ThemeOptions as ThemeOptionsV5,\n} from '@mui/material/styles';\nimport { transformV5ComponentThemesToV4 } from './overrides';\nimport { PageTheme } from '../base/types';\nimport { defaultComponentThemes } from '../v5';\nimport { createBaseThemeOptions } from '../base/createBaseThemeOptions';\nimport { UnifiedTheme } from './types';\n\nexport class UnifiedThemeHolder implements UnifiedTheme {\n #themes = new Map<string, unknown>();\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: string): unknown | 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 // TODO: Not super relevant in the beginning\n /* const mui4Styles = maybeLoadMui4Styles();\n if (!mui4Styles) {\n return new UnifiedThemeHolder(undefined, v5Theme);\n } */\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 any);\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 {\n ThemeProvider,\n StylesProvider,\n createGenerateClassName,\n} from '@material-ui/core/styles';\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n} from '@mui/material/styles';\nimport CSSBaseline from '@mui/material/CssBaseline';\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');\n const v5Theme = theme.getTheme('v5');\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":";;;;;;AAiCA,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,IAAI,MAAQ,EAAA;AACV,IAAO,OAAA,EAAE,WAAW,MAAO,EAAA,CAAA;AAAA,GAC7B;AAEA,EAAO,OAAA,KAAA,CAAA,CAAA;AACT,CAAA;AAIA,SAAS,eAAA,CACP,OACA,SAC8B,EAAA;AAC9B,EAAA,IAAI,CAAC,SAAA,IAAa,OAAO,SAAA,KAAc,QAAU,EAAA;AAC/C,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACA,EAAI,IAAA,OAAO,cAAc,QAAU,EAAA;AACjC,IAAA,OAAO,MAAO,CAAA,WAAA;AAAA,MACZ,MAAA,CAAO,QAAQ,SAAS,CAAA,CAAE,IAAI,CAAC,CAAC,SAAW,EAAA,KAAK,CAAM,KAAA;AACpD,QAAI,IAAA,OAAO,UAAU,UAAY,EAAA;AAC/B,UAAA,OAAO,CAAC,SAAW,EAAA,KAAA,CAAM,EAAE,KAAA,EAAO,CAAC,CAAA,CAAA;AAAA,SACrC;AACA,QAAO,OAAA,CAAC,WAAW,KAAK,CAAA,CAAA;AAAA,OACzB,CAAA;AAAA,KACH,CAAA;AAAA,GACF;AACA,EAAO,OAAA,SAAA,CAAA;AACT,CAAA;AAEA,MAAM,oBAAu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,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;;;;"}
|
|
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;AAI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,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.
|
|
4
|
+
"version": "0.4.1-next.0",
|
|
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.
|
|
46
|
+
"@backstage/cli": "^0.22.9-next.0",
|
|
47
47
|
"@types/react": "^16.13.1 || ^17.0.0"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|