@codefast/ui 0.3.10 → 0.3.11-canary.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 (214) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +277 -167
  3. package/dist/components/accordion.d.ts +4 -4
  4. package/dist/components/accordion.js +5 -5
  5. package/dist/components/alert-dialog.d.ts +11 -11
  6. package/dist/components/alert-dialog.js +9 -9
  7. package/dist/components/alert.d.ts +5 -5
  8. package/dist/components/alert.js +5 -5
  9. package/dist/components/aspect-ratio.d.ts +2 -2
  10. package/dist/components/avatar.d.ts +2 -2
  11. package/dist/components/avatar.js +3 -3
  12. package/dist/components/badge.d.ts +3 -3
  13. package/dist/components/badge.js +7 -7
  14. package/dist/components/breadcrumb.d.ts +8 -8
  15. package/dist/components/breadcrumb.js +6 -8
  16. package/dist/components/button-group.d.ts +5 -5
  17. package/dist/components/button-group.js +8 -8
  18. package/dist/components/button.d.ts +6 -6
  19. package/dist/components/button.js +17 -17
  20. package/dist/components/calendar.d.ts +5 -5
  21. package/dist/components/calendar.js +35 -35
  22. package/dist/components/card.d.ts +8 -8
  23. package/dist/components/card.js +7 -7
  24. package/dist/components/carousel.d.ts +10 -10
  25. package/dist/components/carousel.js +20 -20
  26. package/dist/components/chart.d.ts +12 -11
  27. package/dist/components/chart.js +42 -42
  28. package/dist/components/checkbox-cards.d.ts +2 -2
  29. package/dist/components/checkbox-cards.js +2 -2
  30. package/dist/components/checkbox-group.d.ts +2 -2
  31. package/dist/components/checkbox-group.js +2 -2
  32. package/dist/components/checkbox.d.ts +2 -2
  33. package/dist/components/checkbox.js +1 -1
  34. package/dist/components/collapsible.d.ts +2 -2
  35. package/dist/components/command.d.ts +4 -4
  36. package/dist/components/command.js +10 -10
  37. package/dist/components/context-menu.d.ts +4 -4
  38. package/dist/components/context-menu.js +10 -10
  39. package/dist/components/dialog.d.ts +10 -10
  40. package/dist/components/dialog.js +12 -12
  41. package/dist/components/drawer.d.ts +9 -9
  42. package/dist/components/drawer.js +9 -9
  43. package/dist/components/dropdown-menu.d.ts +4 -4
  44. package/dist/components/dropdown-menu.js +10 -10
  45. package/dist/components/empty.d.ts +9 -9
  46. package/dist/components/empty.js +10 -10
  47. package/dist/components/field.d.ts +14 -14
  48. package/dist/components/field.js +17 -17
  49. package/dist/components/form.d.ts +10 -10
  50. package/dist/components/form.js +8 -8
  51. package/dist/components/hover-card.d.ts +2 -2
  52. package/dist/components/hover-card.js +3 -3
  53. package/dist/components/input-group.d.ts +15 -15
  54. package/dist/components/input-group.js +20 -20
  55. package/dist/components/input-number.d.ts +2 -2
  56. package/dist/components/input-number.js +7 -7
  57. package/dist/components/input-otp.d.ts +6 -6
  58. package/dist/components/input-otp.js +4 -4
  59. package/dist/components/input-password.d.ts +3 -3
  60. package/dist/components/input-password.js +6 -6
  61. package/dist/components/input-search.d.ts +3 -3
  62. package/dist/components/input-search.js +4 -4
  63. package/dist/components/input.d.ts +2 -2
  64. package/dist/components/input.js +1 -1
  65. package/dist/components/item.d.ts +12 -12
  66. package/dist/components/item.js +23 -23
  67. package/dist/components/kbd.d.ts +3 -3
  68. package/dist/components/kbd.js +2 -2
  69. package/dist/components/label.d.ts +2 -2
  70. package/dist/components/label.js +1 -1
  71. package/dist/components/menubar.d.ts +4 -4
  72. package/dist/components/menubar.js +13 -13
  73. package/dist/components/native-select.d.ts +4 -4
  74. package/dist/components/native-select.js +2 -2
  75. package/dist/components/navigation-menu.d.ts +2 -2
  76. package/dist/components/navigation-menu.js +10 -10
  77. package/dist/components/pagination.d.ts +10 -10
  78. package/dist/components/pagination.js +6 -6
  79. package/dist/components/popover.d.ts +3 -3
  80. package/dist/components/popover.js +3 -3
  81. package/dist/components/progress-circle.d.ts +5 -5
  82. package/dist/components/progress-circle.js +22 -22
  83. package/dist/components/progress.d.ts +2 -2
  84. package/dist/components/progress.js +2 -2
  85. package/dist/components/radio-cards.d.ts +2 -2
  86. package/dist/components/radio-cards.js +3 -3
  87. package/dist/components/radio-group.d.ts +2 -2
  88. package/dist/components/radio-group.js +3 -3
  89. package/dist/components/radio.d.ts +2 -2
  90. package/dist/components/radio.js +1 -1
  91. package/dist/components/resizable.d.ts +2 -2
  92. package/dist/components/resizable.js +3 -3
  93. package/dist/components/scroll-area.d.ts +5 -5
  94. package/dist/components/scroll-area.js +31 -31
  95. package/dist/components/select.d.ts +5 -5
  96. package/dist/components/select.js +9 -9
  97. package/dist/components/separator.d.ts +5 -5
  98. package/dist/components/separator.js +9 -9
  99. package/dist/components/sheet.d.ts +9 -9
  100. package/dist/components/sheet.js +17 -17
  101. package/dist/components/sidebar.d.ts +31 -31
  102. package/dist/components/sidebar.js +65 -65
  103. package/dist/components/skeleton.d.ts +2 -2
  104. package/dist/components/skeleton.js +1 -1
  105. package/dist/components/slider.d.ts +2 -2
  106. package/dist/components/slider.js +4 -4
  107. package/dist/components/sonner.d.ts +3 -3
  108. package/dist/components/sonner.js +4 -4
  109. package/dist/components/spinner.d.ts +2 -2
  110. package/dist/components/spinner.js +5 -5
  111. package/dist/components/switch.d.ts +2 -2
  112. package/dist/components/switch.js +2 -2
  113. package/dist/components/table.d.ts +9 -9
  114. package/dist/components/table.js +8 -8
  115. package/dist/components/tabs.d.ts +2 -2
  116. package/dist/components/tabs.js +4 -4
  117. package/dist/components/textarea.d.ts +2 -2
  118. package/dist/components/textarea.js +1 -1
  119. package/dist/components/toggle-group.d.ts +4 -4
  120. package/dist/components/toggle-group.js +5 -5
  121. package/dist/components/toggle.d.ts +3 -3
  122. package/dist/components/toggle.js +8 -8
  123. package/dist/components/tooltip.d.ts +3 -3
  124. package/dist/components/tooltip.js +2 -2
  125. package/dist/css/preset.css +4 -4
  126. package/dist/css/style.css +3 -3
  127. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
  128. package/dist/hooks/use-copy-to-clipboard.js +1 -1
  129. package/dist/hooks/use-media-query.js +3 -3
  130. package/dist/hooks/use-mutation-observer.d.ts +1 -1
  131. package/dist/hooks/use-pagination.js +1 -1
  132. package/dist/index.d.ts +130 -130
  133. package/dist/primitives/checkbox-group.d.ts +11 -11
  134. package/dist/primitives/checkbox-group.js +3 -3
  135. package/dist/primitives/input-number.d.ts +8 -8
  136. package/dist/primitives/input-number.js +46 -46
  137. package/dist/primitives/input.d.ts +4 -4
  138. package/dist/primitives/input.js +7 -7
  139. package/dist/primitives/progress-circle.d.ts +7 -7
  140. package/dist/primitives/progress-circle.js +8 -8
  141. package/package.json +111 -189
  142. package/dist/components/accordion.cjs +0 -98
  143. package/dist/components/alert-dialog.cjs +0 -156
  144. package/dist/components/alert.cjs +0 -84
  145. package/dist/components/aspect-ratio.cjs +0 -44
  146. package/dist/components/avatar.cjs +0 -66
  147. package/dist/components/badge.cjs +0 -67
  148. package/dist/components/breadcrumb.cjs +0 -127
  149. package/dist/components/button-group.cjs +0 -87
  150. package/dist/components/button.cjs +0 -92
  151. package/dist/components/calendar.cjs +0 -151
  152. package/dist/components/card.cjs +0 -105
  153. package/dist/components/carousel.cjs +0 -211
  154. package/dist/components/chart.cjs +0 -251
  155. package/dist/components/checkbox-cards.cjs +0 -70
  156. package/dist/components/checkbox-group.cjs +0 -64
  157. package/dist/components/checkbox.cjs +0 -54
  158. package/dist/components/collapsible.cjs +0 -62
  159. package/dist/components/command.cjs +0 -168
  160. package/dist/components/context-menu.cjs +0 -219
  161. package/dist/components/dialog.cjs +0 -165
  162. package/dist/components/drawer.cjs +0 -144
  163. package/dist/components/dropdown-menu.cjs +0 -222
  164. package/dist/components/empty.cjs +0 -113
  165. package/dist/components/field.cjs +0 -194
  166. package/dist/components/form.cjs +0 -152
  167. package/dist/components/hover-card.cjs +0 -78
  168. package/dist/components/input-group.cjs +0 -156
  169. package/dist/components/input-number.cjs +0 -99
  170. package/dist/components/input-otp.cjs +0 -102
  171. package/dist/components/input-password.cjs +0 -72
  172. package/dist/components/input-search.cjs +0 -81
  173. package/dist/components/input.cjs +0 -46
  174. package/dist/components/item.cjs +0 -186
  175. package/dist/components/kbd.cjs +0 -54
  176. package/dist/components/label.cjs +0 -46
  177. package/dist/components/menubar.cjs +0 -233
  178. package/dist/components/native-select.cjs +0 -75
  179. package/dist/components/navigation-menu.cjs +0 -146
  180. package/dist/components/pagination.cjs +0 -138
  181. package/dist/components/popover.cjs +0 -87
  182. package/dist/components/progress-circle.cjs +0 -185
  183. package/dist/components/progress.cjs +0 -53
  184. package/dist/components/radio-cards.cjs +0 -67
  185. package/dist/components/radio-group.cjs +0 -60
  186. package/dist/components/radio.cjs +0 -48
  187. package/dist/components/resizable.cjs +0 -72
  188. package/dist/components/scroll-area.cjs +0 -141
  189. package/dist/components/select.cjs +0 -181
  190. package/dist/components/separator.cjs +0 -83
  191. package/dist/components/sheet.cjs +0 -185
  192. package/dist/components/sidebar.cjs +0 -507
  193. package/dist/components/skeleton.cjs +0 -44
  194. package/dist/components/slider.cjs +0 -80
  195. package/dist/components/sonner.cjs +0 -58
  196. package/dist/components/spinner.cjs +0 -76
  197. package/dist/components/switch.cjs +0 -50
  198. package/dist/components/table.cjs +0 -118
  199. package/dist/components/tabs.cjs +0 -76
  200. package/dist/components/textarea.cjs +0 -44
  201. package/dist/components/toggle-group.cjs +0 -91
  202. package/dist/components/toggle.cjs +0 -72
  203. package/dist/components/tooltip.cjs +0 -91
  204. package/dist/hooks/use-animated-value.cjs +0 -75
  205. package/dist/hooks/use-copy-to-clipboard.cjs +0 -58
  206. package/dist/hooks/use-is-mobile.cjs +0 -40
  207. package/dist/hooks/use-media-query.cjs +0 -57
  208. package/dist/hooks/use-mutation-observer.cjs +0 -57
  209. package/dist/hooks/use-pagination.cjs +0 -93
  210. package/dist/index.cjs +0 -1081
  211. package/dist/primitives/checkbox-group.cjs +0 -151
  212. package/dist/primitives/input-number.cjs +0 -439
  213. package/dist/primitives/input.cjs +0 -99
  214. package/dist/primitives/progress-circle.cjs +0 -199
