@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
@@ -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,
@@ -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, };
@@ -2,21 +2,21 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@codefast/tailwind-variants";
3
3
  function Card({ className, ...props }) {
4
4
  return /*#__PURE__*/ jsx("div", {
5
- className: cn('bg-card text-card-foreground flex flex-col gap-6 overflow-auto rounded-xl border py-6 shadow-sm', className),
5
+ className: cn("flex flex-col gap-6 overflow-auto rounded-xl border bg-card py-6 text-card-foreground shadow-sm", className),
6
6
  "data-slot": "card",
7
7
  ...props
8
8
  });
9
9
  }
10
10
  function CardHeader({ className, ...props }) {
11
11
  return /*#__PURE__*/ jsx("div", {
12
- className: 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),
12
+ className: 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),
13
13
  "data-slot": "card-header",
14
14
  ...props
15
15
  });
16
16
  }
17
17
  function CardTitle({ children, className, ...props }) {
18
18
  return /*#__PURE__*/ jsx("div", {
19
- className: cn('leading-none font-semibold', className),
19
+ className: cn("leading-none font-semibold", className),
20
20
  "data-slot": "card-title",
21
21
  ...props,
22
22
  children: children
@@ -24,28 +24,28 @@ function CardTitle({ children, className, ...props }) {
24
24
  }
25
25
  function CardDescription({ className, ...props }) {
26
26
  return /*#__PURE__*/ jsx("div", {
27
- className: cn('text-muted-foreground text-sm', className),
27
+ className: cn("text-sm text-muted-foreground", className),
28
28
  "data-slot": "card-description",
29
29
  ...props
30
30
  });
31
31
  }
32
32
  function CardContent({ className, ...props }) {
33
33
  return /*#__PURE__*/ jsx("div", {
34
- className: cn('px-6', className),
34
+ className: cn("px-6", className),
35
35
  "data-slot": "card-content",
36
36
  ...props
37
37
  });
38
38
  }
39
39
  function CardFooter({ className, ...props }) {
40
40
  return /*#__PURE__*/ jsx("div", {
41
- className: cn('flex items-center px-6 [.border-t]:pt-6', className),
41
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className),
42
42
  "data-slot": "card-footer",
43
43
  ...props
44
44
  });
45
45
  }
46
46
  function CardAction({ className, ...props }) {
47
47
  return /*#__PURE__*/ jsx("div", {
48
- className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className),
48
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
49
49
  "data-slot": "card-action",
50
50
  ...props
51
51
  });
@@ -1,8 +1,8 @@
1
- import type { Scope } from '@radix-ui/react-context';
2
- import type { UseEmblaCarouselType } from 'embla-carousel-react';
3
- import type { ComponentProps, JSX } from 'react';
4
- import useEmblaCarousel from 'embla-carousel-react';
5
- import { Button } from './button';
1
+ import type { Scope } from "@radix-ui/react-context";
2
+ import type { UseEmblaCarouselType } from "embla-carousel-react";
3
+ import type { ComponentProps, JSX } from "react";
4
+ import useEmblaCarousel from "embla-carousel-react";
5
+ import { Button } from "./button";
6
6
  type ScopedProps<P> = P & {
7
7
  __scopeCarousel?: Scope;
8
8
  };
@@ -13,25 +13,25 @@ type CarouselOptions = UseCarouselParameters[0];
13
13
  type CarouselPlugin = UseCarouselParameters[1];
14
14
  interface BaseCarouselProps {
15
15
  opts?: CarouselOptions;
16
- orientation?: 'horizontal' | 'vertical';
16
+ orientation?: "horizontal" | "vertical";
17
17
  plugins?: CarouselPlugin;
18
18
  setApi?: (api: CarouselApi) => void;
19
19
  }
20
- interface CarouselProps extends BaseCarouselProps, ComponentProps<'div'> {
20
+ interface CarouselProps extends BaseCarouselProps, ComponentProps<"div"> {
21
21
  }
22
22
  declare function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }: ScopedProps<CarouselProps>): JSX.Element;
23
- interface CarouselContentProps extends ComponentProps<'div'> {
23
+ interface CarouselContentProps extends ComponentProps<"div"> {
24
24
  classNames?: {
25
25
  content?: string;
26
26
  wrapper?: string;
27
27
  };
28
28
  }
29
29
  declare function CarouselContent({ __scopeCarousel, className, classNames, ...props }: ScopedProps<CarouselContentProps>): JSX.Element;
30
- type CarouselItemProps = ComponentProps<'div'>;
30
+ type CarouselItemProps = ComponentProps<"div">;
31
31
  declare function CarouselItem({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>): JSX.Element;
32
32
  type CarouselPreviousProps = ComponentProps<typeof Button>;
33
33
  declare function CarouselPrevious({ __scopeCarousel, className, size, variant, ...props }: ScopedProps<CarouselPreviousProps>): JSX.Element;
34
34
  type CarouselNextProps = ComponentProps<typeof Button>;
35
35
  declare function CarouselNext({ __scopeCarousel, className, size, variant, ...props }: ScopedProps<CarouselNextProps>): JSX.Element;
36
36
  export type { CarouselApi, CarouselContentProps, CarouselItemProps, CarouselNextProps, CarouselPreviousProps, CarouselProps, };
37
- export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope };
37
+ export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope, };
@@ -6,13 +6,13 @@ import embla_carousel_react from "embla-carousel-react";
6
6
  import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
7
7
  import { useCallback, useEffect, useState } from "react";
8
8
  import { Button } from "./button.js";
9
- const CAROUSEL_NAME = 'Carousel';
9
+ const CAROUSEL_NAME = "Carousel";
10
10
  const [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);
11
11
  const [CarouselContextProvider, useCarouselContext] = createCarouselContext(CAROUSEL_NAME);
12
12
  function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }) {
13
13
  const [carouselRef, api] = embla_carousel_react({
14
14
  ...opts,
15
- axis: 'vertical' === orientation ? 'y' : 'x'
15
+ axis: "vertical" === orientation ? "y" : "x"
16
16
  }, plugins);
17
17
  const [canScrollPrevious, setCanScrollPrevious] = useState(false);
18
18
  const [canScrollNext, setCanScrollNext] = useState(false);
@@ -32,10 +32,10 @@ function Carousel({ __scopeCarousel, children, className, opts, orientation, plu
32
32
  api
33
33
  ]);
34
34
  const handleKeyDown = useCallback((event)=>{
35
- if ('ArrowLeft' === event.key) {
35
+ if ("ArrowLeft" === event.key) {
36
36
  event.preventDefault();
37
37
  scrollPrevious();
38
- } else if ('ArrowRight' === event.key) {
38
+ } else if ("ArrowRight" === event.key) {
39
39
  event.preventDefault();
40
40
  scrollNext();
41
41
  }
@@ -55,10 +55,10 @@ function Carousel({ __scopeCarousel, children, className, opts, orientation, plu
55
55
  queueMicrotask(()=>{
56
56
  onSelect(api);
57
57
  });
58
- api.on('reInit', onSelect);
59
- api.on('select', onSelect);
58
+ api.on("reInit", onSelect);
59
+ api.on("select", onSelect);
60
60
  return ()=>{
61
- api.off('select', onSelect);
61
+ api.off("select", onSelect);
62
62
  };
63
63
  }, [
64
64
  api,
@@ -70,12 +70,12 @@ function Carousel({ __scopeCarousel, children, className, opts, orientation, plu
70
70
  canScrollPrev: canScrollPrevious,
71
71
  carouselRef: carouselRef,
72
72
  opts: opts,
73
- orientation: orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
73
+ orientation: orientation ?? (opts?.axis === "y" ? "vertical" : "horizontal"),
74
74
  scope: __scopeCarousel,
75
75
  scrollNext: scrollNext,
76
76
  scrollPrev: scrollPrevious,
77
77
  children: /*#__PURE__*/ jsx("div", {
78
- className: cn('relative', className),
78
+ className: cn("relative", className),
79
79
  "data-slot": "carousel",
80
80
  onKeyDownCapture: handleKeyDown,
81
81
  ...props,
@@ -83,36 +83,36 @@ function Carousel({ __scopeCarousel, children, className, opts, orientation, plu
83
83
  })
84
84
  });
85
85
  }
86
- const CAROUSEL_CONTENT_NAME = 'CarouselContent';
86
+ const CAROUSEL_CONTENT_NAME = "CarouselContent";
87
87
  function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
88
88
  const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);
89
89
  return /*#__PURE__*/ jsx("div", {
90
90
  ref: carouselRef,
91
- className: cn('overflow-hidden', classNames?.wrapper),
91
+ className: cn("overflow-hidden", classNames?.wrapper),
92
92
  "data-slot": "carousel-content",
93
93
  children: /*#__PURE__*/ jsx("div", {
94
- className: cn('flex', 'horizontal' === orientation ? '-ml-4' : '-mt-4 flex-col', classNames?.content, className),
94
+ className: cn("flex", "horizontal" === orientation ? "-ml-4" : "-mt-4 flex-col", classNames?.content, className),
95
95
  ...props
96
96
  })
97
97
  });
98
98
  }
99
- const CAROUSEL_ITEM_NAME = 'CarouselItem';
99
+ const CAROUSEL_ITEM_NAME = "CarouselItem";
100
100
  function CarouselItem({ __scopeCarousel, className, ...props }) {
101
101
  const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
102
102
  return /*#__PURE__*/ jsx("div", {
103
103
  "aria-roledescription": "slide",
104
- className: cn('min-w-0 shrink-0 grow-0 basis-full', 'horizontal' === orientation ? 'pl-4' : 'pt-4', className),
104
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", "horizontal" === orientation ? "pl-4" : "pt-4", className),
105
105
  "data-slot": "carousel-item",
106
106
  role: "group",
107
107
  ...props
108
108
  });
109
109
  }
110
- const CAROUSEL_PREVIOUS_NAME = 'CarouselPrevious';
111
- function CarouselPrevious({ __scopeCarousel, className, size = 'icon', variant = 'outline', ...props }) {
110
+ const CAROUSEL_PREVIOUS_NAME = "CarouselPrevious";
111
+ function CarouselPrevious({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
112
112
  const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
113
113
  return /*#__PURE__*/ jsxs(Button, {
114
114
  "aria-label": "Previous slide",
115
- className: cn('absolute size-8 shadow-none', 'horizontal' === orientation ? 'top-1/2 -left-12 -translate-y-1/2' : '-top-12 left-1/2 -translate-x-1/2 rotate-90', className),
115
+ className: cn("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
116
116
  "data-slot": "carousel-previous",
117
117
  disabled: !canScrollPrev,
118
118
  size: size,
@@ -128,12 +128,12 @@ function CarouselPrevious({ __scopeCarousel, className, size = 'icon', variant =
128
128
  ]
129
129
  });
130
130
  }
131
- const CAROUSEL_NEXT_NAME = 'CarouselNext';
132
- function CarouselNext({ __scopeCarousel, className, size = 'icon', variant = 'outline', ...props }) {
131
+ const CAROUSEL_NEXT_NAME = "CarouselNext";
132
+ function CarouselNext({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
133
133
  const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
134
134
  return /*#__PURE__*/ jsxs(Button, {
135
135
  "aria-label": "Next slide",
136
- className: cn('absolute size-8 shadow-none', 'horizontal' === orientation ? 'top-1/2 -right-12 -translate-y-1/2' : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90', className),
136
+ className: cn("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
137
137
  "data-slot": "carousel-next",
138
138
  disabled: !canScrollNext,
139
139
  size: size,
@@ -1,7 +1,8 @@
1
- import type { Scope } from '@radix-ui/react-context';
2
- import type { ComponentProps, ComponentType, JSX, ReactNode } from 'react';
3
- import type { NameType, Payload, ValueType } from 'recharts/types/component/DefaultTooltipContent';
4
- import * as RechartsPrimitive from 'recharts';
1
+ import type { Scope } from "@radix-ui/react-context";
2
+ import type { ComponentProps, ComponentType, JSX, ReactNode } from "react";
3
+ import type { NameType, Payload, ValueType } from "recharts/types/component/DefaultTooltipContent";
4
+ import type { TooltipContentProps, TooltipProps } from "recharts";
5
+ import * as RechartsPrimitive from "recharts";
5
6
  type ExtractProps<T> = T extends (props: infer P) => ReactNode ? P : never;
6
7
  type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
7
8
  declare const THEMES: {
@@ -22,8 +23,8 @@ type ScopedProps<P> = P & {
22
23
  __scopeChart?: Scope;
23
24
  };
24
25
  declare const createChartScope: import("@radix-ui/react-context").CreateScope;
25
- interface ChartContainerProps extends ComponentProps<'div'> {
26
- children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
26
+ interface ChartContainerProps extends ComponentProps<"div"> {
27
+ children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
27
28
  config: ChartConfig;
28
29
  }
29
30
  declare function ChartContainer({ __scopeChart, children, className, config, id, ...props }: ScopedProps<ChartContainerProps>): JSX.Element;
@@ -32,12 +33,12 @@ interface ChartStyleProps {
32
33
  id: string;
33
34
  }
34
35
  declare function ChartStyle({ config, id }: ChartStyleProps): ReactNode;
35
- type ChartTooltipProps<TValue extends ValueType, TName extends NameType> = ComponentProps<typeof RechartsPrimitive.Tooltip<TValue, TName>>;
36
+ type ChartTooltipProps<TValue extends ValueType, TName extends NameType> = TooltipProps<TValue, TName>;
36
37
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
37
- type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<ExtractProps<ComponentProps<typeof RechartsPrimitive.Tooltip<TValue, TName>>['content']>, 'accessibilityLayer' | 'active' | 'activeIndex' | 'coordinate' | 'payload'>, 'payload'> & {
38
+ type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<TooltipContentProps<TValue, TName>, "accessibilityLayer" | "active" | "activeIndex" | "coordinate" | "payload">, "payload"> & {
38
39
  hideIndicator?: boolean;
39
40
  hideLabel?: boolean;
40
- indicator?: 'dashed' | 'dot' | 'line';
41
+ indicator?: "dashed" | "dot" | "line";
41
42
  labelKey?: string;
42
43
  nameKey?: string;
43
44
  color?: string | undefined;
@@ -46,8 +47,8 @@ type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType>
46
47
  };
47
48
  declare function ChartTooltipContent<TValue extends ValueType, TName extends NameType>({ __scopeChart, active, className, color, formatter, hideIndicator, hideLabel, indicator, label, labelClassName, labelFormatter, labelKey, nameKey, payload, }: ScopedProps<ChartTooltipContentProps<TValue, TName>>): ReactNode;
48
49
  type ChartLegendProps = ComponentProps<typeof RechartsPrimitive.Legend>;
49
- declare const ChartLegend: typeof RechartsPrimitive.Legend;
50
- type ChartLegendContentProps = ComponentProps<'div'> & ExtractProps<RechartsPrimitive.LegendProps['content']> & {
50
+ declare const ChartLegend: import("react").MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
51
+ type ChartLegendContentProps = ComponentProps<"div"> & ExtractProps<RechartsPrimitive.LegendProps["content"]> & {
51
52
  hideIcon?: boolean;
52
53
  nameKey?: string;
53
54
  };