@croquiscom/pds 2.7.0 → 2.8.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,14 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0b2ad5a: IconBell 아이콘, Divider color 옵션, TopBar container 작은해상도 예시 추가
8
+ - 0b2ad5a: Semantic Color Background Scrim 추가
9
+ - 0b2ad5a: Menu dense, onMenuGroupOpenChange 옵션 추가
10
+ - 0b2ad5a: Drawer 컴포넌트 추가
11
+
3
12
  ## 2.7.0
4
13
 
5
14
  ### Minor 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="M4.25 16.25V9.86111C4.25 5.64351 7.73403 2.25 12 2.25C16.266 2.25 19.75 5.64351 19.75 9.86111V16.25H21V17.75H15.75V18C15.75 20.0711 14.0711 21.75 12 21.75C9.92893 21.75 8.25 20.0711 8.25 18V17.75H3V16.25H4.25ZM5.75 9.86111C5.75 6.50014 8.53398 3.75 12 3.75C15.466 3.75 18.25 6.50014 18.25 9.86111V16.25H5.75V9.86111ZM9.75 17.75V18C9.75 19.2426 10.7574 20.25 12 20.25C13.2426 20.25 14.25 19.2426 14.25 18V17.75H9.75Z" fill="#363644"/>
3
+ </svg>
@@ -13,6 +13,13 @@ export interface DividerProps {
13
13
  spacing?: CSSValueWithLength;
14
14
  /** @default 'small' */
15
15
  size?: DividerSize;
16
+ /**
17
+ * border color를 지정할 수 있습니다.
18
+ * - 지정하지 않을 경우 size medium 일경우 semantic_colors.background.base로 적용됩니다.
19
+ * - 지정하지 않을 경우 size small 일경우 semantic_colors.border.default로 적용됩니다.
20
+ * @default semantic_colors.border.default
21
+ */
22
+ color?: string;
16
23
  /**
17
24
  * 지정된 길이를 설정할 수 있습니다.
18
25
  * - 지정하지 않을 경우 direction horizontal 이라면 width 값이 100%로 고정됩니다.
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { CSSValueWithLength } from '../../styles';
3
+ export type DrawerDirection = 'left' | 'right';
4
+ export interface DrawerProps {
5
+ className?: string;
6
+ /**
7
+ * @default 'right'
8
+ */
9
+ direction?: DrawerDirection;
10
+ /**
11
+ * 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
12
+ * @default 1000
13
+ */
14
+ zIndex?: number;
15
+ /**
16
+ * @default 280
17
+ */
18
+ width?: CSSValueWithLength;
19
+ opened?: boolean;
20
+ /**
21
+ * outside 영역 클릭시 닫힘 사용 여부
22
+ * @default true
23
+ */
24
+ canClickOutside?: boolean;
25
+ /**
26
+ * escapeKey 키이벤트 닫힘 사용 여부
27
+ * @default true
28
+ */
29
+ canCloseEscapeKey?: boolean;
30
+ /**
31
+ * main app node 바깥영역으로 생성할지 여부
32
+ * @default false
33
+ */
34
+ noUsePortal?: boolean;
35
+ /**
36
+ * 오버레이가 렌더링되는 동안 스크롤 금지 여부
37
+ * @default true
38
+ */
39
+ lockScroll?: boolean;
40
+ onClose?: () => void;
41
+ }
42
+ export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & {
43
+ children?: React.ReactNode;
44
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { Drawer } from './Drawer';
4
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Drawer").DrawerProps & {
5
+ children?: React.ReactNode;
6
+ } & React.RefAttributes<HTMLDivElement>>>;
7
+ export default _default;
8
+ export declare const Base: any;
9
+ export declare const Width: any;
10
+ export declare const NoUsePortal: any;
11
+ export declare const Direction: any;
12
+ export declare const DrawerWithNavigation: ComponentStory<typeof Drawer>;
@@ -0,0 +1,12 @@
1
+ import React, { ButtonHTMLAttributes } from 'react';
2
+ export interface DrawerCloseButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /**
4
+ * @default 24
5
+ */
6
+ size?: number;
7
+ /**
8
+ * @default semantic_colors.content.tertiary
9
+ */
10
+ color?: string;
11
+ }
12
+ export declare const DrawerCloseButton: React.ForwardRefExoticComponent<DrawerCloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export * from './Drawer';
2
+ export * from './DrawerCloseButton';
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from '.';
3
+ declare const SvgBell: ({ size, color, secondaryColor, ...props }: IconProps) => JSX.Element;
4
+ export default SvgBell;
@@ -19,6 +19,7 @@ export { default as IconArrowStick } from './ArrowStick';
19
19
  export { default as IconArrowTriangleDown } from './ArrowTriangleDown';