@@ -1,7 +1,7 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
4
- import { buttonVariants } from './button';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
+ import { buttonVariants } from "./button";
5
5
  type AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root>;
6
6
  declare function AlertDialog({ ...props }: AlertDialogProps): JSX.Element;
7
7
  type AlertDialogTriggerProps = ComponentProps<typeof AlertDialogPrimitive.Trigger>;
@@ -14,24 +14,24 @@ interface AlertDialogContentProps extends ComponentProps<typeof AlertDialogPrimi
14
14
  };
15
15
  }
16
16
  declare function AlertDialogContent({ children, className, classNames, ...props }: AlertDialogContentProps): JSX.Element;
17
- type AlertDialogHeaderProps = ComponentProps<'div'>;
17
+ type AlertDialogHeaderProps = ComponentProps<"div">;
18
18
  declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): JSX.Element;
19
- type AlertDialogBodyProps = ComponentProps<'div'>;
19
+ type AlertDialogBodyProps = ComponentProps<"div">;
20
20
  declare function AlertDialogBody({ className, ...props }: AlertDialogBodyProps): JSX.Element;
21
- type AlertDialogFooterProps = ComponentProps<'div'>;
21
+ type AlertDialogFooterProps = ComponentProps<"div">;
22
22
  declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): JSX.Element;
