@hilum/ui 3.4.0 → 3.5.0
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 +4 -0
- package/dist/{chunk-MAHPAP65.js → chunk-RI6QJR2L.js} +6 -3
- package/dist/chunk-RI6QJR2L.js.map +1 -0
- package/dist/index.d.ts +789 -115
- package/dist/index.js +10404 -1099
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +17 -0
- package/dist/tokens.d.ts +3 -0
- package/dist/tokens.js +1 -1
- package/llms.txt +18 -4
- package/package.json +19 -1
- package/src/components/accordion.tsx +746 -58
- package/src/components/alert-dialog.tsx +11 -5
- package/src/components/ask-user-questions.tsx +1366 -0
- package/src/components/badge.tsx +105 -24
- package/src/components/button.tsx +207 -38
- package/src/components/card.tsx +3 -2
- package/src/components/chat-message.tsx +116 -0
- package/src/components/checkbox-group.tsx +403 -0
- package/src/components/checkbox.tsx +6 -3
- package/src/components/color-input.tsx +3 -1
- package/src/components/color-picker.tsx +1992 -80
- package/src/components/dialog.tsx +141 -81
- package/src/components/dropdown-menu.tsx +21 -13
- package/src/components/dropdown.tsx +245 -0
- package/src/components/file-thumbnail.tsx +156 -0
- package/src/components/hover-card.tsx +2 -0
- package/src/components/input-copy.tsx +307 -0
- package/src/components/input-group.tsx +303 -108
- package/src/components/input-message.tsx +883 -0
- package/src/components/input.tsx +6 -3
- package/src/components/menu-item.tsx +156 -0
- package/src/components/mobile-drawer.tsx +50 -0
- package/src/components/nav-item.tsx +43 -0
- package/src/components/nav-menu.tsx +47 -0
- package/src/components/popover.tsx +3 -1
- package/src/components/radio-group.tsx +381 -35
- package/src/components/scroll-area.tsx +9 -2
- package/src/components/select.tsx +708 -121
- package/src/components/sheet.tsx +15 -6
- package/src/components/slider.tsx +1583 -20
- package/src/components/status-badge.tsx +2 -0
- package/src/components/switch.tsx +245 -28
- package/src/components/table.tsx +191 -77
- package/src/components/tabs-subtle.tsx +411 -0
- package/src/components/tabs.tsx +459 -49
- package/src/components/textarea.tsx +7 -3
- package/src/components/thinking-indicator.tsx +106 -0
- package/src/components/thinking-steps.tsx +382 -0
- package/src/components/tooltip.tsx +158 -33
- package/src/hooks/use-merge-split.tsx +359 -0
- package/src/hooks/use-proximity-hover.ts +208 -0
- package/src/index.ts +14 -0
- package/src/lib/elevated.tsx +52 -0
- package/src/lib/font-weight.ts +18 -0
- package/src/lib/icon-context.tsx +98 -0
- package/src/lib/icon-map.tsx +669 -0
- package/src/lib/interaction.ts +102 -0
- package/src/lib/scroll-fade.tsx +241 -0
- package/src/lib/shape-context.tsx +121 -0
- package/src/lib/springs.ts +30 -0
- package/src/lib/surface-classes.ts +43 -0
- package/src/lib/surface-context.tsx +17 -0
- package/src/tokens/tokens.ts +3 -0
- package/dist/chunk-MAHPAP65.js.map +0 -1
package/src/components/sheet.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { Dialog } from "radix-ui";
|
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
7
7
|
import { cn } from "../lib/utils";
|
|
8
|
+
import { focusRingClasses, motionClasses, pressClasses } from "../lib/interaction";
|
|
8
9
|
|
|
9
10
|
const SheetRoot = Dialog.Root;
|
|
10
11
|
const SheetTrigger = Dialog.Trigger;
|
|
@@ -20,6 +21,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
20
21
|
"fixed inset-0 z-50 bg-black/30 backdrop-blur-sm",
|
|
21
22
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
22
23
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
24
|
+
"data-[state=closed]:duration-100 data-[state=open]:duration-150",
|
|
23
25
|
className,
|
|
24
26
|
)}
|
|
25
27
|
{...props}
|
|
@@ -29,7 +31,7 @@ SheetOverlay.displayName = "SheetOverlay";
|
|
|
29
31
|
|
|
30
32
|
const sheetContentVariants = cva(
|
|
31
33
|
[
|
|
32
|
-
"fixed z-50 bg-card shadow-elevated
|
|
34
|
+
"fixed z-50 border-border bg-card p-6 shadow-elevated",
|
|
33
35
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
34
36
|
"transition-transform ease-in-out duration-300",
|
|
35
37
|
],
|
|
@@ -37,11 +39,11 @@ const sheetContentVariants = cva(
|
|
|
37
39
|
variants: {
|
|
38
40
|
side: {
|
|
39
41
|
right:
|
|
40
|
-
"right-0 top-0 h-full w-full max-w-sm data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
|
|
41
|
-
left: "left-0 top-0 h-full w-full max-w-sm data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
|
|
42
|
-
top: "top-0 inset-x-0 h-auto data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
42
|
+
"right-0 top-0 h-full w-full max-w-sm border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
|
|
43
|
+
left: "left-0 top-0 h-full w-full max-w-sm border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
|
|
44
|
+
top: "top-0 inset-x-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
43
45
|
bottom:
|
|
44
|
-
"bottom-0 inset-x-0 h-auto data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
46
|
+
"bottom-0 inset-x-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
45
47
|
},
|
|
46
48
|
},
|
|
47
49
|
defaultVariants: {
|
|
@@ -65,7 +67,14 @@ const SheetContent = React.forwardRef<React.ComponentRef<typeof Dialog.Content>,
|
|
|
65
67
|
{...props}
|
|
66
68
|
>
|
|
67
69
|
{children}
|
|
68
|
-
<Dialog.Close
|
|
70
|
+
<Dialog.Close
|
|
71
|
+
className={cn(
|
|
72
|
+
"absolute right-3 top-3 flex size-9 items-center justify-center rounded-md text-muted-foreground opacity-70 hover:bg-muted hover:text-foreground hover:opacity-100",
|
|
73
|
+
motionClasses,
|
|
74
|
+
pressClasses,
|
|
75
|
+
focusRingClasses,
|
|
76
|
+
)}
|
|
77
|
+
>
|
|
69
78
|
<X size={16} />
|
|
70
79
|
<span className="sr-only">Close</span>
|
|
71
80
|
</Dialog.Close>
|