@croquiscom/pds 0.45.1 → 0.45.3
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 +23 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +7 -2
- package/dist/components/bottom-sheet/BottomSheet.stories.d.ts +1 -1
- package/dist/components/context/FloatingTree.d.ts +2 -0
- package/dist/components/context/index.d.ts +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +1 -6
- package/dist/components/date-picker/DatePicker.stories.d.ts +1 -1
- package/dist/components/date-picker/DateRangePicker.d.ts +1 -1
- package/dist/components/date-picker/DateRangePicker.stories.d.ts +1 -1
- package/dist/components/date-picker/DayPickerOverlay.d.ts +1 -3
- package/dist/components/date-picker/styles.d.ts +5 -1
- package/dist/components/dropdown/styles.d.ts +7 -0
- package/dist/components/file-upload/FileUpload.d.ts +7 -3
- package/dist/components/file-upload/FileUpload.stories.d.ts +2 -1
- package/dist/components/file-upload/FileUploadButton.d.ts +1 -1
- package/dist/components/modal/AlertModal.d.ts +2 -2
- package/dist/components/modal/AlertModal.stories.d.ts +1 -1
- package/dist/components/modal/ConfirmModal.d.ts +7 -1
- package/dist/components/modal/Modal.d.ts +4 -4
- package/dist/components/modal/Modal.stories.d.ts +1 -1
- package/dist/components/modal/ModalOverlay.d.ts +6 -6
- package/dist/components/modal/ModalStoryArgTypes.d.ts +240 -0
- package/dist/components/modal/NoticeModal.d.ts +9 -3
- package/dist/components/modal/NoticeModal.stories.d.ts +1 -1
- package/dist/components/modal/useManualDismiss.d.ts +26 -0
- package/dist/components/popover/Popover.d.ts +5 -0
- package/dist/components/popover/Popover.stories.d.ts +1 -0
- package/dist/components/time-picker/styles.d.ts +5 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/constants/floating.d.ts +1 -0
- package/dist/index.es.js +3 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 0.45.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f338cc7: AlertModal onClose 이벤트 resolve 누락 처리 추가
|
|
8
|
+
- 5810b54: feat: FileUpload 컴포넌트 onClickUpload prop 추가, multiple 업로드시 리턴 타입 배열로 변경 #224
|
|
9
|
+
|
|
10
|
+
## 0.45.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- db1cbff: Modal Dismiss 이벤트 중첩 제어 추가, floating-ui 디펜던시 업데이트
|
|
15
|
+
|
|
16
|
+
## BreakPoint
|
|
17
|
+
|
|
18
|
+
Notice Modal Event 방식이 다음과 같이 변경되었습니다.
|
|
19
|
+
|
|
20
|
+
- onClose 이벤트가 제거되었습니다.
|
|
21
|
+
- onCancel 이벤트가 추가되었습니다.
|
|
22
|
+
- 닫기 버튼 클릭시
|
|
23
|
+
- overlay 클릭시
|
|
24
|
+
- esc keyboard 이벤트 발생시
|
|
25
|
+
|
|
3
26
|
## 0.45.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -14,10 +14,15 @@ export interface BottomSheetProps {
|
|
|
14
14
|
subTitle?: ReactNode;
|
|
15
15
|
content?: ReactNode | BottomSheetContentWithCloseAction;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* outside 영역 클릭시 닫힘 사용 여부
|
|
18
18
|
* @default true
|
|
19
19
|
*/
|
|
20
20
|
canClickOutside?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* escapeKey 키이벤트 닫힘 사용 여부
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
canCloseEscapeKey?: boolean;
|
|
21
26
|
/**
|
|
22
27
|
* 드래그 닫힘 사용 여부
|
|
23
28
|
* @default true
|
|
@@ -25,5 +30,5 @@ export interface BottomSheetProps {
|
|
|
25
30
|
canDragClose?: boolean;
|
|
26
31
|
onClose?: () => void;
|
|
27
32
|
}
|
|
28
|
-
export declare const BottomSheet: ({ className, zIndex, opened: openProp, canClickOutside, canDragClose, title, subTitle, content, onClose, }: BottomSheetProps) => JSX.Element;
|
|
33
|
+
export declare const BottomSheet: ({ className, zIndex, opened: openProp, canClickOutside, canCloseEscapeKey, canDragClose, title, subTitle, content, onClose, }: BottomSheetProps) => JSX.Element;
|
|
29
34
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { BottomSheet } from './BottomSheet';
|
|
4
|
-
declare const _default: ComponentMeta<({ className, zIndex, opened: openProp, canClickOutside, canDragClose, title, subTitle, content, onClose, }: import("./BottomSheet").BottomSheetProps) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ className, zIndex, opened: openProp, canClickOutside, canCloseEscapeKey, canDragClose, title, subTitle, content, onClose, }: import("./BottomSheet").BottomSheetProps) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const MaxHeight: ComponentStory<typeof BottomSheet>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FloatingTree';
|
|
@@ -24,11 +24,6 @@ export interface DatePickerBaseProps {
|
|
|
24
24
|
opened?: boolean;
|
|
25
25
|
onOpen?: () => void;
|
|
26
26
|
onClose?: () => void;
|
|
27
|
-
/**
|
|
28
|
-
* Overlay 영역 클릭시 닫힘 사용 여부
|
|
29
|
-
* @default true
|
|
30
|
-
*/
|
|
31
|
-
canClickOutside?: boolean;
|
|
32
27
|
/**
|
|
33
28
|
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
34
29
|
* @default 1035
|
|
@@ -70,4 +65,4 @@ export interface DatePickerProps extends DatePickerBaseProps {
|
|
|
70
65
|
showFooter?: boolean;
|
|
71
66
|
onChange?: (value: Date | null) => void;
|
|
72
67
|
}
|
|
73
|
-
export declare const DatePicker: ({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays,
|
|
68
|
+
export declare const DatePicker: ({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, showRemoveButton, showTodayButton, showTimePicker, showFooter, zIndex, onChange, opened: openProp, onOpen, onClose, }: DatePickerProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays,
|
|
3
|
+
declare const _default: ComponentMeta<({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, showRemoveButton, showTodayButton, showTimePicker, showFooter, zIndex, onChange, opened: openProp, onOpen, onClose, }: import("./DatePicker").DatePickerProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Disabled: any;
|
|
@@ -36,4 +36,4 @@ export interface DateRangePickerProps extends DatePickerBaseProps {
|
|
|
36
36
|
numberOfMonths?: number;
|
|
37
37
|
onChange?: (start: Dates['from'], end: Dates['to']) => void;
|
|
38
38
|
}
|
|
39
|
-
export declare const DateRangePicker: ({ width, error, disabled, className, showDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths,
|
|
39
|
+
export declare const DateRangePicker: ({ width, error, disabled, className, showDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths, showRemoveButton, opened: openProp, customDatePreset, onOpen, onClose, onChange, }: DateRangePickerProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<({ width, error, disabled, className, showDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths,
|
|
3
|
+
declare const _default: ComponentMeta<({ width, error, disabled, className, showDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths, showRemoveButton, opened: openProp, customDatePreset, onOpen, onClose, onChange, }: import("./DateRangePicker").DateRangePickerProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Disabled: any;
|
|
@@ -7,8 +7,6 @@ export interface DayPickerOverlayProps {
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
className?: string;
|
|
9
9
|
content?: ReactNode | ContentWithCloseAction;
|
|
10
|
-
/** @default true */
|
|
11
|
-
canClickOutside?: boolean;
|
|
12
10
|
/** @default 1035 */
|
|
13
11
|
zIndex?: number;
|
|
14
12
|
opened?: boolean;
|
|
@@ -18,5 +16,5 @@ export interface DayPickerOverlayProps {
|
|
|
18
16
|
onCloseOutsidePress?: () => void;
|
|
19
17
|
setOpened: Dispatch<SetStateAction<boolean>>;
|
|
20
18
|
}
|
|
21
|
-
export declare const DayPickerOverlay: ({ children, className, content,
|
|
19
|
+
export declare const DayPickerOverlay: ({ children, className, content, zIndex, opened: openProp, disabled, onClose, onOpen, onCloseOutsidePress, setOpened, }: DayPickerOverlayProps) => JSX.Element;
|
|
22
20
|
export {};
|
|
@@ -6,7 +6,11 @@ export declare const range_input_default_style: {
|
|
|
6
6
|
backgroundColor: string;
|
|
7
7
|
padding: number;
|
|
8
8
|
transition: string;
|
|
9
|
-
'&:hover
|
|
9
|
+
'&:hover': {
|
|
10
10
|
borderColor: string;
|
|
11
11
|
};
|
|
12
|
+
'&:focus, &:focus-within': {
|
|
13
|
+
outline: string;
|
|
14
|
+
border: string;
|
|
15
|
+
};
|
|
12
16
|
};
|
|
@@ -18,3 +18,10 @@ export declare const dropdown_item_selected_style: {
|
|
|
18
18
|
export declare const dropdown_item_focused_style: {
|
|
19
19
|
backgroundColor: string;
|
|
20
20
|
};
|
|
21
|
+
export declare const dropdown_item_group_focus_style: {
|
|
22
|
+
outline: string;
|
|
23
|
+
zIndex: number;
|
|
24
|
+
'&:focus': {
|
|
25
|
+
outline: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -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 |
|
|
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 |
|
|
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<
|
|
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
|
-
*
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from '../button';
|
|
3
3
|
import { CSSValueWithLength, SpaceProps } from '../../styles';
|
|
4
4
|
import { ModalOverlayBaseProps, ModalBaseCancelReason } from './ModalOverlay';
|
|
@@ -18,10 +18,10 @@ export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
|
|
|
18
18
|
* [ButtonProps](https://storybook.kakaostyle.in/master/pds/?path=/docs/component-button--primary)를 confirmButton에 적용할 수 있습니다.
|
|
19
19
|
*/
|
|
20
20
|
confirmButtonProps?: ModalButtonProps;
|
|
21
|
+
cancelText?: string;
|
|
21
22
|
/**
|
|
22
23
|
* [ButtonProps](https://storybook.kakaostyle.in/master/pds/?path=/docs/component-button--primary)를 cancelButton에 적용할 수 있습니다.
|
|
23
24
|
*/
|
|
24
|
-
cancelText?: string;
|
|
25
25
|
cancelButtonProps?: ModalButtonProps;
|
|
26
26
|
/**
|
|
27
27
|
* 헤더 영역 타이틀 좌측 backButton 사용 유무
|
|
@@ -60,14 +60,14 @@ export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
|
|
|
60
60
|
* reason을 포함한 cancel 이벤트를 전달합니다.
|
|
61
61
|
* - 'cancelClick' | 'escapeKeyPress' | 'overlayClick'
|
|
62
62
|
*/
|
|
63
|
-
onCancel?: (reason:
|
|
63
|
+
onCancel?: (reason: ModalCancelReason) => void;
|
|
64
64
|
/**
|
|
65
65
|
* Modal Header backButton 클릭 이벤트
|
|
66
66
|
*/
|
|
67
67
|
onClickBackButton?: () => void;
|
|
68
68
|
}
|
|
69
69
|
export declare const MIN_WIDTH = 480;
|
|
70
|
-
export declare const Modal:
|
|
70
|
+
export declare const Modal: React.ComponentType<React.PropsWithChildren<ModalProps>>;
|
|
71
71
|
export declare const ModalContent: import("@emotion/styled").StyledComponent<{
|
|
72
72
|
theme?: import("@emotion/react").Theme;
|
|
73
73
|
as?: React.ElementType<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { Modal } from './Modal';
|
|
4
|
-
declare const _default: ComponentMeta<
|
|
4
|
+
declare const _default: ComponentMeta<React.ComponentType<React.PropsWithChildren<import("./Modal").ModalProps>>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const Dense: any;
|
|
@@ -24,12 +24,12 @@ export interface ModalOverlayBaseProps {
|
|
|
24
24
|
*/
|
|
25
25
|
zIndex?: number;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* outside 영역 클릭시 닫힘 사용 여부
|
|
28
28
|
* @default true
|
|
29
29
|
*/
|
|
30
30
|
canClickOutside?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
* escapeKey
|
|
32
|
+
* escapeKey 키이벤트 닫힘 사용 여부
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
canCloseEscapeKey?: boolean;
|
|
@@ -55,11 +55,11 @@ export interface ModalOverlayProps extends ModalOverlayBaseProps {
|
|
|
55
55
|
*/
|
|
56
56
|
borderRadiusSize?: CornerRadiusSize;
|
|
57
57
|
setOpened?: Dispatch<SetStateAction<boolean>>;
|
|
58
|
-
onCancelEventCallback?: (event: ModalCloseEventCallback) => void;
|
|
58
|
+
onCancelEventCallback?: (event: ModalCloseEventCallback, floatingContainerId?: string) => void;
|
|
59
59
|
/**
|
|
60
|
-
* @desc esc, overlay 클릭으로 인한 모달 닫힘 상태
|
|
60
|
+
* @desc esc, overlay 클릭으로 인한 모달 닫힘 상태 외부 제어 여부
|
|
61
61
|
* @default false
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
controlledOpen?: boolean;
|
|
64
64
|
}
|
|
65
|
-
export declare const ModalOverlay: ({ floatingPortalId, width, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, canCloseEscapeKey,
|
|
65
|
+
export declare const ModalOverlay: ({ floatingPortalId, width, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, canCloseEscapeKey, controlledOpen, onExited, onClose, onCancelEventCallback, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
export declare const ModalStoryArgTypes: {
|
|
2
|
+
title: {
|
|
3
|
+
table: {
|
|
4
|
+
type: {
|
|
5
|
+
summary: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
confirmText: {
|
|
10
|
+
table: {
|
|
11
|
+
type: {
|
|
12
|
+
summary: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
cancelText: {
|
|
17
|
+
table: {
|
|
18
|
+
type: {
|
|
19
|
+
summary: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
backButton: {
|
|
24
|
+
description: string;
|
|
25
|
+
table: {
|
|
26
|
+
type: {
|
|
27
|
+
summary: string;
|
|
28
|
+
};
|
|
29
|
+
defaultValue: {
|
|
30
|
+
summary: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
confirmButtonProps: {
|
|
38
|
+
description: string;
|
|
39
|
+
table: {
|
|
40
|
+
type: {
|
|
41
|
+
summary: string;
|
|
42
|
+
detail: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
cancelButtonProps: {
|
|
47
|
+
description: string;
|
|
48
|
+
table: {
|
|
49
|
+
type: {
|
|
50
|
+
summary: string;
|
|
51
|
+
detail: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
closeButton: {
|
|
56
|
+
table: {
|
|
57
|
+
type: {
|
|
58
|
+
summary: string;
|
|
59
|
+
};
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
control: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
dense: {
|
|
69
|
+
description: string;
|
|
70
|
+
table: {
|
|
71
|
+
type: {
|
|
72
|
+
summary: string;
|
|
73
|
+
};
|
|
74
|
+
defaultValue: {
|
|
75
|
+
summary: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
control: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
contentProps: {
|
|
83
|
+
description: string;
|
|
84
|
+
table: {
|
|
85
|
+
type: {
|
|
86
|
+
summary: string;
|
|
87
|
+
detail: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
control: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
footer: {
|
|
95
|
+
description: string;
|
|
96
|
+
control: {
|
|
97
|
+
type: string;
|
|
98
|
+
};
|
|
99
|
+
table: {
|
|
100
|
+
type: {
|
|
101
|
+
summary: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
fullScreen: {
|
|
106
|
+
description: string;
|
|
107
|
+
table: {
|
|
108
|
+
type: {
|
|
109
|
+
summary: string;
|
|
110
|
+
};
|
|
111
|
+
defaultValue: {
|
|
112
|
+
summary: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
control: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
onConfirm: {
|
|
120
|
+
table: {
|
|
121
|
+
type: {
|
|
122
|
+
summary: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
onCancel: {
|
|
127
|
+
description: string;
|
|
128
|
+
table: {
|
|
129
|
+
type: {
|
|
130
|
+
summary: string;
|
|
131
|
+
detail: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
onClickBackButton: {
|
|
136
|
+
description: string;
|
|
137
|
+
table: {
|
|
138
|
+
type: {
|
|
139
|
+
summary: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
className: {
|
|
144
|
+
table: {
|
|
145
|
+
type: {
|
|
146
|
+
summary: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
control: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
fill: {
|
|
154
|
+
description: string;
|
|
155
|
+
table: {
|
|
156
|
+
type: {
|
|
157
|
+
summary: string;
|
|
158
|
+
};
|
|
159
|
+
defaultValue: {
|
|
160
|
+
summary: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
control: {
|
|
164
|
+
type: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
zIndex: {
|
|
168
|
+
table: {
|
|
169
|
+
type: {
|
|
170
|
+
summary: string;
|
|
171
|
+
};
|
|
172
|
+
defaultValue: {
|
|
173
|
+
summary: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
control: {
|
|
177
|
+
type: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
opened: {
|
|
181
|
+
table: {
|
|
182
|
+
type: {
|
|
183
|
+
summary: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
control: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
canClickOutside: {
|
|
191
|
+
description: string;
|
|
192
|
+
table: {
|
|
193
|
+
type: {
|
|
194
|
+
summary: string;
|
|
195
|
+
};
|
|
196
|
+
defaultValue: {
|
|
197
|
+
summary: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
control: {
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
canCloseEscapeKey: {
|
|
205
|
+
description: string;
|
|
206
|
+
table: {
|
|
207
|
+
type: {
|
|
208
|
+
summary: string;
|
|
209
|
+
};
|
|
210
|
+
defaultValue: {
|
|
211
|
+
summary: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
control: {
|
|
215
|
+
type: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
width: {
|
|
219
|
+
description: string;
|
|
220
|
+
table: {
|
|
221
|
+
type: {
|
|
222
|
+
summary: string;
|
|
223
|
+
};
|
|
224
|
+
defaultValue: {
|
|
225
|
+
summary: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
control: {
|
|
229
|
+
type: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
onExited: {
|
|
233
|
+
description: string;
|
|
234
|
+
table: {
|
|
235
|
+
type: {
|
|
236
|
+
summary: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ModalCancelReason } from './Modal';
|
|
2
3
|
import { ModalOverlayBaseProps } from './ModalOverlay';
|
|
3
4
|
import { CSSValueWithLength } from '../../styles';
|
|
4
|
-
export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill' | 'width'> {
|
|
5
|
+
export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill' | 'width' | 'onClose'> {
|
|
5
6
|
/**
|
|
6
7
|
* 헤더 영역 상단 라벨 노출 요소
|
|
7
8
|
*/
|
|
@@ -23,9 +24,14 @@ export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill' | '
|
|
|
23
24
|
* @default '오늘 하루동안 이 창을 열지 않음'
|
|
24
25
|
*/
|
|
25
26
|
checkReplayText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* reason을 포함한 cancel 이벤트를 전달합니다.
|
|
29
|
+
* - 'cancelClick' | 'escapeKeyPress' | 'overlayClick'
|
|
30
|
+
*/
|
|
31
|
+
onCancel?: (reason: ModalCancelReason) => void;
|
|
26
32
|
/**
|
|
27
33
|
* 푸터 영역 좌측 체크박스 change 이벤트를 전달합니다.
|
|
28
34
|
*/
|
|
29
35
|
onChangeCheckReplay?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
30
36
|
}
|
|
31
|
-
export declare const NoticeModal:
|
|
37
|
+
export declare const NoticeModal: React.ComponentType<React.PropsWithChildren<NoticeModalProps>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<
|
|
3
|
+
declare const _default: ComponentMeta<React.ComponentType<React.PropsWithChildren<import("./NoticeModal").NoticeModalProps>>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FloatingTreeType, FloatingContext } from '@floating-ui/react';
|
|
2
|
+
export interface DismissPayload {
|
|
3
|
+
type: 'outsidePress' | 'referencePress' | 'escapeKey' | 'mouseLeave';
|
|
4
|
+
data: {
|
|
5
|
+
returnFocus: boolean | {
|
|
6
|
+
preventScroll: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface UseManualDismissProps {
|
|
11
|
+
controlled?: boolean;
|
|
12
|
+
rootId: string;
|
|
13
|
+
tree: FloatingTreeType;
|
|
14
|
+
context: FloatingContext;
|
|
15
|
+
dismissEventType?: Array<Partial<DismissPayload['type']>>;
|
|
16
|
+
callbackTypeWithFn?: (type: DismissPayload['type']) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @desc Modal dismiss event share
|
|
20
|
+
* - [Dismiss](https://floating-ui.com/docs/useDismiss)실행시 context 이벤트를 구독하여 중첩 요소간 이벤트 순차 핸들링을 지원합니다.
|
|
21
|
+
* - 제어 조건
|
|
22
|
+
* - FloatingTreeContext를 통해 생성된 요소로 useFloatingNodeId를 통한 context 주입이 되어야합니다.
|
|
23
|
+
* - 노드 구조가 자식 요소로써 중첩 호출된 케이스인 경우 자동으로 순차 호출된 dismiss 이벤트를 전달합니다.(https://github.com/floating-ui/floating-ui/pull/2114)
|
|
24
|
+
* - 노드 구조가 형제 요소로써 중첩 호출된 케이스인 경우 현재 활성된 요소부터 dismiss 이벤트를 전달합니다.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useManualDismiss({ controlled, rootId, tree, context, dismissEventType, callbackTypeWithFn, }: UseManualDismissProps): void;
|
|
@@ -39,6 +39,11 @@ export interface PopoverProps {
|
|
|
39
39
|
placement?: Placement;
|
|
40
40
|
/** @default hover */
|
|
41
41
|
openerTriggerEvent?: OpenerTriggerEvent;
|
|
42
|
+
/**
|
|
43
|
+
* outside 영역 클릭시 닫힘 사용 여부
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
canClickOutside?: boolean;
|
|
42
47
|
}
|
|
43
48
|
export declare const Popover: React.FC<PopoverProps>;
|
|
44
49
|
export {};
|
|
@@ -6,6 +6,7 @@ export default _default;
|
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const HoverIcon: () => JSX.Element;
|
|
8
8
|
export declare const Placement: ComponentStory<typeof Popover>;
|
|
9
|
+
export declare const Trigger: () => JSX.Element;
|
|
9
10
|
export declare const TemplateWithCloseButton: {
|
|
10
11
|
(): JSX.Element;
|
|
11
12
|
parameters: {
|