@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,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- type SkeletonProps = ComponentProps<'div'>;
1
+ import type { ComponentProps, JSX } from "react";
2
+ type SkeletonProps = ComponentProps<"div">;
3
3
  declare function Skeleton({ className, ...props }: SkeletonProps): JSX.Element;
4
4
  export { Skeleton };
5
5
  export type { SkeletonProps };
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@codefast/tailwind-variants";
3
3
  function Skeleton({ className, ...props }) {
4
4
  return /*#__PURE__*/ jsx("div", {
5
- className: cn('bg-muted animate-pulse rounded-lg', className),
5
+ className: cn("animate-pulse rounded-lg bg-muted", className),
6
6
  "data-slot": "skeleton",
7
7
  ...props
8
8
  });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as SliderPrimitive from '@radix-ui/react-slider';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as SliderPrimitive from "@radix-ui/react-slider";
3
3
  type SliderProps = ComponentProps<typeof SliderPrimitive.Root>;
4
4
  declare function Slider({ className, defaultValue, max, min, value, ...props }: SliderProps): JSX.Element;
5
5
  export { Slider };
@@ -17,7 +17,7 @@ function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }
17
17
  max
18
18
  ]);
19
19
  return /*#__PURE__*/ jsxs(Root, {
20
- className: cn('relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col', className),
20
+ className: cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
21
21
  "data-slot": "slider",
22
22
  defaultValue: defaultValue,
23
23
  max: max,
@@ -26,10 +26,10 @@ function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }
26
26
  ...props,
27
27
  children: [
28
28
  /*#__PURE__*/ jsx(Track, {
29
- className: "bg-input relative w-full grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1",
29
+ className: "relative w-full grow overflow-hidden rounded-full bg-input data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1",
30
30
  "data-slot": "slider-track",
31
31
  children: /*#__PURE__*/ jsx(Range, {
32
- className: "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",
32
+ className: "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",
33
33
  "data-slot": "slider-range"
34
34
  })
35
35
  }),
@@ -37,7 +37,7 @@ function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }
37
37
  length: _values.length
38
38
  }, (_, index)=>/*#__PURE__*/ jsx(Thumb, {
39
39
  "aria-label": "Volume",
40
- className: cn('border-primary bg-primary after:bg-background focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 flex size-4 items-center justify-center rounded-full border-2 shadow-sm outline-hidden after:size-full after:rounded-full after:transition-[width,height] focus-visible:ring-4 active:not-data-disabled:after:size-1'),
40
+ className: cn("flex size-4 items-center justify-center rounded-full border-2 border-primary bg-primary shadow-sm outline-hidden after:size-full after:rounded-full after:bg-background after:transition-[width,height] focus-visible:ring-4 focus-visible:ring-primary/20 active:not-data-disabled:after:size-1 dark:focus-visible:ring-primary/40"),
41
41
  "data-slot": "slider-thumb"
42
42
  }, index))
43
43
  ]
@@ -1,7 +1,7 @@
1
- import type { JSX } from 'react';
2
- import type { ToasterProps as SonnerToasterProps } from 'sonner';
1
+ import type { JSX } from "react";
2
+ import type { ToasterProps as SonnerToasterProps } from "sonner";
3
3
  type ToasterProps = SonnerToasterProps;
4
4
  declare function Toaster({ ...props }: ToasterProps): JSX.Element;
5
- export { toast, useSonner } from 'sonner';
5
+ export { toast, useSonner } from "sonner";
6
6
  export { Toaster };
7
7
  export type { ToasterProps };
@@ -3,13 +3,13 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { useTheme } from "next-themes";
4
4
  import { Toaster, toast, useSonner } from "sonner";
