@ckbox/components 0.0.2-dev.4 → 0.0.3

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.
@@ -0,0 +1,2612 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
4
+ */
5
+ import * as React from 'react';
6
+ import React__default from 'react';
7
+ import { Placement } from '@popperjs/core';
8
+ import { TransitionProps } from 'react-transition-group/Transition';
9
+ import * as react_dnd from 'react-dnd';
10
+
11
+ declare const Bottombar: React.ForwardRefExoticComponent<Props$17 & React.RefAttributes<HTMLDivElement>>;
12
+ interface Props$17 {
13
+ /**
14
+ * Main content of the component.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Content rendered on the right side of the bar.
19
+ */
20
+ sideContent: React.ReactNode;
21
+ /**
22
+ * Content rendered as status summary in a absolute left-positioned container
23
+ */
24
+ statusContent?: React.ReactNode;
25
+ }
26
+
27
+ interface Props$16 {
28
+ /**
29
+ * Sets root class.
30
+ */
31
+ className: string;
32
+ /**
33
+ * Callback invoked upon clicking on icon.
34
+ */
35
+ onClick?: () => void;
36
+ }
37
+
38
+ declare const ArrowLeftEnd: React.FC<Props$16>;
39
+
40
+ declare const ArrowRightEnd: React.FC<Props$16>;
41
+
42
+ declare const ArrowLeft: React.FC<Props$16>;
43
+
44
+ declare const ArrowRight: React.FC<Props$16>;
45
+
46
+ declare const Cabinet: React.FC<Props$16>;
47
+
48
+ declare const Check: React.FC<Props$16>;
49
+
50
+ declare const ChevronDown: React.FC<Props$16>;
51
+
52
+ declare const ChevronLeft: React.FC<Props$16>;
53
+
54
+ declare const ChevronRight: React.FC<Props$16>;
55
+
56
+ declare const ClockTwo: React.FC<Props$16>;
57
+
58
+ declare const Close: React.FC<Props$16>;
59
+
60
+ declare const Cog: React.FC<Props$16>;
61
+
62
+ declare const Copy: React.FC<Props$16>;
63
+
64
+ declare const Docs: React.FC<Props$16>;
65
+
66
+ declare const DotsVertical: React.FC<Props$16>;
67
+
68
+ declare const Download: React.FC<Props$16>;
69
+
70
+ declare const DragHandle: React.FC<Props$16>;
71
+
72
+ declare const Folder: React.FC<Props$16>;
73
+
74
+ declare const Image: React.FC<Props$16>;
75
+
76
+ declare const Info: React.FC<Props$16>;
77
+
78
+ declare const Pencil: React.FC<Props$16>;
79
+
80
+ declare const Plus: React.FC<Props$16>;
81
+
82
+ declare const Settings: React.FC<Props$16>;
83
+
84
+ declare const Sort: React.FC<Props$16>;
85
+
86
+ declare const Trash: React.FC<Props$16>;
87
+
88
+ declare const Upload: React.FC<Props$16>;
89
+
90
+ declare const Warning: React.FC<Props$16>;
91
+
92
+ declare const WarningFill: React.FC<Props$16>;
93
+
94
+ declare const Search: React.FC<Props$16>;
95
+
96
+ declare const icons$1_ArrowLeftEnd: typeof ArrowLeftEnd;
97
+ declare const icons$1_ArrowRightEnd: typeof ArrowRightEnd;
98
+ declare const icons$1_ArrowLeft: typeof ArrowLeft;
99
+ declare const icons$1_ArrowRight: typeof ArrowRight;
100
+ declare const icons$1_Cabinet: typeof Cabinet;
101
+ declare const icons$1_Check: typeof Check;
102
+ declare const icons$1_ChevronDown: typeof ChevronDown;
103
+ declare const icons$1_ChevronLeft: typeof ChevronLeft;
104
+ declare const icons$1_ChevronRight: typeof ChevronRight;
105
+ declare const icons$1_Close: typeof Close;
106
+ declare const icons$1_Cog: typeof Cog;
107
+ declare const icons$1_Copy: typeof Copy;
108
+ declare const icons$1_Docs: typeof Docs;
109
+ declare const icons$1_DotsVertical: typeof DotsVertical;
110
+ declare const icons$1_Download: typeof Download;
111
+ declare const icons$1_DragHandle: typeof DragHandle;
112
+ declare const icons$1_Folder: typeof Folder;
113
+ declare const icons$1_Image: typeof Image;
114
+ declare const icons$1_Info: typeof Info;
115
+ declare const icons$1_Pencil: typeof Pencil;
116
+ declare const icons$1_Plus: typeof Plus;
117
+ declare const icons$1_Settings: typeof Settings;
118
+ declare const icons$1_Sort: typeof Sort;
119
+ declare const icons$1_Trash: typeof Trash;
120
+ declare const icons$1_Upload: typeof Upload;
121
+ declare const icons$1_Warning: typeof Warning;
122
+ declare const icons$1_WarningFill: typeof WarningFill;
123
+ declare const icons$1_Search: typeof Search;
124
+ declare namespace icons$1 {
125
+ export {
126
+ icons$1_ArrowLeftEnd as ArrowLeftEnd,
127
+ icons$1_ArrowRightEnd as ArrowRightEnd,
128
+ icons$1_ArrowLeft as ArrowLeft,
129
+ icons$1_ArrowRight as ArrowRight,
130
+ icons$1_Cabinet as Cabinet,
131
+ icons$1_Check as Check,
132
+ icons$1_ChevronDown as ChevronDown,
133
+ icons$1_ChevronLeft as ChevronLeft,
134
+ icons$1_ChevronRight as ChevronRight,
135
+ ClockTwo as Clock,
136
+ icons$1_Close as Close,
137
+ icons$1_Cog as Cog,
138
+ icons$1_Copy as Copy,
139
+ icons$1_Docs as Docs,
140
+ icons$1_DotsVertical as DotsVertical,
141
+ icons$1_Download as Download,
142
+ icons$1_DragHandle as DragHandle,
143
+ icons$1_Folder as Folder,
144
+ icons$1_Image as Image,
145
+ icons$1_Info as Info,
146
+ icons$1_Pencil as Pencil,
147
+ icons$1_Plus as Plus,
148
+ icons$1_Settings as Settings,
149
+ icons$1_Sort as Sort,
150
+ icons$1_Trash as Trash,
151
+ icons$1_Upload as Upload,
152
+ icons$1_Warning as Warning,
153
+ icons$1_WarningFill as WarningFill,
154
+ icons$1_Search as Search,
155
+ };
156
+ }
157
+
158
+ declare type IconRenderer = (props: {
159
+ className?: string;
160
+ }) => JSX.Element;
161
+ declare type IconRenderProp = string | IconRenderer;
162
+ declare type IconName = keyof typeof icons$1;
163
+ declare type IconSize = 'small' | 'base' | 'medium' | 'big' | 'bigger' | 'humongous';
164
+ declare type IconColor = 'accent' | 'disabled' | 'danger' | 'warning';
165
+
166
+ declare const Icon: React.FC<Props$15>;
167
+ interface Props$15 {
168
+ /**
169
+ * Sets root class.
170
+ */
171
+ className?: string;
172
+ /**
173
+ * Icon color.
174
+ */
175
+ color?: IconColor;
176
+ /**
177
+ * Name of selected icon.
178
+ */
179
+ name?: IconName;
180
+ /**
181
+ * Renders custom icon.
182
+ *
183
+ * Pass either a React component or raw markup as string.
184
+ * Passed string must be sanitized beforehand so that it's safe to use.
185
+ */
186
+ render?: IconRenderProp;
187
+ /**
188
+ * Icon size.
189
+ */
190
+ size?: IconSize;
191
+ }
192
+
193
+ declare const Button: React.ForwardRefExoticComponent<Props$14 & React.RefAttributes<HTMLButtonElement>>;
194
+ interface Props$14 {
195
+ /**
196
+ * Sets root class.
197
+ */
198
+ className?: string;
199
+ /**
200
+ * Sets color type. Use in combination with `type` to achieve desired styling.
201
+ */
202
+ color?: 'action' | 'danger' | 'neutral';
203
+ /**
204
+ * Main content of the component.
205
+ */
206
+ children?: React.ReactNode;
207
+ /**
208
+ * Displays as disabled.
209
+ */
210
+ disabled?: boolean;
211
+ /**
212
+ * Id of a form element this button is associated with.
213
+ */
214
+ form?: string;
215
+ /**
216
+ * Sets full-width mode.
217
+ */
218
+ fullWidth?: boolean;
219
+ /**
220
+ * Button's html type.
221
+ */
222
+ htmlType?: 'button' | 'reset' | 'submit';
223
+ /**
224
+ * Button's aria label.
225
+ */
226
+ label?: string;
227
+ /**
228
+ * Sets left-side icon.
229
+ */
230
+ icon?: IconName;
231
+ /**
232
+ * Icon placement.
233
+ */
234
+ iconPlacement?: 'left' | 'right';
235
+ /**
236
+ * Sets `click` event handler.
237
+ */
238
+ onClick?: React.MouseEventHandler;
239
+ /**
240
+ * Sets `mouseleave` event handler.
241
+ */
242
+ onMouseLeave?: React.MouseEventHandler;
243
+ /**
244
+ * Sets styling type. Use in combination with `color` to achieve desired styling.
245
+ */
246
+ type?: 'fill' | 'outline' | 'plain';
247
+ /**
248
+ * Sets sizing of the button.
249
+ */
250
+ sizing?: 'small';
251
+ }
252
+
253
+ declare const CircularLoader: React.FC<Props$13>;
254
+ interface Props$13 {
255
+ /**
256
+ * Component's label.
257
+ */
258
+ label?: string;
259
+ /**
260
+ * Current value in %.
261
+ */
262
+ value: number;
263
+ /**
264
+ * Displays error icon.
265
+ */
266
+ error?: boolean;
267
+ /**
268
+ * Callback invoked upon click event.
269
+ */
270
+ onClick?: () => void;
271
+ }
272
+
273
+ declare const DialogActions: React.FC<Props$12>;
274
+ interface Props$12 {
275
+ /**
276
+ * Main content of the component.
277
+ */
278
+ children: React.ReactNode;
279
+ }
280
+
281
+ declare const DialogColumn: React.ForwardRefExoticComponent<Props$11 & React.RefAttributes<HTMLDivElement>>;
282
+ interface Props$11 extends React.HTMLAttributes<HTMLDivElement> {
283
+ /**
284
+ * Main content of the component.
285
+ */
286
+ children: React.ReactNode;
287
+ /**
288
+ * Allows its content to overflow.
289
+ */
290
+ overflow?: boolean;
291
+ }
292
+
293
+ declare const DialogFooter: React.FC<Props$10>;
294
+ interface Props$10 {
295
+ /**
296
+ * Main content of the component.
297
+ */
298
+ children: React.ReactNode;
299
+ /**
300
+ * Content placed on a right-side of the footer.
301
+ */
302
+ sideContent?: {
303
+ label: React.ReactNode;
304
+ error?: boolean;
305
+ warning?: boolean;
306
+ onClick?: () => void;
307
+ }[];
308
+ }
309
+
310
+ declare const DialogHeader: React.FC<Props$$>;
311
+ interface Props$$ {
312
+ /**
313
+ * Sets focus on close button on mount.
314
+ */
315
+ autofocus?: boolean;
316
+ /**
317
+ * Close button's label.
318
+ */
319
+ closeLabel?: string;
320
+ /**
321
+ * Indicates that progress is ongoing.
322
+ */
323
+ inProgress?: boolean;
324
+ /**
325
+ * Turns on progress in header.
326
+ */
327
+ progress?: boolean;
328
+ /**
329
+ * Progress value. Works only if `progress` is enabled.
330
+ */
331
+ progressValue?: number;
332
+ /**
333
+ * Secondary title.
334
+ */
335
+ subTitle?: React.ReactNode;
336
+ /**
337
+ * Dialog title.
338
+ */
339
+ title?: string;
340
+ /**
341
+ * Dialog title size.
342
+ */
343
+ titleSize?: 'sm' | 'md';
344
+ /**
345
+ * Dialog header type.
346
+ */
347
+ type?: 'success' | 'error' | 'info';
348
+ }
349
+
350
+ declare const DialogRow: React.FC<Props$_>;
351
+ interface Props$_ extends React.HTMLAttributes<HTMLDivElement> {
352
+ /**
353
+ * Main content of the component.
354
+ */
355
+ children: React.ReactNode;
356
+ }
357
+
358
+ declare const DialogSection: React.FC<Props$Z>;
359
+ interface Props$Z {
360
+ /**
361
+ * Main content of the component.
362
+ */
363
+ children: React.ReactNode;
364
+ /**
365
+ * Removes top spacing.
366
+ */
367
+ collapse?: boolean;
368
+ /**
369
+ * Makes component full height of its container.
370
+ */
371
+ fullHeight?: boolean;
372
+ /**
373
+ * Turns on accent background color.
374
+ */
375
+ accent?: boolean;
376
+ /**
377
+ * Toggles content spacing.
378
+ */
379
+ spacing?: boolean;
380
+ /**
381
+ * Accepts ref.
382
+ */
383
+ ref?: React.Ref<HTMLDivElement>;
384
+ /**
385
+ * Shows content as an error.
386
+ */
387
+ error?: boolean;
388
+ /**
389
+ * Shows content as a header.
390
+ */
391
+ header?: boolean;
392
+ }
393
+
394
+ declare const Dialog: React.FC<Props$Y>;
395
+ interface Props$Y {
396
+ /**
397
+ * Main content of the component.
398
+ */
399
+ children: React.ReactNode;
400
+ /**
401
+ * Sets dialog as draggable.
402
+ */
403
+ draggable?: boolean;
404
+ /**
405
+ * Callback invoked when dialog is closed.
406
+ */
407
+ onClose?: () => void;
408
+ /**
409
+ * Callback invoked on dragging the dialog (if it's `draggable`).
410
+ * Consider throttling the callback invocation.
411
+ */
412
+ onDrag?: () => void;
413
+ /**
414
+ * Sets dialog size.
415
+ */
416
+ size?: 'sm' | 'md' | 'lg';
417
+ /**
418
+ * Sets dialog height.
419
+ */
420
+ height?: 'md';
421
+ /**
422
+ * Enables dialog `modal` mode.
423
+ */
424
+ modal?: boolean;
425
+ }
426
+
427
+ interface Props$X {
428
+ /**
429
+ * Sets root class.
430
+ */
431
+ className: string;
432
+ }
433
+
434
+ declare const Zip: React.FC<Props$X>;
435
+
436
+ declare const Empty: React.FC<Props$X>;
437
+
438
+ declare const Excel: React.FC<Props$X>;
439
+
440
+ declare const Img: React.FC<Props$X>;
441
+
442
+ declare const Movie: React.FC<Props$X>;
443
+
444
+ declare const Music: React.FC<Props$X>;
445
+
446
+ declare const Pdf: React.FC<Props$X>;
447
+
448
+ declare const Ppt: React.FC<Props$X>;
449
+
450
+ declare const Txt: React.FC<Props$X>;
451
+
452
+ declare const Word: React.FC<Props$X>;
453
+
454
+ declare const icons_Empty: typeof Empty;
455
+ declare const icons_Excel: typeof Excel;
456
+ declare const icons_Img: typeof Img;
457
+ declare const icons_Movie: typeof Movie;
458
+ declare const icons_Music: typeof Music;
459
+ declare const icons_Pdf: typeof Pdf;
460
+ declare const icons_Ppt: typeof Ppt;
461
+ declare const icons_Txt: typeof Txt;
462
+ declare const icons_Word: typeof Word;
463
+ declare namespace icons {
464
+ export {
465
+ Zip as Archive,
466
+ icons_Empty as Empty,
467
+ icons_Excel as Excel,
468
+ icons_Img as Img,
469
+ icons_Movie as Movie,
470
+ icons_Music as Music,
471
+ icons_Pdf as Pdf,
472
+ icons_Ppt as Ppt,
473
+ icons_Txt as Txt,
474
+ icons_Word as Word,
475
+ };
476
+ }
477
+
478
+ declare const DocIcon: React.FC<Props$W>;
479
+ declare type DocIconName = keyof typeof icons;
480
+ interface Props$W {
481
+ /**
482
+ * Name of selected icon.
483
+ */
484
+ name: DocIconName;
485
+ }
486
+
487
+ declare const GalleryFigure: React.FC<Props$V>;
488
+ interface Props$V {
489
+ /**
490
+ * Main content of the component.
491
+ */
492
+ children?: React.ReactNode;
493
+ /**
494
+ * Figure caption.
495
+ */
496
+ caption: string;
497
+ }
498
+
499
+ declare const GalleryItem: React.ForwardRefExoticComponent<Props$U & React.RefAttributes<HTMLDivElement>>;
500
+ interface Props$U {
501
+ /**
502
+ * Sets item as active.
503
+ */
504
+ active?: boolean;
505
+ /**
506
+ * Toggles loading.
507
+ */
508
+ loading?: boolean;
509
+ /**
510
+ * Main content of the component.
511
+ */
512
+ children?: React.ReactNode;
513
+ /**
514
+ * Item name.
515
+ */
516
+ name: string;
517
+ /**
518
+ * Sets `mousedown` event handler.
519
+ */
520
+ onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
521
+ /**
522
+ * Sets `keydown` event handler.
523
+ */
524
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
525
+ }
526
+
527
+ declare const Gallery: React.FC<Props$T>;
528
+ interface Props$T {
529
+ /**
530
+ * Main content of the component.
531
+ */
532
+ children: React.ReactNode;
533
+ /**
534
+ * Represents zoom value. Pass value in range 0 .. 1.
535
+ */
536
+ zoom?: number;
537
+ /**
538
+ * Controls element facusability.
539
+ */
540
+ tabIndex?: number;
541
+ }
542
+
543
+ /**
544
+ * Polymorphism for `ref` is tricky. Let's type it as `any` for now.
545
+ */
546
+
547
+ declare const Input: React.ForwardRefExoticComponent<Pick<Props$S, "max" | "type" | "error" | "id" | "name" | "value" | "label" | "className" | "disabled" | "size" | "min" | "placeholder" | "readOnly" | "onFocus" | "onBlur" | "onChange" | "onClick" | "variant" | "multiline"> & React.RefAttributes<any>>;
548
+ interface Props$S {
549
+ /**
550
+ * Input's class name.
551
+ */
552
+ className?: string;
553
+ /**
554
+ * Marks input as disabled.
555
+ */
556
+ disabled?: boolean;
557
+ /**
558
+ * Marks input as read-only.
559
+ */
560
+ readOnly?: boolean;
561
+ /**
562
+ * Unique input's id.
563
+ */
564
+ id: string;
565
+ /**
566
+ * Uses `textarea` instead of `input`.
567
+ */
568
+ multiline?: boolean;
569
+ /**
570
+ * Input's name to register.
571
+ */
572
+ name?: string;
573
+ /**
574
+ * Callback invoked when the blur event is fired.
575
+ */
576
+ onBlur?: (evt: React.ChangeEvent<any>) => void;
577
+ /**
578
+ * Callback invoked when the value is changed.
579
+ */
580
+ onChange?: (evt: React.ChangeEvent<any>) => void;
581
+ /**
582
+ * Callback invoked when the element receives focus.
583
+ */
584
+ onFocus?: (evt: React.ChangeEvent<any>) => void;
585
+ /**
586
+ * Callback invoked when the element is clicked.
587
+ */
588
+ onClick?: (evt: React.ChangeEvent<any>) => void;
589
+ /**
590
+ * Input's type.
591
+ */
592
+ type?: 'text' | 'number' | 'url' | 'email';
593
+ /**
594
+ * Input's placeholder text value.
595
+ */
596
+ placeholder?: string;
597
+ /**
598
+ * Input's value.
599
+ */
600
+ value?: string;
601
+ /**
602
+ * Input's ref object.
603
+ */
604
+ ref?: React.Ref<any>;
605
+ /**
606
+ * Sizing variant.
607
+ */
608
+ size?: 'base' | 'md';
609
+ /**
610
+ * Indicate error in input element.
611
+ */
612
+ error?: boolean;
613
+ /**
614
+ * Number input's min value.
615
+ */
616
+ min?: string | number;
617
+ /**
618
+ * Number input's max value.
619
+ */
620
+ max?: string | number;
621
+ /**
622
+ * Input's label.
623
+ */
624
+ label?: string;
625
+ /**
626
+ * Styling variant.
627
+ */
628
+ variant?: 'default' | 'underline';
629
+ }
630
+
631
+ declare const MenuItem: React.FC<Props$R>;
632
+ interface Props$R {
633
+ /**
634
+ * Associated icon.
635
+ */
636
+ icon?: IconName;
637
+ /**
638
+ * Icon size.
639
+ */
640
+ iconSize?: IconSize;
641
+ /**
642
+ * Action label.
643
+ */
644
+ label: string;
645
+ /**
646
+ * Action invoked upon click.
647
+ */
648
+ onClick?: () => void;
649
+ /**
650
+ * Displays as disabled.
651
+ */
652
+ disabled?: boolean;
653
+ }
654
+
655
+ declare const MenuSubSection: React.FC<Props$Q>;
656
+ interface Props$Q {
657
+ /**
658
+ * Main content of the component.
659
+ */
660
+ children: React.ReactNode;
661
+ /**
662
+ * Indicates how content and title should be aligned.
663
+ */
664
+ align?: 'column' | 'row';
665
+ /**
666
+ * Indicates how children should be aligned.
667
+ */
668
+ alignChildren?: 'column' | 'row';
669
+ /**
670
+ * Display title as label.
671
+ */
672
+ label?: boolean;
673
+ /**
674
+ * Sets `for` attribute if title is displayed as label.
675
+ */
676
+ labelFor?: string;
677
+ /**
678
+ * Title of the subsection.
679
+ */
680
+ title: string;
681
+ }
682
+
683
+ declare const MenuSection: React.FC<Props$P>;
684
+ interface Props$P {
685
+ /**
686
+ * Main content of the component.
687
+ */
688
+ children: React.ReactNode;
689
+ /**
690
+ * Adds bottom border.
691
+ */
692
+ borderBottom?: boolean;
693
+ /**
694
+ * Title of the section.
695
+ */
696
+ title: string;
697
+ }
698
+
699
+ declare type PopperPlacement = Placement;
700
+ declare type PopperAnchorRef = HTMLElement | null | undefined;
701
+ declare type PopperOffsetValue = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
702
+ declare type PopperOffset = [PopperOffsetValue, PopperOffsetValue];
703
+
704
+ declare const PopperArrow: React__default.FC<Props$O>;
705
+ interface Props$O {
706
+ /**
707
+ * Sets arrow size.
708
+ */
709
+ size?: 'sm' | 'md';
710
+ }
711
+
712
+ declare const Popper: React__default.ForwardRefExoticComponent<Props$N & React__default.RefAttributes<HTMLDivElement>>;
713
+ interface Props$N {
714
+ /**
715
+ * Anchor element. Popper will be mounted to this element.
716
+ */
717
+ anchorEl?: HTMLElement | null;
718
+ /**
719
+ * Popper content.
720
+ */
721
+ children: React__default.ReactNode;
722
+ /**
723
+ * Class name that will be applied to popper content-wrapper.
724
+ */
725
+ className?: string;
726
+ /**
727
+ * Disables popper auto-flip.
728
+ */
729
+ disableFlip?: boolean;
730
+ /**
731
+ * Popper placement.
732
+ */
733
+ placement?: PopperPlacement;
734
+ /**
735
+ * Displacement from its reference element.
736
+ */
737
+ offset?: PopperOffset;
738
+ /**
739
+ * Aria role.
740
+ */
741
+ role?: React__default.AriaRole;
742
+ /**
743
+ * Makes popper same width as its anchor.
744
+ */
745
+ sameWidth?: boolean;
746
+ }
747
+
748
+ declare const Menu: React.FC<Props$M>;
749
+ interface Props$M {
750
+ /**
751
+ * Anchor element.
752
+ */
753
+ anchorEl?: HTMLElement | null;
754
+ /**
755
+ * Shows an arrow pointing to the anchor element.
756
+ */
757
+ arrow?: boolean;
758
+ /**
759
+ * Main content of the component.
760
+ */
761
+ children: React.ReactNode;
762
+ /**
763
+ * Offsets popper element.
764
+ */
765
+ offset?: PopperOffset;
766
+ /**
767
+ * Callback invoked when component is about to close.
768
+ */
769
+ onClose?: () => void;
770
+ /**
771
+ * Menu popper's placement.
772
+ */
773
+ placement?: PopperPlacement;
774
+ /**
775
+ * Makes menu same width as its anchor.
776
+ */
777
+ sameWidth?: boolean;
778
+ /**
779
+ * Toggles vertical spacing around content.
780
+ */
781
+ spacing?: boolean;
782
+ }
783
+
784
+ declare const NavbarItem: React.FC<Props$L>;
785
+ interface Props$L {
786
+ /**
787
+ * Applies active styling.
788
+ */
789
+ active?: boolean;
790
+ /**
791
+ * Toggles icon animation.
792
+ */
793
+ animateIcon?: boolean;
794
+ /**
795
+ * Marks item as disabled.
796
+ */
797
+ disabled?: boolean;
798
+ /**
799
+ * Separator for the special element.
800
+ */
801
+ separated?: boolean;
802
+ /**
803
+ * Fixing the element to bottom of the navbar.
804
+ */
805
+ bottomFixed?: boolean;
806
+ /**
807
+ * Displayed icon.
808
+ */
809
+ icon?: IconName;
810
+ /**
811
+ * Renders custom icon.
812
+ *
813
+ * Pass either a React component or raw markup as string.
814
+ * Passed string must be sanitized beforehand so that it's safe to use.
815
+ */
816
+ iconRender?: IconRenderProp;
817
+ /**
818
+ * Displayed label.
819
+ */
820
+ label: string;
821
+ /**
822
+ * Toggles loader.
823
+ */
824
+ loading?: boolean;
825
+ /**
826
+ * Optional click handler.
827
+ */
828
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
829
+ }
830
+
831
+ declare const Navbar: React.FC<Props$K>;
832
+ interface Props$K {
833
+ /**
834
+ * Labels navigation element.
835
+ */
836
+ ariaLabel?: string;
837
+ /**
838
+ * Main content of the component.
839
+ */
840
+ children: React.ReactNode;
841
+ }
842
+
843
+ declare const Overlay: React.FC<Props$J>;
844
+ interface Props$J {
845
+ /**
846
+ * Optional children.
847
+ */
848
+ children?: React.ReactNode;
849
+ /**
850
+ * Callback invoked upon clicking on the overlay.
851
+ */
852
+ onClick?: React.MouseEventHandler;
853
+ /**
854
+ * Color variant.
855
+ */
856
+ variant?: 'transparent' | 'dark';
857
+ }
858
+
859
+ declare const PanelList: React.FC<Props$I>;
860
+ interface Props$I {
861
+ /**
862
+ * Main content.
863
+ */
864
+ children: React.ReactNode;
865
+ /**
866
+ * Optional toolbar rendered on top of the list.
867
+ */
868
+ toolbar?: React.ReactNode;
869
+ /**
870
+ * Toggles loading effect for the toolbar.
871
+ */
872
+ toolbarLoading?: boolean;
873
+ }
874
+
875
+ declare const PanelActions: React.FC<Props$H>;
876
+ interface Props$H {
877
+ /**
878
+ * Main content of the component.
879
+ */
880
+ children?: React.ReactNode;
881
+ }
882
+
883
+ declare const PanelContent: React.ForwardRefExoticComponent<Props$G & React.RefAttributes<HTMLDivElement>>;
884
+ interface Props$G {
885
+ /**
886
+ * Main content of the component.
887
+ */
888
+ children?: React.ReactNode;
889
+ /**
890
+ * Optional panel content's class name in non-edit mode.
891
+ */
892
+ className?: string;
893
+ /**
894
+ * Optional panel content's class name in edit mode.
895
+ */
896
+ editClassName?: string;
897
+ /**
898
+ * Component shown in edit mode. By default, regular input field is shown in edit mode.
899
+ */
900
+ editComponent?: React.ReactNode;
901
+ /**
902
+ * Optional header in edit mode.
903
+ */
904
+ editHeader?: string;
905
+ /**
906
+ * Optional header in non-edit mode.
907
+ */
908
+ header?: string;
909
+ }
910
+
911
+ declare const PanelContentProp: React.FC<Props$F>;
912
+ interface Props$F {
913
+ /**
914
+ * Property label.
915
+ */
916
+ label: string;
917
+ /**
918
+ * Property value.
919
+ */
920
+ value: string;
921
+ }
922
+
923
+ declare const PanelDragHandle: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
924
+
925
+ declare const PanelSkeleton: React.FC<Props$E>;
926
+ interface Props$E {
927
+ /**
928
+ * Number of loading blocks.
929
+ */
930
+ blocks?: number;
931
+ /**
932
+ * Relative size of a loading block.
933
+ */
934
+ size?: 'sm' | 'md' | 'lg';
935
+ }
936
+
937
+ declare const PanelTitle: React.ForwardRefExoticComponent<Props$D & React.RefAttributes<HTMLDivElement>>;
938
+ interface Props$D extends Omit<Props$G, 'children'> {
939
+ /**
940
+ * Panel's title.
941
+ */
942
+ title: string;
943
+ /**
944
+ * Panel's description.
945
+ */
946
+ description?: string;
947
+ /**
948
+ * Tooltip for panel's description.
949
+ */
950
+ descriptionTooltip?: string;
951
+ }
952
+
953
+ interface ListDndItem {
954
+ /**
955
+ * Unique id of a dnd item.
956
+ */
957
+ id: string;
958
+ /**
959
+ * Indicates if an item can be dragged.
960
+ */
961
+ isDraggable?: boolean;
962
+ }
963
+ interface ListDndItemHookProps extends ListDndItem {
964
+ /**
965
+ * Drag handle element.
966
+ */
967
+ dragHandle?: HTMLElement | null;
968
+ /**
969
+ * Current index of a drag item.
970
+ */
971
+ index: number;
972
+ /**
973
+ * Item root element.
974
+ */
975
+ itemRoot?: HTMLElement | null;
976
+ }
977
+ declare type ListDndMoveItem = (dragIndex: number, hoverIndex: number) => void;
978
+ declare type ListDndSetDraggable = (id: string) => ListDndSetDraggablePartial;
979
+ declare type ListDndSetDraggablePartial = (isDraggable: boolean) => void;
980
+ declare type ListDndOnDragEnd = () => void;
981
+ /**
982
+ * List of props that a child of `SortableListItem` receives.
983
+ * This type is intended to be used by components that want to be aware that they are dragged.
984
+ */
985
+ interface ListDndChildProps {
986
+ /**
987
+ * Indicates if an item is in preview mode.
988
+ */
989
+ isPreview?: boolean;
990
+ /**
991
+ * Indicates if an item is being dragged.
992
+ */
993
+ isDragging?: boolean;
994
+ /**
995
+ * Indicates if an item is draggable.
996
+ */
997
+ isDraggable?: boolean;
998
+ /**
999
+ * Drag handle setter. Use it to separate drag handle from a preview.
1000
+ */
1001
+ setDragHandle?: (el: HTMLElement | null) => void;
1002
+ /**
1003
+ * Sets root item.
1004
+ *
1005
+ * In some scenarios, drag handle might be located inside an item.
1006
+ * In such cases, item root.
1007
+ */
1008
+ setItemRoot?: (el: HTMLElement | null) => void;
1009
+ /**
1010
+ * Marks item as draggable / non-draggable.
1011
+ */
1012
+ setDraggable?: ListDndSetDraggablePartial;
1013
+ }
1014
+
1015
+ /**
1016
+ * Top-level hook that manages list state.
1017
+ *
1018
+ * @param initItems initial list items
1019
+ * @returns list info
1020
+ */
1021
+ declare const useListDnd: (initItems: ListDndItem[]) => {
1022
+ items: ListDndItem[];
1023
+ moveItem: ListDndMoveItem;
1024
+ setItems: React.Dispatch<React.SetStateAction<ListDndItem[]>>;
1025
+ setDraggable: ListDndSetDraggable;
1026
+ };
1027
+
1028
+ declare const SortableDndListItem: React.FC<Props$C>;
1029
+ interface Props$C {
1030
+ /**
1031
+ * Current item's index in a list.
1032
+ */
1033
+ index: number;
1034
+ /**
1035
+ * Item's id.
1036
+ */
1037
+ id: string;
1038
+ /**
1039
+ * Indicates if item is draggable.
1040
+ */
1041
+ isDraggable?: boolean;
1042
+ /**
1043
+ * Indicates if item is currently in preview mode.
1044
+ */
1045
+ isPreview?: boolean;
1046
+ /**
1047
+ * Accepts a single child.
1048
+ */
1049
+ children: React.ReactChild;
1050
+ }
1051
+
1052
+ interface SortableDndListContextShape {
1053
+ /**
1054
+ * Callback that performs list reordering.
1055
+ */
1056
+ moveItem: ListDndMoveItem;
1057
+ /**
1058
+ * Marks item as draggable / non-draggable.
1059
+ */
1060
+ setDraggable: ListDndSetDraggable;
1061
+ /**
1062
+ * Item type. Same value must be provided for all list items.
1063
+ */
1064
+ type: string;
1065
+ /**
1066
+ * Optional callback invoked when drag is over.
1067
+ */
1068
+ onDragEnd?: ListDndOnDragEnd;
1069
+ }
1070
+
1071
+ declare const SortableDndList: React.FC<Props$B>;
1072
+ interface Props$B extends SortableDndListContextShape {
1073
+ /**
1074
+ * Main content of the component.
1075
+ */
1076
+ children: React.ReactNode;
1077
+ /**
1078
+ * Container element to scroll while dragging.
1079
+ */
1080
+ scrollableContainer?: HTMLElement | null;
1081
+ }
1082
+
1083
+ interface PanelContextShape extends Partial<ListDndChildProps> {
1084
+ /**
1085
+ * Toggles `edit` mode.
1086
+ */
1087
+ edit?: boolean;
1088
+ }
1089
+
1090
+ /**
1091
+ * Polymorphism for `ref` is tricky. Let's type it as `any` for now.
1092
+ */
1093
+ declare const Panel: React.ForwardRefExoticComponent<Props$A & React.RefAttributes<any>>;
1094
+ interface Props$A extends PanelContextShape {
1095
+ /**
1096
+ * Adds border to the bottom of the panel.
1097
+ */
1098
+ border?: boolean;
1099
+ /**
1100
+ * Main content of the component.
1101
+ */
1102
+ children: React.ReactNode;
1103
+ /**
1104
+ * Icon to display.
1105
+ */
1106
+ icon?: IconName;
1107
+ /**
1108
+ * Renders custom icon.
1109
+ *
1110
+ * Pass either a React component or raw markup as string.
1111
+ * Passed string must be sanitized beforehand so that it's safe to use.
1112
+ */
1113
+ iconRender?: IconRenderProp;
1114
+ /**
1115
+ * Callback invoked when panel changes are submitted. Use with `edit`.
1116
+ */
1117
+ onSubmit?: React.FormEventHandler<HTMLFormElement>;
1118
+ /**
1119
+ * Toggles component opacity.
1120
+ */
1121
+ opaque?: boolean;
1122
+ /**
1123
+ * Toggles component's `elevated` mode.
1124
+ */
1125
+ elevated?: boolean;
1126
+ }
1127
+
1128
+ declare type PaginationClickCallback = () => void;
1129
+ declare type PaginationChangeCallback = (page: number) => void;
1130
+ declare type PageChangeCallback = (page: number) => void;
1131
+ interface PaginationState {
1132
+ /**
1133
+ * Indicates if current `page` is the first one.
1134
+ */
1135
+ isFirstPage: boolean;
1136
+ /**
1137
+ * Indicates if current `page` is the last one.
1138
+ */
1139
+ isLastPage: boolean;
1140
+ /**
1141
+ * Callback invoked upon selecting the first page.
1142
+ */
1143
+ onFirstPageClick: PaginationClickCallback;
1144
+ /**
1145
+ * Callback invoked upon selecting the last page.
1146
+ */
1147
+ onLastPageClick: PaginationClickCallback;
1148
+ /**
1149
+ * Callback invoked upon selecting the next page.
1150
+ */
1151
+ onNextPageClick: PaginationClickCallback;
1152
+ /**
1153
+ * Callback invoked upon changing page to a provided page number.
1154
+ */
1155
+ onPageChange: PaginationChangeCallback;
1156
+ /**
1157
+ * Callback invoked upon selecting the previous page.
1158
+ */
1159
+ onPrevPageClick: PaginationClickCallback;
1160
+ }
1161
+ /**
1162
+ * Manages state of pagination using passed current page number and a callback to change it.
1163
+ * Minimum page number value is 1.
1164
+ *
1165
+ * @param page current page number
1166
+ * @param setPage callback executed to set the current page number
1167
+ * @param totalPagesCount total number of pages
1168
+ * @returns state of pagination
1169
+ */
1170
+ declare const usePagination: (page: number, setPage: PageChangeCallback, totalPagesCount: number) => PaginationState;
1171
+
1172
+ declare const Pagination: React.FC<Props$z>;
1173
+ interface Props$z extends PaginationState {
1174
+ /**
1175
+ * Disables interaction with pagination.
1176
+ */
1177
+ disabled?: boolean;
1178
+ /**
1179
+ * Aria label for input element.
1180
+ */
1181
+ enterPageLabel: string;
1182
+ /**
1183
+ * Total number of pages.
1184
+ */
1185
+ totalPages: number;
1186
+ /**
1187
+ * Label indicating total number of pages.
1188
+ */
1189
+ totalPagesLabel: string;
1190
+ /**
1191
+ * Currently selected page.
1192
+ */
1193
+ page: number;
1194
+ }
1195
+
1196
+ declare const ProgressPanel: React.ForwardRefExoticComponent<Props$y & React.RefAttributes<HTMLDivElement>>;
1197
+ interface Props$y {
1198
+ /**
1199
+ * Additional info rendered close to a title.
1200
+ */
1201
+ additionalInfo?: React.ReactNode;
1202
+ /**
1203
+ * Applies error styling.
1204
+ */
1205
+ error?: boolean;
1206
+ /**
1207
+ * Applies warning styling.
1208
+ */
1209
+ warning?: boolean;
1210
+ /**
1211
+ * Applies full progress styling.
1212
+ */
1213
+ completed?: boolean;
1214
+ /**
1215
+ * Help text displayed below the bar.
1216
+ */
1217
+ helpText?: React.ReactNode;
1218
+ /**
1219
+ * Unique identifier of a panel.
1220
+ */
1221
+ id: string;
1222
+ /**
1223
+ * Panel title.
1224
+ */
1225
+ title: string;
1226
+ /**
1227
+ * Current progress value in %.
1228
+ */
1229
+ value: number;
1230
+ }
1231
+
1232
+ declare const PropertiesTableRow: React.FC<Props$x>;
1233
+ interface Props$x {
1234
+ /**
1235
+ * Item's label.
1236
+ */
1237
+ label: string;
1238
+ /**
1239
+ * Item's value.
1240
+ */
1241
+ value: React.ReactNode;
1242
+ }
1243
+
1244
+ declare const PropertiesTable: React.FC<Props$w>;
1245
+ interface Props$w {
1246
+ /**
1247
+ * Main content of the component.
1248
+ */
1249
+ children: React.ReactNode;
1250
+ /**
1251
+ * Adds aria-role for `label` column
1252
+ */
1253
+ labelColAriaLabel?: string;
1254
+ /**
1255
+ * Adds aria-role for `value` column
1256
+ */
1257
+ valueColAriaLabel?: string;
1258
+ }
1259
+
1260
+ /**
1261
+ * The `ResponsiveImage` component is responsible for displaying images in a responsive manner.
1262
+ *
1263
+ * Noteworthy, it is impossible to use a purely native approach based on `img`'s attributes such as `srcset` and `sizes`,
1264
+ * since those require media queries to be defined upfront. It is not guaranteed that `ResponsiveImage` component will be used in a manner
1265
+ * that allows for media queries to be defined at all. Most likely, the component will be used in a fluid environment
1266
+ * in which size of the image's container changes frequently.
1267
+ *
1268
+ * Therefore, a hybrid approach is used. Native `srcset` and `sizes` attributes are used in combination with a mechanism that
1269
+ * updates `sizes` attribute under the hood based on current size of the image's container and a list of available breakpoints.
1270
+ * As soon as a fitting breakpoint value is found, it gets assigned to `sizes` attribute. From that moment onwards,
1271
+ * the browser takes over and its native features are used to ensure responsiveness and related features:
1272
+ *
1273
+ * 1. Art direction is possible to achieve via `srcSet` prop. Therefore, different images can be displayed based on current display size.
1274
+ *
1275
+ * 2. Various image formats can be passed within `srcSet`. The browser will choose the first one supported.
1276
+ * For instance, `webp` sources can be supplied via `srcSet.optional` prop and browsers supporting `webp` format will default to that.
1277
+ *
1278
+ * 3. The `sizes` attribute is leveraged to force the browser to choose the most suitable source.
1279
+ * The `sizes` attribtue is set internally by the component in the form of `${ breakpoint }px` value.
1280
+ *
1281
+ * The images are loaded lazily. A visibility check is used to ensure that only images visible within a given container will be loaded.
1282
+ * As a loader, a blurred version of the image can be shown if `blurHash` value is passed.
1283
+ */
1284
+
1285
+ declare const ResponsiveImage: React.FC<Props$v>;
1286
+ interface Props$v {
1287
+ /**
1288
+ * Image's description.
1289
+ *
1290
+ * Used for accessibilty purposes and in case of image loading errors.
1291
+ */
1292
+ alt: string;
1293
+ /**
1294
+ * Original image's blurhash. Blurhash will be decoded under the hood into base64.
1295
+ *
1296
+ * It will be displayed as long as image is being loaded.
1297
+ */
1298
+ blurHash?: string;
1299
+ /**
1300
+ * List of available image widths.
1301
+ */
1302
+ breakpoints: number[];
1303
+ /**
1304
+ * Reference to a scrollable container that contains the image.
1305
+ *
1306
+ * It is used to detect image's visibility.
1307
+ */
1308
+ container?: HTMLDivElement | null;
1309
+ /**
1310
+ * Maps breakpoint value to a flag indicating if it is possible to display thumbnail as a cover for that breakpoint.
1311
+ */
1312
+ cover?: Record<number, boolean>;
1313
+ /**
1314
+ * Original image's height.
1315
+ */
1316
+ height?: number;
1317
+ /**
1318
+ * Available sources for the image.
1319
+ */
1320
+ srcSet: {
1321
+ /**
1322
+ * Optional source.
1323
+ */
1324
+ optional?: string[];
1325
+ /**
1326
+ * Required default source.
1327
+ */
1328
+ default: string[];
1329
+ };
1330
+ /**
1331
+ * Optional sources' mime type.
1332
+ */
1333
+ optionalSrcMimeType?: string;
1334
+ /**
1335
+ * Original image's width.
1336
+ */
1337
+ width?: number;
1338
+ /**
1339
+ * Callback invoked when a resource failed to load, or can't be used.
1340
+ */
1341
+ onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
1342
+ }
1343
+
1344
+ declare const Skeleton: React.FC<Props$u>;
1345
+ interface Props$u {
1346
+ /**
1347
+ * Optional class name. It overrides class responsible for background color.
1348
+ */
1349
+ className?: string;
1350
+ /**
1351
+ * Specifies component height.
1352
+ */
1353
+ height?: string;
1354
+ /**
1355
+ * Specifies component width.
1356
+ */
1357
+ width?: string;
1358
+ }
1359
+
1360
+ declare const SortButton: React.FC<Props$t>;
1361
+ interface Props$t {
1362
+ /**
1363
+ * Button's aria label.
1364
+ */
1365
+ label?: string;
1366
+ /**
1367
+ * Tooltip displayed on hover.
1368
+ */
1369
+ tooltip: string;
1370
+ /**
1371
+ * Order indicated on button's icon.
1372
+ */
1373
+ order: 'asc' | 'desc';
1374
+ /**
1375
+ * Sets `click` event handler.
1376
+ */
1377
+ onClick?: () => void;
1378
+ }
1379
+
1380
+ declare const SwitchView: React.FC<Props$s>;
1381
+ interface Props$s {
1382
+ /**
1383
+ * Main content of the component.
1384
+ */
1385
+ children: React.ReactNode;
1386
+ /**
1387
+ * View id.
1388
+ */
1389
+ id: string;
1390
+ }
1391
+
1392
+ declare const Switch: React.FC<Props$r>;
1393
+ interface Props$r {
1394
+ /**
1395
+ * Main content of the component.
1396
+ */
1397
+ children: React.ReactNode;
1398
+ /**
1399
+ * View id to match.
1400
+ */
1401
+ match?: string;
1402
+ }
1403
+
1404
+ declare const SwitchInput: React.FC<Props$q>;
1405
+ interface Props$q {
1406
+ /**
1407
+ * Sets current input's value.
1408
+ */
1409
+ checked: boolean;
1410
+ /**
1411
+ * Underlying input's id.
1412
+ */
1413
+ id: string;
1414
+ /**
1415
+ * Underlying input's name.
1416
+ */
1417
+ name: string;
1418
+ /**
1419
+ * Callback invoked upon value's change.
1420
+ */
1421
+ onChange: (checked: boolean) => void;
1422
+ }
1423
+
1424
+ declare const TagList: React.FC<Props$p>;
1425
+ interface Props$p {
1426
+ /**
1427
+ * Main content of the component.
1428
+ */
1429
+ children: React.ReactNode;
1430
+ /**
1431
+ * Optional root class name.
1432
+ */
1433
+ className?: string;
1434
+ }
1435
+
1436
+ declare const Tag: React.ForwardRefExoticComponent<Props$o & React.RefAttributes<HTMLDivElement>>;
1437
+ interface Props$o {
1438
+ /**
1439
+ * Emphasizes tag content.
1440
+ */
1441
+ bold?: boolean;
1442
+ /**
1443
+ * Tag's label.
1444
+ */
1445
+ label: string;
1446
+ /**
1447
+ * Callback invoked upon clicking on remove icon.
1448
+ */
1449
+ onRemove?: () => void;
1450
+ /**
1451
+ * Sets tag as removable.
1452
+ */
1453
+ removable?: boolean;
1454
+ /**
1455
+ * Label associated with remove button.
1456
+ */
1457
+ removeLabel?: string;
1458
+ }
1459
+
1460
+ declare const TagInput: React.FC<Props$n>;
1461
+ interface Props$n {
1462
+ /**
1463
+ * Input's class name.
1464
+ */
1465
+ className?: string;
1466
+ /**
1467
+ * Label displayed in the popup when hovering over copy button.
1468
+ */
1469
+ copyBtnLabel: string;
1470
+ /**
1471
+ * Label displayed in the popup upon clicking on the copy button.
1472
+ */
1473
+ copyBtnLabelCopied: string;
1474
+ /**
1475
+ * Input field id.
1476
+ */
1477
+ id: string;
1478
+ /**
1479
+ * Callback invoked when component gains focus.
1480
+ */
1481
+ onFocus?: () => void;
1482
+ /**
1483
+ * Callback invoked when component loses focus.
1484
+ */
1485
+ onBlur?: () => void;
1486
+ /**
1487
+ * Callback invoked when tags change.
1488
+ */
1489
+ onChange: (tags: string[]) => void;
1490
+ /**
1491
+ * Input placeholder.
1492
+ */
1493
+ placeholder?: string;
1494
+ /**
1495
+ * Indicate error in input element.
1496
+ */
1497
+ error?: boolean;
1498
+ /**
1499
+ * List of tags to render.
1500
+ */
1501
+ tags: {
1502
+ label: string;
1503
+ bold?: boolean;
1504
+ removeLabel?: string;
1505
+ title?: string;
1506
+ }[];
1507
+ }
1508
+
1509
+ declare const Tab: React.FC<Props$m>;
1510
+ interface Props$m {
1511
+ /**
1512
+ * Main content.
1513
+ */
1514
+ children: React.ReactNode;
1515
+ /**
1516
+ * Tab id.
1517
+ */
1518
+ id: string;
1519
+ /**
1520
+ * Tab label.
1521
+ */
1522
+ label: string;
1523
+ }
1524
+
1525
+ declare const Tabs: React.FC<Props$l>;
1526
+ interface Props$l {
1527
+ /**
1528
+ * Currently selected tab.
1529
+ */
1530
+ activeTab: string;
1531
+ /**
1532
+ * Main content of the component.
1533
+ */
1534
+ children: React.ReactNode;
1535
+ /**
1536
+ * Callback invoked upon selecting a tab.
1537
+ */
1538
+ onTabSelect?: (tab: string) => void;
1539
+ }
1540
+
1541
+ declare const Tooltip: React.FC<Props$k>;
1542
+ interface Props$k {
1543
+ /**
1544
+ * Main content of the component.
1545
+ * It must be a single child that accepts `ref`.
1546
+ */
1547
+ children: React.ReactChild;
1548
+ /**
1549
+ * Delay before displaying the tooltip.
1550
+ */
1551
+ delay?: number;
1552
+ /**
1553
+ * Tooltip placement.
1554
+ */
1555
+ placement?: PopperPlacement;
1556
+ /**
1557
+ * Tooltip helper text.
1558
+ */
1559
+ title: string;
1560
+ }
1561
+
1562
+ /**
1563
+ * `TopbarAction` component acts as a props carrier only.
1564
+ */
1565
+ declare const TopbarAction: React.FC<Props$j>;
1566
+ interface Props$j {
1567
+ /**
1568
+ * Associated icon.
1569
+ */
1570
+ icon: IconName;
1571
+ /**
1572
+ * Icon size.
1573
+ */
1574
+ iconSize?: IconSize;
1575
+ /**
1576
+ * Action label.
1577
+ */
1578
+ label: string;
1579
+ /**
1580
+ * Displays as disabled.
1581
+ */
1582
+ disabled?: boolean;
1583
+ /**
1584
+ * Action invoked upon click.
1585
+ */
1586
+ onClick?: () => void;
1587
+ /**
1588
+ * Download action URL.
1589
+ */
1590
+ downloadUrl?: string;
1591
+ }
1592
+
1593
+ declare const Topbar: React.FC<Props$i>;
1594
+ interface Props$i {
1595
+ /**
1596
+ * Main content of the component.
1597
+ */
1598
+ children?: React.ReactNode;
1599
+ /**
1600
+ * Content rendered on the right side of the bar.
1601
+ */
1602
+ sideContent: React.ReactNode;
1603
+ }
1604
+
1605
+ interface UIContext {
1606
+ /**
1607
+ * Represents UI's root element.
1608
+ */
1609
+ rootEl: HTMLDivElement | null;
1610
+ /**
1611
+ * Holds info about animation duration (in ms).
1612
+ *
1613
+ * Note that these values are extracted from CSS variables.
1614
+ * Therefore, CSS variables act here as the single source of truth.
1615
+ */
1616
+ animationDuration: {
1617
+ primary: number;
1618
+ secondary: number;
1619
+ };
1620
+ /**
1621
+ * Indicates if navbar should be collapsed.
1622
+ */
1623
+ navbarCollapsed?: boolean;
1624
+ /**
1625
+ * Initial navbar width.
1626
+ */
1627
+ navbarWidth?: number;
1628
+ /**
1629
+ * Callback invoked whenever navbar is collapsed.
1630
+ */
1631
+ onNavbarCollapse: (collapsed: boolean) => void;
1632
+ /**
1633
+ * Callback invoked whenever navbar width changes.
1634
+ */
1635
+ onNavbarWidthChange: (width: number) => void;
1636
+ }
1637
+ /**
1638
+ * Defines React context for i18n and sets defaults.
1639
+ */
1640
+ declare const UIContext: React.Context<UIContext>;
1641
+ declare const useUIContext: () => UIContext;
1642
+
1643
+ /**
1644
+ * Generates base64-encoded image from its `blurhash` representation.
1645
+ *
1646
+ * @param hash blurhash representation of an image
1647
+ * @returns base64-encoded image
1648
+ */
1649
+ declare const base64FromBlurHash: (hash?: string) => string;
1650
+
1651
+ /**
1652
+ * Given preferred value and optional edge values,
1653
+ * chooses the one that is most suitable:
1654
+ *
1655
+ * - min value if preferred value is below min
1656
+ * - max value if preferred value is above max
1657
+ * - preferred value otherwise
1658
+ *
1659
+ * @param val preferred value
1660
+ * @param min optional minimum value
1661
+ * @param max optional maximum value
1662
+ * @returns chosen value
1663
+ */
1664
+ declare const clamp: (val: number, min?: number, max?: number) => number;
1665
+
1666
+ declare const copyToClipboard: (text: string) => Promise<void>;
1667
+
1668
+ /**
1669
+ * Filters off falsey values and concatenates list of classes.
1670
+ *
1671
+ * @param classes list of classes / falsey values
1672
+ * @returns classes
1673
+ */
1674
+ declare const clsx: (...classes: (string | undefined | null | number | boolean)[]) => string;
1675
+
1676
+ /**
1677
+ * Given time distance in s, formats it by rounding to nearest time unit in accordance with predefined buckets.
1678
+ *
1679
+ * @param t time left (in s)
1680
+ */
1681
+ declare const formatTimeDistance: (t: number) => {
1682
+ h: number;
1683
+ m: number;
1684
+ s: number;
1685
+ };
1686
+
1687
+ declare const getValidChildren: <ChildProps>(children: React.ReactNode) => React.ReactElement<ChildProps, string | React.JSXElementConstructor<any>>[];
1688
+
1689
+ /**
1690
+ * Shorthand for recommended use of hasOwnProperty (see https://eslint.org/docs/rules/no-prototype-builtins).
1691
+ *
1692
+ * @param object checked object
1693
+ * @param propertyKey property key to check
1694
+ */
1695
+ declare const hasOwnProperty: (object: Record<string, unknown>, propertyKey: string) => boolean;
1696
+
1697
+ declare const noOp: () => void;
1698
+
1699
+ interface RInterval {
1700
+ clear: () => void;
1701
+ }
1702
+
1703
+ /**
1704
+ * Allows to use `requestAnimationFrame` in a manner similar to `setInterval`.
1705
+ * It should be used for animations instead of `setTimeout` and `setInterval`.
1706
+ *
1707
+ * @param callback callback invoked within a fram
1708
+ * @param delay optional callback invocation delay
1709
+ * @returns interval utils
1710
+ */
1711
+ declare const rInterval: (callback: () => void, delay?: number) => RInterval;
1712
+
1713
+ interface BatchUpdatePayload {
1714
+ /**
1715
+ * Id of an update group. Each update group is registered under the provided `id` as key.
1716
+ */
1717
+ id: string;
1718
+ }
1719
+ interface BatchUpdateBatch<Payload> {
1720
+ /**
1721
+ * Holds latest update for each update group.
1722
+ */
1723
+ data: Record<string, Payload>;
1724
+ /**
1725
+ * Total number of updates that happened during specified interval.
1726
+ */
1727
+ count: number;
1728
+ }
1729
+
1730
+ /**
1731
+ * Batches updates and releases them in specified intervals.
1732
+ * Accumulates total number of updates that happened within a batch.
1733
+ *
1734
+ * This hook is useful for grouping high frequency updates into a single batch,
1735
+ * so that downstream updates do not happen too often.
1736
+ *
1737
+ * @param updateCb callback that receives current batch in specified intervals
1738
+ * @param batchUpdateInterval instructs how often batch is released
1739
+ * @returns actions and batch
1740
+ */
1741
+ declare const useBatchUpdate: <Payload extends BatchUpdatePayload>(updateCb: (batch: BatchUpdateBatch<Payload>) => void, batchUpdateInterval: number) => {
1742
+ batch: React.MutableRefObject<BatchUpdateBatch<Payload>>;
1743
+ pushUpdate: (payload: Payload) => void;
1744
+ };
1745
+
1746
+ /**
1747
+ * Hook that allows to detect click events within app root but outside specified element.
1748
+ *
1749
+ * @param container outer container
1750
+ * @param el element outside which clicks should be detected
1751
+ * @param ignoredEl optional element to ignore
1752
+ * @param onClick callback invoked if click outside registered elements was detected
1753
+ * @returns action for registering elements
1754
+ */
1755
+ declare const useClickAway: (container?: HTMLElement | null, el?: HTMLElement | null, ignoredEl?: HTMLElement | null, onClick?: () => void) => void;
1756
+
1757
+ declare const useClipboard: () => {
1758
+ copied: boolean;
1759
+ onCopy: (txtContent: string) => Promise<void>;
1760
+ };
1761
+
1762
+ /**
1763
+ * Use this hook in order to defer unmount of a component.
1764
+ * It makes sure that component relying on this hook can be mounted for at least `waitFor` period.
1765
+ * This is useful to keep loader-like components mounted for a minimum time to avoid "flashing" effect.
1766
+ *
1767
+ * @param loading loading flag
1768
+ * @param waitFor indicates minimum mount time
1769
+ * @returns flag indicating if component relying on this hook should be kept mounted
1770
+ */
1771
+ declare const useDeferredUnmount: (loading: boolean, waitFor?: number) => boolean;
1772
+
1773
+ /**
1774
+ * Allows to delay `shouldWait` flag by a value specified by `delay` option.
1775
+ *
1776
+ * @param shouldWait observed flag
1777
+ * @param delay delay time (in ms)
1778
+ * @returns flag indicating if `delay` time has passed and `shouldWait` is still `true`.
1779
+ */
1780
+ declare const useDelay: (shouldWait: boolean, delay: number) => boolean;
1781
+
1782
+ interface Dimensions {
1783
+ width: number;
1784
+ height: number;
1785
+ top: number;
1786
+ left: number;
1787
+ }
1788
+ interface ResizeOptions {
1789
+ /**
1790
+ * Resize direction.
1791
+ */
1792
+ dir?: 'SE' | 'SW';
1793
+ /**
1794
+ * Minimum resize width.
1795
+ */
1796
+ minWidth?: number;
1797
+ /**
1798
+ * Callback invoked when resizing is done.
1799
+ */
1800
+ onResizeEnd?: (dimensions: Dimensions) => void;
1801
+ }
1802
+
1803
+ /**
1804
+ * Manages element resize.
1805
+ *
1806
+ * @param opts resize options
1807
+ * @returns resize state and utils
1808
+ */
1809
+ declare const useResize: (opts: ResizeOptions) => {
1810
+ onMouseDown: React.MouseEventHandler<HTMLElement>;
1811
+ setResizableEl: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1812
+ isResizing: boolean;
1813
+ };
1814
+
1815
+ declare type DragHandler = (diff: {
1816
+ /**
1817
+ * Dragged element.
1818
+ */
1819
+ draggableEl: HTMLElement;
1820
+ /**
1821
+ * Initial X offset of dragged element in relation to its closest positioned ancestor.
1822
+ */
1823
+ initOffsetX: number;
1824
+ /**
1825
+ * Initial Y offset of dragged element in relation to its closest positioned ancestor.
1826
+ */
1827
+ initOffsetY: number;
1828
+ /**
1829
+ * Initial offset width of dragged element.
1830
+ */
1831
+ initOffsetWidth: number;
1832
+ /**
1833
+ * Initial offset height of dragged element.
1834
+ */
1835
+ initOffsetHeight: number;
1836
+ /**
1837
+ * Pointer's X client offset.
1838
+ */
1839
+ clientOffsetX: number;
1840
+ /**
1841
+ * Pointer's Y client offset.
1842
+ */
1843
+ clientOffsetY: number;
1844
+ /**
1845
+ * Value of a vector representing pointer movement in X axis.
1846
+ */
1847
+ clientVX: number;
1848
+ /**
1849
+ * Value of a vector representing pointer movement in Y axis.
1850
+ */
1851
+ clientVY: number;
1852
+ }) => void;
1853
+ interface DraggableOptions {
1854
+ /**
1855
+ * Callback invoked on dragging. Passes most recent drag vectors.
1856
+ */
1857
+ onDrag?: DragHandler;
1858
+ /**
1859
+ * Callback invoked on drag end.
1860
+ */
1861
+ onDragEnd?: (dimensions: Dimensions) => void;
1862
+ }
1863
+
1864
+ /**
1865
+ * Manages element dragging.
1866
+ *
1867
+ * @param opts dragging options
1868
+ * @returns dragging state and utils
1869
+ */
1870
+ declare const useDraggable: (opts?: DraggableOptions) => {
1871
+ draggableEl: HTMLElement | null;
1872
+ isDragging: boolean;
1873
+ onMouseDown: React.MouseEventHandler<HTMLElement>;
1874
+ setDraggableEl: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1875
+ };
1876
+
1877
+ /**
1878
+ * Keeps info about mount state.
1879
+ *
1880
+ * This hook is useful when paired with async effects.
1881
+ * For instance, an effect might be in progress but its parent hook gets unmounted. In such case, it's advised to not update hook state.
1882
+ *
1883
+ * @returns callback that returns info about mount state
1884
+ */
1885
+ declare const useIsMounted: () => () => boolean;
1886
+
1887
+ interface ItemsOverflowOptions {
1888
+ /**
1889
+ * Total number of items.
1890
+ */
1891
+ items: number;
1892
+ /**
1893
+ * Margin added to items at each breakpoint. Provide a value to accommodate space for e.g. `more` button.
1894
+ */
1895
+ itemsMargin: number;
1896
+ }
1897
+
1898
+ /**
1899
+ * Calculates number of items that are visible within a container.
1900
+ *
1901
+ * @param opts hook options
1902
+ * @returns items overflow state
1903
+ */
1904
+ declare const useItemsOverflow: (opts: ItemsOverflowOptions) => {
1905
+ init: boolean;
1906
+ setContainer: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;
1907
+ visibleItems: number;
1908
+ };
1909
+
1910
+ /**
1911
+ * Use this hook in order to invoke a callback once the specified time passes.
1912
+ *
1913
+ * The hook exposes actions for initializing and resetting the timeout.
1914
+ *
1915
+ * @param onTimeout callback invoked when time specified by `delay` passes
1916
+ * @param delay timeout (in ms)
1917
+ * @returns timeout actions
1918
+ */
1919
+ declare const useResettableTimeout: (onTimeout: () => void, delay: number) => {
1920
+ initTimeout: () => void;
1921
+ removeTimeout: () => void;
1922
+ resetTimeout: () => void;
1923
+ };
1924
+
1925
+ /**
1926
+ * Provided with a list of breakpoints, chooses a breakpoint value that is greater than or equal container's width.
1927
+ * Additionally, it chooses another breakpoint by taking device's pixel ratio into account.
1928
+ *
1929
+ * Container's size changes are observed via `ResizeObserver`. Observer's callback invocation is throttled.
1930
+ *
1931
+ * @param breakpoints list of possible image widths
1932
+ * @param enabled toggles `ResizeObserver`
1933
+ * @returns state and ref setters
1934
+ */
1935
+ declare const useResponsiveSizes: (breakpoints: number[], enabled?: boolean) => {
1936
+ sizes: number | undefined;
1937
+ setContainer: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1938
+ pixelAdjSizes: number;
1939
+ };
1940
+
1941
+ /**
1942
+ * Detects visibility of an element inside a scrollable container.
1943
+ *
1944
+ * @param container scrollable container
1945
+ * @returns hook state and methods
1946
+ */
1947
+ declare const useElementVisibility: (container?: HTMLElement | null) => {
1948
+ setElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1949
+ visible: boolean;
1950
+ };
1951
+
1952
+ interface UseFilesDropProps {
1953
+ /**
1954
+ * Callback invoked when files are dropped.
1955
+ */
1956
+ onDrop?: (files: File[]) => void;
1957
+ }
1958
+ /**
1959
+ * Hook that allows to connect any container and make it a drop target for files.
1960
+ *
1961
+ * @param hook props
1962
+ * @returns hook state and methods
1963
+ */
1964
+ declare const useFilesDrop: ({ onDrop }: UseFilesDropProps) => {
1965
+ drop: react_dnd.ConnectDropTarget;
1966
+ isActive: boolean;
1967
+ };
1968
+
1969
+ /**
1970
+ * A helper hook for a building a simple state machine. Useful for togglable popper-based components such as menus.
1971
+ *
1972
+ * @param initValue initial value
1973
+ * @returns toggle actions
1974
+ */
1975
+ declare const useToggle: (initValue?: boolean) => {
1976
+ value: boolean;
1977
+ toggle: () => void;
1978
+ on: () => void;
1979
+ off: () => void;
1980
+ };
1981
+
1982
+ /**
1983
+ * Listens to source element's size changes and sets target's width and height accordingly.
1984
+ *
1985
+ * This hook is useful if `object-fit: scale-down` CSS rule cannot be used,
1986
+ * e.g. if image's placeholder has different size than the original image
1987
+ * but the placeholder must be still scaled to fit the size of the original image.
1988
+ *
1989
+ * @param originalWidth original image's width
1990
+ * @param originalHeight original image's height
1991
+ * @returns ref setters
1992
+ */
1993
+ declare const useScaleDown: (originalWidth?: number, originalHeight?: number, enabled?: boolean) => {
1994
+ setSrcElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1995
+ setTargetElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
1996
+ };
1997
+
1998
+ interface XYCoord {
1999
+ x: number;
2000
+ y: number;
2001
+ }
2002
+ interface ScrollCoordsConfig {
2003
+ /**
2004
+ * Specifies fraction of the container
2005
+ * that will be used as upper and lower scroll bounds
2006
+ * (scrolling can happen only within those bounds).
2007
+ */
2008
+ containerMargin?: number;
2009
+ /**
2010
+ * Represents a value by which scroll vector is multiplied.
2011
+ * Adjust the value to fine tune scrolling speed.
2012
+ */
2013
+ speedCoef?: number;
2014
+ /**
2015
+ * Specifies the number of pixels that vertical mouse movement
2016
+ * must exceed so that scroll can happen.
2017
+ */
2018
+ initThresh?: number;
2019
+ }
2020
+ declare type OnScrollHandler = (vStart: {
2021
+ startX: number;
2022
+ startY: number;
2023
+ }, vCurrent: {
2024
+ currentX: number;
2025
+ currentY: number;
2026
+ }) => void;
2027
+ interface ScrollOptions {
2028
+ /**
2029
+ * Triggering `mousedown` events on elements with the provided selector
2030
+ * will not initialize scrolling.
2031
+ */
2032
+ ignoredSelector?: string;
2033
+ /**
2034
+ * Callback that is invoked in intervals if scrolling has been initialied.
2035
+ * The callback is invoked for every `tick` of scrolling interval.
2036
+ */
2037
+ onScroll?: OnScrollHandler;
2038
+ /**
2039
+ * Callback invoked upon scroll end.
2040
+ */
2041
+ onScrollEnd?: () => void;
2042
+ /**
2043
+ * Callback invoked upon scroll start.
2044
+ */
2045
+ onScrollStart?: () => void;
2046
+ }
2047
+
2048
+ /**
2049
+ * Calculates scrolling vector based on initial client coords, current client coords, and scrolling options.
2050
+ *
2051
+ * @param container scrollable container
2052
+ * @param initOffset initial client offset (e.g. mouse coords)
2053
+ * @param currentOffset current client offset (e.g. mouse coords)
2054
+ * @param config config option
2055
+ * @returns scrolling vector
2056
+ */
2057
+ declare const getScrollVectors: (container: HTMLElement, initOffset: XYCoord, currentOffset: XYCoord, config?: ScrollCoordsConfig) => number;
2058
+
2059
+ /**
2060
+ * Allows to scroll a container while performing actions within that container.
2061
+ *
2062
+ * Container scrolling is initiated by a `mousedown` event within that container.
2063
+ * Then, on `mousemove` the scrolling can be either accelerated or slowed down.
2064
+ *
2065
+ * Scrolling can happen only if mouse pointer is placed close to the upper or lower edge of the container.
2066
+ *
2067
+ * @param container scrollable container
2068
+ * @param opts scroll options
2069
+ * @returns scroll info
2070
+ */
2071
+ declare const useScroll: (container?: HTMLElement | null, opts?: ScrollOptions) => {
2072
+ isScrolling: boolean;
2073
+ };
2074
+
2075
+ /**
2076
+ * Allows to scroll a container while dragging an item.
2077
+ *
2078
+ * @param container scrollable container
2079
+ * @param type item type that will trigger scrolling
2080
+ */
2081
+ declare const useScrollDnd: (container?: HTMLElement | null, type?: string) => void;
2082
+
2083
+ /**
2084
+ * Hook for downloading file using hidden anchor tag.
2085
+ *
2086
+ * @returns function for downloading file
2087
+ */
2088
+ declare const useDownload: (root?: HTMLElement | null) => {
2089
+ downloadFile: (downloadUrl: string) => void;
2090
+ };
2091
+
2092
+ /**
2093
+ * Defines validators that can be used to check various user inputs.
2094
+ * They are intended to be used downstream to build validation rules for HTML forms.
2095
+ *
2096
+ * Validators must conform to the convention used by `react-hook-form`: They must return either `boolean` or an error message.
2097
+ * For more info see `validate` option: https://react-hook-form.com/api/useform/register
2098
+ */
2099
+ /**
2100
+ * Creates validation rule that checks if supplied `value` is non-empty.
2101
+ * Whitespaces are trimmed before the check.
2102
+ *
2103
+ * @param msg error message
2104
+ * @returns validator that returns `true` if check passes, error message otherwise
2105
+ */
2106
+ declare const nonEmpty: (msg: string) => (value?: string) => string | true;
2107
+ /**
2108
+ * Creates validation rule that checks if supplied `value` is present in `allowedValues`.
2109
+ *
2110
+ * @param msg error message
2111
+ * @param allowedValues list of allowed values
2112
+ * @returns validator that returns `true` if check passes, error message otherwise
2113
+ */
2114
+ declare const isAllowed: <T>(msg: string, allowedValues: T[]) => (value?: T | undefined) => string | true;
2115
+ /**
2116
+ * Creates validation rule that checks if supplied array has at least one item.
2117
+ *
2118
+ * @param msg error message
2119
+ * @returns validator that returns `true` if check passes, error message otherwise
2120
+ */
2121
+ declare const nonEmptyArray: <T>(msg: string) => (value?: T[] | undefined) => string | true;
2122
+ /**
2123
+ * Creates validation rule that checks if supplied array does not exceed `max` items.
2124
+ *
2125
+ * @param msg error message
2126
+ * @returns validator that returns `true` if check passes, error message otherwise
2127
+ */
2128
+ declare const maxItems: <T>(msg: string, max: number) => (value?: T[] | undefined) => string | true;
2129
+ /**
2130
+ * Creates validation rule that checks if supplied `value` is not already present within `existingValues`.
2131
+ *
2132
+ * @param msg error message
2133
+ * @param existingValues list of existing values
2134
+ * @returns validator that returns `true` if check passes, error message otherwise
2135
+ */
2136
+ declare const unique: <T>(msg: string, existingValues: T[]) => (value?: T | undefined) => string | true;
2137
+ /**
2138
+ * Creates validation rule that checks if supplied value contains a dot.
2139
+ *
2140
+ * @param msg error message
2141
+ * @returns validator that returns `true` if check passes, error message otherwise
2142
+ */
2143
+ declare const nonDotValue: (msg: string) => (values?: string[]) => string | true;
2144
+ /**
2145
+ * Creates validation rule that checks if string length in an array doesn't exceed max length.
2146
+ *
2147
+ * @param msg error message
2148
+ * @param maxLength maximum length of the string in the array
2149
+ * @returns validator that returns `true` if check passes, error message otherwise
2150
+ */
2151
+ declare const maxLength: (msg: string, maxLength: number) => (values?: string[]) => string | true;
2152
+
2153
+ declare const validators_d_nonEmpty: typeof nonEmpty;
2154
+ declare const validators_d_isAllowed: typeof isAllowed;
2155
+ declare const validators_d_nonEmptyArray: typeof nonEmptyArray;
2156
+ declare const validators_d_maxItems: typeof maxItems;
2157
+ declare const validators_d_unique: typeof unique;
2158
+ declare const validators_d_nonDotValue: typeof nonDotValue;
2159
+ declare const validators_d_maxLength: typeof maxLength;
2160
+ declare namespace validators_d {
2161
+ export {
2162
+ validators_d_nonEmpty as nonEmpty,
2163
+ validators_d_isAllowed as isAllowed,
2164
+ validators_d_nonEmptyArray as nonEmptyArray,
2165
+ validators_d_maxItems as maxItems,
2166
+ validators_d_unique as unique,
2167
+ validators_d_nonDotValue as nonDotValue,
2168
+ validators_d_maxLength as maxLength,
2169
+ };
2170
+ }
2171
+
2172
+ declare const ViewDialog: React.FC<Props$h>;
2173
+ interface Props$h {
2174
+ /**
2175
+ * Main content of the component.
2176
+ */
2177
+ children: React.ReactNode;
2178
+ /**
2179
+ * Label of close button.
2180
+ */
2181
+ closeLabel?: string;
2182
+ /**
2183
+ * Initial height of dialog window.
2184
+ */
2185
+ height: number | string;
2186
+ /**
2187
+ * Initial offset from the left.
2188
+ */
2189
+ left?: number;
2190
+ /**
2191
+ * Minimum height (in px) of dialog window.
2192
+ */
2193
+ minHeight?: number;
2194
+ /**
2195
+ * Minimum width (in px) of dialog window.
2196
+ */
2197
+ minWidth?: number;
2198
+ /**
2199
+ * Callback invoked upon closing of dialog window.
2200
+ */
2201
+ onClose?: () => void;
2202
+ /**
2203
+ * Callback invoked whenever dialog dragging is completed.
2204
+ */
2205
+ onDragEnd?: (dimensions: Dimensions) => void;
2206
+ /**
2207
+ * Callback invoked whenever dialog resizing is completed.
2208
+ */
2209
+ onResizeEnd?: (dimensions: Dimensions) => void;
2210
+ /**
2211
+ * Toggles open state of dialog window.
2212
+ */
2213
+ open: boolean;
2214
+ /**
2215
+ * Label of resize button (SE direction).
2216
+ */
2217
+ resizeSELabel?: string;
2218
+ /**
2219
+ * Label of resize button (SW direction).
2220
+ */
2221
+ resizeSWLabel?: string;
2222
+ /**
2223
+ * Initial offset from the top.
2224
+ */
2225
+ top?: number;
2226
+ /**
2227
+ * Initial width of dialog window.
2228
+ */
2229
+ width: number | string;
2230
+ }
2231
+
2232
+ declare const UIProvider: React.FC<Props$g>;
2233
+ interface Props$g {
2234
+ /**
2235
+ * Main content.
2236
+ */
2237
+ children: React.ReactNode;
2238
+ /**
2239
+ * Initial navbar mode.
2240
+ */
2241
+ navbarCollapsed?: boolean;
2242
+ /**
2243
+ * Initial navbar width.
2244
+ */
2245
+ navbarWidth?: number;
2246
+ /**
2247
+ * Callback invoked whenever navbar mode changes.
2248
+ */
2249
+ onNavbarCollapse?: (collapsed: boolean) => void;
2250
+ /**
2251
+ * Callback invoked whenever navbar resize ends.
2252
+ */
2253
+ onNavbarWidthChange?: (width: number) => void;
2254
+ /**
2255
+ * Dialog mode options.
2256
+ */
2257
+ dialog?: Omit<Props$h, 'children'>;
2258
+ /**
2259
+ * Name of selected theme.
2260
+ */
2261
+ theme?: string;
2262
+ }
2263
+
2264
+ declare const View: React.ForwardRefExoticComponent<Props$f & React.RefAttributes<HTMLDivElement>>;
2265
+ interface Props$f {
2266
+ /**
2267
+ * Main content of the component.
2268
+ */
2269
+ children: React.ReactNode;
2270
+ /**
2271
+ * Indicates if content's area is active.
2272
+ */
2273
+ isContentActive?: boolean;
2274
+ /**
2275
+ * Sets component's topbar.
2276
+ */
2277
+ topbar?: React.ReactNode;
2278
+ /**
2279
+ * Sets component's bottombar.
2280
+ */
2281
+ bottombar?: React.ReactNode;
2282
+ /**
2283
+ * Sets content `mousedown` event handler.
2284
+ */
2285
+ onContentMouseDown?: React.MouseEventHandler<HTMLDivElement>;
2286
+ }
2287
+
2288
+ declare const ViewWrapper: React.FC<Props$e>;
2289
+ interface Props$e {
2290
+ /**
2291
+ * Main content of the component.
2292
+ */
2293
+ children: React.ReactNode;
2294
+ /**
2295
+ * Sets navbar.
2296
+ */
2297
+ navbar?: React.ReactNode;
2298
+ }
2299
+
2300
+ declare const RangeSlider: React.FC<Props$d>;
2301
+ declare type Props$d = {
2302
+ /**
2303
+ * Toggles animation, e.g. width transition.
2304
+ */
2305
+ animated?: boolean;
2306
+ /**
2307
+ * Forces component to occupy half of the available width.
2308
+ */
2309
+ halfWidth?: boolean;
2310
+ /**
2311
+ * Slider value.
2312
+ */
2313
+ value: number;
2314
+ /**
2315
+ * Slider on change callback.
2316
+ *
2317
+ * @param value new slider value
2318
+ */
2319
+ onChange(value: number): void;
2320
+ /**
2321
+ * Slider step.
2322
+ */
2323
+ step: number;
2324
+ /**
2325
+ * Slider minimum value.
2326
+ */
2327
+ min: number;
2328
+ /**
2329
+ * Slider maximum value.
2330
+ */
2331
+ max: number;
2332
+ /**
2333
+ * Slider text values.
2334
+ */
2335
+ textValues?: Record<string, string>;
2336
+ /**
2337
+ * Renders range slider values labels.
2338
+ */
2339
+ showLabels?: boolean;
2340
+ };
2341
+
2342
+ declare const FormFeedback: React.FC<Props$c>;
2343
+ declare type Props$c = {
2344
+ /**
2345
+ * Main content of the component.
2346
+ */
2347
+ children: React.ReactNode;
2348
+ /**
2349
+ * Feedback error.
2350
+ */
2351
+ error?: boolean;
2352
+ /**
2353
+ * Feedback warning.
2354
+ */
2355
+ warning?: boolean;
2356
+ };
2357
+
2358
+ declare const FormGroup: React.FC<Props$b>;
2359
+ interface Props$b {
2360
+ /**
2361
+ * Main content of the component.
2362
+ */
2363
+ children: React.ReactNode;
2364
+ /**
2365
+ * Applies offset.
2366
+ */
2367
+ offset?: 'base' | 'md';
2368
+ }
2369
+
2370
+ declare const FormInputLabel: React.FC<Props$a>;
2371
+ declare type Props$a = {
2372
+ /**
2373
+ * Main content of the component.
2374
+ */
2375
+ children: React.ReactNode;
2376
+ /**
2377
+ * Input id.
2378
+ */
2379
+ htmlFor: string;
2380
+ /**
2381
+ * Input id.
2382
+ */
2383
+ hidden?: boolean;
2384
+ };
2385
+
2386
+ declare const Form: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLFormElement>>;
2387
+ declare type Props$9 = {
2388
+ /**
2389
+ * Main content of the component.
2390
+ */
2391
+ children: React.ReactNode;
2392
+ /**
2393
+ * Form class.
2394
+ */
2395
+ className?: string;
2396
+ /**
2397
+ * Form element's id.
2398
+ */
2399
+ id?: string;
2400
+ /**
2401
+ * Form submit callback.
2402
+ */
2403
+ onSubmit: React.FormEventHandler<HTMLFormElement>;
2404
+ };
2405
+
2406
+ declare const EmptyView: React.ForwardRefExoticComponent<Props$8 & React.RefAttributes<HTMLDivElement>>;
2407
+ interface Props$8 {
2408
+ /**
2409
+ * Adds active styling.
2410
+ */
2411
+ active?: boolean;
2412
+ /**
2413
+ * Empty view label.
2414
+ */
2415
+ label: string;
2416
+ /**
2417
+ * Empty view icon.
2418
+ */
2419
+ icon: IconName;
2420
+ /**
2421
+ * Empty view action container displayed under icon and label.
2422
+ */
2423
+ actionContainer?: React.ReactNode;
2424
+ }
2425
+
2426
+ declare const FileInputButton: React.ForwardRefExoticComponent<Props$7 & React.RefAttributes<HTMLInputElement>>;
2427
+ interface Props$7 extends Omit<Props$14, 'onClick'> {
2428
+ /**
2429
+ * Unique input's id.
2430
+ */
2431
+ id: string;
2432
+ /**
2433
+ * Main content of the component.
2434
+ */
2435
+ children: React.ReactNode;
2436
+ /**
2437
+ * Input's name to register.
2438
+ */
2439
+ name?: string;
2440
+ /**
2441
+ * Callback invoked when the value is changed.
2442
+ */
2443
+ onChange?: (evt: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
2444
+ /**
2445
+ * Input's value.
2446
+ */
2447
+ value?: string;
2448
+ /**
2449
+ * Input's accept attribute.
2450
+ */
2451
+ accept?: string;
2452
+ }
2453
+
2454
+ /**
2455
+ * Selection rectangle's coordinates.
2456
+ * All coordinates are in relation to container's top left corner.
2457
+ */
2458
+ interface SelectionAreaCoords {
2459
+ /**
2460
+ * Selection rectangle's `x` position.
2461
+ */
2462
+ x: number;
2463
+ /**
2464
+ * Selection rectangle's `y` position.
2465
+ */
2466
+ y: number;
2467
+ /**
2468
+ * Selection rectangle's width.
2469
+ */
2470
+ width: number;
2471
+ /**
2472
+ * Selection rectangle's height.
2473
+ */
2474
+ height: number;
2475
+ }
2476
+
2477
+ declare const SelectionArea: React.FC<Props$6>;
2478
+ interface Props$6 {
2479
+ /**
2480
+ * Selection area container.
2481
+ */
2482
+ container?: HTMLDivElement | null;
2483
+ /**
2484
+ * Area selection change handler.
2485
+ */
2486
+ onSelectionChange?: (area: SelectionAreaCoords) => void;
2487
+ /**
2488
+ * Selector for ignoring areas started within passed selector.
2489
+ */
2490
+ ignoredSelector?: string;
2491
+ }
2492
+
2493
+ declare const Notifications: React.FC<Props$5>;
2494
+ interface Props$5 {
2495
+ /**
2496
+ * Container's position will be adjusted in accordance with provided element's height.
2497
+ */
2498
+ bottomOffsetEl?: HTMLElement | null;
2499
+ /**
2500
+ * Main content of the component.
2501
+ */
2502
+ children: React.ReactNode;
2503
+ }
2504
+
2505
+ declare const NotificationDetails: React.FC<Props$4>;
2506
+ interface Props$4 {
2507
+ /**
2508
+ * Main content of the component.
2509
+ */
2510
+ children: React.ReactNode;
2511
+ /**
2512
+ * Label for close button.
2513
+ */
2514
+ closeLabel?: string;
2515
+ /**
2516
+ * Notification details close callback.
2517
+ */
2518
+ onClose?: () => void;
2519
+ /**
2520
+ * Notification title.
2521
+ */
2522
+ title: string;
2523
+ /**
2524
+ * Notification type.
2525
+ */
2526
+ type: 'success' | 'error' | 'info';
2527
+ }
2528
+
2529
+ declare const Notification: React.FC<Props$3>;
2530
+ /**
2531
+ * `Notification` component is rendered as part of `TransitionGroup` and therefore gets transition props in addition to its regular props.
2532
+ */
2533
+ declare type Props$3 = Partial<TransitionProps> & {
2534
+ /**
2535
+ * Label for "Close" button.
2536
+ */
2537
+ closeLabel: string;
2538
+ /**
2539
+ * Label for "Close Details" button.
2540
+ */
2541
+ closeDetailsLabel?: string;
2542
+ /**
2543
+ * Optional notification details.
2544
+ */
2545
+ details?: React.ReactNode;
2546
+ /**
2547
+ * Notification close callback.
2548
+ */
2549
+ onClose?: () => void;
2550
+ /**
2551
+ * Label for "Open Details" button.
2552
+ */
2553
+ openDetailsLabel?: string;
2554
+ /**
2555
+ * Notification title.
2556
+ */
2557
+ title: string;
2558
+ /**
2559
+ * Notification type.
2560
+ */
2561
+ type: 'success' | 'error' | 'info';
2562
+ };
2563
+
2564
+ declare const CopyableInput: React.FC<Props$2>;
2565
+ interface Props$2 {
2566
+ /**
2567
+ * Unique input's id.
2568
+ */
2569
+ id: string;
2570
+ /**
2571
+ * Input's value. This value will be copied to clipboard upon clicking on the copy button.
2572
+ */
2573
+ value?: string;
2574
+ /**
2575
+ * Input's class name.
2576
+ */
2577
+ className?: string;
2578
+ /**
2579
+ * Label displayed in the popup on hover and the internal button's aria-label.
2580
+ */
2581
+ labelCopy: string;
2582
+ /**
2583
+ * Label displayed in the popup upon clicking on the copy button.
2584
+ */
2585
+ labelCopied: string;
2586
+ }
2587
+
2588
+ declare const CopyButton: React.FC<Props$1>;
2589
+ interface Props$1 {
2590
+ /**
2591
+ * Value to be copied to clipboard.
2592
+ */
2593
+ value?: string;
2594
+ /**
2595
+ * Label displayed in the popup on hover and the internal button's aria-label.
2596
+ */
2597
+ labelCopy: string;
2598
+ /**
2599
+ * Label displayed in the popup upon clicking on the copy button.
2600
+ */
2601
+ labelCopied: string;
2602
+ }
2603
+
2604
+ declare const Fixed: React.FC<Props>;
2605
+ interface Props {
2606
+ /**
2607
+ * Main content of the component.
2608
+ */
2609
+ children: React.ReactNode;
2610
+ }
2611
+
2612
+ export { Bottombar, Button, CircularLoader, CopyButton, CopyableInput, Dialog, DialogActions, DialogColumn, DialogFooter, DialogHeader, DialogRow, DialogSection, Dimensions, DocIcon, DocIconName, DragHandler, DraggableOptions, EmptyView, FileInputButton, Fixed, Form, FormFeedback, FormGroup, FormInputLabel, Gallery, GalleryFigure, GalleryItem, Icon, IconColor, IconName, IconRenderProp, IconRenderer, IconSize, Input, Props$S as InputProps, ListDndChildProps, ListDndItem, ListDndItemHookProps, ListDndMoveItem, ListDndOnDragEnd, ListDndSetDraggable, ListDndSetDraggablePartial, Menu, MenuItem, MenuSection, MenuSubSection, Navbar, NavbarItem, Notification, NotificationDetails, Notifications, OnScrollHandler, Overlay, PageChangeCallback, Pagination, PaginationState, Panel, PanelActions, PanelContent, PanelContentProp, PanelDragHandle, PanelList, PanelSkeleton, PanelTitle, Popper, PopperAnchorRef, PopperArrow, PopperOffset, PopperOffsetValue, PopperPlacement, ProgressPanel, PropertiesTable, PropertiesTableRow, RInterval, RangeSlider, ResizeOptions, ResponsiveImage, ScrollCoordsConfig, ScrollOptions, SelectionArea, SelectionAreaCoords, Skeleton, SortButton, SortableDndList, SortableDndListItem, Switch, SwitchInput, SwitchView, Tab, Tabs, Tag, TagInput, TagList, Tooltip, Topbar, TopbarAction, UIContext, UIProvider, Props$g as UIProviderProps, View, ViewDialog, Props$h as ViewDialogProps, ViewWrapper, XYCoord, base64FromBlurHash, clamp, clsx, copyToClipboard, formatTimeDistance, getScrollVectors, getValidChildren, hasOwnProperty, noOp, rInterval, useBatchUpdate, useClickAway, useClipboard, useDeferredUnmount, useDelay, useDownload, useDraggable, useElementVisibility, useFilesDrop, useIsMounted, useItemsOverflow, useListDnd, usePagination, useResettableTimeout, useResize, useResponsiveSizes, useScaleDown, useScroll, useScrollDnd, useToggle, useUIContext, validators_d as validators };