cortex-react-ui 0.1.154 → 0.1.157
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/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types/Scanner/Scanner.d.ts +7 -0
- package/lib/cjs/types/Scanner/index.d.ts +1 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/index.d.ts +76 -69
- package/lib/styles/Scanner/index.scss +0 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Scanner';
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as Popper } from './Popper';
|
|
|
2
2
|
export { default as DomContainer } from './DomContainer';
|
|
3
3
|
export { default as Spinner } from './Spinner';
|
|
4
4
|
export { default as BarLoader } from './BarLoader';
|
|
5
|
+
export { default as Scanner } from './Scanner';
|
|
5
6
|
export { default as Selected } from './Selected';
|
|
6
7
|
export { default as Button } from './Button';
|
|
7
8
|
export { default as ToggleButton } from './ToggleButton';
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
1
|
+
import React$1, { CSSProperties } from 'react';
|
|
2
|
+
import { IDetectedBarcode } from '@yudiel/react-qr-scanner';
|
|
2
3
|
|
|
3
4
|
declare const PopperPlacement: {
|
|
4
5
|
readonly Center: "center";
|
|
@@ -16,7 +17,7 @@ declare const PopperPlacement: {
|
|
|
16
17
|
readonly RightCenter: "right-center";
|
|
17
18
|
};
|
|
18
19
|
declare type Props$5 = {
|
|
19
|
-
anchorEl?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
20
|
+
anchorEl?: string | HTMLElement | React$1.RefObject<HTMLElement>;
|
|
20
21
|
anchorPosition?: {
|
|
21
22
|
top: number;
|
|
22
23
|
left: number;
|
|
@@ -24,30 +25,30 @@ declare type Props$5 = {
|
|
|
24
25
|
placement?: ObjectValues<typeof PopperPlacement>;
|
|
25
26
|
open?: boolean;
|
|
26
27
|
role?: string;
|
|
27
|
-
children?: React.ReactNode;
|
|
28
|
+
children?: React$1.ReactNode;
|
|
28
29
|
className?: string;
|
|
29
30
|
overflow?: boolean;
|
|
30
|
-
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
31
|
-
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
32
|
-
onMouseMove?: React.MouseEventHandler<HTMLDivElement>;
|
|
33
|
-
onMouseOut?: React.MouseEventHandler<HTMLDivElement>;
|
|
34
|
-
onMouseOver?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
|
-
onTouchStart?: React.TouchEventHandler<HTMLDivElement>;
|
|
36
|
-
onTouchEnd?: React.TouchEventHandler<HTMLDivElement>;
|
|
31
|
+
onMouseEnter?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
32
|
+
onMouseLeave?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
33
|
+
onMouseMove?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
34
|
+
onMouseOut?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
35
|
+
onMouseOver?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
36
|
+
onTouchStart?: React$1.TouchEventHandler<HTMLDivElement>;
|
|
37
|
+
onTouchEnd?: React$1.TouchEventHandler<HTMLDivElement>;
|
|
37
38
|
};
|
|
38
|
-
declare const Popper: React.ForwardRefExoticComponent<Props$5 & React.RefAttributes<HTMLElement>>;
|
|
39
|
+
declare const Popper: React$1.ForwardRefExoticComponent<Props$5 & React$1.RefAttributes<HTMLElement>>;
|
|
39
40
|
|
|
40
41
|
declare type Props$4 = {
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
+
children?: React$1.ReactNode;
|
|
42
43
|
container?: HTMLElement | (() => HTMLElement);
|
|
43
44
|
};
|
|
44
|
-
declare const DomContainer: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLElement>>;
|
|
45
|
+
declare const DomContainer: React$1.ForwardRefExoticComponent<Props$4 & React$1.RefAttributes<HTMLElement>>;
|
|
45
46
|
|
|
46
47
|
interface SpinnerProps {
|
|
47
48
|
className?: string;
|
|
48
49
|
variant?: 'indeterminate' | 'determinate';
|
|
49
50
|
}
|
|
50
|
-
declare const Spinner: React.FC<SpinnerProps>;
|
|
51
|
+
declare const Spinner: React$1.FC<SpinnerProps>;
|
|
51
52
|
|
|
52
53
|
interface BarLoaderProps {
|
|
53
54
|
title?: string;
|
|
@@ -56,45 +57,51 @@ interface BarLoaderProps {
|
|
|
56
57
|
mode: 'determinate' | 'indeterminate';
|
|
57
58
|
isComplete: boolean;
|
|
58
59
|
}
|
|
59
|
-
declare const BarLoader: React.FC<BarLoaderProps>;
|
|
60
|
+
declare const BarLoader: React$1.FC<BarLoaderProps>;
|
|
61
|
+
|
|
62
|
+
interface ScannerProps {
|
|
63
|
+
scanConfirmation?: boolean;
|
|
64
|
+
onScan?: (detectedCodes: IDetectedBarcode[]) => void;
|
|
65
|
+
}
|
|
66
|
+
declare const Scanner: React.FC<ScannerProps>;
|
|
60
67
|
|
|
61
68
|
interface SelectedProps {
|
|
62
69
|
title?: string;
|
|
63
70
|
data: any[];
|
|
64
71
|
onClick: (elt: any) => void;
|
|
65
72
|
}
|
|
66
|
-
declare const Selected: React.FC<SelectedProps>;
|
|
73
|
+
declare const Selected: React$1.FC<SelectedProps>;
|
|
67
74
|
|
|
68
75
|
interface ButtonProps {
|
|
69
76
|
variant?: 'text' | 'contained' | 'outlined';
|
|
70
77
|
color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
71
78
|
className?: string;
|
|
72
79
|
disable?: boolean;
|
|
73
|
-
children?: React.ReactNode;
|
|
74
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
80
|
+
children?: React$1.ReactNode;
|
|
81
|
+
onClick?: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
75
82
|
}
|
|
76
|
-
declare const Button: React.FC<ButtonProps>;
|
|
83
|
+
declare const Button: React$1.FC<ButtonProps>;
|
|
77
84
|
|
|
78
85
|
interface ToggleButtonProps {
|
|
79
86
|
selected?: boolean;
|
|
80
87
|
value?: string;
|
|
81
88
|
className?: string;
|
|
82
89
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
83
|
-
children?: React.ReactNode;
|
|
90
|
+
children?: React$1.ReactNode;
|
|
84
91
|
onChange?: (value: string | undefined) => void;
|
|
85
92
|
}
|
|
86
|
-
declare const ToggleButton: React.FC<ToggleButtonProps>;
|
|
93
|
+
declare const ToggleButton: React$1.FC<ToggleButtonProps>;
|
|
87
94
|
|
|
88
95
|
interface TooltipProps$1 {
|
|
89
|
-
children?: React.ReactElement<any>;
|
|
90
|
-
anchorEl?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
91
|
-
title: React.ReactNode;
|
|
96
|
+
children?: React$1.ReactElement<any>;
|
|
97
|
+
anchorEl?: string | HTMLElement | React$1.RefObject<HTMLElement>;
|
|
98
|
+
title: React$1.ReactNode;
|
|
92
99
|
enterDelay?: number;
|
|
93
100
|
leaveDelay?: number;
|
|
94
101
|
className?: string;
|
|
95
102
|
disabled?: boolean;
|
|
96
103
|
}
|
|
97
|
-
declare const Tooltip: React.FC<TooltipProps$1>;
|
|
104
|
+
declare const Tooltip: React$1.FC<TooltipProps$1>;
|
|
98
105
|
|
|
99
106
|
declare namespace Cortex {
|
|
100
107
|
type Tag = {
|
|
@@ -119,16 +126,16 @@ interface TooltipProps {
|
|
|
119
126
|
onTextChange?: (text: string) => void;
|
|
120
127
|
onChange?: (tags: Cortex.Tag[]) => void;
|
|
121
128
|
}
|
|
122
|
-
declare const TagInput: React.FC<TooltipProps>;
|
|
129
|
+
declare const TagInput: React$1.FC<TooltipProps>;
|
|
123
130
|
|
|
124
131
|
interface MenuProps {
|
|
125
|
-
containerRef: React.RefObject<HTMLElement>;
|
|
132
|
+
containerRef: React$1.RefObject<HTMLElement>;
|
|
126
133
|
className?: string;
|
|
127
|
-
children?: React.ReactNode;
|
|
134
|
+
children?: React$1.ReactNode;
|
|
128
135
|
onClose?: () => void;
|
|
129
|
-
onClick?: (event: React.MouseEvent<HTMLUListElement> | undefined) => void;
|
|
136
|
+
onClick?: (event: React$1.MouseEvent<HTMLUListElement> | undefined) => void;
|
|
130
137
|
}
|
|
131
|
-
declare const Menu: React.FC<MenuProps>;
|
|
138
|
+
declare const Menu: React$1.FC<MenuProps>;
|
|
132
139
|
|
|
133
140
|
interface AuthDownloadLinkProps {
|
|
134
141
|
url: string;
|
|
@@ -137,61 +144,61 @@ interface AuthDownloadLinkProps {
|
|
|
137
144
|
};
|
|
138
145
|
token: string;
|
|
139
146
|
label?: string;
|
|
140
|
-
onStart?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
147
|
+
onStart?: (event: React$1.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
141
148
|
onCompleted?: () => void;
|
|
142
149
|
onError?: (error: any) => void;
|
|
143
150
|
}
|
|
144
|
-
declare const AuthDownloadLink: React.FC<AuthDownloadLinkProps>;
|
|
151
|
+
declare const AuthDownloadLink: React$1.FC<AuthDownloadLinkProps>;
|
|
145
152
|
|
|
146
153
|
interface ContextMenuProps {
|
|
147
154
|
className?: string;
|
|
148
|
-
children?: React.ReactNode;
|
|
155
|
+
children?: React$1.ReactNode;
|
|
149
156
|
open?: boolean;
|
|
150
157
|
placement?: ObjectValues<typeof PopperPlacement>;
|
|
151
|
-
container?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
158
|
+
container?: string | HTMLElement | React$1.RefObject<HTMLElement>;
|
|
152
159
|
onOpen?: () => void;
|
|
153
160
|
onClose?: () => void;
|
|
154
161
|
}
|
|
155
|
-
declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
162
|
+
declare const ContextMenu: React$1.FC<ContextMenuProps>;
|
|
156
163
|
|
|
157
164
|
interface MenuItemProps {
|
|
158
165
|
className?: string;
|
|
159
166
|
style?: CSSProperties | undefined;
|
|
160
|
-
children?: React.ReactNode;
|
|
167
|
+
children?: React$1.ReactNode;
|
|
161
168
|
label?: string;
|
|
162
|
-
icon?: React.ReactNode;
|
|
169
|
+
icon?: React$1.ReactNode;
|
|
163
170
|
active?: boolean;
|
|
164
171
|
disable?: boolean;
|
|
165
|
-
itemTemplate?: React.ReactNode;
|
|
166
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
172
|
+
itemTemplate?: React$1.ReactNode;
|
|
173
|
+
onClick?: (event: React$1.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
167
174
|
}
|
|
168
|
-
declare const MenuItem: React.FC<MenuItemProps>;
|
|
175
|
+
declare const MenuItem: React$1.FC<MenuItemProps>;
|
|
169
176
|
|
|
170
177
|
interface DividerProps {
|
|
171
178
|
className?: string;
|
|
172
179
|
}
|
|
173
|
-
declare const Divider: React.FC<DividerProps>;
|
|
180
|
+
declare const Divider: React$1.FC<DividerProps>;
|
|
174
181
|
|
|
175
182
|
interface PopupMenuProps {
|
|
176
183
|
className?: string;
|
|
177
|
-
children?: React.ReactNode;
|
|
184
|
+
children?: React$1.ReactNode;
|
|
178
185
|
open?: boolean;
|
|
179
186
|
placement?: ObjectValues<typeof PopperPlacement>;
|
|
180
187
|
anchorPosition?: {
|
|
181
188
|
top: number;
|
|
182
189
|
left: number;
|
|
183
190
|
};
|
|
184
|
-
anchorEl?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
191
|
+
anchorEl?: string | HTMLElement | React$1.RefObject<HTMLElement>;
|
|
185
192
|
onClose?: () => void;
|
|
186
193
|
}
|
|
187
|
-
declare const PopupMenu: React.FC<PopupMenuProps>;
|
|
194
|
+
declare const PopupMenu: React$1.FC<PopupMenuProps>;
|
|
188
195
|
|
|
189
196
|
interface MenuGroupProps {
|
|
190
197
|
title?: string;
|
|
191
198
|
className?: string;
|
|
192
|
-
children?: React.ReactNode;
|
|
199
|
+
children?: React$1.ReactNode;
|
|
193
200
|
}
|
|
194
|
-
declare const MenuGroup: React.FC<MenuGroupProps>;
|
|
201
|
+
declare const MenuGroup: React$1.FC<MenuGroupProps>;
|
|
195
202
|
|
|
196
203
|
interface DialogProps {
|
|
197
204
|
open: boolean;
|
|
@@ -199,89 +206,89 @@ interface DialogProps {
|
|
|
199
206
|
fullWidth?: boolean;
|
|
200
207
|
fullHeight?: boolean;
|
|
201
208
|
className?: string;
|
|
202
|
-
children?: React.ReactNode;
|
|
209
|
+
children?: React$1.ReactNode;
|
|
203
210
|
onClose?: (() => void);
|
|
204
211
|
}
|
|
205
|
-
declare const Dialog: React.FC<DialogProps>;
|
|
212
|
+
declare const Dialog: React$1.FC<DialogProps>;
|
|
206
213
|
|
|
207
214
|
interface DialogContentProps$2 {
|
|
208
215
|
className?: string;
|
|
209
|
-
children?: React.ReactNode;
|
|
216
|
+
children?: React$1.ReactNode;
|
|
210
217
|
}
|
|
211
|
-
declare const DialogContent$1: React.FC<DialogContentProps$2>;
|
|
218
|
+
declare const DialogContent$1: React$1.FC<DialogContentProps$2>;
|
|
212
219
|
|
|
213
220
|
interface DialogFooterProps {
|
|
214
221
|
className?: string;
|
|
215
|
-
children?: React.ReactNode;
|
|
222
|
+
children?: React$1.ReactNode;
|
|
216
223
|
}
|
|
217
|
-
declare const DialogFooter: React.FC<DialogFooterProps>;
|
|
224
|
+
declare const DialogFooter: React$1.FC<DialogFooterProps>;
|
|
218
225
|
|
|
219
226
|
interface DialogHeaderProps {
|
|
220
227
|
className?: string;
|
|
221
|
-
children?: React.ReactNode;
|
|
228
|
+
children?: React$1.ReactNode;
|
|
222
229
|
}
|
|
223
|
-
declare const DialogHeader: React.FC<DialogHeaderProps>;
|
|
230
|
+
declare const DialogHeader: React$1.FC<DialogHeaderProps>;
|
|
224
231
|
|
|
225
232
|
interface DialogContentProps$1 {
|
|
226
233
|
className?: string;
|
|
227
|
-
children?: React.ReactNode;
|
|
234
|
+
children?: React$1.ReactNode;
|
|
228
235
|
closeDisable?: boolean;
|
|
229
236
|
onClose?: (() => void);
|
|
230
237
|
}
|
|
231
|
-
declare const DialogContent: React.FC<DialogContentProps$1>;
|
|
238
|
+
declare const DialogContent: React$1.FC<DialogContentProps$1>;
|
|
232
239
|
|
|
233
240
|
interface DialogContentProps {
|
|
234
241
|
className?: string;
|
|
235
|
-
children?: React.ReactNode;
|
|
242
|
+
children?: React$1.ReactNode;
|
|
236
243
|
}
|
|
237
|
-
declare const DialogActions: React.FC<DialogContentProps>;
|
|
244
|
+
declare const DialogActions: React$1.FC<DialogContentProps>;
|
|
238
245
|
|
|
239
246
|
interface ConfirmDialogProps {
|
|
240
247
|
title: string;
|
|
241
248
|
ok?: string;
|
|
242
249
|
cancel?: string;
|
|
243
|
-
children?: React.ReactNode;
|
|
250
|
+
children?: React$1.ReactNode;
|
|
244
251
|
className?: string;
|
|
245
252
|
onClose?: (isOk: boolean) => void;
|
|
246
253
|
}
|
|
247
|
-
declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
254
|
+
declare const ConfirmDialog: React$1.FC<ConfirmDialogProps>;
|
|
248
255
|
|
|
249
256
|
interface ErrorDialogProps {
|
|
250
257
|
title: string;
|
|
251
258
|
ok?: string;
|
|
252
|
-
children?: React.ReactNode;
|
|
259
|
+
children?: React$1.ReactNode;
|
|
253
260
|
className?: string;
|
|
254
261
|
onClose?: (isOk: boolean) => void;
|
|
255
262
|
}
|
|
256
|
-
declare const ErrorDialog: React.FC<ErrorDialogProps>;
|
|
263
|
+
declare const ErrorDialog: React$1.FC<ErrorDialogProps>;
|
|
257
264
|
|
|
258
265
|
interface WarningDialogProps {
|
|
259
266
|
title: string;
|
|
260
267
|
ok?: string;
|
|
261
|
-
children?: React.ReactNode;
|
|
268
|
+
children?: React$1.ReactNode;
|
|
262
269
|
className?: string;
|
|
263
270
|
onClose?: (isOk: boolean) => void;
|
|
264
271
|
}
|
|
265
|
-
declare const WarningDialog: React.FC<WarningDialogProps>;
|
|
272
|
+
declare const WarningDialog: React$1.FC<WarningDialogProps>;
|
|
266
273
|
|
|
267
274
|
interface Props$3 {
|
|
268
275
|
className?: string;
|
|
269
276
|
}
|
|
270
|
-
declare const ChevronDownIcon: React.FC<Props$3>;
|
|
277
|
+
declare const ChevronDownIcon: React$1.FC<Props$3>;
|
|
271
278
|
|
|
272
279
|
interface Props$2 {
|
|
273
280
|
className?: string;
|
|
274
281
|
}
|
|
275
|
-
declare const ChevronRightIcon: React.FC<Props$2>;
|
|
282
|
+
declare const ChevronRightIcon: React$1.FC<Props$2>;
|
|
276
283
|
|
|
277
284
|
interface Props$1 {
|
|
278
285
|
className?: string;
|
|
279
286
|
}
|
|
280
|
-
declare const ChevronLeftIcon: React.FC<Props$1>;
|
|
287
|
+
declare const ChevronLeftIcon: React$1.FC<Props$1>;
|
|
281
288
|
|
|
282
289
|
interface Props {
|
|
283
290
|
className?: string;
|
|
284
291
|
}
|
|
285
|
-
declare const CrossIcon: React.FC<Props>;
|
|
292
|
+
declare const CrossIcon: React$1.FC<Props>;
|
|
286
293
|
|
|
287
|
-
export { AuthDownloadLink, BarLoader, Button, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ConfirmDialog, ContextMenu, CrossIcon, Dialog, DialogActions, DialogContent$1 as DialogContent, DialogFooter, DialogHeader, DialogContent as DialogTitle, Divider, DomContainer, ErrorDialog, Menu, MenuGroup, MenuItem, Popper, PopupMenu, Selected, Spinner, TagInput, ToggleButton, Tooltip, WarningDialog };
|
|
294
|
+
export { AuthDownloadLink, BarLoader, Button, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ConfirmDialog, ContextMenu, CrossIcon, Dialog, DialogActions, DialogContent$1 as DialogContent, DialogFooter, DialogHeader, DialogContent as DialogTitle, Divider, DomContainer, ErrorDialog, Menu, MenuGroup, MenuItem, Popper, PopupMenu, Scanner, Selected, Spinner, TagInput, ToggleButton, Tooltip, WarningDialog };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortex-react-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.157",
|
|
4
4
|
"description": "React UI",
|
|
5
5
|
"author": "Anthony",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"@types/node": "^12.0.0",
|
|
75
75
|
"@types/react": "^17.0.0",
|
|
76
76
|
"@types/react-dom": "^17.0.0",
|
|
77
|
+
"@yudiel/react-qr-scanner": "^2.0.2",
|
|
77
78
|
"css-loader": "5.2.6",
|
|
78
79
|
"eslint-config-airbnb": "^18.2.1",
|
|
79
80
|
"eslint-plugin-import": "^2.25.2",
|