react-radix-tooltip 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -49,23 +49,23 @@ const MyComponent = () => (
49
49
  More Details on [Radix-UI Documentation](https://www.radix-ui.com/primitives/docs/components/tooltip)
50
50
 
51
51
  | Prop | Type | Default | Description |
52
- |---|---|---|---|
53
- | title | React.ReactNode | | The content to be displayed inside the tooltip. |
54
- | children | React.ReactElement | | The trigger element that activates the tooltip on hover/focus. |
55
- | container | HTMLDivElement | null | | The container element into which the tooltip will be rendered. |
56
- | placement | 'top' \| 'bottom' \| 'left' \| 'right' | 'top' | The preferred side of the trigger to render the tooltip. |
57
- | sideOffset | number | 0 | The distance in pixels from the trigger element. |
58
- | arrow | boolean | false | Whether to render an arrow pointing to the trigger. |
59
- | arrowWidth | number | | The width of the arrow in pixels. |
60
- | arrowHeight | number | | The height of the arrow in pixels. |
61
- | arrowPadding | number | | The padding between the arrow and the edges of the tooltip. |
62
- | delayDuration | number | 700 | The duration in milliseconds to wait before showing the tooltip. |
63
- | skipDelayDuration | number | 300 | The duration to wait before resetting the delay. |
64
- | defaultOpen | boolean | false | The open state of the tooltip when it is initially rendered. |
65
- | onOpenChange | (open: boolean) => void | | Event handler called when the open state of the tooltip changes. |
66
- | style | React.CSSProperties | | Custom inline styles for the tooltip content. |
67
- | tooltipClassName | string | | CSS class for the tooltip content container. |
68
- | tooltipArrowClassName | string | | CSS class for the tooltip arrow element. |
52
+ |-----|------|---------|-------------|
53
+ | `title` | `React.ReactNode` | **Required** | Content to be displayed inside the tooltip. |
54
+ | `children` | `React.ReactElement` | **Required** | The element that triggers the tooltip when hovered or focused. |
55
+ | `container` | `HTMLDivElement \| null \| undefined` | `document.body` | Optional container where the tooltip portal will be rendered. |
56
+ | `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Position of the tooltip relative to the trigger element. |
57
+ | `sideOffset` | `number` | `5` | Distance (in pixels) between the tooltip and the trigger element. |
58
+ | `arrow` | `boolean` | `true` | Whether to display the tooltip arrow. |
59
+ | `arrowWidth` | `number` | `10` | Width of the tooltip arrow in pixels. |
60
+ | `arrowHeight` | `number` | `5` | Height of the tooltip arrow in pixels. |
61
+ | `arrowPadding` | `number` | `2` | Padding between the arrow and the edge of the tooltip. |
62
+ | `delayDuration` | `number` | `200` | Delay (in milliseconds) before the tooltip appears. |
63
+ | `skipDelayDuration` | `number` | `300` | Time window where subsequent tooltips appear instantly without delay. |
64
+ | `defaultOpen` | `boolean` | `false` | Whether the tooltip should be open by default. |
65
+ | `onOpenChange` | `(open: boolean) => void` | `undefined` | Callback fired when the tooltip open state changes. |
66
+ | `style` | `React.CSSProperties` | `{}` | Inline styles applied to the tooltip container. |
67
+ | `tooltipClassName` | `string` | `""` | Custom CSS class for styling the tooltip container. |
68
+ | `tooltipArrowClassName` | `string` | `""` | Custom CSS class for styling the tooltip arrow. |
69
69
 
70
70
  ---
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-radix-tooltip",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A streamlined, developer-friendly wrapper for [@radix-ui/react-tooltip](https://www.radix-ui.com). This component simplifies the Radix Tooltip implementation by allowing you to trigger tooltips using a single component and a simplified prop interface.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -24,7 +24,8 @@
24
24
  "peerDependencies": {
25
25
  "@radix-ui/react-tooltip": "^1.2.8",
26
26
  "react": ">=16.8.0",
27
- "react-dom": ">=16.8.0"
27
+ "react-dom": ">=16.8.0",
28
+ "tailwindcss": ">=3.0.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -34,10 +35,13 @@
34
35
  "@types/node": "^25.2.3",
35
36
  "@types/react": "^19.2.13",
36
37
  "@types/react-dom": "^19.2.3",
38
+ "autoprefixer": "^10.4.27",
39
+ "postcss": "^8.5.8",
37
40
  "react": "^19.2.4",
38
41
  "rollup-plugin-dts": "^6.3.0",
39
42
  "rollup-plugin-peer-deps-external": "^2.2.4",
40
43
  "rollup-plugin-postcss": "^4.0.2",
44
+ "tailwindcss": "^4.2.1",
41
45
  "tslib": "^2.8.1",
42
46
  "typescript": "^5.9.3",
43
47
  "vite": "^7.3.1"
package/rollup.config.js CHANGED
@@ -28,7 +28,10 @@ export default [
28
28
  resolve(),
29
29
  commonjs(),
30
30
  typescript({ tsconfig: './tsconfig.json' }),
31
- postcss(),
31
+ postcss({
32
+ inject: true,
33
+ extract: false,
34
+ }),
32
35
  terser(),
33
36
  ],
34
37
  external: ['react', 'react-dom'],