cashdoc-cms-design-system 1.0.5 → 1.0.6
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/components/FileUpload/FileUpload.d.ts +58 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +60 -0
- package/dist/components/ImageUpload/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/icons/index.d.ts +40 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.es.js +4535 -4056
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +27 -27
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/icons/ChevronRightIcon.d.ts +0 -14
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Accept } from 'react-dropzone';
|
|
2
|
+
|
|
3
|
+
export interface FileUploadProps {
|
|
4
|
+
value?: File[];
|
|
5
|
+
onChange?: (files: File[]) => void;
|
|
6
|
+
maxFiles?: number;
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
accept?: Accept;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
onError?: (error: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 드래그 앤 드롭 및 클릭을 통해 파일을 업로드할 수 있는 컴포넌트입니다.
|
|
15
|
+
*
|
|
16
|
+
* {@link FileUpload}는 사용자가 다양한 형식의 파일을 선택하고 업로드할 수 있게 합니다.
|
|
17
|
+
* 드래그 앤 드롭, 클릭하여 선택, 파일 목록 표시 등의 기능을 제공합니다.
|
|
18
|
+
*
|
|
19
|
+
* ## When (언제 사용해야 하는가)
|
|
20
|
+
*
|
|
21
|
+
* **사용해야 하는 경우:**
|
|
22
|
+
* - **문서 첨부**: PDF, Word, Excel 등의 문서 파일을 업로드할 때
|
|
23
|
+
* - **다양한 파일 형식**: 이미지뿐만 아니라 여러 종류의 파일을 업로드할 때
|
|
24
|
+
* - **파일 목록 관리**: 업로드된 파일의 이름과 크기를 확인해야 할 때
|
|
25
|
+
*
|
|
26
|
+
* **사용하지 말아야 하는 경우:**
|
|
27
|
+
* - **이미지 전용**: 이미지만 업로드하고 미리보기가 필요한 경우는 {@link ImageUpload} 사용
|
|
28
|
+
*
|
|
29
|
+
* ## Example
|
|
30
|
+
*
|
|
31
|
+
* {@tool snippet}
|
|
32
|
+
* 기본 파일 업로드:
|
|
33
|
+
*
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <FileUpload
|
|
36
|
+
* onChange={(files) => console.log(files)}
|
|
37
|
+
* maxFiles={1}
|
|
38
|
+
* maxSize={10 * 1024 * 1024} // 10MB
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
* {@end-tool}
|
|
42
|
+
*
|
|
43
|
+
* {@tool snippet}
|
|
44
|
+
* 다중 파일 업로드 (PDF만):
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <FileUpload
|
|
48
|
+
* onChange={(files) => console.log(files)}
|
|
49
|
+
* maxFiles={5}
|
|
50
|
+
* accept={{ "application/pdf": [".pdf"] }}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
* {@end-tool}
|
|
54
|
+
*/
|
|
55
|
+
export declare const FileUpload: {
|
|
56
|
+
({ value, onChange, maxFiles, maxSize, accept, disabled, className, onError, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Accept } from 'react-dropzone';
|
|
2
|
+
|
|
3
|
+
export interface ImageUploadProps {
|
|
4
|
+
value?: File[];
|
|
5
|
+
onChange?: (files: File[]) => void;
|
|
6
|
+
maxFiles?: number;
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
accept?: Accept;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
showPreview?: boolean;
|
|
12
|
+
onError?: (error: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 드래그 앤 드롭 및 클릭을 통해 이미지를 업로드할 수 있는 컴포넌트입니다.
|
|
16
|
+
*
|
|
17
|
+
* {@link ImageUpload}는 사용자가 이미지 파일을 선택하고 업로드할 수 있게 합니다.
|
|
18
|
+
* 드래그 앤 드롭, 클릭하여 선택, 미리보기 등의 기능을 제공합니다.
|
|
19
|
+
*
|
|
20
|
+
* ## When (언제 사용해야 하는가)
|
|
21
|
+
*
|
|
22
|
+
* **사용해야 하는 경우:**
|
|
23
|
+
* - **프로필 이미지 업로드**: 사용자 프로필 사진 등록 시
|
|
24
|
+
* - **상품 이미지 등록**: 여러 상품 이미지를 한 번에 업로드해야 할 때
|
|
25
|
+
* - **문서 첨부**: 이미지 형태의 문서나 스크린샷을 첨부할 때
|
|
26
|
+
*
|
|
27
|
+
* **사용하지 말아야 하는 경우:**
|
|
28
|
+
* - **일반 파일 업로드**: 이미지가 아닌 다양한 형식의 파일을 업로드할 때는 일반 FileUpload 컴포넌트 사용
|
|
29
|
+
* - **대용량 파일**: 매우 큰 파일의 경우 진행률 표시가 있는 별도 업로드 컴포넌트 고려
|
|
30
|
+
*
|
|
31
|
+
* ## Example
|
|
32
|
+
*
|
|
33
|
+
* {@tool snippet}
|
|
34
|
+
* 기본 이미지 업로드:
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <ImageUpload
|
|
38
|
+
* onChange={(files) => console.log(files)}
|
|
39
|
+
* maxFiles={1}
|
|
40
|
+
* maxSize={5 * 1024 * 1024} // 5MB
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
* {@end-tool}
|
|
44
|
+
*
|
|
45
|
+
* {@tool snippet}
|
|
46
|
+
* 다중 이미지 업로드:
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <ImageUpload
|
|
50
|
+
* onChange={(files) => console.log(files)}
|
|
51
|
+
* maxFiles={5}
|
|
52
|
+
* showPreview={true}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
* {@end-tool}
|
|
56
|
+
*/
|
|
57
|
+
export declare const ImageUpload: {
|
|
58
|
+
({ value, onChange, maxFiles, maxSize, accept, disabled, className, showPreview, onError, }: ImageUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
@@ -75,7 +75,7 @@ import * as RadioGroupPrimitives from "@radix-ui/react-radio-group";
|
|
|
75
75
|
*/
|
|
76
76
|
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitives.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
77
77
|
declare const radioGroupItemVariants: (props?: ({
|
|
78
|
-
variant?: "default" | "
|
|
78
|
+
variant?: "default" | "green" | "black" | "blue" | "red" | null | undefined;
|
|
79
79
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
80
80
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
81
81
|
export interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitives.Item>, VariantProps<typeof radioGroupItemVariants> {
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
|
|
4
4
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
5
|
declare const switchVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "
|
|
6
|
+
variant?: "default" | "green" | "black" | "blue" | "red" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, VariantProps<typeof switchVariants> {
|
|
9
9
|
}
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as React, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
size?: number;
|
|
5
|
+
strokeWidth?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const ChevronDownIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
8
|
+
export declare const ChevronUpIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export declare const ChevronLeftIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
10
|
+
export declare const ChevronRightIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
11
|
+
export declare const ChevronsLeftIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
12
|
+
export declare const ChevronsRightIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
13
|
+
export declare const ArrowLeftIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
14
|
+
export declare const ArrowRightIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
export declare const MenuIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
export declare const AlignIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
export declare const XIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
18
|
+
export declare const CheckIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
19
|
+
export declare const CheckCircleIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
20
|
+
export declare const InfoIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
21
|
+
export declare const ErrorIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
export declare const WarningIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
23
|
+
export declare const HelpIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
24
|
+
export declare const CloseIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
25
|
+
export declare const PlusIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
26
|
+
export declare const PlusCircleIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
27
|
+
export declare const TrashIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
28
|
+
export declare const SaveIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
29
|
+
export declare const SettingsIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
30
|
+
export declare const RefreshIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
31
|
+
export declare const LinkIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
32
|
+
export declare const PinIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
33
|
+
export declare const FileIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
34
|
+
export declare const FileTextIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
35
|
+
export declare const ExcelIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
36
|
+
export declare const FileUploadIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
37
|
+
export declare const ImageUploadIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
38
|
+
export declare const CalendarIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
39
|
+
export declare const MedicashIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
40
|
+
export declare const NewBadgeIcon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|