@clickhouse/click-ui 0.0.234-sc-deprecation.6 → 0.0.234-sc-deprecation.8
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/README.md +16 -1
- package/dist/click-ui.bundled.es.js +6356 -6302
- package/dist/click-ui.bundled.umd.js +45 -25
- package/dist/click-ui.es.js +6356 -6302
- package/dist/click-ui.umd.js +45 -25
- package/dist/components/Link/linkStyles.d.ts +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/theme/utils/css-generator.d.ts +12 -0
- package/package.json +14 -2
- package/dist/theme/hooks/useSystemTheme.d.ts +0 -3
- package/dist/theme/utils/themeClasses.d.ts +0 -26
|
@@ -2,5 +2,17 @@ import { NestedJSONObject, Theme } from '../types';
|
|
|
2
2
|
|
|
3
3
|
export declare const generateCSSVariables: (obj: Theme | NestedJSONObject) => string;
|
|
4
4
|
export declare const themeToFlatVariables: (theme: Theme) => Record<string, string>;
|
|
5
|
+
/**
|
|
6
|
+
* Generate CSS variables with light-dark() for colors and fallback handling for non-colors
|
|
7
|
+
* Returns an object with base variables and any theme-specific overrides needed
|
|
8
|
+
*/
|
|
5
9
|
export declare const generateLightDarkVariables: (lightTheme: Theme, darkTheme: Theme) => Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Generate separate theme-specific overrides for non-color variables that differ
|
|
12
|
+
* This is needed when non-color values differ between themes and light-dark() can't be used
|
|
13
|
+
*/
|
|
14
|
+
export declare const generateThemeOverrides: (lightTheme: Theme, darkTheme: Theme) => {
|
|
15
|
+
light: Record<string, string>;
|
|
16
|
+
dark: Record<string, string>;
|
|
17
|
+
};
|
|
6
18
|
export declare const injectThemeStyles: (theme: Theme, resolvedTheme: string, isSystem?: boolean, systemLightTheme?: Theme, systemDarkTheme?: Theme, lightTheme?: Theme, darkTheme?: Theme) => void;
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickhouse/click-ui",
|
|
3
|
-
"version": "0.0.234-sc-deprecation.
|
|
3
|
+
"version": "0.0.234-sc-deprecation.8",
|
|
4
4
|
"description": "Official ClickHouse design system react library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css",
|
|
9
|
+
"**/*.scss",
|
|
10
|
+
"./dist/style.css",
|
|
11
|
+
"./src/theme/global.scss"
|
|
12
|
+
],
|
|
7
13
|
"files": [
|
|
8
14
|
"dist",
|
|
9
15
|
"bin"
|
|
@@ -24,7 +30,8 @@
|
|
|
24
30
|
},
|
|
25
31
|
"./theme": {
|
|
26
32
|
"types": "./dist/theme/index.d.ts"
|
|
27
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"./style.css": "./dist/style.css"
|
|
28
35
|
},
|
|
29
36
|
"main": "./dist/click-ui.umd.js",
|
|
30
37
|
"module": "./dist/click-ui.es.js",
|
|
@@ -123,5 +130,10 @@
|
|
|
123
130
|
"dayjs": "^1.11.18",
|
|
124
131
|
"react": "^18.2.0 || ^19.0.0",
|
|
125
132
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
133
|
+
},
|
|
134
|
+
"peerDependenciesMeta": {
|
|
135
|
+
"dayjs": {
|
|
136
|
+
"optional": true
|
|
137
|
+
}
|
|
126
138
|
}
|
|
127
139
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BaseThemeName } from '../types';
|
|
2
|
-
|
|
3
|
-
export type ThemeProp = "light" | "dark";
|
|
4
|
-
/**
|
|
5
|
-
* Get color-scheme value for a theme
|
|
6
|
-
* @returns "light" or "dark"
|
|
7
|
-
*/
|
|
8
|
-
export declare function getColorScheme(theme?: ThemeProp | BaseThemeName): "light" | "dark";
|
|
9
|
-
/**
|
|
10
|
-
* Get inline styles for theme application
|
|
11
|
-
* @returns Style object with colorScheme property
|
|
12
|
-
*/
|
|
13
|
-
export declare function getThemeStyles(theme?: ThemeProp | BaseThemeName): {
|
|
14
|
-
colorScheme: "light" | "dark";
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Theme utility hook for components
|
|
18
|
-
* Resolves theme prop against context theme
|
|
19
|
-
*/
|
|
20
|
-
export declare function useThemeUtils(themeProp?: ThemeProp, contextTheme?: BaseThemeName): {
|
|
21
|
-
theme: ThemeProp | BaseThemeName;
|
|
22
|
-
style: {
|
|
23
|
-
colorScheme: "light" | "dark";
|
|
24
|
-
};
|
|
25
|
-
colorScheme: "light" | "dark";
|
|
26
|
-
};
|