1 | import { jsx as coreJsx } from '@theme-ui/core'
|
2 | import type { ThemeUIJSX, ThemeUIStyleObject } from '@theme-ui/core'
|
3 | import type { Theme } from '@theme-ui/core'
|
4 |
|
5 | export {
|
6 | __ThemeUIContext,
|
7 | merge,
|
8 | useThemeUI,
|
9 | createElement,
|
10 | } from '@theme-ui/core'
|
11 | export type {
|
12 | ThemeUIContextValue,
|
13 | SxProp,
|
14 | ColorMode,
|
15 | ColorModesScale,
|
16 | CSSObject,
|
17 | CSSProperties,
|
18 | CSSPseudoSelectorProps,
|
19 | ResponsiveStyleValue,
|
20 | ThemeUICSSProperties,
|
21 | ThemeUIStyleObject,
|
22 | ThemeUICSSObject,
|
23 | ThemeStyles,
|
24 | TLengthStyledSystem,
|
25 | StylePropertyValue,
|
26 | } from '@theme-ui/core'
|
27 | export type { Theme } from '@theme-ui/core'
|
28 |
|
29 | export { useColorMode, InitializeColorMode } from '@theme-ui/color-modes'
|
30 | export { ThemeUIProvider, ThemeProvider } from '@theme-ui/theme-provider'
|
31 | export { default as Global } from '@theme-ui/global'
|
32 | export * from '@theme-ui/components'
|
33 | export { css, get } from '@theme-ui/css'
|
34 |
|
35 | export const BaseStyles = (
|
36 | props: Record<string, unknown> & { sx?: ThemeUIStyleObject<Theme> }
|
37 | ): JSX.Element =>
|
38 | jsx('div', {
|
39 | ...props,
|
40 | sx: {
|
41 | fontFamily: 'body',
|
42 | lineHeight: 'body',
|
43 | fontWeight: 'body',
|
44 | variant: 'styles',
|
45 | ...props.sx,
|
46 | },
|
47 | })
|
48 |
|
49 | export const jsx = coreJsx
|
50 |
|
51 | export declare namespace jsx {
|
52 | export namespace JSX {
|
53 | export interface Element extends ThemeUIJSX.Element {}
|
54 | export interface ElementClass extends ThemeUIJSX.ElementClass {}
|
55 | export interface ElementAttributesProperty
|
56 | extends ThemeUIJSX.ElementAttributesProperty {}
|
57 | export interface ElementChildrenAttribute
|
58 | extends ThemeUIJSX.ElementChildrenAttribute {}
|
59 | export type LibraryManagedAttributes<C, P> =
|
60 | ThemeUIJSX.LibraryManagedAttributes<C, P>
|
61 | export interface IntrinsicAttributes
|
62 | extends ThemeUIJSX.IntrinsicAttributes {}
|
63 | export interface IntrinsicClassAttributes<T>
|
64 | extends ThemeUIJSX.IntrinsicClassAttributes<T> {}
|
65 | export interface IntrinsicElements extends ThemeUIJSX.IntrinsicElements {}
|
66 | }
|
67 | }
|