diff --git a/src/@types/storybook-chromatic/index.d.ts b/src/@types/storybook-chromatic/index.d.ts new file mode 100644 index 0000000000..3354ff5d90 --- /dev/null +++ b/src/@types/storybook-chromatic/index.d.ts @@ -0,0 +1,3 @@ +declare module 'storybook-chromatic' { + export default function isChromatic(): boolean; +} \ No newline at end of file diff --git a/src/js/components/Box/index.d.ts b/src/js/components/Box/index.d.ts index cdcb635a56..5593fa8328 100644 --- a/src/js/components/Box/index.d.ts +++ b/src/js/components/Box/index.d.ts @@ -16,10 +16,6 @@ import { ColorType, } from "../../utils"; -type SideType = "top" | "left" | "bottom" | "right" | "horizontal" | "vertical" | "all"; -type SizeType = "xsmall" | "small" | "medium" | "large" | "xlarge" | string; -type StyleType = "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset" | "hidden"; - export interface BoxProps { a11yTitle?: A11yTitleType; alignSelf?: AlignSelfType; diff --git a/src/js/components/FormField/stories/typescript/CustomTheme.tsx b/src/js/components/FormField/stories/typescript/CustomTheme.tsx index 278fc660d1..8384556b7f 100644 --- a/src/js/components/FormField/stories/typescript/CustomTheme.tsx +++ b/src/js/components/FormField/stories/typescript/CustomTheme.tsx @@ -21,7 +21,6 @@ const customFormFieldTheme: ThemeType = { size: 'xsmall', margin: { vertical: '0', bottom: 'small', horizontal: '0' }, weight: 600, - extend: 'shimi', }, border: false, margin: '0', diff --git a/src/js/components/List/index.d.ts b/src/js/components/List/index.d.ts index 887e57902f..d02da1afc1 100644 --- a/src/js/components/List/index.d.ts +++ b/src/js/components/List/index.d.ts @@ -18,7 +18,7 @@ export interface ListProps { itemProps?: { [_:string]: { background?: string, border?: BorderType, pad?: PadType}}; margin?: MarginType; onMore?: () => void; - onClickItem?: (event: React.ClickEvent) => void; + onClickItem?: (event: React.MouseEvent) => void; pad?: PadType; primaryKey?: string | ((...args: any[]) => any); secondaryKey?: string | ((...args: any[]) => any); diff --git a/src/js/default-props.d.ts b/src/js/default-props.d.ts new file mode 100644 index 0000000000..b351bd3ffc --- /dev/null +++ b/src/js/default-props.d.ts @@ -0,0 +1,7 @@ +import { base, ThemeType } from "./themes/base"; + +export namespace defaultProps { + export { base as theme }; +} + +export function extendDefaultTheme(theme: ThemeType): void; diff --git a/src/js/themes/base.d.ts b/src/js/themes/base.d.ts index 7ae07eac36..da0f61d706 100644 --- a/src/js/themes/base.d.ts +++ b/src/js/themes/base.d.ts @@ -6,9 +6,9 @@ import { GapType, MarginType, OpacityType, - PadType, - TextProps, + PadType, } from '../utils' +import { TextProps } from '../components/Text'; import { ReactComponentElement } from 'react'; export declare const base: DeepReadonly; @@ -42,7 +42,7 @@ type Colors = typeof colors & { 'dark-1'?: ColorType; 'dark-2'?: ColorType; 'dark-3'?: ColorType; - 'dark-4'?: string; + 'dark-4'?: ColorType; 'dark-5'?: ColorType; 'dark-6'?: ColorType; 'light-1'?: ColorType; diff --git a/src/js/utils/index.d.ts b/src/js/utils/index.d.ts index 332480fcee..d26884e9b6 100644 --- a/src/js/utils/index.d.ts +++ b/src/js/utils/index.d.ts @@ -35,13 +35,17 @@ declare const removeUndefined: (obj: T) => NonUndefinedProps