zs_library 0.6.3 → 0.6.4
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/components/desktop/context/config/hooks.d.ts +13 -1
- package/dist/components/desktop/context-menu/content.d.ts +6 -0
- package/dist/components/desktop/context-menu/hover-context.d.ts +5 -0
- package/dist/components/desktop/context-menu/index.d.ts +8 -0
- package/dist/components/desktop/context-menu/menu-item.d.ts +10 -0
- package/dist/components/desktop/context-menu/size-sub-menu-content.d.ts +6 -0
- package/dist/components/desktop/context-menu/sub-menu-item.d.ts +9 -0
- package/dist/components/desktop/dock/dock.d.ts +8 -8
- package/dist/components/desktop/dock/stacked-icon.d.ts +5 -0
- package/dist/components/desktop/items/sortable-item.d.ts +1 -0
- package/dist/components/desktop/sortable.d.ts +1 -25
- package/dist/components/desktop/themes/index.d.ts +94 -11
- package/dist/components/desktop/themes/utils.d.ts +6 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2665 -2450
- package/package.json +1 -1
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { Theme } from '../../themes';
|
|
2
|
+
export declare const useSortableConfig: () => {
|
|
3
|
+
theme: Theme;
|
|
4
|
+
noLetters?: boolean;
|
|
5
|
+
typeConfigMap?: import('../..').TypeConfigMap;
|
|
6
|
+
dataTypeMenuConfigMap?: import('../..').DataTypeMenuConfigMap;
|
|
7
|
+
contextMenu?: false | import('../../context-menu').ContextMenuProps<any, any> | ((data: import('../..').SortItem<any, any>) => false | import('../../context-menu').ContextMenuProps<any, any>) | undefined;
|
|
8
|
+
pagingDotsBuilder?: (dots: React.ReactNode) => React.JSX.Element;
|
|
9
|
+
pagingDotBuilder?: ((item: import('../..').ListItem<any, any>, index: number, isActive: boolean) => React.JSX.Element) | undefined;
|
|
10
|
+
itemBuilder?: ((item: import('../..').SortItem<any, any>) => React.ReactNode) | undefined;
|
|
11
|
+
itemIconBuilder?: ((item: import('../..').SortItem<any, any>) => React.ReactNode) | undefined;
|
|
12
|
+
contextMenuBuilder?: ((data: import('../..').SortItem<any, any>) => import('../../context-menu').ContextMenuProps<any, any>) | undefined;
|
|
13
|
+
};
|
|
@@ -12,3 +12,11 @@ export interface ContextMenuProps<D, C> {
|
|
|
12
12
|
}
|
|
13
13
|
declare const ContextMenu: <D, C>(props: ContextMenuProps<D, C>) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default ContextMenu;
|
|
15
|
+
export { MenuItem } from './menu-item';
|
|
16
|
+
export { SubMenuItem } from './sub-menu-item';
|
|
17
|
+
export { SizeSubMenuContent } from './size-sub-menu-content';
|
|
18
|
+
export { HoverContext } from './hover-context';
|
|
19
|
+
export type { MenuItemProps } from './menu-item';
|
|
20
|
+
export type { SubMenuItemProps } from './sub-menu-item';
|
|
21
|
+
export type { SizeMenuItemProps } from './size-sub-menu-content';
|
|
22
|
+
export type { HoverContextType } from './hover-context';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface MenuItemProps {
|
|
2
|
+
icon?: React.ReactNode;
|
|
3
|
+
text: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
index: number;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const MenuItem: ({ icon, text, color, textColor, onClick, index, children, ...props }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SubMenuItemProps {
|
|
2
|
+
text: string;
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
index: number;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
color?: string;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SubMenuItem: ({ text, icon, index, children, color, textColor, ...props }: SubMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SortItem } from '../types';
|
|
3
|
-
export interface DockProps {
|
|
3
|
+
export interface DockProps<D, C> {
|
|
4
4
|
/**
|
|
5
5
|
* dock 项目列表
|
|
6
6
|
*/
|
|
7
|
-
items?: SortItem[];
|
|
7
|
+
items?: SortItem<D, C>[];
|
|
8
8
|
/**
|
|
9
9
|
* 固定项目列表(在sortable之前显示,不可拖拽排序)
|
|
10
10
|
*/
|
|
11
|
-
fixedItems?: SortItem[];
|
|
11
|
+
fixedItems?: SortItem<D, C>[];
|
|
12
12
|
/**
|
|
13
13
|
* dock 位置
|
|
14
14
|
*/
|
|
@@ -20,15 +20,15 @@ export interface DockProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* dock 项目点击事件
|
|
22
22
|
*/
|
|
23
|
-
onItemClick?: (item: SortItem) => void;
|
|
23
|
+
onItemClick?: (item: SortItem<D, C>) => void;
|
|
24
24
|
/**
|
|
25
25
|
* 自定义项目渲染
|
|
26
26
|
*/
|
|
27
|
-
itemBuilder?: (item: SortItem, index: number) => React.ReactNode;
|
|
27
|
+
itemBuilder?: (item: SortItem<D, C>, index: number) => React.ReactNode;
|
|
28
28
|
/**
|
|
29
29
|
* 自定义固定项目渲染
|
|
30
30
|
*/
|
|
31
|
-
fixedItemBuilder?: (item: SortItem, index: number) => React.ReactNode;
|
|
31
|
+
fixedItemBuilder?: (item: SortItem<D, C>, index: number) => React.ReactNode;
|
|
32
32
|
/**
|
|
33
33
|
* 是否显示启动台按钮
|
|
34
34
|
*/
|
|
@@ -44,7 +44,7 @@ export interface DockProps {
|
|
|
44
44
|
/**
|
|
45
45
|
* dock 项目列表变更事件
|
|
46
46
|
*/
|
|
47
|
-
onDockItemsChange?: (items: SortItem[]) => void;
|
|
47
|
+
onDockItemsChange?: (items: SortItem<D, C>[]) => void;
|
|
48
48
|
}
|
|
49
|
-
declare const Dock:
|
|
49
|
+
declare const Dock: <D, C>({ items, fixedItems, position, className, itemBuilder, fixedItemBuilder, showLaunchpad, onLaunchpadClick, onDrop, onDockItemsChange, }: DockProps<D, C>) => import("react/jsx-runtime").JSX.Element | null;
|
|
50
50
|
export default Dock;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from '../themes';
|
|
2
3
|
export interface StackedIconProps {
|
|
3
4
|
/**
|
|
4
5
|
* 点击事件
|
|
@@ -8,6 +9,10 @@ export interface StackedIconProps {
|
|
|
8
9
|
* 自定义类名
|
|
9
10
|
*/
|
|
10
11
|
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 主题配置
|
|
14
|
+
*/
|
|
15
|
+
theme?: Theme;
|
|
11
16
|
}
|
|
12
17
|
declare const StackedIcon: React.FC<StackedIconProps>;
|
|
13
18
|
export default StackedIcon;
|
|
@@ -39,31 +39,7 @@ export interface SortableProps<D, C> {
|
|
|
39
39
|
* 是否显示 dock
|
|
40
40
|
*/
|
|
41
41
|
enabled?: boolean;
|
|
42
|
-
|
|
43
|
-
* dock 位置
|
|
44
|
-
*/
|
|
45
|
-
position?: "top" | "bottom" | "left" | "right";
|
|
46
|
-
/**
|
|
47
|
-
* dock 样式类名
|
|
48
|
-
*/
|
|
49
|
-
className?: string;
|
|
50
|
-
/**
|
|
51
|
-
* 自定义 dock 项目渲染
|
|
52
|
-
*/
|
|
53
|
-
itemBuilder?: DockProps["itemBuilder"];
|
|
54
|
-
/**
|
|
55
|
-
* 自定义固定项目渲染
|
|
56
|
-
*/
|
|
57
|
-
fixedItemBuilder?: DockProps["fixedItemBuilder"];
|
|
58
|
-
/**
|
|
59
|
-
* 固定项目列表(在sortable之前显示,不可拖拽排序)
|
|
60
|
-
*/
|
|
61
|
-
fixedItems?: DockProps["fixedItems"];
|
|
62
|
-
/**
|
|
63
|
-
* 是否显示启动台按钮
|
|
64
|
-
*/
|
|
65
|
-
showLaunchpad?: boolean;
|
|
66
|
-
};
|
|
42
|
+
} & Omit<DockProps<D, C>, "onDrop" | "onDockItemsChange">;
|
|
67
43
|
}
|
|
68
44
|
declare const Sortable: <D, C>(props: SortableProps<D, C>) => import("react/jsx-runtime").JSX.Element;
|
|
69
45
|
export default Sortable;
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import { themeDark } from './dark';
|
|
2
2
|
import { themeLight } from './light';
|
|
3
|
+
export interface BaseModalTheme {
|
|
4
|
+
mask?: {
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
backdropFilter?: string;
|
|
7
|
+
};
|
|
8
|
+
content?: {
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
backdropFilter?: string;
|
|
11
|
+
boxShadowColor?: string;
|
|
12
|
+
boxShadowBorderColor?: string;
|
|
13
|
+
borderColor?: string;
|
|
14
|
+
borderRadius?: string;
|
|
15
|
+
};
|
|
16
|
+
header?: {
|
|
17
|
+
textColor?: string;
|
|
18
|
+
};
|
|
19
|
+
scrollbar?: {
|
|
20
|
+
width?: string;
|
|
21
|
+
trackColor?: string;
|
|
22
|
+
thumbColor?: string;
|
|
23
|
+
thumbHoverColor?: string;
|
|
24
|
+
borderRadius?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
3
27
|
export interface DockTheme {
|
|
4
28
|
backgroundColor?: string;
|
|
5
29
|
borderColor?: string;
|
|
@@ -7,6 +31,31 @@ export interface DockTheme {
|
|
|
7
31
|
divider?: {
|
|
8
32
|
color?: string;
|
|
9
33
|
};
|
|
34
|
+
launchpad?: {
|
|
35
|
+
modal?: {
|
|
36
|
+
searchBox?: {
|
|
37
|
+
iconColor?: string;
|
|
38
|
+
iconFocusColor?: string;
|
|
39
|
+
backgroundColor?: string;
|
|
40
|
+
focusBackgroundColor?: string;
|
|
41
|
+
textColor?: string;
|
|
42
|
+
placeholderColor?: string;
|
|
43
|
+
shadowColor?: string;
|
|
44
|
+
clearButton?: {
|
|
45
|
+
backgroundColor?: string;
|
|
46
|
+
hoverBackgroundColor?: string;
|
|
47
|
+
textColor?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
icon?: {
|
|
52
|
+
textColor?: string;
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
borderColor?: string;
|
|
55
|
+
shadowColor?: string;
|
|
56
|
+
hoverGlowColor?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
10
59
|
}
|
|
11
60
|
export interface LaunchpadTheme {
|
|
12
61
|
button?: {
|
|
@@ -16,21 +65,55 @@ export interface LaunchpadTheme {
|
|
|
16
65
|
borderColor?: string;
|
|
17
66
|
hoverBackgroundColor?: string;
|
|
18
67
|
};
|
|
19
|
-
modal?:
|
|
68
|
+
modal?: BaseModalTheme;
|
|
69
|
+
}
|
|
70
|
+
export interface ContextMenuTheme {
|
|
71
|
+
textColor?: string;
|
|
72
|
+
activeColor?: string;
|
|
73
|
+
dangerColor?: string;
|
|
74
|
+
backgroundColor?: string;
|
|
75
|
+
shadowColor?: string;
|
|
76
|
+
boxShadowBorderColor?: string;
|
|
77
|
+
borderColor?: string;
|
|
78
|
+
backdropFilter?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ItemsTheme {
|
|
81
|
+
textColor?: string;
|
|
82
|
+
iconBackgroundColor?: string;
|
|
83
|
+
iconShadowColor?: string;
|
|
84
|
+
groupIconBackgroundColor?: string;
|
|
85
|
+
groupIconShadowColor?: string;
|
|
86
|
+
infoModalBackgroundColor?: string;
|
|
87
|
+
groupModal?: {
|
|
88
|
+
backgroundColor?: string;
|
|
89
|
+
title?: {
|
|
90
|
+
textColor?: string;
|
|
91
|
+
backgroundColor?: string;
|
|
92
|
+
hoverBackgroundColor?: string;
|
|
93
|
+
focusBackgroundColor?: string;
|
|
94
|
+
shadowColor?: string;
|
|
95
|
+
placeholderColor?: string;
|
|
96
|
+
selectionBackgroundColor?: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export interface BaseTheme {
|
|
101
|
+
hoverColor?: string;
|
|
102
|
+
dangerColor?: string;
|
|
103
|
+
backgroundColor?: string;
|
|
104
|
+
textColor?: string;
|
|
105
|
+
shadowColor?: string;
|
|
106
|
+
boxShadowBorderColor?: string;
|
|
107
|
+
borderColor?: string;
|
|
108
|
+
backdropFilter?: string;
|
|
20
109
|
}
|
|
21
110
|
export interface Theme {
|
|
22
111
|
token: {
|
|
23
|
-
|
|
24
|
-
itemIconBackgroundColor?: string;
|
|
25
|
-
itemIconShadowColor?: string;
|
|
26
|
-
groupItemIconBackgroundColor?: string;
|
|
27
|
-
groupItemIconShadowColor?: string;
|
|
28
|
-
groupItemModalBackgroundColor?: string;
|
|
29
|
-
contextMenuTextColor?: string;
|
|
30
|
-
contextMenuActiveColor?: string;
|
|
31
|
-
contextMenuBackgroundColor?: string;
|
|
32
|
-
contextMenuShadowColor?: string;
|
|
112
|
+
base?: BaseTheme;
|
|
33
113
|
dock?: DockTheme;
|
|
114
|
+
modal?: BaseModalTheme;
|
|
115
|
+
contextMenu?: ContextMenuTheme;
|
|
116
|
+
items?: ItemsTheme;
|
|
34
117
|
};
|
|
35
118
|
}
|
|
36
119
|
export declare const defaultTheme: Theme;
|