@croquiscom/pds 3.10.0 → 3.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 +6 -0
- package/dist/components/radio/BoxRadioGroup.stories.d.ts +1 -0
- package/dist/components/radio/Radio.d.ts +5 -1
- package/dist/components/radio/RadioGroup.d.ts +8 -2
- package/dist/components/radio/RadioGroup.stories.d.ts +1 -0
- package/dist/components/radio/styles.d.ts +3 -2
- 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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { AriaFocusProps } from '../../types/common';
|
|
3
|
-
import { RadioCategoryType, RadioItemType } from './RadioGroup';
|
|
3
|
+
import { RadioCategoryType, RadioItemType, RadioWidthType } from './RadioGroup';
|
|
4
4
|
interface RadioBaseType extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'>, AriaFocusProps {
|
|
5
5
|
}
|
|
6
6
|
export interface RadioProps extends RadioBaseType, RadioCategoryType<RadioItemType> {
|
|
@@ -8,6 +8,10 @@ export interface RadioProps extends RadioBaseType, RadioCategoryType<RadioItemTy
|
|
|
8
8
|
* @default false
|
|
9
9
|
*/
|
|
10
10
|
fill?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @default 'auto'
|
|
13
|
+
*/
|
|
14
|
+
width?: RadioWidthType;
|
|
11
15
|
className?: string;
|
|
12
16
|
}
|
|
13
17
|
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,6 +3,7 @@ import { AriaFocusProps } from '../../types/common';
|
|
|
3
3
|
import { RadioSizeUnion } from './types';
|
|
4
4
|
export type AlignType = 'horizontal' | 'vertical';
|
|
5
5
|
export type RadioItemType = 'default' | 'box';
|
|
6
|
+
export type RadioWidthType = 'fill' | 'auto';
|
|
6
7
|
export interface RadioCategoryType<T> {
|
|
7
8
|
radioItemType?: T;
|
|
8
9
|
/**
|
|
@@ -24,16 +25,21 @@ export interface RadioGroupProps<RadioValue> extends Omit<React.HTMLAttributes<H
|
|
|
24
25
|
name?: string;
|
|
25
26
|
items: RadioItem<RadioValue>[];
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* RadioItemType - box 일경우 spacing 속성은 미적용됩니다.
|
|
28
29
|
* @default 24
|
|
29
30
|
*/
|
|
30
31
|
spacing?: number;
|
|
31
32
|
disabled?: boolean;
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* RadioItemType - box 일경우 align 속성은 'horizontal' 고정입니다.
|
|
34
35
|
* @default horizontal
|
|
35
36
|
*/
|
|
36
37
|
align?: AlignType;
|
|
38
|
+
/**
|
|
39
|
+
* 'fill' 일경우 Full Width 값, 'auto' 일경우 기본 너비 값으로 적용됩니다.
|
|
40
|
+
* @default 'auto'
|
|
41
|
+
*/
|
|
42
|
+
width?: RadioWidthType;
|
|
37
43
|
keyExtractor?: (item: RadioItem<RadioValue>, index: number) => string | number;
|
|
38
44
|
onChange?: (value: RadioValue) => void;
|
|
39
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RadioItemType, AlignType, RadioCategoryType } from './RadioGroup';
|
|
1
|
+
import { RadioItemType, AlignType, RadioCategoryType, RadioWidthType } from './RadioGroup';
|
|
2
2
|
import { RadioSizeUnion } from './types';
|
|
3
3
|
export declare const getRadioGroupStyleByProps: ({ radio_item_type, align, spacing, }: {
|
|
4
4
|
radio_item_type?: RadioItemType;
|
|
@@ -9,9 +9,10 @@ export declare const radio_size_css: Record<RadioSizeUnion, string>;
|
|
|
9
9
|
export declare const getRadioWidthBySize: (size: RadioSizeUnion) => number;
|
|
10
10
|
interface RadioStyleProps extends RadioCategoryType<RadioItemType> {
|
|
11
11
|
fill?: boolean;
|
|
12
|
+
width?: RadioWidthType;
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
checked?: boolean;
|
|
14
15
|
focused?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare const getRadioStyleByProps: ({ radioItemType, fill, size, disabled, checked, focused }: RadioStyleProps) => import("@emotion/utils").SerializedStyles;
|
|
17
|
+
export declare const getRadioStyleByProps: ({ radioItemType, fill, width, size, disabled, checked, focused, }: RadioStyleProps) => import("@emotion/utils").SerializedStyles;
|
|
17
18
|
export {};
|