@srcroot/ui 0.0.54 → 0.0.56
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 +151 -151
- package/dist/index.d.ts +0 -0
- package/dist/index.js +55 -1
- package/package.json +7 -2
- package/src/registry/analytics/google-analytics.tsx +36 -39
- package/src/registry/analytics/google-tag-manager.tsx +62 -65
- package/src/registry/analytics/meta-pixel.tsx +44 -47
- package/src/registry/analytics/microsoft-clarity.tsx +31 -34
- package/src/registry/analytics/tiktok-pixel.tsx +34 -37
- package/src/registry/lib/utils.ts +0 -0
- package/src/registry/themes/v3/blue.css +157 -157
- package/src/registry/themes/v3/glass.css +153 -153
- package/src/registry/themes/v3/gray.css +157 -157
- package/src/registry/themes/v3/green.css +157 -157
- package/src/registry/themes/v3/neutral.css +157 -157
- package/src/registry/themes/v3/orange.css +157 -157
- package/src/registry/themes/v3/rose.css +157 -157
- package/src/registry/themes/v3/slate.css +157 -157
- package/src/registry/themes/v3/stone.css +157 -157
- package/src/registry/themes/v3/violet.css +186 -186
- package/src/registry/themes/v3/zinc.css +157 -157
- package/src/registry/themes/v4/blue.css +184 -184
- package/src/registry/themes/v4/glass.css +180 -180
- package/src/registry/themes/v4/gray.css +184 -184
- package/src/registry/themes/v4/green.css +184 -184
- package/src/registry/themes/v4/neutral.css +184 -184
- package/src/registry/themes/v4/orange.css +184 -184
- package/src/registry/themes/v4/rose.css +184 -184
- package/src/registry/themes/v4/slate.css +184 -184
- package/src/registry/themes/v4/stone.css +184 -184
- package/src/registry/themes/v4/violet.css +184 -184
- package/src/registry/themes/v4/zinc.css +184 -184
- package/src/registry/ui/accordion.tsx +164 -165
- package/src/registry/ui/alert-dialog.tsx +213 -214
- package/src/registry/ui/alert.tsx +73 -76
- package/src/registry/ui/aspect-ratio.tsx +44 -47
- package/src/registry/ui/avatar.tsx +96 -97
- package/src/registry/ui/badge.tsx +52 -55
- package/src/registry/ui/breadcrumb.tsx +147 -150
- package/src/registry/ui/button-group.tsx +64 -67
- package/src/registry/ui/button.tsx +71 -72
- package/src/registry/ui/calendar.tsx +514 -515
- package/src/registry/ui/card.tsx +88 -91
- package/src/registry/ui/carousel.tsx +214 -214
- package/src/registry/ui/chart.tsx +373 -373
- package/src/registry/ui/chatbot.tsx +86 -13
- package/src/registry/ui/checkbox.tsx +93 -94
- package/src/registry/ui/collapsible.tsx +107 -108
- package/src/registry/ui/combobox.tsx +171 -171
- package/src/registry/ui/command.tsx +300 -300
- package/src/registry/ui/container.tsx +44 -47
- package/src/registry/ui/context-menu.tsx +221 -221
- package/src/registry/ui/date-picker.tsx +228 -228
- package/src/registry/ui/dialog.tsx +269 -270
- package/src/registry/ui/drawer.tsx +10 -4
- package/src/registry/ui/dropdown-menu.tsx +529 -530
- package/src/registry/ui/empty-state.tsx +0 -2
- package/src/registry/ui/file-upload.tsx +0 -0
- package/src/registry/ui/floating-dock.tsx +0 -0
- package/src/registry/ui/form-field.tsx +91 -94
- package/src/registry/ui/google-analytics.tsx +38 -0
- package/src/registry/ui/google-tag-manager.tsx +64 -0
- package/src/registry/ui/hover-card.tsx +223 -223
- package/src/registry/ui/image.tsx +144 -147
- package/src/registry/ui/input-group.tsx +82 -85
- package/src/registry/ui/input.tsx +125 -125
- package/src/registry/ui/kbd.tsx +60 -63
- package/src/registry/ui/label.tsx +36 -37
- package/src/registry/ui/loading-spinner.tsx +108 -111
- package/src/registry/ui/map.tsx +0 -0
- package/src/registry/ui/marquee.tsx +2 -0
- package/src/registry/ui/menubar.tsx +246 -246
- package/src/registry/ui/meta-pixel.tsx +46 -0
- package/src/registry/ui/microsoft-clarity.tsx +33 -0
- package/src/registry/ui/native-select.tsx +49 -52
- package/src/registry/ui/otp-input.tsx +152 -155
- package/src/registry/ui/pagination.tsx +149 -152
- package/src/registry/ui/patterns.tsx +28 -0
- package/src/registry/ui/popover.tsx +226 -227
- package/src/registry/ui/progress.tsx +51 -52
- package/src/registry/ui/radio.tsx +99 -102
- package/src/registry/ui/resizable.tsx +314 -314
- package/src/registry/ui/scroll-animation.tsx +45 -0
- package/src/registry/ui/scroll-area.tsx +121 -122
- package/src/registry/ui/scroll-to-top.tsx +0 -0
- package/src/registry/ui/search.tsx +147 -150
- package/src/registry/ui/select.tsx +292 -293
- package/src/registry/ui/separator.tsx +46 -47
- package/src/registry/ui/sheet.tsx +6 -3
- package/src/registry/ui/sidebar.tsx +628 -628
- package/src/registry/ui/skeleton.tsx +26 -29
- package/src/registry/ui/slider.tsx +196 -197
- package/src/registry/ui/slot.tsx +69 -72
- package/src/registry/ui/star-rating.tsx +131 -134
- package/src/registry/ui/switch.tsx +72 -73
- package/src/registry/ui/table-of-contents.tsx +96 -96
- package/src/registry/ui/table.tsx +138 -139
- package/src/registry/ui/tabs.tsx +124 -125
- package/src/registry/ui/text.tsx +61 -64
- package/src/registry/ui/textarea.tsx +41 -42
- package/src/registry/ui/theme-switcher.tsx +66 -66
- package/src/registry/ui/tiktok-pixel.tsx +36 -0
- package/src/registry/ui/toast.tsx +97 -98
- package/src/registry/ui/toggle-group.tsx +129 -129
- package/src/registry/ui/toggle.tsx +72 -72
- package/src/registry/ui/tooltip.tsx +143 -144
- package/src/registry/ui/whatsapp.tsx +0 -0
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
|
|
6
|
-
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
/**
|
|
8
|
-
* Orientation of the separator
|
|
9
|
-
* @default "horizontal"
|
|
10
|
-
*/
|
|
11
|
-
orientation?: "horizontal" | "vertical"
|
|
12
|
-
/**
|
|
13
|
-
* Whether the separator is decorative (no semantic meaning)
|
|
14
|
-
* @default true
|
|
15
|
-
*/
|
|
16
|
-
decorative?: boolean
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Separator component for visual division
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* // Horizontal separator
|
|
24
|
-
* <Separator />
|
|
25
|
-
*
|
|
26
|
-
* // Vertical separator
|
|
27
|
-
* <Separator orientation="vertical" className="h-4" />
|
|
28
|
-
*/
|
|
29
|
-
const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(
|
|
30
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
|
|
31
|
-
<div
|
|
32
|
-
ref={ref}
|
|
33
|
-
role={decorative ? "none" : "separator"}
|
|
34
|
-
aria-orientation={decorative ? undefined : orientation}
|
|
35
|
-
className={cn(
|
|
36
|
-
"shrink-0 bg-border",
|
|
37
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
38
|
-
className
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
)
|
|
43
|
-
)
|
|
44
|
-
Separator.displayName = "Separator"
|
|
45
|
-
|
|
46
|
-
export { Separator }
|
|
47
|
-
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Orientation of the separator
|
|
9
|
+
* @default "horizontal"
|
|
10
|
+
*/
|
|
11
|
+
orientation?: "horizontal" | "vertical"
|
|
12
|
+
/**
|
|
13
|
+
* Whether the separator is decorative (no semantic meaning)
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
decorative?: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Separator component for visual division
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Horizontal separator
|
|
24
|
+
* <Separator />
|
|
25
|
+
*
|
|
26
|
+
* // Vertical separator
|
|
27
|
+
* <Separator orientation="vertical" className="h-4" />
|
|
28
|
+
*/
|
|
29
|
+
const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(
|
|
30
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
|
|
31
|
+
<div
|
|
32
|
+
ref={ref}
|
|
33
|
+
role={decorative ? "none" : "separator"}
|
|
34
|
+
aria-orientation={decorative ? undefined : orientation}
|
|
35
|
+
className={cn(
|
|
36
|
+
"shrink-0 bg-border",
|
|
37
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
Separator.displayName = "Separator"
|
|
45
|
+
|
|
46
|
+
export { Separator }
|
|
@@ -8,6 +8,7 @@ import { Slot } from "@/components/ui/slot"
|
|
|
8
8
|
interface SheetContextValue {
|
|
9
9
|
open: boolean
|
|
10
10
|
onOpenChange: (open: boolean) => void
|
|
11
|
+
className?: string
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const SheetContext = React.createContext<SheetContextValue | null>(null)
|
|
@@ -17,6 +18,7 @@ interface SheetProps {
|
|
|
17
18
|
open?: boolean
|
|
18
19
|
onOpenChange?: (open: boolean) => void
|
|
19
20
|
defaultOpen?: boolean
|
|
21
|
+
className?: string
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
/**
|
|
@@ -34,14 +36,14 @@ interface SheetProps {
|
|
|
34
36
|
* </SheetContent>
|
|
35
37
|
* </Sheet>
|
|
36
38
|
*/
|
|
37
|
-
function Sheet({ children, open: controlledOpen, onOpenChange, defaultOpen = false }: SheetProps) {
|
|
39
|
+
function Sheet({ children, open: controlledOpen, onOpenChange, defaultOpen = false, className }: SheetProps) {
|
|
38
40
|
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)
|
|
39
41
|
|
|
40
42
|
const open = controlledOpen !== undefined ? controlledOpen : uncontrolledOpen
|
|
41
43
|
const setOpen = onOpenChange || setUncontrolledOpen
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
|
-
<SheetContext.Provider value={{ open, onOpenChange: setOpen }}>
|
|
46
|
+
<SheetContext.Provider value={{ open, onOpenChange: setOpen, className }}>
|
|
45
47
|
{children}
|
|
46
48
|
</SheetContext.Provider>
|
|
47
49
|
)
|
|
@@ -191,7 +193,8 @@ const SheetContent = React.forwardRef<HTMLDivElement, SheetContentProps>(
|
|
|
191
193
|
isAnimating
|
|
192
194
|
? animationClasses[sideKey].open
|
|
193
195
|
: animationClasses[sideKey].closed,
|
|
194
|
-
className
|
|
196
|
+
className,
|
|
197
|
+
context.className
|
|
195
198
|
)}
|
|
196
199
|
{...props}
|
|
197
200
|
>
|