@vitality-ds/system-react-native 5.6.0-alpha.2 → 5.6.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/dist/Provider/index.d.ts +7 -0
- package/dist/Provider/types.d.ts +7 -0
- package/dist/ThemeProvider/constants.d.ts +5 -0
- package/dist/ThemeProvider/hooks/useTheme.d.ts +3 -0
- package/dist/ThemeProvider/index.d.ts +5 -0
- package/dist/ThemeProvider/logic/getSavedTheme.d.ts +3 -0
- package/dist/ThemeProvider/logic/index.d.ts +1 -0
- package/dist/ThemeProvider/logic/setInitialState.d.ts +2 -0
- package/dist/ThemeProvider/logic/setSavedTheme.d.ts +3 -0
- package/dist/ThemeProvider/types.d.ts +15 -0
- package/dist/exclude-types.d.ts +26 -0
- package/dist/index.d.ts +9 -0
- package/dist/stitches.config.d.ts +3975 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +11 -0
- package/package.json +3 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AVAILABLE_THEMES_TYPE } from "../types";
|
|
2
|
+
import { UseTheme } from "./types";
|
|
3
|
+
export declare const DEFAULT_THEME_CONTEXT_VALUE: UseTheme;
|
|
4
|
+
export declare const DEFAULT_THEME_STORAGE_KEY = "vitality-app-theme";
|
|
5
|
+
export declare const AVAILABLE_THEMES: AVAILABLE_THEMES_TYPE;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ThemeProviderProps, UseTheme } from "./types";
|
|
3
|
+
declare const ThemeContext: React.Context<UseTheme>;
|
|
4
|
+
declare function ThemeProvider({ config, children, }: ThemeProviderProps): React.ReactElement;
|
|
5
|
+
export { ThemeProvider, ThemeContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as setInitialState } from "./setInitialState";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Appearance } from "react-native";
|
|
3
|
+
type Themes = NonNullable<Appearance.AppearancePreferences["colorScheme"]>;
|
|
4
|
+
export type ThemeProviderProps = {
|
|
5
|
+
config?: {
|
|
6
|
+
themeOverride?: Themes;
|
|
7
|
+
};
|
|
8
|
+
children: React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
export type UseTheme = {
|
|
11
|
+
theme: Themes;
|
|
12
|
+
setTheme: (newTheme: Themes) => void;
|
|
13
|
+
useSystemTheme: () => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type ExcludedStyleProps = {
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
className?: never;
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
style?: never;
|
|
10
|
+
};
|
|
11
|
+
type ExcludedStitchesProps = {
|
|
12
|
+
/**
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
css?: never;
|
|
16
|
+
/**
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
as?: never;
|
|
20
|
+
/**
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
asChild?: never;
|
|
24
|
+
};
|
|
25
|
+
export type ExcludedProps = ExcludedStyleProps & ExcludedStitchesProps;
|
|
26
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { colorUseCases, getColorScaleFromThemeObject, getColorScaleValueByUseCase, getUseCasesByStep } from "@vitality-ds/tokens";
|
|
2
|
+
export type { CreateStitches } from "stitches-rn-vitality";
|
|
3
|
+
export { styled, css, createTheme, config, theme, ThemeProvider, darkTheme, } from "./stitches.config";
|
|
4
|
+
export { default as Provider } from "./Provider";
|
|
5
|
+
export { ThemeContext } from "./ThemeProvider";
|
|
6
|
+
export type { ExcludedProps } from "./exclude-types";
|
|
7
|
+
export type { CSS, VariantProps, ComponentProps, CSSProperties, ScaleValue, } from "./types";
|
|
8
|
+
export { AVAILABLE_THEMES_TYPE } from "./types";
|
|
9
|
+
export { getColorScaleFromThemeObject, getColorScaleValueByUseCase, colorUseCases, getUseCasesByStep, };
|