20
20
  export { default as IconArrowTriangleUp } from './ArrowTriangleUp';
21
21
  export { default as IconBarChart } from './BarChart';
22
+ export { default as IconBell } from './Bell';
22
23
  export { default as IconBelow } from './Below';
23
24
  export { default as IconBoxBestFill } from './BoxBestFill';
24
25
  export { default as IconBoxCanada } from './BoxCanada';
@@ -27,3 +27,4 @@ export * from './time-picker';
27
27
  export * from './pagination';
28
28
  export * from './file-upload';
29
29
  export * from './table';
30
+ export * from './drawer';
@@ -10,16 +10,26 @@ export interface MenuContextProps {
10
10
  id: string;
11
11
  groupId: string;
12
12
  }) => void;
13
+ onMenuGroupOpenChange?: (groupId: string) => void;
13
14
  toggleMode: boolean;
15
+ dense: boolean;
14
16
  }
15
17
  export declare const MenuContext: React.Context<MenuContextProps>;
16
18
  export declare const useMenuContext: () => MenuContextProps;
17
19
  export interface MenuProps extends HTMLAttributes<HTMLUListElement> {
18
20
  selectedMenu?: MenuContextProps['activeMenu'];
19
- onClickMenu?: (id: MenuContextProps['activeMenuGroup']) => void;
21
+ onClickMenu?: (id: MenuContextProps['activeMenu']) => void;
22
+ /**
23
+ * MenuGroup 서브 메뉴 open/close시 이벤트를 전달합니다.
24
+ */
25
+ onMenuGroupOpenChange?: (id: MenuContextProps['activeMenuGroup']) => void;
20
26
  /**
21
27
  * Toggle 기능 사용 여부
22
28
  */
23
29
  toggleMode?: MenuContextProps['toggleMode'];
30
+ /**
31
+ * @default true
32
+ */
33
+ dense?: boolean;
24
34
  }
25
35
  export declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLUListElement>>;
@@ -1,3 +1,11 @@
1
1
  export declare const menu_base_css: import("@emotion/utils").SerializedStyles;
2
2
  export declare const menu_item_base_css: import("@emotion/utils").SerializedStyles;
3
3
  export declare const menu_group_item_css: import("@emotion/utils").SerializedStyles;
4
+ export declare function getMenuGroupStyles(dense: boolean): {
5
+ height: number;
6
+ padding: string;
7
+ };
8
+ export declare function getMenuItemStyles(dense: boolean): {
9
+ height: number;
10
+ padding: string;
11
+ };
@@ -1,10 +1,13 @@
1
1
  import { CSSProperties } from 'react';
2
+ import { Typography } from '../../foundation';
3
+ import { CSSValueWithLength } from '../../styles';
2
4
  export declare const TopBar: {
3
5
  Container: import("@emotion/styled").StyledComponent<{
4
6
  theme?: import("@emotion/react").Theme;
5
7
  as?: import("react").ElementType<any>;
6
8
  } & {
7
9
  backgroundColor?: CSSProperties['backgroundColor'];
10
+ height?: CSSValueWithLength;
8
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
12
  Title: import("@emotion/styled").StyledComponent<{
10
13
  theme?: import("@emotion/react").Theme;
@@ -14,12 +17,10 @@ export declare const TopBar: {
14
17
  theme?: import("@emotion/react").Theme;
15
18
  as?: import("react").ElementType<any>;
16
19
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
- Divider: import("@emotion/styled").StyledComponent<{
18
- theme?: import("@emotion/react").Theme;
19
- as?: import("react").ElementType<any>;
20
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
21
20
  ActionButton: import("@emotion/styled").StyledComponent<{
22
21
  theme?: import("@emotion/react").Theme;
23
22
  as?: import("react").ElementType<any>;
23
+ } & {
24
+ kind?: Typography;
24
25
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
25
26
  };
@@ -3,3 +3,4 @@ declare const _default: {
3
3
  };
4
4
  export default _default;
5
5
  export declare const Base: any;
6
+ export declare const Mobile: any;
@@ -5,6 +5,7 @@ export declare const semantic_colors: {
5
5
  elevated: string;
6
6
  disabled: string;
7
7
  base_inverse: string;
8
+ scrim: any;
8
9
  };
9
10
  border: {
10
11
  default: string;