@dinachi/cli 0.5.0 → 0.6.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.
Files changed (54) hide show
  1. package/README.md +13 -5
  2. package/dist/index.js +1086 -349
  3. package/package.json +17 -9
  4. package/templates/accordion/accordion.tsx +8 -3
  5. package/templates/alert-dialog/alert-dialog.tsx +24 -25
  6. package/templates/alert-dialog/index.ts +1 -1
  7. package/templates/autocomplete/autocomplete.tsx +0 -1
  8. package/templates/avatar/avatar.tsx +1 -3
  9. package/templates/badge/badge.tsx +167 -0
  10. package/templates/badge/index.ts +2 -0
  11. package/templates/button/button.tsx +6 -6
  12. package/templates/button/index.ts +2 -2
  13. package/templates/card/card.tsx +78 -0
  14. package/templates/card/index.ts +1 -0
  15. package/templates/checkbox/checkbox.tsx +2 -3
  16. package/templates/checkbox-group/checkbox-group.tsx +1 -3
  17. package/templates/collapsible/collapsible.tsx +1 -2
  18. package/templates/combobox/combobox.tsx +0 -1
  19. package/templates/context-menu/context-menu.tsx +0 -1
  20. package/templates/dialog/dialog.tsx +1 -1
  21. package/templates/drawer/drawer.tsx +0 -1
  22. package/templates/field/field.tsx +69 -85
  23. package/templates/fieldset/fieldset.tsx +0 -1
  24. package/templates/form/form.tsx +36 -28
  25. package/templates/input/index.ts +1 -2
  26. package/templates/input/input.tsx +0 -1
  27. package/templates/menu/menu.tsx +0 -1
  28. package/templates/menubar/menubar.tsx +21 -22
  29. package/templates/meter/meter.tsx +0 -1
  30. package/templates/navigation-menu/index.ts +1 -13
  31. package/templates/navigation-menu/navigation-menu.tsx +1 -3
  32. package/templates/number-field/number-field.tsx +0 -1
  33. package/templates/popover/popover.tsx +0 -1
  34. package/templates/preview-card/preview-card.tsx +0 -1
  35. package/templates/progress/progress.tsx +0 -1
  36. package/templates/radio/radio.tsx +0 -1
  37. package/templates/scroll-area/scroll-area.tsx +0 -1
  38. package/templates/select/select.tsx +1 -4
  39. package/templates/separator/separator.tsx +0 -1
  40. package/templates/slider/index.ts +10 -0
  41. package/templates/slider/slider.tsx +1 -3
  42. package/templates/switch/switch.tsx +0 -1
  43. package/templates/tabs/index.ts +8 -0
  44. package/templates/tabs/tabs.tsx +8 -3
  45. package/templates/textarea/index.ts +2 -0
  46. package/templates/textarea/textarea.tsx +23 -0
  47. package/templates/toast/toast.tsx +3 -2
  48. package/templates/toggle/toggle.tsx +0 -1
  49. package/templates/toggle-group/toggle-group.tsx +0 -1
  50. package/templates/toolbar/toolbar.tsx +0 -1
  51. package/templates/tooltip/tooltip.tsx +0 -1
  52. package/templates/tsconfig.json +20 -0
  53. package/templates/utils/utils.ts +0 -1
  54. package/templates/utils/variants.ts +0 -1
@@ -1,112 +1,96 @@
1
- // @ts-nocheck
2
1
  import * as React from "react";
3
2
  import { Field as BaseField } from "@base-ui/react/field";
4
- import { cn } from "@/lib/utils"
3
+ import { cn } from "@/lib/utils";
5
4
 
6
5
  const Field = React.forwardRef<
7
6
  HTMLDivElement,
8
7
  React.ComponentProps<typeof BaseField.Root>
9
- >(({ className, ...props }, ref) => {
10
- return (
11
- <BaseField.Root
12
- ref={ref}
13
- className={cn("space-y-2", className)}
14
- {...props}
15
- />
16
- );
17
- });
8
+ >(({ className, ...props }, ref) => (
9
+ <BaseField.Root ref={ref} className={cn("space-y-2", className)} {...props} />
10
+ ));
11
+ Field.displayName = "Field";
18
12
 
19
13
  const FieldLabel = React.forwardRef<
20
14
  HTMLLabelElement,
21
15
  React.ComponentProps<typeof BaseField.Label>
