@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
@@ -6,33 +6,33 @@ import { useAnimatedValue } from "../hooks/use-animated-value.js";
6
6
  import { Indicator, Provider, Root, SVG, Track, Value } from "../primitives/progress-circle.js";
7
7
  const progressCircleVariants = tv({
8
8
  defaultVariants: {
9
- size: 'md',
10
- thickness: 'regular',
11
- variant: 'default'
9
+ size: "md",
10
+ thickness: "regular",
11
+ variant: "default"
12
12
  },
13
13
  slots: {
14
- indicator: 'origin-center',
15
- label: 'absolute inset-0 flex items-center justify-center text-xs font-medium',
16
- root: 'relative inline-flex items-center justify-center',
17
- svg: 'size-full',
18
- track: 'origin-center'
14
+ indicator: "origin-center",
15
+ label: "absolute inset-0 flex items-center justify-center text-xs font-medium",
16
+ root: "relative inline-flex items-center justify-center",
17
+ svg: "size-full",
18
+ track: "origin-center"
19
19
  },
20
20
  variants: {
21
21
  size: {
22
22
  sm: {
23
- label: 'text-[0.625rem]'
23
+ label: "text-[0.625rem]"
24
24
  },
25
25
  md: {
26
- label: 'text-xs'
26
+ label: "text-xs"
27
27
  },
28
28
  lg: {
29
- label: 'text-sm'
29
+ label: "text-sm"
30
30
  },
31
31
  xl: {
32
- label: 'text-base'
32
+ label: "text-base"
33
33
  },
34
- '2xl': {
35
- label: 'text-lg'
34
+ "2xl": {
35
+ label: "text-lg"
36
36
  }
37
37
  },
38
38
  thickness: {
@@ -42,17 +42,17 @@ const progressCircleVariants = tv({
42
42
  },
43
43
  variant: {
44
44
  default: {
45
- indicator: 'text-primary',
46
- track: 'text-primary/20'
45
+ indicator: "text-primary",
46
+ track: "text-primary/20"
47
47
  },
48
48
  destructive: {
49
- indicator: 'text-destructive',
50
- track: 'text-destructive/20'
49
+ indicator: "text-destructive",
50
+ track: "text-destructive/20"
51
51
  }
52
52
  }
53
53
  }
54
54
  });
55
- function ProgressCircle({ animate = true, animationDuration = 1000, className, classNames, customLabel, showValue = false, size, sizeInPixels, strokeWidth, thickness = 'regular', value = 0, variant = 'default', ...props }) {
55
+ function ProgressCircle({ animate = true, animationDuration = 1000, className, classNames, customLabel, showValue = false, size, sizeInPixels, strokeWidth, thickness = "regular", value = 0, variant = "default", ...props }) {
56
56
  const displayValue = useAnimatedValue(value, animationDuration, animate);
57
57
  const actualSize = useMemo(()=>sizeInPixels ?? getActualSize(size), [
58
58
  sizeInPixels,
@@ -111,7 +111,7 @@ function ProgressCircle({ animate = true, animationDuration = 1000, className, c
111
111
  }),
112
112
  style: {
113
113
  transitionDuration: `${animationDuration.toString()}ms`,
114
- transitionProperty: 'stroke-dashoffset'
114
+ transitionProperty: "stroke-dashoffset"
115
115
  }
116
116
  })
117
117
  ]
@@ -126,10 +126,10 @@ function ProgressCircle({ animate = true, animationDuration = 1000, className, c
126
126
  })
127
127
  });
128
128
  }
129
- ProgressCircle.displayName = 'ProgressCircle';
129
+ ProgressCircle.displayName = "ProgressCircle";
130
130
  const getActualSize = (size)=>{
131
131
  const sizeMap = {
132
- '2xl': 128,
132
+ "2xl": 128,
133
133
  lg: 64,
134
134
  md: 48,
135
135
  sm: 32,
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as ProgressPrimitive from '@radix-ui/react-progress';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
3
  type ProgressProps = ComponentProps<typeof ProgressPrimitive.Root>;
4
4
  declare function Progress({ className, value, ...props }: ProgressProps): JSX.Element;
5
5
  export { Progress };
@@ -4,11 +4,11 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { Indicator, Root } from "@radix-ui/react-progress";
5
5
  function Progress({ className, value, ...props }) {
6
6
  return /*#__PURE__*/ jsx(Root, {
7
- className: cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className),
7
+ className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
8
8
  "data-slot": "progress",
9
9
  ...props,
10
10
  children: /*#__PURE__*/ jsx(Indicator, {
11
- className: "bg-primary size-full flex-1 transition-all",
11
+ className: "size-full flex-1 bg-primary transition-all",
12
12
  "data-slot": "progress-indicator",
13
13
  style: {
14
14
  transform: `translateX(-${(100 - (value ?? 0)).toString()}%)`
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
3
  type RadioCardsProps = ComponentProps<typeof RadioGroupPrimitive.Root>;
4
4
  declare function RadioCards(props: RadioCardsProps): JSX.Element;
5
5
  type RadioCardsItemProps = ComponentProps<typeof RadioGroupPrimitive.Item>;
@@ -11,15 +11,15 @@ function RadioCards(props) {
11
11
  }
12
12
  function RadioCardsItem({ children, className, ...props }) {
13
13
  return /*#__PURE__*/ jsxs(Label, {
14
- className: "border-input hover:not-has-disabled:not-has-aria-checked:bg-secondary has-aria-checked:bg-primary/10 has-aria-checked:border-primary has-focus-visible:border-ring flex items-start gap-3 rounded-lg border p-3 transition has-disabled:opacity-50",
14
+ className: "flex items-start gap-3 rounded-lg border border-input p-3 transition hover:not-has-disabled:not-has-aria-checked:bg-secondary has-focus-visible:border-ring has-disabled:opacity-50 has-aria-checked:border-primary has-aria-checked:bg-primary/10",
15
15
  "data-slot": "radio-card",
16
16
  children: [
17
17
  /*#__PURE__*/ jsx(Item, {
18
- className: cn('border-input text-primary-foreground focus-visible:not-aria-checked:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-full border shadow-xs outline-hidden transition focus-visible:ring-3', className),
18
+ className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-full border border-input text-primary-foreground shadow-xs outline-hidden transition focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-aria-checked:border-ring aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40", className),
19
19
  "data-slot": "radio-card-item",
20
20
  ...props,
21
21
  children: /*#__PURE__*/ jsx(Indicator, {
22
- className: "bg-background size-1 rounded-full",
22
+ className: "size-1 rounded-full bg-background",
23
23
  "data-slot": "radio-card-indicator"
24
24
  })
25
25
  }),
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
3
  type RadioGroupProps = ComponentProps<typeof RadioGroupPrimitive.Root>;
4
4
  declare function RadioGroup({ className, ...props }: RadioGroupProps): JSX.Element;
5
5
  type RadioGroupItemProps = ComponentProps<typeof RadioGroupPrimitive.Item>;
@@ -4,18 +4,18 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { Indicator, Item, Root } from "@radix-ui/react-radio-group";
5
5
  function RadioGroup({ className, ...props }) {
6
6
  return /*#__PURE__*/ jsx(Root, {
7
- className: cn('grid gap-2', className),
7
+ className: cn("grid gap-2", className),
8
8
  "data-slot": "radio-group",
9
9
  ...props
10
10
  });
11
11
  }
12
12
  function RadioGroupItem({ className, ...props }) {
13
13
  return /*#__PURE__*/ jsx(Item, {
14
- className: cn('border-input hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary aria-checked:aria-invalid:bg-destructive aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50', className),
14
+ className: cn("peer inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-input shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
15
15
  "data-slot": "radio-group-item",
16
16
  ...props,
17
17
  children: /*#__PURE__*/ jsx(Indicator, {
18
- className: "bg-background size-1 rounded-full",
18
+ className: "size-1 rounded-full bg-background",
19
19
  "data-slot": "radio-group-indicator"
20
20
  })
21
21
  });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- interface RadioProps extends Omit<ComponentProps<'input'>, 'type'> {
1
+ import type { ComponentProps, JSX } from "react";
2
+ interface RadioProps extends Omit<ComponentProps<"input">, "type"> {
3
3
  onValueChange?: (value: string) => void;
4
4
  }
5
5
  declare function Radio({ className, onChange, onValueChange, ...props }: RadioProps): JSX.Element;
@@ -4,7 +4,7 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { composeEventHandlers } from "@radix-ui/primitive";
5
5
  function Radio({ className, onChange, onValueChange, ...props }) {
6
6
  return /*#__PURE__*/ jsx("input", {
7
- className: cn('border-input hover:not-disabled:not-checked:border-ring/60 focus-visible:not-checked:border-ring focus-visible:ring-ring/50 focus-visible:checked:ring-primary/20 dark:focus-visible:checked:ring-primary/40 checked:border-primary checked:bg-primary checked:aria-invalid:bg-destructive aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-checked:aria-invalid:border-destructive/60 after:bg-background dark:not-checked:after:bg-input/30 peer inline-flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border shadow-xs outline-hidden after:size-full after:rounded-full after:transition-[width,height] checked:after:size-1 focus-visible:ring-3 disabled:opacity-50', className),
7
+ className: cn("peer inline-flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-input shadow-xs outline-hidden after:size-full after:rounded-full after:bg-background after:transition-[width,height] checked:border-primary checked:bg-primary checked:after:size-1 hover:not-disabled:not-checked:border-ring/60 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-checked:border-ring focus-visible:checked:ring-primary/20 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 checked:aria-invalid:bg-destructive hover:not-disabled:not-checked:aria-invalid:border-destructive/60 dark:not-checked:after:bg-input/30 dark:focus-visible:checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
8
8
  "data-slot": "radio",
9
9
  type: "radio",
10
10
  onChange: composeEventHandlers(onChange, (event)=>onValueChange?.(event.currentTarget.value)),
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as ResizablePrimitive from 'react-resizable-panels';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as ResizablePrimitive from "react-resizable-panels";
3
3
  type ResizableGroupProps = ComponentProps<typeof ResizablePrimitive.Group>;
4
4
  declare function ResizableGroup({ className, ...props }: ResizableGroupProps): JSX.Element;
5
5
  type ResizablePanelProps = ComponentProps<typeof ResizablePrimitive.Panel>;
@@ -5,7 +5,7 @@ import { GripVerticalIcon } from "lucide-react";
5
5
  import { Group, Panel, Separator } from "react-resizable-panels";
6
6
  function ResizableGroup({ className, ...props }) {
7
7
  return /*#__PURE__*/ jsx(Group, {
8
- className: cn('flex size-full', className),
8
+ className: cn("flex size-full", className),
9
9
  "data-slot": "resizable-group",
10
10
  ...props
11
11
  });
@@ -18,11 +18,11 @@ function ResizablePanel({ ...props }) {
18
18
  }
19
19
  function ResizableSeparator({ className, withHandle, ...props }) {
20
20
  return /*#__PURE__*/ jsx(Separator, {
21
- className: cn('bg-border focus-visible:bg-ring focus-visible:ring-ring/50 flex items-center justify-center outline-hidden focus-visible:ring-3', 'aria-[orientation=vertical]:w-px', 'aria-[orientation=horizontal]:h-px', className),
21
+ className: cn("flex items-center justify-center bg-border outline-hidden focus-visible:bg-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-[orientation=vertical]:w-px", "aria-[orientation=horizontal]:h-px", className),
22
22
  "data-slot": "resizable-separator",
23
23
  ...props,
24
24
  children: withHandle ? /*#__PURE__*/ jsx("div", {
25
- className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border",
25
+ className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
26
26
  children: /*#__PURE__*/ jsx(GripVerticalIcon, {
27
27
  className: "size-2.5"
28
28
  })
@@ -1,7 +1,7 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { Scope } from '@radix-ui/react-context';
3
- import type { ComponentProps, JSX } from 'react';
4
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { Scope } from "@radix-ui/react-context";
3
+ import type { ComponentProps, JSX } from "react";
4
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
5
  declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
6
6
  orientation: {
7
7
  horizontal: string;
@@ -17,7 +17,7 @@ declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants")
17
17
  type ScopedProps<P> = P & {
18
18
  __scopeScrollArea?: Scope;
19
19
  };
20
- type ScrollAreaContextValue = Pick<VariantProps<typeof scrollAreaScrollbarVariants>, 'size'>;
20
+ type ScrollAreaContextValue = Pick<VariantProps<typeof scrollAreaScrollbarVariants>, "size">;
21
21
  type ScrollAreaProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue>;
22
22
  declare function ScrollArea({ __scopeScrollArea, children, className, size, ...props }: ScrollAreaProps): JSX.Element;
23
23
  type ScrollAreaScrollbarProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>>;
@@ -4,57 +4,57 @@ import { cn, tv } from "@codefast/tailwind-variants";
4
4
  import { createContextScope } from "@radix-ui/react-context";
5
5
  import { Corner, Root, ScrollAreaThumb, Scrollbar, Viewport } from "@radix-ui/react-scroll-area";
6
6
  const scrollAreaScrollbarVariants = tv({
7
- base: 'flex touch-none select-none p-px transition-colors',
7
+ base: "flex touch-none p-px transition-colors select-none",
8
8
  compoundVariants: [
9
9
  {
10
- className: 'w-1.5',
11
- orientation: 'vertical',
12
- size: 'sm'
10
+ className: "w-1.5",
11
+ orientation: "vertical",
12
+ size: "sm"
13
13
  },
14
14
  {
15
- className: 'w-2',
16
- orientation: 'vertical',
17
- size: 'md'
15
+ className: "w-2",
16
+ orientation: "vertical",
17
+ size: "md"
18
18
  },
19
19
  {
20
- className: 'w-2.5',
21
- orientation: 'vertical',
22
- size: 'lg'
20
+ className: "w-2.5",
21
+ orientation: "vertical",
22
+ size: "lg"
23
23
  },
24
24
  {
25
- className: 'h-1.5',
26
- orientation: 'horizontal',
27
- size: 'sm'
25
+ className: "h-1.5",
26
+ orientation: "horizontal",
27
+ size: "sm"
28
28
  },
29
29
  {
30
- className: 'h-2',
31
- orientation: 'horizontal',
32
- size: 'md'
30
+ className: "h-2",
31
+ orientation: "horizontal",
32
+ size: "md"
33
33
  },
34
34
  {
35
- className: 'h-2.5',
36
- orientation: 'horizontal',
37
- size: 'lg'
35
+ className: "h-2.5",
36
+ orientation: "horizontal",
37
+ size: "lg"
38
38
  }
39
39
  ],
40
40
  defaultVariants: {
41
- orientation: 'vertical',
42
- size: 'md'
41
+ orientation: "vertical",
42
+ size: "md"
43
43
  },
44
44
  variants: {
45
45
  orientation: {
46
- horizontal: 'w-full flex-col border-t border-t-transparent',
47
- vertical: 'h-full flex-row border-l border-l-transparent'
46
+ horizontal: "w-full flex-col border-t border-t-transparent",
47
+ vertical: "h-full flex-row border-l border-l-transparent"
48
48
  },
49
49
  size: {
50
- none: '',
51
- sm: '',
52
- md: '',
53
- lg: ''
50
+ none: "",
51
+ sm: "",
52
+ md: "",
53
+ lg: ""
54
54
  }
55
55
  }
56
56
  });
57
- const SCROLL_AREA_NAME = 'ScrollArea';
57
+ const SCROLL_AREA_NAME = "ScrollArea";
58
58
  const [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
59
59
  const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
60
60
  function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
@@ -62,12 +62,12 @@ function ScrollArea({ __scopeScrollArea, children, className, size, ...props })
62
62
  scope: __scopeScrollArea,
63
63
  size: size,
64
64
  children: /*#__PURE__*/ jsxs(Root, {
65
- className: cn('relative', className),
65
+ className: cn("relative", className),
66
66
  "data-slot": "scroll-area",
67
67
  ...props,
68
68
  children: [
69
69
  /*#__PURE__*/ jsx(Viewport, {
70
- className: "outline-ring ring-ring/50 size-full rounded-[inherit] transition focus-visible:ring-4 focus-visible:outline-1",
70
+ className: "size-full rounded-[inherit] ring-ring/50 outline-ring transition focus-visible:ring-4 focus-visible:outline-1",
71
71
  "data-slot": "scroll-area-viewport",
72
72
  children: children
73
73
  }),
@@ -94,7 +94,7 @@ function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...pro
94
94
  orientation: orientation,
95
95
  ...props,
96
96
  children: /*#__PURE__*/ jsx(ScrollAreaThumb, {
97
- className: "bg-border relative flex-1 rounded-full"
97
+ className: "relative flex-1 rounded-full bg-border"
98
98
  })
99
99
  });
100
100
  }
@@ -1,7 +1,7 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as SelectPrimitive from '@radix-ui/react-select';
4
- import { buttonVariants } from './button';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as SelectPrimitive from "@radix-ui/react-select";
4
+ import { buttonVariants } from "./button";
5
5
  type SelectProps = ComponentProps<typeof SelectPrimitive.Root>;
6
6
  declare function Select({ ...props }: SelectProps): JSX.Element;
7
7
  type SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;
@@ -9,7 +9,7 @@ declare function SelectGroup({ ...props }: SelectGroupProps): JSX.Element;
9
9
  type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;
10
10
  declare function SelectValue({ ...props }: SelectValueProps): JSX.Element;
11
11
  interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger> {
12
- size?: VariantProps<typeof buttonVariants>['size'];
12
+ size?: VariantProps<typeof buttonVariants>["size"];
13
13
  }
14
14
  declare function SelectTrigger({ children, className, size, ...props }: SelectTriggerProps): JSX.Element;
15
15
  type SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;
@@ -30,7 +30,7 @@ function SelectTrigger({ children, className, size, ...props }) {
30
30
  className
31
31
  ],
32
32
  size,
33
- variant: 'outline'
33
+ variant: "outline"
34
34
  }),
35
35
  "data-size": size,
36
36
  "data-slot": "select-trigger",
@@ -47,7 +47,7 @@ function SelectTrigger({ children, className, size, ...props }) {
47
47
  }
48
48
  function SelectScrollUpButton({ className, ...props }) {
49
49
  return /*#__PURE__*/ jsx(ScrollUpButton, {
50
- className: cn('text-muted-foreground flex items-center justify-center py-1', className),
50
+ className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
51
51
  "data-slot": "select-scroll-up-button",
52
52
  ...props,
53
53
  children: /*#__PURE__*/ jsx(ChevronUpIcon, {
@@ -57,7 +57,7 @@ function SelectScrollUpButton({ className, ...props }) {
57
57
  }
58
58
  function SelectScrollDownButton({ className, ...props }) {
59
59
  return /*#__PURE__*/ jsx(ScrollDownButton, {
60
- className: cn('text-muted-foreground flex items-center justify-center py-1', className),
60
+ className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
61
61
  "data-slot": "select-scroll-down-button",
62
62
  ...props,
63
63
  children: /*#__PURE__*/ jsx(ChevronDownIcon, {
@@ -65,17 +65,17 @@ function SelectScrollDownButton({ className, ...props }) {
65
65
  })
66
66
  });
67
67
  }
68
- function SelectContent({ children, className, position = 'popper', ...props }) {
68
+ function SelectContent({ children, className, position = "popper", ...props }) {
69
69
  return /*#__PURE__*/ jsx(Portal, {
70
70
  children: /*#__PURE__*/ jsxs(Content, {
71
- className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border shadow-lg', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
71
+ className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", "popper" === position && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
72
72
  "data-slot": "select-content",
73
73
  position: position,
74
74
  ...props,
75
75
  children: [
76
76
  /*#__PURE__*/ jsx(SelectScrollUpButton, {}),
77
77
  /*#__PURE__*/ jsx(Viewport, {
78
- className: cn('p-1', 'popper' === position && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'),
78
+ className: cn("p-1", "popper" === position && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
79
79
  children: children
80
80
  }),
81
81
  /*#__PURE__*/ jsx(SelectScrollDownButton, {})
@@ -85,14 +85,14 @@ function SelectContent({ children, className, position = 'popper', ...props }) {
85
85
  }
86
86
  function SelectLabel({ className, ...props }) {
87
87
  return /*#__PURE__*/ jsx(Label, {
88
- className: cn('flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold', className),
88
+ className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold", className),
89
89
  "data-slot": "select-label",
90
90
  ...props
91
91
  });
92
92
  }
93
93
  function SelectItem({ children, className, ...props }) {
94
94
  return /*#__PURE__*/ jsxs(Item, {
95
- className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
95
+ className: cn("relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
96
96
  "data-slot": "select-item",
97
97
  ...props,
98
98
  children: [
@@ -112,7 +112,7 @@ function SelectItem({ children, className, ...props }) {
112
112
  }
113
113
  function SelectSeparator({ className, ...props }) {
114
114
  return /*#__PURE__*/ jsx(Separator, {
115
- className: cn('bg-border mx-2 my-1 h-px', className),
115
+ className: cn("mx-2 my-1 h-px bg-border", className),
116
116
  "data-slot": "select-separator",
117
117
  ...props
118
118
  });
@@ -1,6 +1,6 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
4
  declare const separatorVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
5
  align: {
6
6
  center: string;
@@ -12,10 +12,10 @@ declare const separatorVariants: import("@codefast/tailwind-variants").VariantFu
12
12
  vertical: string;
13
13
  };
14
14
  }, Record<string, never>>;
15
- interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, 'orientation'> {
15
+ interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, "orientation"> {
16
16
  }
17
17
  declare function Separator({ align, className, decorative, orientation, ...props }: SeparatorProps): JSX.Element;
18
- type SeparatorItemProps = ComponentProps<'div'>;
18
+ type SeparatorItemProps = ComponentProps<"div">;
19
19
  declare function SeparatorItem({ className, ...props }: SeparatorItemProps): JSX.Element;
20
20
  export { separatorVariants };
21
21
  export { Separator, SeparatorItem };
@@ -3,20 +3,20 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { cn, tv } from "@codefast/tailwind-variants";
4
4
  import { Root } from "@radix-ui/react-separator";
5
5
  const separatorVariants = tv({
6
- base: 'bg-border relative flex shrink-0 items-center',
6
+ base: "relative flex shrink-0 items-center bg-border",
7
7
  defaultVariants: {
8
- align: 'center',
9
- orientation: 'horizontal'
8
+ align: "center",
9
+ orientation: "horizontal"
10
10
  },
11
11
  variants: {
12
12
  align: {
13
- center: 'justify-center',
14
- end: 'justify-end',
15
- start: 'justify-start'
13
+ center: "justify-center",
14
+ end: "justify-end",
15
+ start: "justify-start"
16
16
  },
17
17
  orientation: {
18
- horizontal: 'h-px w-full',
19
- vertical: 'h-full w-px flex-col'
18
+ horizontal: "h-px w-full",
19
+ vertical: "h-full w-px flex-col"
20
20
  }
21
21
  }
22
22
  });
@@ -35,7 +35,7 @@ function Separator({ align, className, decorative = true, orientation, ...props
35
35
  }
36
36
  function SeparatorItem({ className, ...props }) {
37
37
  return /*#__PURE__*/ jsx("div", {
38
- className: cn('bg-background text-muted-foreground absolute mx-2 px-2 text-sm', className),
38
+ className: cn("absolute mx-2 bg-background px-2 text-sm text-muted-foreground", className),
39
39
  "data-slot": "separator-item",
40
40
  ...props
41
41
  });
@@ -1,7 +1,7 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as SheetPrimitive from '@radix-ui/react-dialog';
4
- import { buttonVariants } from './button';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
4
+ import { buttonVariants } from "./button";
5
5
  declare const sheetContentVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
6
6
  side: {
7
7
  bottom: string;
@@ -22,19 +22,19 @@ interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content
22
22
  };
23
23
  }
24
24
  declare function SheetContent({ children, className, classNames, side, ...props }: SheetContentProps): JSX.Element;
25
- type SheetHeaderProps = ComponentProps<'div'>;
25
+ type SheetHeaderProps = ComponentProps<"div">;
26
26
  declare function SheetHeader({ className, ...props }: SheetHeaderProps): JSX.Element;
27
- type SheetBodyProps = ComponentProps<'div'>;
27
+ type SheetBodyProps = ComponentProps<"div">;
28
28
  declare function SheetBody({ className, ...props }: SheetBodyProps): JSX.Element;
29
- type SheetFooterProps = ComponentProps<'div'>;
29
+ type SheetFooterProps = ComponentProps<"div">;
30
30
  declare function SheetFooter({ className, ...props }: SheetFooterProps): JSX.Element;
31
31
  type SheetTitleProps = ComponentProps<typeof SheetPrimitive.Title>;
32
32
  declare function SheetTitle({ className, ...props }: SheetTitleProps): JSX.Element;
33
33
  type SheetDescriptionProps = ComponentProps<typeof SheetPrimitive.Description>;
34
34
  declare function SheetDescription({ className, ...props }: SheetDescriptionProps): JSX.Element;
35
35
  interface SheetCloseProps extends ComponentProps<typeof SheetPrimitive.Close> {
36
- size?: VariantProps<typeof buttonVariants>['size'];
37
- variant?: VariantProps<typeof buttonVariants>['variant'];
36
+ size?: VariantProps<typeof buttonVariants>["size"];
37
+ variant?: VariantProps<typeof buttonVariants>["variant"];
38
38
  }
39
39
  declare function SheetClose({ className, size, variant, ...props }: SheetCloseProps): JSX.Element;
40
40
  export { sheetContentVariants };