@croquiscom/pds 0.10.0 → 0.11.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,17 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fca25bf: FormField 컴포넌트 추가
8
+
9
+ ## 0.10.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 530de3d: IconProp 커스텀 불가한 케이스 오버라이딩 제거
14
+
3
15
  ## 0.10.0
4
16
 
5
17
  ### Minor Changes
@@ -1,11 +1,12 @@
1
1
  import React, { ReactElement } from 'react';
2
2
  import { ButtonShape, IconButtonVariant } from './types';
3
3
  import { ButtonProps } from './Button';
4
+ import { IconProps } from '../icons/generated';
4
5
  export interface IconButtonProps extends Omit<ButtonProps, 'size'> {
5
6
  /** @default secondary */
6
7
  variant?: IconButtonVariant;
7
8
  /** 렌더링 될 아이콘 요소 */
8
- icon?: ReactElement;
9
+ icon?: ReactElement<IconProps>;
9
10
  /** @default rectangle */
10
11
  shape?: ButtonShape;
11
12
  }
@@ -0,0 +1,10 @@
1
+ import { ReactNode, PropsWithChildren } from 'react';
2
+ import { HelpTextProps } from '../text';
3
+ export interface FormFieldProps {
4
+ className?: string;
5
+ label?: string;
6
+ rightAddon?: ReactNode;
7
+ required?: boolean;
8
+ helper?: HelpTextProps;
9
+ }
10
+ export declare const FormField: ({ className, label, rightAddon, required, helper, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { FormField } from './FormField';
4
+ declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
5
+ export default _default;
6
+ export declare const Base: any;
7
+ export declare const WithRadioGroup: ComponentStory<typeof FormField>;
8
+ export declare const WithCheckboxGroup: ComponentStory<typeof FormField>;
9
+ export declare const WithHelpPopover: any;
@@ -1,9 +1,10 @@
1
1
  import React, { ReactNode, LabelHTMLAttributes } from 'react';
2
+ import { HelpTextProps } from '../text';
2
3
  export interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
3
4
  /** @default false */
4
5
  required?: boolean;
5
- /** help 팝오버 요소 TODO(sally): popover 개발시 외부 ReactNode 주입 제거 및 타입 제한 */
6
- helper?: ReactNode;
6
+ /** 라벨 help 팝오버 콘텐츠 */
7
+ helper?: HelpTextProps;
7
8
  /** 라벨 우측 렌더링될 Addon 요소 */
8
9
  rightAddon?: ReactNode;
9
10
  }