demio-ui 2.5.89 → 2.5.93

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,29 @@
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
+ export interface ModalScrollableProps {
3
+ cancelBtnText?: string;
4
+ children: ReactNode;
5
+ customBodyClass?: string;
6
+ customCancelBtnClass?: string;
7
+ customCloseBtnClass?: string;
8
+ customContentClass?: string;
9
+ customFooterClass?: string;
10
+ customOkBtnClass?: string;
11
+ customOverlayClass?: string;
12
+ customTitleClass?: string;
13
+ footer?: ReactNode;
14
+ header?: ReactNode;
15
+ isAvailableCancelBtn?: boolean;
16
+ isAvailableOkBtn?: boolean;
17
+ isClosable?: boolean | null;
18
+ isCloseButtonVisible?: boolean;
19
+ isOpen: boolean;
20
+ isOpenByDefault?: boolean;
21
+ okBtnText?: string;
22
+ onCancel?: (event: MouseEvent<HTMLButtonElement>) => void;
23
+ onOk?: (event: MouseEvent<HTMLButtonElement>) => void;
24
+ onOpenChange: (open: boolean) => void;
25
+ portalContainer?: HTMLElement;
26
+ title?: ReactNode;
27
+ }
28
+ declare const ModalScrollable: FC<ModalScrollableProps>;
29
+ export default ModalScrollable;
@@ -0,0 +1 @@
1
+ export { default } from './ModalScrollable';
@@ -44,29 +44,5 @@ export interface UploadProps {
44
44
  previewImageTitle?: string;
45
45
  uploadPercent?: number;
46
46
  }
47
- /**
48
- The component has 3 states: **default**, **progress** and **preview** states.
49
-
50
- - **Default** state is visible when **uploadPercent** prop is **undefined**.
51
- - When the **uploadPercent** prop becomes a **number** and it is **less than 100** the **Upload** automatically switches to a **progress** state.
52
- - When the **uploadPercent** prop is **equal to 100** the **Upload** automatically switches to a **preview** mode.
53
-
54
- One more useful thing is related to a **UploadRef** interface. It consists of all the methods that need to be accessed through the **ref**. For example:
55
-
56
- ````
57
- const uploadRef = useRef<UploadRef>(null);
58
-
59
- const handleReset = () => {
60
- uploadRef.current?.cancelUpload();
61
- };
62
-
63
- return (
64
- <>
65
- <Upload ref={uploadRef} />
66
- <button onClick={handleReset}>Reset Upload</button>
67
- </>
68
- );
69
- ````
70
- **/
71
47
  declare const Upload: FC<UploadProps>;
72
48
  export default Upload;
@@ -17,7 +17,8 @@ export { default as InputHint } from './InputHint';
17
17
  export { default as Label } from './Label';
18
18
  export { default as Loader } from './Loader';
19
19
  export { default as Modal } from './Modal';
20
- export { default as ModalWindow } from './ModalWindow';
20
+ export { default as ModalScrollable } from './ModalScrollable';
21
+ export { default as ScrollableModal } from './ModalScrollable';
21
22
  export { default as MultiSelect } from './MultiSelect';
22
23
  export { default as Pagination } from './Pagination';
