@croquiscom/pds 2.8.1 → 3.0.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,16 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 0a7ba51: NormalBanner Props 추가 및 명칭, 스타일 변경
8
+
9
+ - NormalBanner => Banner 명칭 변경되었습니다.
10
+ - Message 정렬 타이틀 기준으로 변경되었습니다.
11
+ - actions, closeButton props 추가되었습니다.
12
+ - border 스타일이 추가되었습니다.
13
+
3
14
  ## 2.8.1
4
15
 
5
16
  ### Patch Changes
@@ -1,17 +1,17 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { IconProps } from '../icons/generated';
3
- export type NormalBannerKind = 'neutral' | 'info' | 'error' | 'success';
4
- export type NormalBannerSize = 'small' | 'medium';
5
- export interface NormalBannerProps {
3
+ export type BannerKind = 'neutral' | 'info' | 'error' | 'warning' | 'success';
4
+ export type BannerSize = 'small' | 'medium';
5
+ export interface BannerProps {
6
6
  className?: string;
7
7
  /**
8
8
  * @default info
9
9
  */
10
- kind?: NormalBannerKind;
10
+ kind?: BannerKind;
11
11
  /**
12
12
  * @default medium
13
13
  */
14
- size?: NormalBannerSize;
14
+ size?: BannerSize;
15
15
  /**
16
16
  * title 좌측에 렌더링 될 아이콘 요소
17
17
  * - title이 없을 경우 렌더되지 않습니다.
@@ -25,5 +25,15 @@ export interface NormalBannerProps {
25
25
  showIcon?: boolean;
26
26
  title?: string;
27
27
  message?: ReactNode;
28
+ /**
29
+ * 배너 우측에 렌더링 될 extra actions
30
+ */
31
+ actions?: ReactNode;
32
+ /**
33
+ * 배너 우측에 렌더링 될 CloseButton 사용 유무
34
+ * @default false
35
+ */
36
+ closeButton?: boolean;
37
+ onClose?: () => void;
28
38
  }
29
- export declare const NormalBanner: ({ className, kind, size, iconComponent, showIcon, title, message, }: NormalBannerProps) => JSX.Element;
39
+ export declare const Banner: ({ className, kind, size, iconComponent, showIcon, title, message, actions, closeButton, onClose, }: BannerProps) => JSX.Element;
@@ -1,10 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<({ className, kind, size, iconComponent, showIcon, title, message, }: import("./NormalBanner").NormalBannerProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ className, kind, size, iconComponent, showIcon, title, message, actions, closeButton, onClose, }: import("./Banner").BannerProps) => JSX.Element>;
4
4
  export default _default;
5
5
  export declare const Base: any;
6
6
  export declare const NoTitle: any;
7
+ export declare const NoBodyText: any;
7
8
  export declare const NoIcon: any;
9
+ export declare const WithActionClose: any;
8
10
  export declare const Kind: () => JSX.Element;
9
11
  export declare const Size: () => JSX.Element;
10
12
  export declare const CustomIcon: () => JSX.Element;
13
+ export declare const WordBreak: () => JSX.Element;
@@ -1 +1 @@
1
- export * from './NormalBanner';
1
+ export * from './Banner';
@@ -1,3 +1,4 @@
1
- import { NormalBannerKind } from './NormalBanner';
2
- export declare const banner_color_css: Record<NormalBannerKind, string>;
3
- export declare const banner_background_color_css: Record<NormalBannerKind, string>;
1
+ import { BannerKind } from './Banner';
2
+ export declare const banner_color_css: Record<BannerKind, string>;
3
+ export declare const banner_background_color_css: Record<BannerKind, string>;
4
+ export declare const banner_border_color_css: Record<BannerKind, string>;
@@ -0,0 +1,12 @@
1
+ import React, { ButtonHTMLAttributes } from 'react';
2
+ export interface CloseButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /**
4
+ * @default 16
5
+ */
6
+ size?: number;
7
+ /**
8
+ * @default semantic_colors.content.tertiary
9
+ */
10
+ color?: string;
11
+ }
12
+ export declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,3 +1,4 @@
1
1
  export * from './Button';
2
2
  export * from './IconButton';
3
3
  export * from './TextButton';
4
+ export * from './CloseButton';