@codefast/ui 0.3.10 → 0.3.11-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +277 -167
  3. package/dist/components/accordion.cjs +5 -5
  4. package/dist/components/accordion.d.ts +4 -4
  5. package/dist/components/accordion.js +5 -5
  6. package/dist/components/alert-dialog.cjs +9 -9
  7. package/dist/components/alert-dialog.d.ts +11 -11
  8. package/dist/components/alert-dialog.js +9 -9
  9. package/dist/components/alert.cjs +5 -5
  10. package/dist/components/alert.d.ts +5 -5
  11. package/dist/components/alert.js +5 -5
  12. package/dist/components/aspect-ratio.d.ts +2 -2
  13. package/dist/components/avatar.cjs +3 -3
  14. package/dist/components/avatar.d.ts +2 -2
  15. package/dist/components/avatar.js +3 -3
  16. package/dist/components/badge.cjs +7 -7
  17. package/dist/components/badge.d.ts +3 -3
  18. package/dist/components/badge.js +7 -7
  19. package/dist/components/breadcrumb.cjs +6 -8
  20. package/dist/components/breadcrumb.d.ts +8 -8
  21. package/dist/components/breadcrumb.js +6 -8
  22. package/dist/components/button-group.cjs +8 -8
  23. package/dist/components/button-group.d.ts +5 -5
  24. package/dist/components/button-group.js +8 -8
  25. package/dist/components/button.cjs +17 -17
  26. package/dist/components/button.d.ts +6 -6
  27. package/dist/components/button.js +17 -17
  28. package/dist/components/calendar.cjs +35 -35
  29. package/dist/components/calendar.d.ts +5 -5
  30. package/dist/components/calendar.js +35 -35
  31. package/dist/components/card.cjs +7 -7
  32. package/dist/components/card.d.ts +8 -8
  33. package/dist/components/card.js +7 -7
  34. package/dist/components/carousel.cjs +20 -20
  35. package/dist/components/carousel.d.ts +10 -10
  36. package/dist/components/carousel.js +20 -20
  37. package/dist/components/chart.cjs +42 -42
  38. package/dist/components/chart.d.ts +12 -11
  39. package/dist/components/chart.js +42 -42
  40. package/dist/components/checkbox-cards.cjs +2 -2
  41. package/dist/components/checkbox-cards.d.ts +2 -2
  42. package/dist/components/checkbox-cards.js +2 -2
  43. package/dist/components/checkbox-group.cjs +2 -2
  44. package/dist/components/checkbox-group.d.ts +2 -2
  45. package/dist/components/checkbox-group.js +2 -2
  46. package/dist/components/checkbox.cjs +1 -1
  47. package/dist/components/checkbox.d.ts +2 -2
  48. package/dist/components/checkbox.js +1 -1
  49. package/dist/components/collapsible.d.ts +2 -2
  50. package/dist/components/command.cjs +10 -10
  51. package/dist/components/command.d.ts +4 -4
  52. package/dist/components/command.js +10 -10
  53. package/dist/components/context-menu.cjs +10 -10
  54. package/dist/components/context-menu.d.ts +4 -4
  55. package/dist/components/context-menu.js +10 -10
  56. package/dist/components/dialog.cjs +12 -12
  57. package/dist/components/dialog.d.ts +10 -10
  58. package/dist/components/dialog.js +12 -12
  59. package/dist/components/drawer.cjs +9 -9
  60. package/dist/components/drawer.d.ts +9 -9
  61. package/dist/components/drawer.js +9 -9
  62. package/dist/components/dropdown-menu.cjs +10 -10
  63. package/dist/components/dropdown-menu.d.ts +4 -4
  64. package/dist/components/dropdown-menu.js +10 -10
  65. package/dist/components/empty.cjs +10 -10
  66. package/dist/components/empty.d.ts +9 -9
  67. package/dist/components/empty.js +10 -10
  68. package/dist/components/field.cjs +17 -17
  69. package/dist/components/field.d.ts +14 -14
  70. package/dist/components/field.js +17 -17
  71. package/dist/components/form.cjs +8 -8
  72. package/dist/components/form.d.ts +10 -10
  73. package/dist/components/form.js +8 -8
  74. package/dist/components/hover-card.cjs +3 -3
  75. package/dist/components/hover-card.d.ts +2 -2
  76. package/dist/components/hover-card.js +3 -3
  77. package/dist/components/input-group.cjs +20 -20
  78. package/dist/components/input-group.d.ts +15 -15
  79. package/dist/components/input-group.js +20 -20
  80. package/dist/components/input-number.cjs +7 -7
  81. package/dist/components/input-number.d.ts +2 -2
  82. package/dist/components/input-number.js +7 -7
  83. package/dist/components/input-otp.cjs +4 -4
  84. package/dist/components/input-otp.d.ts +6 -6
  85. package/dist/components/input-otp.js +4 -4
  86. package/dist/components/input-password.cjs +6 -6
  87. package/dist/components/input-password.d.ts +3 -3
  88. package/dist/components/input-password.js +6 -6
  89. package/dist/components/input-search.cjs +4 -4
  90. package/dist/components/input-search.d.ts +3 -3
  91. package/dist/components/input-search.js +4 -4
  92. package/dist/components/input.cjs +1 -1
  93. package/dist/components/input.d.ts +2 -2
  94. package/dist/components/input.js +1 -1
  95. package/dist/components/item.cjs +23 -23
  96. package/dist/components/item.d.ts +12 -12
  97. package/dist/components/item.js +23 -23
  98. package/dist/components/kbd.cjs +2 -2
  99. package/dist/components/kbd.d.ts +3 -3
  100. package/dist/components/kbd.js +2 -2
  101. package/dist/components/label.cjs +1 -1
  102. package/dist/components/label.d.ts +2 -2
  103. package/dist/components/label.js +1 -1
  104. package/dist/components/menubar.cjs +13 -13
  105. package/dist/components/menubar.d.ts +4 -4
  106. package/dist/components/menubar.js +13 -13
  107. package/dist/components/native-select.cjs +2 -2
  108. package/dist/components/native-select.d.ts +4 -4
  109. package/dist/components/native-select.js +2 -2
  110. package/dist/components/navigation-menu.cjs +10 -10
  111. package/dist/components/navigation-menu.d.ts +2 -2
  112. package/dist/components/navigation-menu.js +10 -10
  113. package/dist/components/pagination.cjs +6 -6
  114. package/dist/components/pagination.d.ts +10 -10
  115. package/dist/components/pagination.js +6 -6
  116. package/dist/components/popover.cjs +3 -3
  117. package/dist/components/popover.d.ts +3 -3
  118. package/dist/components/popover.js +3 -3
  119. package/dist/components/progress-circle.cjs +22 -22
  120. package/dist/components/progress-circle.d.ts +5 -5
  121. package/dist/components/progress-circle.js +22 -22
  122. package/dist/components/progress.cjs +2 -2
  123. package/dist/components/progress.d.ts +2 -2
  124. package/dist/components/progress.js +2 -2
  125. package/dist/components/radio-cards.cjs +3 -3
  126. package/dist/components/radio-cards.d.ts +2 -2
  127. package/dist/components/radio-cards.js +3 -3
  128. package/dist/components/radio-group.cjs +3 -3
  129. package/dist/components/radio-group.d.ts +2 -2
  130. package/dist/components/radio-group.js +3 -3
  131. package/dist/components/radio.cjs +1 -1
  132. package/dist/components/radio.d.ts +2 -2
  133. package/dist/components/radio.js +1 -1
  134. package/dist/components/resizable.cjs +3 -3
  135. package/dist/components/resizable.d.ts +2 -2
  136. package/dist/components/resizable.js +3 -3
  137. package/dist/components/scroll-area.cjs +31 -31
  138. package/dist/components/scroll-area.d.ts +5 -5
  139. package/dist/components/scroll-area.js +31 -31
  140. package/dist/components/select.cjs +9 -9
  141. package/dist/components/select.d.ts +5 -5
  142. package/dist/components/select.js +9 -9
  143. package/dist/components/separator.cjs +9 -9
  144. package/dist/components/separator.d.ts +5 -5
  145. package/dist/components/separator.js +9 -9
  146. package/dist/components/sheet.cjs +17 -17
  147. package/dist/components/sheet.d.ts +9 -9
  148. package/dist/components/sheet.js +17 -17
  149. package/dist/components/sidebar.cjs +65 -65
  150. package/dist/components/sidebar.d.ts +31 -31
  151. package/dist/components/sidebar.js +65 -65
  152. package/dist/components/skeleton.cjs +1 -1
  153. package/dist/components/skeleton.d.ts +2 -2
  154. package/dist/components/skeleton.js +1 -1
  155. package/dist/components/slider.cjs +4 -4
  156. package/dist/components/slider.d.ts +2 -2
  157. package/dist/components/slider.js +4 -4
  158. package/dist/components/sonner.cjs +4 -4
  159. package/dist/components/sonner.d.ts +3 -3
  160. package/dist/components/sonner.js +4 -4
  161. package/dist/components/spinner.cjs +5 -5
  162. package/dist/components/spinner.d.ts +2 -2
  163. package/dist/components/spinner.js +5 -5
  164. package/dist/components/switch.cjs +2 -2
  165. package/dist/components/switch.d.ts +2 -2
  166. package/dist/components/switch.js +2 -2
  167. package/dist/components/table.cjs +8 -8
  168. package/dist/components/table.d.ts +9 -9
  169. package/dist/components/table.js +8 -8
  170. package/dist/components/tabs.cjs +4 -4
  171. package/dist/components/tabs.d.ts +2 -2
  172. package/dist/components/tabs.js +4 -4
  173. package/dist/components/textarea.cjs +1 -1
  174. package/dist/components/textarea.d.ts +2 -2
  175. package/dist/components/textarea.js +1 -1
  176. package/dist/components/toggle-group.cjs +5 -5
  177. package/dist/components/toggle-group.d.ts +4 -4
  178. package/dist/components/toggle-group.js +5 -5
  179. package/dist/components/toggle.cjs +8 -8
  180. package/dist/components/toggle.d.ts +3 -3
  181. package/dist/components/toggle.js +8 -8
  182. package/dist/components/tooltip.cjs +2 -2
  183. package/dist/components/tooltip.d.ts +3 -3
  184. package/dist/components/tooltip.js +2 -2
  185. package/dist/css/preset.css +4 -4
  186. package/dist/css/style.css +3 -3
  187. package/dist/hooks/use-copy-to-clipboard.cjs +1 -1
  188. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
  189. package/dist/hooks/use-copy-to-clipboard.js +1 -1
  190. package/dist/hooks/use-media-query.cjs +3 -3
  191. package/dist/hooks/use-media-query.js +3 -3
  192. package/dist/hooks/use-mutation-observer.d.ts +1 -1
  193. package/dist/hooks/use-pagination.cjs +1 -1
  194. package/dist/hooks/use-pagination.js +1 -1
  195. package/dist/index.d.ts +130 -130
  196. package/dist/primitives/checkbox-group.cjs +3 -3
  197. package/dist/primitives/checkbox-group.d.ts +11 -11
  198. package/dist/primitives/checkbox-group.js +3 -3
  199. package/dist/primitives/input-number.cjs +46 -46
  200. package/dist/primitives/input-number.d.ts +8 -8
  201. package/dist/primitives/input-number.js +46 -46
  202. package/dist/primitives/input.cjs +7 -7
  203. package/dist/primitives/input.d.ts +4 -4
  204. package/dist/primitives/input.js +7 -7
  205. package/dist/primitives/progress-circle.cjs +8 -8
  206. package/dist/primitives/progress-circle.d.ts +7 -7
  207. package/dist/primitives/progress-circle.js +8 -8
  208. package/package.json +38 -42
