@teamturing/react-kit 2.19.14 → 2.19.15
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/Dialog/index.d.ts +3 -1
- package/dist/core/FormControl/index.d.ts +1 -1
- package/dist/core/Pagination/index.d.ts +1 -1
- package/dist/core/{OverlaySelectInput → SearchSelectInput}/index.d.ts +20 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +423 -336
- package/esm/core/Dialog/index.js +2 -1
- package/esm/core/FormControl/index.js +2 -2
- package/esm/core/Pagination/index.js +3 -0
- package/esm/core/Pill/index.js +1 -0
- package/esm/core/{OverlaySelectInput → SearchSelectInput}/index.js +127 -40
- package/esm/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, RefObject } from 'react';
|
|
2
2
|
import { SxProp } from '../../utils/styled-system';
|
|
3
3
|
import { DialogBodyProps } from './DialogBody';
|
|
4
4
|
import { DialogFooterProps } from './DialogFooter';
|
|
@@ -13,11 +13,13 @@ type Props = {
|
|
|
13
13
|
isOpen?: boolean;
|
|
14
14
|
onDismiss?: () => void;
|
|
15
15
|
size?: DialogSizeType;
|
|
16
|
+
initialFocusRef?: RefObject<HTMLElement>;
|
|
16
17
|
} & SxProp;
|
|
17
18
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
18
19
|
isOpen?: boolean | undefined;
|
|
19
20
|
onDismiss?: (() => void) | undefined;
|
|
20
21
|
size?: DialogSizeType | undefined;
|
|
22
|
+
initialFocusRef?: RefObject<HTMLElement> | undefined;
|
|
21
23
|
} & SxProp & {
|
|
22
24
|
children?: import("react").ReactNode;
|
|
23
25
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
@@ -28,7 +28,7 @@ type Props<T extends {
|
|
|
28
28
|
type PaginationPageProps = {
|
|
29
29
|
selected?: boolean;
|
|
30
30
|
};
|
|
31
|
-
type PaginationPageDirectionProps = Pick<UnstyledButtonProps, 'onClick' | 'disabled'>;
|
|
31
|
+
type PaginationPageDirectionProps = Pick<UnstyledButtonProps, 'onClick' | 'disabled' | 'type'>;
|
|
32
32
|
declare const _default: (<T extends {
|
|
33
33
|
label: string;
|
|
34
34
|
}>({ pages: propPages, currentPageIndex, aroundPageCount, edgePageCount, type, sx, onPageClick, onPreviousClick, onNextClick, renderPage, renderPageWrapper, renderPreviousPageDirection, renderNextPageDirection, renderTruncationIndicator, }: Props<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ElementType, InputHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
2
|
import { OverlayPopperProps } from '../OverlayPopper';
|
|
3
|
+
import { TextInputProps } from '../TextInput';
|
|
3
4
|
type Props<T extends {
|
|
4
5
|
label: string;
|
|
5
|
-
value
|
|
6
|
+
value?: string | number | readonly string[];
|
|
6
7
|
}> = {
|
|
7
8
|
/**
|
|
8
9
|
* TODO asdf
|
|
@@ -12,15 +13,20 @@ type Props<T extends {
|
|
|
12
13
|
* 입력 창 앞에 보여질 시각적 요소를 정의합니다. Icon, Text, Image 등이 될 수 있습니다.
|
|
13
14
|
*/
|
|
14
15
|
leadingVisual?: ElementType | ReactNode;
|
|
15
|
-
children: (
|
|
16
|
+
children: (selectionHandler: {
|
|
16
17
|
handleSelect: (item: T) => void;
|
|
18
|
+
}, overlayHandler: {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
closeOverlay: () => void;
|
|
17
21
|
}) => ReactNode;
|
|
18
22
|
onChange?: (item: T) => void;
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
searchInputProps?: Pick<TextInputProps, 'placeholder' | 'trailingVisual' | 'trailingAction' | 'onChange'>;
|
|
24
|
+
renderValue?: (value: T['value']) => ReactNode;
|
|
25
|
+
} & Pick<OverlayPopperProps, 'focusTrapSettings' | 'focusZoneSettings' | 'onClose' | 'onOpen'> & Pick<InputHTMLAttributes<HTMLInputElement>, 'id' | 'disabled' | 'onClick' | 'placeholder' | 'value'>;
|
|
26
|
+
declare const SearchSelectInput: <T extends {
|
|
21
27
|
label: string;
|
|
22
28
|
value: string | number | readonly string[];
|
|
23
|
-
}>({ validationStatus, leadingVisual: LeadingVisual, children, onChange, focusTrapSettings, focusZoneSettings, onOpen, onClose, ...props }: Props<T>, ref: Ref<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
}>({ validationStatus, leadingVisual: LeadingVisual, children, onChange, focusTrapSettings, focusZoneSettings, onOpen, onClose, searchInputProps, value, renderValue, ...props }: Props<T>, ref: Ref<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element;
|
|
24
30
|
declare const _default: <T extends {
|
|
25
31
|
label: string;
|
|
26
32
|
value: string | number | readonly string[];
|
|
@@ -33,12 +39,17 @@ declare const _default: <T extends {
|
|
|
33
39
|
* 입력 창 앞에 보여질 시각적 요소를 정의합니다. Icon, Text, Image 등이 될 수 있습니다.
|
|
34
40
|
*/
|
|
35
41
|
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;
|
|
36
|
-
children: (
|
|
42
|
+
children: (selectionHandler: {
|
|
37
43
|
handleSelect: (item: T) => void;
|
|
44
|
+
}, overlayHandler: {
|
|
45
|
+
isOpen: boolean;
|
|
46
|
+
closeOverlay: () => void;
|
|
38
47
|
}) => ReactNode;
|
|
39
48
|
onChange?: ((item: T) => void) | undefined;
|
|
40
|
-
|
|
49
|
+
searchInputProps?: Pick<TextInputProps, "placeholder" | "onChange" | "trailingVisual" | "trailingAction"> | undefined;
|
|
50
|
+
renderValue?: ((value: T["value"]) => ReactNode) | undefined;
|
|
51
|
+
} & Pick<OverlayPopperProps, "onClose" | "focusZoneSettings" | "focusTrapSettings" | "onOpen"> & Pick<InputHTMLAttributes<HTMLInputElement>, "disabled" | "placeholder" | "value" | "id" | "onClick"> & {
|
|
41
52
|
ref?: Ref<HTMLInputElement> | undefined;
|
|
42
|
-
}) => ReturnType<typeof
|
|
53
|
+
}) => ReturnType<typeof SearchSelectInput>;
|
|
43
54
|
export default _default;
|
|
44
|
-
export type { Props as
|
|
55
|
+
export type { Props as SearchSelectInputProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -50,12 +50,12 @@ export { default as Overlay } from './core/Overlay';
|
|
|
50
50
|
export type { OverlayProps } from './core/Overlay';
|
|
51
51
|
export { default as OverlayPopper } from './core/OverlayPopper';
|
|
52
52
|
export type { OverlayPopperProps } from './core/OverlayPopper';
|
|
53
|
-
export { default as OverlaySelectInput } from './core/OverlaySelectInput';
|
|
54
|
-
export type { OverlaySelectInputProps } from './core/OverlaySelectInput';
|
|
55
53
|
export { default as Pagination } from './core/Pagination';
|
|
56
54
|
export type { PaginationProps, PaginationPageProps, PaginationPageDirectionProps } from './core/Pagination';
|
|
57
55
|
export { default as Pill } from './core/Pill';
|
|
58
56
|
export type { PillProps } from './core/Pill';
|
|
57
|
+
export { default as SearchSelectInput } from './core/SearchSelectInput';
|
|
58
|
+
export type { SearchSelectInputProps } from './core/SearchSelectInput';
|
|
59
59
|
export { default as Select } from './core/Select';
|
|
60
60
|
export type { SelectProps, SelectOptionProps } from './core/Select';
|
|
61
61
|
export { default as Space } from './core/Space';
|