@sybilion/uilib 1.2.8 → 1.2.10
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/esm/components/ui/NavUserHeader/NavUserHeader.js +8 -3
- package/dist/esm/components/widgets/SignInPage/SignInPage.js +25 -0
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.js +2 -2
- package/dist/esm/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.js +8 -0
- package/dist/esm/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.styl.js +7 -0
- package/dist/esm/components/widgets/SybilionAuthLayout/SybilionAuthLayout.js +16 -0
- package/dist/esm/components/widgets/SybilionAuthLayout/SybilionAuthLayout.styl.js +7 -0
- package/dist/esm/components/widgets/SybilionSignInPanel/SybilionSignInPanel.js +11 -0
- package/dist/esm/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.js +7 -0
- package/dist/esm/contexts/theme-context.js +44 -0
- package/dist/esm/docs/lib/theme.js +35 -3
- package/dist/esm/index.js +6 -0
- package/dist/esm/types/src/components/ui/NavUserHeader/NavUserHeader.d.ts +1 -1
- package/dist/esm/types/src/components/ui/NavUserHeader/NavUserHeader.types.d.ts +3 -0
- package/dist/esm/types/src/components/widgets/SignInPage/SignInPage.d.ts +10 -0
- package/dist/esm/types/src/components/widgets/SignInPage/index.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/SybilionAppHeader/SybilionAppHeader.d.ts +5 -1
- package/dist/esm/types/src/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/SybilionAuthLayout/SybilionAuthLayout.d.ts +14 -0
- package/dist/esm/types/src/components/widgets/SybilionAuthLayout/index.d.ts +2 -0
- package/dist/esm/types/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.d.ts +11 -0
- package/dist/esm/types/src/components/widgets/SybilionSignInPanel/index.d.ts +1 -0
- package/dist/esm/types/src/contexts/theme-context.d.ts +20 -0
- package/dist/esm/types/src/docs/contexts/theme-context.d.ts +1 -10
- package/dist/esm/types/src/docs/lib/theme.d.ts +5 -1
- package/dist/esm/types/src/index.d.ts +5 -0
- package/docs/standalone-apps.md +58 -37
- package/package.json +3 -2
- package/src/assets/sybilion_bg.svg +8 -0
- package/src/components/ui/NavUserHeader/NavUserHeader.tsx +10 -2
- package/src/components/ui/NavUserHeader/NavUserHeader.types.ts +3 -0
- package/src/components/widgets/SignInPage/SignInPage.tsx +84 -0
- package/src/components/widgets/SignInPage/index.ts +1 -0
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.tsx +8 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.styl +26 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.styl.d.ts +2 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthHeadline.tsx +18 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthLayout.styl +79 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthLayout.styl.d.ts +2 -0
- package/src/components/widgets/SybilionAuthLayout/SybilionAuthLayout.tsx +64 -0
- package/src/components/widgets/SybilionAuthLayout/index.ts +6 -0
- package/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl +51 -0
- package/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.d.ts +2 -0
- package/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.tsx +59 -0
- package/src/components/widgets/SybilionSignInPanel/index.ts +4 -0
- package/src/contexts/theme-context.tsx +106 -0
- package/src/docs/App/ThemeToggle.tsx +1 -1
- package/src/docs/contexts/theme-context.tsx +8 -68
- package/src/docs/index.tsx +1 -1
- package/src/docs/lib/theme.ts +13 -2
- package/src/docs/pages/ChartAreaInteractivePage.tsx +1 -1
- package/src/index.ts +5 -0
- package/dist/esm/docs/contexts/theme-context.js +0 -14
package/src/docs/lib/theme.ts
CHANGED
|
@@ -7,6 +7,12 @@ const defaultConfig = getConfig();
|
|
|
7
7
|
|
|
8
8
|
const alphaMods = [0, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
9
9
|
|
|
10
|
+
export const DEFAULT_THEME_ACTIVE_COLOR = '#9c59ff';
|
|
11
|
+
|
|
12
|
+
export type GetThemeConfigOptions = {
|
|
13
|
+
activeColor?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
10
16
|
export const colorsConfig = {
|
|
11
17
|
light: {
|
|
12
18
|
...ThemeHelpers.colorsConfigToVars({
|
|
@@ -26,13 +32,18 @@ export const colorsConfig = {
|
|
|
26
32
|
},
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
export function getThemeConfig(
|
|
35
|
+
export function getThemeConfig(
|
|
36
|
+
isDarkTheme: boolean,
|
|
37
|
+
options?: GetThemeConfigOptions,
|
|
38
|
+
) {
|
|
39
|
+
const activeColor = options?.activeColor ?? DEFAULT_THEME_ACTIVE_COLOR;
|
|
40
|
+
|
|
30
41
|
return {
|
|
31
42
|
...defaultConfig,
|
|
32
43
|
...colorsConfig[isDarkTheme ? 'dark' : 'light'],
|
|
33
44
|
...ThemeHelpers.colorsConfigToVars({
|
|
34
45
|
active: {
|
|
35
|
-
color:
|
|
46
|
+
color: activeColor,
|
|
36
47
|
mods: {
|
|
37
48
|
// @ts-ignore
|
|
38
49
|
alpha: alphaMods,
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
import { ForecastItemData } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
10
10
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
11
11
|
import { Tabs, TabsList, TabsTrigger } from '#uilib/components/ui/Tabs';
|
|
12
|
-
import { useTheme } from '#uilib/
|
|
12
|
+
import { useTheme } from '#uilib/contexts/theme-context';
|
|
13
13
|
import type { ForecastData } from '#uilib/types/forecast-data';
|
|
14
14
|
|
|
15
15
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './contexts/theme-context';
|
|
2
|
+
export { DEFAULT_THEME_ACTIVE_COLOR } from './docs/lib/theme';
|
|
1
3
|
export * from './sybilion-auth';
|
|
2
4
|
export * from './types/sybilionDatasetSnapshots';
|
|
3
5
|
export * from './contexts/chat-context';
|
|
@@ -58,3 +60,6 @@ export * from './components/ui/VimeoEmbed';
|
|
|
58
60
|
export * from './components/ui/WorkspaceAppSwitcher';
|
|
59
61
|
export * from './components/widgets/SidebarDatasetsItemsGrouped';
|
|
60
62
|
export * from './components/widgets/SybilionAppHeader';
|
|
63
|
+
export * from './components/widgets/SybilionAuthLayout';
|
|
64
|
+
export * from './components/widgets/SybilionSignInPanel';
|
|
65
|
+
export * from './components/widgets/SignInPage';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useContext } from 'react';
|
|
3
|
-
import '@homecode/ui';
|
|
4
|
-
import '../lib/theme.js';
|
|
5
|
-
|
|
6
|
-
const ThemeContext = createContext({
|
|
7
|
-
theme: 'light',
|
|
8
|
-
isDarkMode: false,
|
|
9
|
-
setTheme: () => { },
|
|
10
|
-
toggleTheme: () => { },
|
|
11
|
-
});
|
|
12
|
-
const useTheme = () => useContext(ThemeContext);
|
|
13
|
-
|
|
14
|
-
export { useTheme };
|