@foris/avocado-suite 1.10.0 → 1.10.1
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/avocado-suite.es.js +11566 -10165
- package/dist/avocado-suite.umd.js +152 -148
- package/dist/components/dropzone/Dropzone.d.ts +22 -0
- package/dist/components/dropzone/Dropzone.test.d.ts +0 -0
- package/dist/components/dropzone/DropzoneFileTag.d.ts +8 -0
- package/dist/components/dropzone/DropzoneZoneBody.d.ts +14 -0
- package/dist/components/dropzone/dropzone.types.d.ts +9 -0
- package/dist/components/dropzone/index.d.ts +3 -0
- package/dist/components/file-upload/FileUpload.d.ts +33 -0
- package/dist/components/file-upload/FileUpload.test.d.ts +0 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/index.d.ts +5 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type Accept } from 'react-dropzone';
|
|
3
|
+
import type { DropzoneDisplay, DropzoneUploadStatus } from './dropzone.types';
|
|
4
|
+
export type { DropzoneDisplay, DropzoneUploadStatus } from './dropzone.types';
|
|
5
|
+
export interface DropzoneProps {
|
|
6
|
+
selectLabel: string;
|
|
7
|
+
dropHint: string;
|
|
8
|
+
activeLabel: string;
|
|
9
|
+
uploadingLabel: string;
|
|
10
|
+
uploadErrorLabel: string;
|
|
11
|
+
buttonLabel: string;
|
|
12
|
+
file: File | null;
|
|
13
|
+
uploadStatus?: DropzoneUploadStatus;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
accept?: Accept;
|
|
16
|
+
display?: DropzoneDisplay;
|
|
17
|
+
onFileChange: (file: File | null) => void;
|
|
18
|
+
onRemove?: () => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const Dropzone: FC<DropzoneProps>;
|
|
22
|
+
export default Dropzone;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC, MouseEvent } from 'react';
|
|
2
|
+
import type { DropzoneLabels, DropzoneUploadStatus } from './dropzone.types';
|
|
3
|
+
export interface DropzoneZoneBodyProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
uploadStatus: DropzoneUploadStatus;
|
|
6
|
+
isDragActive: boolean;
|
|
7
|
+
file: File | null;
|
|
8
|
+
showUploadedChip: boolean;
|
|
9
|
+
labels: DropzoneLabels;
|
|
10
|
+
onOpenPicker: (event?: MouseEvent<HTMLElement>) => void;
|
|
11
|
+
onRemove: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const DropzoneZoneBody: FC<DropzoneZoneBodyProps>;
|
|
14
|
+
export default DropzoneZoneBody;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DropzoneUploadStatus = 'idle' | 'uploading' | 'error';
|
|
2
|
+
export type DropzoneDisplay = 'zone' | 'button';
|
|
3
|
+
export interface DropzoneLabels {
|
|
4
|
+
selectLabel: string;
|
|
5
|
+
dropHint: string;
|
|
6
|
+
activeLabel: string;
|
|
7
|
+
uploadingLabel: string;
|
|
8
|
+
uploadErrorLabel: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { Accept } from 'react-dropzone';
|
|
3
|
+
import { type CardNotificationProps } from '../card-notification/CardNotification';
|
|
4
|
+
import { type DropzoneUploadStatus } from '../dropzone/Dropzone';
|
|
5
|
+
export interface FileUploadProps {
|
|
6
|
+
title: string;
|
|
7
|
+
rulesTitle: string;
|
|
8
|
+
rules: string[];
|
|
9
|
+
helpTitle: string;
|
|
10
|
+
helpDescription: string;
|
|
11
|
+
templateLinkLabel: string;
|
|
12
|
+
templateHref?: string;
|
|
13
|
+
onTemplateLinkClick?: () => void;
|
|
14
|
+
selectLabel: string;
|
|
15
|
+
dropHint: string;
|
|
16
|
+
activeLabel: string;
|
|
17
|
+
uploadingLabel: string;
|
|
18
|
+
uploadErrorLabel: string;
|
|
19
|
+
buttonLabel: string;
|
|
20
|
+
file: File | null;
|
|
21
|
+
uploadStatus?: DropzoneUploadStatus;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
accept?: Accept;
|
|
24
|
+
onFileChange: (file: File | null) => void;
|
|
25
|
+
onRemove?: () => void;
|
|
26
|
+
notificationVisible?: boolean;
|
|
27
|
+
notificationTitle?: string;
|
|
28
|
+
notificationDescription?: string;
|
|
29
|
+
notificationState?: CardNotificationProps['state'];
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
declare const FileUpload: FC<FileUploadProps>;
|
|
33
|
+
export default FileUpload;
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import DataCard from './components/data-card/DataCard';
|
|
|
16
16
|
import DataTable from './components/DataTable/DataTable';
|
|
17
17
|
import DatePicker from './components/date-picker/DatePicker';
|
|
18
18
|
import Divider from './components/divider/Divider';
|
|
19
|
+
import Dropzone from './components/dropzone/Dropzone';
|
|
20
|
+
import FileUpload from './components/file-upload/FileUpload';
|
|
19
21
|
import Donut from './components/donut/Donut';
|
|
20
22
|
import DonutLabels from './components/donut/donut-labels/DonutLabels';
|
|
21
23
|
import DonutLegend from './components/donut/donut-legend/DonutLegend';
|
|
@@ -64,7 +66,7 @@ import { toast } from 'react-toastify';
|
|
|
64
66
|
* Hooks
|
|
65
67
|
*/
|
|
66
68
|
export { useFloatingPortal } from './hooks/useFloatingPortal';
|
|
67
|
-
export { Banner, Beacon, Header, HeaderNavigation, Hotspot, NavList, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
|
|
69
|
+
export { Banner, Beacon, Header, HeaderNavigation, Hotspot, NavList, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Dropzone, FileUpload, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
|
|
68
70
|
/**
|
|
69
71
|
* Types
|
|
70
72
|
*/
|
|
@@ -76,6 +78,8 @@ export type { CardAccordionProps } from './components/card-accordion/CardAccordi
|
|
|
76
78
|
export type { CardNotificationProps } from './components/card-notification/CardNotification';
|
|
77
79
|
export type { DataCardProps, DataCardV1Props, DataCardV1Variant, DataCardV2Props, DataCardV2HeaderStyle, DataCardV2Status, DataCardPaletteIndex, HeaderStatusColor, } from './components/data-card/DataCard';
|
|
78
80
|
export type { DividerProps } from './components/divider/Divider';
|
|
81
|
+
export type { DropzoneDisplay, DropzoneProps, DropzoneUploadStatus, } from './components/dropzone/Dropzone';
|
|
82
|
+
export type { FileUploadProps } from './components/file-upload/FileUpload';
|
|
79
83
|
export type { HeadingProps } from './components/heading/Heading';
|
|
80
84
|
export type { HeaderNavigationProps, HeaderNavigationVisual, } from './components/header-navigation';
|
|
81
85
|
export type { LinkProps } from './components/link/Link';
|