23
23
  type AlertDialogTitleProps = ComponentProps<typeof AlertDialogPrimitive.Title>;
24
24
  declare function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps): JSX.Element;
25
25
  type AlertDialogDescriptionProps = ComponentProps<typeof AlertDialogPrimitive.Description>;
26
26
  declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps): JSX.Element;
27
27
  interface AlertDialogActionProps extends ComponentProps<typeof AlertDialogPrimitive.Action> {
28
- size?: VariantProps<typeof buttonVariants>['size'];
29
- variant?: VariantProps<typeof buttonVariants>['variant'];
28
+ size?: VariantProps<typeof buttonVariants>["size"];
29
+ variant?: VariantProps<typeof buttonVariants>["variant"];
30
30
  }
31
31
  declare function AlertDialogAction({ className, size, variant, ...props }: AlertDialogActionProps): JSX.Element;
32
32
  interface AlertDialogCancelProps extends ComponentProps<typeof AlertDialogPrimitive.Cancel> {
33
- size?: VariantProps<typeof buttonVariants>['size'];
34
- variant?: VariantProps<typeof buttonVariants>['variant'];
33
+ size?: VariantProps<typeof buttonVariants>["size"];
34
+ variant?: VariantProps<typeof buttonVariants>["variant"];
35
35
  }
