@croquiscom/pds 0.27.0 → 0.28.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.
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ModalProps } from './Modal';
3
- export interface ConfirmModalProps extends Omit<ModalProps, 'closeButton' | 'onConfirm' | 'onCancel' | 'onClose' | 'width'> {
3
+ export interface ConfirmModalProps extends Omit<ModalProps, 'closeButton' | 'onConfirm' | 'onCancel' | 'onClose' | 'width' | 'footerAddon'> {
4
4
  onConfirm?: () => void | Promise<void>;
5
5
  onCancel?: () => void | Promise<void>;
6
6
  text: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
- import { ModalOverlayProps } from './ModalOverlay';
3
- export interface ModalProps extends ModalOverlayProps {
2
+ import { ModalOverlayBaseProps } from './ModalOverlay';
3
+ export interface ModalProps extends ModalOverlayBaseProps {
4
4
  title?: ReactNode;
5
5
  confirmText?: string;
6
6
  cancelText?: string;
@@ -12,12 +12,15 @@ export interface ModalProps extends ModalOverlayProps {
12
12
  * @default false
13
13
  */
14
14
  dense?: boolean;
15
+ /**
16
+ * @desc Footer 영역 좌측 영역에 렌더링될 요소
17
+ */
18
+ footerAddon?: ReactNode;
15
19
  onConfirm?: () => void;
16
20
  onCancel?: () => void;
17
- onClose?: () => void;
18
21
  }
19
22
  export declare const MIN_WIDTH = 480;
20
- export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, dense, fill, onConfirm, onCancel, onClose, onExited, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
23
+ export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, dense, fill, footerAddon, onConfirm, onCancel, onClose, onExited, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
21
24
  export declare const ModalTitle: import("@emotion/styled").StyledComponent<React.PropsWithChildren<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>)> & {
22
25
  theme?: import("@emotion/react").Theme;
23
26
  }, {}, {}>;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  import { AlertModal as AlertModalComponent } from './AlertModal';
4
4
  import { ConfirmModal as ConfirmModalComponent } from './ConfirmModal';
5
- declare const _default: ComponentMeta<({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, dense, fill, onConfirm, onCancel, onClose, onExited, ...props }: React.PropsWithChildren<import("./Modal").ModalProps>) => JSX.Element>;
5
+ declare const _default: ComponentMeta<({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, dense, fill, footerAddon, onConfirm, onCancel, onClose, onExited, ...props }: React.PropsWithChildren<import("./Modal").ModalProps>) => JSX.Element>;
6
6
  export default _default;
7
7
  export declare const BasicModal: any;
8
8
  export declare const BasicModalDense: any;
@@ -13,3 +13,4 @@ export declare const ConfirmModalDenseWithFill: ComponentStory<typeof ConfirmMod
13
13
  export declare const AlertModal: ComponentStory<typeof AlertModalComponent>;
14
14
  export declare const AlertModalDenseWithFill: ComponentStory<typeof AlertModalComponent>;
15
15
  export declare const AlertModalKind: ComponentStory<typeof AlertModalComponent>;
16
+ export declare const NoticeModal: any;
@@ -1,12 +1,13 @@
1
- import React, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
1
+ import { PropsWithChildren, Dispatch, SetStateAction } from 'react';
2
2
  import { CSSValueWithLength } from '../styles';
3
- export interface ModalOverlayProps {
3
+ import { CornerRadiusSize } from '../foundation';
4
+ export interface ModalOverlayBaseProps {
4
5
  /**
6
+ * @desc 100% 너비 사용, Alert 또는 Confirm Modal의 경우 최소너비(480) 범위내에서 적용됩니다.
5
7
  * @default false
6
8
  */
7
9
  fill?: boolean;
8
10
  width?: CSSValueWithLength;
9
- maxWidth?: CSSValueWithLength;
10
11
  className?: string;
11
12
  opened?: boolean;
12
13
  /**
@@ -20,6 +21,12 @@ export interface ModalOverlayProps {
20
21
  onExited?: () => void;
21
22
  onClose?: () => void;
22
23
  }
23
- export declare const ModalOverlay: ({ width, maxWidth, fill, className, children, opened: openProp, zIndex, canClickOutside, onExited, onClose, setOpened, }: React.PropsWithChildren<ModalOverlayProps & {
24
+ export interface ModalOverlayProps extends ModalOverlayBaseProps {
25
+ maxWidth?: CSSValueWithLength;
26
+ /**
27
+ * @default large
28
+ */
29
+ borderRadiusSize?: CornerRadiusSize;
24
30
  setOpened: Dispatch<SetStateAction<boolean>>;
25
- }>) => JSX.Element;
31
+ }
32
+ export declare const ModalOverlay: ({ width, maxWidth, borderRadiusSize, fill, className, children, opened: openProp, zIndex, canClickOutside, onExited, onClose, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
2
+ import { ModalOverlayBaseProps } from './ModalOverlay';
3
+ export interface NoticeModalProps extends Omit<ModalOverlayBaseProps, 'fill'> {
4
+ label?: string;
5
+ title?: ReactNode;
6
+ text?: ReactNode;
7
+ /**
8
+ * @default false
9
+ */
10
+ checkReplay?: boolean;
11
+ /**
12
+ * @default '오늘 하루동안 이 창을 열지 않음'
13
+ */
14
+ checkReplayText?: string;
15
+ onChangeCheckReplay?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
+ }
17
+ export declare const NoticeModal: ({ opened: openProp, children, width, label, title, text, checkReplay, checkReplayText, onClose, onExited, onChangeCheckReplay, ...props }: PropsWithChildren<NoticeModalProps>) => JSX.Element;
@@ -1,3 +1,4 @@
1
1
  export * from './Modal';
2
2
  export * from './AlertModal';
3
3
  export * from './ConfirmModal';
4
+ export * from './NoticeModal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croquiscom/pds",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Design system for Zigzag's Partner Center",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.es.js",