@smart-factor/gem-ui-components 0.0.104 → 0.0.106

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.
@@ -1,8 +1,10 @@
1
1
  export interface DropzoneProps {
2
- onChange: (file: File[] | undefined) => void;
3
- file?: File;
2
+ onChange: (value: File[] | File | undefined) => void;
3
+ value?: File | File[];
4
4
  isImage?: boolean;
5
5
  errorMessage?: string;
6
6
  accept?: Record<string, string[]>;
7
+ multiple?: boolean;
8
+ fileListMaxHeight?: string | number;
7
9
  }
8
- export declare const Dropzone: ({ onChange, file, isImage, errorMessage, accept, }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Dropzone: ({ onChange, value, isImage, multiple, errorMessage, accept, fileListMaxHeight, }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof Dropzone>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
+ export declare const Multiple: Story;
7
8
  export declare const Error: Story;
8
9
  export declare const FileUploaded: Story;
10
+ export declare const ScrollableFileList: Story;
@@ -14,3 +14,8 @@ export declare const StyledDropzoneWrapper: import('@emotion/styled').StyledComp
14
14
  isUploaded: boolean;
15
15
  isError: boolean;
16
16
  }, {}, {}>;
17
+ export declare const ScrollableFileListContainer: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
18
+ ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
19
+ }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
20
+ maxHeight?: string | number;
21
+ }, {}, {}>;
@@ -5,8 +5,10 @@ interface DropFieldProps<T extends FieldValues> {
5
5
  label?: string;
6
6
  isImage?: boolean;
7
7
  errorMessage?: string;
8
- onChange?: (file: File | null) => void;
8
+ onChange?: (value: File | File[] | null) => void;
9
9
  accept?: Record<string, string[]>;
10
+ multiple?: boolean;
11
+ fileListMaxHeight?: string | number;
10
12
  }
11
- export declare const DropzoneField: <T extends FieldValues>({ name, label, control, isImage, onChange: propsOnChange, ...rest }: DropFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const DropzoneField: <T extends FieldValues>({ name, label, control, isImage, onChange: propsOnChange, multiple, ...rest }: DropFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
12
14
  export {};
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as d, jsxs as I, Fragment as gt } from "react/jsx-runtime";
2
2
  import { P as l, R as _n, U as Nn, V as kn, W as Rn, p as zn, X as Bn, D as te, T as Me, Y as Yn, Z as Fn, $ as Vn, e as bt, g as yt, f as Ae, w as Oe, j as Ee, s as re, l as Le, n as ie, c as Un, z as Gn, B as X, N as Pe, a0 as Hn, a1 as qn, a2 as Yt, a3 as Ft, G as we, a4 as ar, a5 as Wn, L as Zn, i as be, I as Fe, E as Fr, h as vt, F as ce, a6 as Jn, S as Vt, a7 as Ge, _ as Kn } from "./Stack-CdVfRhco.js";
3
- import { l as Xn, r as Qn, L as eo, m as to, n as Ke, S as ro, o as no, p as oo, q as so, t as ao, v as xt, w as io, x as co, B as Be, k as lo, d as ir, y as uo, C as He, E as ye, H as Vr, J as Ur, M as fo, N as ee, O as ve, P as po, Q as $e, R as Ut, V as dt, W as Gr, X as De, Y as ut, Z as L, z as Hr, a as ho, u as mo, G as go, _ as bo, K as yo, $ as vo, a0 as ne, a1 as qr, a2 as Gt, j as Wr, a3 as je, a4 as To, a5 as So, a6 as Co, a7 as xo, F as wo, a8 as Tt, a9 as Mo, aa as Oo, ab as Po, ac as Zr, ad as $o, ae as Jr, af as Kr, ag as Ao, ah as Eo, ai as Lo, aj as Xr, ak as Do, al as jo, am as Io, an as _o, ao as No, ap as ko, aq as Ro, ar as zo, as as Bo, at as Yo, au as Fo, av as Vo, i as Uo, aw as Go, ax as Qr, ay as en, az as tn, aA as Ho, aB as qo } from "./theme-DESyNdGx.js";
4
- import { aE as Hu, A as qu, D as Wu, aF as Zu, h as Ju, aG as Ku, I as Xu, aC as Qu, T as ef, U as tf, e as rf, g as nf, aD as of, aH as sf } from "./theme-DESyNdGx.js";
3
+ import { l as Xn, r as Qn, L as eo, m as to, n as Ke, S as ro, o as no, p as oo, q as so, t as ao, v as xt, w as io, x as co, B as Be, k as lo, d as ir, y as uo, C as He, E as ye, H as Vr, J as Ur, M as fo, N as ee, O as ve, P as po, Q as $e, R as Ut, V as dt, W as Gr, X as De, Y as ut, Z as L, z as Hr, a as ho, u as mo, G as go, _ as bo, K as yo, $ as vo, a0 as ne, a1 as qr, a2 as Gt, j as Wr, a3 as je, a4 as To, a5 as So, a6 as Co, a7 as xo, F as wo, a8 as Tt, a9 as Mo, aa as Oo, ab as Po, ac as Zr, ad as $o, ae as Jr, af as Kr, ag as Ao, ah as Eo, ai as Lo, aj as Xr, ak as Do, al as jo, am as Io, an as _o, ao as No, ap as ko, aq as Ro, ar as zo, as as Bo, at as Yo, au as Fo, av as Vo, i as Uo, aw as Go, ax as Qr, ay as en, az as tn, aA as Ho, aB as qo } from "./theme-Bn1sHCu0.js";
4
+ import { aE as Hu, A as qu, D as Wu, aF as Zu, h as Ju, aG as Ku, I as Xu, aC as Qu, T as ef, U as tf, e as rf, g as nf, aD as of, aH as sf } from "./theme-Bn1sHCu0.js";
5
5
  import * as M from "react";
6
6
  import { useState as Y, useCallback as le, useEffect as Te, useLayoutEffect as Ve, useMemo as ae, useRef as Wo } from "react";
7
7
  import { e as rn, P as nn, i as Zo } from "./Drawer-Q3D0v6B2.js";