maritime-ui 0.1.89 → 0.1.91

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 ADDED
@@ -0,0 +1,18 @@
1
+ # maritime-ui
2
+
3
+ Common UI components and util functions.
4
+
5
+ ## Licenses of bundled assets
6
+
7
+ ### Twemoji Country Flags
8
+
9
+ `CountryFlag` bundles the **Twemoji Country Flags** font so that country flag emojis
10
+ render in Chromium-based browsers on Windows, where the system emoji font does not
11
+ contain flags.
12
+
13
+ The emoji art comes from [Twemoji](https://twemoji.twitter.com) and is used and
14
+ redistributed under the [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
15
+ license terms offered by the Twemoji project. The art is unmodified; it is only
16
+ repackaged as a web font, as built by
17
+ [talkjs/country-flag-emoji-polyfill](https://github.com/talkjs/country-flag-emoji-polyfill)
18
+ (font build tooling under MIT, Copyright (c) 2022 TalkJS).
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { ForwardRefExoticComponent } from 'react';
4
4
  import { JSX } from 'react';
5
5
  import { JSXElementConstructor } from 'react';
6
6
  import { MouseEvent as MouseEvent_2 } from 'react';
7
- import { Props as Props_11 } from 'react-select';
7
+ import { Props as Props_12 } from 'react-select';
8
8
  import { ReactElement } from 'react';
9
9
  import { ReactNode } from 'react';
10
10
  import { ReactPortal } from 'react';
@@ -76,9 +76,11 @@ export declare const CloudUploadIcon: () => JSX.Element;
76
76
 
77
77
  export declare const ConfirmedIcon: () => JSX.Element;
78
78
 
79
+ export declare const CountryFlag: ({ country }: Props_3) => JSX.Element | null;
80
+
79
81
  export declare const CsvIcon: () => JSX.Element;
80
82
 
81
- export declare const DateSeparator: ({ date, noIcon }: Props_3) => JSX.Element;
83
+ export declare const DateSeparator: ({ date, noIcon }: Props_4) => JSX.Element;
82
84
 
83
85
  export declare const DeleteSlotIcon: FC;
84
86
 
@@ -107,7 +109,7 @@ export declare const EditIcon: FC;
107
109
 
108
110
  export declare const EditPenIcon: FC;
109
111
 
110
- export declare class ErrorBoundary extends Component<Props_19, State> {
112
+ export declare class ErrorBoundary extends Component<Props_20, State> {
111
113
  state: State;
112
114
  static getDerivedStateFromError(error: Error): State;
113
115
  render(): string | number | bigint | boolean | JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
@@ -158,15 +160,15 @@ export declare const formatDateDots: (value?: string | Date) => string;
158
160
 
159
161
  export declare const formatPrice: (price: number) => string;
160
162
 
161
- export declare const FormFieldCheckbox: ({ controlKey, options, labelText, inline, required, disabled, exclusive, }: Props_9) => JSX.Element;
163
+ export declare const FormFieldCheckbox: ({ controlKey, options, labelText, inline, required, disabled, exclusive, }: Props_10) => JSX.Element;
162
164
 
163
- export declare const FormFieldDatepicker: ({ controlKey, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, openToDate, onAfterChange, errorText, }: Props_12) => JSX.Element;
165
+ export declare const FormFieldDatepicker: ({ controlKey, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, openToDate, onAfterChange, errorText, }: Props_13) => JSX.Element;
164
166
 
165
- export declare const FormFieldDatepickerRange: ({ controlKeyStart, controlKeyEnd, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_13) => JSX.Element;
167
+ export declare const FormFieldDatepickerRange: ({ controlKeyStart, controlKeyEnd, labelText, placeholder, required, disabled, clearable, dateFormat, minDate, maxDate, onAfterChange, errorText, }: Props_14) => JSX.Element;
166
168
 
167
- export declare const FormFieldInput: ({ controlKey, labelText, type, required, disabled, numeric, digitsOnly, decimalPlaces, onAfterChange, errorText, prefixIcon, suffixIcon, onSuffixIconClick, autoFocus, }: Props_8) => JSX.Element;
169
+ export declare const FormFieldInput: ({ controlKey, labelText, type, required, disabled, numeric, digitsOnly, decimalPlaces, onAfterChange, errorText, prefixIcon, suffixIcon, onSuffixIconClick, autoFocus, }: Props_9) => JSX.Element;
168
170
 
169
- export declare const FormFieldMultiSelect: ForwardRefExoticComponent<Omit<Props_11<DropdownOption, true>, "options" | "isMulti" | "noOptionsMessage"> & {
171
+ export declare const FormFieldMultiSelect: ForwardRefExoticComponent<Omit<Props_12<DropdownOption, true>, "options" | "isMulti" | "noOptionsMessage"> & {
170
172
  controlKey: string;
171
173
  options: DropdownOption[];
172
174
  labelText?: string;
@@ -179,9 +181,9 @@ errorText?: string;
179
181
  optimize?: boolean;
180
182
  } & RefAttributes<SelectInstance<DropdownOption, true>>>;
181
183
 
182
- export declare const FormFieldRadio: ({ controlKey, options, label, tooltipText, required, disabled, }: Props_14) => JSX.Element;
184
+ export declare const FormFieldRadio: ({ controlKey, options, label, tooltipText, required, disabled, }: Props_15) => JSX.Element;
183
185
 
184
- export declare const FormFieldSelect: ForwardRefExoticComponent<Omit<Props_11<DropdownOption, false>, "options" | "noOptionsMessage"> & {
186
+ export declare const FormFieldSelect: ForwardRefExoticComponent<Omit<Props_12<DropdownOption, false>, "options" | "noOptionsMessage"> & {
185
187
  controlKey: string;
186
188
  options: DropdownOption[];
187
189
  labelText?: string;
@@ -195,9 +197,9 @@ optimize?: boolean;
195
197
  inline?: boolean;
196
198
  } & RefAttributes<SelectInstance<DropdownOption, false>>>;
197
199
 
198
- export declare const FormFieldTextarea: ({ controlKey, labelText, required, disabled, rows, errorText, }: Props_10) => JSX.Element;
200
+ export declare const FormFieldTextarea: ({ controlKey, labelText, required, disabled, rows, errorText, }: Props_11) => JSX.Element;
199
201
 
200
- export declare const FormFieldTimepicker: FC<Props_15>;
202
+ export declare const FormFieldTimepicker: FC<Props_16>;
201
203
 
202
204
  export declare const getBadgeTitle: (status: string) => string;
203
205
 
@@ -233,7 +235,7 @@ export declare const JpgIcon: () => JSX.Element;
233
235
 
234
236
  export declare const LinkIcon: () => JSX.Element;
235
237
 
236
- export declare const Loader: ({ size }: Props_16) => JSX.Element;
238
+ export declare const Loader: ({ size }: Props_17) => JSX.Element;
237
239
 
238
240
  export declare const LoadingSpinnerIcon: FC;
239
241
 
@@ -245,7 +247,7 @@ export declare const MagnifierPlusIcon: FC;
245
247
 
246
248
  export declare const MailboxIcon: () => JSX.Element;
247
249
 
248
- export declare const MessageBoxError: ({ errorTag, error }: Props_18) => JSX.Element;
250
+ export declare const MessageBoxError: ({ errorTag, error }: Props_19) => JSX.Element;
249
251
 
250
252
  export declare const MoreActionsDropdown: FC<MoreActionsDropdownProps>;
251
253
 
@@ -263,9 +265,9 @@ declare type PageLoaderProps = {
263
265
  text?: ReactNode;
264
266
  };
265
267
 
266
- export declare const PageWrapper: ({ children, additionalClassName }: Props_17) => JSX.Element;
268
+ export declare const PageWrapper: ({ children, additionalClassName }: Props_18) => JSX.Element;
267
269
 
268
- export declare const Pagination: FC<Props_5>;
270
+ export declare const Pagination: FC<Props_6>;
269
271
 
270
272
  export declare const PdfIcon: () => JSX.Element;
271
273
 
@@ -286,6 +288,16 @@ declare type Props = {
286
288
  };
287
289
 
288
290
  declare type Props_10 = {
291
+ controlKey: string;
292
+ options?: DropdownOption[];
293
+ labelText?: string;
294
+ inline?: boolean;
295
+ required?: boolean;
296
+ disabled?: boolean;
297
+ exclusive?: boolean;
298
+ };
299
+
300
+ declare type Props_11 = {
289
301
  controlKey: string;
290
302
  labelText?: string;
291
303
  required?: boolean;
@@ -294,7 +306,7 @@ declare type Props_10 = {
294
306
  errorText?: string;
295
307
  };
296
308
 
297
- declare type Props_12 = {
309
+ declare type Props_13 = {
298
310
  controlKey: string;
299
311
  labelText?: string;
300
312
  placeholder?: string;
@@ -309,7 +321,7 @@ declare type Props_12 = {
309
321
  errorText?: string;
310
322
  };
311
323
 
312
- declare type Props_13 = {
324
+ declare type Props_14 = {
313
325
  controlKeyStart: string;
314
326
  controlKeyEnd: string;
315
327
  labelText?: string;
@@ -324,7 +336,7 @@ declare type Props_13 = {
324
336
  errorText?: string;
325
337
  };
326
338
 
327
- declare type Props_14 = {
339
+ declare type Props_15 = {
328
340
  controlKey: string;
329
341
  options: RadioOption[];
330
342
  label?: string;
@@ -333,7 +345,7 @@ declare type Props_14 = {
333
345
  disabled?: boolean;
334
346
  };
335
347
 
336
- declare type Props_15 = {
348
+ declare type Props_16 = {
337
349
  controlKey: string;
338
350
  labelText: string;
339
351
  required?: boolean;
@@ -342,24 +354,20 @@ declare type Props_15 = {
342
354
  errorText?: string;
343
355
  };
344
356
 
345
- declare type Props_16 = {
357
+ declare type Props_17 = {
346
358
  size?: number;
347
359
  };
348
360
 
349
- declare type Props_17 = {
361
+ declare type Props_18 = {
350
362
  children: ReactNode;
351
363
  additionalClassName?: string | undefined;
352
364
  };
353
365
 
354
- declare type Props_18 = {
366
+ declare type Props_19 = {
355
367
  errorTag?: string;
356
368
  error?: string;
357
369
  };
358
370
 
359
- declare type Props_19 = {
360
- children: ReactNode;
361
- };
362
-
363
371
  declare type Props_2 = {
364
372
  checked: boolean;
365
373
  onChange: (checked: boolean) => void;
@@ -369,18 +377,26 @@ declare type Props_2 = {
369
377
  name?: string;
370
378
  };
371
379
 
380
+ declare type Props_20 = {
381
+ children: ReactNode;
382
+ };
383
+
372
384
  declare type Props_3 = {
385
+ country: string;
386
+ };
387
+
388
+ declare type Props_4 = {
373
389
  date: string;
374
390
  noIcon?: boolean;
375
391
  };
376
392
 
377
- declare type Props_4 = {
393
+ declare type Props_5 = {
378
394
  icon?: ReactNode;
379
395
  illustration?: ReactNode;
380
396
  text: string;
381
397
  };
382
398
 
383
- declare type Props_5 = {
399
+ declare type Props_6 = {
384
400
  additionalClassName?: string;
385
401
  handleClick?: (pageNumber: number) => void;
386
402
  page: number;
@@ -391,7 +407,7 @@ declare type Props_5 = {
391
407
  showResultCount?: boolean;
392
408
  };
393
409
 
394
- declare type Props_6 = {
410
+ declare type Props_7 = {
395
411
  options: DropdownOption[];
396
412
  value?: DropdownOption | null | undefined;
397
413
  defaultValue?: DropdownOption | undefined;
@@ -404,7 +420,7 @@ declare type Props_6 = {
404
420
  additionalClassName?: string | undefined;
405
421
  };
406
422
 
407
- declare type Props_7 = {
423
+ declare type Props_8 = {
408
424
  tooltipText?: string;
409
425
  content?: string;
410
426
  html?: string;
@@ -417,7 +433,7 @@ declare type Props_7 = {
417
433
  ariaLabel?: string;
418
434
  };
419
435
 
420
- declare type Props_8 = {
436
+ declare type Props_9 = {
421
437
  controlKey: string;
422
438
  labelText?: string;
423
439
  type?: string;
@@ -434,16 +450,6 @@ declare type Props_8 = {
434
450
  autoFocus?: boolean;
435
451
  };
436
452
 
437
- declare type Props_9 = {
438
- controlKey: string;
439
- options?: DropdownOption[];
440
- labelText?: string;
441
- inline?: boolean;
442
- required?: boolean;
443
- disabled?: boolean;
444
- exclusive?: boolean;
445
- };
446
-
447
453
  export declare type RadioOption = {
448
454
  label: string;
449
455
  value: string;
@@ -465,7 +471,7 @@ export declare const RotatePersonIcon: FC;
465
471
 
466
472
  export declare const SearchIcon: FC;
467
473
 
468
- export declare const Select: FC<Props_6>;
474
+ export declare const Select: FC<Props_7>;
469
475
 
470
476
  export declare const SendIcon: FC;
471
477
 
@@ -511,6 +517,14 @@ declare type TableProps = {
511
517
  body: ReactElement;
512
518
  isLoading?: boolean;
513
519
  hasHoverEffect?: boolean;
520
+ /**
521
+ * Ispod 1024px red se prelama u karticu — `thead` nestaje, a svaka celija dobija
522
+ * labelu svoje kolone. Labela se cita iz `data-title` atributa; tamo gde ga nema
523
+ * `Table` ga sam upisuje po poziciji celije u redu, iz `columns` odnosno
524
+ * `headerItems`. Rucno prosledjen `data-title` uvek pobedjuje, `''` gasi labelu.
525
+ * Podrazumevano iskljuceno: bez njega se tabela i dalje skroluje vodoravno.
526
+ */
527
+ responsive?: boolean;
514
528
  additionalClassName?: string;
515
529
  };
516
530
 
@@ -519,7 +533,7 @@ export declare type TableSortState = {
519
533
  direction: 'asc' | 'desc';
520
534
  } | null;
521
535
 
522
- export declare const TableZeroStateRow: ({ icon, illustration, text }: Props_4) => JSX.Element;
536
+ export declare const TableZeroStateRow: ({ icon, illustration, text }: Props_5) => JSX.Element;
523
537
 
524
538
  export declare const TiffIcon: () => JSX.Element;
525
539
 
@@ -542,7 +556,7 @@ declare type ToggleViewProps = {
542
556
  disabled?: boolean;
543
557
  };
544
558
 
545
- export declare const Tooltip: ({ tooltipText, content, html, children, place, position, delay, className, wrapperClassName, ariaLabel, }: Props_7) => JSX.Element | null;
559
+ export declare const Tooltip: ({ tooltipText, content, html, children, place, position, delay, className, wrapperClassName, ariaLabel, }: Props_8) => JSX.Element | null;
546
560
 
547
561
  declare type TooltipPlace = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
548
562