@redis-ui/styles 13.2.0 → 14.5.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/fonts.css +3 -5
- package/dist/hooks/ThemeModeSwitching/SwitchableModeThemeProvider.d.ts +2 -0
- package/dist/hooks/ThemeModeSwitching/ThemeModeSwitching.context.d.ts +3 -0
- package/dist/hooks/ThemeModeSwitching/ThemeModeSwitching.types.d.ts +29 -0
- package/dist/hooks/ThemeModeSwitching/index.d.ts +4 -0
- package/dist/hooks/ThemeModeSwitching/useThemeModeSwitchingManager.d.ts +9 -0
- package/dist/hooks/useStorage.d.ts +9 -0
- package/dist/index.d.ts +3 -8
- package/dist/index.js +2258 -1416
- package/dist/index.umd.cjs +21 -19
- package/dist/normalized-styles.css +0 -4
- package/dist/themes/index.d.ts +5 -0
- package/dist/themes/themeDark/theme/components/layouts.d.ts +3 -0
- package/dist/themes/themeDark/theme/components/midBar.d.ts +3 -0
- package/dist/themes/themeDark/theme/components/themeModeSwitch.d.ts +3 -0
- package/dist/themes/themeDark2/theme/components/layouts.d.ts +3 -0
- package/dist/themes/themeDark2/theme/components/midBar.d.ts +3 -0
- package/dist/themes/themeDark2/theme/components/themeModeSwitch.d.ts +3 -0
- package/dist/themes/themeLight/theme/components/layouts.d.ts +3 -0
- package/dist/themes/themeLight/theme/components/midBar.d.ts +3 -0
- package/dist/themes/themeLight/theme/components/themeModeSwitch.d.ts +3 -0
- package/dist/themes/themeLight/tokens.d.ts +11 -0
- package/dist/themes/themeLight2/theme/components/layouts.d.ts +3 -0
- package/dist/themes/themeLight2/theme/components/midBar.d.ts +3 -0
- package/dist/themes/themeLight2/theme/components/themeModeSwitch.d.ts +3 -0
- package/dist/themes/types/index.d.ts +3 -0
- package/dist/themes/types/theme/components/index.d.ts +3 -0
- package/dist/themes/types/theme/components/input.types.d.ts +3 -0
- package/dist/themes/types/theme/components/layouts.types.d.ts +14 -0
- package/dist/themes/types/theme/components/midBar.types.d.ts +13 -0
- package/dist/themes/types/theme/components/table.types.d.ts +46 -0
- package/dist/themes/types/theme/components/textButton.types.d.ts +11 -5
- package/dist/themes/types/theme/components/themeModeSwitch.types.d.ts +15 -0
- package/dist/themes/types/theme/theme.types.d.ts +6 -3
- package/dist/themes/types/theme/themeCore.types.d.ts +9 -0
- package/dist/utils.d.ts +35 -0
- package/package.json +1 -1
- package/dist/hooks/ThemeSwitch/SwitchableThemeProvider.d.ts +0 -20
- package/dist/hooks/ThemeSwitch/index.d.ts +0 -3
- package/dist/hooks/ThemeSwitch/useStorage.d.ts +0 -9
- package/dist/hooks/ThemeSwitch/useThemeSelector.d.ts +0 -26
package/dist/fonts.css
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
5
|
-
}
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600&display=swap');
|
|
2
|
+
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300..700&display=swap');
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { SwitchableModeThemeProviderProps } from './ThemeModeSwitching.types';
|
|
2
|
+
export declare const SwitchableModeThemeProvider: ({ children, storageKey, lightTheme, darkTheme, allowSystemThemeMode, defaultThemeMode }: SwitchableModeThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ThemeModeSwitchingContextParams, ThemeModeSwitchingProviderProps } from './ThemeModeSwitching.types';
|
|
2
|
+
export declare const ThemeModeSwitchingProvider: ({ children, ...restProps }: ThemeModeSwitchingProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const useThemeModeSwitchingContext: () => ThemeModeSwitchingContextParams;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeMode, Theme } from '../../themes';
|
|
3
|
+
/** Theme modes that can be selected by user */
|
|
4
|
+
export type UserThemeMode = ThemeMode | 'system';
|
|
5
|
+
export declare const ThemeModes: {
|
|
6
|
+
readonly System: "system";
|
|
7
|
+
readonly Light: "light";
|
|
8
|
+
readonly Dark: "dark";
|
|
9
|
+
};
|
|
10
|
+
export type SwitchableModeThemeProviderProps = UseThemeModeSwitchingManagerParams & {
|
|
11
|
+
storageKey: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
lightTheme: Theme;
|
|
14
|
+
darkTheme: Theme;
|
|
15
|
+
};
|
|
16
|
+
export interface ThemeModeSwitchingContextParams {
|
|
17
|
+
userThemeMode: UserThemeMode | undefined;
|
|
18
|
+
setUserThemeMode: (newThemeMode: UserThemeMode | undefined) => boolean;
|
|
19
|
+
toggleAppThemeMode: VoidFunction;
|
|
20
|
+
getNextThemeModeToToggle: (currentThemeMode: UserThemeMode | undefined) => ThemeMode | undefined;
|
|
21
|
+
allowSystemThemeMode?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ThemeModeSwitchingProviderProps extends ThemeModeSwitchingContextParams {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export type UseThemeModeSwitchingManagerParams = {
|
|
27
|
+
allowSystemThemeMode?: boolean;
|
|
28
|
+
defaultThemeMode?: UserThemeMode;
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UserThemeMode, UseThemeModeSwitchingManagerParams } from './ThemeModeSwitching.types';
|
|
2
|
+
import { ThemeMode } from '../../themes';
|
|
3
|
+
export declare const useThemeModeSwitchingManager: ({ allowSystemThemeMode, defaultThemeMode }: UseThemeModeSwitchingManagerParams) => {
|
|
4
|
+
readonly setUserThemeMode: (newThemeMode: UserThemeMode | (string & NonNullable<unknown>) | undefined) => boolean;
|
|
5
|
+
readonly toggleAppThemeMode: () => void;
|
|
6
|
+
readonly getNextThemeModeToToggle: (currentThemeMode: UserThemeMode | undefined) => "light" | "dark";
|
|
7
|
+
readonly userThemeMode: UserThemeMode | undefined;
|
|
8
|
+
readonly appThemeMode: ThemeMode | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type UseStorageParams = {
|
|
2
|
+
storageKey: string;
|
|
3
|
+
value: string | undefined;
|
|
4
|
+
onChange: (value: string | undefined) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const useStorage: ({ value, storageKey, onChange }: UseStorageParams) => {
|
|
7
|
+
readFromStorage: () => string | undefined;
|
|
8
|
+
saveToStorage: (newValue: string | undefined) => void;
|
|
9
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { theme as themeLight } from './themes/themeLight/theme';
|
|
3
|
-
export { theme as themeDark } from './themes/themeDark/theme';
|
|
4
|
-
export { theme as themeLight2 } from './themes/themeLight2/theme';
|
|
5
|
-
export { theme as themeDark2 } from './themes/themeDark2/theme';
|
|
6
|
-
export * from './themes/types';
|
|
7
|
-
export * from './themes/types/theme/components';
|
|
1
|
+
export * from './themes';
|
|
8
2
|
export * from './hooks/useTheme';
|
|
3
|
+
export * from './hooks/useStorage';
|
|
9
4
|
export * from './utils';
|
|
10
5
|
export * from './focus-indicator';
|
|
11
|
-
export * from './hooks/
|
|
6
|
+
export * from './hooks/ThemeModeSwitching';
|
|
12
7
|
export * from './commonStyles';
|