@croquiscom/pds 2.2.2 → 2.3.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,11 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1b05275: FormField Position Props 추가 및 Checkbox default border-radius 변경 (0->4)
8
+
3
9
  ## 2.2.2
4
10
 
5
11
  ### 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?: 'top' | 'center';
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;
@@ -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 {};