@hanzo/ui 3.8.21 → 3.8.23
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/package.json +2 -1
- package/primitives/index.ts +3 -0
- package/primitives/tooltip.tsx +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.23",
|
|
4
4
|
"description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"@radix-ui/react-toast": "^1.1.5",
|
|
67
67
|
"@radix-ui/react-toggle": "^1.0.3",
|
|
68
68
|
"@radix-ui/react-toggle-group": "^1.0.4",
|
|
69
|
+
"@radix-ui/react-tooltip": "^1.0.6",
|
|
69
70
|
"@splinetool/react-spline": "^2.2.6",
|
|
70
71
|
"@splinetool/runtime": "^1.0.75",
|
|
71
72
|
"@tailwindcss/container-queries": "^0.1.1",
|
package/primitives/index.ts
CHANGED
|
@@ -169,6 +169,9 @@ export {
|
|
|
169
169
|
TabsContent
|
|
170
170
|
} from './tabs'
|
|
171
171
|
|
|
172
|
+
export * from './tooltip'
|
|
173
|
+
|
|
174
|
+
|
|
172
175
|
export { default as ActionButton } from './action-button'
|
|
173
176
|
export { default as ApplyTypography, type TypographySize} from './apply-typography'
|
|
174
177
|
export { default as AspectRatio } from './aspect-ratio'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
|
|
5
|
+
|
|
6
|
+
import { cn } from '../util'
|
|
7
|
+
|
|
8
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
9
|
+
|
|
10
|
+
const Tooltip = TooltipPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
const TooltipContent = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
<TooltipPrimitive.Content
|
|
19
|
+
ref={ref}
|
|
20
|
+
sideOffset={sideOffset}
|
|
21
|
+
className={cn(
|
|
22
|
+
'z-floating overflow-hidden rounded-sm border bg-level-1 px-2 py-1.5 text-sm text-muted shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
))
|
|
28
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
29
|
+
|
|
30
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|