@croquiscom/pds 0.45.0 → 0.45.2
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/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 +21 -1
- package/dist/components/popover/Popover.stories.d.ts +11 -1
- 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.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- db1cbff: Modal Dismiss 이벤트 중첩 제어 추가, floating-ui 디펜던시 업데이트
|
|
8
|
+
|
|
9
|
+
## BreakPoint
|
|
10
|
+
|
|
11
|
+
Notice Modal Event 방식이 다음과 같이 변경되었습니다.
|
|
12
|
+
|
|
13
|
+
- onClose 이벤트가 제거되었습니다.
|
|
14
|
+
- onCancel 이벤트가 추가되었습니다.
|
|
15
|
+
- 닫기 버튼 클릭시
|
|
16
|
+
- overlay 클릭시
|
|
17
|
+
- esc keyboard 이벤트 발생시
|
|
18
|
+
|
|
19
|
+
## 0.45.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- aec1e60: fix: FileUpload fileList prop이 undefined인 경우 대응
|
|
24
|
+
- fc9c93c: Popover 컴포넌트 title, description, closeButton 내부 제공 추가, trigger click 이벤트 stopPropagation 추가
|
|
25
|
+
|
|
3
26
|
## 0.45.0
|
|
4
27
|
|
|
5
28
|
### Minor 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 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;
|
|
@@ -9,7 +9,22 @@ type PopoverWithCloseAction = (action: {
|
|
|
9
9
|
export interface PopoverProps {
|
|
10
10
|
className?: string;
|
|
11
11
|
children: ReactNode;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Popover 내부에 렌더될 자유 콘텐츠 요소
|
|
14
|
+
* - HelpText 컴포넌트 규격 또는 자유롭게 콘텐츠를 구성할 경우 사용합니다.
|
|
15
|
+
* - PopoverContent
|
|
16
|
+
* - [HelpText](https://storybook.kakaostyle.in/master/pds/?path=/story/component-text-helptext--base) 또는 ReactNode 타입을 가집니다.
|
|
17
|
+
* - PopoverWithCloseAction
|
|
18
|
+
* - PopoverContent function 타입으로 가집니다.
|
|
19
|
+
*/
|
|
20
|
+
content?: PopoverContent | PopoverWithCloseAction;
|
|
21
|
+
title?: string;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* 닫힘버튼 사용 유무
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
closeButton?: boolean;
|
|
13
28
|
/**
|
|
14
29
|
* main app node 바깥영역으로 생성할지 여부
|
|
15
30
|
* @default false
|
|
@@ -24,6 +39,11 @@ export interface PopoverProps {
|
|
|
24
39
|
placement?: Placement;
|
|
25
40
|
/** @default hover */
|
|
26
41
|
openerTriggerEvent?: OpenerTriggerEvent;
|
|
42
|
+
/**
|
|
43
|
+
* outside 영역 클릭시 닫힘 사용 여부
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
canClickOutside?: boolean;
|
|
27
47
|
}
|
|
28
48
|
export declare const Popover: React.FC<PopoverProps>;
|
|
29
49
|
export {};
|
|
@@ -6,5 +6,15 @@ 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
|
|
9
|
+
export declare const Trigger: () => JSX.Element;
|
|
10
|
+
export declare const TemplateWithCloseButton: {
|
|
11
|
+
(): JSX.Element;
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
story: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
10
20
|
export declare const HidingFullyClippedReferenceElements: () => JSX.Element;
|
|
@@ -5,7 +5,11 @@ export declare const range_input_default_style: {
|
|
|
5
5
|
backgroundColor: string;
|
|
6
6
|
padding: number;
|
|
7
7
|
transition: string;
|
|
8
|
-
'&:hover
|
|
8
|
+
'&:hover': {
|
|
9
9
|
borderColor: string;
|
|
10
10
|
};
|
|
11
|
+
'&:focus, &:focus-within': {
|
|
12
|
+
outline: string;
|
|
13
|
+
border: string;
|
|
14
|
+
};
|
|
11
15
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const FLOATING_ROOT_ID = "pds-floating-root";
|
|
2
2
|
export declare const FLOATING_ALERT_ROOT_ID = "pds-alert-root";
|
|
3
3
|
export declare const FLOATING_CONFIRM_ROOT_ID = "pds-confirm-root";
|
|
4
|
+
export declare const FLOATING_ORDER: Array<'reference' | 'floating' | 'content'>;
|