22
- >(({ className, ...props }, ref) => {
23
- return (
24
- <BaseField.Label
25
- ref={ref}
26
- className={cn(
27
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
28
- "data-[invalid]:text-destructive",
29
- className
30
- )}
31
- {...props}
32
- />
33
- );
34
- });
16
+ >(({ className, ...props }, ref) => (
17
+ <BaseField.Label
18
+ ref={ref}
19
+ className={cn(
20
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
21
+ "data-[invalid]:text-destructive",
22
+ className
23
+ )}
24
+ {...props}
25
+ />
26
+ ));
27
+ FieldLabel.displayName = "FieldLabel";
35
28
 
36
29
  const FieldControl = React.forwardRef<
37
30
  HTMLInputElement,
38
31
  React.ComponentProps<typeof BaseField.Control>
39
- >(({ className, ...props }, ref) => {
40
- return (
41
- <BaseField.Control
42
- ref={ref}
43
- className={cn(
44
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",
45
- "file:border-0 file:bg-transparent file:text-sm file:font-medium",
46
- "placeholder:text-muted-foreground",
47
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
48
- "disabled:cursor-not-allowed disabled:opacity-50",
49
- "data-[invalid]:border-destructive data-[invalid]:ring-destructive",
50
- className
51
- )}
52
- {...props}
53
- />
54
- );
55
- });
32
+ >(({ className, ...props }, ref) => (
33
+ <BaseField.Control
34
+ ref={ref}
35
+ className={cn(
36
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",
37
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
38
+ "placeholder:text-muted-foreground",
39
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
40
+ "disabled:cursor-not-allowed disabled:opacity-50",
41
+ "data-[invalid]:border-destructive data-[invalid]:ring-destructive",
42
+ className
43
+ )}
44
+ {...props}
45
+ />
46
+ ));
47
+ FieldControl.displayName = "FieldControl";
56
48
 
57
49
  const FieldDescription = React.forwardRef<
58
50
  HTMLParagraphElement,
59
51
  React.ComponentProps<typeof BaseField.Description>
60
- >(({ className, ...props }, ref) => {
61
- return (
62
- <BaseField.Description
63
- ref={ref}
64
- className={cn(
65
- "text-sm text-muted-foreground",
66
- "data-[disabled]:opacity-50",
67
- className
68
- )}
69
- {...props}
70
- />
71
- );
72
- });
52
+ >(({ className, ...props }, ref) => (
53
+ <BaseField.Description
54
+ ref={ref}
55
+ className={cn(
56
+ "text-sm text-muted-foreground",
57
+ "data-[disabled]:opacity-50",
58
+ className
59
+ )}
60
+ {...props}
61
+ />
62
+ ));
63
+ FieldDescription.displayName = "FieldDescription";
73
64
 
74
65
  const FieldError = React.forwardRef<
75
- HTMLParagraphElement,
66
+ HTMLDivElement,
76
67
  React.ComponentProps<typeof BaseField.Error>
77
- >(({ className, ...props }, ref) => {
78
- return (
79
- <BaseField.Error
80
- ref={ref}
81
- className={cn(
82
- "text-sm font-medium text-destructive",
83
- "data-[disabled]:opacity-50",
84
- className
85
- )}
86
- {...props}
87
- />
88
- );
89
- });
68
+ >(({ className, ...props }, ref) => (
69
+ <BaseField.Error
70
+ ref={ref}
71
+ className={cn(
72
+ "text-sm font-medium text-destructive",
73
+ "data-[disabled]:opacity-50",
74
+ className
75
+ )}
76
+ {...props}
77
+ />
78
+ ));
79
+ FieldError.displayName = "FieldError";
90
80
 
91
81
  const FieldValidity = React.forwardRef<
92
82
  HTMLDivElement,
93
- React.ComponentProps<typeof BaseField.Validity> & { className?: string }
94
- >(({ className, children, ...props }, ref) => {
95
- return (
96
- <div
97
- ref={ref}
98
- className={cn("text-sm", "data-[disabled]:opacity-50", className)}
99
- >
100
- <BaseField.Validity {...props}>{children}</BaseField.Validity>
101
- </div>
102
- );
103
- });
104
-
105
- Field.displayName = "Field";
106
- FieldLabel.displayName = "FieldLabel";
107
- FieldControl.displayName = "FieldControl";
108
- FieldDescription.displayName = "FieldDescription";
109
- FieldError.displayName = "FieldError";
83
+ React.ComponentProps<typeof BaseField.Validity> & {
84
+ className?: string;
85
+ }
86
+ >(({ className, children, ...props }, ref) => (
87
+ <div
88
+ ref={ref}
89
+ className={cn("text-sm", "data-[disabled]:opacity-50", className)}
90
+ >
91
+ <BaseField.Validity {...props}>{children}</BaseField.Validity>
92
+ </div>
93
+ ));
110
94
  FieldValidity.displayName = "FieldValidity";
