@liner-fe/prism 2.1.18 → 2.1.19

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,5 +1,13 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
2
  import React, { ReactNode } from 'react';
3
+ interface TooltipRootProps {
4
+ children: ReactNode;
5
+ /**
6
+ * @param onOpenChange
7
+ * Tooltip의 열림/닫힘 상태가 변경될 때 호출되는 콜백 함수입니다.
8
+ */
9
+ onOpenChange?: (open: boolean) => void;
10
+ }
3
11
  declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
4
12
  type Side = (typeof SIDE_OPTIONS)[number];
5
13
  interface TooltipTriggerProps {
@@ -32,9 +40,7 @@ interface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {
32
40
  */
33
41
  collisionPadding?: number | Partial<Record<Side, number>>;
34
42
  }
35
- export declare const Tooltip: (({ children }: {
36
- children: ReactNode;
37
- }) => import("react/jsx-runtime").JSX.Element) & {
43
+ export declare const Tooltip: (({ children, onOpenChange }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element) & {
38
44
  Provider: React.FC<TooltipPrimitive.TooltipProviderProps>;
39
45
  Trigger: ({ by }: TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
40
46
  Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
package/lib/index.cjs CHANGED
@@ -9079,7 +9079,7 @@ var import_jsx_runtime173 = require("react/jsx-runtime");
9079
9079
  var DEFAULT_OFFSET2 = "medium";
9080
9080
  var tooltipVariants = (0, import_class_variance_authority7.cva)([style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"]);
9081
9081
  var TooltipProvider = TooltipPrimitive.Provider;
9082
- var TooltipRoot = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(TooltipPrimitive.Root, { delayDuration: 0, children }), "TooltipRoot");
9082
+ var TooltipRoot = /* @__PURE__ */ __name(({ children, onOpenChange }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(TooltipPrimitive.Root, { delayDuration: 0, onOpenChange, children }), "TooltipRoot");
9083
9083
  var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
9084
9084
  var TooltipContent = (0, import_react11.forwardRef)(
9085
9085
  ({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(