@croquiscom/pds 0.41.0 → 0.42.1

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,29 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.42.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5c01d67: LineTabs Indicator 애니메이션 버그 수정
8
+
9
+ ## 0.42.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4fa2b71: IconVideo24 추가
14
+
15
+ ### Patch Changes
16
+
17
+ - 05d8c33: Basic Modal onClose 이벤트 제거
18
+ - 6eda063: z-index 내부 정의값 위계 변경, Dropdown, Popover hideMiddleware, flip 처리 추가
19
+
20
+ ## BreakPoint
21
+
22
+ z-index 위계가 아래와 같이 변경되었습니다.
23
+
24
+ - BottomSheet 1010 => 1020
25
+ - Modal 1020 => 1010
26
+
3
27
  ## 0.41.0
4
28
 
5
29
  ### Minor Changes
@@ -11,8 +35,6 @@
11
35
  Basic Modal Event 방식이 다음과 같이 변경되었습니다.
12
36
 
13
37
  - onConfirm, onCancel 이벤트 발생시 동시에 전달하던 onClose 이벤트가 제거되었습니다.
14
- - onClose 이벤트는 별도 외부 제어 이벤트가 없이 모달 자체의 close 트리거 발생할 경우 전달합니다.
15
- - 외부 제어 이벤트(onCancel)없이 esc키 또는 오버레이 클릭등으로 닫힌 경우(canCloseEscapeKey => true, canClickOutside => true)
16
38
  - onConfirm
17
39
  - confirm 버튼 클릭시
18
40
  - onCancel
@@ -20,18 +42,15 @@
20
42
  - closeButton(x) 버튼 클릭시
21
43
  - overlay 클릭시
22
44
  - esc keyboard 이벤트 발생시
23
- - onExit
45
+ - onExited
24
46
  - Modal destroy시
25
47
 
26
48
  canCloseEscapeKey props 추가되었습니다.
27
49
 
28
50
  - escapeKey 모달 닫힘 사용 여부로 현재 모달에 focus된 경우 동작합니다.
29
- - onCancel 이벤트 제어가 있는 경우 내부 상태 제어를 하지 않습니다.
30
51
 
31
52
  canClickOutside props default가 true로 변경되었습니다.
32
53
 
33
- - onCancel 이벤트 제어가 있는 경우 내부 상태 제어를 하지 않습니다.
34
-
35
54
  ## 0.40.3
36
55
 
