@croquiscom/pds 0.42.5 → 0.44.0
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 +27 -0
- package/README.md +1 -1
- package/dist/components/badge/Badge.d.ts +5 -1
- package/dist/components/banner/NormalBanner.d.ts +5 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +6 -2
- package/dist/components/bottom-sheet/BottomSheet.stories.d.ts +4 -3
- package/dist/components/button/Button.d.ts +13 -2
- package/dist/components/button/Button.stories.d.ts +4 -2
- package/dist/components/button/IconButton.d.ts +4 -2
- package/dist/components/button/TextButton.d.ts +1 -1
- package/dist/components/button/styles.d.ts +2 -1
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +33 -3
- package/dist/components/date-picker/DatePicker.stories.d.ts +1 -2
- package/dist/components/date-picker/DateRangePicker.d.ts +15 -1
- package/dist/components/date-picker/DateRangePicker.stories.d.ts +0 -1
- package/dist/components/divider/Divider.d.ts +8 -1
- package/dist/components/dropdown/Dropdown.d.ts +11 -3
- package/dist/components/dropdown/DropdownInput.d.ts +3 -0
- package/dist/components/file-upload/FileUpload.d.ts +20 -1
- package/dist/components/form/FormField.d.ts +12 -0
- package/dist/components/form/FormField.stories.d.ts +1 -1
- package/dist/components/input/InputAffix.d.ts +2 -2
- package/dist/components/input/InputBase.d.ts +8 -5
- package/dist/components/menu/Menu.d.ts +3 -0
- package/dist/components/modal/AlertModal.d.ts +1 -1
- package/dist/components/modal/AlertModal.stories.d.ts +1 -1
- package/dist/components/modal/ConfirmModal.d.ts +8 -2
- package/dist/components/modal/ConfirmModal.stories.d.ts +1 -1
- package/dist/components/modal/Modal.d.ts +34 -16
- package/dist/components/modal/Modal.stories.d.ts +4 -2
- package/dist/components/modal/ModalOverlay.d.ts +14 -6
- package/dist/components/modal/NoticeModal.d.ts +16 -2
- package/dist/components/modal/NoticeModal.stories.d.ts +1 -1
- package/dist/components/notification/Notification.d.ts +13 -1
- package/dist/components/pagination/Pagination.d.ts +9 -3
- package/dist/components/popover/Popover.d.ts +8 -2
- package/dist/components/tabs/LineTabs.d.ts +3 -2
- package/dist/components/textarea/Textarea.d.ts +4 -1
- package/dist/components/time-picker/TimePicker.d.ts +19 -1
- package/dist/components/time-picker/TimePicker.stories.d.ts +1 -1
- package/dist/components/time-picker/TimePickerOverlay.d.ts +4 -1
- package/dist/components/time-picker/TimeRangePicker.d.ts +4 -1
- package/dist/components/time-picker/TimeRangePicker.stories.d.ts +1 -1
- package/dist/components/toast/Toast.d.ts +7 -2
- package/dist/components/tooltip/Tooltip.d.ts +17 -5
- package/dist/hooks/useResize.d.ts +1 -0
- package/dist/index.es.js +59 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +59 -3
- package/dist/index.js.map +1 -1
- package/dist/stories/AutoCodeColorState.d.ts +3 -0
- package/dist/styles/colors.d.ts +7 -0
- package/dist/styles/index.d.ts +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 0.44.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 89d8071: BasicModal CustomFooter FullScreen 모드 fixed 지원 추가
|
|
8
|
+
|
|
9
|
+
## BreakPoint
|
|
10
|
+
|
|
11
|
+
BasicModal props가 다음과 같이 변경되었습니다.
|
|
12
|
+
|
|
13
|
+
- fixedHeader, fixedFooter props가 제거되었습니다.
|
|
14
|
+
- fullScreen 속성이 true일 경우 Modal header, footer 영역이 자동 fixed 처리됩니다.
|
|
15
|
+
- footer 속성을 통해 커스텀할 경우에도 footer node 영역이 자동 fixed 처리됩니다.
|
|
16
|
+
- contentProps 속성에 maxHeight이 추가되었습니다.
|
|
17
|
+
- 콘텐츠 영역 maxHeight을 커스텀할 수 있습니다.
|
|
18
|
+
|
|
19
|
+
## 0.43.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 94ffd83: Auto Color State 유틸 스타일을 추가합니다.
|
|
24
|
+
|
|
25
|
+
## BreakPoint
|
|
26
|
+
|
|
27
|
+
- Button 컴포넌트 Negative Kind 추가되었습니다.
|
|
28
|
+
- Button 컴포넌트 default/hover/pressed/disabled 스타일 적용 방식이 getAutoColorCode으로 변경되었습니다.
|
|
29
|
+
|
|
3
30
|
## 0.42.5
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -9,7 +9,11 @@ export interface BadgeProps {
|
|
|
9
9
|
size?: BadgeSize;
|
|
10
10
|
/** @default black */
|
|
11
11
|
color?: BadgeColor;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* 라벨 우측 영역에 렌더링 될 아이콘 요소
|
|
14
|
+
* - Icon 컴포넌트 color props가 있더라도 BadgeColor에 따라 currentColor가 지정됩니다.
|
|
15
|
+
* - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 8로 고정됩니다.
|
|
16
|
+
*/
|
|
13
17
|
icon?: ReactElement<IconProps>;
|
|
14
18
|
}
|
|
15
19
|
export declare const Badge: ({ className, kind, size, color, icon, children, }: PropsWithChildren<BadgeProps>) => JSX.Element;
|
|
@@ -7,6 +7,11 @@ export interface NormalBannerProps {
|
|
|
7
7
|
* @default info
|
|
8
8
|
*/
|
|
9
9
|
kind?: NormalBannerKind;
|
|
10
|
+
/**
|
|
11
|
+
* 타이블 좌측에 렌더링 될 아이콘 요소
|
|
12
|
+
* - Icon 컴포넌트 color props가 있더라도 kind 따라 currentColor가 지정됩니다.
|
|
13
|
+
* - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 16으로 고정됩니다.
|
|
14
|
+
*/
|
|
10
15
|
iconComponent?: React.ComponentType<IconProps>;
|
|
11
16
|
title: string;
|
|
12
17
|
message?: ReactNode;
|
|
@@ -5,17 +5,21 @@ type BottomSheetContentWithCloseAction = (action: {
|
|
|
5
5
|
export interface BottomSheetProps {
|
|
6
6
|
className?: string;
|
|
7
7
|
opened?: boolean;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
10
|
+
* @default 1020
|
|
11
|
+
*/
|
|
9
12
|
zIndex?: number;
|
|
10
13
|
title?: ReactNode;
|
|
11
14
|
subTitle?: ReactNode;
|
|
12
15
|
content?: ReactNode | BottomSheetContentWithCloseAction;
|
|
13
16
|
/**
|
|
17
|
+
* 오버레이 클릭 닫힘 사용 여부
|
|
14
18
|
* @default true
|
|
15
19
|
*/
|
|
16
20
|
canClickOutside?: boolean;
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* 드래그 닫힘 사용 여부
|
|
19
23
|
* @default true
|
|
20
24
|
*/
|
|
21
25
|
canDragClose?: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { BottomSheet } from './BottomSheet';
|
|
3
4
|
declare const _default: ComponentMeta<({ className, zIndex, opened: openProp, canClickOutside, canDragClose, title, subTitle, content, onClose, }: import("./BottomSheet").BottomSheetProps) => JSX.Element>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Base: any;
|
|
6
|
-
export declare const MaxHeight:
|
|
7
|
+
export declare const MaxHeight: ComponentStory<typeof BottomSheet>;
|
|
7
8
|
export declare const DisabledCloseDimClick: any;
|
|
8
9
|
export declare const DisabledCloseDrag: any;
|
|
9
|
-
export declare const ContentWithCloseAction:
|
|
10
|
+
export declare const ContentWithCloseAction: ComponentStory<typeof BottomSheet>;
|
|
@@ -2,6 +2,9 @@ import React, { ButtonHTMLAttributes, ReactElement } from 'react';
|
|
|
2
2
|
import { ButtonSize, ButtonKind } from './types';
|
|
3
3
|
import { IconProps } from '../icons/generated';
|
|
4
4
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
5
|
+
/**
|
|
6
|
+
* 너비 100% 사용 여부
|
|
7
|
+
*/
|
|
5
8
|
fill?: boolean;
|
|
6
9
|
/** @default secondary */
|
|
7
10
|
kind?: ButtonKind;
|
|
@@ -11,9 +14,17 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
|
|
|
11
14
|
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
12
15
|
/** @default false */
|
|
13
16
|
loading?: boolean;
|
|
14
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* 버튼 좌측 영역에 렌더링 될 아이콘 요소
|
|
19
|
+
* - Icon 컴포넌트 color props가 있더라도 kind 따라 currentColor가 지정됩니다.
|
|
20
|
+
* - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 ButtonSize에 따라 고정됩니다.
|
|
21
|
+
*/
|
|
15
22
|
startIcon?: ReactElement<IconProps>;
|
|
16
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* 버튼 우측 영역에 렌더링 될 아이콘 요소
|
|
25
|
+
* - Icon 컴포넌트 color props가 있더라도 kind 따라 currentColor가 지정됩니다.
|
|
26
|
+
* - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 ButtonSize에 따라 고정됩니다.
|
|
27
|
+
*/
|
|
17
28
|
endIcon?: ReactElement<IconProps>;
|
|
18
29
|
}
|
|
19
30
|
export interface ButtonIconProps {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
4
|
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Button").ButtonProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Primary: any;
|
|
6
7
|
export declare const Secondary: any;
|
|
7
8
|
export declare const Black: any;
|
|
9
|
+
export declare const Negative: any;
|
|
8
10
|
export declare const StartIcon: any;
|
|
9
11
|
export declare const EndIcon: any;
|
|
10
12
|
export declare const Loading: any;
|
|
11
13
|
export declare const FullWidth: any;
|
|
12
|
-
export declare const Focus:
|
|
14
|
+
export declare const Focus: ComponentStory<typeof Button>;
|
|
@@ -4,12 +4,14 @@ import { ButtonProps } from './Button';
|
|
|
4
4
|
import { IconProps } from '../icons/generated';
|
|
5
5
|
export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' | 'startIcon' | 'endIcon' | 'kind'> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* shape 속성이 'circle'의 경우 적용되지 않습니다.
|
|
8
8
|
* @default outlined_secondary
|
|
9
9
|
*/
|
|
10
10
|
kind?: IconButtonKind;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 렌더링 될 아이콘 요소
|
|
13
|
+
* - Icon 컴포넌트 color props가 없다면 currentColor가 지정됩니다.
|
|
14
|
+
* - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 16으로 고정됩니다.
|
|
13
15
|
*/
|
|
14
16
|
icon?: ReactElement<IconProps>;
|
|
15
17
|
/** @default rectangle */
|
|
@@ -9,7 +9,7 @@ export interface TextButtonProps extends Omit<ButtonProps, 'loading' | 'kind'> {
|
|
|
9
9
|
/** @default medium */
|
|
10
10
|
size?: TextButtonSize;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* kind값이 link일 경우 고정 컬러(semantic_colors.content.primary)로 지정됩니다.
|
|
13
13
|
* @default semantic_colors.content.primary
|
|
14
14
|
*/
|
|
15
15
|
color?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ButtonSize, ButtonKind, ButtonShape, TextButtonKind, TextButtonSize, IconButtonKind } from './types';
|
|
2
2
|
export declare const button_base_css: import("@emotion/utils").SerializedStyles;
|
|
3
|
-
export declare const getButtonKind: (kind?: ButtonKind
|
|
3
|
+
export declare const getButtonKind: (kind?: ButtonKind) => import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const getIconButtonKind: (kind?: IconButtonKind) => import("@emotion/utils").SerializedStyles;
|
|
4
5
|
export declare const button_size_css: Record<ButtonSize, string>;
|
|
5
6
|
export declare const button_icon_size_css: Record<ButtonSize, number>;
|
|
6
7
|
export declare const text_button_icon_size_css: Record<TextButtonSize, number>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ButtonKind = 'primary' | 'secondary' | 'black';
|
|
1
|
+
export type ButtonKind = 'primary' | 'secondary' | 'black' | 'negative';
|
|
2
2
|
export type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
3
3
|
export type ButtonShape = 'rectangle' | 'circle';
|
|
4
4
|
export type IconButtonKind = 'outlined_secondary' | 'outlined_primary' | 'outlined_negative';
|
|
@@ -6,15 +6,34 @@ export declare const DATE_FORMAT = "yyyy.MM.dd";
|
|
|
6
6
|
export declare const DATE_HOUR_MINUTE_FORMAT = "yyyy.MM.dd HH:mm";
|
|
7
7
|
export declare const DATE_HOUR_MINUTE_SECOND_FORMAT = "yyyy.MM.dd HH:mm:ss";
|
|
8
8
|
export interface DatePickerBaseProps {
|
|
9
|
+
/**
|
|
10
|
+
* Input 너비를 지정할 수 있습니다.
|
|
11
|
+
* @default 100%
|
|
12
|
+
*/
|
|
9
13
|
width?: CSSValueWithLength;
|
|
10
14
|
error?: boolean;
|
|
11
15
|
disabled?: boolean;
|
|
12
16
|
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Input 우측 입력한 value를 지울 수 있는 remove 버튼 사용 유무
|
|
19
|
+
* - 입력된 value가 없다면 기본 달력 아이콘이 노출됩니다.
|
|
20
|
+
* - 입력된 value가 있다면 마우스 호버시 remove 버튼이 노출됩니다.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
13
23
|
showRemoveButton?: boolean;
|
|
14
24
|
opened?: boolean;
|
|
15
25
|
onOpen?: () => void;
|
|
16
26
|
onClose?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Overlay 영역 클릭시 닫힘 사용 여부
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
17
31
|
canClickOutside?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
34
|
+
* @default 1035
|
|
35
|
+
*/
|
|
36
|
+
zIndex?: number;
|
|
18
37
|
}
|
|
19
38
|
export interface DatePickerProps extends DatePickerBaseProps {
|
|
20
39
|
/**
|
|
@@ -22,22 +41,33 @@ export interface DatePickerProps extends DatePickerBaseProps {
|
|
|
22
41
|
*/
|
|
23
42
|
placeholder?: string;
|
|
24
43
|
value?: Date;
|
|
44
|
+
/**
|
|
45
|
+
* 선택 불가능한 날짜를 지정할 수 있습니다.
|
|
46
|
+
* [Matcher](https://github.com/gpbl/react-day-picker/blob/master/packages/react-day-picker/src/types/Matchers.ts#L52)
|
|
47
|
+
*/
|
|
25
48
|
disabledDays?: Matcher | Matcher[];
|
|
26
49
|
/**
|
|
50
|
+
* 달력 하단 '오늘' 날짜를 바로 선택할 수 있는 버튼 사용 유무
|
|
27
51
|
* @default false
|
|
28
52
|
*/
|
|
29
53
|
showTodayButton?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 타임 노출이 필요한 경우 포멧을 지정할 수 있습니다.
|
|
56
|
+
* - 'hourMinute'일 경우 yyyy.MM.dd HH:mm
|
|
57
|
+
* - 'hourMinuteSecond' 일 경우 yyyy.MM.dd HH:mm:ss
|
|
58
|
+
* - showTimePicker 속성이 true일 경우 displayTimeFormat은 hourMinute으로 적용됩니다.
|
|
59
|
+
*/
|
|
30
60
|
displayTimeFormat?: displayTimeFormat;
|
|
31
61
|
/**
|
|
62
|
+
* 달력 하단 TimePicker를 노출합니다. onChange value에 시간 정보를 포함하여 전달합니다.
|
|
32
63
|
* @default false
|
|
33
|
-
* @desc 달력 하단 TimePicker를 노출합니다. onChange value에 시간 정보를 포함하여 전달합니다.
|
|
34
64
|
*/
|
|
35
65
|
showTimePicker?: boolean;
|
|
36
66
|
/**
|
|
67
|
+
* TimePicker 사용시 Footer 영역(취소/확인)은 고정 노출됩니다.
|
|
37
68
|
* @default false
|
|
38
|
-
* @desc TimePicker 사용시 Footer 영역은 고정 노출됩니다.
|
|
39
69
|
*/
|
|
40
70
|
showFooter?: boolean;
|
|
41
71
|
onChange?: (value: Date | null) => void;
|
|
42
72
|
}
|
|
43
|
-
export declare const DatePicker: ({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, canClickOutside, showRemoveButton, showTodayButton, showTimePicker, showFooter, onChange, opened: openProp, onOpen, onClose, }: DatePickerProps) => JSX.Element;
|
|
73
|
+
export declare const DatePicker: ({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, canClickOutside, 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, canClickOutside, showRemoveButton, showTodayButton, showTimePicker, showFooter, onChange, opened: openProp, onOpen, onClose, }: import("./DatePicker").DatePickerProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, canClickOutside, 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;
|
|
@@ -9,7 +9,6 @@ export declare const ShowRemoveButton: any;
|
|
|
9
9
|
export declare const ShowFooter: any;
|
|
10
10
|
export declare const ShowTodayButton: any;
|
|
11
11
|
export declare const ShowTimePicker: any;
|
|
12
|
-
export declare const Opened: any;
|
|
13
12
|
export declare const ShowTimeHourMinute: any;
|
|
14
13
|
export declare const ShowTimeHourMinuteSecond: any;
|
|
15
14
|
export declare const DisableDays: any;
|
|
@@ -9,15 +9,29 @@ export type DatePresetItem = {
|
|
|
9
9
|
export type DatePreset = DatePresetItem[];
|
|
10
10
|
export type Dates = DateRange;
|
|
11
11
|
export interface DateRangePickerProps extends DatePickerBaseProps {
|
|
12
|
+
/**
|
|
13
|
+
* 좌측 DatePreset 사용 유무
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
12
16
|
showDatePreset?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* [Dates Type](https://github.com/gpbl/react-day-picker/blob/master/packages/react-day-picker/src/types/Matchers.ts#L73)
|
|
19
|
+
*/
|
|
13
20
|
dates?: Dates;
|
|
14
21
|
minDate?: Date;
|
|
15
22
|
maxDate?: Date;
|
|
23
|
+
/**
|
|
24
|
+
* MaxRange 범위를 지정할 수 있습니다.
|
|
25
|
+
* - [keyof Duration](https://github.com/date-fns/date-fns/blob/main/src/types.ts#L19)
|
|
26
|
+
*/
|
|
16
27
|
maxRange?: [number, keyof Duration];
|
|
28
|
+
/**
|
|
29
|
+
* DatePreset 타입에 맞는 사용자 지정 preset을 사용할 수 있습니다.
|
|
30
|
+
*/
|
|
17
31
|
customDatePreset?: DatePreset;
|
|
18
32
|
/**
|
|
33
|
+
* 지정해서 보여지는 개월의 개수를 임의로 조정할 수 있습니다.
|
|
19
34
|
* @default 2
|
|
20
|
-
* @desc 지정해서 보여지는 개월의 개수를 임의로 조정할 수 있습니다.
|
|
21
35
|
*/
|
|
22
36
|
numberOfMonths?: number;
|
|
23
37
|
onChange?: (start: Dates['from'], end: Dates['to']) => void;
|
|
@@ -5,7 +5,6 @@ export default _default;
|
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Disabled: any;
|
|
7
7
|
export declare const Error: any;
|
|
8
|
-
export declare const Opened: any;
|
|
9
8
|
export declare const ShowRemoveButton: any;
|
|
10
9
|
export declare const NumberOfMonths: any;
|
|
11
10
|
export declare const MinDate: any;
|
|
@@ -5,12 +5,19 @@ export type DividerSize = 'small' | 'medium';
|
|
|
5
5
|
export interface DividerProps {
|
|
6
6
|
/** @default 'horizontal' */
|
|
7
7
|
direction?: direction;
|
|
8
|
+
/**
|
|
9
|
+
* 간격을 설정할 수 있습니다.
|
|
10
|
+
* - direction horizontal 일경우 상하 간격에 적용됩니다.
|
|
11
|
+
* - direction vertical 일경우 좌우 간격에 적용됩니다.
|
|
12
|
+
*/
|
|
8
13
|
spacing?: CSSValueWithLength;
|
|
9
14
|
/** @default 'small' */
|
|
10
15
|
size?: DividerSize;
|
|
11
16
|
/**
|
|
17
|
+
* 지정된 길이를 설정할 수 있습니다.
|
|
18
|
+
* - 지정하지 않을 경우 direction horizontal 이라면 width 값이 100%로 고정됩니다.
|
|
19
|
+
* - 지정하지 않을 경우 direction vertical 이라면 height값이 100%로 고정됩니다.
|
|
12
20
|
* @default '100%'
|
|
13
|
-
* @desc 지정되지 않을 경우 horizontal 일경우 width 값이, vertical 일경우 height값이 100%로 고정됩니다.
|
|
14
21
|
*/
|
|
15
22
|
length?: CSSValueWithLength;
|
|
16
23
|
}
|
|
@@ -7,20 +7,28 @@ export interface DropdownOption<OptionValue> {
|
|
|
7
7
|
}
|
|
8
8
|
export interface DropdownProps<OptionValue> {
|
|
9
9
|
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Input 너비를 지정할 수 있습니다.
|
|
12
|
+
*/
|
|
10
13
|
width?: CSSValueWithLength;
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
15
|
+
* Dropdown OptionList maxHeight값
|
|
13
16
|
* @default 400
|
|
14
17
|
*/
|
|
15
18
|
maxHeight?: number;
|
|
16
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
21
|
+
* @default 1030
|
|
22
|
+
*/
|
|
17
23
|
zIndex?: number;
|
|
18
24
|
disabled?: boolean;
|
|
19
25
|
options: Array<DropdownOption<OptionValue>>;
|
|
20
26
|
placeholder?: string;
|
|
21
27
|
value?: OptionValue;
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
29
|
+
* floating 요소가 reference 영역을 넘어갈 경우 자동 위치 처리 사용 유무
|
|
30
|
+
* - 자동 위치 상/하만 적용됩니다.
|
|
31
|
+
* @default true
|
|
24
32
|
*/
|
|
25
33
|
autoPlacement?: boolean;
|
|
26
34
|
keyExtractor?: (item: DropdownOption<OptionValue>, index: number) => string | number;
|
|
@@ -6,6 +6,9 @@ export interface DropdownInputOption<OptionValue> {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface DropdownInputProps<OptionValue> extends Omit<DropdownProps<OptionValue>, 'options' | 'keyExtractor' | 'onChange'> {
|
|
9
|
+
/**
|
|
10
|
+
* 입력된 검색결과를 전달합니다.
|
|
11
|
+
*/
|
|
9
12
|
onSearch?: (inputValue: string) => void;
|
|
10
13
|
onChange?: (value: OptionValue | undefined) => void;
|
|
11
14
|
options: Array<DropdownInputOption<OptionValue>>;
|
|
@@ -14,21 +14,40 @@ export interface UploadFile {
|
|
|
14
14
|
export interface FileUploadProps {
|
|
15
15
|
className?: string;
|
|
16
16
|
label?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* HTMLInputElement['accept']
|
|
19
|
+
*/
|
|
17
20
|
accept?: HTMLInputElement['accept'];
|
|
18
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* HTMLInputElement['multiple']
|
|
24
|
+
*/
|
|
19
25
|
multiple?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 최대 업로드 파일 갯수
|
|
28
|
+
*/
|
|
20
29
|
maxCount?: number;
|
|
21
30
|
/**
|
|
31
|
+
* FileList내 삭제버튼 사용 유무
|
|
22
32
|
* @default true
|
|
23
33
|
*/
|
|
24
34
|
showRemoveButton?: boolean;
|
|
25
35
|
/**
|
|
26
|
-
*
|
|
36
|
+
* FileList를 노출하려면 지정된 UploadFile 타입으로 전달해야합니다.
|
|
27
37
|
*/
|
|
28
38
|
fileList?: UploadFile[];
|
|
29
39
|
onChange?: (file: File | FileList) => void;
|
|
40
|
+
/**
|
|
41
|
+
* FileList 클릭시 인덱스 정보와 함께 전달합니다.
|
|
42
|
+
*/
|
|
30
43
|
onClickFile?: (file: UploadFile, index: number) => void;
|
|
44
|
+
/**
|
|
45
|
+
* 업로드 시도시 maxCount를 넘길 경우 전달합니다.
|
|
46
|
+
*/
|
|
31
47
|
onLimitMaxCount?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* 삭제 버튼 클릭시 인덱스 정보와 함께 전달합니다.
|
|
50
|
+
*/
|
|
32
51
|
onClickFileRemove?: (file: UploadFile, index: number) => void;
|
|
33
52
|
}
|
|
34
53
|
export declare const FileUpload: ({ className, accept, label, disabled, multiple, maxCount, showRemoveButton, fileList, onChange, onClickFile, onLimitMaxCount, onClickFileRemove, }: FileUploadProps) => JSX.Element;
|
|
@@ -4,9 +4,21 @@ import { CSSValueWithLength } from '../../styles';
|
|
|
4
4
|
export interface FormFieldProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
label?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* 라벨 우측 렌더링될 Addon 요소
|
|
9
|
+
*/
|
|
7
10
|
rightAddon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* 라벨 필수(*) 표시 사용 유무
|
|
13
|
+
*/
|
|
8
14
|
required?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* HelpTextProps 타입으로 넘길 경우 라벨 우측 IconHelp14에 자동으로 popover 처리됩니다.
|
|
17
|
+
*/
|
|
9
18
|
helper?: HelpTextProps;
|
|
19
|
+
/**
|
|
20
|
+
* 최소너비 80px내에서 라벨 너비를 지정할 수 있습니다.
|
|
21
|
+
*/
|
|
10
22
|
labelWidth?: CSSValueWithLength;
|
|
11
23
|
}
|
|
12
24
|
export declare const FormField: ({ className, label, rightAddon, required, helper, labelWidth, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { FormField } from './FormField';
|
|
|
4
4
|
declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, labelWidth, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const LabelWidth: any;
|
|
8
8
|
export declare const WithRadioGroup: ComponentStory<typeof FormField>;
|
|
9
9
|
export declare const WithCheckboxGroup: ComponentStory<typeof FormField>;
|
|
10
10
|
export declare const WithHelpPopover: any;
|
|
@@ -6,9 +6,9 @@ export interface InputAffixProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
status?: InputStatus;
|
|
8
8
|
width?: CSSValueWithLength;
|
|
9
|
-
/** Addon
|
|
9
|
+
/** Input 좌측에 렌더링될 Addon 요소 */
|
|
10
10
|
prefix?: string;
|
|
11
|
-
/** Addon
|
|
11
|
+
/** Input 우측에 렌더링될 Addon 요소 */
|
|
12
12
|
suffix?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const InputAffix: ({ className, disabled, children, status, prefix, suffix, width, }: PropsWithChildren<InputAffixProps>) => JSX.Element;
|
|
@@ -7,16 +7,19 @@ export interface InputBaseType {
|
|
|
7
7
|
alignment?: InputAlignment;
|
|
8
8
|
/** @default info */
|
|
9
9
|
status?: InputStatus;
|
|
10
|
-
/**
|
|
10
|
+
/** 좌측 영역에 렌더링 될 요소 */
|
|
11
11
|
startElement?: ReactElement<IconProps> | ReactNode;
|
|
12
|
-
/**
|
|
12
|
+
/** 우측 영역에 렌더링 될 요소 */
|
|
13
13
|
endElement?: ReactElement<IconProps> | ReactNode;
|
|
14
|
-
/**
|
|
14
|
+
/** Input prefix 요소 */
|
|
15
15
|
leftAddon?: InputAffixProps['prefix'];
|
|
16
|
-
/**
|
|
16
|
+
/** Input suffix 요소 */
|
|
17
17
|
rightAddon?: InputAffixProps['suffix'];
|
|
18
18
|
width?: CSSValueWithLength;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* 입력된 value count 노출 여부
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
20
23
|
showCounter?: boolean;
|
|
21
24
|
}
|
|
22
25
|
export type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width'> & InputBaseType;
|
|
@@ -17,6 +17,9 @@ export declare const useMenuContext: () => MenuContextProps;
|
|
|
17
17
|
export interface MenuProps extends HTMLAttributes<HTMLUListElement> {
|
|
18
18
|
selectedMenu?: MenuContextProps['activeMenu'];
|
|
19
19
|
onClickMenu?: (id: MenuContextProps['activeMenuGroup']) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Toggle 기능 사용 여부
|
|
22
|
+
*/
|
|
20
23
|
toggleMode?: MenuContextProps['toggleMode'];
|
|
21
24
|
}
|
|
22
25
|
export declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -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, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element;
|
|
10
|
+
export declare const AlertModal: ({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element;
|
|
11
11
|
export declare const Alert: (properties: AlertModalProps) => Promise<void>;
|
|
@@ -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, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ width, kind, dense, fill, title, confirmText, text, subtext, zIndex, onConfirm, 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>;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ModalOverlayBaseProps } from './ModalOverlay';
|
|
3
|
-
export interface ConfirmModalProps extends Omit<ModalOverlayBaseProps, 'onClose'
|
|
3
|
+
export interface ConfirmModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
|
|
4
4
|
title: ReactNode;
|
|
5
5
|
text?: ReactNode;
|
|
6
6
|
subtext?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* 좁은 간격 사용 유무
|
|
9
|
+
*/
|
|
7
10
|
dense?: boolean;
|
|
8
11
|
confirmText?: string;
|
|
9
12
|
cancelText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* onConfirm/onCancel이 호출된 직후 onClose가 호출됩니다.
|
|
15
|
+
*/
|
|
10
16
|
onConfirm?: () => void | Promise<void>;
|
|
11
17
|
onCancel?: () => void | Promise<void>;
|
|
12
18
|
onClose?: () => void | Promise<void>;
|
|
13
19
|
}
|
|
14
|
-
export declare const ConfirmModal: ({ title, width, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: ConfirmModalProps) => JSX.Element;
|
|
20
|
+
export declare const ConfirmModal: ({ title, width, zIndex, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: ConfirmModalProps) => JSX.Element;
|
|
15
21
|
export declare const Confirm: (properties: ConfirmModalProps) => Promise<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { ConfirmModal } from './ConfirmModal';
|
|
4
|
-
declare const _default: ComponentMeta<({ title, width, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: import("./ConfirmModal").ConfirmModalProps) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ title, width, zIndex, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: import("./ConfirmModal").ConfirmModalProps) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: ComponentStory<typeof ConfirmModal>;
|
|
7
7
|
export declare const Dense: ComponentStory<typeof ConfirmModal>;
|