@actinc/dls
Version:
Design Language System (DLS) for ACT & Encoura front-end projects.
90 lines (83 loc) • 4.36 kB
TypeScript
/**
* Copyright (c) ACT, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {
ComponentsOverrides,
ComponentsVariants,
Theme as MuiTheme,
} from '@mui/material/styles';
import { AreaChartProps } from '../components/AreaChart';
import { BarChartProps } from '../components/BarChart';
import { HeatMapProps } from '../components/HeatMap';
import { LineChartProps } from '../components/LineChart';
import { MapProps } from '../components/Map';
import { OverlappedBarChartProps } from '../components/OverlappedBarChart';
import { PieChartProps } from '../components/PieChart';
import { ScatterPlotProps } from '../components/ScatterPlot';
import { StackedBarChartProps } from '../components/StackedBarChart';
import DLS_COMPONENT_NAMES from '../constants/DLS_COMPONENT_NAMES';
type Theme = Omit<MuiTheme, 'components'>;
declare module '@mui/material/styles' {
interface ComponentNameToClassKey {}
interface ComponentsPropsList {
[]: Partial<AreaChartProps>;
[]: Partial<BarChartProps>;
[]: Partial<HeatMapProps>;
[]: Partial<LineChartProps>;
[]: Partial<MapProps>;
[]: Partial<OverlappedBarChartProps>;
[]: Partial<PieChartProps>;
[]: Partial<ScatterPlotProps>;
[]: Partial<StackedBarChartProps>;
}
interface Components {
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.AREA_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.AREA_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.AREA_CHART];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.BAR_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.BAR_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.BAR_CHART];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.HEAT_MAP];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.HEAT_MAP];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.HEAT_MAP];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.LINE_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.LINE_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.LINE_CHART];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.MAP];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.MAP];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.MAP];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.OVERLAPPED_BAR_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.OVERLAPPED_BAR_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.OVERLAPPED_BAR_CHART];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.PIE_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.PIE_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.PIE_CHART];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.SCATTER_PLOT];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.SCATTER_PLOT];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.SCATTER_PLOT];
};
[]?: {
defaultProps?: ComponentsPropsList[typeof DLS_COMPONENT_NAMES.STACKED_BAR_CHART];
styleOverrides?: ComponentsOverrides<Theme>[typeof DLS_COMPONENT_NAMES.STACKED_BAR_CHART];
variants?: ComponentsVariants[typeof DLS_COMPONENT_NAMES.STACKED_BAR_CHART];
};
}
}