36
36
  declare function AlertDialogCancel({ className, size, variant, ...props }: AlertDialogCancelProps): JSX.Element;
37
37
  export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
@@ -19,15 +19,15 @@ function AlertDialogContent({ children, className, classNames, ...props }) {
19
19
  return /*#__PURE__*/ jsxs(Portal, {
20
20
  children: [
21
21
  /*#__PURE__*/ jsx(Overlay, {
22
- className: cn('data-[state=open]:fade-in-0 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:animate-out ease-ui fixed inset-0 z-50 bg-black/50', classNames?.overlay),
22
+ className: cn("fixed inset-0 z-50 bg-black/50 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", classNames?.overlay),
23
23
  "data-slot": "alert-dialog-overlay"
24
24
  }),
25
25
  /*#__PURE__*/ jsx(Content, {
26
- className: cn('data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 ease-ui fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center overflow-auto p-8 sm:grid-rows-[1fr_auto_3fr] sm:p-4', classNames?.wrapper),
26
+ className: cn("fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center overflow-auto p-8 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:grid-rows-[1fr_auto_3fr] sm:p-4", classNames?.wrapper),
27
27
  "data-slot": "alert-dialog-content-wrapper",
28
28
  ...props,
29
29
  children: /*#__PURE__*/ jsx("div", {
30
- className: cn('bg-popover text-popover-foreground relative row-start-2 flex w-full max-w-lg flex-col rounded-2xl border shadow-lg', classNames?.content, className),
30
+ className: cn("relative row-start-2 flex w-full max-w-lg flex-col rounded-2xl border bg-popover text-popover-foreground shadow-lg", classNames?.content, className),
31
31
  "data-slot": "alert-dialog-content",
32
32
  children: children
33
33
  })
@@ -37,35 +37,35 @@ function AlertDialogContent({ children, className, classNames, ...props }) {
37
37
  }
38
38
  function AlertDialogHeader({ className, ...props }) {
39
39
  return /*#__PURE__*/ jsx("div", {
40
- className: cn('flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left', className),
40
+ className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left", className),
41
41
  "data-slot": "alert-dialog-header",
42
42
  ...props
43
43
  });
44
44
  }
45
45
  function AlertDialogBody({ className, ...props }) {
46
46
  return /*#__PURE__*/ jsx("main", {
47
- className: cn('overflow-auto px-6 py-2', className),
47
+ className: cn("overflow-auto px-6 py-2", className),
48
48
  "data-slot": "alert-dialog-body",
49
49
  ...props
50
50
  });
51
51
  }
52
52
  function AlertDialogFooter({ className, ...props }) {
53
53
  return /*#__PURE__*/ jsx("div", {
54
- className: cn('flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end', className),
54
+ className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end", className),
55
55
  "data-slot": "alert-dialog-footer",
56
56
  ...props
57
57
  });
58
58
  }
59
59
  function AlertDialogTitle({ className, ...props }) {
60
60
  return /*#__PURE__*/ jsx(Title, {
61
- className: cn('text-lg leading-none font-semibold tracking-tight', className),
61
+ className: cn("text-lg leading-none font-semibold tracking-tight", className),
62
62
  "data-slot": "alert-dialog-title",
63
63
  ...props
64
64
  });
65
65
  }
66
66
  function AlertDialogDescription({ className, ...props }) {
67
67
  return /*#__PURE__*/ jsx(Description, {
68
- className: cn('text-muted-foreground text-sm', className),
68
+ className: cn("text-sm text-muted-foreground", className),
69
69
  "data-slot": "alert-dialog-description",
70
70
  ...props
71
71
  });
@@ -81,7 +81,7 @@ function AlertDialogAction({ className, size, variant, ...props }) {
81
81
  ...props
82
82
  });
83
83
  }
84
- function AlertDialogCancel({ className, size, variant = 'outline', ...props }) {
84
+ function AlertDialogCancel({ className, size, variant = "outline", ...props }) {
85
85
  return /*#__PURE__*/ jsx(Cancel, {
86
86
  className: buttonVariants({
87
87
  className,
@@ -1,17 +1,17 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
3
  declare const alertVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
4
4
  variant: {
5
5
  default: string;
6
6
  destructive: string;
7
7
  };
8
8
  }, Record<string, never>>;
9
- interface AlertProps extends ComponentProps<'div'>, VariantProps<typeof alertVariants> {
9
+ interface AlertProps extends ComponentProps<"div">, VariantProps<typeof alertVariants> {
10
10
  }
11
11
  declare function Alert({ className, variant, ...props }: AlertProps): JSX.Element;
12
- type AlertTitleProps = ComponentProps<'div'>;
12
+ type AlertTitleProps = ComponentProps<"div">;
13
13
  declare function AlertTitle({ children, className, ...props }: AlertTitleProps): JSX.Element;
14
- type AlertDescriptionProps = ComponentProps<'div'>;
14
+ type AlertDescriptionProps = ComponentProps<"div">;
15
15
  declare function AlertDescription({ className, ...props }: AlertDescriptionProps): JSX.Element;
16
16
  export { alertVariants };
17
17
  export { Alert, AlertDescription, AlertTitle };
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { cn, tv } from "@codefast/tailwind-variants";
3
3
  const alertVariants = tv({
4
- base: 'bg-card relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-xl border px-4 py-3 text-sm has-[>svg]:grid-cols-[--spacing(4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
4
+ base: "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-xl border bg-card px-4 py-3 text-sm has-[>svg]:grid-cols-[--spacing(4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
5
5
  defaultVariants: {
6
- variant: 'default'
6
+ variant: "default"
7
7
  },
8
8
  variants: {
9
9
  variant: {
10
- default: 'text-card-foreground',
10
+ default: "text-card-foreground",
11
11
  destructive: "text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
12
12
  }
13
13
  }
@@ -25,7 +25,7 @@ function Alert({ className, variant, ...props }) {
25
25
  }
26
26
  function AlertTitle({ children, className, ...props }) {
27
27
  return /*#__PURE__*/ jsx("div", {
28
- className: cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className),
28
+ className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
29
29
  "data-slot": "alert-title",
30
30
  ...props,
31
31
  children: children
@@ -33,7 +33,7 @@ function AlertTitle({ children, className, ...props }) {
33
33
  }
34
34
  function AlertDescription({ className, ...props }) {
35
35
  return /*#__PURE__*/ jsx("div", {
36
- className: cn('text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', className),
36
+ className: cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className),
37
37
  "data-slot": "alert-description",
38
38
  ...props
39
39
  });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
3
3
  type AspectRatioProps = ComponentProps<typeof AspectRatioPrimitive.Root>;
4
4
  declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element;
5
5
  export { AspectRatio };
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
3
  type AvatarProps = ComponentProps<typeof AvatarPrimitive.Root>;
4
4
  declare function Avatar({ className, ...props }: AvatarProps): JSX.Element;
5
5
  type AvatarImageProps = ComponentProps<typeof AvatarPrimitive.Image>;
@@ -4,21 +4,21 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { Fallback, Image, Root } from "@radix-ui/react-avatar";
5
5
  function Avatar({ className, ...props }) {
6
6
  return /*#__PURE__*/ jsx(Root, {
7
- className: cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className),
7
+ className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className),
8
8
  "data-slot": "avatar",
9
9
  ...props
10
10
  });
11
11
  }
12
12
  function AvatarImage({ className, ...props }) {
13
13
  return /*#__PURE__*/ jsx(Image, {
14
- className: cn('aspect-square size-full', className),
14
+ className: cn("aspect-square size-full", className),
15
15
  "data-slot": "avatar-image",
16
16
  ...props
17
17
  });
18
18
  }
19
19
  function AvatarFallback({ className, ...props }) {
20
20
  return /*#__PURE__*/ jsx(Fallback, {
21
- className: cn('bg-muted flex size-full items-center justify-center rounded-full', className),
21
+ className: cn("flex size-full items-center justify-center rounded-full bg-muted", className),
22
22
  "data-slot": "avatar-fallback",
23
23
  ...props
24
24
  });
@@ -1,5 +1,5 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
3
  declare const badgeVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
4
4
  variant: {
5
5
  default: string;
@@ -8,7 +8,7 @@ declare const badgeVariants: import("@codefast/tailwind-variants").VariantFuncti
8
8
  secondary: string;
9
9
  };
10
10
  }, Record<string, never>>;
11
- interface BadgeProps extends ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
11
+ interface BadgeProps extends ComponentProps<"span">, VariantProps<typeof badgeVariants> {
12
12
  asChild?: boolean;
13
13
  }
14
14
  declare function Badge({ asChild, className, variant, ...props }: BadgeProps): JSX.Element;
@@ -3,21 +3,21 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { tv } from "@codefast/tailwind-variants";
4
4
  import { Slot } from "@radix-ui/react-slot";
5
5
  const badgeVariants = tv({
6
- base: 'focus-visible:ring-ring/50 focus-visible:ring-3 outline-hidden inline-flex w-fit shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md border px-1.5 py-0.5 text-xs font-medium transition [&>svg]:size-3 [&>svg]:shrink-0',
6
+ base: "inline-flex w-fit shrink-0 items-center justify-center gap-2 rounded-md border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap outline-hidden transition focus-visible:ring-3 focus-visible:ring-ring/50 [&>svg]:size-3 [&>svg]:shrink-0",
7
7
  defaultVariants: {
8
- variant: 'default'
8
+ variant: "default"
9
9
  },
10
10
  variants: {
11
11
  variant: {
12
- default: 'bg-primary [a&]:hover:bg-primary/80 text-primary-foreground focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 border-transparent',
13
- destructive: 'bg-destructive dark:bg-destructive/60 [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 border-transparent text-white',
14
- outline: 'bg-background border-input [a&]:hover:bg-accent [a&]:hover:text-accent-foreground [a&]:hover:border-ring/60 focus-visible:border-ring',
15
- secondary: 'bg-secondary [a&]:hover:bg-secondary/80 text-secondary-foreground border-transparent'
12
+ default: "border-transparent bg-primary text-primary-foreground focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 [a&]:hover:bg-primary/80",
13
+ destructive: "border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
14
+ outline: "border-input bg-background focus-visible:border-ring [a&]:hover:border-ring/60 [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
15
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/80"
16
16
  }
17
17
  }
18
18
  });
19
19
  function Badge({ asChild, className, variant, ...props }) {
20
- const Component = asChild ? Slot : 'span';
20
+ const Component = asChild ? Slot : "span";
21
21
  return /*#__PURE__*/ jsx(Component, {
22
22
  className: badgeVariants({
23
23
  className,
@@ -1,21 +1,21 @@
1
- import type { ComponentProps, JSX, ReactNode } from 'react';
2
- interface BreadcrumbProps extends ComponentProps<'nav'> {
1
+ import type { ComponentProps, JSX, ReactNode } from "react";
2
+ interface BreadcrumbProps extends ComponentProps<"nav"> {
3
3
  separator?: ReactNode;
4
4
  }
5
5
  declare function Breadcrumb({ ...props }: BreadcrumbProps): JSX.Element;
6
- type BreadcrumbListProps = ComponentProps<'ol'>;
6
+ type BreadcrumbListProps = ComponentProps<"ol">;
7
7
  declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): JSX.Element;
8
- type BreadcrumbItemProps = ComponentProps<'li'>;
8
+ type BreadcrumbItemProps = ComponentProps<"li">;
9
9
  declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): JSX.Element;
10
- interface BreadcrumbLinkProps extends ComponentProps<'a'> {
10
+ interface BreadcrumbLinkProps extends ComponentProps<"a"> {
11
11
  asChild?: boolean;
12
12
  }
13
13
  declare function BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps): JSX.Element;
14
- type BreadcrumbPageProps = ComponentProps<'span'>;
14
+ type BreadcrumbPageProps = ComponentProps<"span">;
15
15
  declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): JSX.Element;
16
- type BreadcrumbSeparatorProps = ComponentProps<'li'>;
16
+ type BreadcrumbSeparatorProps = ComponentProps<"li">;
17
17
  declare function BreadcrumbSeparator({ children, ...props }: BreadcrumbSeparatorProps): JSX.Element;
18
- type BreadcrumbEllipsisProps = ComponentProps<'span'>;
18
+ type BreadcrumbEllipsisProps = ComponentProps<"span">;
19
19
  declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): JSX.Element;
20
20
  export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
21
21
  export type { BreadcrumbEllipsisProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, };
@@ -12,22 +12,22 @@ function Breadcrumb({ ...props }) {
12
12
  }
13
13
  function BreadcrumbList({ className, ...props }) {
14
14
  return /*#__PURE__*/ jsx("ol", {
15
- className: cn('text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2', className),
15
+ className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2", className),
16
16
  "data-slot": "breadcrumb-list",
17
17
  ...props
18
18
  });
19
19
  }
20
20
  function BreadcrumbItem({ className, ...props }) {
21
21
  return /*#__PURE__*/ jsx("li", {
22
- className: cn('inline-flex items-center gap-1.5', className),
22
+ className: cn("inline-flex items-center gap-1.5", className),
23
23
  "data-slot": "breadcrumb-item",
24
24
  ...props
25
25
  });
26
26
  }
27
27
  function BreadcrumbLink({ asChild, className, ...props }) {
28
- const Component = asChild ? Slot : 'a';
28
+ const Component = asChild ? Slot : "a";
29
29
  return /*#__PURE__*/ jsx(Component, {
30
- className: cn('hover:text-foreground transition-colors', className),
30
+ className: cn("transition-colors hover:text-foreground", className),
31
31
  "data-slot": "breadcrumb-link",
32
32
  ...props
33
33
  });
@@ -36,10 +36,8 @@ function BreadcrumbPage({ className, ...props }) {
36
36
  return /*#__PURE__*/ jsx("span", {
37
37
  "aria-current": "page",
38
38
  "aria-disabled": "true",
39
- className: cn('text-foreground font-normal', className),
39
+ className: cn("font-normal text-foreground", className),
40
40
  "data-slot": "breadcrumb-page",
41
- role: "link",
42
- tabIndex: 0,
43
41
  ...props
44
42
  });
45
43
  }
@@ -57,7 +55,7 @@ function BreadcrumbSeparator({ children, ...props }) {
57
55
  function BreadcrumbEllipsis({ className, ...props }) {
58
56
  return /*#__PURE__*/ jsxs("span", {
59
57
  "aria-hidden": "true",
60
- className: cn('flex size-4 items-center justify-center', className),
58
+ className: cn("flex size-4 items-center justify-center", className),
61
59
  "data-slot": "breadcrumb-ellipsis",
62
60
  role: "presentation",
63
61
  ...props,
@@ -1,15 +1,15 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import { Separator } from './separator';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import { Separator } from "./separator";
4
4
  declare const buttonGroupVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
5
  orientation: {
6
6
  horizontal: string;
7
7
  vertical: string;
8
8
  };
9
9
  }, Record<string, never>>;
10
- type ButtonGroupProps = ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>;
10
+ type ButtonGroupProps = ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>;
11
11
  declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): JSX.Element;
12
- interface ButtonGroupTextProps extends ComponentProps<'div'> {
12
+ interface ButtonGroupTextProps extends ComponentProps<"div"> {
13
13
  asChild?: boolean;
14
14
  }
15
15
  declare function ButtonGroupText({ asChild, className, ...props }: ButtonGroupTextProps): JSX.Element;
@@ -4,14 +4,14 @@ import { cn, tv } from "@codefast/tailwind-variants";
4
4
  import { Slot } from "@radix-ui/react-slot";
5
5
  import { Separator } from "./separator.js";
6
6
  const buttonGroupVariants = tv({
7
- base: cn('flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2', "[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit", '[&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>input]:flex-1', 'has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg'),
7
+ base: cn("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2", "[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit", "[&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>input]:flex-1", "has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg"),
8
8
  defaultVariants: {
9
- orientation: 'horizontal'
9
+ orientation: "horizontal"
10
10
  },
11
11
  variants: {
12
12
  orientation: {
13
- horizontal: '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
14
- vertical: 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none'
13
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
14
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
15
15
  }
16
16
  }
17
17
  });
@@ -27,15 +27,15 @@ function ButtonGroup({ className, orientation, ...props }) {
27
27
  });
28
28
  }
29
29
  function ButtonGroupText({ asChild = false, className, ...props }) {
30
- const Component = asChild ? Slot : 'div';
30
+ const Component = asChild ? Slot : "div";
31
31
  return /*#__PURE__*/ jsx(Component, {
32
- className: cn("bg-muted flex items-center gap-2 rounded-lg border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
32
+ className: cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
33
33
  ...props
34
34
  });
35
35
  }
36
- function ButtonGroupSeparator({ className, orientation = 'vertical', ...props }) {
36
+ function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
37
37
  return /*#__PURE__*/ jsx(Separator, {
38
- className: cn('bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto', className),
38
+ className: cn("relative !m-0 self-stretch bg-input data-[orientation=vertical]:h-auto", className),
39
39
  "data-slot": "button-group-separator",
40
40
  orientation: orientation,
41
41
  ...props
@@ -1,10 +1,10 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
3
  declare const buttonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
4
4
  size: {
5
- 'icon-sm': string;
5
+ "icon-sm": string;
6
6
  icon: string;
7
- 'icon-lg': string;
7
+ "icon-lg": string;
8
8
  sm: string;
9
9
  md: string;
10
10
  lg: string;
@@ -18,9 +18,9 @@ declare const buttonVariants: import("@codefast/tailwind-variants").VariantFunct
18
18
  secondary: string;
19
19
  };
20
20
  }, Record<string, never>>;
21
- type ButtonProps = ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
21
+ type ButtonProps = ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
22
22
  asChild?: boolean;
23
- type?: ComponentProps<'button'>['type'];
23
+ type?: ComponentProps<"button">["type"];
24
24
  };
25
25
  declare function Button({ asChild, children, className, size, type, variant, ...props }: ButtonProps): JSX.Element;
26
26
  export { buttonVariants };
@@ -2,32 +2,32 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { tv } from "@codefast/tailwind-variants";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  const buttonVariants = tv({
5
- base: "focus-visible:ring-3 outline-hidden inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
5
+ base: "inline-flex shrink-0 items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-hidden transition select-none focus-visible:ring-3 disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
6
6
  defaultVariants: {
7
- size: 'md',
8
- variant: 'default'
7
+ size: "md",
8
+ variant: "default"
9
9
  },
10
10
  variants: {
11
11
  size: {
12
- 'icon-sm': 'size-8',
13
- icon: 'size-9',
14
- 'icon-lg': 'size-10',
15
- sm: 'h-8 px-3 has-[>svg]:px-2.5',
16
- md: 'h-9 px-4 has-[>svg]:px-3',
17
- lg: 'h-10 px-6 has-[>svg]:px-4'
12
+ "icon-sm": "size-8",
13
+ icon: "size-9",
14
+ "icon-lg": "size-10",
15
+ sm: "h-8 px-3 has-[>svg]:px-2.5",
16
+ md: "h-9 px-4 has-[>svg]:px-3",
17
+ lg: "h-10 px-6 has-[>svg]:px-4"
18
18
  },
19
19
  variant: {
20
- default: 'bg-primary text-primary-foreground focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 hover:not-disabled:bg-primary/80',
21
- destructive: 'bg-destructive dark:bg-destructive/60 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 hover:not-disabled:bg-destructive/90 text-white',
22
- ghost: 'hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50',
23
- link: 'text-primary hover:not-disabled:underline focus-visible:ring-ring/50 underline-offset-4',
24
- outline: 'border-input shadow-xs hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 focus-visible:border-ring aria-invalid:border-destructive dark:aria-invalid:border-destructive/70 hover:not-disabled:aria-invalid:border-destructive/60 focus-within:aria-invalid:ring-destructive/20 dark:focus-within:aria-invalid:ring-destructive/40 dark:bg-input/30 dark:hover:not-disabled:bg-input/50 hover:not-disabled:border-ring/60 border',
25
- secondary: 'bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50'
20
+ default: "bg-primary text-primary-foreground hover:not-disabled:bg-primary/80 focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40",
21
+ destructive: "bg-destructive text-white hover:not-disabled:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
22
+ ghost: "hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50",
23
+ link: "text-primary underline-offset-4 hover:not-disabled:underline focus-visible:ring-ring/50",
24
+ outline: "border border-input shadow-xs hover:not-disabled:border-ring/60 hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:aria-invalid:border-destructive/60 dark:bg-input/30 dark:hover:not-disabled:bg-input/50 dark:aria-invalid:border-destructive/70 dark:focus-within:aria-invalid:ring-destructive/40",
25
+ secondary: "bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50"
26
26
  }
27
27
  }
28
28
  });
29
- function Button({ asChild = false, children, className, size, type = 'button', variant, ...props }) {
30
- const Comp = asChild ? Slot : 'button';
29
+ function Button({ asChild = false, children, className, size, type = "button", variant, ...props }) {
30
+ const Comp = asChild ? Slot : "button";
31
31
  if (asChild) return /*#__PURE__*/ jsx(Comp, {
32
32
  className: buttonVariants({
33
33
  className,
@@ -1,9 +1,9 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import type { DayButton } from 'react-day-picker';
3
- import { DayPicker } from 'react-day-picker';
4
- import { Button } from './button';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import type { DayButton } from "react-day-picker";
3
+ import { DayPicker } from "react-day-picker";
4
+ import { Button } from "./button";
5
5
  type CalendarProps = ComponentProps<typeof DayPicker> & {
6
- buttonVariant?: ComponentProps<typeof Button>['variant'];
6
+ buttonVariant?: ComponentProps<typeof Button>["variant"];
7
7
  };
8
8
  declare function Calendar({ buttonVariant, captionLayout, className, classNames, components, formatters, showOutsideDays, ...props }: CalendarProps): JSX.Element;
9
9
  type CalendarDayButtonProps = ComponentProps<typeof DayButton>;