@geomak/ui 1.0.0
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 +118 -0
- package/dist/index.cjs +2674 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1273 -0
- package/dist/index.d.ts +1273 -0
- package/dist/index.js +2602 -0
- package/dist/index.js.map +1 -0
- package/package.json +83 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1273 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
|
|
5
|
+
declare const COLORS: {
|
|
6
|
+
PALETTE: {
|
|
7
|
+
readonly 'true-blue': "#0466C8";
|
|
8
|
+
readonly 'usafa-blue': "#0353A4";
|
|
9
|
+
readonly 'dark-cornflower-blue': "#023E7D";
|
|
10
|
+
readonly 'oxford-blue-700': "#002855";
|
|
11
|
+
readonly 'oxford-blue-800': "#001845";
|
|
12
|
+
readonly 'oxford-blue-900': "#001233";
|
|
13
|
+
readonly independence: "#33415C";
|
|
14
|
+
readonly 'black-coral': "#5C677D";
|
|
15
|
+
readonly 'roman-silver': "#7D8597";
|
|
16
|
+
readonly manatee: "#979DAC";
|
|
17
|
+
readonly white: "#fff";
|
|
18
|
+
readonly ice: "#DBF1FD";
|
|
19
|
+
readonly 'ice-dark': "#d0e3ed";
|
|
20
|
+
readonly 'midnight-green-eagle-900': "#013E53";
|
|
21
|
+
readonly 'midnight-green-eagle-700': "#125F6C";
|
|
22
|
+
readonly 'midnight-green-eagle-500': "#125F6C";
|
|
23
|
+
readonly 'rich-black-fogra': "#000202";
|
|
24
|
+
readonly 'rich-black-fogra-opaque': "#0000005b";
|
|
25
|
+
readonly 'prussian-blue': "#00273A";
|
|
26
|
+
readonly 'indigo-dye': "#013C54";
|
|
27
|
+
readonly ming: "#0F6372";
|
|
28
|
+
readonly skobeloff: "#217479";
|
|
29
|
+
readonly 'dark-cyan': "#2A8784";
|
|
30
|
+
readonly 'celadon-green': "#297E74";
|
|
31
|
+
readonly turquise: "#2EB8B0";
|
|
32
|
+
readonly 'oxford-blue-700-opaque': "rgba(0, 40, 85, .3)";
|
|
33
|
+
readonly disabled: "#dee2e6";
|
|
34
|
+
readonly error: "tomato";
|
|
35
|
+
readonly warning: "orange";
|
|
36
|
+
readonly success: "lightgreen";
|
|
37
|
+
readonly info: "lightblue";
|
|
38
|
+
readonly transparent: "rgba(255, 255, 255, .0)";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const Icon: {
|
|
43
|
+
(): react_jsx_runtime.JSX.Element;
|
|
44
|
+
Moon: ({ color }: {
|
|
45
|
+
color?: string;
|
|
46
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
47
|
+
Sun: ({ color }: {
|
|
48
|
+
color?: string;
|
|
49
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
50
|
+
CheckCircle: ({ color, size }: {
|
|
51
|
+
color?: string;
|
|
52
|
+
size?: number;
|
|
53
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
Login: ({ color, size }: {
|
|
55
|
+
color?: string;
|
|
56
|
+
size?: number;
|
|
57
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
58
|
+
Loading: ({ color, size }: {
|
|
59
|
+
color?: string;
|
|
60
|
+
size?: number;
|
|
61
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
62
|
+
ToggleLoading: ({ color, loading, size }: {
|
|
63
|
+
color?: string;
|
|
64
|
+
loading?: boolean;
|
|
65
|
+
size?: number;
|
|
66
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
67
|
+
Eye: ({ color, size }: {
|
|
68
|
+
color?: string;
|
|
69
|
+
size?: number;
|
|
70
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
EyeSlash: ({ color, size }: {
|
|
72
|
+
color?: string;
|
|
73
|
+
size?: number;
|
|
74
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
75
|
+
ArrowRight: ({ color, className }: {
|
|
76
|
+
color?: string;
|
|
77
|
+
className?: string;
|
|
78
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
79
|
+
Minus: ({ color, className }: {
|
|
80
|
+
color?: string;
|
|
81
|
+
className?: string;
|
|
82
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
83
|
+
Dashboard: ({ color, size }: {
|
|
84
|
+
color?: string;
|
|
85
|
+
size?: number;
|
|
86
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
FleetIcon: ({ color, size }: {
|
|
88
|
+
color?: string;
|
|
89
|
+
size?: number;
|
|
90
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
91
|
+
Performance: ({ color, size }: {
|
|
92
|
+
color?: string;
|
|
93
|
+
size?: number;
|
|
94
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
95
|
+
Map: ({ color, size }: {
|
|
96
|
+
color?: string;
|
|
97
|
+
size?: number;
|
|
98
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
CharterParty: ({ color, size }: {
|
|
100
|
+
color?: string;
|
|
101
|
+
size?: number;
|
|
102
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
Compliance: ({ color, size }: {
|
|
104
|
+
color?: string;
|
|
105
|
+
size?: number;
|
|
106
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
107
|
+
Applications: ({ color, size }: {
|
|
108
|
+
color?: string;
|
|
109
|
+
size?: number;
|
|
110
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
111
|
+
PowerOff: ({ color, size }: {
|
|
112
|
+
color?: string;
|
|
113
|
+
size?: number;
|
|
114
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
115
|
+
ChevronDown: ({ color, className }: {
|
|
116
|
+
color?: string;
|
|
117
|
+
className?: string;
|
|
118
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
119
|
+
ChevronRight: ({ color, className }: {
|
|
120
|
+
color?: string;
|
|
121
|
+
className?: string;
|
|
122
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
123
|
+
DoubleChevronRight: ({ color, className }: {
|
|
124
|
+
color?: string;
|
|
125
|
+
className?: string;
|
|
126
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
127
|
+
Checked: ({ color, size }: {
|
|
128
|
+
color?: string;
|
|
129
|
+
size?: number;
|
|
130
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
131
|
+
Search: ({ color, size }: {
|
|
132
|
+
color?: string;
|
|
133
|
+
size?: number;
|
|
134
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
135
|
+
Calendar: ({ color, className }: {
|
|
136
|
+
color?: string;
|
|
137
|
+
className?: string;
|
|
138
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
139
|
+
Clock: ({ color, className }: {
|
|
140
|
+
color?: string;
|
|
141
|
+
className?: string;
|
|
142
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
143
|
+
ChartBoard: ({ color, className }: {
|
|
144
|
+
color?: string;
|
|
145
|
+
className?: string;
|
|
146
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
147
|
+
BarChartBoard: ({ color, className }: {
|
|
148
|
+
color?: string;
|
|
149
|
+
className?: string;
|
|
150
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
BarChartSquare: ({ color, className }: {
|
|
152
|
+
color?: string;
|
|
153
|
+
className?: string;
|
|
154
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
155
|
+
ChartBar: ({ color, className }: {
|
|
156
|
+
color?: string;
|
|
157
|
+
className?: string;
|
|
158
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
159
|
+
PieChart: ({ color, className }: {
|
|
160
|
+
color?: string;
|
|
161
|
+
className?: string;
|
|
162
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
163
|
+
Shield: ({ color, className }: {
|
|
164
|
+
color?: string;
|
|
165
|
+
className?: string;
|
|
166
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
167
|
+
Calculator: ({ color, className }: {
|
|
168
|
+
color?: string;
|
|
169
|
+
className?: string;
|
|
170
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
171
|
+
Contract: ({ color, className }: {
|
|
172
|
+
color?: string;
|
|
173
|
+
className?: string;
|
|
174
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
175
|
+
Buoy: ({ color, className }: {
|
|
176
|
+
color?: string;
|
|
177
|
+
className?: string;
|
|
178
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
179
|
+
Cog: ({ color, className }: {
|
|
180
|
+
color?: string;
|
|
181
|
+
className?: string;
|
|
182
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
183
|
+
Table: ({ color, className }: {
|
|
184
|
+
color?: string;
|
|
185
|
+
className?: string;
|
|
186
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
187
|
+
Data: ({ color, className }: {
|
|
188
|
+
color?: string;
|
|
189
|
+
className?: string;
|
|
190
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
191
|
+
XClose: ({ color, className }: {
|
|
192
|
+
color?: string;
|
|
193
|
+
className?: string;
|
|
194
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
195
|
+
Grid: ({ color, size }: {
|
|
196
|
+
color?: string;
|
|
197
|
+
size?: number;
|
|
198
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
199
|
+
Carousel: ({ color, size }: {
|
|
200
|
+
color?: string;
|
|
201
|
+
size?: number;
|
|
202
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
203
|
+
PlusCircle: ({ color, className }: {
|
|
204
|
+
color?: string;
|
|
205
|
+
className?: string;
|
|
206
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
207
|
+
Info: ({ color, className }: {
|
|
208
|
+
color?: string;
|
|
209
|
+
className?: string;
|
|
210
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
211
|
+
Warning: ({ color, className }: {
|
|
212
|
+
color?: string;
|
|
213
|
+
className?: string;
|
|
214
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
215
|
+
Error: ({ color, className }: {
|
|
216
|
+
color?: string;
|
|
217
|
+
className?: string;
|
|
218
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
219
|
+
ShowMore: ({ color, className }: {
|
|
220
|
+
color?: string;
|
|
221
|
+
className?: string;
|
|
222
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
223
|
+
Tweak: ({ color, className }: {
|
|
224
|
+
color?: string;
|
|
225
|
+
className?: string;
|
|
226
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
227
|
+
Download: ({ color, className }: {
|
|
228
|
+
color?: string;
|
|
229
|
+
className?: string;
|
|
230
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
231
|
+
Expand: ({ color, className }: {
|
|
232
|
+
color?: string;
|
|
233
|
+
className?: string;
|
|
234
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
235
|
+
Collapse: ({ color, className }: {
|
|
236
|
+
color?: string;
|
|
237
|
+
className?: string;
|
|
238
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
239
|
+
ShieldCheck: ({ color, className }: {
|
|
240
|
+
color?: string;
|
|
241
|
+
className?: string;
|
|
242
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
243
|
+
XCircle: ({ color, className }: {
|
|
244
|
+
color?: string;
|
|
245
|
+
className?: string;
|
|
246
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
247
|
+
Play: ({ color, className }: {
|
|
248
|
+
color?: string;
|
|
249
|
+
className?: string;
|
|
250
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
251
|
+
Document: ({ color, className }: {
|
|
252
|
+
color?: string;
|
|
253
|
+
className?: string;
|
|
254
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
255
|
+
Edit: ({ color, className }: {
|
|
256
|
+
color?: string;
|
|
257
|
+
className?: string;
|
|
258
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
259
|
+
Upload: ({ color, className }: {
|
|
260
|
+
color?: string;
|
|
261
|
+
className?: string;
|
|
262
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
263
|
+
File: ({ color, className }: {
|
|
264
|
+
color?: string;
|
|
265
|
+
className?: string;
|
|
266
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
267
|
+
Delete: ({ color, className }: {
|
|
268
|
+
color?: string;
|
|
269
|
+
className?: string;
|
|
270
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
271
|
+
Bookmarks: ({ color, className }: {
|
|
272
|
+
color?: string;
|
|
273
|
+
className?: string;
|
|
274
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
275
|
+
Save: ({ color, size }: {
|
|
276
|
+
color?: string;
|
|
277
|
+
size?: number;
|
|
278
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
279
|
+
Copy: ({ color, className }: {
|
|
280
|
+
color?: string;
|
|
281
|
+
className?: string;
|
|
282
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
CircleStack: ({ color, className }: {
|
|
284
|
+
color?: string;
|
|
285
|
+
className?: string;
|
|
286
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
interface IconButtonProps {
|
|
290
|
+
icon?: React.ReactNode;
|
|
291
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
292
|
+
/** 'primary' | 'bordered' */
|
|
293
|
+
type?: string;
|
|
294
|
+
buttonType?: 'button' | 'submit' | 'reset';
|
|
295
|
+
disabled?: boolean;
|
|
296
|
+
size?: 'sm' | 'lg';
|
|
297
|
+
loading?: boolean;
|
|
298
|
+
loadingIcon?: React.ReactNode;
|
|
299
|
+
title?: string;
|
|
300
|
+
[key: string]: any;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Square icon-only button.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* <IconButton icon={<Icon.Search />} onClick={doSearch} />
|
|
307
|
+
* <IconButton type="bordered" icon={<Icon.Edit />} />
|
|
308
|
+
*/
|
|
309
|
+
declare function IconButton({ icon, onClick, type, buttonType, disabled, size, loading, loadingIcon, }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
310
|
+
|
|
311
|
+
interface ModalProps {
|
|
312
|
+
/** Pixel dimensions [width, height] */
|
|
313
|
+
size?: [number, number];
|
|
314
|
+
isOpen?: boolean;
|
|
315
|
+
onClose?: () => void;
|
|
316
|
+
onOk?: () => void;
|
|
317
|
+
onCancel?: () => void;
|
|
318
|
+
okText?: string;
|
|
319
|
+
cancelText?: string;
|
|
320
|
+
hasFooter?: boolean;
|
|
321
|
+
title?: React$1.ReactNode;
|
|
322
|
+
children?: React$1.ReactNode;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Centred modal dialog powered by Radix Dialog.
|
|
326
|
+
*
|
|
327
|
+
* The Radix primitive handles focus-trap, escape-to-close, and ARIA roles.
|
|
328
|
+
* The VesOPS visual style (scale-in animation, prussian-blue header) is preserved.
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* <Modal isOpen={open} onClose={() => setOpen(false)} title="Confirm" onOk={handleOk}>
|
|
332
|
+
* Are you sure?
|
|
333
|
+
* </Modal>
|
|
334
|
+
*/
|
|
335
|
+
declare function Modal({ size, isOpen, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
336
|
+
|
|
337
|
+
interface DrawerProps {
|
|
338
|
+
isOpen?: boolean;
|
|
339
|
+
onClose?: () => void;
|
|
340
|
+
hasFooter?: boolean;
|
|
341
|
+
/** 'left' | 'right' */
|
|
342
|
+
placement?: 'left' | 'right';
|
|
343
|
+
width?: number;
|
|
344
|
+
okText?: string;
|
|
345
|
+
cancelText?: string;
|
|
346
|
+
onOk?: () => void;
|
|
347
|
+
onCancel?: () => void;
|
|
348
|
+
title?: React$1.ReactNode;
|
|
349
|
+
children?: React$1.ReactNode;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Side-sliding drawer panel powered by Radix Dialog.
|
|
353
|
+
*
|
|
354
|
+
* Radix handles focus-trap, escape-to-close, and ARIA roles.
|
|
355
|
+
* The drawer slides in from the left or right depending on `placement`.
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* <Drawer isOpen={open} placement="right" onClose={() => setOpen(false)} title="Filters">
|
|
359
|
+
* <FilterForm />
|
|
360
|
+
* </Drawer>
|
|
361
|
+
*/
|
|
362
|
+
declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText, cancelText, onOk, onCancel, title, children, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
363
|
+
|
|
364
|
+
interface TooltipProps {
|
|
365
|
+
children: React$1.ReactNode;
|
|
366
|
+
title: React$1.ReactNode;
|
|
367
|
+
/** 'top' | 'right' | 'bottom' | 'left' */
|
|
368
|
+
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
369
|
+
/** Delay in ms before showing the tooltip */
|
|
370
|
+
delayDuration?: number;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Tooltip powered by Radix Tooltip.
|
|
374
|
+
*
|
|
375
|
+
* Radix handles keyboard navigation (escape), pointer events, and ARIA.
|
|
376
|
+
* The VesOPS prussian-blue style is preserved.
|
|
377
|
+
*
|
|
378
|
+
* Wrap your app in `<TooltipProvider>` (re-exported below) to batch providers.
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* <Tooltip title="Delete record" placement="right">
|
|
382
|
+
* <IconButton icon={<Icon.Trash />} />
|
|
383
|
+
* </Tooltip>
|
|
384
|
+
*/
|
|
385
|
+
declare function Tooltip({ children, title, placement, delayDuration, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
386
|
+
|
|
387
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
388
|
+
|
|
389
|
+
interface TabItem {
|
|
390
|
+
key: string;
|
|
391
|
+
title: React$1.ReactNode;
|
|
392
|
+
content: React$1.ReactNode;
|
|
393
|
+
}
|
|
394
|
+
interface TabsProps {
|
|
395
|
+
tabs?: TabItem[];
|
|
396
|
+
onTabChange?: (prev: TabItem | undefined, next: TabItem | undefined) => void;
|
|
397
|
+
onTabClose?: (key: string) => void;
|
|
398
|
+
/** Only mount the active tab's content */
|
|
399
|
+
isLazy?: boolean;
|
|
400
|
+
tabsClosable?: boolean;
|
|
401
|
+
defaultActiveTab?: string;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Scrollable pill-style tabs powered by Radix Tabs.
|
|
405
|
+
*
|
|
406
|
+
* Radix handles roving-tabindex keyboard navigation and ARIA roles.
|
|
407
|
+
* The VesOPS pill visual style (rounded-3xl, ice/black-coral palette) is preserved.
|
|
408
|
+
* Supports dynamic tab add/remove with automatic activation.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* <Tabs
|
|
412
|
+
* tabs={[
|
|
413
|
+
* { key: 'v1', title: 'Vessel 1', content: <Panel1 /> },
|
|
414
|
+
* { key: 'v2', title: 'Vessel 2', content: <Panel2 /> },
|
|
415
|
+
* ]}
|
|
416
|
+
* tabsClosable
|
|
417
|
+
* onTabClose={(key) => removetab(key)}
|
|
418
|
+
* />
|
|
419
|
+
*/
|
|
420
|
+
declare function Tabs({ tabs, onTabChange, onTabClose, isLazy, tabsClosable, defaultActiveTab, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
interface TreeNode {
|
|
423
|
+
key: string;
|
|
424
|
+
value: string;
|
|
425
|
+
nodeData?: any;
|
|
426
|
+
parentLabel?: string;
|
|
427
|
+
children?: TreeNode[];
|
|
428
|
+
}
|
|
429
|
+
interface TreeItemClickPayload {
|
|
430
|
+
isParent: boolean;
|
|
431
|
+
key: string;
|
|
432
|
+
label: string;
|
|
433
|
+
data?: any;
|
|
434
|
+
parentLabel?: string;
|
|
435
|
+
}
|
|
436
|
+
interface TreeProps {
|
|
437
|
+
structure: TreeNode[];
|
|
438
|
+
onItemClick: (payload: TreeItemClickPayload) => void;
|
|
439
|
+
defaultExpandAll?: boolean;
|
|
440
|
+
defaultExpandedKeys?: string[];
|
|
441
|
+
}
|
|
442
|
+
/** ─────────────────── public component ─────────────────── */
|
|
443
|
+
/**
|
|
444
|
+
* Hierarchical tree view powered by Radix Accordion (nested).
|
|
445
|
+
*
|
|
446
|
+
* Each parent node is an independent Accordion.Root with `type="multiple"` so
|
|
447
|
+
* sibling branches are independent. Leaf nodes are plain clickable rows.
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* <Tree
|
|
451
|
+
* structure={fleetTree}
|
|
452
|
+
* onItemClick={({ key, isParent }) => selectNode(key)}
|
|
453
|
+
* defaultExpandAll
|
|
454
|
+
* />
|
|
455
|
+
*/
|
|
456
|
+
declare function Tree({ structure, onItemClick, defaultExpandAll, defaultExpandedKeys, }: TreeProps): react_jsx_runtime.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface ToggleItem {
|
|
459
|
+
key: string;
|
|
460
|
+
label?: React$1.ReactNode;
|
|
461
|
+
icon?: React$1.ReactNode;
|
|
462
|
+
}
|
|
463
|
+
interface ToggleButtonProps {
|
|
464
|
+
items: ToggleItem[];
|
|
465
|
+
onChange: (key: string) => void;
|
|
466
|
+
activeKey: string;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Segmented toggle-button group powered by Radix ToggleGroup.
|
|
470
|
+
*
|
|
471
|
+
* Radix handles keyboard navigation (arrow keys), focus ring, and
|
|
472
|
+
* `role="group"` / `aria-pressed` ARIA attributes.
|
|
473
|
+
*
|
|
474
|
+
* @example
|
|
475
|
+
* <ToggleButton
|
|
476
|
+
* items={[
|
|
477
|
+
* { key: 'grid', icon: <Icon.Grid /> },
|
|
478
|
+
* { key: 'list', icon: <Icon.List /> },
|
|
479
|
+
* ]}
|
|
480
|
+
* activeKey={view}
|
|
481
|
+
* onChange={setView}
|
|
482
|
+
* />
|
|
483
|
+
*/
|
|
484
|
+
declare function ToggleButton({ items, onChange, activeKey }: ToggleButtonProps): react_jsx_runtime.JSX.Element;
|
|
485
|
+
|
|
486
|
+
/** ─────────────────── types ─────────────────── */
|
|
487
|
+
type NotificationType = 'info' | 'success' | 'warning' | 'danger';
|
|
488
|
+
interface NotificationPayload {
|
|
489
|
+
title: React$1.ReactNode;
|
|
490
|
+
description?: React$1.ReactNode;
|
|
491
|
+
/** Auto-dismiss duration in ms (default 4000) */
|
|
492
|
+
duration?: number;
|
|
493
|
+
type?: NotificationType;
|
|
494
|
+
}
|
|
495
|
+
/** ─────────────────── provider ─────────────────── */
|
|
496
|
+
/**
|
|
497
|
+
* Wrap your application (or a subtree) in `NotificationProvider` to enable
|
|
498
|
+
* toast notifications. Then call `useNotification()` anywhere inside to
|
|
499
|
+
* trigger them.
|
|
500
|
+
*
|
|
501
|
+
* @example
|
|
502
|
+
* // _app.tsx / main.tsx
|
|
503
|
+
* <NotificationProvider>
|
|
504
|
+
* <App />
|
|
505
|
+
* </NotificationProvider>
|
|
506
|
+
*
|
|
507
|
+
* // Inside a component
|
|
508
|
+
* const notify = useNotification()
|
|
509
|
+
* notify.success({ title: 'Saved!', description: 'Your changes were saved.', duration: 3000 })
|
|
510
|
+
*/
|
|
511
|
+
declare function NotificationProvider({ children }: {
|
|
512
|
+
children: React$1.ReactNode;
|
|
513
|
+
}): react_jsx_runtime.JSX.Element;
|
|
514
|
+
/** ─────────────────── hook ─────────────────── */
|
|
515
|
+
/**
|
|
516
|
+
* Imperative notification API.
|
|
517
|
+
*
|
|
518
|
+
* @example
|
|
519
|
+
* const notify = useNotification()
|
|
520
|
+
* notify.success({ title: 'Done', description: 'Record saved.', duration: 3000 })
|
|
521
|
+
* notify.danger({ title: 'Error', description: err.message })
|
|
522
|
+
*/
|
|
523
|
+
declare function useNotification(): {
|
|
524
|
+
info: (props: Omit<NotificationPayload, "type">) => void;
|
|
525
|
+
success: (props: Omit<NotificationPayload, "type">) => void;
|
|
526
|
+
warning: (props: Omit<NotificationPayload, "type">) => void;
|
|
527
|
+
danger: (props: Omit<NotificationPayload, "type">) => void;
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
interface LoadingSpinnerProps {
|
|
531
|
+
/** Text animated letter by letter */
|
|
532
|
+
prompt: string;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Full-screen loading overlay with a spinning shape and staggered text reveal.
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* {isLoading && <LoadingSpinner prompt="Loading data..." />}
|
|
539
|
+
*/
|
|
540
|
+
declare function LoadingSpinner({ prompt }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
|
|
541
|
+
|
|
542
|
+
interface FadingBaseProps {
|
|
543
|
+
className?: string;
|
|
544
|
+
/** Controls mount/unmount with fade transition */
|
|
545
|
+
isMounted?: boolean;
|
|
546
|
+
children?: React$1.ReactNode;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Fade-in / fade-out page container.
|
|
550
|
+
*
|
|
551
|
+
* Replaces `react-transition-group` with a pure CSS opacity transition.
|
|
552
|
+
* The component mounts on `isMounted=true` and unmounts after the 300ms
|
|
553
|
+
* fade-out completes on `isMounted=false`.
|
|
554
|
+
*
|
|
555
|
+
* Uses CSS `dark:` class for the glass effect — no ThemeContext dependency.
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* <FadingBase isMounted={isPageVisible}>
|
|
559
|
+
* <PageContent />
|
|
560
|
+
* </FadingBase>
|
|
561
|
+
*/
|
|
562
|
+
declare function FadingBase({ className, isMounted, children, }: FadingBaseProps): react_jsx_runtime.JSX.Element;
|
|
563
|
+
|
|
564
|
+
interface ListItem {
|
|
565
|
+
key: string | number;
|
|
566
|
+
label: React$1.ReactNode;
|
|
567
|
+
[key: string]: any;
|
|
568
|
+
}
|
|
569
|
+
interface ListProps {
|
|
570
|
+
items: ListItem[];
|
|
571
|
+
onItemClick: (item: ListItem) => void;
|
|
572
|
+
activeKey?: string | number;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Vertical clickable list with active-item highlight.
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* <List
|
|
579
|
+
* items={vessels.map(v => ({ key: v.imo, label: v.name }))}
|
|
580
|
+
* activeKey={selectedImo}
|
|
581
|
+
* onItemClick={(item) => setSelected(item.key)}
|
|
582
|
+
* />
|
|
583
|
+
*/
|
|
584
|
+
declare function List({ items, onItemClick, activeKey }: ListProps): react_jsx_runtime.JSX.Element;
|
|
585
|
+
|
|
586
|
+
interface ScalableContainerProps {
|
|
587
|
+
width?: React$1.CSSProperties['width'];
|
|
588
|
+
height?: React$1.CSSProperties['height'];
|
|
589
|
+
children?: React$1.ReactNode;
|
|
590
|
+
/** CSS class applied to the children wrapper when expanded */
|
|
591
|
+
assignClassOnClick?: string;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Container that can be expanded to fill its parent, with a tooltip-annotated
|
|
595
|
+
* expand/collapse icon button.
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* <ScalableContainer width="50%" height={300}>
|
|
599
|
+
* <Chart data={data} />
|
|
600
|
+
* </ScalableContainer>
|
|
601
|
+
*/
|
|
602
|
+
declare function ScalableContainer({ width, height, children, assignClassOnClick, }: ScalableContainerProps): react_jsx_runtime.JSX.Element;
|
|
603
|
+
|
|
604
|
+
interface GridCardItem {
|
|
605
|
+
key: string | number;
|
|
606
|
+
title: React$1.ReactNode;
|
|
607
|
+
description?: React$1.ReactNode;
|
|
608
|
+
/** Image URL or JSX element */
|
|
609
|
+
cover?: string | React$1.ReactNode;
|
|
610
|
+
enabled?: boolean;
|
|
611
|
+
/** Arbitrary route or payload — passed back to onOpen */
|
|
612
|
+
to?: string;
|
|
613
|
+
[key: string]: any;
|
|
614
|
+
}
|
|
615
|
+
interface GridCardProps {
|
|
616
|
+
item: GridCardItem;
|
|
617
|
+
buttonText?: string;
|
|
618
|
+
/** Called when the button is clicked. Receives the full item. */
|
|
619
|
+
onOpen?: (item: GridCardItem) => void;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Application card tile (grid layout).
|
|
623
|
+
*
|
|
624
|
+
* Decoupled from React Router — navigation is delegated to the `onOpen` prop.
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* <GridCard
|
|
628
|
+
* item={{ key: 'reports', title: 'Reports', enabled: true, to: '/reports' }}
|
|
629
|
+
* onOpen={({ to }) => navigate(to!)}
|
|
630
|
+
* />
|
|
631
|
+
*/
|
|
632
|
+
declare function GridCard({ item, buttonText, onOpen }: GridCardProps): react_jsx_runtime.JSX.Element;
|
|
633
|
+
|
|
634
|
+
interface OpaqueGridCardProps {
|
|
635
|
+
item: GridCardItem;
|
|
636
|
+
isRight?: boolean;
|
|
637
|
+
buttonText?: string;
|
|
638
|
+
onOpen?: (item: GridCardItem) => void;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Opaque carousel variant of GridCard (left or right edge of the carousel).
|
|
642
|
+
*
|
|
643
|
+
* Decoupled from React Router and ThemeContext.
|
|
644
|
+
* Uses CSS `dark:` classes instead of `useTheme()`.
|
|
645
|
+
*
|
|
646
|
+
* @example
|
|
647
|
+
* <OpaqueGridCard item={sideItem} isRight onOpen={({ to }) => navigate(to!)} />
|
|
648
|
+
*/
|
|
649
|
+
declare function OpaqueGridCard({ item, isRight, buttonText, onOpen, }: OpaqueGridCardProps): react_jsx_runtime.JSX.Element;
|
|
650
|
+
|
|
651
|
+
interface CatalogGridProps {
|
|
652
|
+
items: GridCardItem[];
|
|
653
|
+
buttonText?: string;
|
|
654
|
+
onOpen?: (item: GridCardItem) => void;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Wrapping flex grid of `GridCard` tiles.
|
|
658
|
+
*/
|
|
659
|
+
declare function CatalogGrid({ items, buttonText, onOpen }: CatalogGridProps): react_jsx_runtime.JSX.Element;
|
|
660
|
+
|
|
661
|
+
interface CatalogCarouselProps {
|
|
662
|
+
items: GridCardItem[];
|
|
663
|
+
buttonText?: string;
|
|
664
|
+
onOpen?: (item: GridCardItem) => void;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Three-card carousel (previous → active (scaled) → next).
|
|
668
|
+
*
|
|
669
|
+
* Decoupled from ThemeContext — uses CSS `dark:` classes.
|
|
670
|
+
*/
|
|
671
|
+
declare function CatalogCarousel({ items, buttonText, onOpen }: CatalogCarouselProps): react_jsx_runtime.JSX.Element;
|
|
672
|
+
|
|
673
|
+
interface CatalogProps {
|
|
674
|
+
/** 'grid' | 'carousel' */
|
|
675
|
+
display?: 'grid' | 'carousel';
|
|
676
|
+
items?: GridCardItem[];
|
|
677
|
+
buttonText?: string;
|
|
678
|
+
onOpen?: (item: GridCardItem) => void;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Switches between grid and carousel layouts for a list of application tiles.
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* <Catalog display="carousel" items={apps} onOpen={({ to }) => navigate(to!)} />
|
|
685
|
+
*/
|
|
686
|
+
declare function Catalog({ display, items, buttonText, onOpen }: CatalogProps): react_jsx_runtime.JSX.Element;
|
|
687
|
+
|
|
688
|
+
interface MenuBarItemProps {
|
|
689
|
+
icon: React$1.ReactNode;
|
|
690
|
+
isActive: boolean;
|
|
691
|
+
title: string;
|
|
692
|
+
/** Called when the item is clicked (navigation or logout etc.) */
|
|
693
|
+
onClick?: () => void;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Single item in the MenuBar sidebar.
|
|
697
|
+
*
|
|
698
|
+
* Decoupled from React Router and context — navigation is delegated to `onClick`.
|
|
699
|
+
* The Tooltip is powered by Radix (same as the standalone Tooltip component).
|
|
700
|
+
*
|
|
701
|
+
* @example
|
|
702
|
+
* <MenuBarItem
|
|
703
|
+
* icon={<Icon.Dashboard />}
|
|
704
|
+
* title="Dashboard"
|
|
705
|
+
* isActive={pathname === '/dashboard'}
|
|
706
|
+
* onClick={() => navigate('/dashboard')}
|
|
707
|
+
* />
|
|
708
|
+
*/
|
|
709
|
+
declare function MenuBarItem({ icon, isActive, title, onClick }: MenuBarItemProps): react_jsx_runtime.JSX.Element;
|
|
710
|
+
|
|
711
|
+
interface MenuBarItemConfig extends MenuBarItemProps {
|
|
712
|
+
key: string;
|
|
713
|
+
}
|
|
714
|
+
interface MenuBarProps {
|
|
715
|
+
items: MenuBarItemConfig[];
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Vertical icon sidebar (left edge of the app).
|
|
719
|
+
*
|
|
720
|
+
* Decoupled from React Router, useAuth, and useData.
|
|
721
|
+
* The app composes the items array (with `onClick` handlers) and passes it in.
|
|
722
|
+
*
|
|
723
|
+
* @example
|
|
724
|
+
* const items: MenuBarItemConfig[] = [
|
|
725
|
+
* { key: 'dash', icon: <Icon.Dashboard />, title: 'Dashboard', isActive: pathname === '/dashboard', onClick: () => navigate('/dashboard') },
|
|
726
|
+
* { key: 'logout', icon: <Icon.PowerOff />, title: 'Sign Out', isActive: false, onClick: logOut },
|
|
727
|
+
* ]
|
|
728
|
+
* <MenuBar items={items} />
|
|
729
|
+
*/
|
|
730
|
+
declare function MenuBar({ items }: MenuBarProps): react_jsx_runtime.JSX.Element;
|
|
731
|
+
|
|
732
|
+
interface ContextMenuActionItem {
|
|
733
|
+
key: string | number;
|
|
734
|
+
value: React$1.ReactNode;
|
|
735
|
+
icon?: React$1.ReactNode;
|
|
736
|
+
onClick?: (path?: string, reportType?: string) => void;
|
|
737
|
+
path?: string;
|
|
738
|
+
reportType?: string;
|
|
739
|
+
children?: ContextMenuActionItem[];
|
|
740
|
+
}
|
|
741
|
+
interface ContextMenuPosition {
|
|
742
|
+
x: number;
|
|
743
|
+
y: number;
|
|
744
|
+
}
|
|
745
|
+
interface ContextMenuProps {
|
|
746
|
+
items: ContextMenuActionItem[];
|
|
747
|
+
position: ContextMenuPosition;
|
|
748
|
+
visible: boolean;
|
|
749
|
+
onClose: () => void;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Right-click context menu positioned at arbitrary screen coordinates.
|
|
753
|
+
*
|
|
754
|
+
* Decoupled from `useData()` — the app manages `visible`, `position`, and
|
|
755
|
+
* `items` in its own state and passes them here.
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* const [ctx, setCtx] = useState({ visible: false, items: [], position: { x: 0, y: 0 } })
|
|
759
|
+
*
|
|
760
|
+
* <div onContextMenu={(e) => {
|
|
761
|
+
* e.preventDefault()
|
|
762
|
+
* setCtx({ visible: true, items: menuItems, position: { x: e.clientX, y: e.clientY } })
|
|
763
|
+
* }}>...</div>
|
|
764
|
+
*
|
|
765
|
+
* <ContextMenu {...ctx} onClose={() => setCtx(c => ({ ...c, visible: false }))} />
|
|
766
|
+
*/
|
|
767
|
+
declare function ContextMenu({ items, position, visible, onClose }: ContextMenuProps): react_jsx_runtime.JSX.Element;
|
|
768
|
+
|
|
769
|
+
interface WizardStep {
|
|
770
|
+
/** Ref to the DOM element to highlight */
|
|
771
|
+
stepRef: React$1.RefObject<HTMLElement>;
|
|
772
|
+
description: React$1.ReactNode;
|
|
773
|
+
/** 'natural' | 'center' — controls tooltip position relative to target */
|
|
774
|
+
positioning?: 'natural' | 'center';
|
|
775
|
+
}
|
|
776
|
+
interface WizardProps {
|
|
777
|
+
children: React$1.ReactNode;
|
|
778
|
+
steps: WizardStep[];
|
|
779
|
+
/** localStorage key used to remember dismissal (default: 'oxygen_wizard') */
|
|
780
|
+
storageKey?: string;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Guided-tour overlay wizard.
|
|
784
|
+
*
|
|
785
|
+
* Highlights a DOM element via a border, then shows a floating tooltip
|
|
786
|
+
* adjacent to it. Remembers dismissal via localStorage.
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* const step1Ref = useRef<HTMLDivElement>(null)
|
|
790
|
+
* const steps = [
|
|
791
|
+
* { stepRef: step1Ref, description: 'Click here to start.', positioning: 'natural' },
|
|
792
|
+
* ]
|
|
793
|
+
* <Wizard steps={steps}>
|
|
794
|
+
* <div ref={step1Ref}>...</div>
|
|
795
|
+
* </Wizard>
|
|
796
|
+
*/
|
|
797
|
+
declare function Wizard({ children, steps, storageKey }: WizardProps): react_jsx_runtime.JSX.Element;
|
|
798
|
+
|
|
799
|
+
/** ─────────────────── types ─────────────────── */
|
|
800
|
+
interface TableColumn {
|
|
801
|
+
key: string | number;
|
|
802
|
+
label: React$1.ReactNode;
|
|
803
|
+
keyBind: string;
|
|
804
|
+
component?: (cellValue: any, row: any) => React$1.ReactNode;
|
|
805
|
+
}
|
|
806
|
+
interface PaginationOptions {
|
|
807
|
+
enabled?: boolean;
|
|
808
|
+
perPage?: number;
|
|
809
|
+
withPicker?: boolean;
|
|
810
|
+
serverSide?: boolean;
|
|
811
|
+
/** Server-side: current 1-based page number */
|
|
812
|
+
page?: number;
|
|
813
|
+
/** Server-side: total page count */
|
|
814
|
+
maxPage?: number;
|
|
815
|
+
/** Server-side: total row count (used to calculate maxPage) */
|
|
816
|
+
totalCount?: number;
|
|
817
|
+
pickerOptions?: Array<{
|
|
818
|
+
key: number;
|
|
819
|
+
value: number;
|
|
820
|
+
label: number;
|
|
821
|
+
}>;
|
|
822
|
+
onPageChange?: (page: number) => void;
|
|
823
|
+
onPerPageChange?: (perPage: number) => void;
|
|
824
|
+
}
|
|
825
|
+
interface ExpandRowOptions {
|
|
826
|
+
enabled?: boolean;
|
|
827
|
+
expandIcon?: React$1.ReactNode;
|
|
828
|
+
expandComponent?: (row: any) => React$1.ReactNode;
|
|
829
|
+
}
|
|
830
|
+
interface TableProps {
|
|
831
|
+
columns?: TableColumn[];
|
|
832
|
+
rows?: any[];
|
|
833
|
+
pagination?: PaginationOptions;
|
|
834
|
+
expandRow?: ExpandRowOptions;
|
|
835
|
+
hasSearch?: boolean;
|
|
836
|
+
footer?: React$1.ReactNode;
|
|
837
|
+
header?: React$1.ReactNode;
|
|
838
|
+
tableRef?: React$1.Ref<any>;
|
|
839
|
+
[key: string]: any;
|
|
840
|
+
}
|
|
841
|
+
/** ─────────────────── main component ─────────────────── */
|
|
842
|
+
/**
|
|
843
|
+
* Data table with optional search, pagination, and expandable rows.
|
|
844
|
+
*
|
|
845
|
+
* Supports both client-side and server-side pagination.
|
|
846
|
+
*
|
|
847
|
+
* @example
|
|
848
|
+
* <Table
|
|
849
|
+
* columns={[{ key: 'name', label: 'Name', keyBind: 'name' }]}
|
|
850
|
+
* rows={data}
|
|
851
|
+
* pagination={{ enabled: true, perPage: 15 }}
|
|
852
|
+
* />
|
|
853
|
+
*/
|
|
854
|
+
declare function Table({ columns, rows, pagination, expandRow, hasSearch, footer, header, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
855
|
+
|
|
856
|
+
interface ThemeSwitchProps {
|
|
857
|
+
checked: boolean;
|
|
858
|
+
onChange: (e: {
|
|
859
|
+
target: {
|
|
860
|
+
checked: boolean;
|
|
861
|
+
};
|
|
862
|
+
}) => void;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Theme (dark-mode) toggle switch powered by Radix Switch.
|
|
866
|
+
*
|
|
867
|
+
* Displays a red/green dot to indicate the checked state.
|
|
868
|
+
* Used as the dark-mode toggle in the TopBar.
|
|
869
|
+
*
|
|
870
|
+
* @example
|
|
871
|
+
* <Switch checked={isDarkMode} onChange={({ target }) => setDarkMode(target.checked)} />
|
|
872
|
+
*/
|
|
873
|
+
declare function Switch$1({ checked, onChange }: ThemeSwitchProps): react_jsx_runtime.JSX.Element;
|
|
874
|
+
|
|
875
|
+
interface ButtonProps {
|
|
876
|
+
content?: React$1.ReactNode;
|
|
877
|
+
/** HTML button type attribute */
|
|
878
|
+
buttonType?: 'button' | 'submit' | 'reset';
|
|
879
|
+
/** Visual variant */
|
|
880
|
+
type?: string;
|
|
881
|
+
loading?: boolean;
|
|
882
|
+
disabled?: boolean;
|
|
883
|
+
style?: React$1.CSSProperties;
|
|
884
|
+
icon?: React$1.ReactNode;
|
|
885
|
+
onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Primary action button.
|
|
889
|
+
*
|
|
890
|
+
* @example
|
|
891
|
+
* <Button content="Save" onClick={handleSave} />
|
|
892
|
+
* <Button content="Submit" buttonType="submit" loading={isPending} />
|
|
893
|
+
*/
|
|
894
|
+
declare function Button({ content, buttonType, loading, disabled, style, icon, onClick, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
895
|
+
|
|
896
|
+
interface TextInputProps {
|
|
897
|
+
value?: any;
|
|
898
|
+
onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
899
|
+
disabled?: boolean;
|
|
900
|
+
label?: React$1.ReactNode;
|
|
901
|
+
htmlFor?: string;
|
|
902
|
+
placeholder?: string;
|
|
903
|
+
name?: string;
|
|
904
|
+
inputStyle?: React$1.CSSProperties;
|
|
905
|
+
style?: React$1.CSSProperties;
|
|
906
|
+
/** 'horizontal' | 'vertical' */
|
|
907
|
+
layout?: string;
|
|
908
|
+
onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
|
|
909
|
+
errorMessage?: React$1.ReactNode;
|
|
910
|
+
labelColor?: string;
|
|
911
|
+
id?: string;
|
|
912
|
+
[key: string]: any;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Standard text input with label and validation message.
|
|
916
|
+
*/
|
|
917
|
+
declare function TextInput({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, onBlur, errorMessage, labelColor, }: TextInputProps): react_jsx_runtime.JSX.Element;
|
|
918
|
+
|
|
919
|
+
interface NumberInputProps {
|
|
920
|
+
step?: number;
|
|
921
|
+
value?: any;
|
|
922
|
+
onChange?: (e: {
|
|
923
|
+
target: {
|
|
924
|
+
value: number;
|
|
925
|
+
id?: string;
|
|
926
|
+
name?: string;
|
|
927
|
+
};
|
|
928
|
+
}) => void;
|
|
929
|
+
label?: React$1.ReactNode;
|
|
930
|
+
htmlFor?: string;
|
|
931
|
+
name?: string;
|
|
932
|
+
disabled?: boolean;
|
|
933
|
+
/** 'horizontal' | 'vertical' */
|
|
934
|
+
layout?: string;
|
|
935
|
+
errorMessage?: React$1.ReactNode;
|
|
936
|
+
inputStyle?: React$1.CSSProperties;
|
|
937
|
+
labelStyle?: React$1.CSSProperties;
|
|
938
|
+
placeholder?: string;
|
|
939
|
+
style?: React$1.CSSProperties;
|
|
940
|
+
min?: number;
|
|
941
|
+
max?: number;
|
|
942
|
+
readOnly?: boolean;
|
|
943
|
+
[key: string]: any;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Number input with increment / decrement controls.
|
|
947
|
+
*/
|
|
948
|
+
declare function NumberInput({ step, value, onChange, label, htmlFor, name, disabled, layout, errorMessage, inputStyle, labelStyle, placeholder, style, min, max, readOnly, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
949
|
+
|
|
950
|
+
interface PasswordProps {
|
|
951
|
+
value?: any;
|
|
952
|
+
onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
953
|
+
disabled?: boolean;
|
|
954
|
+
label?: React$1.ReactNode;
|
|
955
|
+
htmlFor?: string;
|
|
956
|
+
placeholder?: string;
|
|
957
|
+
name?: string;
|
|
958
|
+
inputStyle?: React$1.CSSProperties;
|
|
959
|
+
style?: React$1.CSSProperties;
|
|
960
|
+
layout?: string;
|
|
961
|
+
onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
|
|
962
|
+
errorMessage?: React$1.ReactNode;
|
|
963
|
+
labelColor?: string;
|
|
964
|
+
iconColor?: string;
|
|
965
|
+
[key: string]: any;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Password input with show/hide toggle.
|
|
969
|
+
*/
|
|
970
|
+
declare function Password({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout, onBlur, errorMessage, labelColor, iconColor, }: PasswordProps): react_jsx_runtime.JSX.Element;
|
|
971
|
+
|
|
972
|
+
interface SearchInputProps {
|
|
973
|
+
value?: any;
|
|
974
|
+
onChange?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
975
|
+
disabled?: boolean;
|
|
976
|
+
label?: React$1.ReactNode;
|
|
977
|
+
htmlFor?: string;
|
|
978
|
+
placeholder?: string;
|
|
979
|
+
name?: string;
|
|
980
|
+
inputStyle?: React$1.CSSProperties;
|
|
981
|
+
style?: React$1.CSSProperties;
|
|
982
|
+
layout?: string;
|
|
983
|
+
[key: string]: any;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Search text field with a magnifier icon on the right.
|
|
987
|
+
*/
|
|
988
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<Omit<SearchInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
989
|
+
|
|
990
|
+
interface DropdownPillProps {
|
|
991
|
+
value?: React.ReactNode;
|
|
992
|
+
hasSiblings?: boolean;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Pill chip used inside Dropdown to display selected values.
|
|
996
|
+
*/
|
|
997
|
+
declare function DropdownPill({ value, hasSiblings }: DropdownPillProps): react_jsx_runtime.JSX.Element;
|
|
998
|
+
|
|
999
|
+
interface CheckboxProps {
|
|
1000
|
+
/** 'vertical' | 'horizontal' */
|
|
1001
|
+
layout?: string;
|
|
1002
|
+
/** 'left' | 'right' (label side when horizontal) */
|
|
1003
|
+
labelPosition?: string;
|
|
1004
|
+
label?: React$1.ReactNode;
|
|
1005
|
+
name?: string;
|
|
1006
|
+
htmlFor?: string;
|
|
1007
|
+
errorMessage?: React$1.ReactNode;
|
|
1008
|
+
value?: boolean;
|
|
1009
|
+
onChange?: (e: {
|
|
1010
|
+
target: {
|
|
1011
|
+
value: boolean;
|
|
1012
|
+
id?: string;
|
|
1013
|
+
name?: string;
|
|
1014
|
+
};
|
|
1015
|
+
}) => void;
|
|
1016
|
+
[key: string]: any;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Accessible checkbox powered by Radix Checkbox.
|
|
1020
|
+
*
|
|
1021
|
+
* Radix handles keyboard activation, focus ring, and ARIA checked state.
|
|
1022
|
+
* Emits a synthetic `{ target: { value, id, name } }` event to stay
|
|
1023
|
+
* compatible with existing form-change handlers.
|
|
1024
|
+
*
|
|
1025
|
+
* @example
|
|
1026
|
+
* <Checkbox
|
|
1027
|
+
* htmlFor="agree"
|
|
1028
|
+
* label="I agree to the terms"
|
|
1029
|
+
* value={form.agree}
|
|
1030
|
+
* onChange={({ target }) => setField('agree', target.value)}
|
|
1031
|
+
* />
|
|
1032
|
+
*/
|
|
1033
|
+
declare function Checkbox({ layout, labelPosition, label, name, htmlFor, errorMessage, value, onChange, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
1034
|
+
|
|
1035
|
+
interface SwitchInputProps {
|
|
1036
|
+
checked?: boolean;
|
|
1037
|
+
onChange?: (e: {
|
|
1038
|
+
target: {
|
|
1039
|
+
checked: boolean;
|
|
1040
|
+
};
|
|
1041
|
+
}) => void;
|
|
1042
|
+
checkedIcon?: React$1.ReactNode;
|
|
1043
|
+
uncheckedIcon?: React$1.ReactNode;
|
|
1044
|
+
[key: string]: any;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Form switch (on/off toggle) powered by Radix Switch.
|
|
1048
|
+
*
|
|
1049
|
+
* Radix handles keyboard activation, focus ring, and `role="switch"` ARIA.
|
|
1050
|
+
* Accepts optional icon slots for the thumb in checked/unchecked states.
|
|
1051
|
+
*
|
|
1052
|
+
* Emits `{ target: { checked } }` for compatibility with existing handlers.
|
|
1053
|
+
*
|
|
1054
|
+
* @example
|
|
1055
|
+
* <Switch
|
|
1056
|
+
* checked={form.enabled}
|
|
1057
|
+
* onChange={({ target }) => setField('enabled', target.checked)}
|
|
1058
|
+
* />
|
|
1059
|
+
*/
|
|
1060
|
+
declare function Switch({ checked, onChange, checkedIcon, uncheckedIcon, }: SwitchInputProps): react_jsx_runtime.JSX.Element;
|
|
1061
|
+
|
|
1062
|
+
interface DropdownItem {
|
|
1063
|
+
key: string | number;
|
|
1064
|
+
label: React$1.ReactNode;
|
|
1065
|
+
icon?: React$1.ReactNode;
|
|
1066
|
+
}
|
|
1067
|
+
interface DropdownProps {
|
|
1068
|
+
isMultiselect?: boolean;
|
|
1069
|
+
hasSearch?: boolean;
|
|
1070
|
+
label?: React$1.ReactNode;
|
|
1071
|
+
name?: string;
|
|
1072
|
+
value?: any;
|
|
1073
|
+
onChange?: (e: {
|
|
1074
|
+
target: {
|
|
1075
|
+
value: any;
|
|
1076
|
+
id?: string;
|
|
1077
|
+
name?: string;
|
|
1078
|
+
};
|
|
1079
|
+
}) => void;
|
|
1080
|
+
onBlur?: React$1.FocusEventHandler;
|
|
1081
|
+
disabled?: boolean;
|
|
1082
|
+
/** 'horizontal' | 'vertical' */
|
|
1083
|
+
layout?: string;
|
|
1084
|
+
errorMessage?: React$1.ReactNode;
|
|
1085
|
+
style?: React$1.CSSProperties;
|
|
1086
|
+
htmlFor?: string;
|
|
1087
|
+
items?: DropdownItem[];
|
|
1088
|
+
labelStyle?: React$1.CSSProperties;
|
|
1089
|
+
placeholder?: string;
|
|
1090
|
+
[key: string]: any;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Select / multi-select dropdown powered by Radix Popover.
|
|
1094
|
+
*
|
|
1095
|
+
* Radix handles focus-trap within the popover, keyboard dismiss (Escape),
|
|
1096
|
+
* and correct portal-based z-index stacking.
|
|
1097
|
+
*
|
|
1098
|
+
* Emits `{ target: { value, id, name } }` for form-compatibility.
|
|
1099
|
+
*
|
|
1100
|
+
* @example
|
|
1101
|
+
* // Single-select
|
|
1102
|
+
* <Dropdown label="Vessel" items={vessels} value={form.vessel} onChange={handleChange} htmlFor="vessel" />
|
|
1103
|
+
*
|
|
1104
|
+
* // Multi-select
|
|
1105
|
+
* <Dropdown isMultiselect label="Fuels" items={fuels} value={form.fuels} onChange={handleChange} />
|
|
1106
|
+
*/
|
|
1107
|
+
declare function Dropdown({ isMultiselect, hasSearch, label, name, value, onChange, disabled, layout, errorMessage, style, htmlFor, items, labelStyle, placeholder, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
1108
|
+
|
|
1109
|
+
interface AutoCompleteItem {
|
|
1110
|
+
key: string;
|
|
1111
|
+
value: string;
|
|
1112
|
+
label: string;
|
|
1113
|
+
icon?: React$1.ReactNode;
|
|
1114
|
+
}
|
|
1115
|
+
interface AutoCompleteProps {
|
|
1116
|
+
disabled?: boolean;
|
|
1117
|
+
label?: React$1.ReactNode;
|
|
1118
|
+
placeholder?: string;
|
|
1119
|
+
name?: string;
|
|
1120
|
+
inputStyle?: React$1.CSSProperties;
|
|
1121
|
+
style?: React$1.CSSProperties;
|
|
1122
|
+
/** 'horizontal' | 'vertical' */
|
|
1123
|
+
layout?: string;
|
|
1124
|
+
items?: AutoCompleteItem[];
|
|
1125
|
+
onItemClick?: (value: string) => void;
|
|
1126
|
+
/** Custom "empty" message */
|
|
1127
|
+
emptyText?: string;
|
|
1128
|
+
[key: string]: any;
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Search-as-you-type autocomplete powered by Radix Popover.
|
|
1132
|
+
*
|
|
1133
|
+
* The popover opens when the input is focused and closes when an item is
|
|
1134
|
+
* selected or the user clicks away. Radix handles portal-based z-stacking.
|
|
1135
|
+
*
|
|
1136
|
+
* @example
|
|
1137
|
+
* <AutoComplete
|
|
1138
|
+
* label="Vessel"
|
|
1139
|
+
* items={vessels.map(v => ({ key: v.imo, value: v.imo, label: v.name }))}
|
|
1140
|
+
* onItemClick={(imo) => setVessel(imo)}
|
|
1141
|
+
* />
|
|
1142
|
+
*/
|
|
1143
|
+
declare function AutoComplete({ disabled, label, placeholder, name, inputStyle, style, layout, items, onItemClick, emptyText, }: AutoCompleteProps): react_jsx_runtime.JSX.Element;
|
|
1144
|
+
|
|
1145
|
+
interface TreeSelectItem {
|
|
1146
|
+
key: string | number;
|
|
1147
|
+
label: React$1.ReactNode;
|
|
1148
|
+
icon?: React$1.ReactNode;
|
|
1149
|
+
}
|
|
1150
|
+
interface TreeSelectProps {
|
|
1151
|
+
hasSearch?: boolean;
|
|
1152
|
+
label?: React$1.ReactNode;
|
|
1153
|
+
name?: string;
|
|
1154
|
+
value?: any;
|
|
1155
|
+
onChange?: (e: {
|
|
1156
|
+
target: {
|
|
1157
|
+
value: any;
|
|
1158
|
+
id?: string;
|
|
1159
|
+
name?: string;
|
|
1160
|
+
};
|
|
1161
|
+
}) => void;
|
|
1162
|
+
onBlur?: React$1.FocusEventHandler;
|
|
1163
|
+
disabled?: boolean;
|
|
1164
|
+
/** 'horizontal' | 'vertical' */
|
|
1165
|
+
layout?: string;
|
|
1166
|
+
errorMessage?: React$1.ReactNode;
|
|
1167
|
+
style?: React$1.CSSProperties;
|
|
1168
|
+
htmlFor?: string;
|
|
1169
|
+
items?: TreeSelectItem[];
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Single-value select with a flat list, powered by Radix Popover.
|
|
1173
|
+
* Functionally similar to Dropdown (single-select only).
|
|
1174
|
+
*
|
|
1175
|
+
* @example
|
|
1176
|
+
* <TreeSelect label="Fleet" items={fleets} value={form.fleet} onChange={handleChange} htmlFor="fleet" />
|
|
1177
|
+
*/
|
|
1178
|
+
declare function TreeSelect({ label, name, value, onChange, disabled, layout, errorMessage, style, htmlFor, items, }: TreeSelectProps): react_jsx_runtime.JSX.Element;
|
|
1179
|
+
|
|
1180
|
+
interface FileInputProps {
|
|
1181
|
+
allowMultiple?: boolean;
|
|
1182
|
+
onChange?: (e: {
|
|
1183
|
+
target: {
|
|
1184
|
+
files: File[];
|
|
1185
|
+
name?: string;
|
|
1186
|
+
id?: string;
|
|
1187
|
+
value?: string;
|
|
1188
|
+
};
|
|
1189
|
+
}) => void;
|
|
1190
|
+
name?: string;
|
|
1191
|
+
/** Accepted MIME types / extensions */
|
|
1192
|
+
accept?: string;
|
|
1193
|
+
[key: string]: any;
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Drag-and-drop / click file input.
|
|
1197
|
+
*
|
|
1198
|
+
* Decoupled from ThemeContext — uses CSS `dark:` classes.
|
|
1199
|
+
*
|
|
1200
|
+
* @example
|
|
1201
|
+
* <FileInput
|
|
1202
|
+
* name="xlsxUpload"
|
|
1203
|
+
* accept=".xlsx"
|
|
1204
|
+
* onChange={(e) => setFile(e.target.files[0])}
|
|
1205
|
+
* />
|
|
1206
|
+
*/
|
|
1207
|
+
declare function FileInput({ allowMultiple, onChange, name, accept, }: FileInputProps): react_jsx_runtime.JSX.Element;
|
|
1208
|
+
|
|
1209
|
+
/** ─────────────────── DatePicker ─────────────────── */
|
|
1210
|
+
interface DatePickerProps {
|
|
1211
|
+
value: Date;
|
|
1212
|
+
onChange: (e: {
|
|
1213
|
+
target: {
|
|
1214
|
+
value: Date;
|
|
1215
|
+
id?: string;
|
|
1216
|
+
name?: string;
|
|
1217
|
+
};
|
|
1218
|
+
}) => void;
|
|
1219
|
+
layout?: 'horizontal' | 'vertical';
|
|
1220
|
+
label?: React$1.ReactNode;
|
|
1221
|
+
htmlFor?: string;
|
|
1222
|
+
name?: string;
|
|
1223
|
+
style?: React$1.CSSProperties;
|
|
1224
|
+
errorMessage?: React$1.ReactNode;
|
|
1225
|
+
disableBefore?: Date | string;
|
|
1226
|
+
disableAfter?: Date | string;
|
|
1227
|
+
disabled?: boolean;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Custom calendar date picker.
|
|
1231
|
+
*
|
|
1232
|
+
* @example
|
|
1233
|
+
* <DatePicker.DatePicker
|
|
1234
|
+
* label="Report date"
|
|
1235
|
+
* value={form.date}
|
|
1236
|
+
* onChange={({ target }) => setField('date', target.value)}
|
|
1237
|
+
* disableAfter={new Date()}
|
|
1238
|
+
* />
|
|
1239
|
+
*/
|
|
1240
|
+
declare function DatePickerBase({ value, onChange, layout, label, htmlFor, name, style, errorMessage, disableBefore, disableAfter, disabled, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
1241
|
+
/** ─────────────────── TemporalPicker (year/number scroll) ─────────────────── */
|
|
1242
|
+
interface TemporalPickerProps {
|
|
1243
|
+
value: number;
|
|
1244
|
+
onChange: (e: {
|
|
1245
|
+
target: {
|
|
1246
|
+
value: number;
|
|
1247
|
+
};
|
|
1248
|
+
}) => void;
|
|
1249
|
+
type?: 'year';
|
|
1250
|
+
upperLimit?: number;
|
|
1251
|
+
lowerLimit?: number;
|
|
1252
|
+
errorMessage?: React$1.ReactNode;
|
|
1253
|
+
label?: React$1.ReactNode;
|
|
1254
|
+
layout?: string;
|
|
1255
|
+
style?: React$1.CSSProperties;
|
|
1256
|
+
}
|
|
1257
|
+
declare function TemporalPickerBase({ value, onChange, lowerLimit, upperLimit, errorMessage, label, layout, style, }: TemporalPickerProps): react_jsx_runtime.JSX.Element;
|
|
1258
|
+
/** ─────────────────── Namespace export ─────────────────── */
|
|
1259
|
+
/**
|
|
1260
|
+
* Temporal date/time picker namespace.
|
|
1261
|
+
*
|
|
1262
|
+
* @example
|
|
1263
|
+
* import Temporal from '@geomak/ui'
|
|
1264
|
+
*
|
|
1265
|
+
* <Temporal.DatePicker value={date} onChange={handleChange} label="Date" />
|
|
1266
|
+
* <Temporal.TemporalPicker value={year} type="year" lowerLimit={2018} upperLimit={2026} onChange={handleChange} />
|
|
1267
|
+
*/
|
|
1268
|
+
declare const Temporal: {
|
|
1269
|
+
DatePicker: typeof DatePickerBase;
|
|
1270
|
+
TemporalPicker: typeof TemporalPickerBase;
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
export { AutoComplete, type AutoCompleteProps, Button, type ButtonProps, COLORS, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, Switch$1 as ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
|