@srcroot/ui 0.0.55 → 0.0.58

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.
Files changed (107) hide show
  1. package/README.md +151 -151
  2. package/dist/index.d.ts +0 -0
  3. package/dist/index.js +120 -93
  4. package/package.json +7 -2
  5. package/src/registry/analytics/google-analytics.tsx +36 -39
  6. package/src/registry/analytics/google-tag-manager.tsx +62 -65
  7. package/src/registry/analytics/meta-pixel.tsx +44 -47
  8. package/src/registry/analytics/microsoft-clarity.tsx +31 -34
  9. package/src/registry/analytics/tiktok-pixel.tsx +34 -37
  10. package/src/registry/lib/utils.ts +0 -0
  11. package/src/registry/themes/v3/blue.css +157 -157
  12. package/src/registry/themes/v3/glass.css +153 -153
  13. package/src/registry/themes/v3/gray.css +157 -157
  14. package/src/registry/themes/v3/green.css +157 -157
  15. package/src/registry/themes/v3/neutral.css +157 -157
  16. package/src/registry/themes/v3/orange.css +157 -157
  17. package/src/registry/themes/v3/rose.css +157 -157
  18. package/src/registry/themes/v3/slate.css +157 -157
  19. package/src/registry/themes/v3/stone.css +157 -157
  20. package/src/registry/themes/v3/violet.css +186 -186
  21. package/src/registry/themes/v3/zinc.css +157 -157
  22. package/src/registry/themes/v4/blue.css +184 -184
  23. package/src/registry/themes/v4/glass.css +180 -180
  24. package/src/registry/themes/v4/gray.css +184 -184
  25. package/src/registry/themes/v4/green.css +184 -184
  26. package/src/registry/themes/v4/neutral.css +184 -184
  27. package/src/registry/themes/v4/orange.css +184 -184
  28. package/src/registry/themes/v4/rose.css +184 -184
  29. package/src/registry/themes/v4/slate.css +184 -184
  30. package/src/registry/themes/v4/stone.css +184 -184
  31. package/src/registry/themes/v4/violet.css +184 -184
  32. package/src/registry/themes/v4/zinc.css +184 -184
  33. package/src/registry/ui/accordion.tsx +164 -165
  34. package/src/registry/ui/alert-dialog.tsx +213 -214
  35. package/src/registry/ui/alert.tsx +73 -76
  36. package/src/registry/ui/aspect-ratio.tsx +44 -47
  37. package/src/registry/ui/avatar.tsx +96 -97
  38. package/src/registry/ui/badge.tsx +52 -55
  39. package/src/registry/ui/breadcrumb.tsx +147 -150
  40. package/src/registry/ui/button-group.tsx +64 -67
  41. package/src/registry/ui/button.tsx +71 -72
  42. package/src/registry/ui/calendar.tsx +514 -515
  43. package/src/registry/ui/card.tsx +88 -91
  44. package/src/registry/ui/carousel.tsx +214 -214
  45. package/src/registry/ui/chart.tsx +373 -373
  46. package/src/registry/ui/chatbot.tsx +86 -13
  47. package/src/registry/ui/checkbox.tsx +93 -94
  48. package/src/registry/ui/collapsible.tsx +107 -108
  49. package/src/registry/ui/combobox.tsx +171 -171
  50. package/src/registry/ui/command.tsx +300 -300
  51. package/src/registry/ui/container.tsx +44 -47
  52. package/src/registry/ui/context-menu.tsx +221 -221
  53. package/src/registry/ui/date-picker.tsx +228 -228
  54. package/src/registry/ui/dialog.tsx +269 -270
  55. package/src/registry/ui/drawer.tsx +10 -4
  56. package/src/registry/ui/dropdown-menu.tsx +529 -530
  57. package/src/registry/ui/empty-state.tsx +0 -2
  58. package/src/registry/ui/file-upload.tsx +0 -0
  59. package/src/registry/ui/floating-dock.tsx +0 -0
  60. package/src/registry/ui/form-field.tsx +91 -94
  61. package/src/registry/ui/google-analytics.tsx +38 -0
  62. package/src/registry/ui/google-tag-manager.tsx +64 -0
  63. package/src/registry/ui/hover-card.tsx +223 -223
  64. package/src/registry/ui/image.tsx +144 -147
  65. package/src/registry/ui/input-group.tsx +82 -85
  66. package/src/registry/ui/input.tsx +125 -125
  67. package/src/registry/ui/kbd.tsx +60 -63
  68. package/src/registry/ui/label.tsx +36 -37
  69. package/src/registry/ui/loading-spinner.tsx +108 -111
  70. package/src/registry/ui/map.tsx +0 -0
  71. package/src/registry/ui/marquee.tsx +2 -0
  72. package/src/registry/ui/menubar.tsx +246 -246
  73. package/src/registry/ui/meta-pixel.tsx +46 -0
  74. package/src/registry/ui/microsoft-clarity.tsx +33 -0
  75. package/src/registry/ui/native-select.tsx +49 -52
  76. package/src/registry/ui/otp-input.tsx +163 -155
  77. package/src/registry/ui/pagination.tsx +149 -152
  78. package/src/registry/ui/patterns.tsx +28 -0
  79. package/src/registry/ui/popover.tsx +226 -227
  80. package/src/registry/ui/progress.tsx +51 -52
  81. package/src/registry/ui/radio.tsx +99 -102
  82. package/src/registry/ui/resizable.tsx +314 -314
  83. package/src/registry/ui/scroll-animation.tsx +45 -0
  84. package/src/registry/ui/scroll-area.tsx +121 -122
  85. package/src/registry/ui/scroll-to-top.tsx +0 -0
  86. package/src/registry/ui/search.tsx +162 -150
  87. package/src/registry/ui/select.tsx +292 -293
  88. package/src/registry/ui/separator.tsx +46 -47
  89. package/src/registry/ui/sheet.tsx +6 -3
  90. package/src/registry/ui/sidebar.tsx +628 -628
  91. package/src/registry/ui/skeleton.tsx +26 -29
  92. package/src/registry/ui/slider.tsx +196 -197
  93. package/src/registry/ui/slot.tsx +69 -72
  94. package/src/registry/ui/star-rating.tsx +146 -134
  95. package/src/registry/ui/switch.tsx +72 -73
  96. package/src/registry/ui/table-of-contents.tsx +96 -96
  97. package/src/registry/ui/table.tsx +138 -139
  98. package/src/registry/ui/tabs.tsx +124 -125
  99. package/src/registry/ui/text.tsx +61 -64
  100. package/src/registry/ui/textarea.tsx +41 -42
  101. package/src/registry/ui/theme-switcher.tsx +66 -66
  102. package/src/registry/ui/tiktok-pixel.tsx +36 -0
  103. package/src/registry/ui/toast.tsx +97 -98
  104. package/src/registry/ui/toggle-group.tsx +129 -129
  105. package/src/registry/ui/toggle.tsx +72 -72
  106. package/src/registry/ui/tooltip.tsx +143 -144
  107. package/src/registry/ui/whatsapp.tsx +0 -0
