@croquiscom/pds 0.38.0 → 0.39.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 553b8e9: Modal fullScreen props 추가, Divider vertical spacing 추가
8
+
9
+ ## 0.38.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 584a215: Pagination middleRange 예외 처리 추가
14
+ - c3ba920: fix: FormField의 label props type을 ReactNode로 변경
15
+
3
16
  ## 0.38.0
4
17
 
5
18
  ### Minor Changes
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { SpaceProps } from '../../styles';
3
2
  import { CSSValueWithLength } from '../../styles';
4
3
  export type direction = 'horizontal' | 'vertical';
5
4
  export type DividerSize = 'small' | 'medium';
6
- export interface DividerProps extends SpaceProps {
5
+ export interface DividerProps {
7
6
  /** @default 'horizontal' */
8
7
  direction?: direction;
9
8
  spacing?: CSSValueWithLength;
@@ -6,5 +6,6 @@ declare const _default: ComponentMeta<import("@emotion/styled").StyledComponent<
6
6
  } & import("./Divider").DividerProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, {}>>;
7
7
  export default _default;
8
8
  export declare const Base: any;
9
+ export declare const HorizontalSpacing: any;
9
10
  export declare const Vertical: any;
10
- export declare const Spacing: any;
11
+ export declare const VerticalSpacing: any;
@@ -3,7 +3,7 @@ import { HelpTextProps } from '../text';
3
3
  import { CSSValueWithLength } from '../../styles';
4
4
  export interface FormFieldProps {
5
5
  className?: string;
6
- label?: string;
6
+ label?: ReactNode;
7
7
  rightAddon?: ReactNode;
8
8
  required?: boolean;
9
9
  helper?: HelpTextProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ConfirmModalProps } from './ConfirmModal';
2
3
  import { NotificationKind } from '../notification';
3
4
  export interface AlertModalProps extends Omit<ConfirmModalProps, 'cancelText' | 'onCancel'> {
@@ -6,4 +7,5 @@ export interface AlertModalProps extends Omit<ConfirmModalProps, 'cancelText' |
6
7
  */
7
8
  kind?: NotificationKind;
8
9
  }
10
+ export declare const AlertModal: ({ opened: openProp, kind, dense, fill, title, confirmText, text, subtext, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element;
9
11
  export declare const Alert: (properties: AlertModalProps) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { AlertModal, AlertModalProps } from './AlertModal';
4
+ declare const _default: ComponentMeta<({ opened: openProp, kind, dense, fill, title, confirmText, text, subtext, onConfirm, onExited, ...props }: AlertModalProps) => JSX.Element>;
5
+ export default _default;
6
+ export declare const Base: ComponentStory<typeof AlertModal>;
7
+ export declare const Dense: ComponentStory<typeof AlertModal>;
8
+ export declare const Fill: ComponentStory<typeof AlertModal>;
9
+ export declare const Kind: ComponentStory<typeof AlertModal>;
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ModalProps } from './Modal';
3
- export interface ConfirmModalProps extends Omit<ModalProps, 'closeButton' | 'onConfirm' | 'onCancel' | 'onClose' | 'width' | 'footerAddon'> {
3
+ export interface ConfirmModalProps extends Omit<ModalProps, 'closeButton' | 'onConfirm' | 'onCancel' | 'onClose' | 'width' | 'footerAddon' | 'fullScreen'> {
4
4
  onConfirm?: () => void | Promise<void>;
5
5
  onCancel?: () => void | Promise<void>;
6
6
  text: ReactNode;
7
7
  subtext?: ReactNode;
8
8
  }
9
+ export declare const ConfirmModal: ({ opened: openProp, title, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onExited, ...props }: ConfirmModalProps) => JSX.Element;
9
10
  export declare const Confirm: (properties: ConfirmModalProps) => Promise<boolean>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { ConfirmModal } from './ConfirmModal';
4
+ declare const _default: ComponentMeta<({ opened: openProp, title, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onExited, ...props }: import("./ConfirmModal").ConfirmModalProps) => JSX.Element>;
5
+ export default _default;
6
+ export declare const Base: ComponentStory<typeof ConfirmModal>;
7
+ export declare const Dense: ComponentStory<typeof ConfirmModal>;
8
+ export declare const Fill: ComponentStory<typeof ConfirmModal>;
@@ -1,9 +1,14 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
+ import { ButtonProps } from '../button';
3
+ import { SpaceProps } from '../../styles';
2
4
  import { ModalOverlayBaseProps } from './ModalOverlay';
5
+ export type ModalButtonProps = Omit<ButtonProps, 'onClick'>;
3
6
  export interface ModalProps extends ModalOverlayBaseProps {
4
7
  title?: ReactNode;
5
8
  confirmText?: string;
9
+ confirmButtonProps?: ModalButtonProps;
6
10
  cancelText?: string;
11
+ cancelButtonProps?: ModalButtonProps;
7
12
  /**
8
13
  * @default false
9
14
  */
@@ -16,16 +21,33 @@ export interface ModalProps extends ModalOverlayBaseProps {
16
21
  * @default false
17
22
  */
18
23
  dense?: boolean;
24
+ contentProps?: ModalContentProps;
19
25
  /**
20
- * @desc Footer 영역 좌측 영역에 렌더링될 요소
26
+ * @desc Footer content, 커스텀 푸터 요소 사용시 default Footer(confirmText, cancelText)는 미노출됩니다.
21
27
  */
22
- footerAddon?: ReactNode;
28
+ footer?: ReactNode;
29
+ /**
30
+ * @desc Modal Header position 고정 여부, fullScreen일 경우만 적용됩니다.
31
+ * @default false
32
+ */
33
+ fixedHeader?: boolean;
34
+ /**
35
+ * @desc Modal Footer position 고정 여부, fullScreen일 경우만 적용됩니다.
36
+ * @default false
37
+ */
38
+ fixedFooter?: boolean;
23
39
  onConfirm?: () => void;
24
40
  onCancel?: () => void;
25
41
  onClickBackButton?: () => void;
26
42
  }
43
+ export interface ModalContentProps extends Pick<ModalProps, 'fixedHeader' | 'fixedFooter' | 'dense'>, SpaceProps {
44
+ }
27
45
  export declare const MIN_WIDTH = 480;
28
- export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, backButton, dense, fill, footerAddon, onConfirm, onCancel, onClose, onExited, onClickBackButton, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
46
+ export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, backButton, dense, fill, fullScreen, fixedHeader, fixedFooter, footer, confirmButtonProps, cancelButtonProps, contentProps, onConfirm, onCancel, onClose, onExited, onClickBackButton, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
29
47
  export declare const ModalTitle: import("@emotion/styled").StyledComponent<(import("../text").BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)) & {
30
48
  theme?: import("@emotion/react").Theme;
31
49
  }, {}, {}>;
50
+ export declare const ModalContent: import("@emotion/styled").StyledComponent<{
51
+ theme?: import("@emotion/react").Theme;
52
+ as?: React.ElementType<any>;
53
+ } & ModalContentProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
- import { ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, backButton, dense, fill, footerAddon, onConfirm, onCancel, onClose, onExited, onClickBackButton, ...props }: React.PropsWithChildren<import("./Modal").ModalProps>) => JSX.Element>;
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { Modal } from './Modal';
4
+ declare const _default: ComponentMeta<({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, backButton, dense, fill, fullScreen, fixedHeader, fixedFooter, footer, confirmButtonProps, cancelButtonProps, contentProps, onConfirm, onCancel, onClose, onExited, onClickBackButton, ...props }: React.PropsWithChildren<import("./Modal").ModalProps>) => JSX.Element>;
4
5
  export default _default;
5
- export declare const BasicModal: any;
6
- export declare const BasicModalDense: any;
6
+ export declare const Base: any;
7
+ export declare const Dense: any;
8
+ export declare const Fill: any;
7
9
  export declare const canClickOutside: any;
8
- export declare const BasicModalWithBackButton: any;
9
- export declare const Custom: any;
10
- export declare const ConfirmModal: () => JSX.Element;
11
- export declare const ConfirmModalDenseWithFill: () => JSX.Element;
12
- export declare const AlertModal: () => JSX.Element;
13
- export declare const AlertModalDenseWithFill: () => JSX.Element;
14
- export declare const AlertModalKind: () => JSX.Element;
15
- export declare const NoticeModal: any;
10
+ export declare const WithBackButton: any;
11
+ export declare const CustomFooter: ComponentStory<typeof Modal>;
12
+ export declare const CustomContent: ComponentStory<typeof Modal>;
13
+ export declare const FullScreen: ComponentStory<typeof Modal>;
@@ -3,10 +3,15 @@ import { CSSValueWithLength } from '../../styles';
3
3
  import { CornerRadiusSize } from '../../foundation';
4
4
  export interface ModalOverlayBaseProps {
5
5
  /**
6
- * @desc 100% 너비 사용, Alert 또는 Confirm Modal의 경우 최소너비(480) 범위내에서 적용됩니다.
6
+ * @desc 안전여백을 포함한 100% 너비 사용, Alert 또는 Confirm Modal의 경우 최소너비(480) 범위내에서 적용됩니다.
7
7
  * @default false
8
8
  */
9
9
  fill?: boolean;
10
+ /**
11
+ * @desc 전체화면 가로 세로폭 사용 유무, Alert 또는 Confirm Modal의 경우 적용되지 않습니다.
12
+ * @default false
13
+ */
14
+ fullScreen?: boolean;
10
15
  width?: CSSValueWithLength;
11
16
  className?: string;
12
17
  opened?: boolean;
@@ -29,4 +34,4 @@ export interface ModalOverlayProps extends ModalOverlayBaseProps {
29
34
  borderRadiusSize?: CornerRadiusSize;
30
35
  setOpened: Dispatch<SetStateAction<boolean>>;
31
36
  }
32
- export declare const ModalOverlay: ({ width, maxWidth, borderRadiusSize, fill, className, children, opened: openProp, zIndex, canClickOutside, onExited, onClose, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
37
+ export declare const ModalOverlay: ({ width, maxWidth, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, onExited, onClose, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
2
  import { ModalOverlayBaseProps } from './ModalOverlay';
3
- export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill'> {
3
+ export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill' | 'fullScreen'> {
4
4
  label?: string;
5
5
  title?: ReactNode;
6
6
  text?: ReactNode;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<({ opened: openProp, children, width, label, title, text, checkReplay, checkReplayText, onClose, onExited, onChangeCheckReplay, ...props }: React.PropsWithChildren<import("./NoticeModal").NoticeModalProps>) => JSX.Element>;
4
+ export default _default;
5
+ export declare const Base: any;