@hanzo/ui 3.8.20 → 3.8.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "3.8.20",
3
+ "version": "3.8.22",
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",
@@ -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'
@@ -20,7 +20,7 @@ const NavigationMenu = React.forwardRef<
20
20
  {...props}
21
21
  >
22
22
  {children}
23
- <NavigationMenuViewport />
23
+ {/* <NavigationMenuViewport /> */}
24
24
  </NavigationMenuPrimitive.Root>
25
25
  ))
26
26
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName
@@ -40,12 +40,22 @@ const NavigationMenuList = React.forwardRef<
40
40
  ))
41
41
  NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName
42
42
 
43
- const NavigationMenuItem = NavigationMenuPrimitive.Item
43
+ const NavigationMenuItem = React.forwardRef<
44
+ React.ElementRef<typeof NavigationMenuPrimitive.Item>,
45
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>
46
+ >(({ className, ...props }, ref) => (
47
+ <NavigationMenuPrimitive.Item
48
+ ref={ref}
49
+ className={cn("relative", className)}
50
+ {...props}
51
+ />
52
+ ))
53
+ NavigationMenuItem.displayName = 'NavigationMenuItem'
44
54
 
45
55
  const navigationMenuTriggerStyle = cva(
46
56
  'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 ' +
47
57
  'text-sm font-medium transition-colors hover:bg-level-1 text-foreground hover:text-accent ' +
48
- 'focus:bg-level-1 focus:text-accent focus:outline-none disabled:pointer-events-none disabled:opacity-50 ' +
58
+ ' focus:text-accent focus:outline-none disabled:pointer-events-none disabled:opacity-50 ' +
49
59
  'data-[active]:bg-level-1/50 data-[state=open]:bg-level-1/50'
50
60
  )
51
61
 
@@ -74,8 +84,9 @@ const NavigationMenuContent = React.forwardRef<
74
84
  <NavigationMenuPrimitive.Content
75
85
  ref={ref}
76
86
  className={cn(
77
- 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 ',
78
- 'data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ',
87
+ "right-0 absolute",
88
+ "absolute top-full w-fit bg-popover mt-[5px]",
89
+ "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 bg-background overflow-hidden rounded-md border",
79
90
  className
80
91
  )}
81
92
  {...props}
@@ -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 }
package/types/link-def.ts CHANGED
@@ -50,6 +50,11 @@ interface LinkDef extends VariantProps<typeof buttonVariants> {
50
50
  * rendered as a disabled link, shows default cursor, and eats pointer events.
51
51
  */
52
52
  disabled?: boolean
53
+ /**
54
+ *contents for description link.
55
+ */
56
+ contents?: string
57
+
53
58
  }
54
59
 
55
60
  export {