trix-ui 0.0.1

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 (115) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +215 -0
  3. package/dist/commands/add-section.d.ts +2 -0
  4. package/dist/commands/add-section.js +94 -0
  5. package/dist/commands/add-section.js.map +1 -0
  6. package/dist/commands/add-wrapper.d.ts +2 -0
  7. package/dist/commands/add-wrapper.js +94 -0
  8. package/dist/commands/add-wrapper.js.map +1 -0
  9. package/dist/commands/add.d.ts +2 -0
  10. package/dist/commands/add.js +53 -0
  11. package/dist/commands/add.js.map +1 -0
  12. package/dist/commands/build.d.ts +2 -0
  13. package/dist/commands/build.js +105 -0
  14. package/dist/commands/build.js.map +1 -0
  15. package/dist/commands/doctor.d.ts +2 -0
  16. package/dist/commands/doctor.js +63 -0
  17. package/dist/commands/doctor.js.map +1 -0
  18. package/dist/commands/init.d.ts +2 -0
  19. package/dist/commands/init.js +44 -0
  20. package/dist/commands/init.js.map +1 -0
  21. package/dist/commands/list-sections.d.ts +2 -0
  22. package/dist/commands/list-sections.js +25 -0
  23. package/dist/commands/list-sections.js.map +1 -0
  24. package/dist/commands/list-wrappers.d.ts +2 -0
  25. package/dist/commands/list-wrappers.js +25 -0
  26. package/dist/commands/list-wrappers.js.map +1 -0
  27. package/dist/commands/list.d.ts +2 -0
  28. package/dist/commands/list.js +20 -0
  29. package/dist/commands/list.js.map +1 -0
  30. package/dist/commands/remove-section.d.ts +2 -0
  31. package/dist/commands/remove-section.js +62 -0
  32. package/dist/commands/remove-section.js.map +1 -0
  33. package/dist/commands/remove-wrapper.d.ts +2 -0
  34. package/dist/commands/remove-wrapper.js +62 -0
  35. package/dist/commands/remove-wrapper.js.map +1 -0
  36. package/dist/commands/remove.d.ts +2 -0
  37. package/dist/commands/remove.js +61 -0
  38. package/dist/commands/remove.js.map +1 -0
  39. package/dist/icons/index.d.ts +1 -0
  40. package/dist/icons/index.js +2 -0
  41. package/dist/icons/index.js.map +1 -0
  42. package/dist/icons/libraries.d.ts +37 -0
  43. package/dist/icons/libraries.js +35 -0
  44. package/dist/icons/libraries.js.map +1 -0
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +36 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/lib/config.d.ts +21 -0
  49. package/dist/lib/config.js +61 -0
  50. package/dist/lib/config.js.map +1 -0
  51. package/dist/lib/fs.d.ts +6 -0
  52. package/dist/lib/fs.js +43 -0
  53. package/dist/lib/fs.js.map +1 -0
  54. package/dist/lib/install.d.ts +19 -0
  55. package/dist/lib/install.js +48 -0
  56. package/dist/lib/install.js.map +1 -0
  57. package/dist/lib/lockfile.d.ts +16 -0
  58. package/dist/lib/lockfile.js +44 -0
  59. package/dist/lib/lockfile.js.map +1 -0
  60. package/dist/lib/paths.d.ts +11 -0
  61. package/dist/lib/paths.js +25 -0
  62. package/dist/lib/paths.js.map +1 -0
  63. package/dist/lib/registry.d.ts +26 -0
  64. package/dist/lib/registry.js +20 -0
  65. package/dist/lib/registry.js.map +1 -0
  66. package/dist/schema/index.d.ts +1128 -0
  67. package/dist/schema/index.js +239 -0
  68. package/dist/schema/index.js.map +1 -0
  69. package/dist/styles/create-style-map.d.ts +4 -0
  70. package/dist/styles/create-style-map.js +69 -0
  71. package/dist/styles/create-style-map.js.map +1 -0
  72. package/dist/styles/transform-style-map.d.ts +3 -0
  73. package/dist/styles/transform-style-map.js +429 -0
  74. package/dist/styles/transform-style-map.js.map +1 -0
  75. package/dist/styles/transform.d.ts +10 -0
  76. package/dist/styles/transform.js +16 -0
  77. package/dist/styles/transform.js.map +1 -0
  78. package/dist/utils/index.d.ts +6 -0
  79. package/dist/utils/index.js +6 -0
  80. package/dist/utils/index.js.map +1 -0
  81. package/dist/utils/transformers/transform-icons.d.ts +2 -0
  82. package/dist/utils/transformers/transform-icons.js +165 -0
  83. package/dist/utils/transformers/transform-icons.js.map +1 -0
  84. package/dist/utils/transformers/transform-menu.d.ts +2 -0
  85. package/dist/utils/transformers/transform-menu.js +40 -0
  86. package/dist/utils/transformers/transform-menu.js.map +1 -0
  87. package/dist/utils/transformers/transform-render.d.ts +2 -0
  88. package/dist/utils/transformers/transform-render.js +98 -0
  89. package/dist/utils/transformers/transform-render.js.map +1 -0
  90. package/dist/utils/transformers/types.d.ts +14 -0
  91. package/dist/utils/transformers/types.js +2 -0
  92. package/dist/utils/transformers/types.js.map +1 -0
  93. package/package.json +59 -0
  94. package/registry/index.json +242 -0
  95. package/tailwind.css +95 -0
  96. package/templates/components/ui/badge.tsx +32 -0
  97. package/templates/components/ui/button.tsx +44 -0
  98. package/templates/components/ui/card.tsx +75 -0
  99. package/templates/components/ui/checkbox.tsx +33 -0
  100. package/templates/components/ui/dialog.tsx +92 -0
  101. package/templates/components/ui/dropdown.tsx +75 -0
  102. package/templates/components/ui/input.tsx +23 -0
  103. package/templates/components/ui/select.tsx +24 -0
  104. package/templates/components/ui/switch.tsx +27 -0
  105. package/templates/components/ui/tabs.tsx +50 -0
  106. package/templates/components/ui/textarea.tsx +22 -0
  107. package/templates/components/ui/toast.tsx +100 -0
  108. package/templates/lib/utils.ts +6 -0
  109. package/templates/sections/cta.tsx +22 -0
  110. package/templates/sections/feature-grid.tsx +62 -0
  111. package/templates/sections/hero.tsx +63 -0
  112. package/templates/styles/globals.css +75 -0
  113. package/templates/wrappers/border-wrapper.tsx +34 -0
  114. package/templates/wrappers/glow-wrapper.tsx +31 -0
  115. package/templates/wrappers/lift-wrapper.tsx +27 -0