5
5
  function sonner_Toaster({ ...props }) {
6
- const { theme = 'system' } = useTheme();
6
+ const { theme = "system" } = useTheme();
7
7
  return /*#__PURE__*/ jsx(Toaster, {
8
8
  className: "toaster group",
9
9
  style: {
10
- '--normal-bg': 'var(--popover)',
11
- '--normal-border': 'var(--border)',
12
- '--normal-text': 'var(--popover-foreground)'
10
+ "--normal-bg": "var(--popover)",
11
+ "--normal-border": "var(--border)",
12
+ "--normal-text": "var(--popover-foreground)"
13
13
  },
14
14
  theme: theme,
15
15
  ...props
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
- interface SpinnerProps extends ComponentProps<'span'> {
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ interface SpinnerProps extends ComponentProps<"span"> {
3
3
  loading?: boolean;
4
4
  }
5
5
  declare function Spinner({ children, className, loading, ...props }: SpinnerProps): ReactNode;
@@ -6,16 +6,16 @@ const SPINNER_COUNT = 8;
6
6
  function Spinner({ children, className, loading = true, ...props }) {
7
7
  if (!loading) return children;
8
8
  const spinner = /*#__PURE__*/ jsx("span", {
9
- className: cn('relative flex size-4 items-center justify-center opacity-60', className),
9
+ className: cn("relative flex size-4 items-center justify-center opacity-60", className),
10
10
  ...props,
11
11
  children: Array.from({
12
12
  length: SPINNER_COUNT
13
13
  }, (_, index)=>/*#__PURE__*/ jsx("span", {
14
- className: cn('before:animate-out before:fade-out-25 before:repeat-infinite before:animation-duration-(--spinner-duration) absolute h-full rotate-(--spinner-rotate) before:block before:h-1/3 before:w-full before:rounded-full before:bg-current before:delay-(--spinner-delay)'),
14
+ className: cn("absolute h-full rotate-(--spinner-rotate) before:block before:h-1/3 before:w-full before:animate-out before:rounded-full before:bg-current before:delay-(--spinner-delay) before:animation-duration-(--spinner-duration) before:fade-out-25 before:repeat-infinite"),
15
15
  style: {
16
- '--spinner-delay': `-${((SPINNER_COUNT - index) * 100).toString()}ms`,
17
- '--spinner-duration': `${(100 * SPINNER_COUNT).toString()}ms`,
18
- '--spinner-rotate': `${(360 / SPINNER_COUNT * index).toString()}deg`,
16
+ "--spinner-delay": `-${((SPINNER_COUNT - index) * 100).toString()}ms`,
17
+ "--spinner-duration": `${(100 * SPINNER_COUNT).toString()}ms`,
18
+ "--spinner-rotate": `${(360 / SPINNER_COUNT * index).toString()}deg`,
19
19
  width: `${(100 / SPINNER_COUNT).toString()}%`
20
20
  }
21
21
  }, index))
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as SwitchPrimitives from '@radix-ui/react-switch';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
3
  type SwitchProps = ComponentProps<typeof SwitchPrimitives.Root>;
4
4
  declare function Switch({ className, ...props }: SwitchProps): JSX.Element;
5
5
  export { Switch };
@@ -4,11 +4,11 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { Root, Thumb } from "@radix-ui/react-switch";
5
5
  function Switch({ className, ...props }) {
6
6
  return /*#__PURE__*/ jsx(Root, {
7
- className: cn('data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:bg-primary data-[state=checked]:focus-visible:ring-primary/20 dark:data-[state=checked]:focus-visible:ring-primary/40 focus-visible:not-data-[state=checked]:border-ring/60 focus-visible:ring-ring/50 peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent p-0.75 shadow-xs outline-hidden transition-all focus-visible:ring-3 disabled:opacity-50', className),
7
+ className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent p-0.75 shadow-xs outline-hidden transition-all focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-data-[state=checked]:border-ring/60 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:focus-visible:ring-primary/20 data-[state=unchecked]:bg-input dark:data-[state=checked]:focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80", className),
8
8
  "data-slot": "switch",
9
9
  ...props,
10
10
  children: /*#__PURE__*/ jsx(Thumb, {
11
- className: "bg-background dark:not-data-[state=checked]:bg-foreground pointer-events-none block size-3.5 rounded-full shadow-sm transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0",
11
+ className: "pointer-events-none block size-3.5 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0 dark:not-data-[state=checked]:bg-foreground",
12
12
  "data-slot": "switch-thumb"
13
13
  })
14
14
  });
@@ -1,19 +1,19 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- type TableProps = ComponentProps<'table'>;
1
+ import type { ComponentProps, JSX } from "react";
2
+ type TableProps = ComponentProps<"table">;
3
3
  declare function Table({ className, ...props }: TableProps): JSX.Element;
4
- type TableHeaderProps = ComponentProps<'thead'>;
4
+ type TableHeaderProps = ComponentProps<"thead">;
5
5
  declare function TableHeader({ className, ...props }: TableHeaderProps): JSX.Element;
6
- type TableBodyProps = ComponentProps<'tbody'>;
6
+ type TableBodyProps = ComponentProps<"tbody">;
7
7
  declare function TableBody({ className, ...props }: TableBodyProps): JSX.Element;
8
- type TableFooterProps = ComponentProps<'tfoot'>;
8
+ type TableFooterProps = ComponentProps<"tfoot">;
9
9
  declare function TableFooter({ className, ...props }: TableFooterProps): JSX.Element;
10
- type TableRowProps = ComponentProps<'tr'>;
10
+ type TableRowProps = ComponentProps<"tr">;
11
11
  declare function TableRow({ className, ...props }: TableRowProps): JSX.Element;
12
- type TableHeadProps = ComponentProps<'th'>;
12
+ type TableHeadProps = ComponentProps<"th">;
13
13
  declare function TableHead({ className, ...props }: TableHeadProps): JSX.Element;
14
- type TableCellProps = ComponentProps<'td'>;
14
+ type TableCellProps = ComponentProps<"td">;
15
15
  declare function TableCell({ className, ...props }: TableCellProps): JSX.Element;
16
- type TableCaptionProps = ComponentProps<'caption'>;
16
+ type TableCaptionProps = ComponentProps<"caption">;
17
17
  declare function TableCaption({ className, ...props }: TableCaptionProps): JSX.Element;
18
18
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
19
19
  export type { TableBodyProps, TableCaptionProps, TableCellProps, TableFooterProps, TableHeaderProps, TableHeadProps, TableProps, TableRowProps, };
@@ -5,7 +5,7 @@ function Table({ className, ...props }) {
5
5
  className: "relative w-full overflow-auto",
6
6
  "data-slot": "table-cotainer",
7
7
  children: /*#__PURE__*/ jsx("table", {
8
- className: cn('w-full caption-bottom text-sm', className),
8
+ className: cn("w-full caption-bottom text-sm", className),
9
9
  "data-slot": "table",
10
10
  ...props
11
11
  })
@@ -13,49 +13,49 @@ function Table({ className, ...props }) {
13
13
  }
14
14
  function TableHeader({ className, ...props }) {
15
15
  return /*#__PURE__*/ jsx("thead", {
16
- className: cn('*:border-b *:has-aria-expanded:bg-transparent', className),
16
+ className: cn("*:border-b *:has-aria-expanded:bg-transparent", className),
17
17
  "data-slot": "table-header",
18
18
  ...props
19
19
  });
20
20
  }
21
21
  function TableBody({ className, ...props }) {
22
22
  return /*#__PURE__*/ jsx("tbody", {
23
- className: cn('*:last-child:border-0', className),
23
+ className: cn("*:last-child:border-0", className),
24
24
  "data-slot": "table-body",
25
25
  ...props
26
26
  });
27
27
  }
28
28
  function TableFooter({ className, ...props }) {
29
29
  return /*#__PURE__*/ jsx("tfoot", {
30
- className: cn('bg-muted/50 font-medium *:border-t *:border-b-0 *:has-aria-expanded:bg-transparent', className),
30
+ className: cn("bg-muted/50 font-medium *:border-t *:border-b-0 *:has-aria-expanded:bg-transparent", className),
31
31
  "data-slot": "table-footer",
32
32
  ...props
33
33
  });
34
34
  }
35
35
  function TableRow({ className, ...props }) {
36
36
  return /*#__PURE__*/ jsx("tr", {
37
- className: cn('hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className),
37
+ className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
38
38
  "data-slot": "table-row",
39
39
  ...props
40
40
  });
41
41
  }
42
42
  function TableHead({ className, ...props }) {
43
43
  return /*#__PURE__*/ jsx("th", {
44
- className: cn('p-2 text-left align-middle font-medium', className),
44
+ className: cn("p-2 text-left align-middle font-medium", className),
45
45
  "data-slot": "table-head",
46
46
  ...props
47
47
  });
48
48
  }
49
49
  function TableCell({ className, ...props }) {
50
50
  return /*#__PURE__*/ jsx("td", {
51
- className: cn('p-2 align-middle', className),
51
+ className: cn("p-2 align-middle", className),
52
52
  "data-slot": "table-cell",
53
53
  ...props
54
54
  });
55
55
  }
56
56
  function TableCaption({ className, ...props }) {
57
57
  return /*#__PURE__*/ jsx("caption", {
58
- className: cn('text-muted-foreground mt-4 text-sm', className),
58
+ className: cn("mt-4 text-sm text-muted-foreground", className),
59
59
  "data-slot": "table-caption",
60
60
  ...props
61
61
  });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as TabsPrimitive from '@radix-ui/react-tabs';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
3
  type TabsProps = ComponentProps<typeof TabsPrimitive.Root>;
4
4
  declare function Tabs({ className, ...props }: TabsProps): JSX.Element;
5
5
  type TabsListProps = ComponentProps<typeof TabsPrimitive.List>;
@@ -4,28 +4,28 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
5
5
  function Tabs({ className, ...props }) {
6
6
  return /*#__PURE__*/ jsx(Root, {
7
- className: cn('flex flex-col gap-2', className),
7
+ className: cn("flex flex-col gap-2", className),
8
8
  "data-slot": "tabs",
9
9
  ...props
10
10
  });
11
11
  }
12
12
  function TabsList({ className, ...props }) {
13
13
  return /*#__PURE__*/ jsx(List, {
14
- className: cn('bg-muted text-muted-foreground inline-flex w-fit items-center justify-center gap-1 rounded-xl px-1 py-1', className),
14
+ className: cn("inline-flex w-fit items-center justify-center gap-1 rounded-xl bg-muted px-1 py-1 text-muted-foreground", className),
15
15
  "data-slot": "tabs-list",
16
16
  ...props
17
17
  });
18
18
  }
19
19
  function TabsTrigger({ className, ...props }) {
20
20
  return /*#__PURE__*/ jsx(Trigger, {
21
- className: cn("data-[state=active]:bg-background dark:data-[state=active]:bg-input/50 text-muted-foreground focus-visible:ring-ring/50 dark:outline-ring data-[state=active]:text-foreground hover:not-disabled:text-foreground inline-flex items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium whitespace-nowrap transition not-dark:outline-hidden focus-visible:ring-3 disabled:opacity-50 data-[state=active]:shadow-sm dark:-outline-offset-1 dark:data-[state=active]:outline-1 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
21
+ className: cn("inline-flex items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition not-dark:outline-hidden hover:not-disabled:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:-outline-offset-1 dark:outline-ring dark:data-[state=active]:bg-input/50 dark:data-[state=active]:outline-1 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
22
22
  "data-slot": "tabs-trigger",
23
23
  ...props
24
24
  });
25
25
  }
26
26
  function TabsContent({ className, ...props }) {
27
27
  return /*#__PURE__*/ jsx(Content, {
28
- className: cn('outline-ring ring-ring/50 mt-2 rounded-xl focus-visible:ring-4 focus-visible:outline-1', className),
28
+ className: cn("mt-2 rounded-xl ring-ring/50 outline-ring focus-visible:ring-4 focus-visible:outline-1", className),
29
29
  "data-slot": "tabs-content",
30
30
  ...props
31
31
  });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- type TextareaProps = ComponentProps<'textarea'>;
1
+ import type { ComponentProps, JSX } from "react";
2
+ type TextareaProps = ComponentProps<"textarea">;
3
3
  declare function Textarea({ className, ...props }: TextareaProps): JSX.Element;
4
4
  export { Textarea };
5
5
  export type { TextareaProps };
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@codefast/tailwind-variants";
3
3
  function Textarea({ className, ...props }) {
4
4
  return /*#__PURE__*/ jsx("textarea", {
5
- className: cn('border-input hover:not-disabled:not-focus-visible:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 placeholder:text-muted-foreground aria-invalid:border-destructive hover:not-disabled:not-focus-within:aria-invalid:border-destructive/60 focus-within:aria-invalid:ring-destructive/20 dark:focus-within:aria-invalid:ring-destructive/40 dark:bg-input/30 flex min-h-16 w-full grow rounded-lg border px-3 py-2 text-base shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50 md:text-sm', className),
5
+ className: cn("flex min-h-16 w-full grow rounded-lg border border-input px-3 py-2 text-base shadow-xs outline-hidden transition placeholder:text-muted-foreground hover:not-disabled:not-focus-visible:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:not-focus-within:aria-invalid:border-destructive/60 md:text-sm dark:bg-input/30 dark:focus-within:aria-invalid:ring-destructive/40", className),
6
6
  "data-slot": "textarea",
7
7
  ...props
8
8
  });
@@ -1,7 +1,7 @@
1
- import type { Scope } from '@radix-ui/react-context';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
- import type { ToggleVariants } from './toggle';
1
+ import type { Scope } from "@radix-ui/react-context";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
4
+ import type { ToggleVariants } from "./toggle";
5
5
  type ScopedProps<P> = P & {
6
6
  __scopeToggleGroup?: Scope;
7
7
  };
@@ -4,7 +4,7 @@ import { cn } from "@codefast/tailwind-variants";
4
4
  import { createContextScope } from "@radix-ui/react-context";
5
5
  import { Item, Root, createToggleGroupScope } from "@radix-ui/react-toggle-group";
6
6
  import { toggleVariants } from "./toggle.js";
7
- const TOGGLE_GROUP_NAME = 'ToggleGroup';
7
+ const TOGGLE_GROUP_NAME = "ToggleGroup";
8
8
  const [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
9
9
  createToggleGroupScope
10
10
  ]);
@@ -18,13 +18,13 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
18
18
  spacing: spacing,
19
19
  variant: variant,
20
20
  children: /*#__PURE__*/ jsx(Root, {
21
- className: cn('group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-lg data-[spacing=default]:data-[variant=outline]:shadow-xs', className),
21
+ className: cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-lg data-[spacing=default]:data-[variant=outline]:shadow-xs", className),
22
22
  "data-size": size,
23
23
  "data-slot": "toggle-group",
24
24
  "data-spacing": spacing,
25
25
  "data-variant": variant,
26
26
  style: {
27
- '--gap': spacing
27
+ "--gap": spacing
28
28
  },
29
29
  ...toggleGroupScope,
30
30
  ...props,
@@ -32,7 +32,7 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
32
32
  })
33
33
  });
34
34
  }
35
- const TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem';
35
+ const TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem";
36
36
  function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props }) {
37
37
  const { size, spacing, variant } = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
38
38
  const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
@@ -41,7 +41,7 @@ function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props })
41
41
  className,
42
42
  size,
43
43
  variant
44
- }), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-lg data-[spacing=0]:last:rounded-r-lg data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l'),
44
+ }), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-lg data-[spacing=0]:last:rounded-r-lg data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l"),
45
45
  "data-size": size,
46
46
  "data-slot": "toggle-group-item",
47
47
  "data-spacing": spacing,
@@ -1,6 +1,6 @@
1
- import type { VariantProps } from '@codefast/tailwind-variants';
2
- import type { ComponentProps, JSX } from 'react';
3
- import * as TogglePrimitive from '@radix-ui/react-toggle';
1
+ import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
4
4
  declare const toggleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
5
  size: {
6
6
  default: string;
@@ -3,21 +3,21 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { tv } from "@codefast/tailwind-variants";
4
4
  import { Root } from "@radix-ui/react-toggle";
5
5
  const toggleVariants = tv({
6
- base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
6
+ base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7
7
  variants: {
8
8
  size: {
9
- default: 'h-9 px-2 min-w-9',
10
- lg: 'h-10 px-2.5 min-w-10',
11
- sm: 'h-8 px-1.5 min-w-8'
9
+ default: "h-9 min-w-9 px-2",
10
+ lg: "h-10 min-w-10 px-2.5",
11
+ sm: "h-8 min-w-8 px-1.5"
12
12
  },
13
13
  variant: {
14
- default: 'bg-transparent',
15
- outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground'
14
+ default: "bg-transparent",
15
+ outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
16
16
  }
17
17
  },
18
18
  defaultVariants: {
19
- size: 'default',
20
- variant: 'default'
19
+ size: "default",
20
+ variant: "default"
21
21
  }
22
22
  });
23
23
  function Toggle({ children, className, size, variant, ...props }) {
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
3
  type TooltipProviderProps = ComponentProps<typeof TooltipPrimitive.Provider>;
4
4
  declare function TooltipProvider({ ...props }: TooltipProviderProps): JSX.Element;
5
5
  type TooltipProps = ComponentProps<typeof TooltipPrimitive.Root>;
@@ -11,4 +11,4 @@ declare function TooltipContent({ children, className, sideOffset, ...props }: T
11
11
  type TooltipArrowProps = ComponentProps<typeof TooltipPrimitive.Arrow>;
12
12
  declare function TooltipArrow({ className, ...props }: TooltipArrowProps): JSX.Element;
13
13
  export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
14
- export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps };
14
+ export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps, };
@@ -23,7 +23,7 @@ function TooltipTrigger({ ...props }) {
23
23
  function TooltipContent({ children, className, sideOffset = 4, ...props }) {
24
24
  return /*#__PURE__*/ jsx(Portal, {
25
25
  children: /*#__PURE__*/ jsxs(Content, {
26
- className: cn('bg-primary text-primary-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance', 'max-w-(--radix-tooltip-content-available-width)', className),
26
+ className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground 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=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2", "max-w-(--radix-tooltip-content-available-width)", className),
27
27
  collisionPadding: 8,
28
28
  "data-slot": "tooltip-content",
29
29
  sideOffset: sideOffset,
@@ -37,7 +37,7 @@ function TooltipContent({ children, className, sideOffset = 4, ...props }) {
37
37
  }
38
38
  function TooltipArrow({ className, ...props }) {
39
39
  return /*#__PURE__*/ jsx(Arrow, {
40
- className: cn('fill-primary', className),
40
+ className: cn("fill-primary", className),
41
41
  "data-slot": "tooltip-arrow",
42
42
  ...props
43
43
  });
@@ -1,6 +1,6 @@
1
- @import 'tw-animate-css';
1
+ @import "tw-animate-css";
2
2
 
3
- @source '../**/*.js';
3
+ @source "../**/*.js";
4
4
 
5
5
  @custom-variant dark (&:where(.dark, .dark *));
6
6
 
@@ -85,7 +85,7 @@
85
85
  }
86
86
 
87
87
  ::-webkit-scrollbar-thumb {
88
- @apply bg-border rounded-full;
88
+ @apply rounded-full bg-border;
89
89
  }
90
90
 
91
91
  * {
@@ -111,7 +111,7 @@
111
111
  margin: 0;
112
112
  }
113
113
 
114
- &[type='number'] {
114
+ &[type="number"] {
115
115
  -moz-appearance: textfield;
116
116
  }
117
117
  }
@@ -1,3 +1,3 @@
1
- @import 'tailwindcss';
2
- @import './neutral.css';
3
- @import './preset.css';
1
+ @import "tailwindcss";
2
+ @import "./neutral.css";
3
+ @import "./preset.css";
@@ -15,7 +15,7 @@
15
15
  * <button onClick={() => copyToClipboard("Hello")}>{isCopied ? "Copied" : "Copy"}</button>
16
16
  * ```
17
17
  */
18
- export declare function useCopyToClipboard({ onCopy, timeout }?: {
18
+ export declare function useCopyToClipboard({ onCopy, timeout, }?: {
19
19
  onCopy?: () => void;
20
20
  timeout?: number;
21
21
  }): {
@@ -3,7 +3,7 @@ import { useState } from "react";
3
3
  function useCopyToClipboard({ onCopy, timeout = 2000 } = {}) {
4
4
  const [isCopied, setIsCopied] = useState(false);
5
5
  const copyToClipboard = async (value)=>{
6
- if ("u" < typeof window || !('clipboard' in navigator)) return;
6
+ if ("u" < typeof window || !("clipboard" in navigator) || "function" != typeof navigator.clipboard.writeText) return;
7
7
  if (!value) return;
8
8
  try {
9
9
  await navigator.clipboard.writeText(value);
@@ -2,7 +2,7 @@
2
2
  import { useEffect, useState } from "react";
3
3
  function useMediaQuery(query) {
4
4
  const [matches, setMatches] = useState(()=>{
5
- if ("u" > typeof window && 'function' == typeof window.matchMedia) return window.matchMedia(query).matches;
5
+ if ("u" > typeof window && "function" == typeof window.matchMedia) return window.matchMedia(query).matches;
6
6
  return false;
7
7
  });
8
8
  useEffect(()=>{
@@ -11,9 +11,9 @@ function useMediaQuery(query) {
11
11
  const onChange = (event)=>{
12
12
  setMatches(event.matches);
13
13
  };
14
- mediaQueryList.addEventListener('change', onChange);
14
+ mediaQueryList.addEventListener("change", onChange);
15
15
  return ()=>{
16
- mediaQueryList.removeEventListener('change', onChange);
16
+ mediaQueryList.removeEventListener("change", onChange);
17
17
  };
18
18
  }, [
19
19
  query
@@ -1,4 +1,4 @@
1
- import type { RefObject } from 'react';
1
+ import type { RefObject } from "react";
2
2
  /**
3
3
  * Observe DOM mutations on a referenced element and invoke a callback.
4
4
  *
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useMemo } from "react";
3
- const ELLIPSIS = '•••';
3
+ const ELLIPSIS = "•••";
4
4
  const createRange = (start, end)=>{
5
5
  const length = end - start + 1;
6
6
  return Array.from({