demio-ui 2.5.88 → 2.5.92
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 +2 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/types/src/components/ModalScrollable/ModalScrollable.d.ts +29 -0
- package/dist/cjs/types/src/components/ModalScrollable/index.d.ts +1 -0
- package/dist/cjs/types/src/components/Upload/Upload.d.ts +0 -24
- package/dist/cjs/types/src/components/index.d.ts +2 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/types/src/components/ModalScrollable/ModalScrollable.d.ts +29 -0
- package/dist/esm/types/src/components/ModalScrollable/index.d.ts +1 -0
- package/dist/esm/types/src/components/Upload/Upload.d.ts +0 -24
- package/dist/esm/types/src/components/index.d.ts +2 -1
- package/dist/types.d.ts +24 -43
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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
|
-
|
|
286
|
-
|
|
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
|
|
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 {
|
|
@@ -2159,9 +2144,8 @@ function _extends$9() { return _extends$9 = Object.assign ? Object.assign.bind()
|
|
|
2159
2144
|
var SvgVideocam = function SvgVideocam(props) {
|
|
2160
2145
|
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
2161
2146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
fill: "none"
|
|
2147
|
+
fill: "none",
|
|
2148
|
+
viewBox: "0 0 24 24"
|
|
2165
2149
|
}, props), /*#__PURE__*/React.createElement("mask", {
|
|
2166
2150
|
id: "videocam_svg__a",
|
|
2167
2151
|
width: 24,
|
|
@@ -2188,9 +2172,8 @@ function _extends$8() { return _extends$8 = Object.assign ? Object.assign.bind()
|
|
|
2188
2172
|
var SvgVideocamOff = function SvgVideocamOff(props) {
|
|
2189
2173
|
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
2190
2174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
fill: "none"
|
|
2175
|
+
fill: "none",
|
|
2176
|
+
viewBox: "0 0 24 24"
|
|
2194
2177
|
}, props), /*#__PURE__*/React.createElement("mask", {
|
|
2195
2178
|
id: "videocam_off_svg__a",
|
|
2196
2179
|
width: 24,
|
|
@@ -2217,9 +2200,8 @@ function _extends$7() { return _extends$7 = Object.assign ? Object.assign.bind()
|
|
|
2217
2200
|
var SvgVideocamOff1 = function SvgVideocamOff1(props) {
|
|
2218
2201
|
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
2219
2202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
fill: "none"
|
|
2203
|
+
fill: "none",
|
|
2204
|
+
viewBox: "0 0 24 24"
|
|
2223
2205
|
}, props), /*#__PURE__*/React.createElement("mask", {
|
|
2224
2206
|
id: "videocam_off-1_svg__a",
|
|
2225
2207
|
width: 24,
|
|
@@ -2246,9 +2228,8 @@ function _extends$6() { return _extends$6 = Object.assign ? Object.assign.bind()
|
|
|
2246
2228
|
var SvgVideocam1 = function SvgVideocam1(props) {
|
|
2247
2229
|
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
2248
2230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
fill: "none"
|
|
2231
|
+
fill: "none",
|
|
2232
|
+
viewBox: "0 0 24 24"
|
|
2252
2233
|
}, props), /*#__PURE__*/React.createElement("mask", {
|
|
2253
2234
|
id: "videocam-1_svg__a",
|
|
2254
2235
|
width: 24,
|
|
@@ -2489,4 +2470,4 @@ declare class ToastManager {
|
|
|
2489
2470
|
}
|
|
2490
2471
|
declare const toast: ToastManager;
|
|
2491
2472
|
|
|
2492
|
-
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,
|
|
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 };
|