@teamturing/react-kit 2.16.2 → 2.17.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/dist/core/Datagrid/DatagridSubheader.d.ts +6 -0
- package/dist/core/Datagrid/index.d.ts +1 -0
- package/dist/core/Overlay/index.d.ts +5 -4
- package/dist/core/Pill/index.d.ts +29 -13
- package/dist/core/TextInput/TextInputTrailingAction.d.ts +11 -0
- package/dist/core/TextInput/index.d.ts +10 -6
- package/dist/index.js +260 -121
- package/esm/core/Datagrid/DatagridBody.js +9 -0
- package/esm/core/Datagrid/DatagridSubheader.js +28 -0
- package/esm/core/Datagrid/index.js +5 -2
- package/esm/core/Overlay/index.js +11 -4
- package/esm/core/Pill/index.js +116 -77
- package/esm/core/Select/index.js +3 -3
- package/esm/core/TextInput/TextInputTrailingAction.js +58 -0
- package/esm/core/TextInput/index.js +23 -11
- package/esm/node_modules/styled-system/dist/index.esm.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SxProp } from '../../utils/styled-system';
|
|
3
|
+
type Props = {} & SxProp;
|
|
4
|
+
declare const DatagridSubheader: ({ ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default DatagridSubheader;
|
|
6
|
+
export type { Props as DatagridSubheaderProps };
|
|
@@ -7,6 +7,7 @@ import { DatagridRowProps } from './DatagridRow';
|
|
|
7
7
|
type Props = {} & HTMLAttributes<HTMLDivElement> & SxProp;
|
|
8
8
|
declare const _default: (({ children, sx, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
9
|
Header: ({ leadingVisual: LeadingVisual, trailingAction, ...props }: DatagridHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Subheader: ({ ...props }: PropsWithChildren<SxProp>) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
Body: ({ ...props }: PropsWithChildren<SxProp>) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
Row: ({ gapX, alignItems, justifyContent, sx, children, ...props }: PropsWithChildren<DatagridRowProps>) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
Cell: ({ children, ...props }: PropsWithChildren<Pick<import("../Grid").GridUnitProps, "size" | "sx">>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ResponsiveValue } from 'styled-system';
|
|
3
|
-
|
|
2
|
+
import { MaxHeightProps, ResponsiveValue } from 'styled-system';
|
|
3
|
+
import { SxProp } from '../../utils/styled-system';
|
|
4
|
+
type OverlaySizeType = 's' | 'm' | 'l' | 'auto';
|
|
4
5
|
type Props = {
|
|
5
6
|
isOpen?: boolean;
|
|
6
7
|
onDismiss?: () => void;
|
|
7
8
|
size?: ResponsiveValue<OverlaySizeType>;
|
|
8
9
|
ignoreOutsideClickRefs?: RefObject<HTMLElement>[];
|
|
9
10
|
dismissFocusRef?: RefObject<HTMLElement>;
|
|
10
|
-
} & HTMLAttributes<HTMLElement>;
|
|
11
|
+
} & MaxHeightProps & SxProp & HTMLAttributes<HTMLElement>;
|
|
11
12
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
12
13
|
isOpen?: boolean | undefined;
|
|
13
14
|
onDismiss?: (() => void) | undefined;
|
|
14
15
|
size?: ResponsiveValue<OverlaySizeType> | undefined;
|
|
15
16
|
ignoreOutsideClickRefs?: RefObject<HTMLElement>[] | undefined;
|
|
16
17
|
dismissFocusRef?: RefObject<HTMLElement> | undefined;
|
|
17
|
-
} & HTMLAttributes<HTMLElement> & {
|
|
18
|
+
} & MaxHeightProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxHeight<import("styled-system").TLengthStyledSystem>> & SxProp & HTMLAttributes<HTMLElement> & {
|
|
18
19
|
children?: import("react").ReactNode;
|
|
19
20
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
export default _default;
|
|
@@ -1,55 +1,71 @@
|
|
|
1
|
-
import { ComponentType, ElementType, ReactNode, SVGProps } from 'react';
|
|
1
|
+
import { ComponentType, ElementType, HTMLAttributes, ReactNode, SVGProps, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent } from 'react';
|
|
2
2
|
import { ResponsiveValue } from 'styled-system';
|
|
3
3
|
import { SxProp } from '../../utils/styled-system';
|
|
4
4
|
type Props = {
|
|
5
|
-
text?: string;
|
|
6
5
|
/**
|
|
7
6
|
* 크기를 정의합니다.
|
|
8
7
|
* 반응형 디자인이 적용됩니다.
|
|
9
8
|
*/
|
|
10
|
-
size?: ResponsiveValue<'
|
|
9
|
+
size?: ResponsiveValue<'m'>;
|
|
11
10
|
/**
|
|
12
11
|
* 색을 정의합니다.
|
|
13
12
|
* hover, active, focused, disabled, loading 등의 모든 상황에 관여합니다.
|
|
14
13
|
*/
|
|
15
|
-
variant?: ResponsiveValue<'
|
|
14
|
+
variant?: ResponsiveValue<'outlined'>;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
16
19
|
/**
|
|
17
20
|
* text 앞에 보여질 시각적 요소를 정의합니다. Icon, Image 등이 될 수 있습니다.
|
|
18
21
|
*/
|
|
19
22
|
leadingVisual?: ElementType | ReactNode;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* text 뒤에 보여질 시각적 요소를 정의합니다. Icon, Image 등이 될 수 있습니다.
|
|
25
|
+
*/
|
|
26
|
+
trailingVisual?: ElementType | ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* 없앨 수 있을 때 onRemove를 넘기면 삭제 버튼이 생깁니다.
|
|
22
29
|
*/
|
|
23
|
-
onRemove?: () => void;
|
|
30
|
+
onRemove?: (event: ReactMouseEvent<HTMLDivElement> | ReactKeyboardEvent<HTMLDivElement>) => void;
|
|
24
31
|
/**
|
|
25
32
|
* onRemove가 undefined가 아닐 때 나오는 삭제 버튼의 아이콘을 정의합니다.
|
|
26
33
|
*/
|
|
27
34
|
removeIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
28
|
-
} & SxProp
|
|
35
|
+
} & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, 'onClick'>;
|
|
29
36
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
30
|
-
text?: string | undefined;
|
|
31
37
|
/**
|
|
32
38
|
* 크기를 정의합니다.
|
|
33
39
|
* 반응형 디자인이 적용됩니다.
|
|
34
40
|
*/
|
|
35
|
-
size?: ResponsiveValue<"m"
|
|
41
|
+
size?: ResponsiveValue<"m"> | undefined;
|
|
36
42
|
/**
|
|
37
43
|
* 색을 정의합니다.
|
|
38
44
|
* hover, active, focused, disabled, loading 등의 모든 상황에 관여합니다.
|
|
39
45
|
*/
|
|
40
|
-
variant?: ResponsiveValue<"
|
|
46
|
+
variant?: ResponsiveValue<"outlined"> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean | undefined;
|
|
41
51
|
/**
|
|
42
52
|
* text 앞에 보여질 시각적 요소를 정의합니다. Icon, Image 등이 될 수 있습니다.
|
|
43
53
|
*/
|
|
44
54
|
leadingVisual?: string | number | boolean | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal | null | undefined;
|
|
45
55
|
/**
|
|
46
|
-
*
|
|
56
|
+
* text 뒤에 보여질 시각적 요소를 정의합니다. Icon, Image 등이 될 수 있습니다.
|
|
57
|
+
*/
|
|
58
|
+
trailingVisual?: string | number | boolean | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal | null | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* 없앨 수 있을 때 onRemove를 넘기면 삭제 버튼이 생깁니다.
|
|
47
61
|
*/
|
|
48
|
-
onRemove?: (() => void) | undefined;
|
|
62
|
+
onRemove?: ((event: ReactKeyboardEvent<HTMLDivElement> | ReactMouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
49
63
|
/**
|
|
50
64
|
* onRemove가 undefined가 아닐 때 나오는 삭제 버튼의 아이콘을 정의합니다.
|
|
51
65
|
*/
|
|
52
66
|
removeIcon?: ComponentType<SVGProps<SVGSVGElement>> | undefined;
|
|
53
|
-
} & SxProp &
|
|
67
|
+
} & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, "onClick"> & {
|
|
68
|
+
children?: ReactNode;
|
|
69
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
70
|
export default _default;
|
|
55
71
|
export type { Props as PillProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
|
+
import { SxProp } from '../../utils/styled-system';
|
|
3
|
+
import { UnstyledButtonProps } from '../_UnstyledButton';
|
|
4
|
+
type Props = {
|
|
5
|
+
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
6
|
+
} & UnstyledButtonProps;
|
|
7
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
9
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & SxProp & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default _default;
|
|
11
|
+
export type { Props as TextInputTrailingActionProps };
|
|
@@ -17,23 +17,27 @@ type Props = {
|
|
|
17
17
|
*/
|
|
18
18
|
trailingAction?: React.ReactElement<HTMLProps<HTMLButtonElement>>;
|
|
19
19
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
20
|
-
declare const
|
|
20
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
21
21
|
/**
|
|
22
22
|
* TODO asdf
|
|
23
23
|
*/
|
|
24
|
-
validationStatus?:
|
|
24
|
+
validationStatus?: "error" | "success" | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* 입력 창 앞에 보여질 시각적 요소를 정의합니다. Icon, Text, Image 등이 될 수 있습니다.
|
|
27
27
|
*/
|
|
28
|
-
leadingVisual?:
|
|
28
|
+
leadingVisual?: string | number | boolean | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal | null | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* 입력 창 뒤에 보여질 시각적 요소를 정의합니다. Icon, Text, Image 등이 될 수 있습니다.
|
|
31
31
|
*/
|
|
32
|
-
trailingVisual?:
|
|
32
|
+
trailingVisual?: string | number | boolean | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal | null | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* 입력 창 뒤에 사용작용할 요소를 정의합니다.
|
|
35
35
|
*/
|
|
36
36
|
trailingAction?: import("react").ReactElement<HTMLProps<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
37
|
-
} & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement
|
|
38
|
-
|
|
37
|
+
} & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>> & {
|
|
38
|
+
TrailingAction: import("react").ForwardRefExoticComponent<{
|
|
39
|
+
icon: import("react").ComponentType<import("react").SVGProps<SVGSVGElement>>;
|
|
40
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("../..").SxProp & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
39
43
|
export type { Props as TextInputProps };
|