@dgui/react-shared 1.7.0-next.1 → 1.7.0-next.2
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/Types.d.ts +41 -38
- package/package.json +2 -2
package/dist/Types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type Dispatch, type PropsWithChildren, type SetStateAction } from 'react';
|
|
1
|
+
import { type CSSProperties, type Dispatch, type PropsWithChildren, type SetStateAction } from 'react';
|
|
2
|
+
import { type ViewStyle } from 'react-native';
|
|
2
3
|
export type DrawerType = {
|
|
3
4
|
drawerId: string;
|
|
4
5
|
swipe?: boolean;
|
|
@@ -6,20 +7,20 @@ export type DrawerType = {
|
|
|
6
7
|
title?: string;
|
|
7
8
|
};
|
|
8
9
|
export type DrawerContextProps = {
|
|
9
|
-
addDrawer: (drawer: DrawerType, position?: number) => void;
|
|
10
|
-
drawerOrder: string[];
|
|
11
|
-
drawers: {
|
|
10
|
+
readonly addDrawer: (drawer: DrawerType, position?: number) => void;
|
|
11
|
+
readonly drawerOrder: string[];
|
|
12
|
+
readonly drawers: {
|
|
12
13
|
[key: string]: DrawerType;
|
|
13
14
|
};
|
|
14
|
-
removeDrawer: (drawerId: string) => void;
|
|
15
|
+
readonly removeDrawer: (drawerId: string) => void;
|
|
15
16
|
};
|
|
16
17
|
export type DrawerIndexContextProps = {
|
|
17
|
-
drawerIndex: number;
|
|
18
|
-
selectDrawer: Dispatch<SetStateAction<number>>;
|
|
18
|
+
readonly drawerIndex: number;
|
|
19
|
+
readonly selectDrawer: Dispatch<SetStateAction<number>>;
|
|
19
20
|
};
|
|
20
21
|
export type DrawerToggleContextProps = {
|
|
21
|
-
drawerOpen: boolean;
|
|
22
|
-
toggleDrawer: (open?: boolean | undefined) => void;
|
|
22
|
+
readonly drawerOpen: boolean;
|
|
23
|
+
readonly toggleDrawer: (open?: boolean | undefined) => void;
|
|
23
24
|
};
|
|
24
25
|
export type TabType = {
|
|
25
26
|
[key: string]: any;
|
|
@@ -28,59 +29,61 @@ export type TabType = {
|
|
|
28
29
|
title?: string;
|
|
29
30
|
};
|
|
30
31
|
export type TabContextProps = {
|
|
31
|
-
addTab: (tab: TabType, goto?: boolean, position?: number) => void;
|
|
32
|
-
removeTab: (tabId: string) => void;
|
|
33
|
-
selectedTabId: string;
|
|
34
|
-
tabOrder: string[];
|
|
35
|
-
tabs: {
|
|
32
|
+
readonly addTab: (tab: TabType, goto?: boolean, position?: number) => void;
|
|
33
|
+
readonly removeTab: (tabId: string) => void;
|
|
34
|
+
readonly selectedTabId: string;
|
|
35
|
+
readonly tabOrder: string[];
|
|
36
|
+
readonly tabs: {
|
|
36
37
|
[key: string]: TabType;
|
|
37
38
|
};
|
|
38
|
-
updateTab: (tab: TabType) => void;
|
|
39
|
+
readonly updateTab: (tab: TabType) => void;
|
|
39
40
|
};
|
|
40
41
|
export type TabIndexContextProps = {
|
|
41
|
-
selectTab: Dispatch<SetStateAction<number>>;
|
|
42
|
-
tabIndex: number;
|
|
42
|
+
readonly selectTab: Dispatch<SetStateAction<number>>;
|
|
43
|
+
readonly tabIndex: number;
|
|
43
44
|
};
|
|
44
45
|
export type CarouselProps = PropsWithChildren<{
|
|
45
|
-
onSelectTab: Dispatch<SetStateAction<number>>;
|
|
46
|
-
swipe?: boolean;
|
|
47
|
-
tabIndex?: number;
|
|
46
|
+
readonly onSelectTab: Dispatch<SetStateAction<number>>;
|
|
47
|
+
readonly swipe?: boolean;
|
|
48
|
+
readonly tabIndex?: number;
|
|
48
49
|
}>;
|
|
49
50
|
export type GatewayProps = PropsWithChildren<{
|
|
50
|
-
gatewayId: string;
|
|
51
|
+
readonly gatewayId: string;
|
|
51
52
|
}>;
|
|
52
53
|
export type GatewayDestProps = {
|
|
53
|
-
gatewayId: string;
|
|
54
|
+
readonly gatewayId: string;
|
|
54
55
|
};
|
|
55
56
|
export type DrawerIndexProviderProps = PropsWithChildren<{
|
|
56
|
-
drawerIndex?: number;
|
|
57
|
-
onSelectDrawer?: (tabIndex: number) => void;
|
|
57
|
+
readonly drawerIndex?: number;
|
|
58
|
+
readonly onSelectDrawer?: (tabIndex: number) => void;
|
|
58
59
|
}>;
|
|
59
60
|
export type DrawerToggleProviderProps = PropsWithChildren<{
|
|
60
|
-
drawerOpen?: boolean;
|
|
61
|
-
onDrawerToggle?: (drawerOpen?: boolean) => void;
|
|
61
|
+
readonly drawerOpen?: boolean;
|
|
62
|
+
readonly onDrawerToggle?: (drawerOpen?: boolean) => void;
|
|
62
63
|
}>;
|
|
63
64
|
export type TabIndexProviderProps = PropsWithChildren<{
|
|
64
|
-
onSelectTab?: (tabIndex: number) => void;
|
|
65
|
-
tabIndex?: number;
|
|
65
|
+
readonly onSelectTab?: (tabIndex: number) => void;
|
|
66
|
+
readonly tabIndex?: number;
|
|
66
67
|
}>;
|
|
67
68
|
export type ProvidersProps = DrawerIndexProviderProps & DrawerToggleProviderProps & PropsWithChildren<{}> & TabIndexProviderProps;
|
|
68
69
|
export type DrawerPosition = 'left' | 'right';
|
|
69
70
|
export type ReactDigestProps = PropsWithChildren<{
|
|
70
|
-
drawerAnimationTime?: number;
|
|
71
|
-
drawerOpacity?: number;
|
|
72
|
-
drawerPosition?: DrawerPosition;
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
readonly drawerAnimationTime?: number;
|
|
72
|
+
readonly drawerOpacity?: number;
|
|
73
|
+
readonly drawerPosition?: DrawerPosition;
|
|
74
|
+
readonly drawerStyle?: CSSProperties | ViewStyle;
|
|
75
|
+
readonly drawerWidth?: number;
|
|
76
|
+
readonly swipe?: boolean;
|
|
75
77
|
}> & ProvidersProps;
|
|
76
78
|
export type ReactDigestDrawersProps = {
|
|
77
|
-
animationTime?: number;
|
|
78
|
-
opacity?: number;
|
|
79
|
-
position?: DrawerPosition;
|
|
80
|
-
|
|
79
|
+
readonly animationTime?: number;
|
|
80
|
+
readonly opacity?: number;
|
|
81
|
+
readonly position?: DrawerPosition;
|
|
82
|
+
readonly style?: CSSProperties | ViewStyle;
|
|
83
|
+
readonly width?: number;
|
|
81
84
|
};
|
|
82
85
|
export type ReactDigestDrawerProps = Omit<DrawerType, 'tabs'> & PropsWithChildren<{}> & {
|
|
83
|
-
tabId?: string;
|
|
86
|
+
readonly tabId?: string;
|
|
84
87
|
};
|
|
85
88
|
export type ReactDigestTabProps = PropsWithChildren<{}> & TabType;
|
|
86
89
|
export type ReactDigestAppBarProps = PropsWithChildren<{}>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dgui/react-shared",
|
|
3
3
|
"title": "Digested React GUI Shared Components",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "1.7.0-next.
|
|
5
|
+
"version": "1.7.0-next.2",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "Shared Components for a boilerplate React GUI",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"reactjs",
|
|
71
71
|
"typescript"
|
|
72
72
|
],
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "182f10bd7e6db31cd5450ac4611671766e83c8e1"
|
|
74
74
|
}
|