@croquiscom/pds 0.45.2 → 0.45.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.45.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 0f9b8dc: Controlled Modal(Basic/Notice) dismiss 제어 핸들러 의존성 버그 수정
8
+
9
+ ## 0.45.3
10
+
11
+ ### Patch Changes
12
+
13
+ - f338cc7: AlertModal onClose 이벤트 resolve 누락 처리 추가
14
+ - 5810b54: feat: FileUpload 컴포넌트 onClickUpload prop 추가, multiple 업로드시 리턴 타입 배열로 변경 #224
15
+
3
16
  ## 0.45.2
4
17
 
5
18
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  export type UploadFileStatus = 'error' | 'success' | 'done' | 'uploading';
3
3
  export type FileType = File & {
4
4
  [key: string]: any;
@@ -36,7 +36,11 @@ export interface FileUploadProps {
36
36
  * FileList를 노출하려면 지정된 UploadFile 타입으로 전달해야합니다.
37
37
  */
38
38
  fileList?: UploadFile[];
39
- onChange?: (file: File | FileList) => void;
39
+ onChange?: (file: File | File[]) => void;
40
+ /**
41
+ * 파일 업로드 버튼 클릭시 실행되는 이벤트
42
+ */
43
+ onClick?: React.MouseEventHandler<HTMLInputElement>;
40
44
  /**
41
45
  * FileList 클릭시 인덱스 정보와 함께 전달합니다.
42
46
  */
@@ -50,4 +54,4 @@ export interface FileUploadProps {
50
54
  */
51
55
  onClickFileRemove?: (file: UploadFile, index: number) => void;
52
56
  }
53
- export declare const FileUpload: ({ className, accept, label, disabled, multiple, maxCount, showRemoveButton, fileList, onChange, onClickFile, onLimitMaxCount, onClickFileRemove, }: FileUploadProps) => JSX.Element;
57
+ export declare const FileUpload: ({ className, accept, label, disabled, multiple, maxCount, showRemoveButton, fileList, onChange, onClick, onClickFile, onLimitMaxCount, onClickFileRemove, }: FileUploadProps) => JSX.Element;
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  import { FileUpload } from './FileUpload';
4
- declare const _default: ComponentMeta<({ className, accept, label, disabled, multiple, maxCount, showRemoveButton, fileList, onChange, onClickFile, onLimitMaxCount, onClickFileRemove, }: import("./FileUpload").FileUploadProps) => JSX.Element>;
4
+ declare const _default: ComponentMeta<({ className, accept, label, disabled, multiple, maxCount, showRemoveButton, fileList, onChange, onClick, onClickFile, onLimitMaxCount, onClickFileRemove, }: import("./FileUpload").FileUploadProps) => JSX.Element>;
5
5
  export default _default;
6
6
  export declare const Base: any;
7
7
  export declare const MaxCount: any;
8
8
  export declare const DisabledHideRemoveButton: any;
9
9
  export declare const OnlyJpgFileExtension: any;
10
+ export declare const ClickUploadButton: any;
10
11
  export declare const FileStatus: ComponentStory<typeof FileUpload>;
11
12
  export declare const Disabled: ComponentStory<typeof FileUpload>;
12
13
  export declare const MultipleFileUpload: ComponentStory<typeof FileUpload>;
@@ -4,6 +4,6 @@ export interface FileUploadButtonProps extends Omit<InputHTMLAttributes<HTMLInpu
4
4
  label: ReactNode;
5
5
  /** @default false */
6
6
  multiple?: boolean;
7
- onFileUpload?: (file: File | FileList) => void;
7
+ onFileUpload?: (file: File | File[]) => void;
8
8
  }
9
9
  export declare const FileUploadButton: ({ accept, label, disabled, className, multiple, onFileUpload, ...props }: FileUploadButtonProps) => JSX.Element;
@@ -7,5 +7,5 @@ export interface AlertModalProps extends Omit<ConfirmModalProps, 'cancelText' |
7
7
  */
8
8
  kind?: NotificationKind;
9
9
  }
10
- export declare const AlertModal: ({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element;
11
- export declare const Alert: (properties: AlertModalProps) => Promise<void>;
10
+ export declare const AlertModal: ({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, onClose, onExited, ...props }: AlertModalProps) => JSX.Element;
11
+ export declare const Alert: (properties: AlertModalProps) => Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  import { AlertModal, AlertModalProps } from './AlertModal';
4
- declare const _default: ComponentMeta<({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element>;
4
+ declare const _default: ComponentMeta<({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, onClose, onExited, ...props }: AlertModalProps) => JSX.Element>;
5
5
  export default _default;
6
6
  export declare const Base: ComponentStory<typeof AlertModal>;
7
7
  export declare const Dense: ComponentStory<typeof AlertModal>;
@@ -11,10 +11,16 @@ export interface ConfirmModalProps extends Omit<ModalOverlayBaseProps, 'onClose'
11
11
  confirmText?: string;
12
12
  cancelText?: string;
13
13
  /**
14
- * onConfirm/onCancel이 호출된 직후 onClose가 호출됩니다.
14
+ * confirmButton 클릭 이벤트
15
15
  */
16
16
  onConfirm?: () => void | Promise<void>;
17
+ /**
18
+ * cancelButton 클릭 이벤트
19
+ */
17
20
  onCancel?: () => void | Promise<void>;
21
+ /**
22
+ * onConfirm/onCancel이 호출된 직후 onClose가 호출됩니다.
23
+ */
18
24
  onClose?: () => void | Promise<void>;
19
25
  }
20
26
  export declare const ConfirmModal: ({ title, width, zIndex, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: ConfirmModalProps) => JSX.Element;