@teamturing/react-kit 2.45.4 → 2.46.1

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.
@@ -5,9 +5,9 @@ import { ImageProps } from '../Image';
5
5
  type AvatarSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
6
6
  type Props = {
7
7
  size?: ResponsiveValue<AvatarSizeType>;
8
- } & Pick<ImageProps, 'src' | 'alt'> & SxProp;
8
+ } & ImageProps & SxProp;
9
9
  declare const _default: import("react").ForwardRefExoticComponent<{
10
10
  size?: ResponsiveValue<AvatarSizeType> | undefined;
11
- } & Pick<ImageProps, "alt" | "src"> & SxProp & import("react").RefAttributes<HTMLImageElement>>;
11
+ } & import("react").ImgHTMLAttributes<HTMLImageElement> & SxProp & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("react").RefAttributes<HTMLImageElement>>;
12
12
  export default _default;
13
13
  export type { Props as AvatarProps };
@@ -1,7 +1,7 @@
1
1
  import { ImgHTMLAttributes } from 'react';
2
2
  import { LayoutProps } from 'styled-system';
3
3
  import { SxProp } from '../../utils/styled-system';
4
- type Props = {} & Pick<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'width' | 'height' | 'loading'> & SxProp & LayoutProps;
4
+ type Props = {} & ImgHTMLAttributes<HTMLImageElement> & SxProp & LayoutProps;
5
5
  declare const Image: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, Props>>;
6
6
  export default Image;
7
7
  export type { Props as ImageProps };
@@ -1,4 +1,4 @@
1
- import { Placement, UseFloatingReturn } from '@floating-ui/react-dom';
1
+ import { Placement, UseFloatingReturn } from '@floating-ui/react';
2
2
  import { ForwardedRef, HTMLAttributes, ReactNode } from 'react';
3
3
  import { FocusTrapHookSettings } from '../../hook/useFocusTrap';
4
4
  import { FocusZoneHookSettings } from '../../hook/useFocusZone';
@@ -0,0 +1,7 @@
1
+ import { HTMLProps, ReactNode } from 'react';
2
+ import { TooltipOptions } from './useTooltip';
3
+ export declare function BaseTooltip({ children, ...options }: {
4
+ children: ReactNode;
5
+ } & TooltipOptions): import("react/jsx-runtime").JSX.Element;
6
+ export declare const BaseTooltipTrigger: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
7
+ export declare const BaseTooltipContent: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,4 @@
1
- import { HTMLAttributes } from 'react';
2
- import { ResponsiveValue } from 'styled-system';
3
- import { SxProp } from '../../utils/styled-system';
1
+ import { PropsWithChildren } from 'react';
4
2
  type Props = {
5
3
  /**
6
4
  * children 컴포넌트 기준으로 Tooltip의 위치를 정의합니다.
@@ -10,20 +8,7 @@ type Props = {
10
8
  * Tooltip의 텍스트를 정의합니다.
11
9
  */
12
10
  text?: string;
13
- disabled?: ResponsiveValue<boolean>;
14
- } & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, 'className'>;
15
- declare const _default: import("react").ForwardRefExoticComponent<{
16
- /**
17
- * children 컴포넌트 기준으로 Tooltip의 위치를 정의합니다.
18
- */
19
- direction?: "left" | "right" | "top-center" | "top-right" | "bottom-right" | "bottom-center" | "bottom-left" | "top-left" | undefined;
20
- /**
21
- * Tooltip의 텍스트를 정의합니다.
22
- */
23
- text?: string | undefined;
24
- disabled?: ResponsiveValue<boolean> | undefined;
25
- } & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, "className"> & {
26
- children?: import("react").ReactNode;
27
- } & import("react").RefAttributes<HTMLSpanElement>>;
28
- export default _default;
11
+ } & PropsWithChildren;
12
+ declare const Tooltip: ({ children, direction, text }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export default Tooltip;
29
14
  export type { Props as TooltipProps };
@@ -0,0 +1,14 @@
1
+ import { type Placement, type UseFloatingReturn, type UseInteractionsReturn } from '@floating-ui/react';
2
+ import { type MutableRefObject } from 'react';
3
+ export interface TooltipOptions {
4
+ initialOpen?: boolean;
5
+ placement?: Placement;
6
+ open?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ }
9
+ export declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen, }?: TooltipOptions): {
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ } & UseInteractionsReturn & UseFloatingReturn & {
13
+ arrowRef: MutableRefObject<null>;
14
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { useTooltip } from './useTooltip';
3
+ type ContextType = ReturnType<typeof useTooltip> | null;
4
+ export declare const TooltipContext: import("react").Context<ContextType>;
5
+ export declare const useTooltipContext: () => NonNullable<ContextType>;
6
+ export {};