@teamturing/react-kit 2.19.14 → 2.19.16

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,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>> & {
@@ -17,7 +17,7 @@ type Props = {
17
17
  */
18
18
  required?: boolean;
19
19
  /**
20
- * @default TextInput, Select, OverlaySelectInput, Checkbox
20
+ * @default TextInput, Select, SearchSelectInput, Checkbox
21
21
  *
22
22
  * FormControl이 허용하는 Input 컴포넌트를 추가로 정의합니다.
23
23
  */
@@ -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: string | number | readonly string[];
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: ({ handleSelect }: {
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
- } & Pick<OverlayPopperProps, 'focusTrapSettings' | 'focusZoneSettings' | 'onClose' | 'onOpen'> & Pick<InputHTMLAttributes<HTMLInputElement>, 'id' | 'disabled' | 'onClick' | 'placeholder'>;
20
- declare const OverlaySelectInput: <T extends {
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: ({ handleSelect }: {
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
- } & Pick<OverlayPopperProps, "onClose" | "focusZoneSettings" | "focusTrapSettings" | "onOpen"> & Pick<InputHTMLAttributes<HTMLInputElement>, "disabled" | "placeholder" | "id" | "onClick"> & {
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 OverlaySelectInput>;
53
+ }) => ReturnType<typeof SearchSelectInput>;
43
54
  export default _default;
44
- export type { Props as OverlaySelectInputProps };
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';