@@ -35,14 +35,14 @@ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants")
35
35
  const react_slot_namespaceObject = require("@radix-ui/react-slot");
36
36
  const external_separator_cjs_namespaceObject = require("./separator.cjs");
37
37
  const buttonGroupVariants = (0, tailwind_variants_namespaceObject.tv)({
38
- base: (0, tailwind_variants_namespaceObject.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'),
38
+ base: (0, tailwind_variants_namespaceObject.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"),
39
39
  defaultVariants: {
40
- orientation: 'horizontal'
40
+ orientation: "horizontal"
41
41
  },
42
42
  variants: {
43
43
  orientation: {
44
- horizontal: '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
45
- vertical: 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none'
44
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
45
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
46
46
  }
47
47
  }
48
48
  });
@@ -58,15 +58,15 @@ function ButtonGroup({ className, orientation, ...props }) {
58
58
  });
59
59
  }
60
60
  function ButtonGroupText({ asChild = false, className, ...props }) {
61
- const Component = asChild ? react_slot_namespaceObject.Slot : 'div';
61
+ const Component = asChild ? react_slot_namespaceObject.Slot : "div";
62
62
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
63
- className: (0, tailwind_variants_namespaceObject.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),
63
+ className: (0, tailwind_variants_namespaceObject.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),
64
64
  ...props
65
65
  });