111
95
 
112
96
  export {
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -18,13 +17,10 @@ export interface FormState extends Record<string, unknown> {
18
17
  // Form component props interface using useRender types
19
18
  export interface FormProps extends useRender.ComponentProps<'form', FormState> {
20
19
  /**
21
- * Object containing field errors where keys are field names and values are error messages
20
+ * Object containing field errors where keys are field names and values are error messages.
21
+ * Errors are automatically cleared when the value changes (Base UI 1.0.0+).
22
22
  */
23
23
  errors?: Errors
24
- /**
25
- * Callback function called when errors should be cleared
26
- */
27
- onClearErrors?: (errors: Errors) => void
28
24
  /**
29
25
  * Form submission handler
30
26
  */
@@ -34,36 +30,48 @@ export interface FormProps extends useRender.ComponentProps<'form', FormState> {
34
30
  const Form = React.forwardRef<
35
31
  HTMLFormElement,
36
32
  FormProps
37
- >(({ className, errors = {}, onClearErrors, render = <form />, children, onSubmit, ...props }, ref) => {
33
+ >(({ className, errors = {}, render, children, onSubmit, ...props }, ref) => {
38
34
  // Create form state object
39
35
  const formState: FormState = React.useMemo(() => ({
40
36
  errors
41
37
  }), [errors])
42
38
 
43
- // Default form props
44
- const defaultProps: useRender.ElementProps<'form'> = {
45
- className: cn("space-y-4", className),
46
- onSubmit,
47
- children: (
48
- <BaseForm
49
- errors={errors}
50
- onClearErrors={onClearErrors}
51
- className="contents" // Use contents to avoid wrapper styling
52
- >
53
- {children}
54
- </BaseForm>
55
- )
39
+ // If using render prop, handle it with useRender
40
+ if (render && typeof render === 'function') {
41
+ // Function render prop
42
+ const defaultProps = {
43
+ className: cn("space-y-4", className),
44
+ onSubmit
45
+ }
46
+ const formProps = mergeProps<'form'>(defaultProps, props)
47
+
48
+ const element = useRender({
49
+ render,
50
+ props: formProps,
51
+ state: formState,
52
+ ref
53
+ })
54
+ return element
56
55
  }
57
56
 
58
- // Use the useRender hook to handle render prop pattern
59
- const element = useRender({
60
- render,
61
- props: mergeProps<'form'>(defaultProps, props),
62
- state: formState,
63
- ref
64
- })
57
+ if (render && React.isValidElement(render) && render.type !== 'form') {
58
+ // Element render prop - return the element directly (but not if it's the default <form />)
59
+ return render
60
+ }
65
61
 
66
- return element
62
+ // Default rendering using BaseForm
63
+ return (
64
+ <BaseForm
65
+ ref={ref}
66
+ className={cn("space-y-4", className)}
67
+ errors={errors}
68
+ onSubmit={onSubmit}
69
+ role="form"
70
+ {...props}
71
+ >
72
+ {children}
73
+ </BaseForm>
74
+ )
67
75
  })
68
76
 
69
77
  Form.displayName = "Form"
@@ -1,2 +1 @@
1
- export { Input, inputVariants } from "./input"
2
- export type { InputProps } from "./input"
1
+ export { Input } from "./input"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import * as React from "react";
3
2
  import { Input as BaseInput } from "@base-ui/react/input";
4
3
  import { cn } from "@/lib/utils";
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -45,9 +44,9 @@ const MenubarTrigger = React.forwardRef<
45
44
  className={cn(
46
45
  "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none",
47
46
  "focus:bg-accent focus:text-accent-foreground",
48
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
49
- "data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground",
50
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
47
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
48
+ "data-popup-open:bg-accent data-popup-open:text-accent-foreground",
49
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
51
50
  className
52
51
  )}
53
52
  {...props}
@@ -88,11 +87,11 @@ const MenubarContent = React.forwardRef<
88
87
  <Menu.Popup
89
88
  ref={ref}
90
89
  className={cn(
91
- "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
92
- "origin-[var(--transform-origin)]",
90
+ "z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
91
+ "origin-(--transform-origin)",
93
92
  "outline-none focus:outline-none focus-visible:outline-none",
94
- "data-[starting-style]:animate-in data-[starting-style]:fade-in-0 data-[starting-style]:zoom-in-95",
95
- "data-[ending-style]:animate-out data-[ending-style]:fade-out-0 data-[ending-style]:zoom-out-95",
93
+ "data-starting-style:animate-in data-starting-style:fade-in-0 data-starting-style:zoom-in-95",
94
+ "data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95",
96
95
  className
97
96
  )}
98
97
  {...props}
@@ -111,8 +110,8 @@ const MenubarItem = React.forwardRef<
111
110
  className={cn(
112
111
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
113
112
  "focus:bg-accent focus:text-accent-foreground",
114
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
115
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
113
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
114
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
116
115
  inset && "pl-8",
117
116
  className
118
117
  )}
@@ -130,8 +129,8 @@ const MenubarCheckboxItem = React.forwardRef<
130
129
  className={cn(
131
130
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
132
131
  "focus:bg-accent focus:text-accent-foreground",
133
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
134
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
132
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
133
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
135
134
  className
136
135
  )}
137
136
  checked={checked}
@@ -162,14 +161,14 @@ const MenubarRadioItem = React.forwardRef<
162
161
  className={cn(
163
162
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
164
163
  "focus:bg-accent focus:text-accent-foreground",
165
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
166
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
164
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
165
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
167
166
  className
168
167
  )}
169
168
  {...props}
170
169
  >
171
170
  <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
172
- <Circle className="h-2 w-2 fill-current data-[checked]:block data-[unchecked]:hidden" />
171
+ <Circle className="h-2 w-2 fill-current data-checked:block data-unchecked:hidden" />
173
172
  </span>
174
173
  {children}
175
174
  </Menu.RadioItem>
@@ -246,9 +245,9 @@ const MenubarSubTrigger = React.forwardRef<
246
245
  className={cn(
247
246
  "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
248
247
  "focus:bg-accent focus:text-accent-foreground",
249
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
250
- "data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground",
251
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
248
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
249
+ "data-popup-open:bg-accent data-popup-open:text-accent-foreground",
250
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
252
251
  inset && "pl-8",
253
252
  className
254
253
  )}
@@ -269,11 +268,11 @@ const MenubarSubContent = React.forwardRef<
269
268
  <Menu.Popup
270
269
  ref={ref}
271
270
  className={cn(
272
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg",
273
- "origin-[var(--transform-origin)]",
271
+ "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg",
272
+ "origin-(--transform-origin)",
274
273
  "outline-none focus:outline-none focus-visible:outline-none",
275
- "data-[starting-style]:animate-in data-[starting-style]:fade-in-0 data-[starting-style]:zoom-in-95",
276
- "data-[ending-style]:animate-out data-[ending-style]:fade-out-0 data-[ending-style]:zoom-out-95",
274
+ "data-starting-style:animate-in data-starting-style:fade-in-0 data-starting-style:zoom-in-95",
275
+ "data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95",
277
276
  className
278
277
  )}
279
278
  {...props}
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,13 +1 @@
1
- export {
2
- NavigationMenu,
3
- NavigationMenuList,
4
- NavigationMenuItem,
5
- NavigationMenuContent,
6
- NavigationMenuTrigger,
7
- NavigationMenuLink,
8
- NavigationMenuIndicator,
9
- NavigationMenuPortal,
10
- NavigationMenuPositioner,
11
- NavigationMenuPopup,
12
- NavigationMenuViewport,
13
- } from "./navigation-menu"
1
+ export * from "./navigation-menu"
@@ -1,12 +1,10 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
5
4
  import { NavigationMenu as BaseNavigationMenu } from "@base-ui/react/navigation-menu"
5
+ import { useRender } from "@base-ui/react/use-render"
6
6
  import { cn } from "@/lib/utils"
7
7
  import { ChevronDown } from "lucide-react"
8
- import { useRender } from "@base-ui/react/use-render"
9
-
10
8
 
11
9
  const NavigationMenu = React.forwardRef<
12
10
  React.ComponentRef<typeof BaseNavigationMenu.Root>,
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -6,8 +5,6 @@ import { Select as SelectPrimitive } from "@base-ui/react/select"
6
5
  import { cn } from "@/lib/utils"
7
6
  import { Check, ChevronDown } from "lucide-react"
8
7
 
9
-
10
-
11
8
  // Re-export root components for better tree-shaking
12
9
  const Select = SelectPrimitive.Root
13
10
  const SelectGroup = SelectPrimitive.Group
@@ -23,7 +20,7 @@ const SelectTrigger = React.forwardRef<
23
20
  <SelectPrimitive.Trigger
24
21
  ref={ref}
25
22
  className={cn(
26
- "flex h-10 w-full items-center cursor-pointer justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
23
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
27
24
  className
28
25
  )}
29
26
  {...props}
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -6,4 +6,14 @@ export {
6
6
  SliderRange,
7
7
  SliderThumb,
8
8
  SliderDirectionProvider,
9
+ } from './slider'
10
+
11
+ export type {
12
+ SliderProps,
13
+ SliderValueProps,
14
+ SliderControlProps,
15
+ SliderTrackProps,
16
+ SliderRangeProps,
17
+ SliderThumbProps,
18
+ SliderDirectionProviderProps,
9
19
  } from './slider'
@@ -1,9 +1,7 @@
1
- // @ts-nocheck
2
1
  import * as React from "react";
3
2
  import { Slider as BaseSlider } from "@base-ui/react/slider";
4
3
  import { DirectionProvider } from "@base-ui/react/direction-provider";
5
- import { cn } from "@/lib/utils"
6
-
4
+ import { cn } from "@/lib/utils";
7
5
 
8
6
  const Slider = React.forwardRef<
9
7
  React.ComponentRef<typeof BaseSlider.Root>,
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -4,4 +4,12 @@ export {
4
4
  TabsTrigger,
5
5
  TabsContent,
6
6
  TabsIndicator,
7
+ } from './tabs'
8
+
9
+ export type {
10
+ TabsProps,
11
+ TabsListProps,
12
+ TabsTriggerProps,
13
+ TabsContentProps,
14
+ TabsIndicatorProps,
7
15
  } from './tabs'
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import * as React from "react";
3
2
  import { Tabs as BaseTabs } from "@base-ui/react/tabs";
4
3
  import { cn } from "@/lib/utils";
@@ -22,7 +21,7 @@ const TabsList = React.forwardRef<
22
21
  <BaseTabs.List
23
22
  ref={ref}
24
23
  className={cn(
25
- "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
24
+ "inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground z-0",
26
25
  className
27
26
  )}
28
27
  {...props}
@@ -40,7 +39,7 @@ const TabsTrigger = React.forwardRef<
40
39
  "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all",
41
40
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
42
41
  "disabled:pointer-events-none disabled:opacity-50",
43
- "data-[selected]:bg-background data-[selected]:text-foreground data-[selected]:shadow-sm",
42
+ "data-[selected]:bg-muted data-[selected]:text-foreground data-[selected]:shadow-sm",
44
43
  "hover:text-foreground",
45
44
  className
46
45
  )}
@@ -80,6 +79,12 @@ const TabsIndicator = React.forwardRef<
80
79
  ));
81
80
  TabsIndicator.displayName = "TabsIndicator";
82
81
 
82
+ export type TabsProps = React.ComponentProps<typeof BaseTabs.Root>;
83
+ export type TabsListProps = React.ComponentProps<typeof BaseTabs.List>;
84
+ export type TabsTriggerProps = React.ComponentProps<typeof BaseTabs.Tab>;
85
+ export type TabsContentProps = React.ComponentProps<typeof BaseTabs.Panel>;
86
+ export type TabsIndicatorProps = React.ComponentProps<typeof BaseTabs.Indicator>;
87
+
83
88
  export {
84
89
  Tabs,
85
90
  TabsList,
@@ -0,0 +1,2 @@
1
+ export { Textarea } from './textarea'
2
+ export type { TextareaProps } from './textarea'
@@ -0,0 +1,23 @@
1
+ import * as React from "react"
2
+ import { cn } from "@/lib/utils"
3
+
4
+ export interface TextareaProps
5
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
6
+
7
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
8
+ ({ className, ...props }, ref) => {
9
+ return (
10
+ <textarea
11
+ className={cn(
12
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
+ className
14
+ )}
15
+ ref={ref}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+ )
21
+ Textarea.displayName = "Textarea"
22
+
23
+ export { Textarea }
@@ -1,4 +1,5 @@
1
- // @ts-nocheck
1
+ "use client";
2
+
2
3
  import * as React from "react";
3
4
  import { Toast as BaseToast } from "@base-ui/react/toast";
4
5
  import { cn } from "@/lib/utils";
@@ -24,7 +25,7 @@ const ToastViewport = React.forwardRef<
24
25
  ToastViewport.displayName = "ToastViewport";
25
26
 
26
27
  // Toast Portal
27
- const ToastPortal = BaseToast.Portal;
28
+ const ToastPortal: typeof BaseToast.Portal = BaseToast.Portal;
28
29
 
29
30
  // Toast variants for different types
30
31
  const toastVariants = cva(
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  "use client"
3
2
 
4
3
  import * as React from "react"
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import * as React from "react";
3
2
  import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
4
3
  import { cn } from "@/lib/utils";