demio-ui 2.5.78 → 2.5.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/types/src/components/CopyLinkInput/CopyLinkInput.d.ts +4 -0
- package/dist/cjs/types/src/components/CopyLinkInput/index.d.ts +1 -0
- package/dist/cjs/types/src/components/Crop/Crop.utils.d.ts +11 -0
- package/dist/cjs/types/src/components/DnDArea/DnDArea.utils.d.ts +3 -0
- package/dist/cjs/types/src/components/Input/Input.d.ts +3 -2
- package/dist/cjs/types/src/components/Pagination/Pagination.utils.d.ts +7 -0
- package/dist/cjs/types/src/components/index.d.ts +1 -0
- package/dist/cjs/types/src/hooks/useCroppedImage.d.ts +4 -0
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/types/src/components/CopyLinkInput/CopyLinkInput.d.ts +4 -0
- package/dist/esm/types/src/components/CopyLinkInput/index.d.ts +1 -0
- package/dist/esm/types/src/components/Crop/Crop.utils.d.ts +11 -0
- package/dist/esm/types/src/components/DnDArea/DnDArea.utils.d.ts +3 -0
- package/dist/esm/types/src/components/Input/Input.d.ts +3 -2
- package/dist/esm/types/src/components/Pagination/Pagination.utils.d.ts +7 -0
- package/dist/esm/types/src/components/index.d.ts +1 -0
- package/dist/esm/types/src/hooks/useCroppedImage.d.ts +4 -0
- package/dist/types.d.ts +55 -52
- package/package.json +1 -1
- package/dist/cjs/types/src/components/UploadPreview/UploadPreview.d.ts +0 -12
- package/dist/cjs/types/src/components/UploadPreview/index.d.ts +0 -1
- package/dist/esm/types/src/components/UploadPreview/UploadPreview.d.ts +0 -12
- package/dist/esm/types/src/components/UploadPreview/index.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CopyLinkInput';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Area } from 'react-easy-crop';
|
|
2
|
+
export declare const createImage: (url: string) => Promise<HTMLImageElement>;
|
|
3
|
+
export declare const getRadianAngle: (degreeValue?: number) => number;
|
|
4
|
+
export declare const rotateSize: (width: number, height: number, rotation: number) => {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const getCroppedImageURL: (imageSrc: string, pixelCrop: Area, rotation?: number, flip?: {
|
|
9
|
+
horizontal: boolean;
|
|
10
|
+
vertical: boolean;
|
|
11
|
+
}) => Promise<string | null>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const isValidFileType: (file?: File | null, acceptableTypePattern?: string) => boolean;
|
|
2
|
+
export declare const isValidFileSize: (file?: File | null, fileSizeMbLimit?: number) => boolean;
|
|
3
|
+
export declare const isValidFileDimension: (file?: File | null, minWidth?: number, minHeight?: number) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type
|
|
2
|
+
export type InputProps = {
|
|
3
3
|
autoComplete?: 'off' | 'on';
|
|
4
4
|
className?: string;
|
|
5
5
|
counterVisibilityLimit?: number;
|
|
@@ -25,6 +25,7 @@ type Props = {
|
|
|
25
25
|
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
26
26
|
value?: string;
|
|
27
27
|
autoFocus?: boolean;
|
|
28
|
+
readOnly?: boolean;
|
|
28
29
|
};
|
|
29
|
-
declare const Input: React.ForwardRefExoticComponent<
|
|
30
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
31
|
export default Input;
|
|
@@ -5,6 +5,7 @@ export { default as Button } from './Button';
|
|
|
5
5
|
export { default as ButtonNew } from './ButtonNew';
|
|
6
6
|
export { default as Card } from './Card';
|
|
7
7
|
export { default as Checkbox } from './Checkbox';
|
|
8
|
+
export { default as CopyLinkInput } from './CopyLinkInput';
|
|
8
9
|
export { default as Crop } from './Crop';
|
|
9
10
|
export { default as DnDArea } from './DnDArea';
|
|
10
11
|
export { default as Drawer } from './Drawer';
|
package/dist/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
|
7
7
|
export { Content as PopoverContent, Portal as PopoverPortal, Root as PopoverRoot, Trigger as PopoverTrigger } from '@radix-ui/react-popover';
|
|
8
8
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
9
9
|
|
|
10
|
-
type Props$
|
|
10
|
+
type Props$k = {
|
|
11
11
|
className?: string;
|
|
12
12
|
open: boolean;
|
|
13
13
|
actionText?: string;
|
|
@@ -24,11 +24,11 @@ type Props$l = {
|
|
|
24
24
|
isCloseButtonVisible?: boolean;
|
|
25
25
|
onOpenChange?: (open: boolean) => void;
|
|
26
26
|
};
|
|
27
|
-
declare function Alert({ className, open, actionText, onActionClick, cancelText, onCancelClick, title, description, showLoader, isOkDisabled, actionButtonType, maxWidth, onClose, isCloseButtonVisible, ...props }: Props$
|
|
27
|
+
declare function Alert({ className, open, actionText, onActionClick, cancelText, onCancelClick, title, description, showLoader, isOkDisabled, actionButtonType, maxWidth, onClose, isCloseButtonVisible, ...props }: Props$k): React__default.JSX.Element;
|
|
28
28
|
|
|
29
29
|
declare const AVATAR_SIZES: readonly [16, 24, 32, 40, 48, 64, 80, 96, 128];
|
|
30
30
|
type AvatarSizeType = (typeof AVATAR_SIZES)[number];
|
|
31
|
-
interface Props$
|
|
31
|
+
interface Props$j {
|
|
32
32
|
src?: string;
|
|
33
33
|
size?: AvatarSizeType;
|
|
34
34
|
userName?: string;
|
|
@@ -36,18 +36,18 @@ interface Props$k {
|
|
|
36
36
|
className?: string;
|
|
37
37
|
fallbackDelay?: number;
|
|
38
38
|
}
|
|
39
|
-
declare const Avatar: FC<Props$
|
|
39
|
+
declare const Avatar: FC<Props$j>;
|
|
40
40
|
|
|
41
|
-
type Props$
|
|
41
|
+
type Props$i = {
|
|
42
42
|
className?: string;
|
|
43
43
|
icon?: ReactNode;
|
|
44
44
|
variant?: 'outlined' | 'contained';
|
|
45
45
|
color?: 'green' | 'orange' | 'gray' | 'purple' | 'blue';
|
|
46
46
|
children: ReactNode;
|
|
47
47
|
};
|
|
48
|
-
declare const Badge: FC<Props$
|
|
48
|
+
declare const Badge: FC<Props$i>;
|
|
49
49
|
|
|
50
|
-
type Props$
|
|
50
|
+
type Props$h = {
|
|
51
51
|
disabled?: boolean;
|
|
52
52
|
children?: ReactNode;
|
|
53
53
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -64,10 +64,10 @@ type Props$i = {
|
|
|
64
64
|
/**
|
|
65
65
|
* Button component documentation.
|
|
66
66
|
**/
|
|
67
|
-
declare const Button$1: React__default.ForwardRefExoticComponent<Props$
|
|
67
|
+
declare const Button$1: React__default.ForwardRefExoticComponent<Props$h & React__default.RefAttributes<HTMLButtonElement>>;
|
|
68
68
|
|
|
69
69
|
type ColorVariants = 'red' | 'green' | 'dark';
|
|
70
|
-
type Props$
|
|
70
|
+
type Props$g<Variant extends string = 'primary' | 'secondary' | 'tertiary' | 'quarter'> = {
|
|
71
71
|
disabled?: boolean;
|
|
72
72
|
children?: ReactNode;
|
|
73
73
|
variant?: Variant;
|
|
@@ -80,9 +80,9 @@ type Props$h<Variant extends string = 'primary' | 'secondary' | 'tertiary' | 'qu
|
|
|
80
80
|
fullWidth?: boolean;
|
|
81
81
|
showLoader?: boolean;
|
|
82
82
|
};
|
|
83
|
-
declare const Button: React__default.ForwardRefExoticComponent<Props$
|
|
83
|
+
declare const Button: React__default.ForwardRefExoticComponent<Props$g<"primary" | "secondary" | "tertiary" | "quarter"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
84
84
|
|
|
85
|
-
type Props$
|
|
85
|
+
type Props$f = {
|
|
86
86
|
children?: ReactNode;
|
|
87
87
|
className?: string;
|
|
88
88
|
isEmptyStateAvailable?: boolean;
|
|
@@ -91,9 +91,9 @@ type Props$g = {
|
|
|
91
91
|
emptyStateText?: ReactNode;
|
|
92
92
|
shadowElevation?: number;
|
|
93
93
|
};
|
|
94
|
-
declare const Card: FC<Props$
|
|
94
|
+
declare const Card: FC<Props$f>;
|
|
95
95
|
|
|
96
|
-
type Props$
|
|
96
|
+
type Props$e = {
|
|
97
97
|
checked?: boolean;
|
|
98
98
|
children?: React__default.ReactNode;
|
|
99
99
|
defaultChecked?: boolean;
|
|
@@ -103,7 +103,39 @@ type Props$f = {
|
|
|
103
103
|
onCheckedChange?: (checked: CheckedState) => void;
|
|
104
104
|
value?: string;
|
|
105
105
|
};
|
|
106
|
-
declare const Checkbox: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$
|
|
106
|
+
declare const Checkbox: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$e & React__default.RefAttributes<HTMLDivElement>>>;
|
|
107
|
+
|
|
108
|
+
type InputProps = {
|
|
109
|
+
autoComplete?: 'off' | 'on';
|
|
110
|
+
className?: string;
|
|
111
|
+
counterVisibilityLimit?: number;
|
|
112
|
+
defaultValue?: string;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
endAdornment?: React__default.ReactNode;
|
|
115
|
+
endAdornmentClassName?: string;
|
|
116
|
+
errorMessage?: string;
|
|
117
|
+
hint?: string;
|
|
118
|
+
id: string;
|
|
119
|
+
inputWrapperClass?: string;
|
|
120
|
+
isLabelStatic?: boolean;
|
|
121
|
+
label?: string;
|
|
122
|
+
maxLength?: number;
|
|
123
|
+
name?: string;
|
|
124
|
+
onChange?: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
125
|
+
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
126
|
+
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
127
|
+
optionalText?: string;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
required?: boolean;
|
|
130
|
+
startAdornment?: React__default.ReactNode;
|
|
131
|
+
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
132
|
+
value?: string;
|
|
133
|
+
autoFocus?: boolean;
|
|
134
|
+
readOnly?: boolean;
|
|
135
|
+
};
|
|
136
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
137
|
+
|
|
138
|
+
declare const CopyLinkInput: React__default.FC<InputProps>;
|
|
107
139
|
|
|
108
140
|
interface CropProps {
|
|
109
141
|
aspect?: number;
|
|
@@ -140,7 +172,7 @@ interface DnDAreaProps {
|
|
|
140
172
|
}
|
|
141
173
|
declare const DnDArea: FC<DnDAreaProps>;
|
|
142
174
|
|
|
143
|
-
type Props$
|
|
175
|
+
type Props$d = {
|
|
144
176
|
children?: ReactNode;
|
|
145
177
|
isOpen?: boolean;
|
|
146
178
|
className?: string;
|
|
@@ -150,7 +182,7 @@ type Props$e = {
|
|
|
150
182
|
align?: 'left' | 'right';
|
|
151
183
|
isClosable?: boolean;
|
|
152
184
|
};
|
|
153
|
-
declare const Drawer: FC<Props$
|
|
185
|
+
declare const Drawer: FC<Props$d>;
|
|
154
186
|
|
|
155
187
|
declare const DropdownMenuContent: React__default.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuContentProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
156
188
|
declare const DropdownMenuSeparator: React__default.ForwardRefExoticComponent<{
|
|
@@ -162,7 +194,7 @@ declare const DropdownMenuLabel: React__default.ForwardRefExoticComponent<Dropdo
|
|
|
162
194
|
declare const DropdownMenuItem: React__default.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
163
195
|
declare const DropdownMenuGroup: React__default.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
164
196
|
|
|
165
|
-
type Props$
|
|
197
|
+
type Props$c = {
|
|
166
198
|
children: ReactNode;
|
|
167
199
|
className?: string;
|
|
168
200
|
onSelect?: ReactEventHandler<HTMLDivElement>;
|
|
@@ -170,18 +202,18 @@ type Props$d = {
|
|
|
170
202
|
isLabel?: boolean;
|
|
171
203
|
disabled?: boolean;
|
|
172
204
|
};
|
|
173
|
-
declare const DropdownItem: FC<Props$
|
|
205
|
+
declare const DropdownItem: FC<Props$c>;
|
|
174
206
|
|
|
175
|
-
type Props$
|
|
207
|
+
type Props$b = {
|
|
176
208
|
children: React__default.ReactNode;
|
|
177
209
|
position?: 'horizontal' | 'vertical';
|
|
178
210
|
justify?: 'between' | 'start' | 'center';
|
|
179
211
|
alignItems?: 'start' | 'stretch' | 'center';
|
|
180
212
|
className?: string;
|
|
181
213
|
};
|
|
182
|
-
declare function FormGroup({ children, position, justify, alignItems, className, }: Props$
|
|
214
|
+
declare function FormGroup({ children, position, justify, alignItems, className, }: Props$b): React__default.JSX.Element;
|
|
183
215
|
|
|
184
|
-
type Props$
|
|
216
|
+
type Props$a = {
|
|
185
217
|
children?: ReactNode;
|
|
186
218
|
className?: string;
|
|
187
219
|
icon?: ReactNode;
|
|
@@ -189,36 +221,7 @@ type Props$b = {
|
|
|
189
221
|
text?: ReactNode;
|
|
190
222
|
title?: ReactNode;
|
|
191
223
|
};
|
|
192
|
-
declare const InfoBanner: FC<Props$
|
|
193
|
-
|
|
194
|
-
type Props$a = {
|
|
195
|
-
autoComplete?: 'off' | 'on';
|
|
196
|
-
className?: string;
|
|
197
|
-
counterVisibilityLimit?: number;
|
|
198
|
-
defaultValue?: string;
|
|
199
|
-
disabled?: boolean;
|
|
200
|
-
endAdornment?: React__default.ReactNode;
|
|
201
|
-
endAdornmentClassName?: string;
|
|
202
|
-
errorMessage?: string;
|
|
203
|
-
hint?: string;
|
|
204
|
-
id: string;
|
|
205
|
-
inputWrapperClass?: string;
|
|
206
|
-
isLabelStatic?: boolean;
|
|
207
|
-
label?: string;
|
|
208
|
-
maxLength?: number;
|
|
209
|
-
name?: string;
|
|
210
|
-
onChange?: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
211
|
-
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
212
|
-
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
213
|
-
optionalText?: string;
|
|
214
|
-
placeholder?: string;
|
|
215
|
-
required?: boolean;
|
|
216
|
-
startAdornment?: React__default.ReactNode;
|
|
217
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
218
|
-
value?: string;
|
|
219
|
-
autoFocus?: boolean;
|
|
220
|
-
};
|
|
221
|
-
declare const Input: React__default.ForwardRefExoticComponent<Props$a & React__default.RefAttributes<HTMLInputElement>>;
|
|
224
|
+
declare const InfoBanner: FC<Props$a>;
|
|
222
225
|
|
|
223
226
|
type Props$9 = {
|
|
224
227
|
children: React__default.ReactNode;
|
|
@@ -2440,4 +2443,4 @@ declare class ToastManager {
|
|
|
2440
2443
|
}
|
|
2441
2444
|
declare const toast: ToastManager;
|
|
2442
2445
|
|
|
2443
|
-
export { Alert, Avatar, Badge, Button$1 as Button, Button as ButtonNew, Card, Checkbox, 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 };
|
|
2446
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { UploadMenuItem } from '../UploadMenu/UploadMenu';
|
|
3
|
-
export interface UploadPreviewProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
fileName?: string;
|
|
6
|
-
fileInfo?: string;
|
|
7
|
-
imageSrc?: string;
|
|
8
|
-
imageTitle?: string;
|
|
9
|
-
menu?: UploadMenuItem[];
|
|
10
|
-
}
|
|
11
|
-
declare const UploadPreview: FC<UploadPreviewProps>;
|
|
12
|
-
export default UploadPreview;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './UploadPreview';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { UploadMenuItem } from '../UploadMenu/UploadMenu';
|
|
3
|
-
export interface UploadPreviewProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
fileName?: string;
|
|
6
|
-
fileInfo?: string;
|
|
7
|
-
imageSrc?: string;
|
|
8
|
-
imageTitle?: string;
|
|
9
|
-
menu?: UploadMenuItem[];
|
|
10
|
-
}
|
|
11
|
-
declare const UploadPreview: FC<UploadPreviewProps>;
|
|
12
|
-
export default UploadPreview;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './UploadPreview';
|