@hopper-ui/styled-system 0.1.0 → 0.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 +6 -0
- package/dist/StyledSystemProvider-173b78af.d.ts +226 -0
- package/dist/StyledSystemProvider.css +1 -0
- package/dist/StyledSystemProvider.d.ts +3 -2
- package/dist/StyledSystemProvider.js +8 -8
- package/dist/index.css +1 -1
- package/dist/index.d.ts +6 -182
- package/dist/index.js +5 -5
- package/dist/{styled-system-props-56dad4e5.d.ts → styled-system-props-1c231c50.d.ts} +41 -33
- package/dist/styled-system-props.d.ts +1 -2
- package/dist/styled-system-root-css-class.js +2 -2
- package/dist/useStyledSystem.css +1 -1
- package/dist/useStyledSystem.d.ts +1 -2
- package/dist/useStyledSystem.js +1 -1
- package/package.json +4 -4
- package/dist/Breakpoints-9e8a6597.d.ts +0 -10
- package/dist/StyledSystemProvider-27d1981a.d.ts +0 -52
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
4
|
-
import { B as Breakpoint } from './Breakpoints-9e8a6597.js';
|
|
5
|
-
|
|
6
|
-
type ColorScheme = "light" | "dark";
|
|
7
|
-
type ColorSchemeOrSystem = ColorScheme | "system";
|
|
8
|
-
interface ColorSchemeContextType {
|
|
9
|
-
colorScheme: ColorScheme;
|
|
10
|
-
setColorScheme: (newColorScheme: ColorScheme) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ColorSchemeContext: react.Context<ColorSchemeContextType>;
|
|
13
|
-
declare function useColorSchemeContext(): ColorSchemeContextType;
|
|
14
|
-
|
|
15
|
-
declare const DefaultUnsupportedMatchMediaBreakpoint: Breakpoint;
|
|
16
|
-
interface BreakpointProviderProps {
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
unsupportedMatchMediaBreakpoint?: Breakpoint;
|
|
19
|
-
}
|
|
20
|
-
declare function BreakpointProvider({ children, unsupportedMatchMediaBreakpoint }: BreakpointProviderProps): react_jsx_runtime.JSX.Element;
|
|
21
|
-
|
|
22
|
-
interface StyledSystemProviderProps extends BreakpointProviderProps, ComponentProps<"div"> {
|
|
23
|
-
/** The children of the component */
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Determines whether the styles should be added to the document's body
|
|
27
|
-
* By default, it is set to `false`. If set to `true`, it will apply additional styling to the document's body.
|
|
28
|
-
*/
|
|
29
|
-
withBodyStyle?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* The color scheme to use.
|
|
32
|
-
*/
|
|
33
|
-
colorScheme: ColorSchemeOrSystem;
|
|
34
|
-
/**
|
|
35
|
-
* Default color scheme to use when a user preferred color scheme (system) is not available.
|
|
36
|
-
*/
|
|
37
|
-
defaultColorScheme?: ColorScheme;
|
|
38
|
-
/**
|
|
39
|
-
* Determines whether token CSS variables should be added to the document's head
|
|
40
|
-
* By default, it is set to `true`, you should not change it unless you want to manage CSS variables via `.css` files
|
|
41
|
-
*/
|
|
42
|
-
withCssVariables?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* StyledSystemProvider is required to be rendered at the root of your application. It is responsible for:
|
|
46
|
-
* - Adding CSS variables to the document
|
|
47
|
-
* - Managing color scheme (light, dark, auto)
|
|
48
|
-
* - Optionally adding body styles to the document
|
|
49
|
-
*/
|
|
50
|
-
declare function StyledSystemProvider({ children, withBodyStyle, withCssVariables, colorScheme, defaultColorScheme, unsupportedMatchMediaBreakpoint, className, ...rest }: StyledSystemProviderProps): react_jsx_runtime.JSX.Element;
|
|
51
|
-
|
|
52
|
-
export { BreakpointProviderProps as B, ColorSchemeOrSystem as C, DefaultUnsupportedMatchMediaBreakpoint as D, StyledSystemProviderProps as S, ColorScheme as a, ColorSchemeContextType as b, ColorSchemeContext as c, BreakpointProvider as d, StyledSystemProvider as e, useColorSchemeContext as u };
|