37
56
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3 9C3 7.34315 4.34315 6 6 6H14C15.5949 6 16.8992 7.24464 16.9944 8.81563L18.0979 7.71213C19.1689 6.64119 21 7.39968 21 8.91421V15.0858C21 16.6003 19.1689 17.3588 18.0979 16.2879L16.9944 15.1844C16.8992 16.7554 15.5949 18 14 18H6C4.34315 18 3 16.6569 3 15V9ZM6 7.4H14C14.8837 7.4 15.6 8.11634 15.6 9V15C15.6 15.8837 14.8837 16.6 14 16.6H6C5.11634 16.6 4.4 15.8837 4.4 15V9C4.4 8.11634 5.11634 7.4 6 7.4ZM19.0879 8.70208C19.2769 8.51309 19.6 8.64694 19.6 8.91421V15.0858C19.6 15.3531 19.2769 15.4869 19.0879 15.2979L17.0879 13.2979C17.0316 13.2417 17 13.1654 17 13.0858V10.9142C17 10.8346 17.0316 10.7583 17.0879 10.7021L19.0879 8.70208Z" fill="#363644"/>
3
+ </svg>
@@ -5,7 +5,7 @@ type BottomSheetContentWithCloseAction = (action: {
5
5
  export interface BottomSheetProps {
6
6
  className?: string;
7
7
  opened?: boolean;
8
- /** @default 1010 */
8
+ /** @default 1020 */
9
9
  zIndex?: number;
10
10
  title?: ReactNode;
11
11
  subTitle?: ReactNode;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from '.';
3
+ declare const SvgVideo24: ({ size, color, secondaryColor, ...props }: IconProps) => JSX.Element;
4
+ export default SvgVideo24;
@@ -164,6 +164,7 @@ export { default as IconTwo18 } from './Two18';
164
164
  export { default as IconUpload50 } from './Upload50';
165
165
  export { default as IconUser18 } from './User18';
166
166
  export { default as IconVideo16 } from './Video16';
167
+ export { default as IconVideo24 } from './Video24';
167
168
  export { default as IconVvip18 } from './Vvip18';
168
169
  export { default as IconWarning24 } from './Warning24';
169
170
  export { default as IconWon16 } from './Won16';
@@ -7,5 +7,5 @@ export interface AlertModalProps extends Omit<ConfirmModalProps, 'cancelText' |
7
7
  */
8
8
  kind?: NotificationKind;
9
9
  }
10
- export declare const AlertModal: ({ 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, 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<({ 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, 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,10 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
- import { ModalProps } from './Modal';
3
- export interface ConfirmModalProps extends Omit<ModalProps, 'opened' | 'closeButton' | 'onConfirm' | 'onCancel' | 'width' | 'footerAddon' | 'fullScreen' | 'onClickBackButton'> {
4
- onConfirm?: () => void | Promise<void>;
5
- onCancel?: () => void | Promise<void>;
2
+ import { ModalOverlayBaseProps } from './ModalOverlay';
3
+ export interface ConfirmModalProps extends Omit<ModalOverlayBaseProps, 'onClose' | 'fullScreen'> {
4
+ title: ReactNode;
6
5
  text?: ReactNode;
7
6
  subtext?: ReactNode;
7
+ dense?: boolean;
8
+ confirmText?: string;
9
+ cancelText?: string;
10
+ onConfirm?: () => void | Promise<void>;
11
+ onCancel?: () => void | Promise<void>;
12
+ onClose?: () => void | Promise<void>;
8
13
  }
9
- export declare const ConfirmModal: ({ title, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: ConfirmModalProps) => JSX.Element;
14
+ export declare const ConfirmModal: ({ title, width, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: ConfirmModalProps) => JSX.Element;
10
15
  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, dense, fill, text, subtext, confirmText, cancelText, onConfirm, onCancel, onClose, onExited, ...props }: import("./ConfirmModal").ConfirmModalProps) => JSX.Element>;
4
+ declare const _default: ComponentMeta<({ title, width, 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>;
@@ -4,7 +4,7 @@ import { 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 ModalProps extends ModalOverlayBaseProps {
7
+ export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
8
8
  title?: ReactNode;
9
9
  confirmText?: string;
10
10
  confirmButtonProps?: ModalButtonProps;
@@ -38,6 +38,10 @@ export interface ModalProps extends ModalOverlayBaseProps {
38
38
  */
39
39
  fixedFooter?: boolean;
40
40
  onConfirm?: () => void;
41
+ /**
42
+ * @desc cancel 이벤트, reason('cancelClick' | 'escapeKeyPress' | 'overlayClick')을 포함하여 전달합니다.
43
+ */
44
+ onCancel?: (reason: ModalBaseCancelReason) => void;
41
45
  /**
42
46
  * @desc Modal Header backButton 클릭 이벤트
43
47
  */
@@ -9,7 +9,6 @@ export declare const Fill: any;
9
9
  export declare const DisabledOverlayEscape: any;
10
10
  export declare const WithBackButton: any;
11
11
  export declare const ControlledCancelEvent: ComponentStory<typeof Modal>;
12
- export declare const UncontrolledCancelEvent: ComponentStory<typeof Modal>;
13
12
  export declare const CustomFooter: ComponentStory<typeof Modal>;
14
13
  export declare const CustomContent: ComponentStory<typeof Modal>;
15
14
  export declare const NestingModal: ComponentStory<typeof Modal>;
@@ -2,14 +2,10 @@ import { PropsWithChildren, Dispatch, SetStateAction } from 'react';
2
2
  import { CSSValueWithLength } from '../../styles';
3
3
  import { CornerRadiusSize } from '../../foundation';
4
4
  export type ModalBaseCancelReason = 'cancelClick' | 'escapeKeyPress' | 'overlayClick';
5
+ export type ModalCloseEventCallback = Omit<ModalBaseCancelReason, 'cancelClick'>;
5
6
  export declare const SAFE_TOP_BOTTOM_AREA = 120;
6
7
  export declare const SAFE_LEFT_RIGHT_AREA = 32;
7
8
  export interface ModalOverlayBaseProps {
8
- /**
9
- * @default 'pds-floating-root'
10
- * @desc FloatingPortal node id, render 함수로 Floating 노드를 생성하는 경우가 아닌 경우에는 디폴트 아이디값으로 처리합니다.
11
- */
12
- floatingPortalId?: string;
13
9
  /**
14
10
  * @desc 안전여백을 포함한 100% 너비 사용, Alert 또는 Confirm Modal의 경우 최소너비(480) 범위내에서 적용됩니다.
15
11
  * @default false
@@ -24,30 +20,38 @@ export interface ModalOverlayBaseProps {
24
20
  className?: string;
25
21
  opened?: boolean;
26
22
  /**
27
- * @default 1020
23
+ * @default 1010
28
24
  */
29
25
  zIndex?: number;
30
26
  /**
31
- * @desc Modal Overlay 영역 클릭시 모달 닫힘 사용 여부, onCancel 이벤트 제어가 있는 경우 useFloating 내부 상태 제어를 하지 않습니다.
27
+ * @desc Modal Overlay 영역 클릭시 모달 닫힘 사용 여부
32
28
  * @default true
33
29
  */
34
30
  canClickOutside?: boolean;
35
31
  /**
36
- * @desc escapeKey 모달 닫힘 사용 여부, 현재 모달에 focus된 경우 동작합니다. onCancel 이벤트 제어가 있는 경우 useFloating 내부 상태 제어를 하지 않습니다.
32
+ * @desc escapeKey 모달 닫힘 사용 여부, 현재 모달에 focus된 경우 동작합니다.
37
33
  * @default true
38
34
  */
39
35
  canCloseEscapeKey?: boolean;
40
36
  onExited?: () => void;
41
37
  onClose?: () => void;
42
- onCancel?: (reason: ModalBaseCancelReason) => void;
43
38
  }
44
- export type ModalCloseEventCallback = Omit<ModalBaseCancelReason, 'cancelClick'>;
45
39
  export interface ModalOverlayProps extends ModalOverlayBaseProps {
40
+ /**
41
+ * @default 'pds-floating-root'
42
+ * @desc FloatingPortal node id, render 함수로 Floating 노드를 생성하는 경우가 아닌 경우에는 디폴트 아이디값으로 처리합니다.
43
+ */
44
+ floatingPortalId?: string;
46
45
  /**
47
46
  * @default large
48
47
  */
49
48
  borderRadiusSize?: CornerRadiusSize;
50
49
  setOpened?: Dispatch<SetStateAction<boolean>>;
51
50
  onCancelEventCallback?: (event: ModalCloseEventCallback) => void;
51
+ /**
52
+ * @desc esc, overlay 클릭으로 인한 모달 닫힘 상태 내부 제어 여부, Confirm/Alert 모달과 같이 함수 호출형 컴포넌트에 해당합니다.
53
+ * @default false
54
+ */
55
+ uncontrolledOpen?: boolean;
52
56
  }
53
- export declare const ModalOverlay: ({ floatingPortalId, width, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, canCloseEscapeKey, onExited, onClose, onCancel, onCancelEventCallback, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
57
+ export declare const ModalOverlay: ({ floatingPortalId, width, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, canCloseEscapeKey, uncontrolledOpen, onExited, onClose, onCancelEventCallback, setOpened, }: PropsWithChildren<ModalOverlayProps>) => JSX.Element;
@@ -8,10 +8,6 @@ export declare const LineTab: ({ id, onClick, className, children, ...props }: P
8
8
  export declare const TabItemWrapper: import("@emotion/styled").StyledComponent<{
9
9
  theme?: import("@emotion/react").Theme;
10
10
  as?: React.ElementType<any>;
11
- } & import("../stack").VStackProps & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
12
- theme?: import("@emotion/react").Theme;
13
11
  } & {
14
12
  $width: TabWidth;
15
- focused?: boolean;
16
- selected: boolean;
17
- }, {}, {}>;
13
+ }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;