maritime-ui 0.1.3 → 0.1.41
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/index.d.ts +259 -0
- package/dist/maritime-ui.cjs +30 -1
- package/dist/maritime-ui.js +13891 -122
- package/dist/style.css +1 -1
- package/package.json +16 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
3
|
import { JSX } from 'react';
|
|
3
4
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
5
|
+
import { Props as Props_8 } from 'react-select';
|
|
4
6
|
import { ReactElement } from 'react';
|
|
5
7
|
import { ReactNode } from 'react';
|
|
8
|
+
import { RefAttributes } from 'react';
|
|
9
|
+
import { RefObject } from 'react';
|
|
10
|
+
import { SelectInstance } from 'react-select';
|
|
6
11
|
|
|
7
12
|
export declare const Badge: ({ type, title, icon }: Props) => JSX.Element;
|
|
8
13
|
|
|
@@ -28,10 +33,264 @@ declare type ButtonProps = {
|
|
|
28
33
|
additionalClassName?: string;
|
|
29
34
|
};
|
|
30
35
|
|
|
36
|
+
declare type DropdownAction = {
|
|
37
|
+
label: string;
|
|
38
|
+
onClick: () => void;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export declare type DropdownOption = {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export declare const FilterButton: FC<FilterButtonProps>;
|
|
49
|
+
|
|
50
|
+
declare type FilterButtonProps = {
|
|
51
|
+
Icon: FC;
|
|
52
|
+
title: string;
|
|
53
|
+
options: {
|
|
54
|
+
value: string;
|
|
55
|
+
label: string;
|
|
56
|
+
}[];
|
|
57
|
+
selectedOptions: string[];
|
|
58
|
+
onChange: (selectedOptions: string[]) => void;
|
|
59
|
+
showAll?: boolean;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export declare const FilterSearch: FC<FilterSearchProps>;
|
|
63
|
+
|
|
64
|
+
declare type FilterSearchProps = {
|
|
65
|
+
value: string;
|
|
66
|
+
onChange: (value: string) => void;
|
|
67
|
+
onSearch?: () => void;
|
|
68
|
+
onClear?: () => void;
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
minSearchLength?: number;
|
|
71
|
+
searchTypeOptions?: DropdownOption[];
|
|
72
|
+
searchTypeValue?: DropdownOption;
|
|
73
|
+
onSearchTypeChange?: (value: DropdownOption) => void;
|
|
74
|
+
children?: ReactNode;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export declare const FormFieldCheckbox: ({ controlKey, options, labelText, required, disabled, multiple, singleSelect, }: Props_6) => JSX.Element;
|
|
78
|
+
|
|
79
|
+
export declare const FormFieldDatepicker: ({ controlKey, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_9) => JSX.Element;
|
|
80
|
+
|
|
81
|
+
export declare const FormFieldDatepickerRange: ({ controlKeyStart, controlKeyEnd, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_10) => JSX.Element;
|
|
82
|
+
|
|
83
|
+
export declare const FormFieldInput: ({ controlKey, labelText, placeholder, type, required, disabled, numeric, digitsOnly, decimalPlaces, onAfterChange, errorText, }: Props_5) => JSX.Element;
|
|
84
|
+
|
|
85
|
+
export declare const FormFieldMultiSelect: ForwardRefExoticComponent<Omit<Props_8<DropdownOption, true>, "options" | "isMulti" | "noOptionsMessage"> & {
|
|
86
|
+
controlKey: string;
|
|
87
|
+
options: DropdownOption[];
|
|
88
|
+
labelText?: string;
|
|
89
|
+
placeholder?: string;
|
|
90
|
+
required?: boolean;
|
|
91
|
+
isSearchable?: boolean;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
onAfterChange?: (values: string[]) => void;
|
|
94
|
+
errorText?: string;
|
|
95
|
+
optimize?: boolean;
|
|
96
|
+
} & RefAttributes<SelectInstance<DropdownOption, true>>>;
|
|
97
|
+
|
|
98
|
+
export declare const FormFieldRadio: ({ controlKey, options, label, tooltipText, required, disabled, }: Props_11) => JSX.Element;
|
|
99
|
+
|
|
100
|
+
export declare const FormFieldSelect: ForwardRefExoticComponent<Omit<Props_8<DropdownOption, false>, "options" | "noOptionsMessage"> & {
|
|
101
|
+
controlKey: string;
|
|
102
|
+
options: DropdownOption[];
|
|
103
|
+
labelText?: string;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
required?: boolean;
|
|
106
|
+
isSearchable?: boolean;
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
onAfterChange?: (value: string) => void;
|
|
109
|
+
errorText?: string;
|
|
110
|
+
optimize?: boolean;
|
|
111
|
+
} & RefAttributes<SelectInstance<DropdownOption, false>>>;
|
|
112
|
+
|
|
113
|
+
export declare const FormFieldTextarea: ({ controlKey, labelText, placeholder, required, disabled, rows, errorText, }: Props_7) => JSX.Element;
|
|
114
|
+
|
|
115
|
+
export declare const MoreActionsDropdown: FC<MoreActionsDropdownProps>;
|
|
116
|
+
|
|
117
|
+
declare type MoreActionsDropdownProps = {
|
|
118
|
+
actions: DropdownAction[];
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export declare const PageLoader: FC<PageLoaderProps>;
|
|
122
|
+
|
|
123
|
+
declare type PageLoaderProps = {
|
|
124
|
+
text?: ReactNode;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export declare const Pagination: FC<Props_3>;
|
|
128
|
+
|
|
31
129
|
declare type Props = {
|
|
32
130
|
type: BadgeType;
|
|
33
131
|
title: string;
|
|
34
132
|
icon?: ReactElement;
|
|
35
133
|
};
|
|
36
134
|
|
|
135
|
+
declare type Props_10 = {
|
|
136
|
+
controlKeyStart: string;
|
|
137
|
+
controlKeyEnd: string;
|
|
138
|
+
labelText?: string;
|
|
139
|
+
placeholder?: string;
|
|
140
|
+
required?: boolean;
|
|
141
|
+
disabled?: boolean;
|
|
142
|
+
clearable?: boolean;
|
|
143
|
+
dateFormat?: string;
|
|
144
|
+
minDate?: Date;
|
|
145
|
+
maxDate?: Date;
|
|
146
|
+
onAfterChange?: (startValue: string, endValue: string) => void;
|
|
147
|
+
errorText?: string;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
declare type Props_11 = {
|
|
151
|
+
controlKey: string;
|
|
152
|
+
options: RadioOption[];
|
|
153
|
+
label?: string;
|
|
154
|
+
tooltipText?: string;
|
|
155
|
+
required?: boolean;
|
|
156
|
+
disabled?: boolean;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare type Props_2 = {
|
|
160
|
+
icon?: ReactNode;
|
|
161
|
+
illustration?: ReactNode;
|
|
162
|
+
text: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
declare type Props_3 = {
|
|
166
|
+
additionalClassName?: string;
|
|
167
|
+
handleClick?: (pageNumber: number) => void;
|
|
168
|
+
page: number;
|
|
169
|
+
itemsPerPage?: number;
|
|
170
|
+
totalNumberOfItems?: number;
|
|
171
|
+
onSide?: number;
|
|
172
|
+
scrollTo?: RefObject<HTMLDivElement>;
|
|
173
|
+
showResultCount?: boolean;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
declare type Props_4 = {
|
|
177
|
+
tooltipText?: string;
|
|
178
|
+
content?: string;
|
|
179
|
+
html?: string;
|
|
180
|
+
children?: ReactNode;
|
|
181
|
+
place?: TooltipPlace;
|
|
182
|
+
position?: TooltipPlace;
|
|
183
|
+
delay?: number;
|
|
184
|
+
className?: string;
|
|
185
|
+
wrapperClassName?: string;
|
|
186
|
+
ariaLabel?: string;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
declare type Props_5 = {
|
|
190
|
+
controlKey: string;
|
|
191
|
+
labelText?: string;
|
|
192
|
+
placeholder?: string;
|
|
193
|
+
type?: string;
|
|
194
|
+
required?: boolean;
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
numeric?: boolean;
|
|
197
|
+
digitsOnly?: boolean;
|
|
198
|
+
decimalPlaces?: number;
|
|
199
|
+
onAfterChange?: (value: string) => void;
|
|
200
|
+
errorText?: string;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
declare type Props_6 = {
|
|
204
|
+
controlKey: string;
|
|
205
|
+
options?: DropdownOption[];
|
|
206
|
+
labelText?: string;
|
|
207
|
+
required?: boolean;
|
|
208
|
+
disabled?: boolean;
|
|
209
|
+
multiple?: boolean;
|
|
210
|
+
singleSelect?: boolean;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
declare type Props_7 = {
|
|
214
|
+
controlKey: string;
|
|
215
|
+
labelText?: string;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
required?: boolean;
|
|
218
|
+
disabled?: boolean;
|
|
219
|
+
rows?: number;
|
|
220
|
+
errorText?: string;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
declare type Props_9 = {
|
|
224
|
+
controlKey: string;
|
|
225
|
+
labelText?: string;
|
|
226
|
+
placeholder?: string;
|
|
227
|
+
required?: boolean;
|
|
228
|
+
disabled?: boolean;
|
|
229
|
+
clearable?: boolean;
|
|
230
|
+
dateFormat?: string;
|
|
231
|
+
minDate?: Date;
|
|
232
|
+
maxDate?: Date;
|
|
233
|
+
onAfterChange?: (value: string) => void;
|
|
234
|
+
errorText?: string;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export declare type RadioOption = {
|
|
238
|
+
label: string;
|
|
239
|
+
value: string;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
description?: string;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export declare const Table: FC<TableProps>;
|
|
245
|
+
|
|
246
|
+
export declare type TableColumn = {
|
|
247
|
+
label: string;
|
|
248
|
+
sortKey?: string;
|
|
249
|
+
align?: 'left' | 'center' | 'right';
|
|
250
|
+
tooltipHtml?: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
declare type TableProps = {
|
|
254
|
+
headerItems?: string[];
|
|
255
|
+
columns?: TableColumn[];
|
|
256
|
+
sort?: TableSortState;
|
|
257
|
+
onSort?: (sortKey: string) => void;
|
|
258
|
+
header?: ReactElement;
|
|
259
|
+
checkBox?: ReactElement;
|
|
260
|
+
body: ReactElement;
|
|
261
|
+
isLoading?: boolean;
|
|
262
|
+
hasHoverEffect?: boolean;
|
|
263
|
+
additionalClassName?: string;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export declare type TableSortState = {
|
|
267
|
+
column: string;
|
|
268
|
+
direction: 'asc' | 'desc';
|
|
269
|
+
} | null;
|
|
270
|
+
|
|
271
|
+
export declare const TableZeroStateRow: ({ icon, illustration, text }: Props_2) => JSX.Element;
|
|
272
|
+
|
|
273
|
+
export declare const ToggleButton: FC<ToggleButtonProps>;
|
|
274
|
+
|
|
275
|
+
declare type ToggleButtonProps = {
|
|
276
|
+
value: boolean;
|
|
277
|
+
onChange: (value: boolean) => void;
|
|
278
|
+
buttonSize?: 'small' | 'large';
|
|
279
|
+
disabled?: boolean;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export declare const ToggleView: FC<ToggleViewProps>;
|
|
283
|
+
|
|
284
|
+
declare type ToggleViewProps = {
|
|
285
|
+
value: boolean;
|
|
286
|
+
onChange: (value: boolean) => void;
|
|
287
|
+
LeftIcon: FC;
|
|
288
|
+
RightIcon: FC;
|
|
289
|
+
disabled?: boolean;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export declare const Tooltip: ({ tooltipText, content, html, children, place, position, delay, className, wrapperClassName, ariaLabel, }: Props_4) => JSX.Element | null;
|
|
293
|
+
|
|
294
|
+
declare type TooltipPlace = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
295
|
+
|
|
37
296
|
export { }
|