@mbao01/common 0.0.41 → 0.0.43

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 (319) hide show
  1. package/dist/types/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/types/components/Accordion/constants.d.ts +3 -3
  3. package/dist/types/components/Accordion/index.d.ts +1 -1
  4. package/dist/types/components/Accordion/types.d.ts +0 -1
  5. package/dist/types/components/Alert/Alert.d.ts +1 -1
  6. package/dist/types/components/Alert/constants.d.ts +1 -1
  7. package/dist/types/components/Alert/index.d.ts +1 -1
  8. package/dist/types/components/Alert/types.d.ts +2 -3
  9. package/dist/types/components/AlertDialog/AlertDialog.d.ts +3 -3
  10. package/dist/types/components/AlertDialog/constants.d.ts +1 -1
  11. package/dist/types/components/AlertDialog/index.d.ts +1 -1
  12. package/dist/types/components/AlertDialog/types.d.ts +3 -4
  13. package/dist/types/components/Anchor/Anchor.d.ts +1 -1
  14. package/dist/types/components/Anchor/constant.d.ts +1 -1
  15. package/dist/types/components/Anchor/index.d.ts +1 -1
  16. package/dist/types/components/Anchor/types.d.ts +2 -3
  17. package/dist/types/components/Avatar/Avatar.d.ts +1 -1
  18. package/dist/types/components/Avatar/constants.d.ts +3 -3
  19. package/dist/types/components/Avatar/index.d.ts +1 -1
  20. package/dist/types/components/Avatar/types.d.ts +2 -3
  21. package/dist/types/components/Badge/Badge.d.ts +1 -1
  22. package/dist/types/components/Badge/constants.d.ts +1 -1
  23. package/dist/types/components/Badge/types.d.ts +2 -3
  24. package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  25. package/dist/types/components/Breadcrumbs/index.d.ts +1 -1
  26. package/dist/types/components/Breadcrumbs/types.d.ts +0 -1
  27. package/dist/types/components/Button/Button.d.ts +3 -3
  28. package/dist/types/components/Button/constants.d.ts +1 -1
  29. package/dist/types/components/Button/index.d.ts +1 -1
  30. package/dist/types/components/Button/types.d.ts +3 -3
  31. package/dist/types/components/Calendar/Calendar.d.ts +1 -1
  32. package/dist/types/components/Calendar/index.d.ts +1 -1
  33. package/dist/types/components/Calendar/types.d.ts +1 -2
  34. package/dist/types/components/Card/Card.d.ts +1 -1
  35. package/dist/types/components/Card/constants.d.ts +1 -1
  36. package/dist/types/components/Card/index.d.ts +1 -1
  37. package/dist/types/components/Card/types.d.ts +3 -3
  38. package/dist/types/components/Carousel/Carousel.d.ts +11 -12
  39. package/dist/types/components/Carousel/CarouselContext.d.ts +2 -3
  40. package/dist/types/components/Carousel/constants.d.ts +4 -4
  41. package/dist/types/components/Carousel/index.d.ts +1 -1
  42. package/dist/types/components/Carousel/types.d.ts +1 -2
  43. package/dist/types/components/Carousel/useCarousel.d.ts +1 -1
  44. package/dist/types/components/Collapsible/Collapsible.d.ts +3 -4
  45. package/dist/types/components/Collapsible/index.d.ts +1 -1
  46. package/dist/types/components/Collapsible/types.d.ts +0 -1
  47. package/dist/types/components/Combobox/Combobox.d.ts +1 -1
  48. package/dist/types/components/Combobox/index.d.ts +1 -1
  49. package/dist/types/components/Command/Command.d.ts +24 -24
  50. package/dist/types/components/Command/constants.d.ts +11 -11
  51. package/dist/types/components/Command/index.d.ts +1 -1
  52. package/dist/types/components/Command/types.d.ts +4 -5
  53. package/dist/types/components/DatePicker/DatePicker.d.ts +1 -1
  54. package/dist/types/components/DatePicker/DateRangePicker.d.ts +1 -1
  55. package/dist/types/components/DatePicker/MultipleDatesPicker.d.ts +1 -1
  56. package/dist/types/components/DatePicker/index.d.ts +3 -3
  57. package/dist/types/components/DatePicker/types.d.ts +6 -7
  58. package/dist/types/components/Description/Description.d.ts +1 -1
  59. package/dist/types/components/Description/index.d.ts +1 -1
  60. package/dist/types/components/Description/types.d.ts +0 -1
  61. package/dist/types/components/Dialog/Dialog.d.ts +3 -3
  62. package/dist/types/components/Dialog/constants.d.ts +7 -7
  63. package/dist/types/components/Dialog/index.d.ts +1 -1
  64. package/dist/types/components/Dialog/types.d.ts +2 -3
  65. package/dist/types/components/Drawer/Drawer.d.ts +15 -20
  66. package/dist/types/components/Drawer/constants.d.ts +6 -6
  67. package/dist/types/components/Drawer/index.d.ts +1 -1
  68. package/dist/types/components/Drawer/types.d.ts +1 -2
  69. package/dist/types/components/FileUploader/FileUploader.d.ts +4 -5
  70. package/dist/types/components/FileUploader/FileUploaderContext.d.ts +2 -3
  71. package/dist/types/components/FileUploader/index.d.ts +1 -1
  72. package/dist/types/components/FileUploader/types.d.ts +2 -2
  73. package/dist/types/components/FileUploader/useFileUpload.d.ts +1 -1
  74. package/dist/types/components/Form/Checkbox/constants.d.ts +1 -1
  75. package/dist/types/components/Form/Checkbox/index.d.ts +1 -1
  76. package/dist/types/components/Form/Checkbox/types.d.ts +2 -3
  77. package/dist/types/components/Form/Input/Input.d.ts +2 -2
  78. package/dist/types/components/Form/Input/constants.d.ts +1 -1
  79. package/dist/types/components/Form/Input/index.d.ts +1 -1
  80. package/dist/types/components/Form/Input/types.d.ts +2 -3
  81. package/dist/types/components/Form/OtpInput/OtpInput.d.ts +1 -1
  82. package/dist/types/components/Form/OtpInput/index.d.ts +1 -1
  83. package/dist/types/components/Form/OtpInput/types.d.ts +2 -2
  84. package/dist/types/components/Form/Phone/Phone.d.ts +2 -2
  85. package/dist/types/components/Form/Phone/constants.d.ts +2 -2
  86. package/dist/types/components/Form/Phone/index.d.ts +1 -1
  87. package/dist/types/components/Form/Phone/types.d.ts +1 -1
  88. package/dist/types/components/Form/Radio/constants.d.ts +1 -1
  89. package/dist/types/components/Form/Radio/index.d.ts +1 -1
  90. package/dist/types/components/Form/Radio/types.d.ts +2 -3
  91. package/dist/types/components/Form/Range/Range.d.ts +1 -1
  92. package/dist/types/components/Form/Range/constants.d.ts +1 -1
  93. package/dist/types/components/Form/Range/index.d.ts +1 -1
  94. package/dist/types/components/Form/Range/types.d.ts +2 -3
  95. package/dist/types/components/Form/Select/Select.d.ts +2 -2
  96. package/dist/types/components/Form/Select/constants.d.ts +6 -6
  97. package/dist/types/components/Form/Select/index.d.ts +1 -1
  98. package/dist/types/components/Form/Select/types.d.ts +2 -3
  99. package/dist/types/components/Form/Slider/constants.d.ts +4 -4
  100. package/dist/types/components/Form/Slider/index.d.ts +1 -1
  101. package/dist/types/components/Form/Slider/types.d.ts +2 -3
  102. package/dist/types/components/Form/Switch/constants.d.ts +1 -1
  103. package/dist/types/components/Form/Switch/index.d.ts +1 -1
  104. package/dist/types/components/Form/Switch/types.d.ts +2 -3
  105. package/dist/types/components/Form/TextField/TextField.d.ts +3 -3
  106. package/dist/types/components/Form/TextField/constants.d.ts +1 -1
  107. package/dist/types/components/Form/TextField/index.d.ts +1 -1
  108. package/dist/types/components/Form/TextField/types.d.ts +2 -2
  109. package/dist/types/components/Form/Textarea/Textarea.d.ts +1 -1
  110. package/dist/types/components/Form/Textarea/constants.d.ts +1 -1
  111. package/dist/types/components/Form/Textarea/index.d.ts +1 -1
  112. package/dist/types/components/Form/Textarea/types.d.ts +2 -3
  113. package/dist/types/components/Form/components/FormControl/FormControl.d.ts +1 -1
  114. package/dist/types/components/Form/components/FormControl/constants.d.ts +1 -1
  115. package/dist/types/components/Form/components/FormControl/index.d.ts +1 -1
  116. package/dist/types/components/Form/components/FormControl/types.d.ts +2 -3
  117. package/dist/types/components/Form/components/Label/Label.d.ts +1 -1
  118. package/dist/types/components/Form/components/Label/constants.d.ts +1 -1
  119. package/dist/types/components/Form/components/Label/index.d.ts +1 -1
  120. package/dist/types/components/Form/components/Label/types.d.ts +3 -4
  121. package/dist/types/components/Form/index.d.ts +13 -13
  122. package/dist/types/components/HoverCard/HoverCard.d.ts +3 -4
  123. package/dist/types/components/HoverCard/constants.d.ts +1 -1
  124. package/dist/types/components/HoverCard/index.d.ts +1 -1
  125. package/dist/types/components/HoverCard/types.d.ts +0 -1
  126. package/dist/types/components/Loading/Loading.d.ts +1 -1
  127. package/dist/types/components/Loading/constants.d.ts +1 -1
  128. package/dist/types/components/Loading/index.d.ts +1 -1
  129. package/dist/types/components/Loading/types.d.ts +2 -3
  130. package/dist/types/components/Menu/ContextMenu/ContextMenu.d.ts +19 -20
  131. package/dist/types/components/Menu/ContextMenu/index.d.ts +1 -1
  132. package/dist/types/components/Menu/ContextMenu/types.d.ts +2 -3
  133. package/dist/types/components/Menu/DropdownMenu/DropdownMenu.d.ts +19 -20
  134. package/dist/types/components/Menu/DropdownMenu/index.d.ts +1 -1
  135. package/dist/types/components/Menu/DropdownMenu/types.d.ts +2 -3
  136. package/dist/types/components/Menu/Menubar/constants.d.ts +11 -11
  137. package/dist/types/components/Menu/Menubar/index.d.ts +1 -1
  138. package/dist/types/components/Menu/Menubar/types.d.ts +2 -3
  139. package/dist/types/components/Menu/NavigationMenu/NavigationMenu.d.ts +9 -10
  140. package/dist/types/components/Menu/NavigationMenu/constants.d.ts +6 -6
  141. package/dist/types/components/Menu/NavigationMenu/index.d.ts +1 -1
  142. package/dist/types/components/Menu/NavigationMenu/types.d.ts +2 -3
  143. package/dist/types/components/Menu/index.d.ts +4 -4
  144. package/dist/types/components/Pagination/Pagination.d.ts +3 -4
  145. package/dist/types/components/Pagination/constants.d.ts +5 -5
  146. package/dist/types/components/Pagination/index.d.ts +1 -1
  147. package/dist/types/components/Pagination/types.d.ts +2 -3
  148. package/dist/types/components/Popover/Popover.d.ts +1 -1
  149. package/dist/types/components/Popover/constants.d.ts +1 -1
  150. package/dist/types/components/Popover/index.d.ts +1 -1
  151. package/dist/types/components/Popover/types.d.ts +2 -3
  152. package/dist/types/components/Progress/Progress.d.ts +1 -1
  153. package/dist/types/components/Progress/constants.d.ts +2 -2
  154. package/dist/types/components/Progress/index.d.ts +1 -1
  155. package/dist/types/components/Progress/types.d.ts +2 -3
  156. package/dist/types/components/ScrollArea/ScrollArea.d.ts +3 -4
  157. package/dist/types/components/ScrollArea/constants.d.ts +4 -4
  158. package/dist/types/components/ScrollArea/index.d.ts +1 -1
  159. package/dist/types/components/ScrollArea/types.d.ts +2 -3
  160. package/dist/types/components/Separator/Separator.d.ts +1 -1
  161. package/dist/types/components/Separator/constants.d.ts +1 -1
  162. package/dist/types/components/Separator/index.d.ts +1 -1
  163. package/dist/types/components/Separator/types.d.ts +0 -1
  164. package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
  165. package/dist/types/components/Skeleton/constants.d.ts +1 -1
  166. package/dist/types/components/Skeleton/index.d.ts +1 -1
  167. package/dist/types/components/Skeleton/types.d.ts +2 -3
  168. package/dist/types/components/Slot/Slot.d.ts +1 -1
  169. package/dist/types/components/Slot/index.d.ts +1 -1
  170. package/dist/types/components/Sonner/Toaster.d.ts +1 -1
  171. package/dist/types/components/Sonner/constants.d.ts +2 -2
  172. package/dist/types/components/Sonner/index.d.ts +2 -2
  173. package/dist/types/components/Sonner/types.d.ts +3 -4
  174. package/dist/types/components/Table/Table.d.ts +8 -9
  175. package/dist/types/components/Table/constants.d.ts +2 -2
  176. package/dist/types/components/Table/index.d.ts +1 -1
  177. package/dist/types/components/Table/types.d.ts +2 -3
  178. package/dist/types/components/Tabs/Tabs.d.ts +1 -1
  179. package/dist/types/components/Tabs/constants.d.ts +3 -3
  180. package/dist/types/components/Tabs/index.d.ts +1 -1
  181. package/dist/types/components/Tabs/types.d.ts +2 -3
  182. package/dist/types/components/Text/Text.d.ts +1 -1
  183. package/dist/types/components/Text/constants.d.ts +1 -1
  184. package/dist/types/components/Text/types.d.ts +2 -3
  185. package/dist/types/components/ThemeSwitch/ThemeSwitch.d.ts +1 -1
  186. package/dist/types/components/ThemeSwitch/constants.d.ts +1 -1
  187. package/dist/types/components/ThemeSwitch/index.d.ts +1 -1
  188. package/dist/types/components/ThemeSwitch/types.d.ts +1 -2
  189. package/dist/types/components/Toggle/Toggle.d.ts +1 -1
  190. package/dist/types/components/Toggle/constants.d.ts +1 -1
  191. package/dist/types/components/Toggle/index.d.ts +1 -1
  192. package/dist/types/components/Toggle/types.d.ts +3 -4
  193. package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +4 -5
  194. package/dist/types/components/ToggleGroup/constants.d.ts +1 -1
  195. package/dist/types/components/ToggleGroup/index.d.ts +1 -1
  196. package/dist/types/components/ToggleGroup/types.d.ts +1 -2
  197. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -2
  198. package/dist/types/components/Tooltip/constants.d.ts +2 -2
  199. package/dist/types/components/Tooltip/index.d.ts +1 -1
  200. package/dist/types/components/Tooltip/types.d.ts +2 -3
  201. package/dist/types/index.d.ts +36 -36
  202. package/dist/types/libs/cva.d.ts +2 -2
  203. package/dist/types/libs/index.d.ts +1 -1
  204. package/dist/types/utilities/cn.d.ts +1 -1
  205. package/dist/types/utilities/getSubpaths/getSubpaths.d.ts +1 -1
  206. package/dist/types/utilities/getSubpaths/index.d.ts +1 -1
  207. package/dist/types/utilities/index.d.ts +3 -3
  208. package/package.json +82 -73
  209. package/src/components/Accordion/Accordion.tsx +3 -9
  210. package/src/components/Accordion/types.ts +2 -6
  211. package/src/components/Alert/Alert.tsx +3 -14
  212. package/src/components/AlertDialog/AlertDialog.tsx +3 -6
  213. package/src/components/AlertDialog/types.ts +3 -5
  214. package/src/components/Anchor/Anchor.tsx +3 -5
  215. package/src/components/Avatar/Avatar.tsx +5 -25
  216. package/src/components/Avatar/constants.ts +15 -18
  217. package/src/components/Avatar/types.ts +1 -5
  218. package/src/components/Badge/Badge.tsx +2 -12
  219. package/src/components/Badge/index.ts +1 -1
  220. package/src/components/Button/Button.tsx +5 -21
  221. package/src/components/Button/constants.ts +1 -1
  222. package/src/components/Button/types.ts +1 -1
  223. package/src/components/Calendar/Calendar.tsx +40 -34
  224. package/src/components/Card/Card.tsx +4 -14
  225. package/src/components/Card/types.ts +1 -2
  226. package/src/components/Carousel/Carousel.tsx +68 -73
  227. package/src/components/Carousel/constants.ts +10 -13
  228. package/src/components/Carousel/types.ts +1 -1
  229. package/src/components/Collapsible/Collapsible.tsx +2 -4
  230. package/src/components/Collapsible/types.ts +1 -3
  231. package/src/components/Combobox/Combobox.tsx +3 -8
  232. package/src/components/Command/Command.tsx +11 -28
  233. package/src/components/Command/constants.ts +2 -6
  234. package/src/components/Command/types.ts +3 -7
  235. package/src/components/DatePicker/DatePicker.tsx +5 -9
  236. package/src/components/DatePicker/DateRangePicker.tsx +5 -9
  237. package/src/components/DatePicker/MultipleDatesPicker.tsx +6 -10
  238. package/src/components/DatePicker/types.ts +12 -23
  239. package/src/components/Description/Description.tsx +4 -19
  240. package/src/components/Dialog/Dialog.tsx +5 -9
  241. package/src/components/Dialog/constants.ts +2 -6
  242. package/src/components/Dialog/types.ts +5 -15
  243. package/src/components/Drawer/Drawer.tsx +6 -19
  244. package/src/components/Drawer/constants.ts +2 -6
  245. package/src/components/FileUploader/FileUploader.tsx +31 -53
  246. package/src/components/FileUploader/FileUploaderContext.tsx +1 -2
  247. package/src/components/FileUploader/types.ts +1 -1
  248. package/src/components/Form/Checkbox/Checkbox.tsx +2 -2
  249. package/src/components/Form/Checkbox/types.ts +1 -4
  250. package/src/components/Form/Input/Input.tsx +3 -9
  251. package/src/components/Form/Input/constants.ts +47 -50
  252. package/src/components/Form/Input/types.ts +1 -4
  253. package/src/components/Form/OtpInput/OtpInput.tsx +5 -12
  254. package/src/components/Form/Phone/Phone.tsx +6 -15
  255. package/src/components/Form/Radio/Radio.tsx +2 -2
  256. package/src/components/Form/Radio/types.ts +1 -4
  257. package/src/components/Form/Range/Range.tsx +3 -6
  258. package/src/components/Form/Range/types.ts +1 -4
  259. package/src/components/Form/Select/Select.tsx +26 -49
  260. package/src/components/Form/Select/types.ts +3 -9
  261. package/src/components/Form/Slider/Slider.tsx +39 -25
  262. package/src/components/Form/Slider/constants.ts +21 -24
  263. package/src/components/Form/Slider/types.ts +2 -4
  264. package/src/components/Form/Switch/Switch.tsx +2 -3
  265. package/src/components/Form/Switch/types.ts +1 -4
  266. package/src/components/Form/TextField/TextField.tsx +2 -2
  267. package/src/components/Form/Textarea/Textarea.tsx +2 -5
  268. package/src/components/Form/Textarea/constants.ts +42 -45
  269. package/src/components/Form/components/FormControl/FormControl.tsx +1 -1
  270. package/src/components/Form/components/Label/Label.tsx +2 -5
  271. package/src/components/Form/components/Label/types.ts +2 -4
  272. package/src/components/HoverCard/HoverCard.tsx +2 -4
  273. package/src/components/HoverCard/types.ts +1 -3
  274. package/src/components/Loading/Loading.tsx +3 -12
  275. package/src/components/Menu/ContextMenu/ContextMenu.tsx +5 -17
  276. package/src/components/Menu/ContextMenu/types.ts +1 -3
  277. package/src/components/Menu/DropdownMenu/DropdownMenu.tsx +7 -21
  278. package/src/components/Menu/DropdownMenu/types.ts +1 -3
  279. package/src/components/Menu/Menubar/Menubar.tsx +33 -49
  280. package/src/components/Menu/Menubar/types.ts +5 -15
  281. package/src/components/Menu/NavigationMenu/NavigationMenu.tsx +4 -13
  282. package/src/components/Pagination/Pagination.tsx +18 -42
  283. package/src/components/Pagination/constants.ts +2 -6
  284. package/src/components/Popover/Popover.tsx +1 -1
  285. package/src/components/Popover/types.ts +2 -6
  286. package/src/components/Progress/Progress.tsx +2 -4
  287. package/src/components/Progress/constants.ts +38 -44
  288. package/src/components/ScrollArea/ScrollArea.tsx +4 -16
  289. package/src/components/ScrollArea/constants.ts +8 -13
  290. package/src/components/ScrollArea/types.ts +1 -3
  291. package/src/components/Separator/Separator.tsx +2 -2
  292. package/src/components/Separator/types.ts +1 -3
  293. package/src/components/Skeleton/Skeleton.tsx +4 -14
  294. package/src/components/Sonner/Toaster.tsx +2 -4
  295. package/src/components/Sonner/constants.ts +10 -20
  296. package/src/components/Sonner/types.ts +4 -10
  297. package/src/components/Table/Table.tsx +23 -38
  298. package/src/components/Tabs/Tabs.tsx +9 -31
  299. package/src/components/Tabs/types.ts +5 -17
  300. package/src/components/Text/Text.tsx +3 -6
  301. package/src/components/Text/index.ts +1 -1
  302. package/src/components/Text/types.ts +1 -3
  303. package/src/components/ThemeSwitch/ThemeSwitch.tsx +3 -2
  304. package/src/components/Toggle/Toggle.tsx +15 -16
  305. package/src/components/Toggle/types.ts +2 -7
  306. package/src/components/ToggleGroup/ToggleGroup.tsx +5 -19
  307. package/src/components/ToggleGroup/constants.ts +1 -3
  308. package/src/components/ToggleGroup/types.ts +1 -3
  309. package/src/components/Tooltip/Tooltip.tsx +2 -4
  310. package/src/components/Tooltip/types.ts +1 -1
  311. package/src/libs/cva.ts +1 -3
  312. package/src/typography/TypographyDemo.tsx +119 -188
  313. package/src/typography/TypographyScale.tsx +7 -8
  314. package/src/utilities/cn.ts +2 -1
  315. package/src/utilities/getSubpaths/getSubpaths.ts +2 -4
  316. package/tsconfig.node.json +1 -1
  317. package/vitest-setup.ts +17 -1
  318. package/vitest.config.ts +2 -1
  319. package/dist/types/components/Menu/Menubar/Menubar.d.ts +0 -43
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { DayPicker } from "react-day-picker";
4
4
  import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons";