@@ -1,152 +1,149 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { cn } from "@/lib/utils"
5
- import { buttonVariants } from "./button"
6
-
7
- interface PaginationProps extends React.HTMLAttributes<HTMLElement> { }
8
-
9
- /**
10
- * Pagination component
11
- *
12
- * @example
13
- * <Pagination>
14
- * <PaginationContent>
15
- * <PaginationItem>
16
- * <PaginationPrevious href="#" />
17
- * </PaginationItem>
18
- * <PaginationItem>
19
- * <PaginationLink href="#">1</PaginationLink>
20
- * </PaginationItem>
21
- * <PaginationItem>
22
- * <PaginationLink href="#" isActive>2</PaginationLink>
23
- * </PaginationItem>
24
- * <PaginationItem>
25
- * <PaginationNext href="#" />
26
- * </PaginationItem>
27
- * </PaginationContent>
28
- * </Pagination>
29
- */
30
- const Pagination = ({ className, ...props }: PaginationProps) => (
31
- <nav
32
- role="navigation"
33
- aria-label="pagination"
34
- className={cn("mx-auto flex w-full justify-center", className)}
35
- {...props}
36
- />
37
- )
38
- Pagination.displayName = "Pagination"
39
-
40
- const PaginationContent = React.forwardRef<
41
- HTMLUListElement,
42
- React.HTMLAttributes<HTMLUListElement>
43
- >(({ className, ...props }, ref) => (
44
- <ul
45
- ref={ref}
46
- className={cn("flex flex-row items-center gap-1", className)}
47
- {...props}
48
- />
49
- ))
50
- PaginationContent.displayName = "PaginationContent"
51
-
52
- const PaginationItem = React.forwardRef<
53
- HTMLLIElement,
54
- React.LiHTMLAttributes<HTMLLIElement>
55
- >(({ className, ...props }, ref) => (
56
- <li ref={ref} className={cn("", className)} {...props} />
57
- ))
58
- PaginationItem.displayName = "PaginationItem"
59
-
60
- interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
61
- isActive?: boolean
62
- size?: "default" | "sm" | "lg" | "icon"
63
- children?: React.ReactNode
64
- className?: string
65
- href?: string
66
- }
67
-
68
- const PaginationLink = ({
69
- className,
70
- isActive,
71
- size = "icon",
72
- ...props
73
- }: PaginationLinkProps) => (
74
- <a
75
- aria-current={isActive ? "page" : undefined}
76
- className={cn(
77
- buttonVariants({
78
- variant: isActive ? "outline" : "ghost",
79
- size,
80
- }),
81
- className
82
- )}
83
- {...props}
84
- />
85
- )
86
- PaginationLink.displayName = "PaginationLink"
87
-
88
- const PaginationPrevious = ({
89
- className,
90
- ...props
91
- }: React.ComponentProps<typeof PaginationLink>) => (
92
- <PaginationLink
93
- aria-label="Go to previous page"
94
- size="default"
95
- className={cn("gap-1 pl-2.5", className)}
96
- {...props}
97
- >
98
- <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
99
- <path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" />
100
- </svg>
101
- <span>Previous</span>
102
- </PaginationLink>
103
- )
104
- PaginationPrevious.displayName = "PaginationPrevious"
105
-
106
- const PaginationNext = ({
107
- className,
108
- ...props
109
- }: React.ComponentProps<typeof PaginationLink>) => (
110
- <PaginationLink
111
- aria-label="Go to next page"
112
- size="default"
113
- className={cn("gap-1 pr-2.5", className)}
114
- {...props}
115
- >
116
- <span>Next</span>
117
- <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
118
- <path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" />
119
- </svg>
120
- </PaginationLink>
121
- )
122
- PaginationNext.displayName = "PaginationNext"
123
-
124
- const PaginationEllipsis = ({
125
- className,
126
- ...props
127
- }: React.HTMLAttributes<HTMLSpanElement>) => (
128
- <span
129
- aria-hidden
130
- className={cn("flex h-9 w-9 items-center justify-center", className)}
131
- {...props}
132
- >
133
- <svg className="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
134
- <circle cx="12" cy="12" r="1" />
135
- <circle cx="19" cy="12" r="1" />
136
- <circle cx="5" cy="12" r="1" />
137
- </svg>
138
- <span className="sr-only">More pages</span>
139
- </span>
140
- )
141
- PaginationEllipsis.displayName = "PaginationEllipsis"
142
-
143
- export {
144
- Pagination,
145
- PaginationContent,
146
- PaginationLink,
147
- PaginationItem,
148
- PaginationPrevious,
149
- PaginationNext,
150
- PaginationEllipsis,
151
- }
152
-
1
+ import * as React from "react"
2
+ import { cn } from "@/lib/utils"
3
+ import { buttonVariants } from "./button"
4
+
5
+ interface PaginationProps extends React.HTMLAttributes<HTMLElement> { }
6
+
7
+ /**
8
+ * Pagination component
9
+ *
10
+ * @example
11
+ * <Pagination>
12
+ * <PaginationContent>
13
+ * <PaginationItem>
14
+ * <PaginationPrevious href="#" />
15
+ * </PaginationItem>
16
+ * <PaginationItem>
17
+ * <PaginationLink href="#">1</PaginationLink>
18
+ * </PaginationItem>
19
+ * <PaginationItem>
20
+ * <PaginationLink href="#" isActive>2</PaginationLink>
21
+ * </PaginationItem>
22
+ * <PaginationItem>
23
+ * <PaginationNext href="#" />
24
+ * </PaginationItem>
25
+ * </PaginationContent>
26
+ * </Pagination>
27
+ */
28
+ const Pagination = ({ className, ...props }: PaginationProps) => (
29
+ <nav
30
+ role="navigation"
31
+ aria-label="pagination"
32
+ className={cn("mx-auto flex w-full justify-center", className)}
33
+ {...props}
34
+ />
35
+ )
36
+ Pagination.displayName = "Pagination"
37
+
38
+ const PaginationContent = React.forwardRef<
39
+ HTMLUListElement,
40
+ React.HTMLAttributes<HTMLUListElement>
41
+ >(({ className, ...props }, ref) => (
42
+ <ul
43
+ ref={ref}
44
+ className={cn("flex flex-row items-center gap-1", className)}
45
+ {...props}
46
+ />
47
+ ))
48
+ PaginationContent.displayName = "PaginationContent"
49
+
50
+ const PaginationItem = React.forwardRef<
51
+ HTMLLIElement,
52
+ React.LiHTMLAttributes<HTMLLIElement>
53
+ >(({ className, ...props }, ref) => (
54
+ <li ref={ref} className={cn("", className)} {...props} />
55
+ ))
56
+ PaginationItem.displayName = "PaginationItem"
57
+
58
+ interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
59
+ isActive?: boolean
60
+ size?: "default" | "sm" | "lg" | "icon"
61
+ children?: React.ReactNode
62
+ className?: string
63
+ href?: string
64
+ }
65
+
66
+ const PaginationLink = ({
67
+ className,
68
+ isActive,
69
+ size = "icon",
70
+ ...props
71
+ }: PaginationLinkProps) => (
72
+ <a
73
+ aria-current={isActive ? "page" : undefined}
74
+ className={cn(
75
+ buttonVariants({
76
+ variant: isActive ? "outline" : "ghost",
77
+ size,
78
+ }),
79
+ className
80
+ )}
81
+ {...props}
82
+ />
83
+ )
84
+ PaginationLink.displayName = "PaginationLink"
85
+
86
+ const PaginationPrevious = ({
87
+ className,
88
+ ...props
89
+ }: React.ComponentProps<typeof PaginationLink>) => (
90
+ <PaginationLink
91
+ aria-label="Go to previous page"
92
+ size="default"
93
+ className={cn("gap-1 pl-2.5", className)}
94
+ {...props}
95
+ >
96
+ <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
97
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" />
98
+ </svg>
99
+ <span>Previous</span>
100
+ </PaginationLink>
101
+ )
102
+ PaginationPrevious.displayName = "PaginationPrevious"
103
+
104
+ const PaginationNext = ({
105
+ className,
106
+ ...props
107
+ }: React.ComponentProps<typeof PaginationLink>) => (
108
+ <PaginationLink
109
+ aria-label="Go to next page"
110
+ size="default"
111
+ className={cn("gap-1 pr-2.5", className)}
112
+ {...props}
113
+ >
114
+ <span>Next</span>
115
+ <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
116
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" />
117
+ </svg>
118
+ </PaginationLink>
119
+ )
120
+ PaginationNext.displayName = "PaginationNext"
121
+
122
+ const PaginationEllipsis = ({
123
+ className,
124
+ ...props
125
+ }: React.HTMLAttributes<HTMLSpanElement>) => (
126
+ <span
127
+ aria-hidden
128
+ className={cn("flex h-9 w-9 items-center justify-center", className)}
129
+ {...props}
130
+ >
131
+ <svg className="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
132
+ <circle cx="12" cy="12" r="1" />
133
+ <circle cx="19" cy="12" r="1" />
134
+ <circle cx="5" cy="12" r="1" />
135
+ </svg>
136
+ <span className="sr-only">More pages</span>
137
+ </span>
138
+ )
139
+ PaginationEllipsis.displayName = "PaginationEllipsis"
140
+
141
+ export {
142
+ Pagination,
143
+ PaginationContent,
144
+ PaginationLink,
145
+ PaginationItem,
146
+ PaginationPrevious,
147
+ PaginationNext,
148
+ PaginationEllipsis,
149
+ }
@@ -0,0 +1,28 @@
1
+ "use client"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export const GridPattern = ({ className }: { className?: string }) => {
6
+ return (
7
+ <div className={cn("absolute inset-0 z-0 opacity-[0.05] pointer-events-none", className)}>
8
+ <svg className="w-full h-full" xmlns="http://www.w3.org/2000/svg">
9
+ <defs>
10
+ <pattern id="grid-pattern" width="40" height="40" patternUnits="userSpaceOnUse">
11
+ <path d="M 40 0 L 0 0 0 40" fill="none" stroke="currentColor" strokeWidth="1" />
12
+ </pattern>
13
+ </defs>
14
+ <rect width="100%" height="100%" fill="url(#grid-pattern)" />
15
+ </svg>
16
+ </div>
17
+ )
18
+ }
19
+
20
+ export const WavePattern = ({ className }: { className?: string }) => {
21
+ return (
22
+ <div className={cn("absolute inset-0 z-0 bg-muted/40 opacity-10 pointer-events-none overflow-hidden", className)}>
23
+ <svg className="w-full h-full" viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
24
+ <path fill="currentColor" fillOpacity="0.2" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128V320H1392C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320H0Z"></path>
25
+ </svg>
26
+ </div>
27
+ )
28
+ }