@korioinc/next-core 2.0.6 → 2.0.7

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,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  interface TooltipProps {
3
3
  children: ReactNode;
4
- content: string;
4
+ content: ReactNode;
5
5
  }
6
6
  export default function Tooltip({ children, content }: TooltipProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAIpD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CAyDlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAcpD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CA2DlE"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useRef, useState } from 'react';
4
- import { arrow, autoUpdate, flip, offset, shift, useFloating, useHover, useInteractions } from '@floating-ui/react';
4
+ import { FloatingPortal, arrow, autoUpdate, flip, offset, shift, useFloating, useHover, useInteractions, } from '@floating-ui/react';
5
5
  export default function Tooltip({ children, content }) {
6
6
  const [isOpen, setIsOpen] = useState(false);
7
7
  const arrowRef = useRef(null);
@@ -30,11 +30,11 @@ export default function Tooltip({ children, content }) {
30
30
  bottom: 'top',
31
31
  left: 'right',
32
32
  }[placement.split('-')[0]];
33
- return (_jsxs("div", { ref: refs.setReference, ...getReferenceProps(), className: 'inline-block', children: [children, isOpen && (_jsxs("div", { ref: refs.setFloating, style: floatingStyles, className: 'z-50 rounded bg-black px-2 py-1 text-sm text-white shadow-md dark:bg-white dark:text-black', ...getFloatingProps(), children: [content, _jsx("div", { ref: arrowRef, className: 'absolute h-2 w-2 rotate-45 bg-black dark:bg-white', style: {
34
- left: middlewareData.arrow?.x != null ? `${middlewareData.arrow.x}px` : '',
35
- top: middlewareData.arrow?.y != null ? `${middlewareData.arrow.y}px` : '',
36
- right: '',
37
- bottom: '',
38
- [staticSide]: '-4px',
39
- } })] }))] }));
33
+ return (_jsxs("div", { ref: refs.setReference, ...getReferenceProps(), className: 'inline-block', children: [children, isOpen && (_jsx(FloatingPortal, { children: _jsxs("div", { ref: refs.setFloating, style: floatingStyles, className: 'z-100 rounded bg-black px-2 py-1 text-sm text-white shadow-md dark:bg-white dark:text-black', ...getFloatingProps(), children: [content, _jsx("div", { ref: arrowRef, className: 'absolute h-2 w-2 rotate-45 bg-black dark:bg-white', style: {
34
+ left: middlewareData.arrow?.x != null ? `${middlewareData.arrow.x}px` : '',
35
+ top: middlewareData.arrow?.y != null ? `${middlewareData.arrow.y}px` : '',
36
+ right: '',
37
+ bottom: '',
38
+ [staticSide]: '-4px',
39
+ } })] }) }))] }));
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korioinc/next-core",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./ads": {
@@ -79,7 +79,7 @@
79
79
  "tsc-alias": "^1.8.16",
80
80
  "tw-animate-css": "^1.4.0",
81
81
  "typescript": "^5.9.3",
82
- "@korioinc/next-configs": "2.0.6"
82
+ "@korioinc/next-configs": "2.0.7"
83
83
  },
84
84
  "dependencies": {
85
85
  "@floating-ui/react": "^0.27.16",
@@ -94,7 +94,7 @@
94
94
  "schema-dts": "^1.1.5",
95
95
  "tailwind-merge": "^3.4.0",
96
96
  "valtio": "^2.2.0",
97
- "@korioinc/next-conf": "2.0.6"
97
+ "@korioinc/next-conf": "2.0.7"
98
98
  },
99
99
  "publishConfig": {
100
100
  "access": "public",