5
- import { type CalendarProps } from "./types";
6
5
  import { cn } from "../../utilities";
7
6
  import { getButtonClasses } from "../Button/constants";
7
+ import { type CalendarProps } from "./types";
8
8
 
9
9
  export const Calendar = ({
10
10
  className,
@@ -17,46 +17,52 @@ export const Calendar = ({
17
17
  showOutsideDays={showOutsideDays}
18
18
  className={cn("p-3", className)}
19
19
  classNames={{
20
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
21
- month: "space-y-4",
22
- caption: "flex justify-center pt-1 relative items-center",
23
20
  caption_label: "text-sm font-medium",
24
- caption_dropdowns: "flex justify-center items-center",
25
- nav: "space-x-1 flex items-center",
26
- nav_button: cn(
21
+ day: "h-9 w-9 text-center flex items-center justify-center text-sm p-0 relative focus-within:relative focus-within:z-20",
22
+ day_button: cn(
23
+ getButtonClasses({ variant: "ghost" }),
24
+ "h-8 w-8 p-0 font-normal group-has-[*]/today:bg-accent group-aria-[selected]/today:bg-primary group-[.day-in-range]/today:!bg-primary/50 group-has-[*]/today:text-accent-content group-has-[*]/today:rounded-full"
25
+ ),
26
+ disabled: "!opacity-30",
27
+ dropdown: "bg-transparent",
28
+ dropdown_root: "text-sm [&>[aria-hidden='true']]:hidden",
29
+ dropdowns: "flex justify-center items-center",
30
+ hidden: "hidden",
31
+ button_previous: cn(
27
32
  getButtonClasses({ outline: true }),
28
- "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
33
+ "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 [&:disabled]:text-opacity-50"
29
34
  ),
30
- nav_button_previous: "absolute left-1",
31
- nav_button_next: "absolute right-1",
32
- table: "w-full border-collapse space-y-1",
33
- head_row: "flex",
34
- head_cell:
35
- "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
36
- row: "flex w-full mt-2",
37
- cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
38
- day: cn(
39
- getButtonClasses({ variant: "ghost" }),
40
- "h-8 w-8 p-0 font-normal aria-selected:opacity-100"
35
+ button_next: cn(
36
+ getButtonClasses({ outline: true }),
37
+ "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 [&:disabled]:text-opacity-50"
41
38
  ),
42
- day_range_end: "day-range-end",
43
- day_selected:
44
- "bg-primary text-primary-content disabled:bg-primary disabled:text-primary-content hover:bg-primary hover:text-primary-content focus:bg-primary focus:text-primary-content",
45
- day_today: "outline outline-accent",
46
- day_outside:
47
- "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
48
- day_disabled: "text-muted-foreground opacity-50",
49
- day_range_middle:
50
- "aria-selected:bg-accent aria-selected:text-accent-content",
51
- day_hidden: "hidden",
52
- vhidden: "hidden",
53
- dropdown_month: "text-sm [&>[aria-hidden='true']]:hidden",
54
- dropdown_year: "text-sm [&>[aria-hidden='true']]:hidden",
39
+ footer: "text-sm py-2",
40
+ month: "space-y-4",
41
+ month_caption: "flex justify-start pt-1 relative items-center",
42
+ month_grid: "w-full border-collapse space-y-1",
43
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative",
44
+ nav: "absolute flex gap-2 items-center rtl:left-0 rtl:right-auto right-0 z-10",
45
+ outside: "opacity-50",
46
+ range_end: "!opacity-100",
47
+ range_start: "!opacity-100",
48
+ range_middle: "day-in-range [&>*]:bg-primary/50 [&>*]:text-primary-content",
49
+ selected:
50
+ "[&>*]:bg-primary [&>*]:text-primary-content [&:disabled>*]:bg-primary [&:disabled>*]:text-primary-content [&:hover>*]:bg-primary [&:hover>*]:text-primary-content [&:focus>*]:bg-primary [&:focus>*]:text-primary-content",
51
+ today: "group/today [&:has(*)]:ring-0 ring-1 ring-accent ring-inset rounded-full",
52
+ weekdays: "flex",
53
+ weekday: "rounded-md w-9 font-normal text-[0.8rem]",
54
+ week: "flex w-full mt-2",
55
+ week_number: "flex items-center text-sm italic w-6",
56
+ week_number_header: "w-6",
55
57
  ...classNames,
56
58
  }}
57
59
  components={{
58
- IconLeft: () => <ChevronLeftIcon className="h-4 w-4" />,
59
- IconRight: () => <ChevronRightIcon className="h-4 w-4" />,
60
+ Chevron: ({ orientation, className }) => {
61
+ if (orientation === "left") {
62
+ return <ChevronLeftIcon className={cn("h-4 w-4", className)} />;
63
+ }
64
+ return <ChevronRightIcon className={cn("h-4 w-4", className)} />;
65
+ },
60
66
  }}
61
67
  {...props}
62
68
  />
@@ -1,30 +1,20 @@
1
1
  import type {
2
2
  CardActionsProps,
3
+ CardBodyProps,
3
4
  CardContentProps,
4
5
  CardDescriptionProps,
5
6
  CardFooterProps,
6
7
  CardHeaderProps,
7
8
  CardImageProps,
8
- CardTitleProps,
9
9
  CardProps,
10
- CardBodyProps,
10
+ CardTitleProps,
11
11
  } from "./types";
12
12
  import { cn } from "../../utilities";
13
13
  import { getCardClasses } from "./constants";
14
14
 
15
- const Card = ({
16
- compact,
17
- bordered,
18
- horizontal,
19
- overlay,
20
- className,
21
- ...props
22
- }: CardProps) => (
15
+ const Card = ({ compact, bordered, horizontal, overlay, className, ...props }: CardProps) => (
23
16
  <div
24
- className={cn(
25
- getCardClasses({ bordered, compact, horizontal, overlay }),
26
- className
27
- )}
17
+ className={cn(getCardClasses({ bordered, compact, horizontal, overlay }), className)}
28
18
  {...props}
29
19
  />
30
20
  );
@@ -2,8 +2,7 @@ import React from "react";
2
2
  import { type VariantProps } from "../../libs";
3
3
  import { getCardClasses } from "./constants";
4
4
 
5
- export type CardProps = React.HTMLAttributes<HTMLDivElement> &
6
- VariantProps<typeof getCardClasses>;
5
+ export type CardProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getCardClasses>;
7
6
 
8
7
  export type CardActionsProps = React.HTMLAttributes<HTMLDivElement>;
9
8
  export type CardBodyProps = React.HTMLAttributes<HTMLDivElement>;
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
 
3
3
  import { forwardRef, useCallback, useEffect, useState } from "react";
4
- import useEmblaCarousel from "embla-carousel-react";
5
4
  import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons";
5
+ import useEmblaCarousel from "embla-carousel-react";
6
6
  import type { CarouselApi, CarouselProps } from "./types";
7
7
  import { cn } from "../../utilities";
8
8
  import { Button } from "../Button";
9
+ import { CarouselContext } from "./CarouselContext";
9
10
  import {
10
11
  getCarouselContentClasses,
11
12
  getCarouselItemClasses,
12
13
  getCarouselNextClasses,
13
14
  getCarouselPreviousClasses,
14
15
  } from "./constants";
15
- import { CarouselContext } from "./CarouselContext";
16
16
  import { useCarousel } from "./useCarousel";
17
17
 
18
18
  const Carousel = ({
@@ -92,8 +92,7 @@ const Carousel = ({
92
92
  carouselRef,
93
93
  api: api,
94
94
  opts,
95
- orientation:
96
- orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
95
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
97
96
  scrollPrev,
98
97
  scrollNext,
99
98
  canScrollPrev,
@@ -114,86 +113,82 @@ const Carousel = ({
114
113
  };
115
114
  Carousel.displayName = "Carousel";
116
115
 
117
- const CarouselContent = forwardRef<
118
- HTMLDivElement,
119
- React.HTMLAttributes<HTMLDivElement>
120
- >(({ className, ...props }, ref) => {
121
- const { carouselRef, orientation } = useCarousel();
116
+ const CarouselContent = forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
117
+ ({ className, ...props }, ref) => {
118
+ const { carouselRef, orientation } = useCarousel();
119
+
120
+ return (
121
+ <div ref={carouselRef} className="overflow-hidden">
122
+ <div
123
+ ref={ref}
124
+ className={cn(getCarouselContentClasses({ orientation }), className)}
125
+ {...props}
126
+ />
127
+ </div>
128
+ );
129
+ }
130
+ );
131
+ CarouselContent.displayName = "CarouselContent";
122
132
 
123
- return (
124
- <div ref={carouselRef} className="overflow-hidden">
133
+ const CarouselItem = forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
134
+ ({ className, ...props }, ref) => {
135
+ const { orientation } = useCarousel();
136
+
137
+ return (
125
138
  <div
126
139
  ref={ref}
127
- className={cn(getCarouselContentClasses({ orientation }), className)}
140
+ role="group"
141
+ aria-roledescription="slide"
142
+ className={cn(getCarouselItemClasses({ orientation }), className)}
128
143
  {...props}
129
144
  />
130
- </div>
131
- );
132
- });
133
- CarouselContent.displayName = "CarouselContent";
134
-
135
- const CarouselItem = forwardRef<
136
- HTMLDivElement,
137
- React.HTMLAttributes<HTMLDivElement>
138
- >(({ className, ...props }, ref) => {
139
- const { orientation } = useCarousel();
140
-
141
- return (
142
- <div
143
- ref={ref}
144
- role="group"
145
- aria-roledescription="slide"
146
- className={cn(getCarouselItemClasses({ orientation }), className)}
147
- {...props}
148
- />
149
- );
150
- });
145
+ );
146
+ }
147
+ );
151
148
  CarouselItem.displayName = "CarouselItem";
152
149
 
153
- const CarouselPrevious = forwardRef<
154
- HTMLButtonElement,
155
- React.ComponentProps<typeof Button>
156
- >(({ className, variant = "ghost", outline = true, ...props }, ref) => {
157
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
150
+ const CarouselPrevious = forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(
151
+ ({ className, variant = "ghost", outline = true, ...props }, ref) => {
152
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
158
153
 
159
- return (
160
- <Button
161
- ref={ref}
162
- outline={outline}
163
- variant={variant}
164
- className={cn(getCarouselPreviousClasses({ orientation }), className)}
165
- disabled={!canScrollPrev}
166
- onClick={scrollPrev}
167
- {...props}
168
- >
169
- <ArrowLeftIcon className="h-4 w-4" />
170
- <span className="sr-only">Previous slide</span>
171
- </Button>
172
- );
173
- });
154
+ return (
155
+ <Button
156
+ ref={ref}
157
+ outline={outline}
158
+ variant={variant}
159
+ className={cn(getCarouselPreviousClasses({ orientation }), className)}
160
+ disabled={!canScrollPrev}
161
+ onClick={scrollPrev}
162
+ {...props}
163
+ >
164
+ <ArrowLeftIcon className="h-4 w-4" />
165
+ <span className="sr-only">Previous slide</span>
166
+ </Button>
167
+ );
168
+ }
169
+ );
174
170
  CarouselPrevious.displayName = "CarouselPrevious";
175
171
 
176
- const CarouselNext = forwardRef<
177
- HTMLButtonElement,
178
- React.ComponentProps<typeof Button>
179
- >(({ className, outline = true, variant = "ghost", ...props }, ref) => {
180
- const { orientation, scrollNext, canScrollNext } = useCarousel();
172
+ const CarouselNext = forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(
173
+ ({ className, outline = true, variant = "ghost", ...props }, ref) => {
174
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
181
175
 
182
- return (
183
- <Button
184
- ref={ref}
185
- outline={outline}
186
- variant={variant}
187
- className={cn(getCarouselNextClasses({ orientation }), className)}
188
- disabled={!canScrollNext}
189
- onClick={scrollNext}
190
- {...props}
191
- >
192
- <ArrowRightIcon className="h-4 w-4" />
193
- <span className="sr-only">Next slide</span>
194
- </Button>
195
- );
196
- });
176
+ return (
177
+ <Button
178
+ ref={ref}
179
+ outline={outline}
180
+ variant={variant}
181
+ className={cn(getCarouselNextClasses({ orientation }), className)}
182
+ disabled={!canScrollNext}
183
+ onClick={scrollNext}
184
+ {...props}
185
+ >
186
+ <ArrowRightIcon className="h-4 w-4" />
187
+ <span className="sr-only">Next slide</span>
188
+ </Button>
189
+ );
190
+ }
191
+ );
197
192
  CarouselNext.displayName = "CarouselNext";
198
193
 
199
194
  Carousel.Content = CarouselContent;
@@ -12,20 +12,17 @@ export const getCarouselContentClasses = cva("flex", {
12
12
  },
13
13
  });
14
14
 
15
- export const getCarouselItemClasses = cva(
16
- "min-w-0 shrink-0 grow-0 basis-full",
17
- {
18
- variants: {
19
- orientation: {
20
- horizontal: "pl-4",
21
- vertical: "pt-4",
22
- },
23
- },
24
- defaultVariants: {
25
- orientation: "horizontal",
15
+ export const getCarouselItemClasses = cva("min-w-0 shrink-0 grow-0 basis-full", {
16
+ variants: {
17
+ orientation: {
18
+ horizontal: "pl-4",
19
+ vertical: "pt-4",
26
20
  },
27
- }
28
- );
21
+ },
22
+ defaultVariants: {
23
+ orientation: "horizontal",
24
+ },
25
+ });
29
26
 
30
27
  export const getCarouselNextClasses = cva(
31
28
  "absolute h-8 w-8 rounded-full p-0 disabled:bg-transparent",
@@ -1,4 +1,4 @@
1
- import { type UseEmblaCarouselType } from "embla-carousel-react";
1
+ import type { UseEmblaCarouselType } from "embla-carousel-react";
2
2
  import useEmblaCarousel from "embla-carousel-react";
3
3
 
4
4
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
@@ -1,11 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
4
- import { type CollapsibleProps } from "@radix-ui/react-accordion";
4
+ import { type CollapsibleProps } from "@radix-ui/react-collapsible";
5
5
 
6
- const Collapsible = (props: CollapsibleProps) => (
7
- <CollapsiblePrimitive.Root {...props} />
8
- );
6
+ const Collapsible = (props: CollapsibleProps) => <CollapsiblePrimitive.Root {...props} />;
9
7
 
10
8
  Collapsible.Trigger = CollapsiblePrimitive.CollapsibleTrigger;
11
9
  Collapsible.Content = CollapsiblePrimitive.CollapsibleContent;
@@ -1,5 +1,3 @@
1
1
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
2
 
3
- export type CollapsibleProps = React.ComponentPropsWithoutRef<
4
- typeof CollapsiblePrimitive.Root
5
- >;
3
+ export type CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;
@@ -4,9 +4,9 @@ import * as React from "react";
4
4
  import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons";
5
5
  import type { ComboboxProps, Item } from "./types";
6
6
  import { cn } from "../../utilities";
7
+ import { Button } from "../Button";
7
8
  import { Command } from "../Command";
8
9
  import { Popover } from "../Popover";
9
- import { Button } from "../Button";
10
10
 
11
11
  export const Combobox = <T extends Item>({
12
12
  label,
@@ -39,13 +39,8 @@ export const Combobox = <T extends Item>({
39
39
  </Popover.Trigger>
40
40
  <Popover.Content className={cn("w-[200px] p-0", classes?.popoverContent)}>
41
41
  <Command className={cn(classes?.content)}>
42
- <Command.Input
43
- placeholder={placeholder}
44
- className={cn(classes?.input)}
45
- />
46
- <Command.Empty className={cn(classes?.empty)}>
47
- {emptyText}
48
- </Command.Empty>
42
+ <Command.Input placeholder={placeholder} className={cn(classes?.input)} />
43
+ <Command.Empty className={cn(classes?.empty)}>{emptyText}</Command.Empty>
49
44
  <Command.List>
50
45
  <Command.Group className={cn(classes?.group)}>
51
46
  {items?.map((item) => (
@@ -1,27 +1,23 @@
1
1
  "use client";
2
- /* eslint-disable react/prop-types */
2
+
3
3
  import * as React from "react";
4
- import { Command as CommandPrimitive } from "cmdk";
5
4
  import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
6
- import type {
7
- CommandProps,
8
- CommandDialogProps,
9
- CommandInputProps,
10
- } from "./types";
11
- import { Dialog } from "../Dialog";
5
+ import { Command as CommandPrimitive } from "cmdk";
6
+ import type { CommandDialogProps, CommandInputProps, CommandProps } from "./types";
12
7
  import { cn } from "../../utilities";
8
+ import { Dialog } from "../Dialog";
13
9
  import {
14
- getDialogContentClasses,
15
10
  getCommandClasses,
16
11
  getCommandDialogClasses,
17
12
  getCommandEmptyClasses,
13
+ getCommandGroupClasses,
18
14
  getCommandInputClasses,
19
15
  getCommandInputWrapperClasses,
16
+ getCommandItemClasses,
20
17
  getCommandListClasses,
21
- getCommandGroupClasses,
22
18
  getCommandSeparatorClasses,
23
- getCommandItemClasses,
24
19
  getCommandShortcutClasses,
20
+ getDialogContentClasses,
25
21
  } from "./constants";
26
22
 
27
23
  const Command = ({ className, ...props }: CommandProps) => (
@@ -60,11 +56,7 @@ const CommandList = React.forwardRef<
60
56
  React.ElementRef<typeof CommandPrimitive.List>,
61
57
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
62
58
  >(({ className, ...props }, ref) => (
63
- <CommandPrimitive.List
64
- ref={ref}
65
- className={cn(getCommandListClasses(), className)}
66
- {...props}
67
- />
59
+ <CommandPrimitive.List ref={ref} className={cn(getCommandListClasses(), className)} {...props} />
68
60
  ));
69
61
 
70
62
  CommandList.displayName = CommandPrimitive.List.displayName;
@@ -111,22 +103,13 @@ const CommandItem = React.forwardRef<
111
103
  React.ElementRef<typeof CommandPrimitive.Item>,
112
104
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
113
105
  >(({ className, ...props }, ref) => (
114
- <CommandPrimitive.Item
115
- ref={ref}
116
- className={cn(getCommandItemClasses(), className)}
117
- {...props}
118
- />
106
+ <CommandPrimitive.Item ref={ref} className={cn(getCommandItemClasses(), className)} {...props} />
119
107
  ));
120
108
 
121
109
  CommandItem.displayName = CommandPrimitive.Item.displayName;
122
110
 
123
- const CommandShortcut = ({
124
- className,
125
- ...props
126
- }: React.HTMLAttributes<HTMLSpanElement>) => {
127
- return (
128
- <span className={cn(getCommandShortcutClasses(), className)} {...props} />
129
- );
111
+ const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
112
+ return <span className={cn(getCommandShortcutClasses(), className)} {...props} />;
130
113
  };
131
114
  CommandShortcut.displayName = "CommandShortcut";
132
115
 
@@ -10,17 +10,13 @@ export const getCommandDialogClasses = cva(
10
10
  "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"
11
11
  );
12
12
 
13
- export const getCommandInputWrapperClasses = cva(
14
- "flex items-center border-b px-3"
15
- );
13
+ export const getCommandInputWrapperClasses = cva("flex items-center border-b px-3");
16
14
 
17
15
  export const getCommandInputClasses = cva(
18
16
  "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
19
17
  );
20
18
 
21
- export const getCommandListClasses = cva(
22
- "max-h-[300px] overflow-y-auto overflow-x-hidden"
23
- );
19
+ export const getCommandListClasses = cva("max-h-[300px] overflow-y-auto overflow-x-hidden");
24
20
 
25
21
  export const getCommandEmptyClasses = cva("py-6 text-center text-sm");
26
22
 
@@ -1,16 +1,12 @@
1
1
  import { Command as CommandPrimitive } from "cmdk";
2
- import { type DialogProps } from "../Dialog/types";
3
2
  import { type VariantProps } from "../../libs";
3
+ import { type DialogProps } from "../Dialog/types";
4
4
  import { getCommandClasses, getCommandInputClasses } from "./constants";
5
5
 
6
- export type CommandProps = React.ComponentPropsWithoutRef<
7
- typeof CommandPrimitive
8
- > &
6
+ export type CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive> &
9
7
  VariantProps<typeof getCommandClasses>;
10
8
 
11
- export type CommandInputProps = React.ComponentPropsWithoutRef<
12
- typeof CommandPrimitive.Input
13
- > &
9
+ export type CommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> &
14
10
  VariantProps<typeof getCommandInputClasses>;
15
11
 
16
12
  export type CommandDialogProps = DialogProps;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  import { useState } from "react";
4
- import { format } from "date-fns";
5
4
  import { CalendarIcon } from "@radix-ui/react-icons";
6
- import { type DatePickerProps } from "./types";
5
+ import { format } from "date-fns";
7
6
  import { cn } from "../../utilities";
8
7
  import { Button } from "../Button";
9
8
  import { Calendar } from "../Calendar";
10
9
  import { Popover } from "../Popover";
10
+ import { type DatePickerProps } from "./types";
11
11
 
12
12
  export const DatePicker = ({
13
13
  name,
@@ -31,11 +31,11 @@ export const DatePicker = ({
31
31
 
32
32
  const calendar = (
33
33
  <Calendar
34
- initialFocus
34
+ autoFocus
35
35
  mode="single"
36
36
  selected={date}
37
37
  onSelect={setDate}
38
- captionLayout="dropdown-buttons"
38
+ captionLayout="label"
39
39
  {...props}
40
40
  />
41
41
  );
@@ -50,11 +50,7 @@ export const DatePicker = ({
50
50
  outline={outline}
51
51
  variant={variant}
52
52
  disabled={disabled}
53
- className={cn(
54
- "justify-start",
55
- !date && "font-normal",
56
- triggerClassName
57
- )}
53
+ className={cn("justify-start", !date && "font-normal", triggerClassName)}
58
54
  value={dateValue}
59
55
  >
60
56
  {dateLabel ?? <span>{label ?? "Pick a date"}</span>}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  import { useState } from "react";
4
- import { format } from "date-fns";
5
4
  import { type DateRange } from "react-day-picker";
6
5
  import { CalendarIcon } from "@radix-ui/react-icons";
7
- import { type DateRangePickerProps } from "./types";
6
+ import { format } from "date-fns";
8
7
  import { cn } from "../../utilities";
9
8
  import { Button } from "../Button";
10
9
  import { Calendar } from "../Calendar";
11
10
  import { Popover } from "../Popover";
11
+ import { type DateRangePickerProps } from "./types";
12
12
 
13
13
  export const DateRangePicker = ({
14
14
  name,
@@ -69,11 +69,7 @@ export const DateRangePicker = ({
69
69
  outline={outline}
70
70
  variant={variant}
71
71
  disabled={disabled}
72
- className={cn(
73
- "justify-start flex-nowrap",
74
- !range && "font-normal",
75
- triggerClassName
76
- )}
72
+ className={cn("justify-start flex-nowrap", !range && "font-normal", triggerClassName)}
77
73
  >
78
74
  <span className="text-left text-ellipsis overflow-hidden text-nowrap">
79
75
  {rangeLabel ?? label ?? "Pick a range"}
@@ -83,11 +79,11 @@ export const DateRangePicker = ({
83
79
  </Popover.Trigger>
84
80
  <Popover.Content className="w-auto p-0">
85
81
  <Calendar
86
- initialFocus
82
+ autoFocus
87
83
  mode="range"
88
84
  selected={range}
89
85
  onSelect={setRange}
90
- captionLayout="dropdown-buttons"
86
+ captionLayout="label"
91
87
  {...props}
92
88
  />
93
89
  </Popover.Content>