@sunggang/ui-lib 0.3.23 → 0.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.3.23",
3
+ "version": "0.3.25",
4
4
  "dependencies": {
5
5
  "@emotion/react": "^11.14.0",
6
6
  "@emotion/styled": "^11.14.0",
package/src/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import './style.css';
2
2
  export * from './lib/uiLibrary';
3
3
  export * from './lib/Spin';
4
- export { DropImage } from './lib/DropImage/CSRDropImage';
4
+ export * from './lib/DropImage';
5
5
  export * from './lib/Dropdown';
6
6
  export * from './lib/UploadImage/CustomUpload';
7
7
  export * from './components/ui/switch';
@@ -6,7 +6,6 @@ interface ImageItem {
6
6
  }
7
7
  interface CustomDragDropImagesProps {
8
8
  imageUrls: ImageItem[];
9
- onDragEnd: () => void;
10
9
  handleRemove: (item: ImageItem) => void;
11
10
  }
12
11
  export declare const CustomDragDropImages: React.FC<CustomDragDropImagesProps>;
@@ -6,8 +6,8 @@ interface ImageItem {
6
6
  }
7
7
  interface PrimaryDragDropImagesProps {
8
8
  imageUrls: ImageItem[];
9
- onDragEnd: () => void;
10
9
  handleRemove: (item: ImageItem) => void;
10
+ isDropDisabled?: boolean;
11
11
  }
12
12
  export declare const PrimaryDragDropImage: React.FC<PrimaryDragDropImagesProps>;
13
13
  export {};
@@ -6,7 +6,6 @@ interface ImageItem {
6
6
  }
7
7
  interface DragDropImagesProps {
8
8
  imageUrls: ImageItem[];
9
- onDragEnd: () => void;
10
9
  handleRemove: (item: ImageItem) => void;
11
10
  }
12
11
  export declare const DragDropImages: React.FC<DragDropImagesProps>;
@@ -7,6 +7,7 @@ export interface ImageItem {
7
7
  }
8
8
  export interface DropImageProps {
9
9
  preview: boolean;
10
+ limitSize?: number;
10
11
  imageUrls?: ImageItem[] | undefined;
11
12
  setImageUrls?: any;
12
13
  setFiles: React.Dispatch<React.SetStateAction<File[]>>;
@@ -1,8 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  interface BaseTemplateProps {
3
3
  file?: File | null;
4
- item?: any;
5
4
  imageUrl?: string | null;
5
+ item?: any;
6
+ field?: any;
6
7
  }
7
8
  declare const BaseTemplate: FC<BaseTemplateProps>;
8
9
  export default BaseTemplate;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
+ import { FormItem } from '../types';
2
3
  interface CustomUploadProps {
3
- item: any;
4
+ item: FormItem;
4
5
  field: any;
5
6
  }
6
7
  export declare const CustomUpload: React.FC<CustomUploadProps>;
@@ -18,4 +18,26 @@ export declare const config: (getValues: any) => (FormItem[] | {
18
18
  name: string;
19
19
  value: number;
20
20
  }[];
21
- }[])[];
21
+ }[] | ({
22
+ type: string;
23
+ name: string;
24
+ label: string;
25
+ imageStyleType: string;
26
+ noticeLabel: string;
27
+ errorText: string;
28
+ validateOption: {
29
+ required: boolean;
30
+ };
31
+ limitSize: number;
32
+ disabled?: undefined;
33
+ } | {
34
+ type: string;
35
+ name: string;
36
+ label: string;
37
+ disabled: boolean;
38
+ imageStyleType?: undefined;
39
+ noticeLabel?: undefined;
40
+ errorText?: undefined;
41
+ validateOption?: undefined;
42
+ limitSize?: undefined;
43
+ })[])[];
@@ -40,6 +40,7 @@ export interface FormItem {
40
40
  id?: string;
41
41
  placeholder?: string;
42
42
  className?: string;
43
+ selectContentClassName?: string;
43
44
  labelClass?: string;
44
45
  errorText?: string;
45
46
  validateOption?: {
@@ -80,6 +81,8 @@ export interface FormItem {
80
81
  height?: string;
81
82
  bgColor?: string;
82
83
  disabled?: boolean;
84
+ limitSize?: number;
85
+ imageStyleType?: string;
83
86
  }
84
87
  export interface FormType {
85
88
  item: FormItem;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useForm, useFormContext, Controller } from 'react-hook-form';
2
+ import { useForm, useFormContext, Controller, useController, useFieldArray, useFormState, useWatch } from 'react-hook-form';
3
3
  export type FormProviderProps = {
4
4
  children: React.ReactNode;
5
5
  onSubmit: (data: any) => void;
@@ -8,5 +8,5 @@ export type FormProviderProps = {
8
8
  useFormContext?: any;
9
9
  };
10
10
  export declare const FormProvider: ({ children, onSubmit, onError, defaultValues, }: FormProviderProps) => import("react/jsx-runtime").JSX.Element;
11
- export { useFormContext, useForm, Controller };
11
+ export { useFormContext, useForm, Controller, useController, useFieldArray, useFormState, useWatch, };
12
12
  export default FormProvider;