@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.
@@ -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,8 @@
1
+ import type { FC } from 'react';
2
+ export interface DropzoneFileTagProps {
3
+ file: File;
4
+ onRemove: () => void;
5
+ stacked?: boolean;
6
+ }
7
+ declare const DropzoneFileTag: FC<DropzoneFileTagProps>;
8
+ export default DropzoneFileTag;
@@ -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,3 @@
1
+ export { default as Dropzone } from './Dropzone';
2
+ export type { DropzoneProps } from './Dropzone';
3
+ export type { DropzoneDisplay, DropzoneUploadStatus } from './dropzone.types';
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default as FileUpload } from './FileUpload';
2
+ export type { FileUploadProps } from './FileUpload';
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';