66
66
  }
67
- function ButtonGroupSeparator({ className, orientation = 'vertical', ...props }) {
67
+ function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
68
68
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator, {
69
- className: (0, tailwind_variants_namespaceObject.cn)('bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto', className),
69
+ className: (0, tailwind_variants_namespaceObject.cn)("relative !m-0 self-stretch bg-input data-[orientation=vertical]:h-auto", className),
70
70
  "data-slot": "button-group-separator",
71
71
  orientation: orientation,
72
72
  ...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
@@ -31,32 +31,32 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
32
32
  const react_slot_namespaceObject = require("@radix-ui/react-slot");
33
33
  const buttonVariants = (0, tailwind_variants_namespaceObject.tv)({
34
- 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",
34
+ 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",
35
35
  defaultVariants: {
36
- size: 'md',
37
- variant: 'default'
36
+ size: "md",
37
+ variant: "default"
38
38
  },
39
39
  variants: {
40
40
  size: {
41
- 'icon-sm': 'size-8',
42
- icon: 'size-9',
43
- 'icon-lg': 'size-10',
44
- sm: 'h-8 px-3 has-[>svg]:px-2.5',
45
- md: 'h-9 px-4 has-[>svg]:px-3',
46
- lg: 'h-10 px-6 has-[>svg]:px-4'
41
+ "icon-sm": "size-8",
42
+ icon: "size-9",
43
+ "icon-lg": "size-10",
44
+ sm: "h-8 px-3 has-[>svg]:px-2.5",
45
+ md: "h-9 px-4 has-[>svg]:px-3",
46
+ lg: "h-10 px-6 has-[>svg]:px-4"
47
47
  },
48
48
  variant: {
49
- default: 'bg-primary text-primary-foreground focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 hover:not-disabled:bg-primary/80',
50
- 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',
51
- ghost: 'hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50',
52
- link: 'text-primary hover:not-disabled:underline focus-visible:ring-ring/50 underline-offset-4',
53
- 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',
54
- secondary: 'bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50'
49
+ default: "bg-primary text-primary-foreground hover:not-disabled:bg-primary/80 focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40",
50
+ 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",
51
+ ghost: "hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50",
52
+ link: "text-primary underline-offset-4 hover:not-disabled:underline focus-visible:ring-ring/50",
53
+ 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",
54
+ secondary: "bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50"
55
55
  }
56
56
  }
57
57
  });
58
- function Button({ asChild = false, children, className, size, type = 'button', variant, ...props }) {
59
- const Comp = asChild ? react_slot_namespaceObject.Slot : 'button';
58
+ function Button({ asChild = false, children, className, size, type = "button", variant, ...props }) {
59
+ const Comp = asChild ? react_slot_namespaceObject.Slot : "button";
60
60
  if (asChild) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
61
61
  className: buttonVariants({
62
62
  className,
@@ -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,
@@ -34,41 +34,41 @@ const external_lucide_react_namespaceObject = require("lucide-react");
34
34
  const external_react_namespaceObject = require("react");
35
35
  const external_react_day_picker_namespaceObject = require("react-day-picker");
36
36
  const external_button_cjs_namespaceObject = require("./button.cjs");
37
- function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className, classNames, components, formatters, showOutsideDays = true, ...props }) {
37
+ function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, showOutsideDays = true, ...props }) {
38
38
  const defaultClassNames = (0, external_react_day_picker_namespaceObject.getDefaultClassNames)();
39
39
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_day_picker_namespaceObject.DayPicker, {
40
40
  captionLayout: captionLayout,
41
- className: (0, tailwind_variants_namespaceObject.cn)('bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', 'rtl:**:[.rdp-button_next>svg]:rotate-180', 'rtl:**:[.rdp-button_previous>svg]:rotate-180', className),
41
+ className: (0, tailwind_variants_namespaceObject.cn)("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", "rtl:**:[.rdp-button_next>svg]:rotate-180", "rtl:**:[.rdp-button_previous>svg]:rotate-180", className),
42
42
  classNames: {
43
43
  button_next: (0, tailwind_variants_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
44
44
  variant: buttonVariant
45
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
45
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
46
46
  button_previous: (0, tailwind_variants_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
47
47
  variant: buttonVariant
48
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
49
- caption_label: (0, tailwind_variants_namespaceObject.cn)('select-none font-medium', 'label' === captionLayout ? 'text-sm' : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5', defaultClassNames.caption_label),
50
- day: (0, tailwind_variants_namespaceObject.cn)('relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none', props.showWeekNumber ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-md' : '[&:first-child[data-selected=true]_button]:rounded-l-md', defaultClassNames.day),
51
- disabled: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground opacity-50', defaultClassNames.disabled),
52
- dropdown: (0, tailwind_variants_namespaceObject.cn)('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
53
- dropdown_root: (0, tailwind_variants_namespaceObject.cn)('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-3 rounded-md', defaultClassNames.dropdown_root),
54
- dropdowns: (0, tailwind_variants_namespaceObject.cn)('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
55
- hidden: (0, tailwind_variants_namespaceObject.cn)('invisible', defaultClassNames.hidden),
56
- month: (0, tailwind_variants_namespaceObject.cn)('flex flex-col w-full gap-4', defaultClassNames.month),
57
- month_caption: (0, tailwind_variants_namespaceObject.cn)('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
58
- months: (0, tailwind_variants_namespaceObject.cn)('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
59
- nav: (0, tailwind_variants_namespaceObject.cn)('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
60
- outside: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
61
- range_end: (0, tailwind_variants_namespaceObject.cn)('rounded-r-md bg-accent', defaultClassNames.range_end),
62
- range_middle: (0, tailwind_variants_namespaceObject.cn)('rounded-none', defaultClassNames.range_middle),
63
- range_start: (0, tailwind_variants_namespaceObject.cn)('rounded-l-md bg-accent', defaultClassNames.range_start),
64
- root: (0, tailwind_variants_namespaceObject.cn)('w-fit', defaultClassNames.root),
65
- table: 'w-full border-collapse',
66
- today: (0, tailwind_variants_namespaceObject.cn)('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
67
- week: (0, tailwind_variants_namespaceObject.cn)('flex w-full mt-2', defaultClassNames.week),
68
- week_number: (0, tailwind_variants_namespaceObject.cn)('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
69
- week_number_header: (0, tailwind_variants_namespaceObject.cn)('select-none w-(--cell-size)', defaultClassNames.week_number_header),
70
- weekday: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none', defaultClassNames.weekday),
71
- weekdays: (0, tailwind_variants_namespaceObject.cn)('flex', defaultClassNames.weekdays),
48
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
49
+ caption_label: (0, tailwind_variants_namespaceObject.cn)("font-medium select-none", "label" === captionLayout ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
50
+ day: (0, tailwind_variants_namespaceObject.cn)("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
51
+ disabled: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground opacity-50", defaultClassNames.disabled),
52
+ dropdown: (0, tailwind_variants_namespaceObject.cn)("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
53
+ dropdown_root: (0, tailwind_variants_namespaceObject.cn)("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
54
+ dropdowns: (0, tailwind_variants_namespaceObject.cn)("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
55
+ hidden: (0, tailwind_variants_namespaceObject.cn)("invisible", defaultClassNames.hidden),
56
+ month: (0, tailwind_variants_namespaceObject.cn)("flex w-full flex-col gap-4", defaultClassNames.month),
57
+ month_caption: (0, tailwind_variants_namespaceObject.cn)("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
58
+ months: (0, tailwind_variants_namespaceObject.cn)("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
59
+ nav: (0, tailwind_variants_namespaceObject.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
60
+ outside: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
61
+ range_end: (0, tailwind_variants_namespaceObject.cn)("rounded-r-md bg-accent", defaultClassNames.range_end),
62
+ range_middle: (0, tailwind_variants_namespaceObject.cn)("rounded-none", defaultClassNames.range_middle),
63
+ range_start: (0, tailwind_variants_namespaceObject.cn)("rounded-l-md bg-accent", defaultClassNames.range_start),
64
+ root: (0, tailwind_variants_namespaceObject.cn)("w-fit", defaultClassNames.root),
65
+ table: "w-full border-collapse",
66
+ today: (0, tailwind_variants_namespaceObject.cn)("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
67
+ week: (0, tailwind_variants_namespaceObject.cn)("mt-2 flex w-full", defaultClassNames.week),
68
+ week_number: (0, tailwind_variants_namespaceObject.cn)("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
69
+ week_number_header: (0, tailwind_variants_namespaceObject.cn)("w-(--cell-size) select-none", defaultClassNames.week_number_header),
70
+ weekday: (0, tailwind_variants_namespaceObject.cn)("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
71
+ weekdays: (0, tailwind_variants_namespaceObject.cn)("flex", defaultClassNames.weekdays),
72
72
  ...classNames
73
73
  },
74
74
  components: {
@@ -79,8 +79,8 @@ function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className,
79
79
  ...components
80
80
  },
81
81
  formatters: {
82
- formatMonthDropdown: (date)=>date.toLocaleString('default', {
83
- month: 'short'
82
+ formatMonthDropdown: (date)=>date.toLocaleString("default", {
83
+ month: "short"
84
84
  }),
85
85
  ...formatters
86
86
  },
@@ -89,16 +89,16 @@ function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className,
89
89
  });
90
90
  }
91
91
  function CalendarChevron({ className, orientation, ...props }) {
92
- if ('left' === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
93
- className: (0, tailwind_variants_namespaceObject.cn)('size-4', className),
92
+ if ("left" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
93
+ className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
94
94
  ...props
95
95
  });
96
- if ('right' === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {
97
- className: (0, tailwind_variants_namespaceObject.cn)('size-4', className),
96
+ if ("right" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {
97
+ className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
98
98
  ...props
99
99
  });
100
100
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
101
- className: (0, tailwind_variants_namespaceObject.cn)('size-4', className),
101
+ className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
102
102
  ...props
103
103
  });
104
104
  }
@@ -129,7 +129,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
129
129
  ]);
130
130
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
131
131
  ref: ref,
132
- className: (0, tailwind_variants_namespaceObject.cn)('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-3 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className),
132
+ className: (0, tailwind_variants_namespaceObject.cn)("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-3 group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
133
133
  "data-day": day.date.toLocaleDateString(),
134
134
  "data-range-end": modifiers.range_end,
135
135
  "data-range-middle": modifiers.range_middle,
@@ -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>;
@@ -5,41 +5,41 @@ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react
5
5
  import { useEffect, useRef } from "react";
6
6
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
7
7
  import { Button, buttonVariants } from "./button.js";
8
- function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className, classNames, components, formatters, showOutsideDays = true, ...props }) {
8
+ function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, showOutsideDays = true, ...props }) {
9
9
  const defaultClassNames = getDefaultClassNames();
10
10
  return /*#__PURE__*/ jsx(DayPicker, {
11
11
  captionLayout: captionLayout,
12
- className: cn('bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', 'rtl:**:[.rdp-button_next>svg]:rotate-180', 'rtl:**:[.rdp-button_previous>svg]:rotate-180', className),
12
+ className: cn("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", "rtl:**:[.rdp-button_next>svg]:rotate-180", "rtl:**:[.rdp-button_previous>svg]:rotate-180", className),
13
13
  classNames: {
14
14
  button_next: cn(buttonVariants({
15
15
  variant: buttonVariant
16
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
16
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
17
17
  button_previous: cn(buttonVariants({
18
18
  variant: buttonVariant
19
- }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
20
- caption_label: cn('select-none font-medium', 'label' === captionLayout ? 'text-sm' : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5', defaultClassNames.caption_label),
21
- day: cn('relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none', props.showWeekNumber ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-md' : '[&:first-child[data-selected=true]_button]:rounded-l-md', defaultClassNames.day),
22
- disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
23
- dropdown: cn('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
24
- dropdown_root: cn('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-3 rounded-md', defaultClassNames.dropdown_root),
25
- dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
26
- hidden: cn('invisible', defaultClassNames.hidden),
27
- month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
28
- month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
29
- months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
30
- nav: cn('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
31
- outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
32
- range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),
33
- range_middle: cn('rounded-none', defaultClassNames.range_middle),
34
- range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),
35
- root: cn('w-fit', defaultClassNames.root),
36
- table: 'w-full border-collapse',
37
- today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
38
- week: cn('flex w-full mt-2', defaultClassNames.week),
39
- week_number: cn('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
40
- week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
41
- weekday: cn('text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none', defaultClassNames.weekday),
42
- weekdays: cn('flex', defaultClassNames.weekdays),
19
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
20
+ caption_label: cn("font-medium select-none", "label" === captionLayout ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
21
+ day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
22
+ disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
23
+ dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
24
+ dropdown_root: cn("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
25
+ dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
26
+ hidden: cn("invisible", defaultClassNames.hidden),
27
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
28
+ month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
29
+ months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
30
+ nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
31
+ outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
32
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
33
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
34
+ range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
35
+ root: cn("w-fit", defaultClassNames.root),
36
+ table: "w-full border-collapse",
37
+ today: cn("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
38
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
39
+ week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
40
+ week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
41
+ weekday: cn("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
42
+ weekdays: cn("flex", defaultClassNames.weekdays),
43
43
  ...classNames
44
44
  },
45
45
  components: {
@@ -50,8 +50,8 @@ function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className,
50
50
  ...components
51
51
  },
52
52
  formatters: {
53
- formatMonthDropdown: (date)=>date.toLocaleString('default', {
54
- month: 'short'
53
+ formatMonthDropdown: (date)=>date.toLocaleString("default", {
54
+ month: "short"
55
55
  }),
56
56
  ...formatters
57
57
  },
@@ -60,16 +60,16 @@ function Calendar({ buttonVariant = 'ghost', captionLayout = 'label', className,
60
60
  });
61
61
  }
62
62
  function CalendarChevron({ className, orientation, ...props }) {
63
- if ('left' === orientation) return /*#__PURE__*/ jsx(ChevronLeftIcon, {
64
- className: cn('size-4', className),
63
+ if ("left" === orientation) return /*#__PURE__*/ jsx(ChevronLeftIcon, {
64
+ className: cn("size-4", className),
65
65
  ...props
66
66
  });
67
- if ('right' === orientation) return /*#__PURE__*/ jsx(ChevronRightIcon, {
68
- className: cn('size-4', className),
67
+ if ("right" === orientation) return /*#__PURE__*/ jsx(ChevronRightIcon, {
68
+ className: cn("size-4", className),
69
69
  ...props
70
70
  });
71
71
  return /*#__PURE__*/ jsx(ChevronDownIcon, {
72
- className: cn('size-4', className),
72
+ className: cn("size-4", className),
73
73
  ...props
74
74
  });
75
75
  }
@@ -100,7 +100,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
100
100
  ]);
101
101
  return /*#__PURE__*/ jsx(Button, {
102
102
  ref: ref,
103
- className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-3 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className),
103
+ className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-3 group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
104
104
  "data-day": day.date.toLocaleDateString(),
105
105
  "data-range-end": modifiers.range_end,
106
106
  "data-range-middle": modifiers.range_middle,
@@ -36,21 +36,21 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
36
36
  const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
37
37
  function Card({ className, ...props }) {
38
38
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
39
- className: (0, tailwind_variants_namespaceObject.cn)('bg-card text-card-foreground flex flex-col gap-6 overflow-auto rounded-xl border py-6 shadow-sm', className),
39
+ className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-6 overflow-auto rounded-xl border bg-card py-6 text-card-foreground shadow-sm", className),
40
40
  "data-slot": "card",
41
41
  ...props
42
42
  });
43
43
  }
44
44
  function CardHeader({ className, ...props }) {
45
45
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
46
- className: (0, tailwind_variants_namespaceObject.cn)('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-[data-slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6', className),
46
+ className: (0, tailwind_variants_namespaceObject.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-[data-slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
47
47
  "data-slot": "card-header",
48
48
  ...props
49
49
  });
50
50
  }
51
51
  function CardTitle({ children, className, ...props }) {
52
52
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
53
- className: (0, tailwind_variants_namespaceObject.cn)('leading-none font-semibold', className),
53
+ className: (0, tailwind_variants_namespaceObject.cn)("leading-none font-semibold", className),
54
54
  "data-slot": "card-title",
55
55
  ...props,
56
56
  children: children
@@ -58,28 +58,28 @@ function CardTitle({ children, className, ...props }) {
58
58
  }
59
59
  function CardDescription({ className, ...props }) {
60
60
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
61
- className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground text-sm', className),
61
+ className: (0, tailwind_variants_namespaceObject.cn)("text-sm text-muted-foreground", className),
62
62
  "data-slot": "card-description",
63
63
  ...props
64
64
  });
65
65
  }
66
66
  function CardContent({ className, ...props }) {
67
67
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
68
- className: (0, tailwind_variants_namespaceObject.cn)('px-6', className),
68
+ className: (0, tailwind_variants_namespaceObject.cn)("px-6", className),
69
69
  "data-slot": "card-content",
70
70
  ...props
71
71
  });
72
72
  }
73
73
  function CardFooter({ className, ...props }) {
74
74
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
75
- className: (0, tailwind_variants_namespaceObject.cn)('flex items-center px-6 [.border-t]:pt-6', className),
75
+ className: (0, tailwind_variants_namespaceObject.cn)("flex items-center px-6 [.border-t]:pt-6", className),
76
76
  "data-slot": "card-footer",
77
77
  ...props
78
78
  });
79
79
  }
80
80
  function CardAction({ className, ...props }) {
81
81
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
82
- className: (0, tailwind_variants_namespaceObject.cn)('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className),
82
+ className: (0, tailwind_variants_namespaceObject.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
83
83
  "data-slot": "card-action",
84
84
  ...props
85
85
  });
@@ -1,17 +1,17 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- type CardProps = ComponentProps<'div'>;
1
+ import type { ComponentProps, JSX } from "react";
2
+ type CardProps = ComponentProps<"div">;
3
3
  declare function Card({ className, ...props }: CardProps): JSX.Element;
4
- type CardHeaderProps = ComponentProps<'div'>;
4
+ type CardHeaderProps = ComponentProps<"div">;
5
5
  declare function CardHeader({ className, ...props }: CardHeaderProps): JSX.Element;
6
- type CardTitleProps = ComponentProps<'div'>;
6
+ type CardTitleProps = ComponentProps<"div">;
7
7
  declare function CardTitle({ children, className, ...props }: CardTitleProps): JSX.Element;
8
- type CardDescriptionProps = ComponentProps<'div'>;
8
+ type CardDescriptionProps = ComponentProps<"div">;
9
9
  declare function CardDescription({ className, ...props }: CardDescriptionProps): JSX.Element;
10
- type CardContentProps = ComponentProps<'div'>;
10
+ type CardContentProps = ComponentProps<"div">;
11
11
  declare function CardContent({ className, ...props }: CardContentProps): JSX.Element;
12
- type CardFooterProps = ComponentProps<'div'>;
12
+ type CardFooterProps = ComponentProps<"div">;
13
13
  declare function CardFooter({ className, ...props }: CardFooterProps): JSX.Element;
14
- type CardActionProps = ComponentProps<'div'>;
14
+ type CardActionProps = ComponentProps<"div">;
15
15
  declare function CardAction({ className, ...props }: CardActionProps): JSX.Element;
16
16
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
17
17
  export type { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps, };