@croquiscom/pds 0.22.0 → 0.23.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 +31 -0
- package/README.md +13 -7
- package/dist/button/Button.d.ts +4 -4
- package/dist/button/Button.stories.d.ts +1 -7
- package/dist/button/IconButton.d.ts +10 -5
- package/dist/button/IconButton.stories.d.ts +2 -4
- package/dist/button/TextButton.d.ts +1 -1
- package/dist/button/styles.d.ts +2 -2
- package/dist/button/types.d.ts +2 -2
- package/dist/dropdown/styles.d.ts +4 -11
- package/dist/images/{Images.stories.d.ts → Image.stories.d.ts} +0 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/input/InputBase.d.ts +7 -2
- package/dist/input/styles.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 0.23.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3b77d51: 전역 Reset 스타일 box-sizing: border-box 추가
|
|
8
|
+
|
|
9
|
+
## 0.23.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ddf084e: Input, Textarea, Dropdown 컴포넌트 스타일 변경
|
|
14
|
+
- 5497c25: Button, IconButton variant 및 스타일 변경
|
|
15
|
+
|
|
16
|
+
## BreakPoint
|
|
17
|
+
|
|
18
|
+
Button variant가 다음과 같이 변경되었습니다.
|
|
19
|
+
|
|
20
|
+
- variant => kind
|
|
21
|
+
- variant 제거
|
|
22
|
+
- brand
|
|
23
|
+
- negative
|
|
24
|
+
- outlined_primary
|
|
25
|
+
- outlined_black
|
|
26
|
+
- outlined_white
|
|
27
|
+
- outlined_negative
|
|
28
|
+
- dotted
|
|
29
|
+
|
|
30
|
+
IconButton variant가 다음과 같이 변경되었습니다.
|
|
31
|
+
|
|
32
|
+
- variant => kind
|
|
33
|
+
|
|
3
34
|
## 0.22.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -68,6 +68,10 @@ yarn storybook
|
|
|
68
68
|
│ │ ├── generated
|
|
69
69
|
│ │ ├── Icon.stories.tsx
|
|
70
70
|
│ │ └── Icon.stories.mdx
|
|
71
|
+
│ ├── images
|
|
72
|
+
│ │ ├── generated
|
|
73
|
+
│ │ ├── Images.stories.tsx
|
|
74
|
+
│ │ └── Images.stories.mdx
|
|
71
75
|
│ ├── global_styles
|
|
72
76
|
│ ├── themes
|
|
73
77
|
│ ├── styles
|
|
@@ -76,8 +80,10 @@ yarn storybook
|
|
|
76
80
|
│ ├── types
|
|
77
81
|
│ └── index.ts
|
|
78
82
|
└── tools
|
|
79
|
-
├── svgr-component-template.js
|
|
80
|
-
|
|
83
|
+
├── svgr-icons-component-template.js
|
|
84
|
+
├── svgr-icons-template.js
|
|
85
|
+
├── svgr-images-component-template.js
|
|
86
|
+
└── svgr-images-template.js
|
|
81
87
|
```
|
|
82
88
|
|
|
83
89
|
- **[COMPONENT]**: 컴포넌트 디렉토리 이름은 소문자, 구분자는 -로 (eg. toggle-switch) 작성합니다. 하위에는 관련 컴포넌트 파일과 해당 컴포넌트의 스토리북(`*.stories.tsx`) 파일을 포함합니다.
|
|
@@ -86,7 +92,7 @@ yarn storybook
|
|
|
86
92
|
- 각 컴포넌트 디렉토리와 src 하위의 `index.ts`를 통해 export 합니다.
|
|
87
93
|
- **global_styles**: 리셋 스타일을 포함한 글로벌 스타일을 포함합니다.
|
|
88
94
|
- 리셋 스타일을 위한 class 네임은 prefix로 `pds-`를 붙여줍니다.
|
|
89
|
-
- **
|
|
95
|
+
- **foundation**: color, typography와 같은 theme과 관련된 스타일, 스타일 토큰을 포함합니다.
|
|
90
96
|
- **styles**: 컴포넌트에 공용으로 사용할 스타일, 스타일 함수를 포함합니다.
|
|
91
97
|
- **hooks**: 커스텀 훅을 포함합니다.
|
|
92
98
|
- **stories**: 스토리북용 컴포넌트나 스타일, 컴포넌트 외의 스토리북 문서
|
|
@@ -95,12 +101,12 @@ yarn storybook
|
|
|
95
101
|
|
|
96
102
|
### 아이콘 추가
|
|
97
103
|
|
|
98
|
-
⚠️ SVGR을 통해 svg파일을 리액트 컴포넌트로 제네레이트합니다. `src/icons/generated` 하위에서 직접 수정하지 말아주세요!
|
|
104
|
+
⚠️ SVGR을 통해 svg파일을 리액트 컴포넌트로 제네레이트합니다. `src/[icons|images]/generated` 하위에서 직접 수정하지 말아주세요!
|
|
99
105
|
|
|
100
|
-
- `assets/icons`에 svg를 추가합니다.
|
|
106
|
+
- `assets/icons`, `assets/images`에 svg를 추가합니다.
|
|
101
107
|
- `yarn svgr`을 실행합니다.
|
|
102
|
-
- `src/icons/generated` 하위에 제네레이트된 아이콘 리액트 컴포넌트와 `src/icons/generated/index.ts`에 해당 컴포넌트의 export가 추가된 것을 확인합니다.
|
|
103
|
-
- `yarn storybook`을 실행하여 스토리북 내에서 Icon/Icons 메뉴로 이동하여 목록에서 해당 아이콘이 잘 추가되었는지 확입니다.
|
|
108
|
+
- `src/[icons|images]/generated` 하위에 제네레이트된 아이콘 리액트 컴포넌트와 `src/[icons|images]/generated/index.ts`에 해당 컴포넌트의 export가 추가된 것을 확인합니다.
|
|
109
|
+
- `yarn storybook`을 실행하여 스토리북 내에서 Icon/Icons, Image/Images 메뉴로 이동하여 목록에서 해당 아이콘이 잘 추가되었는지 확입니다.
|
|
104
110
|
|
|
105
111
|
### PR
|
|
106
112
|
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes, ReactElement } from 'react';
|
|
2
|
-
import { ButtonSize,
|
|
2
|
+
import { ButtonSize, ButtonKind } from './types';
|
|
3
3
|
import { IconProps } from '../icons/generated';
|
|
4
4
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
5
5
|
fill?: boolean;
|
|
6
6
|
/** @default secondary */
|
|
7
|
-
|
|
7
|
+
kind?: ButtonKind;
|
|
8
8
|
/** @default medium */
|
|
9
9
|
size?: ButtonSize;
|
|
10
10
|
/** @default button */
|
|
11
11
|
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
12
12
|
/** @default false */
|
|
13
13
|
loading?: boolean;
|
|
14
|
-
/** 좌측 영역에 렌더링 될 아이콘 요소 */
|
|
14
|
+
/** @desc 좌측 영역에 렌더링 될 아이콘 요소 */
|
|
15
15
|
startIcon?: ReactElement<IconProps>;
|
|
16
|
-
/** 우측 영역에 렌더링 될 아이콘 요소 */
|
|
16
|
+
/** @desc 우측 영역에 렌더링 될 아이콘 요소 */
|
|
17
17
|
endIcon?: ReactElement<IconProps>;
|
|
18
18
|
}
|
|
19
19
|
export interface ButtonIconProps {
|
|
@@ -2,17 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { ComponentMeta } from '@storybook/react';
|
|
3
3
|
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Button").ButtonProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Brand: any;
|
|
6
5
|
export declare const Primary: any;
|
|
7
6
|
export declare const Secondary: any;
|
|
8
7
|
export declare const Black: any;
|
|
9
|
-
export declare const Negative: any;
|
|
10
|
-
export declare const OutlinedPrimary: any;
|
|
11
|
-
export declare const OutlinedNegative: any;
|
|
12
|
-
export declare const OutlinedBlack: any;
|
|
13
|
-
export declare const OutlinedWhite: any;
|
|
14
|
-
export declare const Dotted: any;
|
|
15
8
|
export declare const StartIcon: any;
|
|
16
9
|
export declare const EndIcon: any;
|
|
17
10
|
export declare const Loading: any;
|
|
11
|
+
export declare const FullWidth: any;
|
|
18
12
|
export declare const Focus: () => JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
|
-
import { ButtonShape,
|
|
2
|
+
import { ButtonShape, IconButtonKind } from './types';
|
|
3
3
|
import { ButtonProps } from './Button';
|
|
4
4
|
import { IconProps } from '../icons/generated';
|
|
5
|
-
export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' | 'startIcon' | 'endIcon'> {
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' | 'startIcon' | 'endIcon' | 'kind'> {
|
|
6
|
+
/**
|
|
7
|
+
* @desc shape 'circle'의 경우 적용되지 않습니다.
|
|
8
|
+
* @default outlined_secondary
|
|
9
|
+
*/
|
|
10
|
+
kind?: IconButtonKind;
|
|
11
|
+
/**
|
|
12
|
+
* @desc 렌더링 될 아이콘 요소
|
|
13
|
+
*/
|
|
9
14
|
icon?: ReactElement<IconProps>;
|
|
10
15
|
/** @default rectangle */
|
|
11
16
|
shape?: ButtonShape;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./IconButton").IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./IconButton").IconButtonProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
6
4
|
export default _default;
|
|
7
5
|
export declare const Rectangle: any;
|
|
8
6
|
export declare const Circle: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps } from './Button';
|
|
3
3
|
import { TextButtonKind, TextButtonSize } from './types';
|
|
4
|
-
export interface TextButtonProps extends Omit<ButtonProps, 'loading' | '
|
|
4
|
+
export interface TextButtonProps extends Omit<ButtonProps, 'loading' | 'kind'> {
|
|
5
5
|
/** @default text */
|
|
6
6
|
kind?: TextButtonKind;
|
|
7
7
|
/** @default false */
|
package/dist/button/styles.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ButtonSize,
|
|
1
|
+
import { ButtonSize, ButtonKind, ButtonShape, TextButtonKind, TextButtonSize, IconButtonKind } from './types';
|
|
2
2
|
export declare const button_base_css: import("@emotion/utils").SerializedStyles;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const getButtonKind: (kind?: ButtonKind | IconButtonKind) => import("@emotion/utils").SerializedStyles;
|
|
4
4
|
export declare const button_size_css: Record<ButtonSize, string>;
|
|
5
5
|
export declare const button_icon_size_css: Record<ButtonSize, number>;
|
|
6
6
|
export declare const text_button_icon_size_css: Record<TextButtonSize, number>;
|
package/dist/button/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare type
|
|
1
|
+
export declare type ButtonKind = 'primary' | 'secondary' | 'black';
|
|
2
2
|
export declare type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
3
3
|
export declare type ButtonShape = 'rectangle' | 'circle';
|
|
4
|
-
export declare type
|
|
4
|
+
export declare type IconButtonKind = 'outlined_secondary' | 'outlined_primary' | 'outlined_negative';
|
|
5
5
|
export declare type TextButtonKind = 'text' | 'link';
|
|
6
6
|
export declare type TextButtonSize = Exclude<ButtonSize, 'xsmall' | 'xlarge'>;
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
export declare const dropdown_label_base_css: import("@emotion/utils").SerializedStyles;
|
|
2
|
-
export declare const dropdown_label_expanded_style: {
|
|
3
|
-
border: string;
|
|
4
|
-
'&:hover': {
|
|
5
|
-
border: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
2
|
export declare const dropdown_label_selected_style: {
|
|
9
3
|
color: string;
|
|
10
4
|
};
|
|
11
5
|
export declare const dropdown_item_group_css: import("@emotion/utils").SerializedStyles;
|
|
12
6
|
export declare const dropdown_item_base_css: import("@emotion/utils").SerializedStyles;
|
|
13
7
|
export declare const dropdown_item_disabled_style: {
|
|
14
|
-
backgroundColor: string;
|
|
15
8
|
color: string;
|
|
16
9
|
cursor: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const dropdown_item_selected_style: {
|
|
19
|
-
backgroundColor: string;
|
|
20
|
-
color: string;
|
|
21
10
|
'&:hover, &:focus': {
|
|
22
11
|
backgroundColor: string;
|
|
23
12
|
};
|
|
24
13
|
};
|
|
14
|
+
export declare const dropdown_item_selected_style: {
|
|
15
|
+
color: string;
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
25
18
|
export declare const dropdown_item_focused_style: {
|
|
26
19
|
backgroundColor: string;
|
|
27
20
|
};
|
|
File without changes
|