23
24
  export { Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from './Popover';
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { MouseEventHandler, FC, ReactNode, CSSProperties, SetStateAction, DragEvent, ReactEventHandler, PropsWithChildren } from 'react';
2
+ import React__default, { MouseEventHandler, FC, ReactNode, CSSProperties, SetStateAction, DragEvent, ReactEventHandler, MouseEvent, PropsWithChildren } from 'react';
3
3
  import { CheckedState } from '@radix-ui/react-checkbox';
4
4
  import { Point, Area } from 'react-easy-crop';
5
5
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -269,24 +269,33 @@ type Props$6 = {
269
269
  **/
270
270
  declare function Modal({ children, contentClassName, isCloseButtonVisible, onClose, onOpenChange, open, overlayClassName, title, isClosable, portalContainer, ...props }: Props$6): React__default.JSX.Element;
271
271
 
272
- interface ModalWindowProps {
272
+ interface ModalScrollableProps {
273
+ cancelBtnText?: string;
273
274
  children: ReactNode;
274
275
  customBodyClass?: string;
276
+ customCancelBtnClass?: string;
275
277
  customCloseBtnClass?: string;
276
278
  customContentClass?: string;
277
279
  customFooterClass?: string;
280
+ customOkBtnClass?: string;
278
281
  customOverlayClass?: string;
279
282
  customTitleClass?: string;
280
283
  footer?: ReactNode;
284
+ header?: ReactNode;
285
+ isAvailableCancelBtn?: boolean;
286
+ isAvailableOkBtn?: boolean;
287
+ isClosable?: boolean | null;
281
288
  isCloseButtonVisible?: boolean;
282
- onOpenChange: (open: boolean) => void;
283
289
  isOpen: boolean;
284
290
  isOpenByDefault?: boolean;
285
- title?: ReactNode;
286
- isClosable?: boolean | null;
291
+ okBtnText?: string;
292
+ onCancel?: (event: MouseEvent<HTMLButtonElement>) => void;
293
+ onOk?: (event: MouseEvent<HTMLButtonElement>) => void;
294
+ onOpenChange: (open: boolean) => void;
287
295
  portalContainer?: HTMLElement;
296
+ title?: ReactNode;
288
297
  }
289
- declare const ModalWindow: FC<ModalWindowProps>;
298
+ declare const ModalScrollable: FC<ModalScrollableProps>;
290
299
 
291
300
  type Option = unknown;
292
301
  interface Props$5 {
@@ -580,30 +589,6 @@ interface UploadProps {
580
589
  previewImageTitle?: string;
581
590
  uploadPercent?: number;
582
591
  }
583
- /**
584
- The component has 3 states: **default**, **progress** and **preview** states.
585
-
586
- - **Default** state is visible when **uploadPercent** prop is **undefined**.
587
- - When the **uploadPercent** prop becomes a **number** and it is **less than 100** the **Upload** automatically switches to a **progress** state.
588
- - When the **uploadPercent** prop is **equal to 100** the **Upload** automatically switches to a **preview** mode.
589
-
590
- One more useful thing is related to a **UploadRef** interface. It consists of all the methods that need to be accessed through the **ref**. For example:
591
-
592
- ````
593
- const uploadRef = useRef<UploadRef>(null);
594
-
595
- const handleReset = () => {
596
- uploadRef.current?.cancelUpload();
597
- };
598
-
599
- return (
600
- <>
601
- <Upload ref={uploadRef} />
602
- <button onClick={handleReset}>Reset Upload</button>
603
- </>
604
- );
605
- ````
606
- **/
607
592
  declare const Upload: FC<UploadProps>;
608
593
 
609
594
  interface UploadErrorProps {
@@ -2485,4 +2470,4 @@ declare class ToastManager {
2485
2470
  }
2486
2471
  declare const toast: ToastManager;
2487
2472
 
2488
- export { Alert, Avatar, Badge, Button$1 as Button, Button as ButtonNew, Card, Checkbox, CopyLinkInput, Crop, DnDArea, Drawer, DropdownItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, InfoBanner, Input, InputHint, Label, Loader, Modal, ModalWindow, MultiSelect, Pagination, Popover, PopoverTooltip, Progress, RadioGroup, Select, SelectItem, SelectItemText, SliderDemo as Slider, Switch, Tab, TabsContent, TabsList, TabsRoot, Tag, Toast, Tooltip, Typography, Upload, UploadError, UploadMenu, UploadProgressPreview, createImage, getCroppedImageURL, getFileExtension, getFileMimeType, getRadianAngle, index as icons, isExtensionMatchingMimeType, isImage, isValidFileDimension, isValidFileSize, isValidFileType, isVideo, mimeTypeMap, rotateSize, toast, useCroppedImage, useFileValidation };
2473
+ export { Alert, Avatar, Badge, Button$1 as Button, Button as ButtonNew, Card, Checkbox, CopyLinkInput, Crop, DnDArea, Drawer, DropdownItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, InfoBanner, Input, InputHint, Label, Loader, Modal, ModalScrollable, MultiSelect, Pagination, Popover, PopoverTooltip, Progress, RadioGroup, ModalScrollable as ScrollableModal, Select, SelectItem, SelectItemText, SliderDemo as Slider, Switch, Tab, TabsContent, TabsList, TabsRoot, Tag, Toast, Tooltip, Typography, Upload, UploadError, UploadMenu, UploadProgressPreview, createImage, getCroppedImageURL, getFileExtension, getFileMimeType, getRadianAngle, index as icons, isExtensionMatchingMimeType, isImage, isValidFileDimension, isValidFileSize, isValidFileType, isVideo, mimeTypeMap, rotateSize, toast, useCroppedImage, useFileValidation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demio-ui",
3
- "version": "2.5.89",
3
+ "version": "2.5.93",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",