neko-ui 2.0.2 → 2.0.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/lib/cron/index.d.ts +1 -1
- package/lib/cron/item.d.ts +4 -5
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -1
- package/lib/theme/index.d.ts +53 -41
- package/lib/tree/index.d.ts +1 -1
- package/package.json +2 -2
package/lib/theme/index.d.ts
CHANGED
|
@@ -1,43 +1,60 @@
|
|
|
1
|
+
import { type Accessor, type Setter } from 'solid-js';
|
|
1
2
|
export { toneColor } from '@moneko/common';
|
|
2
|
-
/**
|
|
3
|
+
/** 生成主题色调
|
|
4
|
+
* @param {string} base 基础颜色
|
|
5
|
+
* @param {ThemeOption} option 配置项
|
|
6
|
+
* @returns {Record<string, string>} 主题色调
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateTheme(base: string, option: ThemeOption): Record<string, string>;
|
|
9
|
+
/** 颜色模式 */
|
|
3
10
|
export declare enum ColorScheme {
|
|
4
11
|
/** 明亮 */
|
|
5
12
|
light = "light",
|
|
6
13
|
/** 暗黑 */
|
|
7
|
-
dark = "dark"
|
|
14
|
+
dark = "dark",
|
|
15
|
+
/** 跟随系统 */
|
|
16
|
+
auto = "auto"
|
|
17
|
+
}
|
|
18
|
+
/** API */
|
|
19
|
+
export interface Theme {
|
|
20
|
+
/** 亮色样式的主要色 */
|
|
21
|
+
light: Accessor<Color>;
|
|
22
|
+
/** 设置亮色样式的主要色 */
|
|
23
|
+
setLight: Setter<Color>;
|
|
24
|
+
/** 黑色样式的主要色 */
|
|
25
|
+
dark: Accessor<Color>;
|
|
26
|
+
/** 设置黑色样式的主要色 */
|
|
27
|
+
setDark: Setter<Color>;
|
|
28
|
+
/** 颜色模式
|
|
29
|
+
* @default 'auto'
|
|
30
|
+
*/
|
|
31
|
+
scheme: Accessor<keyof typeof ColorScheme>;
|
|
32
|
+
/** 设置颜色模式 */
|
|
33
|
+
setScheme: Setter<keyof typeof ColorScheme>;
|
|
34
|
+
/** 是否为色模式 */
|
|
35
|
+
isDark: Accessor<boolean>;
|
|
36
|
+
/** 基本都样式表, 响应 scheme 变化 */
|
|
37
|
+
baseStyle: Accessor<string>;
|
|
38
|
+
}
|
|
39
|
+
/** 主要色 */
|
|
40
|
+
interface Color {
|
|
41
|
+
/** 主要
|
|
42
|
+
* @default '#5794ff'
|
|
43
|
+
*/
|
|
44
|
+
primary: string;
|
|
45
|
+
/** 警告
|
|
46
|
+
* @default '#faad14'
|
|
47
|
+
*/
|
|
48
|
+
warning: string;
|
|
49
|
+
/** 错误
|
|
50
|
+
* @default '#ff4d4f'
|
|
51
|
+
*/
|
|
52
|
+
error: string;
|
|
53
|
+
/** 成功
|
|
54
|
+
* @default '#52c41a'
|
|
55
|
+
*/
|
|
56
|
+
success: string;
|
|
8
57
|
}
|
|
9
|
-
/** 共享的颜色方案 */
|
|
10
|
-
export declare const theme: {
|
|
11
|
-
scheme: ColorScheme;
|
|
12
|
-
light: {
|
|
13
|
-
primary: string;
|
|
14
|
-
warning: string;
|
|
15
|
-
error: string;
|
|
16
|
-
success: string;
|
|
17
|
-
};
|
|
18
|
-
dark: {
|
|
19
|
-
primary: string;
|
|
20
|
-
warning: string;
|
|
21
|
-
error: string;
|
|
22
|
-
success: string;
|
|
23
|
-
};
|
|
24
|
-
tokens: {};
|
|
25
|
-
}, setTheme: import("solid-js/store").SetStoreFunction<{
|
|
26
|
-
scheme: ColorScheme;
|
|
27
|
-
light: {
|
|
28
|
-
primary: string;
|
|
29
|
-
warning: string;
|
|
30
|
-
error: string;
|
|
31
|
-
success: string;
|
|
32
|
-
};
|
|
33
|
-
dark: {
|
|
34
|
-
primary: string;
|
|
35
|
-
warning: string;
|
|
36
|
-
error: string;
|
|
37
|
-
success: string;
|
|
38
|
-
};
|
|
39
|
-
tokens: {};
|
|
40
|
-
}>;
|
|
41
58
|
export interface ThemeOption {
|
|
42
59
|
/** 是否采用暗色算法
|
|
43
60
|
* @default false
|
|
@@ -46,10 +63,5 @@ export interface ThemeOption {
|
|
|
46
63
|
/** 颜色名称 */
|
|
47
64
|
name: string;
|
|
48
65
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param {ThemeOption} option 配置项
|
|
52
|
-
* @returns {Record<string, string>} 主题色调
|
|
53
|
-
*/
|
|
54
|
-
export declare function generateTheme(base: string, option: ThemeOption): Record<string, string>;
|
|
55
|
-
export declare const baseStyle: import("solid-js").Accessor<string>;
|
|
66
|
+
declare const _default: Theme;
|
|
67
|
+
export default _default;
|
package/lib/tree/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export interface TreeMultipleStringProps extends TreeMultipleBaseProps {
|
|
|
76
76
|
/** 数据源 */
|
|
77
77
|
data: string;
|
|
78
78
|
}
|
|
79
|
-
declare function Tree(
|
|
79
|
+
declare function Tree(_: TreeProps | TreeMultipleProps | TreeMultipleSchemaProps | TreeSchemaProps | TreeMultipleStringProps | TreeStringProps): import("solid-js").JSX.Element;
|
|
80
80
|
export type TreeElement = CustomElement<TreeProps>;
|
|
81
81
|
export type TreeSchemaElement = CustomElement<TreeSchemaProps>;
|
|
82
82
|
export type TreeStringElement = CustomElement<TreeStringProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neko-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Web Components UI Libraries",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@moneko/core": "3.0.0-beta.74",
|
|
40
40
|
"@moneko/css": "1.0.5",
|
|
41
41
|
"@moneko/postcss": "1.0.30",
|
|
42
|
-
"@moneko/solid-js": "1.0.
|
|
42
|
+
"@moneko/solid-js": "1.0.18",
|
|
43
43
|
"@solidjs/testing-library": "0.8.4",
|
|
44
44
|
"@swc/jest": "0.2.27",
|
|
45
45
|
"@testing-library/jest-dom": "5.17.0",
|