@croquiscom/pds 2.2.2 → 2.4.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 +12 -0
- package/dist/components/form/FormField.d.ts +12 -2
- package/dist/components/form/FormField.stories.d.ts +2 -1
- package/dist/components/modal/Modal.d.ts +3 -1
- package/dist/components/modal/Modal.stories.d.ts +1 -0
- package/dist/components/stack/HStack.d.ts +1 -2
- package/dist/components/stack/VStack.d.ts +1 -2
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c0a6b2c: Modal ContentProps scrollable 속성 추가
|
|
8
|
+
|
|
9
|
+
## 2.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 1b05275: FormField Position Props 추가 및 Checkbox default border-radius 변경 (0->4)
|
|
14
|
+
|
|
3
15
|
## 2.2.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { HelpTextProps } from '../text';
|
|
3
|
+
import { VerticalAlignment } from '../stack';
|
|
3
4
|
import { CSSValueWithLength } from '../../styles';
|
|
5
|
+
type FormFieldAlignment = Extract<VerticalAlignment, 'top' | 'center'>;
|
|
6
|
+
type FormFieldPosition = 'left' | 'top';
|
|
4
7
|
export interface FormFieldProps {
|
|
5
8
|
className?: string;
|
|
6
9
|
label?: ReactNode;
|
|
@@ -24,6 +27,13 @@ export interface FormFieldProps {
|
|
|
24
27
|
* label, children 정렬를 지정할 수 있습니다.
|
|
25
28
|
* @default center
|
|
26
29
|
*/
|
|
27
|
-
alignment?:
|
|
30
|
+
alignment?: FormFieldAlignment;
|
|
31
|
+
/**
|
|
32
|
+
* label 위치를 지정할 수 있습니다.
|
|
33
|
+
* - position 이 top 인 경우 좌측 정렬 고정입니다.
|
|
34
|
+
* @default left
|
|
35
|
+
*/
|
|
36
|
+
position?: FormFieldPosition;
|
|
28
37
|
}
|
|
29
|
-
export declare const FormField: ({ className, label, rightAddon, required, helper, labelWidth, alignment, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
|
|
38
|
+
export declare const FormField: ({ className, label, rightAddon, required, helper, labelWidth, alignment, position, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { FormField } from './FormField';
|
|
4
|
-
declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, labelWidth, alignment, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, labelWidth, alignment, position, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const LabelWidth: any;
|
|
@@ -9,3 +9,4 @@ export declare const WithRadioGroup: ComponentStory<typeof FormField>;
|
|
|
9
9
|
export declare const WithCheckboxGroup: ComponentStory<typeof FormField>;
|
|
10
10
|
export declare const WithHelpPopover: any;
|
|
11
11
|
export declare const TopAlign: any;
|
|
12
|
+
export declare const TopPosition: any;
|
|
@@ -6,6 +6,7 @@ export type ModalButtonProps = Omit<ButtonProps, 'onClick'>;
|
|
|
6
6
|
export type ModalCancelReason = ModalBaseCancelReason;
|
|
7
7
|
export interface ModalContentProps extends SpaceProps {
|
|
8
8
|
maxHeight?: CSSValueWithLength;
|
|
9
|
+
scrollable?: boolean;
|
|
9
10
|
}
|
|
10
11
|
type LayoutHeightType = {
|
|
11
12
|
header: number;
|
|
@@ -40,7 +41,8 @@ export interface ModalProps extends Omit<ModalOverlayBaseProps, 'onClose'> {
|
|
|
40
41
|
/**
|
|
41
42
|
* 바디 영역 콘텐츠 ModalContentProps를 통한 커스텀이 가능합니다.
|
|
42
43
|
* - [SpaceProps](https://github.com/croquiscom/pds/blob/main/src/styles/space.ts)
|
|
43
|
-
* - maxHeight
|
|
44
|
+
* - maxHeight: 콘텐츠 영역 maxHeight을 커스텀할 수 있습니다. 지정하지 않을 경우 안전여백내에서 계산된 자동 최대 maxHeight값이 적용됩니다.
|
|
45
|
+
* - scrollable: true일 경우 콘텐츠 영역에 overflow-y: auto값이 적용됩니다.
|
|
44
46
|
*/
|
|
45
47
|
contentProps?: ModalContentProps;
|
|
46
48
|
/**
|
|
@@ -18,3 +18,4 @@ export declare const FullScreen: ComponentStory<typeof Modal>;
|
|
|
18
18
|
export declare const CustomFooterFullScreen: ComponentStory<typeof Modal>;
|
|
19
19
|
export declare const AutoMaxHeight: ComponentStory<typeof Modal>;
|
|
20
20
|
export declare const CustomMaxHeight: ComponentStory<typeof Modal>;
|
|
21
|
+
export declare const Scrollable: ComponentStory<typeof Modal>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StackProps } from './types';
|
|
3
|
-
type VerticalAlignment = 'stretch' | 'top' | 'bottom' | 'center';
|
|
3
|
+
export type VerticalAlignment = 'stretch' | 'top' | 'bottom' | 'center';
|
|
4
4
|
export interface HStackProps extends StackProps {
|
|
5
5
|
alignment?: VerticalAlignment;
|
|
6
6
|
}
|
|
@@ -8,4 +8,3 @@ export declare const HStack: import("@emotion/styled").StyledComponent<{
|
|
|
8
8
|
theme?: import("@emotion/react").Theme;
|
|
9
9
|
as?: import("react").ElementType<any>;
|
|
10
10
|
} & HStackProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StackProps } from './types';
|
|
3
|
-
type HorizontalAlignment = 'stretch' | 'leading' | 'trailing' | 'center';
|
|
3
|
+
export type HorizontalAlignment = 'stretch' | 'leading' | 'trailing' | 'center';
|
|
4
4
|
export interface VStackProps extends StackProps {
|
|
5
5
|
alignment?: HorizontalAlignment;
|
|
6
6
|
}
|
|
@@ -8,4 +8,3 @@ export declare const VStack: import("@emotion/styled").StyledComponent<{
|
|
|
8
8
|
theme?: import("@emotion/react").Theme;
|
|
9
9
|
as?: import("react").ElementType<any>;
|
|
10
10
|
} & VStackProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
-
export {};
|