@backstage/theme 0.6.8-next.0 → 0.6.8
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 +6 -0
- package/dist/base/createBaseThemeOptions.esm.js.map +1 -1
- package/dist/base/pageTheme.esm.js.map +1 -1
- package/dist/base/palettes.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/unified/UnifiedTheme.esm.js.map +1 -1
- package/dist/unified/UnifiedThemeProvider.esm.js.map +1 -1
- package/dist/unified/overrides.esm.js.map +1 -1
- package/dist/unified/themes.esm.js.map +1 -1
- package/dist/v4/baseTheme.esm.js.map +1 -1
- package/dist/v4/themes.esm.js.map +1 -1
- package/dist/v5/defaultComponentThemes.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBaseThemeOptions.esm.js","sources":["../../src/base/createBaseThemeOptions.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 { BackstageTypography, PageTheme, PageThemeSelector } from './types';\nimport { pageTheme as defaultPageThemes } from './pageTheme';\n\nconst DEFAULT_HTML_FONT_SIZE = 16;\nconst DEFAULT_FONT_FAMILY =\n '\"Helvetica Neue\", Helvetica, Roboto, Arial, sans-serif';\nconst DEFAULT_PAGE_THEME = 'home';\n\n/**\n * Default Typography settings.\n *\n * @public\n */\nexport const defaultTypography: BackstageTypography = {\n htmlFontSize: DEFAULT_HTML_FONT_SIZE,\n fontFamily: DEFAULT_FONT_FAMILY,\n h1: {\n fontSize: 54,\n fontWeight: 700,\n marginBottom: 10,\n },\n h2: {\n fontSize: 40,\n fontWeight: 700,\n marginBottom: 8,\n },\n h3: {\n fontSize: 32,\n fontWeight: 700,\n marginBottom: 6,\n },\n h4: {\n fontWeight: 700,\n fontSize: 28,\n marginBottom: 6,\n },\n h5: {\n fontWeight: 700,\n fontSize: 24,\n marginBottom: 4,\n },\n h6: {\n fontWeight: 700,\n fontSize: 20,\n marginBottom: 2,\n },\n};\n\n/**\n * Options for {@link createBaseThemeOptions}.\n *\n * @public\n */\nexport interface BaseThemeOptionsInput<PaletteOptions> {\n palette: PaletteOptions;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n typography?: BackstageTypography;\n}\n\n/**\n * A helper for creating theme options.\n *\n * @public\n */\nexport function createBaseThemeOptions<PaletteOptions>(\n options: BaseThemeOptionsInput<PaletteOptions>,\n) {\n const {\n palette,\n htmlFontSize = DEFAULT_HTML_FONT_SIZE,\n fontFamily = DEFAULT_FONT_FAMILY,\n defaultPageTheme = DEFAULT_PAGE_THEME,\n pageTheme = defaultPageThemes,\n typography,\n } = options;\n\n if (!pageTheme[defaultPageTheme]) {\n throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);\n }\n\n defaultTypography.htmlFontSize = htmlFontSize;\n defaultTypography.fontFamily = fontFamily;\n\n return {\n palette,\n typography: typography ?? defaultTypography,\n page: pageTheme[defaultPageTheme],\n getPageTheme: ({ themeId }: PageThemeSelector) =>\n pageTheme[themeId] ?? pageTheme[defaultPageTheme],\n };\n}\n"],"names":["pageTheme","defaultPageThemes"],"mappings":";;AAmBA,MAAM,
|
|
1
|
+
{"version":3,"file":"createBaseThemeOptions.esm.js","sources":["../../src/base/createBaseThemeOptions.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 { BackstageTypography, PageTheme, PageThemeSelector } from './types';\nimport { pageTheme as defaultPageThemes } from './pageTheme';\n\nconst DEFAULT_HTML_FONT_SIZE = 16;\nconst DEFAULT_FONT_FAMILY =\n '\"Helvetica Neue\", Helvetica, Roboto, Arial, sans-serif';\nconst DEFAULT_PAGE_THEME = 'home';\n\n/**\n * Default Typography settings.\n *\n * @public\n */\nexport const defaultTypography: BackstageTypography = {\n htmlFontSize: DEFAULT_HTML_FONT_SIZE,\n fontFamily: DEFAULT_FONT_FAMILY,\n h1: {\n fontSize: 54,\n fontWeight: 700,\n marginBottom: 10,\n },\n h2: {\n fontSize: 40,\n fontWeight: 700,\n marginBottom: 8,\n },\n h3: {\n fontSize: 32,\n fontWeight: 700,\n marginBottom: 6,\n },\n h4: {\n fontWeight: 700,\n fontSize: 28,\n marginBottom: 6,\n },\n h5: {\n fontWeight: 700,\n fontSize: 24,\n marginBottom: 4,\n },\n h6: {\n fontWeight: 700,\n fontSize: 20,\n marginBottom: 2,\n },\n};\n\n/**\n * Options for {@link createBaseThemeOptions}.\n *\n * @public\n */\nexport interface BaseThemeOptionsInput<PaletteOptions> {\n palette: PaletteOptions;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n typography?: BackstageTypography;\n}\n\n/**\n * A helper for creating theme options.\n *\n * @public\n */\nexport function createBaseThemeOptions<PaletteOptions>(\n options: BaseThemeOptionsInput<PaletteOptions>,\n) {\n const {\n palette,\n htmlFontSize = DEFAULT_HTML_FONT_SIZE,\n fontFamily = DEFAULT_FONT_FAMILY,\n defaultPageTheme = DEFAULT_PAGE_THEME,\n pageTheme = defaultPageThemes,\n typography,\n } = options;\n\n if (!pageTheme[defaultPageTheme]) {\n throw new Error(`${defaultPageTheme} is not defined in pageTheme.`);\n }\n\n defaultTypography.htmlFontSize = htmlFontSize;\n defaultTypography.fontFamily = fontFamily;\n\n return {\n palette,\n typography: typography ?? defaultTypography,\n page: pageTheme[defaultPageTheme],\n getPageTheme: ({ themeId }: PageThemeSelector) =>\n pageTheme[themeId] ?? pageTheme[defaultPageTheme],\n };\n}\n"],"names":["pageTheme","defaultPageThemes"],"mappings":";;AAmBA,MAAM,sBAAA,GAAyB,EAAA;AAC/B,MAAM,mBAAA,GACJ,wDAAA;AACF,MAAM,kBAAA,GAAqB,MAAA;AAOpB,MAAM,iBAAA,GAAyC;AAAA,EACpD,YAAA,EAAc,sBAAA;AAAA,EACd,UAAA,EAAY,mBAAA;AAAA,EACZ,EAAA,EAAI;AAAA,IACF,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,GAAA;AAAA,IACZ,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,GAAA;AAAA,IACZ,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,GAAA;AAAA,IACZ,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,UAAA,EAAY,GAAA;AAAA,IACZ,QAAA,EAAU,EAAA;AAAA,IACV,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,UAAA,EAAY,GAAA;AAAA,IACZ,QAAA,EAAU,EAAA;AAAA,IACV,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,EAAA,EAAI;AAAA,IACF,UAAA,EAAY,GAAA;AAAA,IACZ,QAAA,EAAU,EAAA;AAAA,IACV,YAAA,EAAc;AAAA;AAElB;AAqBO,SAAS,uBACd,OAAA,EACA;AACA,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,YAAA,GAAe,sBAAA;AAAA,IACf,UAAA,GAAa,mBAAA;AAAA,IACb,gBAAA,GAAmB,kBAAA;AAAA,eACnBA,WAAA,GAAYC,SAAA;AAAA,IACZ;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,IAAI,CAACD,WAAA,CAAU,gBAAgB,CAAA,EAAG;AAChC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,gBAAgB,CAAA,6BAAA,CAA+B,CAAA;AAAA,EACpE;AAEA,EAAA,iBAAA,CAAkB,YAAA,GAAe,YAAA;AACjC,EAAA,iBAAA,CAAkB,UAAA,GAAa,UAAA;AAE/B,EAAA,OAAO;AAAA,IACL,OAAA;AAAA,IACA,YAAY,UAAA,IAAc,iBAAA;AAAA,IAC1B,IAAA,EAAMA,YAAU,gBAAgB,CAAA;AAAA,IAChC,YAAA,EAAc,CAAC,EAAE,OAAA,OACfA,WAAA,CAAU,OAAO,CAAA,IAAKA,WAAA,CAAU,gBAAgB;AAAA,GACpD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageTheme.esm.js","sources":["../../src/base/pageTheme.ts"],"sourcesContent":["/*\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: ['#00CFC5', '#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, sh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Ac,MAAQ,EAAA,KAAA,EAAO,MAAO,CAAA,IAAA,EAAM;AACzE;;;;"}
|
|
1
|
+
{"version":3,"file":"pageTheme.esm.js","sources":["../../src/base/pageTheme.ts"],"sourcesContent":["/*\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: ['#00CFC5', '#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"],"names":[],"mappings":"AAkCO,MAAM,MAAA,GAAiC;AAAA,EAC5C,IAAA,EAAM,CAAA,kpDAAA,CAAA;AAAA,EACN,KAAA,EAAO,CAAA,s1CAAA,CAAA;AAAA,EACP,KAAA,EAAO,CAAA,28DAAA;AACT;AAOO,MAAM,aAAA,GAA0C;AAAA,EACrD,QAAA,EAAU,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EAC/B,UAAA,EAAY,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EACjC,QAAA,EAAU,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EAC/B,OAAA,EAAS,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EAC9B,YAAA,EAAc,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EACnC,SAAA,EAAW,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA,EAChC,UAAA,EAAY,CAAC,SAAA,EAAW,SAAS,CAAA;AAAA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EAAS,aAAa,EAAE,MAAA,EAAQ,cAAc,QAAA,EAAU,KAAA,EAAO,MAAA,CAAO,IAAA,EAAM,CAAA;AAAA,EAC5E,OAAA,EAAS,aAAa,EAAE,MAAA,EAAQ,cAAc,OAAA,EAAS,KAAA,EAAO,MAAA,CAAO,IAAA,EAAM,CAAA;AAAA,EAC3E,KAAA,EAAO,aAAa,EAAE,MAAA,EAAQ,cAAc,QAAA,EAAU,KAAA,EAAO,MAAA,CAAO,IAAA,EAAM,CAAA;AAAA,EAC1E,GAAA,EAAK,aAAa,EAAE,MAAA,EAAQ,cAAc,YAAA,EAAc,KAAA,EAAO,MAAA,CAAO,IAAA,EAAM,CAAA;AAAA,EAC5E,IAAA,EAAM,aAAa,EAAE,MAAA,EAAQ,cAAc,IAAA,EAAM,KAAA,EAAO,MAAA,CAAO,KAAA,EAAO,CAAA;AAAA,EACtE,IAAA,EAAM,aAAa,EAAE,MAAA,EAAQ,cAAc,MAAA,EAAQ,KAAA,EAAO,MAAA,CAAO,IAAA,EAAM;AACzE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palettes.esm.js","sources":["../../src/base/palettes.ts"],"sourcesContent":["/*\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"],"names":[],"mappings":"AAqBO,MAAM,
|
|
1
|
+
{"version":3,"file":"palettes.esm.js","sources":["../../src/base/palettes.ts"],"sourcesContent":["/*\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"],"names":[],"mappings":"AAqBO,MAAM,QAAA,GAAW;AAAA,EACtB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,OAAA;AAAA,IACN,IAAA,EAAM,OAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACV,OAAA,EAAS,SAAA;AAAA,MACT,KAAA,EAAO;AAAA,KACT;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,EAAA,EAAI,SAAA;AAAA,MACJ,OAAA,EAAS,SAAA;AAAA,MACT,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,OAAA,EAAS,SAAA;AAAA,MACT,OAAA,EAAS;AAAA,KACX;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,SAAA,EAAW,SAAA;AAAA,MACX,gBAAA,EAAkB,MAAA;AAAA,MAClB,eAAA,EAAiB;AAAA,QACf,OAAA,EAAS;AAAA,OACX;AAAA,MACA,QAAA,EAAU;AAAA,QACR,MAAA,EAAQ;AAAA;AACV,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM;AAAA,KACR;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,SAAA;AAAA,MACN,KAAA,EAAO,SAAA;AAAA,MACP,IAAA,EAAM,SAAA;AAAA,MACN,IAAA,EAAM,SAAA;AAAA,MACN,gBAAA,EAAkB,SAAA;AAAA,MAClB,OAAA,EAAS;AAAA,KACX;AAAA,IACA,MAAA,EAAQ,SAAA;AAAA,IACR,YAAA,EAAc,SAAA;AAAA,IACd,cAAA,EAAgB,MAAA;AAAA,IAChB,UAAA,EAAY,SAAA;AAAA,IACZ,SAAA,EAAW,SAAA;AAAA,IACX,eAAA,EA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 @@ import { PaletteOptions, Palette } from '@material-ui/core/styles/createPalette'
|
|
|
6
6
|
import * as _backstage_theme from '@backstage/theme';
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
8
|
import * as _material_ui_core from '@material-ui/core';
|
|
9
|
-
import {
|
|
9
|
+
import { Theme as Theme$2, ThemeOptions as ThemeOptions$2 } from '@material-ui/core/styles/createTheme';
|
|
10
10
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedTheme.esm.js","sources":["../../src/unified/UnifiedTheme.tsx"],"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 {\n Theme as Mui4Theme,\n ThemeOptions as ThemeOptionsV4,\n createTheme,\n} from '@material-ui/core/styles';\nimport type { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';\nimport {\n DeprecatedThemeOptions,\n Theme as Mui5Theme,\n PaletteOptions as PaletteOptionsV5,\n ThemeOptions as ThemeOptionsV5,\n adaptV4Theme,\n createTheme as createV5Theme,\n} from '@mui/material/styles';\nimport { createBaseThemeOptions } from '../base/createBaseThemeOptions';\nimport { BackstageTypography, PageTheme } from '../base/types';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from './overrides';\nimport { SupportedThemes, SupportedVersions, UnifiedTheme } from './types';\n\nexport class UnifiedThemeHolder implements UnifiedTheme {\n #themes = new Map<SupportedVersions, SupportedThemes>();\n\n constructor(v4?: Mui4Theme, v5?: Mui5Theme) {\n this.#themes = new Map();\n if (v4) {\n this.#themes.set('v4', v4);\n }\n if (v5) {\n this.#themes.set('v5', v5);\n }\n }\n\n getTheme(version: SupportedVersions): SupportedThemes | undefined {\n return this.#themes.get(version);\n }\n}\n\n/**\n * Options for creating a new {@link UnifiedTheme}.\n *\n * @public\n */\nexport interface UnifiedThemeOptions {\n palette: PaletteOptionsV4 & PaletteOptionsV5;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n components?: ThemeOptionsV5['components'];\n typography?: BackstageTypography;\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using the provided options.\n *\n * @public\n */\nexport function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme {\n const themeOptions = createBaseThemeOptions(options);\n const components = { ...defaultComponentThemes, ...options.components };\n const v5Theme = createV5Theme({ ...themeOptions, components });\n\n const v4Overrides = transformV5ComponentThemesToV4(v5Theme, components);\n const v4Theme = { ...createTheme(themeOptions), ...v4Overrides };\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using Material UI v4 theme options.\n * Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.\n *\n * @public\n */\nexport function createUnifiedThemeFromV4(\n options: ThemeOptionsV4,\n): UnifiedTheme {\n const v5Theme = adaptV4Theme(options as DeprecatedThemeOptions);\n const v4Theme = createTheme(options);\n return new UnifiedThemeHolder(v4Theme, createV5Theme(v5Theme));\n}\n"],"names":["createV5Theme","createTheme"],"mappings":";;;;;;AAoCO,MAAM,
|
|
1
|
+
{"version":3,"file":"UnifiedTheme.esm.js","sources":["../../src/unified/UnifiedTheme.tsx"],"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 {\n Theme as Mui4Theme,\n ThemeOptions as ThemeOptionsV4,\n createTheme,\n} from '@material-ui/core/styles';\nimport type { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';\nimport {\n DeprecatedThemeOptions,\n Theme as Mui5Theme,\n PaletteOptions as PaletteOptionsV5,\n ThemeOptions as ThemeOptionsV5,\n adaptV4Theme,\n createTheme as createV5Theme,\n} from '@mui/material/styles';\nimport { createBaseThemeOptions } from '../base/createBaseThemeOptions';\nimport { BackstageTypography, PageTheme } from '../base/types';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from './overrides';\nimport { SupportedThemes, SupportedVersions, UnifiedTheme } from './types';\n\nexport class UnifiedThemeHolder implements UnifiedTheme {\n #themes = new Map<SupportedVersions, SupportedThemes>();\n\n constructor(v4?: Mui4Theme, v5?: Mui5Theme) {\n this.#themes = new Map();\n if (v4) {\n this.#themes.set('v4', v4);\n }\n if (v5) {\n this.#themes.set('v5', v5);\n }\n }\n\n getTheme(version: SupportedVersions): SupportedThemes | undefined {\n return this.#themes.get(version);\n }\n}\n\n/**\n * Options for creating a new {@link UnifiedTheme}.\n *\n * @public\n */\nexport interface UnifiedThemeOptions {\n palette: PaletteOptionsV4 & PaletteOptionsV5;\n defaultPageTheme?: string;\n pageTheme?: Record<string, PageTheme>;\n fontFamily?: string;\n htmlFontSize?: number;\n components?: ThemeOptionsV5['components'];\n typography?: BackstageTypography;\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using the provided options.\n *\n * @public\n */\nexport function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme {\n const themeOptions = createBaseThemeOptions(options);\n const components = { ...defaultComponentThemes, ...options.components };\n const v5Theme = createV5Theme({ ...themeOptions, components });\n\n const v4Overrides = transformV5ComponentThemesToV4(v5Theme, components);\n const v4Theme = { ...createTheme(themeOptions), ...v4Overrides };\n return new UnifiedThemeHolder(v4Theme, v5Theme);\n}\n\n/**\n * Creates a new {@link UnifiedTheme} using Material UI v4 theme options.\n * Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.\n *\n * @public\n */\nexport function createUnifiedThemeFromV4(\n options: ThemeOptionsV4,\n): UnifiedTheme {\n const v5Theme = adaptV4Theme(options as DeprecatedThemeOptions);\n const v4Theme = createTheme(options);\n return new UnifiedThemeHolder(v4Theme, createV5Theme(v5Theme));\n}\n"],"names":["createV5Theme","createTheme"],"mappings":";;;;;;AAoCO,MAAM,kBAAA,CAA2C;AAAA,EACtD,OAAA,uBAAc,GAAA,EAAwC;AAAA,EAEtD,WAAA,CAAY,IAAgB,EAAA,EAAgB;AAC1C,IAAA,IAAA,CAAK,OAAA,uBAAc,GAAA,EAAI;AACvB,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA;AAAA,IAC3B;AACA,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA;AAAA,IAC3B;AAAA,EACF;AAAA,EAEA,SAAS,OAAA,EAAyD;AAChE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,OAAO,CAAA;AAAA,EACjC;AACF;AAsBO,SAAS,mBAAmB,OAAA,EAA4C;AAC7E,EAAA,MAAM,YAAA,GAAe,uBAAuB,OAAO,CAAA;AACnD,EAAA,MAAM,aAAa,EAAE,GAAG,sBAAA,EAAwB,GAAG,QAAQ,UAAA,EAAW;AACtE,EAAA,MAAM,UAAUA,WAAA,CAAc,EAAE,GAAG,YAAA,EAAc,YAAY,CAAA;AAE7D,EAAA,MAAM,WAAA,GAAc,8BAAA,CAA+B,OAAA,EAAS,UAAU,CAAA;AACtE,EAAA,MAAM,UAAU,EAAE,GAAGC,cAAY,YAAY,CAAA,EAAG,GAAG,WAAA,EAAY;AAC/D,EAAA,OAAO,IAAI,kBAAA,CAAmB,OAAA,EAAS,OAAO,CAAA;AAChD;AAQO,SAAS,yBACd,OAAA,EACc;AACd,EAAA,MAAM,OAAA,GAAU,aAAa,OAAiC,CAAA;AAC9D,EAAA,MAAM,OAAA,GAAUA,cAAY,OAAO,CAAA;AACnC,EAAA,OAAO,IAAI,kBAAA,CAAmB,OAAA,EAASD,WAAA,CAAc,OAAO,CAAC,CAAA;AAC/D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedThemeProvider.esm.js","sources":["../../src/unified/UnifiedThemeProvider.tsx"],"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 { ReactNode, useEffect } from 'react';\nimport CssBaseline from '@material-ui/core/CssBaseline';\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';\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\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/**\n * This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 Material UI components from `@mui/*`.\n *\n * This call needs to be in the same module as the `UnifiedThemeProvider` to ensure that it doesn't get removed by tree shaking\n */\nClassNameGenerator.configure(componentName => {\n return `v5-${componentName}`;\n});\n\n// Background at https://mui.com/x/migration/migration-data-grid-v4/#using-mui-core-v4-with-v5\n// Rather than disabling globals and custom seed, we instead only set a production prefix that\n// won't collide with Material UI 5 styles. We've already got the separate class name generator\n// for v5 set up in just above, so only the production JSS needs deduplication.\nconst generateV4ClassName = createGenerateClassName({\n productionPrefix: 'jss4-',\n});\n\n/**\n * Provides themes for all Material UI versions supported by the provided unified theme.\n *\n * @public\n */\nexport function UnifiedThemeProvider(\n props: UnifiedThemeProviderProps,\n): JSX.Element {\n const { children, theme, noCssBaseline = false } = props;\n\n const v4Theme = theme.getTheme('v4') as Mui4Theme;\n const v5Theme = theme.getTheme('v5') as Mui5Theme;\n const themeMode = v4Theme ? v4Theme.palette.type : v5Theme?.palette.mode;\n const themeName = 'backstage';\n\n useEffect(() => {\n document.body.setAttribute('data-theme-mode', themeMode);\n document.body.setAttribute('data-theme-name', themeName);\n\n return () => {\n document.body.removeAttribute('data-theme-mode');\n document.body.removeAttribute('data-theme-name');\n };\n }, [themeMode, themeName]);\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"],"names":["ClassNameGenerator","Mui5Provider"],"mappings":";;;;;;;AAgDAA,2BAAA,CAAmB,UAAU,
|
|
1
|
+
{"version":3,"file":"UnifiedThemeProvider.esm.js","sources":["../../src/unified/UnifiedThemeProvider.tsx"],"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 { ReactNode, useEffect } from 'react';\nimport CssBaseline from '@material-ui/core/CssBaseline';\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';\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\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/**\n * This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 Material UI components from `@mui/*`.\n *\n * This call needs to be in the same module as the `UnifiedThemeProvider` to ensure that it doesn't get removed by tree shaking\n */\nClassNameGenerator.configure(componentName => {\n return `v5-${componentName}`;\n});\n\n// Background at https://mui.com/x/migration/migration-data-grid-v4/#using-mui-core-v4-with-v5\n// Rather than disabling globals and custom seed, we instead only set a production prefix that\n// won't collide with Material UI 5 styles. We've already got the separate class name generator\n// for v5 set up in just above, so only the production JSS needs deduplication.\nconst generateV4ClassName = createGenerateClassName({\n productionPrefix: 'jss4-',\n});\n\n/**\n * Provides themes for all Material UI versions supported by the provided unified theme.\n *\n * @public\n */\nexport function UnifiedThemeProvider(\n props: UnifiedThemeProviderProps,\n): JSX.Element {\n const { children, theme, noCssBaseline = false } = props;\n\n const v4Theme = theme.getTheme('v4') as Mui4Theme;\n const v5Theme = theme.getTheme('v5') as Mui5Theme;\n const themeMode = v4Theme ? v4Theme.palette.type : v5Theme?.palette.mode;\n const themeName = 'backstage';\n\n useEffect(() => {\n document.body.setAttribute('data-theme-mode', themeMode);\n document.body.setAttribute('data-theme-name', themeName);\n\n return () => {\n document.body.removeAttribute('data-theme-mode');\n document.body.removeAttribute('data-theme-name');\n };\n }, [themeMode, themeName]);\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"],"names":["ClassNameGenerator","Mui5Provider"],"mappings":";;;;;;;AAgDAA,2BAAA,CAAmB,UAAU,CAAA,aAAA,KAAiB;AAC5C,EAAA,OAAO,MAAM,aAAa,CAAA,CAAA;AAC5B,CAAC,CAAA;AAMD,MAAM,sBAAsB,uBAAA,CAAwB;AAAA,EAClD,gBAAA,EAAkB;AACpB,CAAC,CAAA;AAOM,SAAS,qBACd,KAAA,EACa;AACb,EAAA,MAAM,EAAE,QAAA,EAAU,KAAA,EAAO,aAAA,GAAgB,OAAM,GAAI,KAAA;AAEnD,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA;AACnC,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA;AACnC,EAAA,MAAM,YAAY,OAAA,GAAU,OAAA,CAAQ,OAAA,CAAQ,IAAA,GAAO,SAAS,OAAA,CAAQ,IAAA;AACpE,EAAA,MAAM,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n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Overrides } from '@material-ui/core/styles/overrides';\nimport type { ComponentsProps } from '@material-ui/core/styles/props';\nimport { ComponentsOverrides, Theme, ThemeOptions } from '@mui/material/styles';\nimport { CSSProperties } from 'react';\n\ntype V5Override = ComponentsOverrides[Exclude<\n keyof ComponentsOverrides,\n 'MuiCssBaseline'\n>];\ntype V4Override = Overrides[keyof Overrides];\ntype StaticStyleRules = Record<\n string,\n CSSProperties | Record<string, CSSProperties>\n>;\n\n// Utility function based on v5 `createSpacing`: https://github.com/mui/material-ui/blob/master/packages/mui-system/src/createTheme/createSpacing.ts#L42C3-L59C5\nconst __v5Spacing =\n (defaultSpacing: number) =>\n (...argsInput: ReadonlyArray<number | string>) => {\n const args = argsInput.length === 0 ? [1] : argsInput;\n const transform = (argument: string | number, themeSpacing: number) => {\n if (typeof argument === 'string') {\n return argument;\n }\n return themeSpacing * argument;\n };\n\n return args\n .map(argument => {\n const output = transform(argument, defaultSpacing);\n return typeof output === 'number' ? `${output}px` : output;\n })\n .join(' ');\n };\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5CssBaselineOverride(\n theme: Theme,\n overrides: ComponentsOverrides['MuiCssBaseline'],\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n\n const styles = typeof overrides === 'function' ? overrides(theme) : overrides;\n if (styles) {\n return { '@global': styles } as StaticStyleRules;\n }\n\n return undefined;\n}\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5Override(\n theme: Theme,\n overrides: V5Override,\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n if (typeof overrides === 'object') {\n const _theme = { ...theme };\n const defaultSpacing = theme.spacing(1);\n if (typeof defaultSpacing === 'number') {\n // Override potential v4 spacing method: https://mui.com/material-ui/migration/v5-style-changes/#%E2%9C%85-remove-px-suffix\n // `adaptV4Theme as reference: https://github.com/mui/material-ui/blob/v5.x/packages/mui-material/src/styles/adaptV4Theme.js#L54C41-L54C41\n _theme.spacing = __v5Spacing(defaultSpacing);\n }\n return Object.fromEntries(\n Object.entries(overrides).map(([className, style]) => {\n if (typeof style === 'function') {\n return [className, style({ theme: _theme })];\n }\n return [className, style];\n }),\n );\n }\n return overrides as StaticStyleRules;\n}\n\nconst stateStyleKeyPattern = /^&.Mui-([\\w-]+)$/;\n\n// Move state style overrides to the top level, e.g.\n// { root: { '&.Mui-active': { color: 'red' } } } -> { active: { color: 'red' } }\nfunction extractV5StateOverrides(\n overrides: StaticStyleRules | undefined,\n): StaticStyleRules | undefined {\n let output = overrides;\n if (!overrides || typeof overrides !== 'object') {\n return output;\n }\n for (const className of Object.keys(overrides)) {\n const styles = overrides[className];\n if (!styles || typeof styles !== 'object') {\n continue;\n }\n for (const _styleKey of Object.keys(styles)) {\n const styleKey = _styleKey as keyof typeof styles;\n const match = styleKey.match(stateStyleKeyPattern);\n if (match) {\n const [, state] = match;\n const { [styleKey]: stateStyles, ...restStyles } = styles;\n if (stateStyles) {\n output = {\n ...output,\n [className]: restStyles,\n [state]: stateStyles,\n };\n }\n }\n }\n }\n return output;\n}\n\n/**\n * Transform Material UI v5 component themes into a v4 theme props and overrides.\n *\n * @public\n */\nexport function transformV5ComponentThemesToV4(\n theme: Theme,\n components: ThemeOptions['components'] = {},\n): { overrides: Overrides; props: ComponentsProps } {\n const overrides: Record<string, V4Override> = {};\n const props: Record<string, ComponentsProps[keyof ComponentsProps]> = {};\n\n for (const name of Object.keys(components)) {\n const component = components[name as keyof typeof components];\n if (!component) {\n continue;\n }\n if ('styleOverrides' in component) {\n if (name === 'MuiCssBaseline') {\n overrides[name] = adaptV5CssBaselineOverride(\n theme,\n component.styleOverrides as ComponentsOverrides['MuiCssBaseline'],\n );\n } else {\n overrides[name] = extractV5StateOverrides(\n adaptV5Override(theme, component.styleOverrides as V5Override),\n );\n }\n }\n if ('defaultProps' in component) {\n props[name] = component.defaultProps;\n }\n }\n\n return { overrides, props };\n}\n"],"names":[],"mappings":"AAgCA,MAAM,
|
|
1
|
+
{"version":3,"file":"overrides.esm.js","sources":["../../src/unified/overrides.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Overrides } from '@material-ui/core/styles/overrides';\nimport type { ComponentsProps } from '@material-ui/core/styles/props';\nimport { ComponentsOverrides, Theme, ThemeOptions } from '@mui/material/styles';\nimport { CSSProperties } from 'react';\n\ntype V5Override = ComponentsOverrides[Exclude<\n keyof ComponentsOverrides,\n 'MuiCssBaseline'\n>];\ntype V4Override = Overrides[keyof Overrides];\ntype StaticStyleRules = Record<\n string,\n CSSProperties | Record<string, CSSProperties>\n>;\n\n// Utility function based on v5 `createSpacing`: https://github.com/mui/material-ui/blob/master/packages/mui-system/src/createTheme/createSpacing.ts#L42C3-L59C5\nconst __v5Spacing =\n (defaultSpacing: number) =>\n (...argsInput: ReadonlyArray<number | string>) => {\n const args = argsInput.length === 0 ? [1] : argsInput;\n const transform = (argument: string | number, themeSpacing: number) => {\n if (typeof argument === 'string') {\n return argument;\n }\n return themeSpacing * argument;\n };\n\n return args\n .map(argument => {\n const output = transform(argument, defaultSpacing);\n return typeof output === 'number' ? `${output}px` : output;\n })\n .join(' ');\n };\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5CssBaselineOverride(\n theme: Theme,\n overrides: ComponentsOverrides['MuiCssBaseline'],\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n\n const styles = typeof overrides === 'function' ? overrides(theme) : overrides;\n if (styles) {\n return { '@global': styles } as StaticStyleRules;\n }\n\n return undefined;\n}\n\n// Converts callback-based overrides to static styles, e.g.\n// { root: theme => ({ color: theme.color }) } -> { root: { color: 'red' } }\nfunction adaptV5Override(\n theme: Theme,\n overrides: V5Override,\n): StaticStyleRules | undefined {\n if (!overrides || typeof overrides === 'string') {\n return undefined;\n }\n if (typeof overrides === 'object') {\n const _theme = { ...theme };\n const defaultSpacing = theme.spacing(1);\n if (typeof defaultSpacing === 'number') {\n // Override potential v4 spacing method: https://mui.com/material-ui/migration/v5-style-changes/#%E2%9C%85-remove-px-suffix\n // `adaptV4Theme as reference: https://github.com/mui/material-ui/blob/v5.x/packages/mui-material/src/styles/adaptV4Theme.js#L54C41-L54C41\n _theme.spacing = __v5Spacing(defaultSpacing);\n }\n return Object.fromEntries(\n Object.entries(overrides).map(([className, style]) => {\n if (typeof style === 'function') {\n return [className, style({ theme: _theme })];\n }\n return [className, style];\n }),\n );\n }\n return overrides as StaticStyleRules;\n}\n\nconst stateStyleKeyPattern = /^&.Mui-([\\w-]+)$/;\n\n// Move state style overrides to the top level, e.g.\n// { root: { '&.Mui-active': { color: 'red' } } } -> { active: { color: 'red' } }\nfunction extractV5StateOverrides(\n overrides: StaticStyleRules | undefined,\n): StaticStyleRules | undefined {\n let output = overrides;\n if (!overrides || typeof overrides !== 'object') {\n return output;\n }\n for (const className of Object.keys(overrides)) {\n const styles = overrides[className];\n if (!styles || typeof styles !== 'object') {\n continue;\n }\n for (const _styleKey of Object.keys(styles)) {\n const styleKey = _styleKey as keyof typeof styles;\n const match = styleKey.match(stateStyleKeyPattern);\n if (match) {\n const [, state] = match;\n const { [styleKey]: stateStyles, ...restStyles } = styles;\n if (stateStyles) {\n output = {\n ...output,\n [className]: restStyles,\n [state]: stateStyles,\n };\n }\n }\n }\n }\n return output;\n}\n\n/**\n * Transform Material UI v5 component themes into a v4 theme props and overrides.\n *\n * @public\n */\nexport function transformV5ComponentThemesToV4(\n theme: Theme,\n components: ThemeOptions['components'] = {},\n): { overrides: Overrides; props: ComponentsProps } {\n const overrides: Record<string, V4Override> = {};\n const props: Record<string, ComponentsProps[keyof ComponentsProps]> = {};\n\n for (const name of Object.keys(components)) {\n const component = components[name as keyof typeof components];\n if (!component) {\n continue;\n }\n if ('styleOverrides' in component) {\n if (name === 'MuiCssBaseline') {\n overrides[name] = adaptV5CssBaselineOverride(\n theme,\n component.styleOverrides as ComponentsOverrides['MuiCssBaseline'],\n );\n } else {\n overrides[name] = extractV5StateOverrides(\n adaptV5Override(theme, component.styleOverrides as V5Override),\n );\n }\n }\n if ('defaultProps' in component) {\n props[name] = component.defaultProps;\n }\n }\n\n return { overrides, props };\n}\n"],"names":[],"mappings":"AAgCA,MAAM,WAAA,GACJ,CAAC,cAAA,KACD,CAAA,GAAI,SAAA,KAA8C;AAChD,EAAA,MAAM,OAAO,SAAA,CAAU,MAAA,KAAW,CAAA,GAAI,CAAC,CAAC,CAAA,GAAI,SAAA;AAC5C,EAAA,MAAM,SAAA,GAAY,CAAC,QAAA,EAA2B,YAAA,KAAyB;AACrE,IAAA,IAAI,OAAO,aAAa,QAAA,EAAU;AAChC,MAAA,OAAO,QAAA;AAAA,IACT;AACA,IAAA,OAAO,YAAA,GAAe,QAAA;AAAA,EACxB,CAAA;AAEA,EAAA,OAAO,IAAA,CACJ,IAAI,CAAA,QAAA,KAAY;AACf,IAAA,MAAM,MAAA,GAAS,SAAA,CAAU,QAAA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A,MAAW,IAAA,IAAQ,MAAA,CAAO,IAAA,CAAK,UAAU,CAAA,EAAG;AAC1C,IAAA,MAAM,SAAA,GAAY,WAAW,IAA+B,CAAA;AAC5D,IAAA,IAAI,CAAC,SAAA,EAAW;AACd,MAAA;AAAA,IACF;AACA,IAAA,IAAI,oBAAoB,SAAA,EAAW;AACjC,MAAA,IAAI,SAAS,gBAAA,EAAkB;AAC7B,QAAA,SAAA,CAAU,IAAI,CAAA,GAAI,0BAAA;AAAA,UAChB,KAAA;AAAA,UACA,SAAA,CAAU;AAAA,SACZ;AAAA,MACF,CAAA,MAAO;AACL,QAAA,SAAA,CAAU,IAAI,CAAA,GAAI,uBAAA;AAAA,UAChB,eAAA,CAAgB,KAAA,EAAO,SAAA,CAAU,cAA4B;AAAA,SAC/D;AAAA,MACF;AAAA,IACF;AACA,IAAA,IAAI,kBAAkB,SAAA,EAAW;AAC/B,MAAA,KAAA,CAAM,IAAI,IAAI,SAAA,CAAU,YAAA;AAAA,IAC1B;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,WAAW,KAAA,EAAM;AAC5B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.esm.js","sources":["../../src/unified/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 { palettes } from '../base';\nimport { createUnifiedTheme } from './UnifiedTheme';\n\n/**\n * Built-in Backstage Material UI themes.\n *\n * @public\n */\nexport const themes = {\n light: createUnifiedTheme({ palette: palettes.light }),\n dark: createUnifiedTheme({ palette: palettes.dark }),\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,
|
|
1
|
+
{"version":3,"file":"themes.esm.js","sources":["../../src/unified/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 { palettes } from '../base';\nimport { createUnifiedTheme } from './UnifiedTheme';\n\n/**\n * Built-in Backstage Material UI themes.\n *\n * @public\n */\nexport const themes = {\n light: createUnifiedTheme({ palette: palettes.light }),\n dark: createUnifiedTheme({ palette: palettes.dark }),\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,MAAA,GAAS;AAAA,EACpB,OAAO,kBAAA,CAAmB,EAAE,OAAA,EAAS,QAAA,CAAS,OAAO,CAAA;AAAA,EACrD,MAAM,kBAAA,CAAmB,EAAE,OAAA,EAAS,QAAA,CAAS,MAAM;AACrD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseTheme.esm.js","sources":["../../src/v4/baseTheme.ts"],"sourcesContent":["/*\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 { Theme, ThemeOptions } from '@material-ui/core/styles/createTheme';\nimport type { GridProps } from '@material-ui/core/Grid';\nimport type { SwitchProps } from '@material-ui/core/Switch';\n\nimport { Overrides } from '@material-ui/core/styles/overrides';\nimport { SimpleThemeOptions } from './types';\nimport { createBaseThemeOptions } from '../base';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from '../unified/overrides';\n\n/**\n * An old helper for creating Material UI v4 theme options.\n *\n * @public\n * @deprecated Use {@link createBaseThemeOptions} instead.\n */\nexport function createThemeOptions(options: SimpleThemeOptions): ThemeOptions {\n return {\n props: {\n MuiGrid: defaultComponentThemes?.MuiGrid\n ?.defaultProps as Partial<GridProps>,\n MuiSwitch: defaultComponentThemes?.MuiSwitch\n ?.defaultProps as Partial<SwitchProps>,\n },\n ...createBaseThemeOptions(options),\n };\n}\n\n/**\n * * An old helper for creating Material UI v4 theme overrides.\n *\n * @public\n * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.\n */\nexport function createThemeOverrides(theme: Theme): Overrides {\n return transformV5ComponentThemesToV4(\n // Safe but we have to make sure we don't use mui5 specific stuff in the default component themes\n theme as unknown as Mui5Theme,\n defaultComponentThemes,\n ).overrides;\n}\n\n/**\n * The old method to create a Backstage Material UI v4 theme using a palette.\n * The theme is created with the common Backstage options and component styles.\n *\n * @public\n * @deprecated Use {@link createUnifiedTheme} instead.\n */\nexport function createTheme(options: SimpleThemeOptions): Theme {\n const themeOptions = createThemeOptions(options);\n const baseTheme = createMuiTheme(themeOptions);\n const overrides = createThemeOverrides(baseTheme);\n const theme = { ...baseTheme, overrides };\n return theme;\n}\n"],"names":["createMuiTheme"],"mappings":";;;;;;AAkCO,SAAS,mBAAmB,
|
|
1
|
+
{"version":3,"file":"baseTheme.esm.js","sources":["../../src/v4/baseTheme.ts"],"sourcesContent":["/*\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 { Theme, ThemeOptions } from '@material-ui/core/styles/createTheme';\nimport type { GridProps } from '@material-ui/core/Grid';\nimport type { SwitchProps } from '@material-ui/core/Switch';\n\nimport { Overrides } from '@material-ui/core/styles/overrides';\nimport { SimpleThemeOptions } from './types';\nimport { createBaseThemeOptions } from '../base';\nimport { defaultComponentThemes } from '../v5';\nimport { transformV5ComponentThemesToV4 } from '../unified/overrides';\n\n/**\n * An old helper for creating Material UI v4 theme options.\n *\n * @public\n * @deprecated Use {@link createBaseThemeOptions} instead.\n */\nexport function createThemeOptions(options: SimpleThemeOptions): ThemeOptions {\n return {\n props: {\n MuiGrid: defaultComponentThemes?.MuiGrid\n ?.defaultProps as Partial<GridProps>,\n MuiSwitch: defaultComponentThemes?.MuiSwitch\n ?.defaultProps as Partial<SwitchProps>,\n },\n ...createBaseThemeOptions(options),\n };\n}\n\n/**\n * * An old helper for creating Material UI v4 theme overrides.\n *\n * @public\n * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.\n */\nexport function createThemeOverrides(theme: Theme): Overrides {\n return transformV5ComponentThemesToV4(\n // Safe but we have to make sure we don't use mui5 specific stuff in the default component themes\n theme as unknown as Mui5Theme,\n defaultComponentThemes,\n ).overrides;\n}\n\n/**\n * The old method to create a Backstage Material UI v4 theme using a palette.\n * The theme is created with the common Backstage options and component styles.\n *\n * @public\n * @deprecated Use {@link createUnifiedTheme} instead.\n */\nexport function createTheme(options: SimpleThemeOptions): Theme {\n const themeOptions = createThemeOptions(options);\n const baseTheme = createMuiTheme(themeOptions);\n const overrides = createThemeOverrides(baseTheme);\n const theme = { ...baseTheme, overrides };\n return theme;\n}\n"],"names":["createMuiTheme"],"mappings":";;;;;;AAkCO,SAAS,mBAAmB,OAAA,EAA2C;AAC5E,EAAA,OAAO;AAAA,IACL,KAAA,EAAO;AAAA,MACL,OAAA,EAAS,wBAAwB,OAAA,EAC7B,YAAA;AAAA,MACJ,SAAA,EAAW,wBAAwB,SAAA,EAC/B;AAAA,KACN;AAAA,IACA,GAAG,uBAAuB,OAAO;AAAA,GACnC;AACF;AAQO,SAAS,qBAAqB,KAAA,EAAyB;AAC5D,EAAA,OAAO,8BAAA;AAAA;AAAA,IAEL,KAAA;AAAA,IACA;AAAA,GACF,CAAE,SAAA;AACJ;AASO,SAAS,YAAY,OAAA,EAAoC;AAC9D,EAAA,MAAM,YAAA,GAAe,mBAAmB,OAAO,CAAA;AAC/C,EAAA,MAAM,SAAA,GAAYA,cAAe,YAAY,CAAA;AAC7C,EAAA,MAAM,SAAA,GAAY,qBAAqB,SAAS,CAAA;AAChD,EAAA,MAAM,KAAA,GAAQ,EAAE,GAAG,SAAA,EAAW,SAAA,EAAU;AACxC,EAAA,OAAO,KAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.esm.js","sources":["../../src/v4/themes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTheme } from './baseTheme';\nimport { palettes } from '../base';\n\n/**\n * The old Material UI v4 Backstage light theme.\n *\n * @public\n * @deprecated Use {@link themes.light} instead.\n */\nexport const lightTheme = createTheme({\n palette: palettes.light,\n});\n\n/**\n * The old Material UI v4 Backstage dark theme.\n *\n * @public\n * @deprecated Use {@link themes.dark} instead.\n */\nexport const darkTheme = createTheme({\n palette: palettes.dark,\n});\n"],"names":[],"mappings":";;;;AAyBO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"themes.esm.js","sources":["../../src/v4/themes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTheme } from './baseTheme';\nimport { palettes } from '../base';\n\n/**\n * The old Material UI v4 Backstage light theme.\n *\n * @public\n * @deprecated Use {@link themes.light} instead.\n */\nexport const lightTheme = createTheme({\n palette: palettes.light,\n});\n\n/**\n * The old Material UI v4 Backstage dark theme.\n *\n * @public\n * @deprecated Use {@link themes.dark} instead.\n */\nexport const darkTheme = createTheme({\n palette: palettes.dark,\n});\n"],"names":[],"mappings":";;;;AAyBO,MAAM,aAAa,WAAA,CAAY;AAAA,EACpC,SAAS,QAAA,CAAS;AACpB,CAAC;AAQM,MAAM,YAAY,WAAA,CAAY;AAAA,EACnC,SAAS,QAAA,CAAS;AACpB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultComponentThemes.esm.js","sources":["../../src/v5/defaultComponentThemes.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 { 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 '&::-webkit-scrollbar, & *::-webkit-scrollbar': {\n backgroundColor: theme.palette.background.paper,\n width: '1em',\n },\n '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {\n borderRadius: 8,\n backgroundColor: theme.palette.textVerySubtle,\n border: `3px solid ${theme.palette.background.paper}`,\n },\n '&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active':\n {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.textVerySubtle, 0.2)\n : darken(theme.palette.textVerySubtle, 0.2),\n },\n '&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover':\n {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.textVerySubtle, 0.2)\n : darken(theme.palette.textVerySubtle, 0.2),\n },\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 // Targets the arrow when the label is focused\n '&:focus svg': {\n opacity: 0.5,\n },\n // Bold font for highlighting selected column\n '&.Mui-active': {\n fontWeight: 'bold',\n color: 'inherit',\n },\n },\n },\n },\n MuiListItemText: {\n styleOverrides: {\n dense: {\n // Default dense list items to adding ellipsis for really long str...\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n text: {\n // Text buttons have less padding by default, but we want to keep the original padding\n padding: undefined,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: ({ theme }) => ({\n // By default there's no margin, but it's usually wanted, so we add some trailing margin\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n }),\n label: ({ theme }) => ({\n lineHeight: theme.spacing(2.5),\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.spacing(1.75),\n }),\n labelSmall: ({ theme }) => ({\n fontSize: theme.spacing(1.5),\n }),\n deleteIcon: ({ theme }) => ({\n width: theme.spacing(3),\n height: theme.spacing(3),\n margin: theme.spacing(0, 0.75, 0, -0.75),\n }),\n deleteIconSmall: ({ theme }) => ({\n width: theme.spacing(2),\n height: theme.spacing(2),\n margin: theme.spacing(0, 0.5, 0, -0.5),\n }),\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n display: 'flex',\n flexDirection: 'column',\n },\n },\n },\n MuiCardHeader: {\n styleOverrides: {\n root: {\n // Reduce padding between header and content\n paddingBottom: 0,\n },\n },\n },\n MuiCardContent: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n flexGrow: 1,\n '&:last-child': {\n paddingBottom: undefined,\n },\n },\n },\n },\n MuiCardActions: {\n styleOverrides: {\n root: {\n // We default to putting the card actions at the end\n justifyContent: 'flex-end',\n },\n },\n },\n MuiLink: {\n defaultProps: {\n underline: 'hover',\n },\n },\n MuiPaper: {\n styleOverrides: { root: { backgroundImage: 'unset' } },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: ({ theme }) => ({\n // Fixes a bug with MUI 4 that's fixed in MUI 5\n '&:focus': {\n backgroundColor: theme.palette.action.focus,\n },\n }),\n },\n },\n};\n"],"names":[],"mappings":";;AAuBO,MAAM,sBAAqD,GAAA;AAAA,EAChE,c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,SAAW,EAAA;AAAA;AACb,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,gBAAgB,EAAE,IAAA,EAAM,EAAE,eAAA,EAAiB,SAAU;AAAA,GACvD;AAAA,EACA,WAAa,EAAA;AAAA,IACX,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA,CAAC,EAAE,KAAA,EAAa,MAAA;AAAA;AAAA,QAEpB,SAAW,EAAA;AAAA,UACT,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA;AACxC,OACF;AAAA;AACF;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"defaultComponentThemes.esm.js","sources":["../../src/v5/defaultComponentThemes.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 { 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 '&::-webkit-scrollbar, & *::-webkit-scrollbar': {\n backgroundColor: theme.palette.background.paper,\n width: '1em',\n },\n '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {\n borderRadius: 8,\n backgroundColor: theme.palette.textVerySubtle,\n border: `3px solid ${theme.palette.background.paper}`,\n },\n '&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active':\n {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.textVerySubtle, 0.2)\n : darken(theme.palette.textVerySubtle, 0.2),\n },\n '&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover':\n {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.textVerySubtle, 0.2)\n : darken(theme.palette.textVerySubtle, 0.2),\n },\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 // Targets the arrow when the label is focused\n '&:focus svg': {\n opacity: 0.5,\n },\n // Bold font for highlighting selected column\n '&.Mui-active': {\n fontWeight: 'bold',\n color: 'inherit',\n },\n },\n },\n },\n MuiListItemText: {\n styleOverrides: {\n dense: {\n // Default dense list items to adding ellipsis for really long str...\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n text: {\n // Text buttons have less padding by default, but we want to keep the original padding\n padding: undefined,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: ({ theme }) => ({\n // By default there's no margin, but it's usually wanted, so we add some trailing margin\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n }),\n label: ({ theme }) => ({\n lineHeight: theme.spacing(2.5),\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.spacing(1.75),\n }),\n labelSmall: ({ theme }) => ({\n fontSize: theme.spacing(1.5),\n }),\n deleteIcon: ({ theme }) => ({\n width: theme.spacing(3),\n height: theme.spacing(3),\n margin: theme.spacing(0, 0.75, 0, -0.75),\n }),\n deleteIconSmall: ({ theme }) => ({\n width: theme.spacing(2),\n height: theme.spacing(2),\n margin: theme.spacing(0, 0.5, 0, -0.5),\n }),\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n display: 'flex',\n flexDirection: 'column',\n },\n },\n },\n MuiCardHeader: {\n styleOverrides: {\n root: {\n // Reduce padding between header and content\n paddingBottom: 0,\n },\n },\n },\n MuiCardContent: {\n styleOverrides: {\n root: {\n // When cards have a forced size, such as when they are arranged in a\n // CSS grid, the content needs to flex such that the actions (buttons\n // etc) end up at the bottom of the card instead of just below the body\n // contents.\n flexGrow: 1,\n '&:last-child': {\n paddingBottom: undefined,\n },\n },\n },\n },\n MuiCardActions: {\n styleOverrides: {\n root: {\n // We default to putting the card actions at the end\n justifyContent: 'flex-end',\n },\n },\n },\n MuiLink: {\n defaultProps: {\n underline: 'hover',\n },\n },\n MuiPaper: {\n styleOverrides: { root: { backgroundImage: 'unset' } },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: ({ theme }) => ({\n // Fixes a bug with MUI 4 that's fixed in MUI 5\n '&:focus': {\n backgroundColor: theme.palette.action.focus,\n },\n }),\n },\n },\n};\n"],"names":[],"mappings":";;AAuBO,MAAM,sBAAA,GAAqD;AAAA,EAChE,cAAA,EAAgB;AAAA,IACd,gBAAgB,CAAA,KAAA,MAAU;AAAA,MACxB,IAAA,EAAM;AAAA,QACJ,MAAA,EAAQ,MAAA;AAAA,QACR,UAAA,EAAY,MAAM,UAAA,CAAW;AAAA,OAC/B;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,MAAA,EAAQ,MAAA;AAAA,QACR,UAAA,EAAY,MAAM,UAAA,CAAW,UAAA;AAAA,QAC7B,mBAAA,EAAqB,MAAA;AAAA,QACrB,QAAA,EAAU,UAAA;AAAA,QACV,UAAA,EAAY,IAAA;AAAA,QACZ,8CAAA,EAAgD;AAAA,UAC9C,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,UAAA,CAAW,KAAA;AAAA,UAC1C,KAAA,EAAO;AAAA,SACT;AAAA,QACA,0DAAA,EAA4D;AAAA,UAC1D,YAAA,EAAc,CAAA;AAAA,UACd,eAAA,EAAiB,MAAM,OAAA,CAAQ,cAAA;AAAA,UAC/B,MAAA,E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AAAA;AAAA;AAAA;AAAA,QAKJ,OAAA,EAAS,MAAA;AAAA,QACT,aAAA,EAAe;AAAA;AACjB;AACF,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM;AAAA;AAAA,QAEJ,aAAA,EAAe;AAAA;AACjB;AACF,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM;AAAA;AAAA;AAAA;AAAA;AAAA,QAKJ,QAAA,EAAU,CAAA;AAAA,QACV,cAAA,EAAgB;AAAA,UACd,aAAA,EAAe;AAAA;AACjB;AACF;AACF,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM;AAAA;AAAA,QAEJ,cAAA,EAAgB;AAAA;AAClB;AACF,GACF;AAAA,EACA,OAAA,EAAS;AAAA,IACP,YAAA,EAAc;AAAA,MACZ,SAAA,EAAW;AAAA;AACb,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,gBAAgB,EAAE,IAAA,EAAM,EAAE,eAAA,EAAiB,SAAQ;AAAE,GACvD;AAAA,EACA,WAAA,EAAa;AAAA,IACX,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,CAAC,EAAE,KAAA,EAAM,MAAO;AAAA;AAAA,QAEpB,SAAA,EAAW;AAAA,UACT,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO;AAAA;AACxC,OACF;AAAA;AACF;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/theme",
|
|
3
|
-
"version": "0.6.8
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "material-ui theme for use with Backstage.",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@mui/material": "^5.12.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@backstage/cli": "0.
|
|
44
|
+
"@backstage/cli": "^0.34.0",
|
|
45
45
|
"@mui/styles": "^5.14.18",
|
|
46
46
|
"@testing-library/jest-dom": "^6.0.0",
|
|
47
47
|
"@testing-library/react": "^16.0.0",
|