@teamturing/react-kit 2.21.8 → 2.21.9
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ViewProps } from '../View';
|
|
2
3
|
import { FormControlCaptionProps } from './FormControlCaption';
|
|
3
4
|
import { FormControlErrorMessageProps } from './FormControlErrorMessage';
|
|
4
5
|
import { FormControlLabelProps } from './FormControlLabel';
|
|
@@ -22,7 +23,7 @@ type Props = {
|
|
|
22
23
|
* FormControl이 허용하는 Input 컴포넌트를 추가로 정의합니다.
|
|
23
24
|
*/
|
|
24
25
|
additionalInputComponentCandidates?: any[];
|
|
25
|
-
}
|
|
26
|
+
} & Pick<ViewProps, 'sx'>;
|
|
26
27
|
type FormControlFieldProps = {
|
|
27
28
|
name: string;
|
|
28
29
|
label: string;
|
|
@@ -30,7 +31,26 @@ type FormControlFieldProps = {
|
|
|
30
31
|
};
|
|
31
32
|
type FormControlContextValue = {} & Omit<Props, 'additionalInputComponentCandidates'>;
|
|
32
33
|
declare const FormControlContext: import("react").Context<Omit<Props, "additionalInputComponentCandidates">>;
|
|
33
|
-
declare const _default: import("react").ForwardRefExoticComponent<
|
|
34
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
35
|
+
/**
|
|
36
|
+
* `FormControl`의 Input 요소를 컨트롤하기 위한 ID입니다. `Label`, `Caption`과 연결짓기 위해 사용합니다.
|
|
37
|
+
*/
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* 사용자의 입력을 허용할지에 대한 여부입니다.
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* 사용자의 입력을 필요로 하는지에 대한 여부입니다.
|
|
45
|
+
*/
|
|
46
|
+
required?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* @default TextInput, Select, SearchSelectInput, Checkbox
|
|
49
|
+
*
|
|
50
|
+
* FormControl이 허용하는 Input 컴포넌트를 추가로 정의합니다.
|
|
51
|
+
*/
|
|
52
|
+
additionalInputComponentCandidates?: any[] | undefined;
|
|
53
|
+
} & Pick<ViewProps, "sx"> & {
|
|
34
54
|
children?: import("react").ReactNode;
|
|
35
55
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
36
56
|
Label: ({ children, visuallyHidden, ...props }: PropsWithChildren<FormControlLabelProps>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -22738,7 +22738,8 @@ const FormControl = ({
|
|
|
22738
22738
|
id,
|
|
22739
22739
|
disabled,
|
|
22740
22740
|
required,
|
|
22741
|
-
additionalInputComponentCandidates = []
|
|
22741
|
+
additionalInputComponentCandidates = [],
|
|
22742
|
+
sx
|
|
22742
22743
|
}, ref) => {
|
|
22743
22744
|
const [relocatableComponentsObject, restComponents] = useRelocation({
|
|
22744
22745
|
children: propChildren,
|
|
@@ -22762,7 +22763,8 @@ const FormControl = ({
|
|
|
22762
22763
|
ref: ref,
|
|
22763
22764
|
display: 'flex',
|
|
22764
22765
|
sx: {
|
|
22765
|
-
columnGap: 2
|
|
22766
|
+
columnGap: 2,
|
|
22767
|
+
...sx
|
|
22766
22768
|
},
|
|
22767
22769
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
22768
22770
|
display: 'inline-flex',
|
|
@@ -22789,7 +22791,8 @@ const FormControl = ({
|
|
|
22789
22791
|
},
|
|
22790
22792
|
'& > span': {
|
|
22791
22793
|
mt: 1
|
|
22792
|
-
}
|
|
22794
|
+
},
|
|
22795
|
+
...sx
|
|
22793
22796
|
},
|
|
22794
22797
|
children: [relocatableComponentsObject.label, /*#__PURE__*/React.cloneElement(InputComponent, {
|
|
22795
22798
|
id,
|
|
@@ -19,7 +19,8 @@ const FormControl = ({
|
|
|
19
19
|
id,
|
|
20
20
|
disabled,
|
|
21
21
|
required,
|
|
22
|
-
additionalInputComponentCandidates = []
|
|
22
|
+
additionalInputComponentCandidates = [],
|
|
23
|
+
sx
|
|
23
24
|
}, ref) => {
|
|
24
25
|
const [relocatableComponentsObject, restComponents] = useRelocation({
|
|
25
26
|
children: propChildren,
|
|
@@ -43,7 +44,8 @@ const FormControl = ({
|
|
|
43
44
|
ref: ref,
|
|
44
45
|
display: 'flex',
|
|
45
46
|
sx: {
|
|
46
|
-
columnGap: 2
|
|
47
|
+
columnGap: 2,
|
|
48
|
+
...sx
|
|
47
49
|
},
|
|
48
50
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
49
51
|
display: 'inline-flex',
|
|
@@ -70,7 +72,8 @@ const FormControl = ({
|
|
|
70
72
|
},
|
|
71
73
|
'& > span': {
|
|
72
74
|
mt: 1
|
|
73
|
-
}
|
|
75
|
+
},
|
|
76
|
+
...sx
|
|
74
77
|
},
|
|
75
78
|
children: [relocatableComponentsObject.label, /*#__PURE__*/cloneElement(InputComponent, {
|
|
76
79
|
id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.9",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "693b38dd227d8d3a01521d9d42feb44dd29ac975"
|
|
70
70
|
}
|