@ghostly-solutions/ui 0.2.2 → 0.2.3
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/theme.d.ts +32 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
declare const ColorScheme: {
|
|
3
|
+
readonly light: "light";
|
|
4
|
+
readonly dark: "dark";
|
|
5
|
+
readonly system: "system";
|
|
6
|
+
};
|
|
7
|
+
type ColorSchemeValue = (typeof ColorScheme)[keyof typeof ColorScheme];
|
|
8
|
+
type ResolvedColorScheme = "light" | "dark";
|
|
9
|
+
interface ThemeContextValue {
|
|
10
|
+
theme: string;
|
|
11
|
+
setTheme: (theme: string) => void;
|
|
12
|
+
colorScheme: ColorSchemeValue;
|
|
13
|
+
setColorScheme: (scheme: ColorSchemeValue) => void;
|
|
14
|
+
resolvedColorScheme: ResolvedColorScheme;
|
|
15
|
+
toggleColorScheme: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const ThemeContext: import("react").Context<ThemeContextValue | null>;
|
|
18
|
+
interface ThemeProviderProps {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
defaultTheme?: string;
|
|
21
|
+
defaultColorScheme?: ColorSchemeValue;
|
|
22
|
+
enableTransition?: boolean;
|
|
23
|
+
transitionDuration?: number;
|
|
24
|
+
storageKey?: string | false;
|
|
25
|
+
}
|
|
26
|
+
declare const ThemeProvider: {
|
|
27
|
+
({ children, defaultTheme, defaultColorScheme, enableTransition, transitionDuration, storageKey, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
declare const useTheme: () => ThemeContextValue;
|
|
31
|
+
export { ColorScheme, ThemeContext, ThemeProvider, useTheme, type ColorSchemeValue, type ResolvedColorScheme, type ThemeContextValue, type ThemeProviderProps, };
|
|
32
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EAQd,MAAM,OAAO,CAAC;AAIf,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,KAAK,gBAAgB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AACvE,KAAK,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAC;AA2D5C,UAAU,iBAAiB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,mDAAqD,CAAC;AAExE,UAAU,kBAAkB;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa;wGAOhB,kBAAkB;;CA0FpB,CAAC;AAIF,QAAA,MAAM,QAAQ,QAAO,iBAMpB,CAAC;AAEF,OAAO,EACN,WAAW,EACX,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACvB,CAAC"}
|