@red-hat-developer-hub/backstage-plugin-theme 1.1.0 → 1.2.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 +16 -0
- package/config.schema.json +552 -0
- package/dist/components/ThemeProvider.esm.js +25 -0
- package/dist/components/ThemeProvider.esm.js.map +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.d.ts +25 -1
- package/dist/legacy.esm.js +2 -1
- package/dist/legacy.esm.js.map +1 -1
- package/dist/utils/buiTokensToCSS.esm.js +27 -0
- package/dist/utils/buiTokensToCSS.esm.js.map +1 -0
- package/dist/utils/createComponents.esm.js +10 -0
- package/dist/utils/createComponents.esm.js.map +1 -1
- package/package.json +15 -15
- package/config.d.ts +0 -181
package/config.d.ts
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// Types are inlined to avoid importing from the package entry point,
|
|
18
|
-
// which pulls in @mui/material types that break ts-json-schema-generator
|
|
19
|
-
// (typeof window.matchMedia has no value declaration).
|
|
20
|
-
// Keep in sync with ThemeConfig and related types in src/types.ts.
|
|
21
|
-
|
|
22
|
-
export interface Config {
|
|
23
|
-
app?: {
|
|
24
|
-
branding?: {
|
|
25
|
-
/**
|
|
26
|
-
* Theme configuration.
|
|
27
|
-
* @deepVisibility frontend
|
|
28
|
-
*/
|
|
29
|
-
theme?: {
|
|
30
|
-
[key: string]: {
|
|
31
|
-
/**
|
|
32
|
-
* Optional key to load different defaults.
|
|
33
|
-
* Fallbacks to the latest 'rhdh' theme if not defined.
|
|
34
|
-
*/
|
|
35
|
-
variant?: 'rhdh' | 'backstage';
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Light or dark theme.
|
|
39
|
-
* Automatically selects 'dark' if the theme name contains the keyword "dark".
|
|
40
|
-
*/
|
|
41
|
-
mode?: 'light' | 'dark';
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Palette configuration. Accepts standard Backstage/MUI palette options
|
|
45
|
-
* plus an optional 'rhdh' key for RHDH-specific palette extensions.
|
|
46
|
-
*/
|
|
47
|
-
palette?: {
|
|
48
|
-
rhdh?: {
|
|
49
|
-
general?: {
|
|
50
|
-
pageInset?: string;
|
|
51
|
-
pageInsetBackgroundColor?: string;
|
|
52
|
-
disabled?: string;
|
|
53
|
-
disabledBackground?: string;
|
|
54
|
-
paperBackgroundImage?: string;
|
|
55
|
-
paperBorderColor?: string;
|
|
56
|
-
popoverBoxShadow?: string;
|
|
57
|
-
cardBackgroundColor?: string;
|
|
58
|
-
cardBorderColor?: string;
|
|
59
|
-
mainSectionBackgroundColor?: string;
|
|
60
|
-
formControlBackgroundColor?: string;
|
|
61
|
-
sidebarBackgroundColor?: string;
|
|
62
|
-
sidebarDividerColor?: string;
|
|
63
|
-
sidebarItemSelectedBackgroundColor?: string;
|
|
64
|
-
tableTitleColor?: string;
|
|
65
|
-
tableSubtitleColor?: string;
|
|
66
|
-
tableColumnTitleColor?: string;
|
|
67
|
-
tableRowHover?: string;
|
|
68
|
-
tableBorderColor?: string;
|
|
69
|
-
tableBackgroundColor?: string;
|
|
70
|
-
tabsLinkHoverBackgroundColor?: string;
|
|
71
|
-
contrastText?: string;
|
|
72
|
-
appBarBackgroundScheme?: 'light' | 'dark';
|
|
73
|
-
appBarBackgroundColor?: string;
|
|
74
|
-
appBarForegroundColor?: string;
|
|
75
|
-
appBarBackgroundImage?: string;
|
|
76
|
-
starredItemsColor?: string;
|
|
77
|
-
};
|
|
78
|
-
primary?: {
|
|
79
|
-
main?: string;
|
|
80
|
-
focusVisibleBorder?: string;
|
|
81
|
-
};
|
|
82
|
-
secondary?: {
|
|
83
|
-
main?: string;
|
|
84
|
-
focusVisibleBorder?: string;
|
|
85
|
-
};
|
|
86
|
-
cards?: {
|
|
87
|
-
headerTextColor?: string;
|
|
88
|
-
headerBackgroundColor?: string;
|
|
89
|
-
headerBackgroundImage?: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
[key: string]: unknown;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/** Font family for the theme. */
|
|
96
|
-
fontFamily?: string;
|
|
97
|
-
|
|
98
|
-
/** Base HTML font size in pixels. */
|
|
99
|
-
htmlFontSize?: number;
|
|
100
|
-
|
|
101
|
-
/** Typography configuration for headings and base font settings. */
|
|
102
|
-
typography?: {
|
|
103
|
-
htmlFontSize?: number;
|
|
104
|
-
fontFamily?: string;
|
|
105
|
-
h1?: {
|
|
106
|
-
fontFamily?: string;
|
|
107
|
-
fontSize?: number | string;
|
|
108
|
-
fontWeight?: number;
|
|
109
|
-
marginBottom?: number;
|
|
110
|
-
};
|
|
111
|
-
h2?: {
|
|
112
|
-
fontFamily?: string;
|
|
113
|
-
fontSize?: number | string;
|
|
114
|
-
fontWeight?: number;
|
|
115
|
-
marginBottom?: number;
|
|
116
|
-
};
|
|
117
|
-
h3?: {
|
|
118
|
-
fontFamily?: string;
|
|
119
|
-
fontSize?: number | string;
|
|
120
|
-
fontWeight?: number;
|
|
121
|
-
marginBottom?: number;
|
|
122
|
-
};
|
|
123
|
-
h4?: {
|
|
124
|
-
fontFamily?: string;
|
|
125
|
-
fontSize?: number | string;
|
|
126
|
-
fontWeight?: number;
|
|
127
|
-
marginBottom?: number;
|
|
128
|
-
};
|
|
129
|
-
h5?: {
|
|
130
|
-
fontFamily?: string;
|
|
131
|
-
fontSize?: number | string;
|
|
132
|
-
fontWeight?: number;
|
|
133
|
-
marginBottom?: number;
|
|
134
|
-
};
|
|
135
|
-
h6?: {
|
|
136
|
-
fontFamily?: string;
|
|
137
|
-
fontSize?: number | string;
|
|
138
|
-
fontWeight?: number;
|
|
139
|
-
marginBottom?: number;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/** Default page theme name. */
|
|
144
|
-
defaultPageTheme?: string;
|
|
145
|
-
|
|
146
|
-
/** Page theme configurations keyed by theme name. */
|
|
147
|
-
pageTheme?: {
|
|
148
|
-
[key: string]: {
|
|
149
|
-
backgroundColor?: string | string[];
|
|
150
|
-
colors?: string | string[];
|
|
151
|
-
shape?: string;
|
|
152
|
-
backgroundImage?: string;
|
|
153
|
-
fontColor?: string;
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
/** UI component style options. */
|
|
158
|
-
options?: {
|
|
159
|
-
components?: 'rhdh' | 'backstage' | 'mui';
|
|
160
|
-
rippleEffect?: 'on' | 'off';
|
|
161
|
-
paper?: 'patternfly' | 'mui';
|
|
162
|
-
buttons?: 'patternfly' | 'mui';
|
|
163
|
-
inputs?: 'patternfly' | 'mui';
|
|
164
|
-
checkbox?: 'patternfly' | 'mui';
|
|
165
|
-
accordions?: 'patternfly' | 'mui';
|
|
166
|
-
sidebars?: 'patternfly' | 'mui';
|
|
167
|
-
pages?: 'patternfly' | 'mui';
|
|
168
|
-
headers?: 'patternfly' | 'mui';
|
|
169
|
-
toolbars?: 'patternfly' | 'mui';
|
|
170
|
-
dialogs?: 'patternfly' | 'mui';
|
|
171
|
-
cards?: 'patternfly' | 'mui';
|
|
172
|
-
tables?: 'patternfly' | 'mui';
|
|
173
|
-
tabs?: 'patternfly' | 'mui';
|
|
174
|
-
appBar?: 'patternfly' | 'mui';
|
|
175
|
-
breadcrumbs?: 'patternfly' | 'mui';
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
}
|