package/tailwind.css ADDED
@@ -0,0 +1,95 @@
1
+ @theme inline {
2
+ @keyframes accordion-down {
3
+ from {
4
+ height: 0;
5
+ }
6
+ to {
7
+ height: var(
8
+ --radix-accordion-content-height,
9
+ var(--accordion-panel-height, auto)
10
+ );
11
+ }
12
+ }
13
+
14
+ @keyframes accordion-up {
15
+ from {
16
+ height: var(
17
+ --radix-accordion-content-height,
18
+ var(--accordion-panel-height, auto)
19
+ );
20
+ }
21
+ to {
22
+ height: 0;
23
+ }
24
+ }
25
+ }
26
+
27
+ /* Custom variants */
28
+ @custom-variant data-open {
29
+ &:where([data-state="open"]),
30
+ &:where([data-open]:not([data-open="false"])) {
31
+ @slot;
32
+ }
33
+ }
34
+
35
+ @custom-variant data-closed {
36
+ &:where([data-state="closed"]),
37
+ &:where([data-closed]:not([data-closed="false"])) {
38
+ @slot;
39
+ }
40
+ }
41
+
42
+ @custom-variant data-checked {
43
+ &:where([data-state="checked"]),
44
+ &:where([data-checked]:not([data-checked="false"])) {
45
+ @slot;
46
+ }
47
+ }
48
+
49
+ @custom-variant data-unchecked {
50
+ &:where([data-state="unchecked"]),
51
+ &:where([data-unchecked]:not([data-unchecked="false"])) {
52
+ @slot;
53
+ }
54
+ }
55
+
56
+ @custom-variant data-selected {
57
+ &:where([data-selected="true"]) {
58
+ @slot;
59
+ }
60
+ }
61
+
62
+ @custom-variant data-disabled {
63
+ &:where([data-disabled="true"]),
64
+ &:where([data-disabled]:not([data-disabled="false"])) {
65
+ @slot;
66
+ }
67
+ }
68
+
69
+ @custom-variant data-active {
70
+ &:where([data-state="active"]),
71
+ &:where([data-active]:not([data-active="false"])) {
72
+ @slot;
73
+ }
74
+ }
75
+
76
+ @custom-variant data-horizontal {
77
+ &:where([data-orientation="horizontal"]) {
78
+ @slot;
79
+ }
80
+ }
81
+
82
+ @custom-variant data-vertical {
83
+ &:where([data-orientation="vertical"]) {
84
+ @slot;
85
+ }
86
+ }
87
+
88
+ @utility no-scrollbar {
89
+ -ms-overflow-style: none;
90
+ scrollbar-width: none;
91
+
92
+ &::-webkit-scrollbar {
93
+ display: none;
94
+ }
95
+ }
@@ -0,0 +1,32 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ const variants = {
6
+ default: "bg-primary text-primary-foreground",
7
+ secondary: "bg-secondary text-secondary-foreground",
8
+ outline: "border border-border text-foreground",
9
+ destructive: "bg-destructive text-destructive-foreground"
10
+ }
11
+
12
+ export interface BadgeProps
13
+ extends React.HTMLAttributes<HTMLSpanElement> {
14
+ variant?: keyof typeof variants
15
+ }
16
+
17
+ const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(
18
+ ({ className, variant = "default", ...props }, ref) => (
19
+ <span
20
+ ref={ref}
21
+ className={cn(
22
+ "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold",
23
+ variants[variant],
24
+ className
25
+ )}
26
+ {...props}
27
+ />
28
+ )
29
+ )
30
+ Badge.displayName = "Badge"
31
+
32
+ export { Badge }
@@ -0,0 +1,44 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ const variants = {
6
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
7
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
8
+ outline:
9
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
10
+ ghost: "hover:bg-accent hover:text-accent-foreground",
11
+ link: "text-primary underline-offset-4 hover:underline",
12
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90"
13
+ }
14
+
15
+ const sizes = {
16
+ default: "h-9 px-4 py-2",
17
+ sm: "h-8 px-3 text-xs",
18
+ lg: "h-10 px-6",
19
+ icon: "h-9 w-9"
20
+ }
21
+
22
+ export interface ButtonProps
23
+ extends React.ButtonHTMLAttributes<HTMLButtonElement> {
24
+ variant?: keyof typeof variants
25
+ size?: keyof typeof sizes
26
+ }
27
+
28
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
29
+ ({ className, variant = "default", size = "default", ...props }, ref) => (
30
+ <button
31
+ ref={ref}
32
+ className={cn(
33
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:pointer-events-none disabled:opacity-50",
34
+ variants[variant],
35
+ sizes[size],
36
+ className
37
+ )}
38
+ {...props}
39
+ />
40
+ )
41
+ )
42
+ Button.displayName = "Button"
43
+
44
+ export { Button }
@@ -0,0 +1,75 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
6
+ ({ className, ...props }, ref) => (
7
+ <div
8
+ ref={ref}
9
+ className={cn(
10
+ "rounded-lg border border-border bg-card text-card-foreground shadow-sm",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ )
17
+ Card.displayName = "Card"
18
+
19
+ const CardHeader = React.forwardRef<
20
+ HTMLDivElement,
21
+ React.HTMLAttributes<HTMLDivElement>
22
+ >(({ className, ...props }, ref) => (
23
+ <div
24
+ ref={ref}
25
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
26
+ {...props}
27
+ />
28
+ ))
29
+ CardHeader.displayName = "CardHeader"
30
+
31
+ const CardTitle = React.forwardRef<
32
+ HTMLParagraphElement,
33
+ React.HTMLAttributes<HTMLHeadingElement>
34
+ >(({ className, ...props }, ref) => (
35
+ <h3
36
+ ref={ref}
37
+ className={cn("text-lg font-semibold leading-none", className)}
38
+ {...props}
39
+ />
40
+ ))
41
+ CardTitle.displayName = "CardTitle"
42
+
43
+ const CardDescription = React.forwardRef<
44
+ HTMLParagraphElement,
45
+ React.HTMLAttributes<HTMLParagraphElement>
46
+ >(({ className, ...props }, ref) => (
47
+ <p
48
+ ref={ref}
49
+ className={cn("text-sm text-muted-foreground", className)}
50
+ {...props}
51
+ />
52
+ ))
53
+ CardDescription.displayName = "CardDescription"
54
+
55
+ const CardContent = React.forwardRef<
56
+ HTMLDivElement,
57
+ React.HTMLAttributes<HTMLDivElement>
58
+ >(({ className, ...props }, ref) => (
59
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
60
+ ))
61
+ CardContent.displayName = "CardContent"
62
+
63
+ const CardFooter = React.forwardRef<
64
+ HTMLDivElement,
65
+ React.HTMLAttributes<HTMLDivElement>
66
+ >(({ className, ...props }, ref) => (
67
+ <div
68
+ ref={ref}
69
+ className={cn("flex items-center p-6 pt-0", className)}
70
+ {...props}
71
+ />
72
+ ))
73
+ CardFooter.displayName = "CardFooter"
74
+
75
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
@@ -0,0 +1,33 @@
1
+ import * as React from "react"
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function CheckIcon(props: React.SVGProps<SVGSVGElement>) {
7
+ return (
8
+ <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" {...props}>
9
+ <polyline points="3.5 8.5 6.5 11.5 12.5 4.5" />
10
+ </svg>
11
+ )
12
+ }
13
+
14
+ const Checkbox = React.forwardRef<
15
+ React.ElementRef<typeof CheckboxPrimitive.Root>,
16
+ React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
17
+ >(({ className, ...props }, ref) => (
18
+ <CheckboxPrimitive.Root
19
+ ref={ref}
20
+ className={cn(
21
+ "peer h-4 w-4 shrink-0 rounded-sm border border-input bg-background shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
22
+ className
23
+ )}
24
+ {...props}
25
+ >
26
+ <CheckboxPrimitive.Indicator className="flex items-center justify-center text-current">
27
+ <CheckIcon className="h-3.5 w-3.5 stroke-[2.5]" />
28
+ </CheckboxPrimitive.Indicator>
29
+ </CheckboxPrimitive.Root>
30
+ ))
31
+ Checkbox.displayName = "Checkbox"
32
+
33
+ export { Checkbox }
@@ -0,0 +1,92 @@
1
+ import * as React from "react"
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const Dialog = DialogPrimitive.Root
7
+ const DialogTrigger = DialogPrimitive.Trigger
8
+ const DialogClose = DialogPrimitive.Close
9
+
10
+ const DialogOverlay = React.forwardRef<
11
+ React.ElementRef<typeof DialogPrimitive.Overlay>,
12
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
13
+ >(({ className, ...props }, ref) => (
14
+ <DialogPrimitive.Overlay
15
+ ref={ref}
16
+ className={cn("fixed inset-0 z-50 bg-black/50", className)}
17
+ {...props}
18
+ />
19
+ ))
20
+ DialogOverlay.displayName = "DialogOverlay"
21
+
22
+ const DialogContent = React.forwardRef<
23
+ React.ElementRef<typeof DialogPrimitive.Content>,
24
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
25
+ >(({ className, ...props }, ref) => (
26
+ <DialogPrimitive.Portal>
27
+ <DialogOverlay />
28
+ <DialogPrimitive.Content
29
+ ref={ref}
30
+ className={cn(
31
+ "fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-6 shadow-lg focus-visible:outline-none",
32
+ className
33
+ )}
34
+ {...props}
35
+ />
36
+ </DialogPrimitive.Portal>
37
+ ))
38
+ DialogContent.displayName = "DialogContent"
39
+
40
+ const DialogHeader = ({
41
+ className,
42
+ ...props
43
+ }: React.HTMLAttributes<HTMLDivElement>) => (
44
+ <div className={cn("flex flex-col space-y-2 text-left", className)} {...props} />
45
+ )
46
+ DialogHeader.displayName = "DialogHeader"
47
+
48
+ const DialogFooter = ({
49
+ className,
50
+ ...props
51
+ }: React.HTMLAttributes<HTMLDivElement>) => (
52
+ <div
53
+ className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
54
+ {...props}
55
+ />
56
+ )
57
+ DialogFooter.displayName = "DialogFooter"
58
+
59
+ const DialogTitle = React.forwardRef<
60
+ React.ElementRef<typeof DialogPrimitive.Title>,
61
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
62
+ >(({ className, ...props }, ref) => (
63
+ <DialogPrimitive.Title
64
+ ref={ref}
65
+ className={cn("text-lg font-semibold", className)}
66
+ {...props}
67
+ />
68
+ ))
69
+ DialogTitle.displayName = "DialogTitle"
70
+
71
+ const DialogDescription = React.forwardRef<
72
+ React.ElementRef<typeof DialogPrimitive.Description>,
73
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
74
+ >(({ className, ...props }, ref) => (
75
+ <DialogPrimitive.Description
76
+ ref={ref}
77
+ className={cn("text-sm text-muted-foreground", className)}
78
+ {...props}
79
+ />
80
+ ))
81
+ DialogDescription.displayName = "DialogDescription"
82
+
83
+ export {
84
+ Dialog,
85
+ DialogTrigger,
86
+ DialogClose,
87
+ DialogContent,
88
+ DialogHeader,
89
+ DialogFooter,
90
+ DialogTitle,
91
+ DialogDescription
92
+ }
@@ -0,0 +1,75 @@
1
+ import * as React from "react"
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const DropdownMenu = DropdownMenuPrimitive.Root
7
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
8
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group
9
+
10
+ const DropdownMenuContent = React.forwardRef<
11
+ React.ElementRef<typeof DropdownMenuPrimitive.Content>,
12
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
13
+ >(({ className, sideOffset = 4, ...props }, ref) => (
14
+ <DropdownMenuPrimitive.Portal>
15
+ <DropdownMenuPrimitive.Content
16
+ ref={ref}
17
+ sideOffset={sideOffset}
18
+ className={cn(
19
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",
20
+ className
21
+ )}
22
+ {...props}
23
+ />
24
+ </DropdownMenuPrimitive.Portal>
25
+ ))
26
+ DropdownMenuContent.displayName = "DropdownMenuContent"
27
+
28
+ const DropdownMenuItem = React.forwardRef<
29
+ React.ElementRef<typeof DropdownMenuPrimitive.Item>,
30
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>
31
+ >(({ className, ...props }, ref) => (
32
+ <DropdownMenuPrimitive.Item
33
+ ref={ref}
34
+ className={cn(
35
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
36
+ className
37
+ )}
38
+ {...props}
39
+ />
40
+ ))
41
+ DropdownMenuItem.displayName = "DropdownMenuItem"
42
+
43
+ const DropdownMenuLabel = React.forwardRef<
44
+ React.ElementRef<typeof DropdownMenuPrimitive.Label>,
45
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>
46
+ >(({ className, ...props }, ref) => (
47
+ <DropdownMenuPrimitive.Label
48
+ ref={ref}
49
+ className={cn("px-2 py-1.5 text-xs font-semibold", className)}
50
+ {...props}
51
+ />
52
+ ))
53
+ DropdownMenuLabel.displayName = "DropdownMenuLabel"
54
+
55
+ const DropdownMenuSeparator = React.forwardRef<
56
+ React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
57
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
58
+ >(({ className, ...props }, ref) => (
59
+ <DropdownMenuPrimitive.Separator
60
+ ref={ref}
61
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
62
+ {...props}
63
+ />
64
+ ))
65
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator"
66
+
67
+ export {
68
+ DropdownMenu,
69
+ DropdownMenuTrigger,
70
+ DropdownMenuContent,
71
+ DropdownMenuItem,
72
+ DropdownMenuLabel,
73
+ DropdownMenuSeparator,
74
+ DropdownMenuGroup
75
+ }
@@ -0,0 +1,23 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export interface InputProps
6
+ extends React.InputHTMLAttributes<HTMLInputElement> {}
7
+
8
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
9
+ ({ className, type, ...props }, ref) => (
10
+ <input
11
+ ref={ref}
12
+ type={type}
13
+ className={cn(
14
+ "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
15
+ className
16
+ )}
17
+ {...props}
18
+ />
19
+ )
20
+ )
21
+ Input.displayName = "Input"
22
+
23
+ export { Input }
@@ -0,0 +1,24 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export interface SelectProps
6
+ extends React.SelectHTMLAttributes<HTMLSelectElement> {}
7
+
8
+ const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
9
+ ({ className, children, ...props }, ref) => (
10
+ <select
11
+ ref={ref}
12
+ className={cn(
13
+ "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ )}
16
+ {...props}
17
+ >
18
+ {children}
19
+ </select>
20
+ )
21
+ )
22
+ Select.displayName = "Select"
23
+
24
+ export { Select }
@@ -0,0 +1,27 @@
1
+ import * as React from "react"
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const Switch = React.forwardRef<
7
+ React.ElementRef<typeof SwitchPrimitive.Root>,
8
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>
9
+ >(({ className, ...props }, ref) => (
10
+ <SwitchPrimitive.Root
11
+ ref={ref}
12
+ className={cn(
13
+ "inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-input bg-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background data-[state=checked]:bg-primary",
14
+ className
15
+ )}
16
+ {...props}
17
+ >
18
+ <SwitchPrimitive.Thumb
19
+ className={
20
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
21
+ }
22
+ />
23
+ </SwitchPrimitive.Root>
24
+ ))
25
+ Switch.displayName = "Switch"
26
+
27
+ export { Switch }
@@ -0,0 +1,50 @@
1
+ import * as React from "react"
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const Tabs = TabsPrimitive.Root
7
+
8
+ const TabsList = React.forwardRef<
9
+ React.ElementRef<typeof TabsPrimitive.List>,
10
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
11
+ >(({ className, ...props }, ref) => (
12
+ <TabsPrimitive.List
13
+ ref={ref}
14
+ className={cn(
15
+ "inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ ))
21
+ TabsList.displayName = "TabsList"
22
+
23
+ const TabsTrigger = React.forwardRef<
24
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
25
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
26
+ >(({ className, ...props }, ref) => (
27
+ <TabsPrimitive.Trigger
28
+ ref={ref}
29
+ className={cn(
30
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
31
+ className
32
+ )}
33
+ {...props}
34
+ />
35
+ ))
36
+ TabsTrigger.displayName = "TabsTrigger"
37
+
38
+ const TabsContent = React.forwardRef<
39
+ React.ElementRef<typeof TabsPrimitive.Content>,
40
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
41
+ >(({ className, ...props }, ref) => (
42
+ <TabsPrimitive.Content
43
+ ref={ref}
44
+ className={cn("mt-2 ring-offset-background", className)}
45
+ {...props}
46
+ />
47
+ ))
48
+ TabsContent.displayName = "TabsContent"
49
+
50
+ export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -0,0 +1,22 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export interface TextareaProps
6
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
7
+
8
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
9
+ ({ className, ...props }, ref) => (
10
+ <textarea
11
+ ref={ref}
12
+ className={cn(
13
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ )}
16
+ {...props}
17
+ />
18
+ )
19
+ )
20
+ Textarea.displayName = "Textarea"
21
+
22
+ export { Textarea }