@croquiscom/pds 0.43.0 → 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.
Files changed (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/components/badge/Badge.d.ts +5 -1
  4. package/dist/components/banner/NormalBanner.d.ts +5 -0
  5. package/dist/components/bottom-sheet/BottomSheet.d.ts +6 -2
  6. package/dist/components/bottom-sheet/BottomSheet.stories.d.ts +4 -3
  7. package/dist/components/button/Button.d.ts +13 -2
  8. package/dist/components/button/Button.stories.d.ts +3 -2
  9. package/dist/components/button/IconButton.d.ts +4 -2
  10. package/dist/components/button/TextButton.d.ts +1 -1
  11. package/dist/components/date-picker/DatePicker.d.ts +33 -3
  12. package/dist/components/date-picker/DatePicker.stories.d.ts +1 -2
  13. package/dist/components/date-picker/DateRangePicker.d.ts +15 -1
  14. package/dist/components/date-picker/DateRangePicker.stories.d.ts +0 -1
  15. package/dist/components/divider/Divider.d.ts +8 -1
  16. package/dist/components/dropdown/Dropdown.d.ts +11 -3
  17. package/dist/components/dropdown/DropdownInput.d.ts +3 -0
  18. package/dist/components/file-upload/FileUpload.d.ts +20 -1
  19. package/dist/components/form/FormField.d.ts +12 -0
  20. package/dist/components/form/FormField.stories.d.ts +1 -1
  21. package/dist/components/input/InputAffix.d.ts +2 -2
  22. package/dist/components/input/InputBase.d.ts +8 -5
  23. package/dist/components/menu/Menu.d.ts +3 -0
  24. package/dist/components/modal/AlertModal.d.ts +1 -1
  25. package/dist/components/modal/AlertModal.stories.d.ts +1 -1
  26. package/dist/components/modal/ConfirmModal.d.ts +8 -2
  27. package/dist/components/modal/ConfirmModal.stories.d.ts +1 -1
  28. package/dist/components/modal/Modal.d.ts +34 -16
  29. package/dist/components/modal/Modal.stories.d.ts +4 -2
  30. package/dist/components/modal/ModalOverlay.d.ts +14 -6
  31. package/dist/components/modal/NoticeModal.d.ts +16 -2
  32. package/dist/components/modal/NoticeModal.stories.d.ts +1 -1
  33. package/dist/components/notification/Notification.d.ts +13 -1
  34. package/dist/components/pagination/Pagination.d.ts +9 -3
  35. package/dist/components/popover/Popover.d.ts +8 -2
  36. package/dist/components/tabs/LineTabs.d.ts +3 -2
  37. package/dist/components/textarea/Textarea.d.ts +4 -1
  38. package/dist/components/time-picker/TimePicker.d.ts +19 -1
  39. package/dist/components/time-picker/TimePicker.stories.d.ts +1 -1
  40. package/dist/components/time-picker/TimePickerOverlay.d.ts +4 -1
  41. package/dist/components/time-picker/TimeRangePicker.d.ts +4 -1
  42. package/dist/components/time-picker/TimeRangePicker.stories.d.ts +1 -1
  43. package/dist/components/toast/Toast.d.ts +7 -2
  44. package/dist/components/tooltip/Tooltip.d.ts +17 -5
  45. package/dist/hooks/useResize.d.ts +1 -0
  46. package/dist/index.es.js +4 -4
  47. package/dist/index.es.js.map +1 -1
  48. package/dist/index.js +4 -4
  49. package/dist/index.js.map +1 -1
  50. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
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
+
3
19
  ## 0.43.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # PDS
4
4
 
5
- - 🎨 [Storybook](https://main--63219cdd878b411aa90ad43c.chromatic.com/)
5
+ - 🎨 [Storybook](https://storybook.kakaostyle.in/master/pds/?path=/story/intro--page)
6
6
 
7
7
  PDS(파트너 디자인 시스템)은 [카카오스타일 파트너센터](https://shop.zigzag.kr/) 디자인 시스템을 위한 리액트 기반의 라이브러리입니다.
8
8
 
@@ -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
- /** @default 1020 */
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
- * @desc bottom sheet 드래그 닫힘 지원 여부
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: () => JSX.Element;
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: () => JSX.Element;
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
- /** @desc 좌측 영역에 렌더링 될 아이콘 요소 */
17
+ /**
18
+ * 버튼 좌측 영역에 렌더링 될 아이콘 요소
19
+ * - Icon 컴포넌트 color props가 있더라도 kind 따라 currentColor가 지정됩니다.
20
+ * - Icon 컴포넌트 size props가 있더라도 Icon 사이즈는 ButtonSize에 따라 고정됩니다.
21
+ */
15
22
  startIcon?: ReactElement<IconProps>;
16
- /** @desc 우측 영역에 렌더링 될 아이콘 요소 */
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,5 +1,6 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
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;
@@ -10,4 +11,4 @@ export declare const StartIcon: any;
10
11
  export declare const EndIcon: any;
11
12
  export declare const Loading: any;
12
13
  export declare const FullWidth: any;
13
- export declare const Focus: () => JSX.Element;
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
- * @desc shape 'circle'의 경우 적용되지 않습니다.
7
+ * shape 속성이 'circle'의 경우 적용되지 않습니다.
8
8
  * @default outlined_secondary
9
9
  */
10
10
  kind?: IconButtonKind;
11
11
  /**
12
- * @desc 렌더링 될 아이콘 요소
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
- * @desc kind값이 link일 경우 적용되지 않습니다.
12
+ * kind값이 link일 경우 고정 컬러(semantic_colors.content.primary)로 지정됩니다.
13
13
  * @default semantic_colors.content.primary
14
14
  */
15
15
  color?: string;
@@ -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
- * @desc Dropdown maxHeight값
15
+ * Dropdown OptionList maxHeight값
13
16
  * @default 400
14
17
  */
15
18
  maxHeight?: number;
16
- /** @default 1030 */
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
- * @desc floating 요소가 reference 영역을 넘어갈 경우 자동 위치 처리 사용 유무
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
- * @desc FileUploadButton과 함께 업로드된 FileList를 노출하려면 지정된 UploadFile 타입으로 전달해야합니다.
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 LabelWith: any;
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 Left */
9
+ /** Input 좌측에 렌더링될 Addon 요소 */
10
10
  prefix?: string;
11
- /** Addon Right */
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
- /** @desc 좌측 영역에 렌더링 될 요소 */
10
+ /** 좌측 영역에 렌더링 될 요소 */
11
11
  startElement?: ReactElement<IconProps> | ReactNode;
12
- /** @desc 우측 영역에 렌더링 될 요소 */
12
+ /** 우측 영역에 렌더링 될 요소 */
13
13
  endElement?: ReactElement<IconProps> | ReactNode;
14
- /** @desc prefix */
14
+ /** Input prefix 요소 */
15
15
  leftAddon?: InputAffixProps['prefix'];
16
- /** @desc suffix */
16
+ /** Input suffix 요소 */
17
17
  rightAddon?: InputAffixProps['suffix'];
18
18
  width?: CSSValueWithLength;
19
- /** @default false */
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' | 'fullScreen'> {
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>;
@@ -1,16 +1,30 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
2
  import { ButtonProps } from '../button';
3
- import { SpaceProps } from '../../styles';
3
+ import { CSSValueWithLength, SpaceProps } from '../../styles';
4
4
  import { ModalOverlayBaseProps, ModalBaseCancelReason } from './ModalOverlay';
5
5
  export type ModalButtonProps = Omit<ButtonProps, 'onClick'>;
6
6
  export type ModalCancelReason = ModalBaseCancelReason;
7
+ export interface ModalContentProps extends SpaceProps {
8
+ maxHeight?: CSSValueWithLength;
9
+ }
10
+ type LayoutHeightType = {
11
+ header: number;
12
+ footer: number;
13
+ };
7
14
  export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
8
15
  title?: ReactNode;
9
16
  confirmText?: string;
17
+ /**
18
+ * [ButtonProps](https://storybook.kakaostyle.in/master/pds/?path=/docs/component-button--primary)를 confirmButton에 적용할 수 있습니다.
19
+ */
10
20
  confirmButtonProps?: ModalButtonProps;
21
+ /**
22
+ * [ButtonProps](https://storybook.kakaostyle.in/master/pds/?path=/docs/component-button--primary)를 cancelButton에 적용할 수 있습니다.
23
+ */
11
24
  cancelText?: string;
12
25
  cancelButtonProps?: ModalButtonProps;
13
26
  /**
27
+ * 헤더 영역 타이틀 좌측 backButton 사용 유무
14
28
  * @default false
15
29
  */
16
30
  backButton?: boolean;
@@ -19,42 +33,46 @@ export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
19
33
  */
20
34
  closeButton?: boolean;
21
35
  /**
36
+ * 좁은 간격 사용 유무
22
37
  * @default false
23
38
  */
24
39
  dense?: boolean;
25
- contentProps?: ModalContentProps;
26
40
  /**
27
- * @desc Footer content, 커스텀 푸터 요소 사용시 default Footer(confirmText, cancelText)는 미노출됩니다.
41
+ * 바디 영역 콘텐츠 ModalContentProps를 통한 커스텀이 가능합니다.
42
+ * - [SpaceProps](https://github.com/croquiscom/pds/blob/main/src/styles/space.ts)
43
+ * - maxHeight
28
44
  */
29
- footer?: ReactNode;
45
+ contentProps?: ModalContentProps;
30
46
  /**
31
- * @desc Modal Header position 고정 여부, fullScreen일 경우만 적용됩니다.
32
- * @default false
47
+ * 푸터 영역을 커스텀할 있습니다.
48
+ * - 기본 Footer(confirmText, cancelText)는 미노출됩니다.
49
+ * - dense 속성이 적용되지 않습니다.
50
+ * - fullScreen 속성이 true일 경우 자동 해당 영역은 fixed 처리 됩니다.
33
51
  */
34
- fixedHeader?: boolean;
52
+ footer?: ReactNode;
35
53
  /**
36
- * @desc Modal Footer position 고정 여부, fullScreen일 경우만 적용됩니다.
54
+ * 전체화면 사용 유무, 헤더/푸터 영역이 자동 고정됩니다.
37
55
  * @default false
38
56
  */
39
- fixedFooter?: boolean;
57
+ fullScreen?: boolean;
40
58
  onConfirm?: () => void;
41
59
  /**
42
- * @desc cancel 이벤트, reason('cancelClick' | 'escapeKeyPress' | 'overlayClick')을 포함하여 전달합니다.
60
+ * reason 포함한 cancel 이벤트를 전달합니다.
61
+ * - 'cancelClick' | 'escapeKeyPress' | 'overlayClick'
43
62
  */
44
63
  onCancel?: (reason: ModalBaseCancelReason) => void;
45
64
  /**
46
- * @desc Modal Header backButton 클릭 이벤트
65
+ * Modal Header backButton 클릭 이벤트
47
66
  */
48
67
  onClickBackButton?: () => void;
49
68
  }
50
- export interface ModalContentProps extends Pick<ModalProps, 'fixedHeader' | 'fixedFooter' | 'dense'>, SpaceProps {
51
- }
52
69
  export declare const MIN_WIDTH = 480;
53
- export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, backButton, dense, fill, fullScreen, fixedHeader, fixedFooter, footer, confirmButtonProps, cancelButtonProps, contentProps, onConfirm, onCancel, onExited, onClickBackButton, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
70
+ export declare const Modal: ({ opened: openProp, children, title, width, zIndex, confirmText, cancelText, closeButton, backButton, dense, fill, fullScreen, footer, confirmButtonProps, cancelButtonProps, contentProps, onConfirm, onCancel, onExited, onClickBackButton, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
54
71
  export declare const ModalContent: import("@emotion/styled").StyledComponent<{
55
72
  theme?: import("@emotion/react").Theme;
56
73
  as?: React.ElementType<any>;
57
74
  } & ModalContentProps & {
58
- headerHeight: number;
59
- footerHeight: number;
75
+ fixed: boolean;
76
+ layoutHeight: LayoutHeightType;
60
77
  }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
78
+ export {};