Grafana UI: Clean up bundle (#56100)

* chore(grafana-ui): don't bundle emotionPerfTest

* chore(grafana-ui): fix circular dependencies that cause esm chunks to not match up

* chore(grafana-ui): prevent bundling all css properties in package types
This commit is contained in:
Jack Westbrook 2022-10-04 17:51:45 +02:00 committed by GitHub
parent a50017da1d
commit d7228829ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -2,8 +2,10 @@ import React, { HTMLProps } from 'react';
import { escapeStringForRegex, unEscapeStringFromRegex } from '@grafana/data';
import { Button, Icon, Input } from '..';
import { useCombinedRefs } from '../../utils/useCombinedRefs';
import { Button } from '../Button';
import { Icon } from '../Icon/Icon';
import { Input } from '../Input/Input';
export interface Props extends Omit<HTMLProps<HTMLInputElement>, 'onChange'> {
value: string | undefined;

View File

@ -13,7 +13,7 @@ export default function resetSelectStyles(theme: GrafanaTheme2) {
groupHeading: () => ({}),
indicatorsContainer: () => ({}),
indicatorSeparator: () => ({}),
input: function (originalStyles: CSSObjectWithLabel) {
input: function (originalStyles: CSSObjectWithLabel): CSSObjectWithLabel {
return {
...originalStyles,
color: 'inherit',
@ -34,7 +34,7 @@ export default function resetSelectStyles(theme: GrafanaTheme2) {
multiValueRemove: () => ({}),
noOptionsMessage: () => ({}),
option: () => ({}),
placeholder: (originalStyles: CSSObjectWithLabel) => ({
placeholder: (originalStyles: CSSObjectWithLabel): CSSObjectWithLabel => ({
...originalStyles,
color: theme.colors.text.disabled,
}),

View File

@ -273,7 +273,6 @@ export { useGraphNGContext } from './GraphNG/hooks';
export { preparePlotFrame, buildScaleKey } from './GraphNG/utils';
export { type GraphNGLegendEvent } from './GraphNG/types';
export * from './PanelChrome/types';
export { EmotionPerfTest } from './ThemeDemos/EmotionPerfTest';
export { Label as BrowserLabel } from './BrowserLabel/Label';
export { PanelContainer } from './PanelContainer/PanelContainer';
export * from './QueryEditor';

View File

@ -1,6 +1,7 @@
import React, { FC } from 'react';
import { EmotionPerfTest, VerticalGroup } from '@grafana/ui';
import { VerticalGroup } from '@grafana/ui';
import { EmotionPerfTest } from '@grafana/ui/src/components/ThemeDemos/EmotionPerfTest';
export const BenchmarksPage: FC = () => {
return (