@red-hat-developer-hub/backstage-plugin-theme 1.0.1 → 1.1.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 +18 -0
- package/dist/assets/bui/component-overrides.css.esm.js +5 -0
- package/dist/assets/bui/component-overrides.css.esm.js.map +1 -0
- package/dist/assets/bui/tokens.css.esm.js +5 -0
- package/dist/assets/bui/tokens.css.esm.js.map +1 -0
- package/dist/components/ThemeProvider.esm.js +42 -12
- package/dist/components/ThemeProvider.esm.js.map +1 -1
- package/dist/index.esm.js +4 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.esm.js +1 -0
- package/dist/legacy.esm.js.map +1 -1
- package/dist/lightTheme.esm.js +9 -1
- package/dist/lightTheme.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
- package/dist/themes.esm.js +37 -25
- package/dist/themes.esm.js.map +1 -1
- package/dist/utils/createComponents.esm.js +52 -0
- package/dist/utils/createComponents.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-theme
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d0fdac4: Add initial support for Backstage UI
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 889a5d0: Fix light-theme WCAG contrast and demo a11y issues so the theme e2e axe suite can enforce violations.
|
|
12
|
+
- 1bb88d7: Make NFS BUI catalog entity `<main>` a flex column so Topology and Scorecard fill the content well instead of leaving a gap below short tab content (RHDHBUGS-3543).
|
|
13
|
+
- a1601a9: Added `createSharedThemeProvider` internal utility that creates a single shared Provider for multiple themes, preventing full application remount when switching themes. All built-in RHDH themes now share one Provider.
|
|
14
|
+
|
|
15
|
+
## 1.0.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 0f401be: Fixed empty space and background mismatch on short NFS pages: BackstageSidebarPage fills the viewport and becomes a column flex container so BUI Containers can grow, and content wells use mainSectionBackgroundColor to match the article/content area
|
|
20
|
+
|
|
3
21
|
## 1.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "body[data-theme-name='light'][data-theme-mode='light'],\nbody[data-theme-name='dark'][data-theme-mode='dark'],\nbody[data-theme-name='light-customized'][data-theme-mode='light'],\nbody[data-theme-name='dark-customized'][data-theme-mode='dark'] {\n /*\n * Override some Backstage UI component styles to match the PatternFly design.\n */\n background-color: var(--bui-redhat-theme-page-inset-bg);\n\n /*\n * Align Accordion to https://www.patternfly.org/components/accordion\n */\n .bui-AccordionGroup {\n gap: var(--bui-space-1);\n }\n .bui-Accordion {\n padding: 0;\n border-radius: var(--bui-radius-2);\n }\n .bui-AccordionTriggerButton {\n border-radius: var(--bui-radius-2);\n padding: var(--bui-space-2) var(--bui-space-4);\n transition: background-color 100ms ease;\n &:hover,\n &:focus {\n background-color: var(--bui-bg-neutral-2);\n }\n }\n .bui-AccordionTriggerTitle {\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n }\n .bui-Accordion[data-expanded='true'] .bui-AccordionTriggerTitle {\n font-weight: var(--bui-font-weight-bold);\n }\n .bui-Accordion[data-expanded='true'] > .bui-AccordionPanel {\n margin: 0 var(--bui-space-4) var(--bui-space-4);\n padding: var(--bui-space-2);\n border-radius: var(--bui-radius-2);\n background-color: var(--bui-redhat-theme-bg-primary);\n }\n\n /*\n * Align Alert to https://www.patternfly.org/components/alert\n */\n .bui-Alert {\n --alert-border-color: var(--bui-border-1);\n\n background-color: var(--bui-bg-neutral-1);\n color: var(--bui-fg-primary);\n border: 2px solid var(--alert-border-color);\n border-radius: var(--bui-radius-5);\n box-shadow: var(--bui-shadow);\n }\n\n .bui-Alert[data-status='info'] {\n --alert-border-color: var(--bui-border-info);\n }\n .bui-Alert[data-status='success'] {\n --alert-border-color: var(--bui-border-success);\n }\n .bui-Alert[data-status='warning'] {\n --alert-border-color: var(--bui-border-warning);\n }\n .bui-Alert[data-status='danger'] {\n --alert-border-color: var(--bui-border-danger);\n }\n .bui-AlertIcon {\n color: var(--alert-border-color);\n }\n\n /*\n * Align Button to https://www.patternfly.org/components/button/\n */\n .bui-Button {\n background: var(--bg)\n radial-gradient(\n circle,\n transparent 1%,\n color-mix(in srgb, currentcolor 15%, transparent) 2%\n )\n center/15000% 15000%;\n border-radius: var(--bui-radius-full);\n font-weight: var(--bui-font-weight-regular);\n padding: 8px 24px;\n transition-duration: var(\n --pf-t--global--motion--duration--fade--default,\n 200ms\n );\n transition-timing-function: var(\n --pf-t--global--motion--timing-function--accelerate,\n cubic-bezier(0.4, 0, 0.7, 0.2)\n );\n transition-property: color, background, border-color;\n }\n .bui-Button:active {\n background-size: 100% 100%;\n transition-duration: 0s;\n }\n\n .bui-Button[data-variant='primary'] {\n --bg: var(--bui-bg-solid);\n --bg-hover: var(--bui-bg-solid-hover);\n --bg-active: var(--bui-bg-solid-pressed);\n --fg: var(--bui-fg-solid);\n }\n .bui-Button[data-variant='secondary'] {\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: var(--bui-bg-solid);\n border: 1px solid var(--bui-bg-solid);\n &:hover {\n border-color: var(--bui-bg-solid-hover);\n outline: 1px solid var(--bui-bg-solid-hover);\n }\n }\n .bui-Button[data-variant='tertiary'] {\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: var(--bui-bg-solid);\n border: 1px solid var(--pf-v6-c-button--m-tertiary--BorderColor, #c7c7c7);\n &:hover {\n border-color: var(--pf-v6-c-button--hover--BorderColor, #c7c7c7);\n outline: 1px solid var(--bui-bg-solid-hover);\n }\n }\n\n .bui-Button[data-variant='primary'][data-destructive='true'] {\n --bg: var(--pf-v6-c-button--m-danger--BackgroundColor, #f0561d);\n }\n .bui-Button[data-variant='secondary'][data-destructive='true'] {\n --fg: var(--pf-v6-c-button--m-danger--Color, #f89b78);\n border: 1px solid\n var(--pf-v6-c-button--m-secondary--m-danger--BorderColor, #f0561d);\n }\n .bui-Button[data-variant='tertiary'][data-destructive='true'] {\n --fg: var(--pf-v6-c-button--m-danger--Color, #f89b78);\n }\n\n .bui-Button[data-variant='primary'][data-disabled='true'],\n .bui-Button[data-variant='secondary'][data-disabled='true'],\n .bui-Button[data-variant='tertiary'][data-disabled='true'] {\n --bg: var(--bui-bg-solid-disabled);\n --bg-hover: var(--bui-bg-solid-disabled);\n --bg-active: var(--bui-bg-solid-disabled);\n --fg: var(--bui-fg-solid-disabled);\n border: 1px solid var(--bg);\n &:hover {\n border-color: var(--bg);\n outline: none;\n }\n }\n\n /*\n * Align ButtonLink to https://www.patternfly.org/components/button/\n *\n * By default they look in Backstage UI more like buttons but in PatternFly they look more like links.\n */\n .bui-ButtonLink,\n .bui-ButtonLink[data-variant='primary'] {\n --bg: transparent;\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: transparent;\n --fg: var(--pf-t--global--icon--color--brand--default, #0066cc);\n\n font-weight: var(--bui-font-weight-regular);\n }\n .bui-ButtonLink[data-variant='primary'] {\n font-weight: var(--bui-font-weight-bold);\n }\n .bui-ButtonLink[data-disabled='true'] {\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: var(--bui-fg-solid-disabled);\n }\n\n /*\n * Align Card to https://www.patternfly.org/components/card\n */\n .bui-Card {\n border: 1px solid var(--pf-t--global--border--color--default, #c7c7c7);\n border-radius: var(\n --bui-radius-5\n ); /* pf-t--global--border--radius--medium is use for moderately rounded corners, like cards. */\n padding: var(--bui-space-4);\n }\n /* TODO: improve scroll gradient in Card.module.css. For now, we have disabled that gradient shadow. */\n /* https://www.bram.us/2023/09/16/solved-by-css-scroll-driven-animations-detect-if-an-element-can-scroll-or-not/ */\n .bui-Card:has(.bui-CardHeader) .bui-CardBody {\n &::before {\n background: none;\n }\n }\n .bui-Card:has(.bui-CardFooter) .bui-CardBody {\n &::after {\n background: none;\n }\n }\n .bui-CardBody::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 7px;\n }\n .bui-CardBody::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n\n /*\n * Disable max-width until common pages are aligned.\n * max-width might be a good idea but the catalog table and buttons should be still aligned.\n */\n .bui-Container {\n max-width: none;\n }\n\n /*\n * Align the Dialog with PatternFly Modal https://www.patternfly.org/components/modal\n */\n .bui-Dialog {\n --dialog-border-radius: var(--bui-radius-6);\n }\n .bui-DialogHeader {\n padding-inline-start: var(--bui-space-5);\n padding-block-start: var(--bui-space-4);\n border-bottom: none;\n }\n .bui-DialogHeader > .bui-Button[slot='close'] {\n border: none;\n border-radius: var(--bui-radius-3);\n color: var(--bui-black);\n background-color: transparent;\n padding: var(--bui-space-2);\n }\n .bui-DialogHeader > .bui-Button[slot='close']:hover {\n background-color: var(--bui-bg-neutral-1-hover);\n border: none;\n outline: none;\n }\n .bui-DialogHeader > .bui-Button[slot='close'] > span > svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n .bui-DialogBody {\n padding: var(--bui-space-5);\n }\n .bui-DialogFooter {\n padding-inline-start: var(--bui-space-5);\n padding-block-end: var(--bui-space-5);\n border-top: none;\n /* This is probably a bit \"dangerous\" ... swap buttons to the left and also change their order. */\n justify-content: start;\n flex-direction: row-reverse;\n }\n\n /*\n * Align Header nav and Tabs to https://www.patternfly.org/components/tabs\n */\n .bui-HeaderNavList,\n .bui-TabList {\n border-bottom: 1px solid var(--bui-border-1);\n }\n .bui-HeaderNavItem,\n .bui-Tab {\n height: auto;\n margin: var(--bui-space-1);\n padding: var(--bui-space-3) var(--bui-space-2);\n }\n .bui-Tab[data-disabled] {\n color: var(--bui-fg-disabled);\n cursor: not-allowed;\n }\n .bui-HeaderNavActive,\n .bui-TabActive {\n bottom: 1px;\n height: 3px;\n box-shadow:\n -0.5em 0 0 0 var(--bui-redhat-theme-brand-accent),\n 0.5em 0 0 0 var(--bui-redhat-theme-brand-accent);\n --bui-fg-primary: var(--bui-redhat-theme-brand-accent);\n }\n\n /*\n * Aligned Tags to PatternFly Label https://www.patternfly.org/components/label\n */\n .bui-Tag {\n border-radius: var(--bui-radius-full);\n }\n\n /*\n * Aligned ToggleButton to PatternFly ToggleGroup https://www.patternfly.org/components/toggle-group\n */\n .bui-ToggleButton {\n border: 1px solid var(--bui-border-2);\n background-color: var(\n --pf-t--global--background--color--control--default,\n var(--bui-bg-neutral-1)\n );\n color: var(--bui-fg-primary);\n font-weight: var(--bui-font-weight-regular);\n height: auto;\n padding: var(--bui-space-2) var(--bui-space-4);\n }\n .bui-ToggleButton:not([data-selected])[data-hovered] {\n background-color: var(--bui-redhat-theme-brand-subtle);\n border-color: var(--bui-redhat-theme-brand-subtle-border);\n }\n .bui-ToggleButton[data-selected],\n .bui-ToggleButton[data-pressed] {\n background-color: var(--bui-redhat-theme-brand-subtle);\n color: var(--bui-fg-primary);\n border-color: var(--bui-redhat-theme-brand-subtle-border);\n box-shadow: inset 0 0 0 1px var(--bui-redhat-theme-brand-subtle-border);\n }\n .bui-ToggleButton[data-disabled] {\n background-color: var(--bui-bg-solid-disabled);\n color: var(--bui-fg-solid-disabled);\n border-color: var(--bui-border-2);\n box-shadow: none;\n }\n\n /*\n * Use heading font family for title-level text\n * PatternFly uses \"Red Hat Display\" for headings and \"Red Hat Text\" for body.\n */\n .bui-Text[data-variant='title-large'],\n .bui-Text[data-variant='title-medium'],\n .bui-Text[data-variant='title-small'],\n .bui-Text[data-variant='title-x-small'] {\n font-family: var(--bui-redhat-theme-font-heading);\n }\n .bui-DialogHeaderTitle {\n font-family: var(--bui-redhat-theme-font-heading);\n font-size: var(--bui-font-size-5);\n }\n .bui-HeaderTitle {\n font-family: var(--bui-redhat-theme-font-heading);\n }\n /*\n * Align PluginHeader to PF component-groups PageHeader\n * https://www.patternfly.org/extensions/component-groups/page-header\n */\n .bui-PluginHeader {\n padding-block: var(--bui-space-4) 0;\n padding-inline: var(--bui-space-6);\n }\n .bui-PluginHeaderToolbar {\n border-bottom: none;\n padding-bottom: var(--bui-space-4);\n }\n .bui-PluginHeaderToolbarName {\n font-family: var(--bui-redhat-theme-font-heading);\n font-size: var(--bui-font-size-6);\n font-weight: var(--bui-font-weight-bold);\n line-height: 1.3;\n & .bui-Link,\n & .bui-Text {\n font-size: inherit;\n font-weight: inherit;\n font-family: inherit;\n }\n }\n\n /*\n * Align Avatar to https://www.patternfly.org/components/avatar\n */\n .bui-AvatarFallback {\n font-weight: var(--bui-font-weight-bold);\n }\n\n /*\n * Align Badge to https://www.patternfly.org/components/badge\n */\n .bui-Badge {\n border-radius: var(--bui-radius-full);\n font-weight: var(--bui-font-weight-bold);\n min-width: 2rem;\n }\n\n /*\n * Align form controls to https://www.patternfly.org/components/forms/form-control\n */\n .bui-Input,\n .bui-PasswordFieldInputWrapper,\n .bui-SearchFieldInputWrapper,\n .bui-SearchAutocomplete,\n .bui-ComboboxInput,\n .bui-DatePickerGroup {\n border: 1px solid var(--bui-border-2);\n border-radius: var(--bui-radius-2);\n background-color: var(\n --pf-t--global--background--color--control--default,\n var(--bui-bg-neutral-1)\n );\n }\n .bui-Input,\n .bui-PasswordFieldInput {\n padding-block: var(--bui-space-2);\n padding-inline-end: var(--bui-space-4);\n }\n .bui-Input:not([data-icon]),\n .bui-PasswordFieldInput:not([data-icon]) {\n padding-inline-start: var(--bui-space-4);\n }\n .bui-Input[data-focused],\n .bui-PasswordFieldInput[data-focused] {\n box-shadow: none;\n outline: 2px solid var(--bui-bg-solid);\n outline-offset: -6px;\n }\n .bui-PasswordFieldInputWrapper:has([data-focused]),\n .bui-SearchFieldInputWrapper:has([data-focused]),\n .bui-SearchAutocomplete:has([data-focused]),\n .bui-ComboboxInput[data-focused],\n .bui-DatePickerGroup[data-focused] {\n border-color: var(--bui-bg-solid);\n box-shadow: none;\n }\n .bui-SearchFieldInputWrapper:has([data-focused]),\n .bui-SearchAutocomplete:has([data-focused]),\n .bui-ComboboxInput[data-focused],\n .bui-DatePickerGroup[data-focused] {\n outline: 2px solid var(--bui-bg-solid);\n outline-offset: -6px;\n }\n .bui-Input[data-invalid],\n .bui-PasswordFieldInputWrapper:has([data-invalid]),\n .bui-SearchFieldInputWrapper:has([data-invalid]),\n .bui-SearchAutocomplete:has([data-invalid]),\n .bui-ComboboxInput[data-invalid] {\n border-color: var(--bui-border-danger);\n }\n .bui-Input[readonly],\n .bui-PasswordFieldInput[readonly] {\n background-color: var(--bui-redhat-theme-readonly-bg);\n border-color: var(--bui-redhat-theme-readonly-border);\n }\n .bui-Input[data-disabled],\n .bui-PasswordFieldInputWrapper:has([data-disabled]),\n .bui-SearchFieldInputWrapper:has([data-disabled]),\n .bui-SearchAutocomplete:has([data-disabled]),\n .bui-ComboboxInput[data-disabled],\n .bui-SelectTrigger[disabled] {\n background-color: var(--bui-bg-solid-disabled);\n color: var(--bui-fg-solid-disabled);\n & * {\n color: inherit;\n }\n }\n\n /*\n * Align Select and Combobox to PatternFly MenuToggle\n * https://www.patternfly.org/components/menus/menu-toggle\n */\n .bui-SelectTrigger,\n .bui-ComboboxInput {\n transition-property: color, background-color, border-width, border-color;\n transition-duration: 100ms;\n transition-timing-function: ease;\n }\n .bui-SelectTrigger {\n border: 1px solid var(--bui-border-2);\n border-radius: var(--bui-radius-2);\n background-color: var(--bui-redhat-theme-bg-floating);\n padding: var(--bui-space-2) var(--bui-space-4);\n }\n .bui-SelectPopover,\n .bui-ComboboxPopover {\n border-radius: var(--bui-radius-3);\n &,\n & .bui-Popover,\n & .bui-PopoverContent {\n background: var(--bui-redhat-theme-bg-floating);\n }\n & .bui-Popover {\n margin: 0;\n border: 1px solid var(--bui-border-1);\n }\n & .bui-PopoverContent {\n padding: var(--bui-space-1);\n }\n }\n .bui-SelectItem:has(> .bui-SelectItemIndicator),\n .bui-ComboboxItem:has(> .bui-ComboboxItemIndicator) {\n grid-template-areas: 'text icon';\n grid-template-columns: 1fr 1rem;\n }\n .bui-SelectItem {\n padding: var(--bui-space-2) var(--bui-space-4);\n border-radius: var(--bui-radius-2);\n }\n .bui-SelectItem[data-focused] {\n background-color: var(--bui-bg-neutral-2);\n }\n .bui-SelectTrigger:hover,\n .bui-ComboboxInput:hover {\n border-color: var(--bui-bg-solid);\n }\n .bui-Select[data-focused] .bui-SelectTrigger {\n border-color: var(--bui-bg-solid);\n border-width: 2px;\n padding: calc(var(--bui-space-2) - 1px) calc(var(--bui-space-4) - 1px);\n }\n .bui-ComboboxInput[data-focused] {\n border-width: 2px;\n }\n\n /*\n * Align Table to https://www.patternfly.org/components/table\n */\n .bui-TableHead {\n padding: var(--bui-space-4);\n font-size: var(--bui-font-size-2);\n font-weight: var(--bui-font-weight-bold);\n }\n .bui-TableCell {\n padding: var(--bui-space-4);\n }\n .bui-TableHeader {\n border-bottom: 1px solid var(--bui-border-1);\n }\n .bui-TableRow {\n border-bottom: 1px solid var(--bui-border-1);\n }\n\n /*\n * Align Link to https://www.patternfly.org/components/content (links)\n */\n .bui-Link {\n text-decoration-style: dashed;\n }\n\n /*\n * Align Menu to https://www.patternfly.org/components/menu\n */\n .bui-MenuPopover {\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-1);\n background-color: var(--bui-redhat-theme-bg-floating);\n }\n .bui-MenuItem {\n border-radius: var(--bui-radius-2);\n }\n .bui-MenuSectionHeader {\n text-transform: none;\n letter-spacing: normal;\n font-weight: var(--bui-font-weight-bold);\n }\n\n /*\n * Align Popover to https://www.patternfly.org/components/popover\n */\n .bui-Popover {\n --popover-border-radius: var(--bui-radius-5);\n }\n\n /*\n * Align Radio to https://www.patternfly.org/components/radio\n */\n .bui-Radio {\n font-size: var(--bui-font-size-3);\n }\n\n /*\n * Align Skeleton to https://www.patternfly.org/components/skeleton\n * PatternFly uses a shimmer gradient animation instead of opacity pulse.\n */\n @keyframes bui-shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n }\n .bui-Skeleton {\n animation: bui-shimmer 3s linear infinite 0.5s;\n background-image: linear-gradient(\n 90deg,\n var(--bui-bg-neutral-2) 0%,\n var(--bui-bg-neutral-3) 50%,\n var(--bui-bg-neutral-2) 100%\n );\n background-size: 200% 100%;\n }\n @media (prefers-reduced-motion: reduce) {\n .bui-Skeleton {\n animation: none;\n }\n }\n\n /*\n * Align Slider to https://www.patternfly.org/components/slider\n */\n .bui-SliderThumb {\n width: 16px;\n height: 16px;\n }\n .bui-SliderTrack {\n border-radius: var(--bui-radius-1);\n }\n\n /*\n * Align Tooltip to https://www.patternfly.org/components/tooltip\n * PatternFly tooltips use inverse (dark) background with light text.\n */\n .bui-Tooltip {\n --tooltip-border-radius: var(--bui-radius-2);\n background-color: var(--bui-black);\n border: none;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);\n max-width: 300px;\n font-size: var(--bui-font-size-2);\n text-align: center;\n }\n .bui-TooltipContent {\n color: var(--bui-white);\n }\n .bui-TooltipArrow svg {\n use:nth-of-type(1) {\n fill: var(--bui-black);\n }\n use:nth-of-type(2) {\n fill: var(--bui-black);\n }\n path {\n fill: var(--bui-black);\n }\n }\n\n /*\n * Align Switch to https://www.patternfly.org/components/switch\n */\n .bui-SwitchIndicator {\n --switch-indicator-bg: var(\n --pf-t--global--background--color--control--default,\n var(--bui-bg-neutral-1)\n );\n width: calc(var(--bui-font-size-2) * 2.5);\n height: calc(var(--bui-font-size-2) * 1.5);\n border: 1px solid var(--bui-border-2);\n border-radius: calc(var(--bui-font-size-2) * 1.5);\n &:before {\n width: calc(var(--bui-font-size-2) - 2px);\n height: calc(var(--bui-font-size-2) - 2px);\n margin: calc(var(--bui-font-size-2) * 0.2 + 1px);\n background: var(--bui-fg-secondary);\n }\n }\n .bui-Switch[data-selected] .bui-SwitchIndicator {\n border-color: transparent;\n &:before {\n background: var(--bui-accent-fg);\n transform: translateX(calc(100% + 2px));\n }\n }\n .bui-Switch[data-disabled] .bui-SwitchIndicator {\n border-color: transparent;\n background: var(--bui-bg-solid-disabled);\n &:before {\n background: var(--bui-fg-solid-disabled);\n }\n }\n\n /*\n * BUI elements inside BackstageSidebarPage should use the page background\n * so they blend with the content area rather than the shell background.\n */\n [class*='BackstageSidebarPage-root']:has(> nav):not(\n :has([class*='BackstagePage-root-'])\n ) {\n background-color: var(--bui-redhat-theme-bg-primary);\n\n /* Right edge page inset corners */\n max-width: 100%;\n box-sizing: border-box;\n height: 100vh;\n border-width: var(--bui-redhat-theme-page-inset)\n var(--bui-redhat-theme-page-inset) var(--bui-redhat-theme-page-inset) 0;\n border-style: solid;\n border-color: var(--bui-redhat-theme-page-inset-bg);\n clip-path: xywh(\n 0 var(--bui-redhat-theme-page-inset)\n calc(100% - var(--bui-redhat-theme-page-inset))\n calc(100% - 2 * var(--bui-redhat-theme-page-inset)) round 0 1rem 1rem 0\n );\n\n /*\n * A terrible hack for the left edge page inset corners\n * Very difficult to get \"inside border radius\", so instead we use two overlapping\n * borders, one with border radius.\n *\n * To prevent content overlap a clip-path is used.\n */\n &:before,\n &:after {\n content: '';\n display: absolute;\n width: 100%;\n height: calc(100% - var(--bui-redhat-theme-page-inset) * 2);\n top: 0;\n margin: calc(var(--bui-redhat-theme-page-inset)) 0;\n position: fixed;\n clip-path: polygon(\n 0% 100%,\n 0% 1em,\n 1em 0%,\n 0% 0%,\n 0% calc(100% - 1em),\n 1em 100%\n );\n }\n\n &:before {\n border-left: var(--bui-redhat-theme-page-inset) solid\n var(--bui-redhat-theme-page-inset-bg);\n z-index: 0;\n }\n\n &:after {\n border-left: var(--bui-redhat-theme-page-inset) solid\n var(--bui-redhat-theme-bg-primary);\n border-radius: 1em;\n z-index: 1;\n }\n }\n}\n\nbody[data-theme-name='light'][data-theme-mode='light'],\nbody[data-theme-name='light-customized'][data-theme-mode='light'] {\n .bui-DialogContent {\n background-color: var(--pf-v6-c-modal-box--BackgroundColor, #ffffff);\n }\n .bui-DialogHeader > .bui-Button[slot='close'] {\n color: var(--bui-black);\n }\n}\n\nbody[data-theme-name='dark'][data-theme-mode='dark'],\nbody[data-theme-name='dark-customized'][data-theme-mode='dark'] {\n .bui-DialogContent {\n background-color: var(--pf-v6-c-modal-box--BackgroundColor, #383838);\n }\n .bui-DialogHeader > .bui-Button[slot='close'] {\n color: var(--bui-white);\n }\n}\n";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
//# sourceMappingURL=component-overrides.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-overrides.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "body[data-theme-name='light'][data-theme-mode='light'],\nbody[data-theme-name='dark'][data-theme-mode='dark'],\nbody[data-theme-name='light-customized'][data-theme-mode='light'],\nbody[data-theme-name='dark-customized'][data-theme-mode='dark'] {\n /*\n * Override BUI tokens with PatternFly tokens. In this storybook and in ui-docs the fallback is always used.\n * These tokens are used here for documentation purposes to show how the BUI tokens map to PatternFly tokens.\n */\n\n /* Font families */\n --bui-font-regular: var(\n --pf-t--global--font--family--body,\n 'Red Hat Text',\n 'RedHatText',\n 'Noto Sans Arabic',\n 'Noto Sans Hebrew',\n 'Noto Sans JP',\n 'Noto Sans KR',\n 'Noto Sans Malayalam',\n 'Noto Sans SC',\n 'Noto Sans TC',\n 'Noto Sans Thai',\n Helvetica,\n Arial,\n sans-serif\n );\n /* This `--bui-redhat-` prefixed variable does NOT exist in BUI but is used only in this theme by some components below */\n --bui-redhat-theme-font-heading: var(\n --pf-t--global--font--family--heading,\n 'Red Hat Display',\n 'RedHatDisplay',\n 'Noto Sans Arabic',\n 'Noto Sans Hebrew',\n 'Noto Sans JP',\n 'Noto Sans KR',\n 'Noto Sans Malayalam',\n 'Noto Sans SC',\n 'Noto Sans TC',\n 'Noto Sans Thai',\n Helvetica,\n Arial,\n sans-serif\n );\n --bui-font-monospace: var(\n --pf-t--global--font--family--mono,\n 'Red Hat Mono',\n 'RedHatMono',\n 'Courier New',\n Courier,\n monospace\n );\n\n /* Font weights */\n --bui-font-weight-regular: var(\n --pf-t--global--font--weight--body--default,\n 400\n );\n --bui-font-weight-bold: var(--pf-t--global--font--weight--body--bold, 600);\n /* This `--bui-redhat-` prefixed variable does NOT exist in BUI but is used only in this theme by some components below */\n --bui-redhat-theme-font-weight-heading-regular: var(\n --pf-t--global--font--weight--heading--default,\n 400\n );\n /* This `--bui-redhat-` prefixed variable does NOT exist in BUI but is used only in this theme by some components below */\n --bui-redhat-theme-font-weight-heading-bold: var(\n --pf-t--global--font--weight--heading--bold,\n 600\n );\n\n /*\n * Font sizes are mostly similar between BUI and this theme. We used a slightly bigger font size.\n *\n * BUI \"Body Medium\" = --bui-font-size-3 is 0.875rem but we aligned with --pf-t--global--font--size--md which is 1rem.\n *\n * TODO: Check line height.\n */\n --bui-font-size-1: var(\n --pf-t--global--font--size--xs,\n 0.75rem\n ); /* BUI default 0.625rem = 10px */\n --bui-font-size-2: var(\n --pf-t--global--font--size--sm,\n 0.875rem\n ); /* BUI default 0.75rem = 12px */\n --bui-font-size-3: var(\n --pf-t--global--font--size--md,\n 14px /*1rem*/\n ); /* BUI default 0.875rem = 14px */\n --bui-font-size-4: var(\n --pf-t--global--font--size--lg,\n 1.125rem\n ); /* BUI default 1rem = 16px */\n --bui-font-size-5: var(\n --pf-t--global--font--size--xl,\n 1.25rem\n ); /* BUI default 1.25rem = 20px */\n --bui-font-size-6: var(\n --pf-t--global--font--size--2xl,\n 1.5rem\n ); /* BUI default 1.5rem = 24px */\n --bui-font-size-7: var(\n --pf-t--global--font--size--3xl,\n 1.75rem\n ); /* BUI default 2rem = 32px */\n --bui-font-size-8: var(\n --pf-t--global--font--size--4xl,\n 2.25rem\n ); /* BUI default 3rem = 48px */\n --bui-font-size-9: var(\n --pf-t--global--font--size--5xl,\n 3rem\n ); /* BUI default 4rem = 64px */\n --bui-font-size-10: var(\n --pf-t--global--font--size--6xl,\n 4rem\n ); /* BUI default 5.75rem = 92px */\n\n /*\n * Spacing\n *\n * Use default BUI spacing tokens because they are matching mostly the PatternFly tokens.\n *\n * For example `--bui-space: 0.25rem` is same as `pf-t--global--spacer--xs: 0.25rem`\n */\n\n /*\n * Radius\n *\n * While BUI has 6 radius tokens and a `full` token, PatternFly has just 4 radius tokens and a `sharp` (0px) and a `pill` token.\n * We mapped the BUI tokens to the closest PatternFly tokens and used custom values in the middle between `small` and `medium`\n * so that BUI component users can still expect different radius options.\n *\n * The `full` token is mapped to the `pill` token in PatternFly but we kept 9999px instead of 999px from PF.\n */\n --bui-radius-1: var(\n --pf-t--global--border--radius--tiny,\n 4px\n ); /* default: 0.125rem */\n --bui-radius-2: var(\n --pf-t--global--border--radius--small,\n 6px\n ); /* default: 0.25rem */\n --bui-radius-3: 8px; /* default: 0.5rem */\n --bui-radius-4: 12px; /* default: 0.75rem */\n --bui-radius-5: var(\n --pf-t--global--border--radius--medium,\n 16px\n ); /* default: 1rem */\n --bui-radius-6: var(\n --pf-t--global--border--radius--large,\n 24px\n ); /* default: 1.25rem */\n --bui-radius-full: var(\n --pf-t--global--border--radius--pill,\n 9999px\n ); /* default: 9999px */\n}\n\nbody[data-theme-name='light'][data-theme-mode='light'],\nbody[data-theme-name='light-customized'][data-theme-mode='light'] {\n /* Base Colors */\n --bui-black: #151515;\n --bui-white: #ffffff;\n\n /* Solid background colors */\n --bui-bg-solid: var(--pf-t--global--icon--color--brand--default, #0066cc);\n --bui-bg-solid-hover: var(--pf-t--global--icon--color--brand--hover, #004d99);\n --bui-bg-solid-pressed: var(\n --pf-t--global--icon--color--brand--clicked,\n #004d99\n );\n --bui-bg-solid-disabled: var(\n --pf-t--global--background--color--disabled--default,\n #c7c7c7\n );\n\n /* Neutral background colors */\n /* --bui-bg-app: #f8f8f8; */\n\n --bui-bg-neutral-1: #fff;\n --bui-bg-neutral-1-hover: oklch(0% 0 0 / 6%);\n --bui-bg-neutral-1-pressed: oklch(0% 0 0 / 12%);\n --bui-bg-neutral-1-disabled: oklch(0% 0 0 / 6%);\n\n --bui-bg-neutral-2: oklch(0% 0 0 / 6%);\n --bui-bg-neutral-2-hover: oklch(0% 0 0 / 12%);\n --bui-bg-neutral-2-pressed: oklch(0% 0 0 / 16%);\n --bui-bg-neutral-2-disabled: oklch(0% 0 0 / 6%);\n\n --bui-bg-neutral-3: oklch(0% 0 0 / 6%);\n --bui-bg-neutral-3-hover: oklch(0% 0 0 / 12%);\n --bui-bg-neutral-3-pressed: oklch(0% 0 0 / 16%);\n --bui-bg-neutral-3-disabled: oklch(0% 0 0 / 6%);\n\n --bui-bg-neutral-4: oklch(0% 0 0 / 6%);\n --bui-bg-neutral-4-hover: oklch(0% 0 0 / 12%);\n --bui-bg-neutral-4-pressed: oklch(0% 0 0 / 16%);\n --bui-bg-neutral-4-disabled: oklch(0% 0 0 / 6%);\n\n /* Status background colors */\n --bui-bg-danger: #ffe2e2;\n --bui-bg-warning: #ffedd5;\n --bui-bg-success: #dcfce7;\n --bui-bg-info: #dbeafe;\n\n /* Foreground colors */\n --bui-fg-primary: var(--bui-black);\n --bui-fg-secondary: var(\n --pf-t--global--text--color--subtle,\n #4d4d4d\n ); /* PF gray-60 */\n --bui-fg-disabled: var(\n --pf-t--global--text--color--disabled,\n #a3a3a3\n ); /* PF gray-40 */\n --bui-fg-solid: var(--bui-white);\n --bui-fg-solid-disabled: var(\n --pf-t--global--text--color--on-disabled,\n #707070\n ); /* PF gray-50 */\n\n /* Foreground Statuses — used as icon/border accent on status backgrounds */\n --bui-fg-danger-on-bg: var(\n --pf-t--global--color--status--danger--default,\n #b1380b\n ); /* PF red-orange-60 */\n --bui-fg-warning-on-bg: var(\n --pf-t--global--color--status--warning--default,\n #dca614\n ); /* PF yellow-40 */\n --bui-fg-success-on-bg: var(\n --pf-t--global--color--status--success--default,\n #3d7317\n ); /* PF green-60 */\n --bui-fg-info-on-bg: var(\n --pf-t--global--color--status--info--default,\n #5e40be\n ); /* PF purple-50 */\n --bui-fg-danger: var(\n --pf-t--global--color--status--danger--default,\n #b1380b\n ); /* PF red-orange-60 */\n --bui-fg-warning: var(\n --pf-t--global--color--status--warning--default,\n #dca614\n ); /* PF yellow-40 */\n --bui-fg-success: var(\n --pf-t--global--color--status--success--default,\n #3d7317\n ); /* PF green-60 */\n --bui-fg-info: var(\n --pf-t--global--color--status--info--default,\n #5e40be\n ); /* PF purple-50 */\n\n /* Border colors */\n --bui-border-1: var(\n --pf-t--global--border--color--default,\n #c7c7c7\n ); /* PF gray-30 */\n --bui-border-2: var(\n --pf-t--global--border--color--control--default,\n #a3a3a3\n ); /* PF gray-40 */\n --bui-border-info: var(\n --pf-t--global--border--color--status--info--default,\n #5e40be\n ); /* PF purple-50 */\n --bui-border-danger: var(\n --pf-t--global--border--color--status--danger--default,\n #b1380b\n ); /* PF red-orange-60 */\n --bui-border-warning: var(\n --pf-t--global--border--color--status--warning--default,\n #dca614\n ); /* PF yellow-40 */\n --bui-border-success: var(\n --pf-t--global--border--color--status--success--default,\n #3d7317\n ); /* PF green-60 */\n\n /* Accent colors (used by Switch and other interactive components) */\n --bui-accent-bg: var(--bui-bg-solid);\n --bui-accent-bg-hover: var(--bui-bg-solid-hover);\n --bui-accent-bg-disabled: var(--bui-bg-solid-disabled);\n --bui-accent-fg: var(--bui-fg-solid);\n --bui-accent-fg-disabled: var(--bui-fg-solid-disabled);\n\n /*\n * Brand accent for tab/nav indicators — separate from the button brand.\n * Defaults to the brand color; felt variants override to red.\n */\n --bui-redhat-theme-brand-accent: var(--bui-bg-solid);\n\n /* Readonly form control colors — PF gray-10 bg, gray-30 border */\n --bui-redhat-theme-readonly-bg: #f2f2f2;\n --bui-redhat-theme-readonly-border: #c7c7c7;\n\n /* Primary background — PF background-color-primary-default */\n --bui-redhat-theme-bg-primary: #ffffff; /* PF white */\n\n /* Floating background — PF background-color-floating-default (menus, popovers) */\n --bui-redhat-theme-bg-floating: #ffffff; /* PF white */\n\n /* Page inset — the shell background behind the rounded content well */\n --bui-redhat-theme-page-inset: 1.5rem;\n --bui-redhat-theme-page-inset-bg: #f2f2f2;\n\n /* Brand subtle — used by ToggleButton selected/hover states */\n --bui-redhat-theme-brand-subtle: #e0f0ff; /* PF blue-10 */\n --bui-redhat-theme-brand-subtle-hover: #b9dafc; /* PF blue-20 */\n --bui-redhat-theme-brand-subtle-border: #4394e5; /* PF blue-40 */\n\n /* Special colors */\n --bui-ring: var(--bui-bg-solid);\n --bui-scrollbar: #a0a0a03b;\n --bui-scrollbar-thumb: #a0a0a0;\n\n /* Shadows */\n --bui-shadow: rgba(41, 41, 41, 0.15) 0px 10px 20px 0px;\n\n --bui-animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\nbody[data-theme-name='dark'][data-theme-mode='dark'],\nbody[data-theme-name='dark-customized'][data-theme-mode='dark'] {\n /* Base Colors */\n --bui-black: #151515;\n --bui-white: #ffffff;\n\n /* Solid background colors — dark brand uses lighter blue for contrast on dark bg */\n --bui-bg-solid: var(\n --pf-t--global--icon--color--brand--default,\n #92c5f9\n ); /* PF dark brand = blue-30 */\n --bui-bg-solid-hover: var(\n --pf-t--global--icon--color--brand--hover,\n #b9dafc\n ); /* PF dark = blue-20 */\n --bui-bg-solid-pressed: var(\n --pf-t--global--icon--color--brand--clicked,\n #b9dafc\n );\n --bui-bg-solid-disabled: var(\n --pf-t--global--background--color--disabled--default,\n #a3a3a3\n ); /* PF dark gray-40 */\n\n /* Neutral background colors */\n --bui-bg-neutral-1: oklch(100% 0 0 / 10%);\n --bui-bg-neutral-1-hover: oklch(100% 0 0 / 14%);\n --bui-bg-neutral-1-pressed: oklch(100% 0 0 / 20%);\n --bui-bg-neutral-1-disabled: oklch(100% 0 0 / 10%);\n\n --bui-bg-neutral-2: oklch(100% 0 0 / 6%);\n --bui-bg-neutral-2-hover: oklch(100% 0 0 / 10%);\n --bui-bg-neutral-2-pressed: oklch(100% 0 0 / 16%);\n --bui-bg-neutral-2-disabled: oklch(100% 0 0 / 6%);\n\n --bui-bg-neutral-3: oklch(100% 0 0 / 8%);\n --bui-bg-neutral-3-hover: oklch(100% 0 0 / 12%);\n --bui-bg-neutral-3-pressed: oklch(100% 0 0 / 20%);\n --bui-bg-neutral-3-disabled: oklch(100% 0 0 / 8%);\n\n --bui-bg-neutral-4: oklch(100% 0 0 / 8%);\n --bui-bg-neutral-4-hover: oklch(100% 0 0 / 12%);\n --bui-bg-neutral-4-pressed: oklch(100% 0 0 / 20%);\n --bui-bg-neutral-4-disabled: oklch(100% 0 0 / 8%);\n\n /* Status background colors — BUI uses tinted backgrounds for alerts */\n --bui-bg-danger: #ffe2e2;\n --bui-bg-warning: #ffedd5;\n --bui-bg-success: #dcfce7;\n --bui-bg-info: #dbeafe;\n\n /* Foreground colors */\n --bui-fg-primary: var(--bui-white);\n --bui-fg-secondary: var(\n --pf-t--global--text--color--subtle,\n #c7c7c7\n ); /* PF dark = gray-30 */\n --bui-fg-disabled: var(\n --pf-t--global--text--color--disabled,\n #707070\n ); /* PF dark = gray-50 */\n --bui-fg-solid: #151515;\n --bui-fg-solid-disabled: var(\n --pf-t--global--text--color--on-disabled,\n #383838\n ); /* PF dark = gray-70 */\n\n /* Foreground Statuses — dark mode uses lighter status colors for contrast */\n --bui-fg-danger-on-bg: var(\n --pf-t--global--color--status--danger--default,\n #f0561d\n ); /* PF dark = red-orange-50 */\n --bui-fg-warning-on-bg: var(\n --pf-t--global--color--status--warning--default,\n #ffcc17\n ); /* PF dark = yellow-30 */\n --bui-fg-success-on-bg: var(\n --pf-t--global--color--status--success--default,\n #87bb62\n ); /* PF dark = green-40 */\n --bui-fg-info-on-bg: var(\n --pf-t--global--color--status--info--default,\n #b6a6e9\n ); /* PF dark = purple-30 */\n --bui-fg-danger: var(\n --pf-t--global--color--status--danger--default,\n #f0561d\n ); /* PF dark = red-orange-50 */\n --bui-fg-warning: var(\n --pf-t--global--color--status--warning--default,\n #ffcc17\n ); /* PF dark = yellow-30 */\n --bui-fg-success: var(\n --pf-t--global--color--status--success--default,\n #87bb62\n ); /* PF dark = green-40 */\n --bui-fg-info: var(\n --pf-t--global--color--status--info--default,\n #b6a6e9\n ); /* PF dark = purple-30 */\n\n /* Border colors */\n --bui-border-1: var(\n --pf-t--global--border--color--default,\n #4d4d4d\n ); /* PF dark = gray-60 */\n --bui-border-2: var(\n --pf-t--global--border--color--control--default,\n #a3a3a3\n ); /* PF dark = gray-40 */\n --bui-border-info: var(\n --pf-t--global--border--color--status--info--default,\n #b6a6e9\n ); /* PF dark = purple-30 */\n --bui-border-danger: var(\n --pf-t--global--border--color--status--danger--default,\n #f0561d\n ); /* PF dark = red-orange-50 */\n --bui-border-warning: var(\n --pf-t--global--border--color--status--warning--default,\n #ffcc17\n ); /* PF dark = yellow-30 */\n --bui-border-success: var(\n --pf-t--global--border--color--status--success--default,\n #87bb62\n ); /* PF dark = green-40 */\n\n /* Accent colors (used by Switch and other interactive components) */\n --bui-accent-bg: var(--bui-bg-solid);\n --bui-accent-bg-hover: var(--bui-bg-solid-hover);\n --bui-accent-bg-disabled: var(--bui-bg-solid-disabled);\n --bui-accent-fg: var(--bui-fg-solid);\n --bui-accent-fg-disabled: var(--bui-fg-solid-disabled);\n\n --bui-redhat-theme-brand-accent: var(--bui-bg-solid);\n\n /* Readonly form control colors — PF dark: gray-80 bg, gray-60 border */\n --bui-redhat-theme-readonly-bg: #292929;\n --bui-redhat-theme-readonly-border: #4d4d4d;\n\n /* Primary background — PF dark: gray-80 */\n --bui-redhat-theme-bg-primary: #292929;\n\n /* Floating background — PF dark: gray-70 */\n --bui-redhat-theme-bg-floating: #383838;\n\n /* Page inset — dark shell background */\n --bui-redhat-theme-page-inset: 1.5rem;\n --bui-redhat-theme-page-inset-bg: #151515;\n\n /* Brand subtle — PF dark: blue-70, blue-60, blue-30 */\n --bui-redhat-theme-brand-subtle: #003366; /* PF blue-70 */\n --bui-redhat-theme-brand-subtle-hover: #004d99; /* PF blue-60 */\n --bui-redhat-theme-brand-subtle-border: #92c5f9; /* PF blue-30 */\n\n /* Special colors */\n --bui-ring: var(--bui-bg-solid);\n --bui-scrollbar: #a0a0a03b;\n --bui-scrollbar-thumb: #a0a0a0;\n\n /* Shadows */\n --bui-shadow: rgba(0, 0, 0, 0.5) 0px 10px 20px 0px;\n\n --bui-animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n/*\n * Felt theme overrides for the customized variants.\n */\nbody[data-theme-name='light-customized'][data-theme-mode='light'] {\n /* Brand accent → red (buttons stay blue via --bui-bg-solid) */\n --bui-redhat-theme-brand-accent: #ee0000;\n}\n\nbody[data-theme-name='dark-customized'][data-theme-mode='dark'] {\n /* Brand accent → red */\n --bui-redhat-theme-brand-accent: #ee0000;\n}\n";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
//# sourceMappingURL=tokens.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,25 +1,55 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useApi, appThemeApiRef } from '@backstage/core-plugin-api';
|
|
2
3
|
import { UnifiedThemeProvider } from '@backstage/theme';
|
|
3
4
|
import { StyledEngineProvider, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
4
5
|
import { useTheme } from '../hooks/useTheme.esm.js';
|
|
5
6
|
import { useThemeConfig } from '../hooks/useThemeConfig.esm.js';
|
|
6
7
|
|
|
7
8
|
const ThemeProvider = ({
|
|
9
|
+
themeName,
|
|
8
10
|
theme,
|
|
9
11
|
children
|
|
10
|
-
}) =>
|
|
11
|
-
const
|
|
12
|
-
|
|
12
|
+
}) => {
|
|
13
|
+
const mui5Theme = theme.getTheme("v5");
|
|
14
|
+
const secondary = mui5Theme.palette.text.secondary;
|
|
15
|
+
return /* @__PURE__ */ jsx(UnifiedThemeProvider, { themeName, theme, children: /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsxs(ThemeProvider$1, { theme: mui5Theme, children: [
|
|
16
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
17
|
+
:root, [data-theme-mode='light'], [data-theme-mode='dark'] {
|
|
18
|
+
--bui-fg-secondary: ${secondary} !important;
|
|
19
|
+
}
|
|
20
|
+
` }),
|
|
21
|
+
children
|
|
22
|
+
] }) }) });
|
|
13
23
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
const resolveActiveKey = (activeId, keys) => {
|
|
25
|
+
if (activeId && keys.includes(activeId)) {
|
|
26
|
+
return activeId;
|
|
27
|
+
}
|
|
28
|
+
const prefersDark = activeId ? activeId.includes("dark") : window.matchMedia?.("(prefers-color-scheme: dark)")?.matches;
|
|
29
|
+
return prefersDark ? keys.find((n) => n.includes("dark")) ?? keys[0] : keys.find((n) => !n.includes("dark")) ?? keys[0];
|
|
17
30
|
};
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
const useActiveThemeId = () => {
|
|
32
|
+
let appThemeApi;
|
|
33
|
+
try {
|
|
34
|
+
appThemeApi = useApi(appThemeApiRef);
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
return appThemeApi?.getActiveThemeId();
|
|
38
|
+
};
|
|
39
|
+
const createSharedThemeProvider = (entries) => {
|
|
40
|
+
const keys = Object.keys(entries);
|
|
41
|
+
function RHDHSharedThemeProvider({ children }) {
|
|
42
|
+
const activeId = useActiveThemeId();
|
|
43
|
+
const key = resolveActiveKey(activeId, keys);
|
|
44
|
+
const entry = entries[key];
|
|
45
|
+
const configFromName = useThemeConfig(entry.name ?? key);
|
|
46
|
+
const resolvedConfig = entry.config ?? configFromName;
|
|
47
|
+
const themeFromHook = useTheme(resolvedConfig);
|
|
48
|
+
const theme = entry.theme ?? themeFromHook;
|
|
49
|
+
return /* @__PURE__ */ jsx(ThemeProvider, { theme, themeName: entry.name ?? key, children });
|
|
50
|
+
}
|
|
51
|
+
return RHDHSharedThemeProvider;
|
|
22
52
|
};
|
|
23
53
|
|
|
24
|
-
export {
|
|
54
|
+
export { createSharedThemeProvider };
|
|
25
55
|
//# sourceMappingURL=ThemeProvider.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ReactNode } from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport { UnifiedTheme, UnifiedThemeProvider } from '@backstage/theme';\n\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\n\nimport { useTheme } from '../hooks/useTheme';\nimport { useThemeConfig } from '../hooks/useThemeConfig';\nimport { ThemeConfig } from '../types';\n\n/**\n * Uses the UnifiedThemeProvider to style MUI v4 and v5 components.\n *\n * This component duplicated the StyledEngineProvider and MUI v5 ThemeProvider\n * to solve an issue that the defaultProps from the component configurations\n * (see `utils/createComponents.ts`) wasn't picked up.\n *\n * https://github.com/backstage/backstage/blob/master/packages/theme/src/unified/UnifiedThemeProvider.tsx#L94-L100\n */\nconst ThemeProvider = ({\n theme,\n children,\n}: {\n theme: UnifiedTheme;\n children: ReactNode;\n}) => (\n
|
|
1
|
+
{"version":3,"file":"ThemeProvider.esm.js","sources":["../../src/components/ThemeProvider.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ReactNode } from 'react';\nimport {\n type AppTheme,\n appThemeApiRef,\n type AppThemeApi,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { UnifiedTheme, UnifiedThemeProvider } from '@backstage/theme';\n\nimport {\n StyledEngineProvider,\n ThemeProvider as Mui5Provider,\n Theme as Mui5Theme,\n} from '@mui/material/styles';\n\nimport { useTheme } from '../hooks/useTheme';\nimport { useThemeConfig } from '../hooks/useThemeConfig';\nimport { ThemeConfig } from '../types';\n\n/**\n * Uses the UnifiedThemeProvider to style MUI v4 and v5 components.\n *\n * This component duplicated the StyledEngineProvider and MUI v5 ThemeProvider\n * to solve an issue that the defaultProps from the component configurations\n * (see `utils/createComponents.ts`) wasn't picked up.\n *\n * https://github.com/backstage/backstage/blob/master/packages/theme/src/unified/UnifiedThemeProvider.tsx#L94-L100\n */\nconst ThemeProvider = ({\n themeName,\n theme,\n children,\n}: {\n themeName: string;\n theme: UnifiedTheme;\n children: ReactNode;\n}) => {\n const mui5Theme = theme.getTheme('v5') as Mui5Theme;\n const secondary = mui5Theme.palette.text.secondary;\n return (\n <UnifiedThemeProvider themeName={themeName} theme={theme}>\n <StyledEngineProvider injectFirst>\n <Mui5Provider theme={mui5Theme}>\n {/*\n Native style tag (not Emotion) so the declaration is unlayered and\n reliably overrides @backstage/ui @layer tokens for --bui-fg-secondary.\n */}\n <style>{`\n :root, [data-theme-mode='light'], [data-theme-mode='dark'] {\n --bui-fg-secondary: ${secondary} !important;\n }\n `}</style>\n {children}\n </Mui5Provider>\n </StyledEngineProvider>\n </UnifiedThemeProvider>\n );\n};\n\nexport const createThemeProvider = (\n themeName: string,\n theme: UnifiedTheme,\n): AppTheme['Provider'] =>\n function RHDHThemeProvider({ children }) {\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeConfig = (\n themeName: string,\n themeConfig: ThemeConfig,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeConfig({ children }) {\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nexport const createThemeProviderForThemeName = (\n themeName: string,\n themeNameForConfig = themeName,\n): AppTheme['Provider'] =>\n function RHDHThemeProviderForThemeName({ children }) {\n const themeConfig = useThemeConfig(themeNameForConfig);\n const theme = useTheme(themeConfig);\n return (\n <ThemeProvider themeName={themeName} theme={theme}>\n {children}\n </ThemeProvider>\n );\n };\n\nconst resolveActiveKey = (\n activeId: string | undefined,\n keys: string[],\n): string => {\n if (activeId && keys.includes(activeId)) {\n return activeId;\n }\n const prefersDark = activeId\n ? activeId.includes('dark')\n : window.matchMedia?.('(prefers-color-scheme: dark)')?.matches;\n return prefersDark\n ? (keys.find(n => n.includes('dark')) ?? keys[0])\n : (keys.find(n => !n.includes('dark')) ?? keys[0]);\n};\n\nconst useActiveThemeId = (): string | undefined => {\n let appThemeApi: AppThemeApi | undefined;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n appThemeApi = useApi<AppThemeApi>(appThemeApiRef); // NOSONAR\n } catch {\n // appThemeApi may not be available during createApp initialization\n }\n return appThemeApi?.getActiveThemeId();\n};\n\nexport type SharedThemeEntry = {\n name?: string;\n config?: ThemeConfig;\n theme?: UnifiedTheme;\n};\n\nexport const createSharedThemeProvider = (\n entries: Record<string, SharedThemeEntry>,\n): AppTheme['Provider'] => {\n const keys = Object.keys(entries);\n\n function RHDHSharedThemeProvider({ children }: { children: ReactNode }) {\n const activeId = useActiveThemeId();\n const key = resolveActiveKey(activeId, keys);\n const entry = entries[key];\n\n // Always call hooks unconditionally (Rules of Hooks).\n // For entries that don't need them the results are simply unused.\n const configFromName = useThemeConfig(entry.name ?? key);\n const resolvedConfig = entry.config ?? configFromName;\n const themeFromHook = useTheme(resolvedConfig);\n\n const theme = entry.theme ?? themeFromHook;\n return (\n <ThemeProvider theme={theme} themeName={entry.name ?? key}>\n {children}\n </ThemeProvider>\n );\n }\n return RHDHSharedThemeProvider;\n};\n"],"names":["Mui5Provider"],"mappings":";;;;;;;AA4CA,MAAM,gBAAgB,CAAC;AAAA,EACrB,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,SAAA,GAAY,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA;AACrC,EAAA,MAAM,SAAA,GAAY,SAAA,CAAU,OAAA,CAAQ,IAAA,CAAK,SAAA;AACzC,EAAA,uBACE,GAAA,CAAC,oBAAA,EAAA,EAAqB,SAAA,EAAsB,KAAA,EAC1C,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,WAAA,EAAW,IAAA,EAC/B,QAAA,kBAAA,IAAA,CAACA,eAAA,EAAA,EAAa,KAAA,EAAO,SAAA,EAKnB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,OAAA,EAAA,EAAO,QAAA,EAAA;AAAA;AAAA,kCAAA,EAEkB,SAAS,CAAA;AAAA;AAAA,UAAA,CAAA,EAEjC,CAAA;AAAA,IACD;AAA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AAM,MAAA,IAAU,cAAA;AACvC,IAAA,MAAM,aAAA,GAAgB,SAAS,cAAc,CAAA;AAE7C,IAAA,MAAM,KAAA,GAAQ,MAAM,KAAA,IAAS,aAAA;AAC7B,IAAA,2BACG,aAAA,EAAA,EAAc,KAAA,EAAc,WAAW,KAAA,CAAM,IAAA,IAAQ,KACnD,QAAA,EACH,CAAA;AAAA,EAEJ;AACA,EAAA,OAAO,uBAAA;AACT;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { ThemeBlueprint } from '@backstage/plugin-app-react';
|
|
3
|
-
import './assets/fonts/font.min.css.esm.js';
|
|
4
3
|
import { getAllThemes } from './themes.esm.js';
|
|
4
|
+
import './assets/fonts/font.min.css.esm.js';
|
|
5
|
+
import './assets/bui/tokens.css.esm.js';
|
|
6
|
+
import './assets/bui/component-overrides.css.esm.js';
|
|
5
7
|
export { LogoFull } from './components/LogoFull.esm.js';
|
|
6
8
|
export { LogoIcon } from './components/LogoIcon.esm.js';
|
|
7
9
|
import 'react/jsx-runtime';
|
|
10
|
+
import '@backstage/core-plugin-api';
|
|
8
11
|
import '@backstage/theme';
|
|
9
12
|
import '@mui/material/styles';
|
|
10
13
|
import 'react';
|
|
11
|
-
import '@backstage/core-plugin-api';
|
|
12
14
|
|
|
13
15
|
const rhdhThemeModule = createFrontendModule({
|
|
14
16
|
pluginId: "app",
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH Theme plugin for Backstage.\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport './assets/fonts/font.min.css';\nimport
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH Theme plugin for Backstage.\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport { getAllThemes } from './themes';\n\nimport './assets/fonts/font.min.css';\nimport './assets/bui/tokens.css';\nimport './assets/bui/component-overrides.css';\n\nexport { LogoFull, LogoIcon } from './components';\n\n/**\n * RHDH themes as NFS extensions (ThemeBlueprint).\n * Only the app can register ThemeBlueprint; we use the same theme definitions\n * from the theme plugin (getAllThemes()) so behavior matches the legacy app.\n *\n * @public\n */\nconst rhdhThemeModule = createFrontendModule({\n pluginId: 'app',\n extensions: getAllThemes().map(appTheme =>\n ThemeBlueprint.make({\n name: appTheme.id,\n params: {\n theme: {\n id: appTheme.id,\n title: appTheme.title,\n variant: appTheme.variant,\n icon: appTheme.icon,\n Provider: appTheme.Provider,\n },\n },\n }),\n ),\n});\n\nexport default rhdhThemeModule;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuCA,MAAM,kBAAkB,oBAAA,CAAqB;AAAA,EAC3C,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY,cAAa,CAAE,GAAA;AAAA,IAAI,CAAA,QAAA,KAC7B,eAAe,IAAA,CAAK;AAAA,MAClB,MAAM,QAAA,CAAS,EAAA;AAAA,MACf,MAAA,EAAQ;AAAA,QACN,KAAA,EAAO;AAAA,UACL,IAAI,QAAA,CAAS,EAAA;AAAA,UACb,OAAO,QAAA,CAAS,KAAA;AAAA,UAChB,SAAS,QAAA,CAAS,OAAA;AAAA,UAClB,MAAM,QAAA,CAAS,IAAA;AAAA,UACf,UAAU,QAAA,CAAS;AAAA;AACrB;AACF,KACD;AAAA;AAEL,CAAC;;;;"}
|
package/dist/legacy.esm.js
CHANGED
|
@@ -8,6 +8,7 @@ export { darkThemeProvider, getAllThemes, getThemes, lightThemeProvider, useAllT
|
|
|
8
8
|
export { LogoFull } from './components/LogoFull.esm.js';
|
|
9
9
|
export { LogoIcon } from './components/LogoIcon.esm.js';
|
|
10
10
|
import 'react/jsx-runtime';
|
|
11
|
+
import '@backstage/core-plugin-api';
|
|
11
12
|
import '@backstage/theme';
|
|
12
13
|
import '@mui/material/styles';
|
|
13
14
|
import 'react';
|
package/dist/legacy.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legacy.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
package/dist/lightTheme.esm.js
CHANGED
|
@@ -21,7 +21,15 @@ const lightThemeOverrides = {
|
|
|
21
21
|
},
|
|
22
22
|
text: {
|
|
23
23
|
primary: "#151515",
|
|
24
|
-
|
|
24
|
+
// PatternFly --pf-v5-global--Color--200; AA on white and #f2f2f2 nav chrome
|
|
25
|
+
secondary: "#6A6E73"
|
|
26
|
+
},
|
|
27
|
+
// MUI defaults (#0288d1 / #ed6c02) fail WCAG AA on white (~3.1–3.9:1)
|
|
28
|
+
info: {
|
|
29
|
+
main: "#0066CC"
|
|
30
|
+
},
|
|
31
|
+
warning: {
|
|
32
|
+
main: "#C05600"
|
|
25
33
|
},
|
|
26
34
|
background: {
|
|
27
35
|
default: "#FFFFFF",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightTheme.esm.js","sources":["../src/lightTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const lightThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n },\n navigation: {\n background: '#f2f2f2',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#FFF',\n },\n },\n text: {\n primary: '#151515',\n secondary: '#
|
|
1
|
+
{"version":3,"file":"lightTheme.esm.js","sources":["../src/lightTheme.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { palettes } from '@backstage/theme';\nimport { type PaletteOptions } from '@mui/material/styles';\n\nimport { type ThemeConfigPalette } from './types';\n\nexport const lightThemeOverrides: Partial<ThemeConfigPalette> = {\n primary: {\n main: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n },\n navigation: {\n background: '#f2f2f2',\n indicator: 'transparent',\n color: '#151515',\n selectedColor: '#151515',\n navItem: {\n hoverBackground: '#ffffff',\n },\n submenu: {\n background: '#FFF',\n },\n },\n text: {\n primary: '#151515',\n // PatternFly --pf-v5-global--Color--200; AA on white and #f2f2f2 nav chrome\n secondary: '#6A6E73',\n },\n // MUI defaults (#0288d1 / #ed6c02) fail WCAG AA on white (~3.1–3.9:1)\n info: {\n main: '#0066CC',\n },\n warning: {\n main: '#C05600',\n },\n background: {\n default: '#FFFFFF',\n paper: '#FFFFFF',\n },\n rhdh: {\n general: {\n pageInset: '1.5rem',\n pageInsetBackgroundColor: '#f2f2f2',\n\n disabled: '#6A6E73',\n disabledBackground: '#D2D2D2',\n\n paperBackgroundImage: 'none',\n paperBorderColor: '#C7C7C7',\n\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n popoverBoxShadow:\n '0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)',\n\n cardBackgroundColor: '#FFF',\n cardBorderColor: '#C7C7C7',\n\n mainSectionBackgroundColor: '#FFF',\n formControlBackgroundColor: '#FFF',\n\n sidebarBackgroundColor: '#f2f2f2',\n sidebarDividerColor: '#c7c7c7',\n sidebarItemSelectedBackgroundColor: '#FFF',\n\n tableTitleColor: '#181818',\n tableSubtitleColor: '#616161',\n tableColumnTitleColor: '#151515',\n tableRowHover: '#F5F5F5',\n tableBorderColor: '#E0E0E0',\n tableBackgroundColor: '#FFF',\n tabsLinkHoverBackgroundColor: 'rgba(199, 199, 199, 0.2500)',\n\n contrastText: '#FFF',\n\n appBarBackgroundScheme: 'light',\n\n appBarBackgroundColor: '#f2f2f2',\n appBarForegroundColor: '#1f1f1f',\n appBarBackgroundImage: 'none',\n\n starredItemsColor: '#F3BA37',\n },\n primary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n secondary: {\n main: '#0066CC',\n focusVisibleBorder: '#0066CC',\n },\n cards: {\n headerTextColor: '#151515',\n headerBackgroundColor: '#FFF',\n headerBackgroundImage: 'none',\n },\n },\n};\n\nexport const customLightTheme = (): ThemeConfigPalette => {\n const palette: (typeof palettes)['light'] & PaletteOptions = palettes.light;\n return {\n ...palette,\n ...lightThemeOverrides,\n };\n};\n"],"names":[],"mappings":";;AAqBO,MAAM,mBAAA,GAAmD;AAAA,EAC9D,OAAA,EAAS;AAAA,IACP,IAAA,EAAM;AAAA,GACR;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAA,EAAY,SAAA;AAAA,IACZ,SAAA,EAAW,aAAA;AAAA,IACX,KAAA,EAAO,SAAA;AAAA,IACP,aAAA,EAAe,SAAA;AAAA,IACf,OAAA,EAAS;AAAA,MACP,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,UAAA,EAAY;AAAA;AACd,GACF;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,SAAA;AAAA;AAAA,IAET,SAAA,EAAW;AAAA,GACb;AAAA;AAAA,EAEA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM;AAAA,GACR;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,SAAA;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS;AAAA,MACP,SAAA,EAAW,QAAA;AAAA,MACX,wBAAA,EAA0B,SAAA;AAAA,MAE1B,QAAA,EAAU,SAAA;AAAA,MACV,kBAAA,EAAoB,SAAA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2,7 +2,7 @@ function styleInject(css, ref) {
|
|
|
2
2
|
if ( ref === void 0 ) ref = {};
|
|
3
3
|
var insertAt = ref.insertAt;
|
|
4
4
|
|
|
5
|
-
if (typeof document === 'undefined') { return; }
|
|
5
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
6
6
|
|
|
7
7
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
8
|
var style = document.createElement('style');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,
|
|
1
|
+
{"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;;;","x_google_ignoreList":[0]}
|
package/dist/themes.esm.js
CHANGED
|
@@ -4,12 +4,38 @@ import { themes } from '@backstage/theme';
|
|
|
4
4
|
import LightIcon from '@mui/icons-material/WbSunnyRounded';
|
|
5
5
|
import DarkIcon from '@mui/icons-material/Brightness2Rounded';
|
|
6
6
|
import { createTheme } from '@mui/material/styles';
|
|
7
|
-
import {
|
|
7
|
+
import { createSharedThemeProvider } from './components/ThemeProvider.esm.js';
|
|
8
8
|
import { getDefaultThemeConfig } from './backstage.esm.js';
|
|
9
9
|
import { getDefaultThemeConfig as getDefaultThemeConfig$1 } from './rhdh.esm.js';
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const sharedProvider = createSharedThemeProvider({
|
|
12
|
+
light: { name: "light" },
|
|
13
|
+
dark: { name: "dark" },
|
|
14
|
+
"light-customized": {
|
|
15
|
+
config: {
|
|
16
|
+
mode: "light",
|
|
17
|
+
variant: "rhdh",
|
|
18
|
+
palette: {
|
|
19
|
+
primary: { main: "#ff0000" },
|
|
20
|
+
secondary: { main: "#00ff00" }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"dark-customized": {
|
|
25
|
+
config: {
|
|
26
|
+
mode: "dark",
|
|
27
|
+
variant: "rhdh",
|
|
28
|
+
palette: {
|
|
29
|
+
primary: { main: "#ff0000" },
|
|
30
|
+
secondary: { main: "#00ff00" }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"backstage-light": { theme: themes.light },
|
|
35
|
+
"backstage-dark": { theme: themes.dark }
|
|
36
|
+
});
|
|
37
|
+
const lightThemeProvider = sharedProvider;
|
|
38
|
+
const darkThemeProvider = sharedProvider;
|
|
13
39
|
const getAllThemes = () => {
|
|
14
40
|
return [
|
|
15
41
|
{
|
|
@@ -17,56 +43,42 @@ const getAllThemes = () => {
|
|
|
17
43
|
title: "RHDH Light (latest)",
|
|
18
44
|
variant: "light",
|
|
19
45
|
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
20
|
-
Provider:
|
|
46
|
+
Provider: sharedProvider
|
|
21
47
|
},
|
|
22
48
|
{
|
|
23
49
|
id: "dark",
|
|
24
50
|
title: "RHDH Dark (latest)",
|
|
25
51
|
variant: "dark",
|
|
26
52
|
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
27
|
-
Provider:
|
|
53
|
+
Provider: sharedProvider
|
|
28
54
|
},
|
|
29
55
|
{
|
|
30
56
|
id: "light-customized",
|
|
31
57
|
title: "RHDH Light (customized)",
|
|
32
58
|
variant: "light",
|
|
33
59
|
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
34
|
-
Provider:
|
|
35
|
-
mode: "light",
|
|
36
|
-
variant: "rhdh",
|
|
37
|
-
palette: {
|
|
38
|
-
primary: { main: "#ff0000" },
|
|
39
|
-
secondary: { main: "#00ff00" }
|
|
40
|
-
}
|
|
41
|
-
})
|
|
60
|
+
Provider: sharedProvider
|
|
42
61
|
},
|
|
43
62
|
{
|
|
44
63
|
id: "dark-customized",
|
|
45
64
|
title: "RHDH Dark (customized)",
|
|
46
65
|
variant: "dark",
|
|
47
66
|
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
48
|
-
Provider:
|
|
49
|
-
mode: "dark",
|
|
50
|
-
variant: "rhdh",
|
|
51
|
-
palette: {
|
|
52
|
-
primary: { main: "#ff0000" },
|
|
53
|
-
secondary: { main: "#00ff00" }
|
|
54
|
-
}
|
|
55
|
-
})
|
|
67
|
+
Provider: sharedProvider
|
|
56
68
|
},
|
|
57
69
|
{
|
|
58
70
|
id: "backstage-light",
|
|
59
71
|
title: "Backstage Light",
|
|
60
72
|
variant: "light",
|
|
61
73
|
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
62
|
-
Provider:
|
|
74
|
+
Provider: sharedProvider
|
|
63
75
|
},
|
|
64
76
|
{
|
|
65
77
|
id: "backstage-dark",
|
|
66
78
|
title: "Backstage Dark",
|
|
67
79
|
variant: "dark",
|
|
68
80
|
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
69
|
-
Provider:
|
|
81
|
+
Provider: sharedProvider
|
|
70
82
|
}
|
|
71
83
|
];
|
|
72
84
|
};
|
|
@@ -80,14 +92,14 @@ const getThemes = () => {
|
|
|
80
92
|
title: "Light",
|
|
81
93
|
variant: "light",
|
|
82
94
|
icon: /* @__PURE__ */ jsx(LightIcon, {}),
|
|
83
|
-
Provider:
|
|
95
|
+
Provider: sharedProvider
|
|
84
96
|
},
|
|
85
97
|
{
|
|
86
98
|
id: "dark",
|
|
87
99
|
title: "Dark",
|
|
88
100
|
variant: "dark",
|
|
89
101
|
icon: /* @__PURE__ */ jsx(DarkIcon, {}),
|
|
90
|
-
Provider:
|
|
102
|
+
Provider: sharedProvider
|
|
91
103
|
}
|
|
92
104
|
];
|
|
93
105
|
};
|
package/dist/themes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.esm.js","sources":["../src/themes.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport { themes } from '@backstage/theme';\n\nimport LightIcon from '@mui/icons-material/WbSunnyRounded';\nimport DarkIcon from '@mui/icons-material/Brightness2Rounded';\nimport { createTheme } from '@mui/material/styles';\n\nimport {
|
|
1
|
+
{"version":3,"file":"themes.esm.js","sources":["../src/themes.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { AppTheme } from '@backstage/core-plugin-api';\nimport { themes } from '@backstage/theme';\n\nimport LightIcon from '@mui/icons-material/WbSunnyRounded';\nimport DarkIcon from '@mui/icons-material/Brightness2Rounded';\nimport { createTheme } from '@mui/material/styles';\n\nimport { createSharedThemeProvider } from './components/ThemeProvider';\nimport * as backstage from './backstage';\nimport * as rhdh from './rhdh';\n\nconst sharedProvider = createSharedThemeProvider({\n light: { name: 'light' },\n dark: { name: 'dark' },\n 'light-customized': {\n config: {\n mode: 'light',\n variant: 'rhdh',\n palette: {\n primary: { main: '#ff0000' },\n secondary: { main: '#00ff00' },\n },\n },\n },\n 'dark-customized': {\n config: {\n mode: 'dark',\n variant: 'rhdh',\n palette: {\n primary: { main: '#ff0000' },\n secondary: { main: '#00ff00' },\n },\n },\n },\n 'backstage-light': { theme: themes.light },\n 'backstage-dark': { theme: themes.dark },\n});\n\nexport const lightThemeProvider = sharedProvider;\n\nexport const darkThemeProvider = sharedProvider;\n\nexport const getAllThemes = (): AppTheme[] => {\n return [\n {\n id: 'light',\n title: 'RHDH Light (latest)',\n variant: 'light',\n icon: <LightIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'dark',\n title: 'RHDH Dark (latest)',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'light-customized',\n title: 'RHDH Light (customized)',\n variant: 'light',\n icon: <LightIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'dark-customized',\n title: 'RHDH Dark (customized)',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'backstage-light',\n title: 'Backstage Light',\n variant: 'light',\n icon: <LightIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'backstage-dark',\n title: 'Backstage Dark',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: sharedProvider,\n },\n ];\n};\n\nexport const useAllThemes = (): AppTheme[] => {\n return useMemo(() => getAllThemes(), []);\n};\n\nexport const getThemes = (): AppTheme[] => {\n return [\n {\n id: 'light',\n title: 'Light',\n variant: 'light',\n icon: <LightIcon />,\n Provider: sharedProvider,\n },\n {\n id: 'dark',\n title: 'Dark',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: sharedProvider,\n },\n ];\n};\n\nexport const useThemes = (): AppTheme[] => {\n return useMemo(() => getThemes(), []);\n};\n\nexport const useLoaderTheme = () => {\n return useMemo(() => {\n const latestTheme = localStorage.getItem('theme');\n const mode = latestTheme?.includes('dark') ? 'dark' : 'light';\n const variant = latestTheme?.includes('backstage') ? 'backstage' : 'rhdh';\n const themeOptions =\n variant === 'backstage'\n ? backstage.getDefaultThemeConfig(mode)\n : rhdh.getDefaultThemeConfig(mode);\n return createTheme(themeOptions);\n }, []);\n};\n"],"names":["backstage.getDefaultThemeConfig","rhdh.getDefaultThemeConfig"],"mappings":";;;;;;;;;;AA4BA,MAAM,iBAAiB,yBAAA,CAA0B;AAAA,EAC/C,KAAA,EAAO,EAAE,IAAA,EAAM,OAAA,EAAQ;AAAA,EACvB,IAAA,EAAM,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,EACrB,kBAAA,EAAoB;AAAA,IAClB,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,OAAA;AAAA,MACN,OAAA,EAAS,MAAA;AAAA,MACT,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,EAAE,IAAA,EAAM,SAAA,EAAU;AAAA,QAC3B,SAAA,EAAW,EAAE,IAAA,EAAM,SAAA;AAAU;AAC/B;AACF,GACF;AAAA,EACA,iBAAA,EAAmB;AAAA,IACjB,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS,MAAA;AAAA,MACT,OAAA,EAAS;AAAA,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,GACpCC,uBAAK,CAAsB,IAAI,CAAA;AACrC,IAAA,OAAO,YAAY,YAAY,CAAA;AAAA,EACjC,CAAA,EAAG,EAAE,CAAA;AACP;;;;"}
|
|
@@ -48,6 +48,9 @@ const createComponents = (themeConfig) => {
|
|
|
48
48
|
"&.MuiTypography-h1": {
|
|
49
49
|
fontWeight: "normal"
|
|
50
50
|
}
|
|
51
|
+
},
|
|
52
|
+
button: {
|
|
53
|
+
textTransform: "none"
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
};
|
|
@@ -654,9 +657,25 @@ const createComponents = (themeConfig) => {
|
|
|
654
657
|
}
|
|
655
658
|
}
|
|
656
659
|
};
|
|
660
|
+
components.BackstageIconLinkVertical = {
|
|
661
|
+
styleOverrides: {
|
|
662
|
+
label: {
|
|
663
|
+
textTransform: "none"
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
};
|
|
657
667
|
components.BackstageSidebarPage = {
|
|
658
668
|
styleOverrides: {
|
|
659
669
|
root: {
|
|
670
|
+
// Fill the viewport so short pages don't leave a gap below the shell.
|
|
671
|
+
// App root wrappers (e.g. ApplicationDrawer) can collapse to content
|
|
672
|
+
// height; without a min-height here the page-inset background stops
|
|
673
|
+
// early and body/html shows through (RHDHBUGS-3498).
|
|
674
|
+
minHeight: "100vh",
|
|
675
|
+
// Let BUI Container's flex: 1 grow into the remaining viewport below
|
|
676
|
+
// PluginHeader / Header slots (those slots set flex: none).
|
|
677
|
+
display: "flex",
|
|
678
|
+
flexDirection: "column",
|
|
660
679
|
// Controls the page inset as in PF6 -- only in desktop view
|
|
661
680
|
"@media (min-width: 600px)": {
|
|
662
681
|
backgroundColor: general.pageInsetBackgroundColor ?? general.appBarBackgroundColor,
|
|
@@ -675,9 +694,42 @@ const createComponents = (themeConfig) => {
|
|
|
675
694
|
clipPath: "rect(0 100% 100% 0 round 1rem)",
|
|
676
695
|
// Emulate the PatternFly 6 page inset using a margin
|
|
677
696
|
margin: general.pageInset,
|
|
697
|
+
// Fill the inset well so short pages use mainSectionBackgroundColor
|
|
698
|
+
// (#292929) instead of leaving a pageInset (#151515) band below content.
|
|
699
|
+
backgroundColor: general.mainSectionBackgroundColor,
|
|
700
|
+
minHeight: `calc(100vh - 2 * ${general.pageInset})`,
|
|
678
701
|
// Prevent overflow in the main container due to the margin
|
|
679
702
|
maxHeight: `calc(100vh - 2 * ${general.pageInset})`
|
|
680
703
|
},
|
|
704
|
+
// NFS BUI entity pages wrap PluginHeader + tabs + Container in a
|
|
705
|
+
// classless <main>. BUI Container is flex: 1 1 0% but that only
|
|
706
|
+
// grows when main is a flex column — otherwise Topology / Scorecard
|
|
707
|
+
// stay content-height inside a tall well (RHDHBUGS-3543). Do not
|
|
708
|
+
// override Backstage Page, which uses display:grid on <main>.
|
|
709
|
+
"& > main:not([data-backstage-core-page])": {
|
|
710
|
+
display: "flex",
|
|
711
|
+
flexDirection: "column",
|
|
712
|
+
flex: 1,
|
|
713
|
+
minHeight: 0,
|
|
714
|
+
maxHeight: `calc(100% - 2 * ${general.pageInset})`
|
|
715
|
+
},
|
|
716
|
+
// NFS / BUI pages use Container instead of <main>. Match the content
|
|
717
|
+
// well color (same token as BackstageContent) and rely on flex: 1
|
|
718
|
+
// from BUI rather than 100vh so PluginHeader siblings are not overflowed.
|
|
719
|
+
"& > [class*='bui-Container']:not([class*='bui-Header'])": {
|
|
720
|
+
backgroundColor: general.mainSectionBackgroundColor
|
|
721
|
+
},
|
|
722
|
+
// When a BackstagePage-root is present, the MUI page already has
|
|
723
|
+
// its own header; hide the sibling BUI PluginHeader to avoid duplication.
|
|
724
|
+
"&:has([class*='BackstagePage-root']) > .bui-PluginHeader": {
|
|
725
|
+
display: "none"
|
|
726
|
+
},
|
|
727
|
+
// Settings and other pages render BackstageContent as <article>.
|
|
728
|
+
// Grow it to fill the flex column so pageInset doesn't show as a band.
|
|
729
|
+
'& > article, & > [class*="BackstageContent-root"]': {
|
|
730
|
+
flex: 1,
|
|
731
|
+
backgroundColor: general.mainSectionBackgroundColor
|
|
732
|
+
},
|
|
681
733
|
// Prevent TechDocs double scrollbar: the page-inset max-height puts
|
|
682
734
|
// <main>'s scrollbar at the same position as the ToC sidebar scrollbar.
|
|
683
735
|
// Letting <main> expand moves the scroll to the parent root instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.esm.js","sources":["../../src/utils/createComponents.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type UnifiedThemeOptions,\n defaultComponentThemes as backstageComponents,\n} from '@backstage/theme';\nimport { type CSSObject } from '@mui/material/styles';\n\nimport { ThemeConfig, ThemeConfigOptions, RHDHThemePalette } from '../types';\nimport { redHatFontFaces, redHatFonts } from '../fonts';\nimport { resolveNavigationSidebarColors } from './navigationSidebarColors';\n\nexport type Component = {\n defaultProps?: unknown;\n styleOverrides?: unknown;\n variants?: unknown;\n};\n\nexport type Components = UnifiedThemeOptions['components'] & {\n BackstageHeaderTabs?: Component;\n BackstageSidebar?: Component;\n BackstageSidebarItem?: Component;\n BackstageSidebarSubmenuItem?: Component;\n BackstagePage?: Component;\n BackstageContent?: Component;\n BackstageContentHeader?: Component;\n BackstageHeader?: Component;\n BackstageItemCardHeader?: Component;\n BackstageTableToolbar?: Component;\n CatalogReactUserListPicker?: Component;\n PrivateTabIndicator?: Component;\n RHDHPageWithoutFixHeight?: Component;\n};\n\nexport const createComponents = (themeConfig: ThemeConfig): Components => {\n // Short hands to ensure that the code doesn't break if one of the properties is not defined.\n\n const options = themeConfig.options ?? ({} as ThemeConfigOptions);\n const disableRipple = options?.rippleEffect !== 'on'; // by default ripple effect is disabled\n\n const palette = themeConfig.palette ?? {};\n\n const general = palette.rhdh?.general || ({} as RHDHThemePalette['general']);\n const rhdhPrimary =\n palette.rhdh?.primary || ({} as RHDHThemePalette['primary']);\n const rhdhSecondary =\n palette.rhdh?.secondary || ({} as RHDHThemePalette['secondary']);\n\n const components: Components = {};\n if (options.components === 'backstage' || options.components === 'mui') {\n return components;\n }\n\n //\n // MUI components\n //\n components.MuiCssBaseline = {\n styleOverrides: theme => {\n const backstageOverrides =\n backstageComponents!.MuiCssBaseline!.styleOverrides!;\n const backstageStyles =\n typeof backstageOverrides === 'function'\n ? (backstageOverrides(theme) as CSSObject)\n : (backstageOverrides as CSSObject);\n\n return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\n },\n \"[class*='BackstagePage-root-'] > [class*='MuiToolbar-root']\": {\n backgroundColor: theme.palette.background.paper,\n },\n };\n },\n };\n\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n root: {\n fontFamily: redHatFonts.text,\n fontWeight: 'normal',\n letterSpacing: '0.01em',\n // This is required to override the default MUI styles\n // that set the `font-weight` to `500` for the `h1` element.\n '&.MuiTypography-h1': {\n fontWeight: 'normal',\n },\n },\n },\n };\n }\n\n // MUI container\n if (options.paper !== 'mui') {\n const elevationStyle = {\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n '& > hr[class|=\"MuiDivider-root\"]': {\n backgroundColor: general.paperBorderColor,\n },\n };\n const noElevationStyle = {\n boxShadow: 'none',\n outline: 'none',\n };\n\n components.MuiPaper = {\n styleOverrides: {\n root: {\n // This works for all MUI v5 components, but in MUI v4\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n // Required only for MUI v5 components because a gradient `backgroundImage`\n // overrides the default background.paper color otherwise.\n backgroundImage: general.paperBackgroundImage,\n // hide the first child element which is a divider with MuiDivider-root classname in MuiPaper\n '& > hr:first-child[class|=\"MuiDivider-root\"]': {\n height: 0,\n },\n },\n rounded: {\n '& > :last-child': {\n borderBottomLeftRadius: 16,\n borderBottomRightRadius: 16,\n },\n },\n elevation0: noElevationStyle,\n },\n };\n components.MuiPopover = {\n styleOverrides: {\n paper: {\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n boxShadow: general.popoverBoxShadow,\n // `Popover` has no outline by default, but since we're adding it to the `Paper`\n // components, this ensures that the `Popover` doesn't has a shadow and an outline.\n outline: 0,\n },\n },\n };\n\n // Required for MUI v4, not MUI v5\n const elevations = Array.from(\n { length: 24 },\n (_, i) => `elevation${i + 1}`,\n ) as 'elevation1'[];\n elevations.forEach(elevation => {\n components.MuiPaper!.styleOverrides![elevation] = elevationStyle;\n });\n }\n\n // MUI AppBar\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n ...(options.appBar !== 'mui' && {\n backgroundColor: general.appBarBackgroundColor,\n backgroundImage: general.appBarBackgroundImage,\n outline: 'none',\n }),\n },\n },\n };\n\n // MUI buttons\n // Don't disableRipple for MuiButtonBase as it will affect all the buttons\n // and we need to ensure that the buttons have a right touch and focus styling.\n if (options.buttons !== 'mui') {\n components.MuiButton = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n borderRadius: '3px',\n fontWeight: 'normal',\n },\n contained: {\n border: '0',\n borderRadius: '99em',\n boxShadow: 'none',\n '&:hover, &:focus-visible': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n containedPrimary: {\n borderRadius: '99em',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhPrimary.focusVisibleBorder}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n containedSecondary: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhSecondary.focusVisibleBorder}`,\n outline: `${rhdhSecondary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n outlined: {\n borderRadius: '99em',\n border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroudColor: general.disabledBackground,\n border: `1px solid ${general.disabledBackground}`,\n },\n },\n outlinedPrimary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n text: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${rhdhPrimary.main}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n },\n },\n };\n components.MuiToggleButton = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n },\n },\n };\n components.MuiIconButton = {\n styleOverrides: {\n root: {\n '&:disabled': {\n color: general.disabled,\n },\n },\n },\n };\n components.MuiLink = {\n styleOverrides: {\n underlineHover: {\n '&:hover, &:focus-visible': {\n textDecoration: 'none',\n },\n },\n },\n };\n }\n\n // MUI input fields\n if (options.inputs !== 'mui') {\n components.MuiInputBase = {\n styleOverrides: {\n input: {\n '&::placeholder': {\n color: general.disabled,\n opacity: 1,\n },\n },\n },\n };\n components.MuiOutlinedInput = {\n styleOverrides: {\n input: {\n '&:autofill': {\n boxShadow: `0 0 0 100px ${general.formControlBackgroundColor} inset`,\n borderRadius: 'unset',\n },\n },\n },\n };\n }\n\n if (options.checkbox !== 'mui') {\n components.MuiCheckbox = {\n defaultProps: {\n color: 'primary',\n },\n };\n }\n\n // MUI accordion\n if (options.accordions !== 'mui') {\n components.MuiAccordion = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n },\n rounded: {\n '&:first-child': {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '0',\n borderBottomRightRadius: '0',\n },\n },\n },\n };\n }\n\n // MUI cards\n if (options.cards !== 'mui') {\n components.MuiCard = {\n styleOverrides: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: general.cardBackgroundColor,\n borderRadius: '16px',\n },\n },\n };\n components.MuiCardHeader = {\n styleOverrides: {\n content: {\n '& > span > nav span': {\n textTransform: 'unset',\n letterSpacing: 'normal',\n fountweight: 'normal',\n },\n },\n title: {\n fontSize: '1.125rem',\n },\n action: {\n '& > a > span > svg': {\n fontSize: '1.125rem',\n },\n '& > a[class*=\"MuiIconButton-root\"]:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n };\n components.MuiCardContent = {\n styleOverrides: {\n root: {\n flexGrow: '1',\n backgroundColor: general.cardBackgroundColor,\n '& > div > div > h2[class*=\"MuiTypography-h2-\"]': {\n textTransform: 'unset',\n opacity: '40%',\n },\n '& > div > div > div[class*=\"MuiChip-sizeSmall\"]': {\n backgroundColor: 'transparent',\n borderRadius: '8px',\n outline: `1px solid ${general.disabled}`,\n },\n '& > div[class*=\"Mui-expanded\"]': {\n margin: 'auto',\n },\n '& > div[class*=\"MuiAccordion-root\"]:before': {\n height: 0,\n },\n // Override the default line-clamp from 10 to 2 for the Software template catalog\n '& > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-container-\"][class*=\"MuiGrid-spacing-xs-2-\"] > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-item-\"][class*=\"MuiGrid-grid-xs-12-\"] > div[class*=\"MuiBox-root-\"]':\n {\n '-webkit-line-clamp': '2',\n },\n },\n },\n };\n }\n\n // MUI table\n if (options.tables !== 'mui') {\n components.MuiTable = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n };\n components.MuiTableRow = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n '&:not([class*=\"MuiTableRow-footer\"]):hover': {\n backgroundColor: `${general.tableRowHover} !important`,\n },\n '& > th[class*=\"MuiTableCell-head\"]': {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n },\n };\n components.MuiTableCell = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n '&[class*=\"BackstageTableHeader-header\"]': {\n borderTop: 'unset',\n borderBottom: `1px solid ${general.tableBorderColor}`,\n },\n },\n head: {\n textTransform: 'unset !important',\n color: `${general.tableColumnTitleColor} !important`,\n '& > span[class*=\"MuiTableSortLabel-active\"]': {\n color: `${rhdhPrimary.main} !important`,\n },\n '& > span > svg[class*=\"MuiTableSortLabel-icon\"]': {\n color: 'inherit !important',\n },\n },\n body: {\n color: general.tableTitleColor,\n '& > div[class*=\"MuiChip-sizeSmall\"]': {\n margin: '2px',\n },\n },\n },\n };\n components.MuiTableFooter = {\n styleOverrides: {\n root: {\n '& > tr > td': {\n borderBottom: 'none',\n },\n },\n },\n };\n }\n\n // MUI toolbar\n if (options.toolbars !== 'mui') {\n components.MuiToolbar = {\n styleOverrides: {\n regular: {\n '& > div > h2[class*=\"MuiTypography-h5\"]': {\n fontSize: '1.25rem',\n color: general.tableTitleColor,\n },\n },\n },\n };\n }\n\n // MUI dialogs\n if (options.dialogs !== 'mui') {\n components.MuiDialogContent = {\n styleOverrides: {\n root: {\n '& > div': {\n backgroundColor: general.cardBackgroundColor,\n },\n },\n },\n };\n }\n\n // MUI tabs\n if (options.tabs !== 'mui') {\n components.MuiTabs = {\n defaultProps: {\n indicatorColor: 'primary',\n },\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${general.paperBorderColor}`,\n padding: '0 1.5rem',\n },\n vertical: {\n '& > div > div > button[class*=\"v5\"]': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n '& > div > div > button > span': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n borderBottom: `none`,\n borderLeft: `1px solid ${general.paperBorderColor}`,\n padding: 0,\n \"& span[class*='MuiTabs-indicator']\": {\n width: '3px',\n },\n },\n indicator: {\n left: 0,\n height: '3px',\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n fontWeight: '400',\n minWidth: 'initial !important',\n padding: '0.25em 1em',\n position: 'relative',\n textTransform: 'none',\n zIndex: 1,\n '&:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n top: '0.75em',\n left: '0.5em',\n right: '0.5em',\n bottom: '0.75em',\n borderRadius: '4px',\n zIndex: -1,\n },\n '&.Mui-selected': {\n color: `${palette.text?.primary} !important`,\n },\n '&[class*=\"v5\"]': {\n lineHeight: 1.75,\n },\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent !important',\n '&:before': {\n backgroundColor: general.tabsLinkHoverBackgroundColor,\n },\n },\n '&:disabled': {\n color: general.disabled,\n '&:before': {\n backgroundColor: general.disabledBackground,\n },\n },\n },\n },\n };\n\n // MUI Breadcrumbs\n if (options.breadcrumbs !== 'mui') {\n components.MuiBreadcrumbs = {\n defaultProps: {\n separator: '>',\n },\n styleOverrides: {\n separator: {\n fontWeight: 'bold',\n },\n root: {\n fontWeight: '400',\n },\n li: {\n fontSize: '0.875rem !important',\n fontStyle: 'normal !important',\n },\n },\n };\n }\n }\n\n //\n // Backstage\n //\n if (options.tabs !== 'mui') {\n components.BackstageHeaderTabs = {\n styleOverrides: {\n tabsWrapper: {\n paddingLeft: '0',\n backgroundColor: general.mainSectionBackgroundColor,\n },\n defaultTab: {\n textTransform: 'none',\n fontSize: '0.875rem',\n fontWeight: '400',\n color: 'unset',\n padding: '0.25em 1em',\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n const {\n sidebarBackgroundColor,\n sidebarItemInteractionBackgroundColor,\n navigationItemColor,\n navigationSelectedColor,\n } = resolveNavigationSidebarColors(themeConfig);\n\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n paddingBottom: '1.5rem',\n backgroundColor: sidebarBackgroundColor,\n alignItems: 'stretch',\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n '#rhdh-sidebar-layout & a[aria-current=\"page\"], & a[aria-current=\"page\"]':\n {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n '& .MuiTypography-root': {\n color: 'inherit !important',\n },\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 1rem) !important',\n marginLeft: '0.5rem !important',\n textDecorationLine: 'none',\n '&:hover, &:focus-visible': {\n backgroundColor: sidebarItemInteractionBackgroundColor,\n },\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.BackstageSidebarSubmenuItem = {\n styleOverrides: {\n selected: {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderColor: `${sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${navigationItemColor} !important`,\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderRadius: '6px',\n borderTop: '3px solid transparent !important', // default mui selected styling\n paddingTop: '6px !important', // default mui selected styling\n marginTop: '-1px !important', // default mui selected styling\n '&:hover, &:focus-visible': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n },\n '&.Mui-selected': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n },\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.RHDHPageWithoutFixHeight = {\n styleOverrides: {\n root: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-sidebar position.\n '@media (min-width: 600px)': {\n '#rhdh-above-sidebar-header-container:has(*) ~ #rhdh-sidebar-layout':\n {\n \"& main, & [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n sidebarLayout: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-main-content position.\n '@media (min-width: 600px)': {\n '#rhdh-above-main-content-header-container:has(*)': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n },\n };\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Controls the page inset as in PF6 -- only in desktop view\n '@media (min-width: 600px)': {\n backgroundColor:\n general.pageInsetBackgroundColor ?? general.appBarBackgroundColor,\n // Prevents the main content from scrolling weird\n overflowY: 'auto',\n // Cancel out the spacing produced by the page inset border when\n // the sidebar is present\n '& nav': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginLeft: '0 !important',\n },\n },\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n // clip-path clips the scrollbar properly in Chrome compared to\n // border-radius. 1rem is the hardcoded border-radius of the page content.\n clipPath: 'rect(0 100% 100% 0 round 1rem)',\n // Emulate the PatternFly 6 page inset using a margin\n margin: general.pageInset,\n // Prevent overflow in the main container due to the margin\n maxHeight: `calc(100vh - 2 * ${general.pageInset})`,\n },\n // Prevent TechDocs double scrollbar: the page-inset max-height puts\n // <main>'s scrollbar at the same position as the ToC sidebar scrollbar.\n // Letting <main> expand moves the scroll to the parent root instead.\n \"& > main:has([data-testid='techdocs-native-shadowroot'])\": {\n height: 'auto !important',\n maxHeight: 'none !important',\n borderRadius: '1rem',\n marginRight: '0.5rem',\n },\n // The Backstage suspense is an MUI LinearProgress that is not wrapped by\n // a `main`. We need to give it 100vh height to fill the page for the page\n // inset to look right.\n \"& > [class*='MuiLinearProgress-root']\": {\n backgroundColor: general.mainSectionBackgroundColor,\n height: '100vh',\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\n },\n },\n },\n },\n };\n components.BackstageContent = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n },\n };\n components.BackstageContentHeader = {\n styleOverrides: {\n leftItemsBox: {\n '& > h2[class*=\"BackstageContentHeader-title-\"][class*=\"MuiTypography-h4-\"]':\n {\n fontWeight: 'bold',\n fontSize: '1.75rem',\n },\n },\n },\n };\n }\n\n if (options.headers !== 'mui') {\n components.BackstageHeader = {\n styleOverrides: {\n header: {\n boxShadow: 'none',\n },\n title: {\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: '500',\n fontSize: '1.5rem',\n },\n },\n subtitle: {\n '&[class*=\"BackstageHeader-subtitle-\"]': {\n fontWeight: 'normal',\n fontSize: '0.875rem',\n opacity: 1,\n },\n },\n breadcrumb: {\n marginBottom: '0.5rem',\n },\n },\n };\n components.BreadcrumbsCurrentPage = {\n styleOverrides: {\n root: {\n '& p': {\n fontStyle: 'normal',\n fontSize: 'inherit',\n },\n },\n },\n };\n components.BackstageBreadcrumbsStyledBox = {\n styleOverrides: {\n root: {\n textDecoration: 'underline !important',\n color: palette.rhdh?.primary.main,\n '&:hover': {\n color: `color-mix(in srgb, ${palette.rhdh?.primary.main} 50%, ${palette.text?.primary})`,\n },\n },\n },\n };\n components.BackstageItemCardHeader = {\n styleOverrides: {\n root: {\n // This is required to increase the css specificity, to OVERRIDE the styles from\n // BackstageItemCardHeader (https://github.com/backstage/backstage/blob/master/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx)\n // These are applied with a CSS class as well.\n\n // This variant is used when running the Storybook locally (dev mode) and in Backstage/RHDH!\n '&[class*=\"MuiBox-root-\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n // This variant is used when building a static Storybook (`storybook:build`)\n '&[class~=\"MuiBox-root\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n '& > h3[class*=\"MuiTypography-subtitle2-\"] > div > div:first-child': {\n textTransform: 'capitalize',\n },\n },\n },\n };\n }\n\n if (options.toolbars !== 'mui') {\n components.BackstageTableToolbar = {\n styleOverrides: {\n root: {\n '& h2': {\n fontWeight: 'bold',\n },\n },\n title: {\n '& > h2': {\n fontWeight: 'bold',\n },\n },\n },\n };\n }\n\n //\n // Others\n //\n components.CatalogReactUserListPicker = {\n styleOverrides: {\n root: {\n borderRadius: '4px',\n },\n title: {\n textTransform: 'none',\n },\n },\n };\n\n if (options.tabs !== 'mui') {\n components.PrivateTabIndicator = {\n styleOverrides: {\n root: {\n height: '3px',\n zIndex: 1,\n },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":["backstageComponents"],"mappings":";;;;AAgDO,MAAM,gBAAA,GAAmB,CAAC,WAAA,KAAyC;AAGxE,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAY,EAAC;AACzC,EAAA,MAAM,aAAA,GAAgB,SAAS,YAAA,KAAiB,IAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAW,EAAC;AAExC,EAAA,MAAM,OAAA,GAAU,OAAA,CA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,YAAA,EAAc,CAAA,UAAA,EAAa,OAAA,CAAQ,eAAe,CAAA;AAAA,WACpD;AAAA,UACA,mEAAA,EAAqE;AAAA,YACnE,aAAA,EAAe;AAAA;AACjB;AACF;AACF,KACF;AAAA,EACF;AAEA,EAAA,IAAI,OAAA,CAAQ,aAAa,KAAA,EAAO;AAC9B,IAAA,UAAA,CAAW,qBAAA,GAAwB;AAAA,MACjC,cAAA,EAAgB;AAAA,QACd,IAAA,EAAM;AAAA,UACJ,MAAA,EAAQ;AAAA,YACN,UAAA,EAAY;AAAA;AACd,SACF;AAAA,QACA,KAAA,EAAO;AAAA,UACL,QAAA,EAAU;AAAA,YACR,UAAA,EAAY;AAAA;AACd;AACF;AACF,KACF;AAAA,EACF;AAKA,EAAA,UAAA,CAAW,0BAAA,GAA6B;AAAA,IACtC,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc;AAAA,OAChB;AAAA,MACA,KAAA,EAAO;AAAA,QACL,aAAA,EAAe;AAAA;AACjB;AACF,GACF;AAEA,EAAA,IAAI,OAAA,CAAQ,SAAS,KAAA,EAAO;AAC1B,IAAA,UAAA,CAAW,mBAAA,GAAsB;AAAA,MAC/B,cAAA,EAAgB;AAAA,QACd,IAAA,EAAM;AAAA,UACJ,MAAA,EAAQ,KAAA;AAAA,UACR,MAAA,EAAQ;AAAA,SACV;AAAA,QACA,QAAA,EAAU;AAAA,UACR,KAAA,EAAO;AAAA;AACT;AACF,KACF;AAAA,EACF;AAEA,EAAA,OAAO,UAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"createComponents.esm.js","sources":["../../src/utils/createComponents.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type UnifiedThemeOptions,\n defaultComponentThemes as backstageComponents,\n} from '@backstage/theme';\nimport { type CSSObject } from '@mui/material/styles';\n\nimport { ThemeConfig, ThemeConfigOptions, RHDHThemePalette } from '../types';\nimport { redHatFontFaces, redHatFonts } from '../fonts';\nimport { resolveNavigationSidebarColors } from './navigationSidebarColors';\n\nexport type Component = {\n defaultProps?: unknown;\n styleOverrides?: unknown;\n variants?: unknown;\n};\n\nexport type Components = UnifiedThemeOptions['components'] & {\n BackstageHeaderTabs?: Component;\n BackstageSidebar?: Component;\n BackstageSidebarItem?: Component;\n BackstageSidebarSubmenuItem?: Component;\n BackstagePage?: Component;\n BackstageContent?: Component;\n BackstageContentHeader?: Component;\n BackstageHeader?: Component;\n BackstageItemCardHeader?: Component;\n BackstageTableToolbar?: Component;\n CatalogReactUserListPicker?: Component;\n PrivateTabIndicator?: Component;\n RHDHPageWithoutFixHeight?: Component;\n};\n\nexport const createComponents = (themeConfig: ThemeConfig): Components => {\n // Short hands to ensure that the code doesn't break if one of the properties is not defined.\n\n const options = themeConfig.options ?? ({} as ThemeConfigOptions);\n const disableRipple = options?.rippleEffect !== 'on'; // by default ripple effect is disabled\n\n const palette = themeConfig.palette ?? {};\n\n const general = palette.rhdh?.general || ({} as RHDHThemePalette['general']);\n const rhdhPrimary =\n palette.rhdh?.primary || ({} as RHDHThemePalette['primary']);\n const rhdhSecondary =\n palette.rhdh?.secondary || ({} as RHDHThemePalette['secondary']);\n\n const components: Components = {};\n if (options.components === 'backstage' || options.components === 'mui') {\n return components;\n }\n\n //\n // MUI components\n //\n components.MuiCssBaseline = {\n styleOverrides: theme => {\n const backstageOverrides =\n backstageComponents!.MuiCssBaseline!.styleOverrides!;\n const backstageStyles =\n typeof backstageOverrides === 'function'\n ? (backstageOverrides(theme) as CSSObject)\n : (backstageOverrides as CSSObject);\n\n return {\n ...backstageStyles,\n '@font-face': redHatFontFaces,\n body: {\n ...(backstageStyles.body as CSSObject),\n fontFamily: redHatFonts.text,\n },\n 'h1, h2, h3, h4, h5, h6': {\n fontFamily: redHatFonts.heading,\n },\n 'pre, code': {\n fontFamily: redHatFonts.monospace,\n },\n \"[class*='BackstagePage-root-'] > [class*='MuiToolbar-root']\": {\n backgroundColor: theme.palette.background.paper,\n },\n };\n },\n };\n\n // MUI base\n if (options.buttons !== 'mui') {\n components.MuiTypography = {\n styleOverrides: {\n root: {\n fontFamily: redHatFonts.text,\n fontWeight: 'normal',\n letterSpacing: '0.01em',\n // This is required to override the default MUI styles\n // that set the `font-weight` to `500` for the `h1` element.\n '&.MuiTypography-h1': {\n fontWeight: 'normal',\n },\n },\n button: {\n textTransform: 'none',\n },\n },\n };\n }\n\n // MUI container\n if (options.paper !== 'mui') {\n const elevationStyle = {\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n '& > hr[class|=\"MuiDivider-root\"]': {\n backgroundColor: general.paperBorderColor,\n },\n };\n const noElevationStyle = {\n boxShadow: 'none',\n outline: 'none',\n };\n\n components.MuiPaper = {\n styleOverrides: {\n root: {\n // This works for all MUI v5 components, but in MUI v4\n boxShadow: 'none',\n outline: `1px solid ${general.paperBorderColor}`,\n // Required only for MUI v5 components because a gradient `backgroundImage`\n // overrides the default background.paper color otherwise.\n backgroundImage: general.paperBackgroundImage,\n // hide the first child element which is a divider with MuiDivider-root classname in MuiPaper\n '& > hr:first-child[class|=\"MuiDivider-root\"]': {\n height: 0,\n },\n },\n rounded: {\n '& > :last-child': {\n borderBottomLeftRadius: 16,\n borderBottomRightRadius: 16,\n },\n },\n elevation0: noElevationStyle,\n },\n };\n components.MuiPopover = {\n styleOverrides: {\n paper: {\n // Box shadow from PatternFly 5 (--pf-v5-global--BoxShadow--sm)\n boxShadow: general.popoverBoxShadow,\n // `Popover` has no outline by default, but since we're adding it to the `Paper`\n // components, this ensures that the `Popover` doesn't has a shadow and an outline.\n outline: 0,\n },\n },\n };\n\n // Required for MUI v4, not MUI v5\n const elevations = Array.from(\n { length: 24 },\n (_, i) => `elevation${i + 1}`,\n ) as 'elevation1'[];\n elevations.forEach(elevation => {\n components.MuiPaper!.styleOverrides![elevation] = elevationStyle;\n });\n }\n\n // MUI AppBar\n components.MuiAppBar = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n ...(options.appBar !== 'mui' && {\n backgroundColor: general.appBarBackgroundColor,\n backgroundImage: general.appBarBackgroundImage,\n outline: 'none',\n }),\n },\n },\n };\n\n // MUI buttons\n // Don't disableRipple for MuiButtonBase as it will affect all the buttons\n // and we need to ensure that the buttons have a right touch and focus styling.\n if (options.buttons !== 'mui') {\n components.MuiButton = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n textTransform: 'none',\n borderRadius: '3px',\n fontWeight: 'normal',\n },\n contained: {\n border: '0',\n borderRadius: '99em',\n boxShadow: 'none',\n '&:hover, &:focus-visible': {\n border: '0',\n boxShadow: 'none',\n },\n '&:-webkit-any-link:focus-visible': {\n outlineOffset: '0',\n },\n },\n containedPrimary: {\n borderRadius: '99em',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhPrimary.focusVisibleBorder}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n containedSecondary: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 1px ${rhdhSecondary.focusVisibleBorder}`,\n outline: `${rhdhSecondary.focusVisibleBorder} solid 1px`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroundColor: general.disabledBackground,\n },\n },\n outlined: {\n borderRadius: '99em',\n border: `1px solid color-mix(in srgb, currentColor 50%, transparent)`,\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n border: `1px solid`,\n },\n '&:disabled': {\n color: general.disabled,\n backgroudColor: general.disabledBackground,\n border: `1px solid ${general.disabledBackground}`,\n },\n },\n outlinedPrimary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n outlinedSecondary: {\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent',\n },\n },\n text: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${rhdhPrimary.main}`,\n outline: `${rhdhPrimary.focusVisibleBorder} solid 1px`,\n },\n },\n },\n };\n components.MuiToggleButton = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n },\n },\n };\n components.MuiIconButton = {\n styleOverrides: {\n root: {\n '&:disabled': {\n color: general.disabled,\n },\n },\n },\n };\n components.MuiLink = {\n styleOverrides: {\n underlineHover: {\n '&:hover, &:focus-visible': {\n textDecoration: 'none',\n },\n },\n },\n };\n }\n\n // MUI input fields\n if (options.inputs !== 'mui') {\n components.MuiInputBase = {\n styleOverrides: {\n input: {\n '&::placeholder': {\n color: general.disabled,\n opacity: 1,\n },\n },\n },\n };\n components.MuiOutlinedInput = {\n styleOverrides: {\n input: {\n '&:autofill': {\n boxShadow: `0 0 0 100px ${general.formControlBackgroundColor} inset`,\n borderRadius: 'unset',\n },\n },\n },\n };\n }\n\n if (options.checkbox !== 'mui') {\n components.MuiCheckbox = {\n defaultProps: {\n color: 'primary',\n },\n };\n }\n\n // MUI accordion\n if (options.accordions !== 'mui') {\n components.MuiAccordion = {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n },\n rounded: {\n '&:first-child': {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '0',\n borderBottomRightRadius: '0',\n },\n },\n },\n };\n }\n\n // MUI cards\n if (options.cards !== 'mui') {\n components.MuiCard = {\n styleOverrides: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: general.cardBackgroundColor,\n borderRadius: '16px',\n },\n },\n };\n components.MuiCardHeader = {\n styleOverrides: {\n content: {\n '& > span > nav span': {\n textTransform: 'unset',\n letterSpacing: 'normal',\n fountweight: 'normal',\n },\n },\n title: {\n fontSize: '1.125rem',\n },\n action: {\n '& > a > span > svg': {\n fontSize: '1.125rem',\n },\n '& > a[class*=\"MuiIconButton-root\"]:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n };\n components.MuiCardContent = {\n styleOverrides: {\n root: {\n flexGrow: '1',\n backgroundColor: general.cardBackgroundColor,\n '& > div > div > h2[class*=\"MuiTypography-h2-\"]': {\n textTransform: 'unset',\n opacity: '40%',\n },\n '& > div > div > div[class*=\"MuiChip-sizeSmall\"]': {\n backgroundColor: 'transparent',\n borderRadius: '8px',\n outline: `1px solid ${general.disabled}`,\n },\n '& > div[class*=\"Mui-expanded\"]': {\n margin: 'auto',\n },\n '& > div[class*=\"MuiAccordion-root\"]:before': {\n height: 0,\n },\n // Override the default line-clamp from 10 to 2 for the Software template catalog\n '& > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-container-\"][class*=\"MuiGrid-spacing-xs-2-\"] > div[class*=\"MuiGrid-root-\"][class*=\"MuiGrid-item-\"][class*=\"MuiGrid-grid-xs-12-\"] > div[class*=\"MuiBox-root-\"]':\n {\n '-webkit-line-clamp': '2',\n },\n },\n },\n };\n }\n\n // MUI table\n if (options.tables !== 'mui') {\n components.MuiTable = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n };\n components.MuiTableRow = {\n styleOverrides: {\n root: {\n backgroundColor: general.tableBackgroundColor,\n '&:not([class*=\"MuiTableRow-footer\"]):hover': {\n backgroundColor: `${general.tableRowHover} !important`,\n },\n '& > th[class*=\"MuiTableCell-head\"]': {\n backgroundColor: general.tableBackgroundColor,\n },\n },\n },\n };\n components.MuiTableCell = {\n styleOverrides: {\n root: {\n textTransform: 'none',\n '&[class*=\"BackstageTableHeader-header\"]': {\n borderTop: 'unset',\n borderBottom: `1px solid ${general.tableBorderColor}`,\n },\n },\n head: {\n textTransform: 'unset !important',\n color: `${general.tableColumnTitleColor} !important`,\n '& > span[class*=\"MuiTableSortLabel-active\"]': {\n color: `${rhdhPrimary.main} !important`,\n },\n '& > span > svg[class*=\"MuiTableSortLabel-icon\"]': {\n color: 'inherit !important',\n },\n },\n body: {\n color: general.tableTitleColor,\n '& > div[class*=\"MuiChip-sizeSmall\"]': {\n margin: '2px',\n },\n },\n },\n };\n components.MuiTableFooter = {\n styleOverrides: {\n root: {\n '& > tr > td': {\n borderBottom: 'none',\n },\n },\n },\n };\n }\n\n // MUI toolbar\n if (options.toolbars !== 'mui') {\n components.MuiToolbar = {\n styleOverrides: {\n regular: {\n '& > div > h2[class*=\"MuiTypography-h5\"]': {\n fontSize: '1.25rem',\n color: general.tableTitleColor,\n },\n },\n },\n };\n }\n\n // MUI dialogs\n if (options.dialogs !== 'mui') {\n components.MuiDialogContent = {\n styleOverrides: {\n root: {\n '& > div': {\n backgroundColor: general.cardBackgroundColor,\n },\n },\n },\n };\n }\n\n // MUI tabs\n if (options.tabs !== 'mui') {\n components.MuiTabs = {\n defaultProps: {\n indicatorColor: 'primary',\n },\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${general.paperBorderColor}`,\n padding: '0 1.5rem',\n },\n vertical: {\n '& > div > div > button[class*=\"v5\"]': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n '& > div > div > button > span': {\n alignItems: 'baseline',\n textAlign: 'left',\n },\n borderBottom: `none`,\n borderLeft: `1px solid ${general.paperBorderColor}`,\n padding: 0,\n \"& span[class*='MuiTabs-indicator']\": {\n width: '3px',\n },\n },\n indicator: {\n left: 0,\n height: '3px',\n },\n },\n };\n components.MuiTab = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n fontWeight: '400',\n minWidth: 'initial !important',\n padding: '0.25em 1em',\n position: 'relative',\n textTransform: 'none',\n zIndex: 1,\n '&:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n top: '0.75em',\n left: '0.5em',\n right: '0.5em',\n bottom: '0.75em',\n borderRadius: '4px',\n zIndex: -1,\n },\n '&.Mui-selected': {\n color: `${palette.text?.primary} !important`,\n },\n '&[class*=\"v5\"]': {\n lineHeight: 1.75,\n },\n '&:hover, &:focus-visible': {\n backgroundColor: 'transparent !important',\n '&:before': {\n backgroundColor: general.tabsLinkHoverBackgroundColor,\n },\n },\n '&:disabled': {\n color: general.disabled,\n '&:before': {\n backgroundColor: general.disabledBackground,\n },\n },\n },\n },\n };\n\n // MUI Breadcrumbs\n if (options.breadcrumbs !== 'mui') {\n components.MuiBreadcrumbs = {\n defaultProps: {\n separator: '>',\n },\n styleOverrides: {\n separator: {\n fontWeight: 'bold',\n },\n root: {\n fontWeight: '400',\n },\n li: {\n fontSize: '0.875rem !important',\n fontStyle: 'normal !important',\n },\n },\n };\n }\n }\n\n //\n // Backstage\n //\n if (options.tabs !== 'mui') {\n components.BackstageHeaderTabs = {\n styleOverrides: {\n tabsWrapper: {\n paddingLeft: '0',\n backgroundColor: general.mainSectionBackgroundColor,\n },\n defaultTab: {\n textTransform: 'none',\n fontSize: '0.875rem',\n fontWeight: '400',\n color: 'unset',\n padding: '0.25em 1em',\n },\n },\n };\n }\n\n if (options.sidebars !== 'mui') {\n const {\n sidebarBackgroundColor,\n sidebarItemInteractionBackgroundColor,\n navigationItemColor,\n navigationSelectedColor,\n } = resolveNavigationSidebarColors(themeConfig);\n\n components.BackstageSidebar = {\n styleOverrides: {\n drawer: {\n gap: '0.25rem',\n paddingBottom: '1.5rem',\n backgroundColor: sidebarBackgroundColor,\n alignItems: 'stretch',\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n '#rhdh-sidebar-layout & a[aria-current=\"page\"], & a[aria-current=\"page\"]':\n {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n '& .MuiTypography-root': {\n color: 'inherit !important',\n },\n },\n },\n },\n };\n components.BackstageSidebarItem = {\n styleOverrides: {\n root: {\n borderRadius: '6px',\n width: 'calc(100% - 1rem) !important',\n marginLeft: '0.5rem !important',\n textDecorationLine: 'none',\n '&:hover, &:focus-visible': {\n backgroundColor: sidebarItemInteractionBackgroundColor,\n },\n },\n label: {\n '&[class*=\"MuiTypography-subtitle2\"]': {\n fontWeight: 'normal',\n },\n },\n selected: {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.BackstageSidebarSubmenuItem = {\n styleOverrides: {\n selected: {\n background: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n };\n components.MuiBottomNavigation = {\n styleOverrides: {\n root: {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderColor: `${sidebarBackgroundColor} !important`,\n },\n },\n };\n components.MuiBottomNavigationAction = {\n defaultProps: {\n disableRipple,\n },\n styleOverrides: {\n root: {\n color: `${navigationItemColor} !important`,\n backgroundColor: `${sidebarBackgroundColor} !important`,\n borderRadius: '6px',\n borderTop: '3px solid transparent !important', // default mui selected styling\n paddingTop: '6px !important', // default mui selected styling\n marginTop: '-1px !important', // default mui selected styling\n '&:hover, &:focus-visible': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n },\n '&.Mui-selected': {\n backgroundColor: `${sidebarItemInteractionBackgroundColor} !important`,\n color: `${navigationSelectedColor} !important`,\n },\n },\n },\n };\n components.MuiDrawer = {\n styleOverrides: {\n root: {\n // undocumented Backstage makeStyles\n \"& [class*='makeStyles-overlay-']\": {\n backgroundColor: `${sidebarBackgroundColor} !important`,\n },\n '& hr': {\n backgroundColor: general.sidebarDividerColor,\n },\n },\n },\n };\n }\n\n if (options.pages !== 'mui') {\n components.RHDHPageWithoutFixHeight = {\n styleOverrides: {\n root: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-sidebar position.\n '@media (min-width: 600px)': {\n '#rhdh-above-sidebar-header-container:has(*) ~ #rhdh-sidebar-layout':\n {\n \"& main, & [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n sidebarLayout: {\n // Cancel out the spacing produced by the page inset border when\n // the global header is present in the above-main-content position.\n '@media (min-width: 600px)': {\n '#rhdh-above-main-content-header-container:has(*)': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginTop: '0 !important',\n },\n },\n },\n },\n },\n };\n components.BackstageIconLinkVertical = {\n styleOverrides: {\n label: {\n textTransform: 'none',\n },\n },\n };\n components.BackstageSidebarPage = {\n styleOverrides: {\n root: {\n // Fill the viewport so short pages don't leave a gap below the shell.\n // App root wrappers (e.g. ApplicationDrawer) can collapse to content\n // height; without a min-height here the page-inset background stops\n // early and body/html shows through (RHDHBUGS-3498).\n minHeight: '100vh',\n // Let BUI Container's flex: 1 grow into the remaining viewport below\n // PluginHeader / Header slots (those slots set flex: none).\n display: 'flex',\n flexDirection: 'column',\n // Controls the page inset as in PF6 -- only in desktop view\n '@media (min-width: 600px)': {\n backgroundColor:\n general.pageInsetBackgroundColor ?? general.appBarBackgroundColor,\n // Prevents the main content from scrolling weird\n overflowY: 'auto',\n // Cancel out the spacing produced by the page inset border when\n // the sidebar is present\n '& nav': {\n \"& ~ main, & ~ [class*='MuiLinearProgress-root']\": {\n marginLeft: '0 !important',\n },\n },\n \"& > [class*='MuiLinearProgress-root'], & > main\": {\n // clip-path clips the scrollbar properly in Chrome compared to\n // border-radius. 1rem is the hardcoded border-radius of the page content.\n clipPath: 'rect(0 100% 100% 0 round 1rem)',\n // Emulate the PatternFly 6 page inset using a margin\n margin: general.pageInset,\n // Fill the inset well so short pages use mainSectionBackgroundColor\n // (#292929) instead of leaving a pageInset (#151515) band below content.\n backgroundColor: general.mainSectionBackgroundColor,\n minHeight: `calc(100vh - 2 * ${general.pageInset})`,\n // Prevent overflow in the main container due to the margin\n maxHeight: `calc(100vh - 2 * ${general.pageInset})`,\n },\n // NFS BUI entity pages wrap PluginHeader + tabs + Container in a\n // classless <main>. BUI Container is flex: 1 1 0% but that only\n // grows when main is a flex column — otherwise Topology / Scorecard\n // stay content-height inside a tall well (RHDHBUGS-3543). Do not\n // override Backstage Page, which uses display:grid on <main>.\n '& > main:not([data-backstage-core-page])': {\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n minHeight: 0,\n maxHeight: `calc(100% - 2 * ${general.pageInset})`,\n },\n // NFS / BUI pages use Container instead of <main>. Match the content\n // well color (same token as BackstageContent) and rely on flex: 1\n // from BUI rather than 100vh so PluginHeader siblings are not overflowed.\n \"& > [class*='bui-Container']:not([class*='bui-Header'])\": {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // When a BackstagePage-root is present, the MUI page already has\n // its own header; hide the sibling BUI PluginHeader to avoid duplication.\n \"&:has([class*='BackstagePage-root']) > .bui-PluginHeader\": {\n display: 'none',\n },\n // Settings and other pages render BackstageContent as <article>.\n // Grow it to fill the flex column so pageInset doesn't show as a band.\n '& > article, & > [class*=\"BackstageContent-root\"]': {\n flex: 1,\n backgroundColor: general.mainSectionBackgroundColor,\n },\n // Prevent TechDocs double scrollbar: the page-inset max-height puts\n // <main>'s scrollbar at the same position as the ToC sidebar scrollbar.\n // Letting <main> expand moves the scroll to the parent root instead.\n \"& > main:has([data-testid='techdocs-native-shadowroot'])\": {\n height: 'auto !important',\n maxHeight: 'none !important',\n borderRadius: '1rem',\n marginRight: '0.5rem',\n },\n // The Backstage suspense is an MUI LinearProgress that is not wrapped by\n // a `main`. We need to give it 100vh height to fill the page for the page\n // inset to look right.\n \"& > [class*='MuiLinearProgress-root']\": {\n backgroundColor: general.mainSectionBackgroundColor,\n height: '100vh',\n \"& > [class*='MuiLinearProgress-']\": {\n height: '0.5rem !important',\n },\n },\n },\n },\n },\n };\n components.BackstageContent = {\n styleOverrides: {\n root: {\n backgroundColor: general.mainSectionBackgroundColor,\n },\n },\n };\n components.BackstageContentHeader = {\n styleOverrides: {\n leftItemsBox: {\n '& > h2[class*=\"BackstageContentHeader-title-\"][class*=\"MuiTypography-h4-\"]':\n {\n fontWeight: 'bold',\n fontSize: '1.75rem',\n },\n },\n },\n };\n }\n\n if (options.headers !== 'mui') {\n components.BackstageHeader = {\n styleOverrides: {\n header: {\n boxShadow: 'none',\n },\n title: {\n '&[class*=\"MuiTypography-h1-\"]': {\n fontWeight: '500',\n fontSize: '1.5rem',\n },\n },\n subtitle: {\n '&[class*=\"BackstageHeader-subtitle-\"]': {\n fontWeight: 'normal',\n fontSize: '0.875rem',\n opacity: 1,\n },\n },\n breadcrumb: {\n marginBottom: '0.5rem',\n },\n },\n };\n components.BreadcrumbsCurrentPage = {\n styleOverrides: {\n root: {\n '& p': {\n fontStyle: 'normal',\n fontSize: 'inherit',\n },\n },\n },\n };\n components.BackstageBreadcrumbsStyledBox = {\n styleOverrides: {\n root: {\n textDecoration: 'underline !important',\n color: palette.rhdh?.primary.main,\n '&:hover': {\n color: `color-mix(in srgb, ${palette.rhdh?.primary.main} 50%, ${palette.text?.primary})`,\n },\n },\n },\n };\n components.BackstageItemCardHeader = {\n styleOverrides: {\n root: {\n // This is required to increase the css specificity, to OVERRIDE the styles from\n // BackstageItemCardHeader (https://github.com/backstage/backstage/blob/master/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx)\n // These are applied with a CSS class as well.\n\n // This variant is used when running the Storybook locally (dev mode) and in Backstage/RHDH!\n '&[class*=\"MuiBox-root-\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n // This variant is used when building a static Storybook (`storybook:build`)\n '&[class~=\"MuiBox-root\"]': {\n color: palette.rhdh?.cards?.headerTextColor,\n backgroundColor: palette.rhdh?.cards?.headerBackgroundColor,\n backgroundImage: palette.rhdh?.cards?.headerBackgroundImage,\n borderBottom: `1px solid ${general.cardBorderColor}`,\n },\n '& > h3[class*=\"MuiTypography-subtitle2-\"] > div > div:first-child': {\n textTransform: 'capitalize',\n },\n },\n },\n };\n }\n\n if (options.toolbars !== 'mui') {\n components.BackstageTableToolbar = {\n styleOverrides: {\n root: {\n '& h2': {\n fontWeight: 'bold',\n },\n },\n title: {\n '& > h2': {\n fontWeight: 'bold',\n },\n },\n },\n };\n }\n\n //\n // Others\n //\n components.CatalogReactUserListPicker = {\n styleOverrides: {\n root: {\n borderRadius: '4px',\n },\n title: {\n textTransform: 'none',\n },\n },\n };\n\n if (options.tabs !== 'mui') {\n components.PrivateTabIndicator = {\n styleOverrides: {\n root: {\n height: '3px',\n zIndex: 1,\n },\n vertical: {\n width: '3px',\n },\n },\n };\n }\n\n return components;\n};\n"],"names":["backstageComponents"],"mappings":";;;;AAgDO,MAAM,gBAAA,GAAmB,CAAC,WAAA,KAAyC;AAGxE,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAY,EAAC;AACzC,EAAA,MAAM,aAAA,GAAgB,SAAS,YAAA,KAAiB,IAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,OAAA,IAAW,EAAC;AAExC,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC3C,EAAA,MAAM,WAAA,GACJ,OAAA,CAAQ,IAAA,EAAM,OAAA,IAAY,EAAC;AAC7B,EAAA,MAAM,aAAA,GACJ,OAAA,CAAQ,IAAA,EAAM,SAAA,IAAc,EAAC;AAE/B,EAAA,MAAM,aAAyB,EAAC;AAChC,EAAA,IAAI,OAAA,CAAQ,UAAA,KAAe,WAAA,IAAe,OAAA,CAAQ,eAAe,KAAA,EAAO;AACtE,IAAA,OAAO,UAAA;AAAA,EACT;AAKA,EAAA,UAAA,CAAW,cAAA,GAAiB;AAAA,IAC1B,gBAAgB,CAAA,KAAA,KAAS;AACvB,MAAA,MAAM,kBAAA,GACJA,uBAAqB,cAAA,CAAgB,cAAA;AACvC,MAAA,MAAM,kBACJ,OAAO,kBAAA,KAAuB,UAAA,GACzB,kBAAA,CAAmB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