@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
@@ -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 MultipleDatesPickerProps } 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 MultipleDatesPickerProps } from "./types";
11
11
 
12
12
  export const MultipleDatesPicker = ({
13
13
  name,
@@ -21,8 +21,7 @@ export const MultipleDatesPicker = ({
21
21
  getDatesValue = (dates) => dates?.map((date) => date.toUTCString()),
22
22
  getDatesLabel = (dates) => {
23
23
  if (!dates?.length) return undefined;
24
- if (dates.length < 3)
25
- return dates.map((date) => format(date, "LLL dd, y")).join(" and ");
24
+ if (dates.length < 3) return dates.map((date) => format(date, "LLL dd, y")).join(" and ");
26
25
 
27
26
  return `${dates.length} dates selected`;
28
27
  },
@@ -54,10 +53,7 @@ export const MultipleDatesPicker = ({
54
53
  outline={outline}
55
54
  variant={variant}
56
55
  disabled={disabled}
57
- className={cn(
58
- "justify-start flex-nowrap",
59
- !dates?.length && "font-normal"
60
- )}
56
+ className={cn("justify-start flex-nowrap", !dates?.length && "font-normal")}
61
57
  >
62
58
  <span className="text-left text-ellipsis overflow-hidden text-nowrap">
63
59
  {rangeLabel ?? label ?? "Pick one or more dates"}
@@ -67,11 +63,11 @@ export const MultipleDatesPicker = ({
67
63
  </Popover.Trigger>
68
64
  <Popover.Content className="w-auto p-0">
69
65
  <Calendar
70
- initialFocus
66
+ autoFocus
71
67
  mode="multiple"
72
68
  selected={dates}
73
69
  onSelect={setDates}
74
- captionLayout="dropdown-buttons"
70
+ captionLayout="label"
75
71
  {...props}
76
72
  />
77
73
  </Popover.Content>
@@ -1,21 +1,14 @@
1
- import {
2
- DateRange,
3
- DayPickerMultipleProps,
4
- DayPickerRangeProps,
5
- DayPickerSingleProps,
6
- } from "react-day-picker";
7
- import { ButtonProps } from "../Button/types";
1
+ import type { DateRange, PropsBase, PropsMulti, PropsRange, PropsSingle } from "react-day-picker";
2
+ import { type ButtonProps } from "../Button/types";
8
3
 
9
- type BaseDatePickerProps = Pick<
10
- ButtonProps,
11
- "variant" | "outline" | "wide" | "size" | "name" | "disabled"
12
- > & {
13
- label?: string;
14
- triggerClassName?: string;
15
- };
4
+ type BaseDatePickerProps = Omit<PropsBase, "mode"> &
5
+ Pick<ButtonProps, "variant" | "outline" | "wide" | "size" | "name" | "disabled"> & {
6
+ label?: string;
7
+ triggerClassName?: string;
8
+ };
16
9
 
17
10
  export type DatePickerProps = BaseDatePickerProps &
18
- Omit<DayPickerSingleProps, "mode"> & {
11
+ Omit<PropsSingle, "mode"> & {
19
12
  children?: ({
20
13
  date,
21
14
  setDate,
@@ -29,22 +22,18 @@ export type DatePickerProps = BaseDatePickerProps &
29
22
  };
30
23
 
31
24
  export type DateRangePickerProps = BaseDatePickerProps &
32
- Omit<DayPickerRangeProps, "mode"> & {
25
+ Omit<PropsRange, "mode"> & {
33
26
  defaultRange?: DateRange;
34
27
  getRangeValue?: (range: DateRange | undefined) => {
35
28
  from: string | undefined;
36
29
  to: string | undefined;
37
30
  };
38
- getRangeLabel?: (
39
- range: DateRange | undefined
40
- ) => string | JSX.Element | undefined;
31
+ getRangeLabel?: (range: DateRange | undefined) => string | JSX.Element | undefined;
41
32
  };
42
33
 
43
34
  export type MultipleDatesPickerProps = BaseDatePickerProps &
44
- Omit<DayPickerMultipleProps, "mode"> & {
35
+ Omit<PropsMulti, "mode"> & {
45
36
  defaultDates?: Date[];
46
37
  getDatesValue?: (dates: Date[] | undefined) => string[] | undefined;
47
- getDatesLabel?: (
48
- dates: Date[] | undefined
49
- ) => string | JSX.Element | undefined;
38
+ getDatesLabel?: (dates: Date[] | undefined) => string | JSX.Element | undefined;
50
39
  };
@@ -1,31 +1,16 @@
1
- import type {
2
- DescriptionProps,
3
- DescriptionTermProps,
4
- DescriptionDetailProps,
5
- } from "./types";
1
+ import type { DescriptionDetailProps, DescriptionProps, DescriptionTermProps } from "./types";
6
2
  import { cn } from "../../utilities";
7
3
 
8
4
  const Description = (props: DescriptionProps) => {
9
- return <dl role="list" {...props} />;
5
+ return <dl {...props} />;
10
6
  };
11
7
 
12
8
  const DescriptionTerm = ({ className, ...props }: DescriptionTermProps) => {
13
- return (
14
- <dt
15
- role="listitem"
16
- className={cn("py-2 text-sm font-semibold", className)}
17
- {...props}
18
- />
19
- );
9
+ return <dt className={cn("py-2 text-sm font-semibold", className)} {...props} />;
20
10
  };
21
11
 
22
12
  const DescriptionDetail = ({ className, ...props }: DescriptionDetailProps) => {
23
- return (
24
- <dd
25
- className={cn("text-base [&:not(:last-child)]:mb-1", className)}
26
- {...props}
27
- />
28
- );
13
+ return <dd className={cn("text-base [&:not(:last-child)]:mb-1", className)} {...props} />;
29
14
  };
30
15
 
31
16
  Description.Term = DescriptionTerm;
@@ -4,13 +4,13 @@ import * as React from "react";
4
4
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5
5
  import { Cross2Icon } from "@radix-ui/react-icons";
6
6
  import type {
7
- DialogProps,
7
+ DialogContentProps,
8
+ DialogDescriptionProps,
8
9
  DialogFooterProps,
9
10
  DialogHeaderProps,
10
- DialogTitleProps,
11
- DialogDescriptionProps,
12
11
  DialogOverlayProps,
13
- DialogContentProps,
12
+ DialogProps,
13
+ DialogTitleProps,
14
14
  } from "./types";
15
15
  import { cn } from "../../utilities";
16
16
  import {
@@ -96,11 +96,7 @@ const DialogTitle = React.forwardRef<
96
96
  React.ElementRef<typeof DialogPrimitive.Title>,
97
97
  DialogTitleProps
98
98
  >(({ className, ...props }, ref) => (
99
- <DialogPrimitive.Title
100
- ref={ref}
101
- className={cn(getDialogTitleClasses(), className)}
102
- {...props}
103
- />
99
+ <DialogPrimitive.Title ref={ref} className={cn(getDialogTitleClasses(), className)} {...props} />
104
100
  ));
105
101
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
106
102
 
@@ -29,17 +29,13 @@ export const getDialogContentClasses = cva(
29
29
  }
30
30
  );
31
31
 
32
- export const getDialogHeaderClasses = cva(
33
- "flex flex-col space-y-1.5 text-center sm:text-left"
34
- );
32
+ export const getDialogHeaderClasses = cva("flex flex-col space-y-1.5 text-center sm:text-left");
35
33
 
36
34
  export const getDialogFooterClasses = cva(
37
35
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2"
38
36
  );
39
37
 
40
- export const getDialogTitleClasses = cva(
41
- "text-lg font-semibold leading-none tracking-tight"
42
- );
38
+ export const getDialogTitleClasses = cva("text-lg font-semibold leading-none tracking-tight");
43
39
 
44
40
  export const getDialogDescriptionClasses = cva("text-sm text-muted-foreground");
45
41
 
@@ -10,23 +10,15 @@ import {
10
10
  getDialogTitleClasses,
11
11
  } from "./constants";
12
12
 
13
- export type DialogProps = React.ComponentPropsWithoutRef<
14
- typeof DialogPrimitive.Root
15
- >;
13
+ export type DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
16
14
 
17
- export type DialogOverlayProps = React.ComponentPropsWithoutRef<
18
- typeof DialogPrimitive.Overlay
19
- > &
15
+ export type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> &
20
16
  VariantProps<typeof getDialogOverlayClasses>;
21
17
 
22
- export type DialogCloseProps = React.ComponentPropsWithoutRef<
23
- typeof DialogPrimitive.Close
24
- > &
18
+ export type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close> &
25
19
  VariantProps<typeof getDialogCloseClasses>;
26
20
 
27
- export type DialogContentProps = React.ComponentPropsWithoutRef<
28
- typeof DialogPrimitive.Content
29
- > &
21
+ export type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &
30
22
  VariantProps<typeof getDialogContentClasses> & {
31
23
  showClose?: boolean;
32
24
  closeProps?: DialogCloseProps;
@@ -38,9 +30,7 @@ export type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement> &
38
30
  export type DialogFooterProps = React.HTMLAttributes<HTMLDivElement> &
39
31
  VariantProps<typeof getDialogFooterClasses>;
40
32
 
41
- export type DialogTitleProps = React.ComponentPropsWithoutRef<
42
- typeof DialogPrimitive.Title
43
- > &
33
+ export type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> &
44
34
  VariantProps<typeof getDialogTitleClasses>;
45
35
 
46
36
  export type DialogDescriptionProps = React.ComponentPropsWithoutRef<
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
 
3
+ import { forwardRef } from "react";
3
4
  import { Drawer as DrawerPrimitive } from "vaul";
4
5
  import { cn } from "../../utilities";
5
- import { forwardRef } from "react";
6
- import { DrawerProps } from "./types";
7
6
  import {
8
7
  getDrawerContentClasses,
9
8
  getDrawerDescriptionClasses,
@@ -12,12 +11,10 @@ import {
12
11
  getDrawerOverlayClasses,
13
12
  getDrawerTitleClasses,
14
13
  } from "./constants";
14
+ import { DrawerProps } from "./types";
15
15
 
16
16
  const Drawer = ({ shouldScaleBackground = true, ...props }: DrawerProps) => (
17
- <DrawerPrimitive.Root
18
- shouldScaleBackground={shouldScaleBackground}
19
- {...props}
20
- />
17
+ <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />
21
18
  );
22
19
  Drawer.displayName = "Drawer";
23
20
 
@@ -57,18 +54,12 @@ const DrawerContent = forwardRef<
57
54
  ));
58
55
  DrawerContent.displayName = "DrawerContent";
59
56
 
60
- const DrawerHeader = ({
61
- className,
62
- ...props
63
- }: React.HTMLAttributes<HTMLDivElement>) => (
57
+ const DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
64
58
  <div className={cn(getDrawerHeaderClasses(), className)} {...props} />
65
59
  );
66
60
  DrawerHeader.displayName = "DrawerHeader";
67
61
 
68
- const DrawerFooter = ({
69
- className,
70
- ...props
71
- }: React.HTMLAttributes<HTMLDivElement>) => (
62
+ const DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
72
63
  <div className={cn(getDrawerFooterClasses(), className)} {...props} />
73
64
  );
74
65
  DrawerFooter.displayName = "DrawerFooter";
@@ -77,11 +68,7 @@ const DrawerTitle = forwardRef<
77
68
  React.ElementRef<typeof DrawerPrimitive.Title>,
78
69
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
79
70
  >(({ className, ...props }, ref) => (
80
- <DrawerPrimitive.Title
81
- ref={ref}
82
- className={cn(getDrawerTitleClasses(), className)}
83
- {...props}
84
- />
71
+ <DrawerPrimitive.Title ref={ref} className={cn(getDrawerTitleClasses(), className)} {...props} />
85
72
  ));
86
73
  DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
87
74
 
@@ -6,14 +6,10 @@ export const getDrawerContentClasses = cva(
6
6
 
7
7
  export const getDrawerDescriptionClasses = cva("text-sm");
8
8
 
9
- export const getDrawerHeaderClasses = cva(
10
- "grid gap-1.5 p-4 text-center sm:text-left"
11
- );
9
+ export const getDrawerHeaderClasses = cva("grid gap-1.5 p-4 text-center sm:text-left");
12
10
 
13
11
  export const getDrawerFooterClasses = cva("mt-auto flex flex-col gap-2 p-4");
14
12
 
15
13
  export const getDrawerOverlayClasses = cva("fixed inset-0 z-50 bg-black/80");
16
14
 
17
- export const getDrawerTitleClasses = cva(
18
- "text-lg font-semibold leading-none tracking-tight"
19
- );
15
+ export const getDrawerTitleClasses = cva("text-lg font-semibold leading-none tracking-tight");
@@ -1,14 +1,10 @@
1
1
  "use client";
2
2
 
3
3
  import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
4
- import { useDropzone, FileRejection } from "react-dropzone";
5
- import { toast } from "sonner";
4
+ import { FileRejection, useDropzone } from "react-dropzone";
6
5
  import { TrashIcon } from "@radix-ui/react-icons";
7
- import type {
8
- DirectionOptions,
9
- FileUploaderInputProps,
10
- FileUploaderProps,
11
- } from "./types";
6
+ import { toast } from "sonner";
7
+ import type { DirectionOptions, FileUploaderInputProps, FileUploaderProps } from "./types";
12
8
  import { cn } from "../../utilities";
13
9
  import { FileUploaderContext } from "./FileUploaderContext";
14
10
  import { useFileUpload } from "./useFileUpload";
@@ -158,9 +154,7 @@ export const FileUploader = ({
158
154
  if (rejectedFiles.length > 0) {
159
155
  for (const rejectedFile of rejectedFiles) {
160
156
  if (rejectedFile.errors[0]?.code === "file-too-large") {
161
- toast.error(
162
- `File is too large. Max size is ${maxSize / 1024 / 1024}MB`
163
- );
157
+ toast.error(`File is too large. Max size is ${maxSize / 1024 / 1024}MB`);
164
158
  break;
165
159
  }
166
160
  if (rejectedFile.errors[0]?.message) {
@@ -183,9 +177,7 @@ export const FileUploader = ({
183
177
  setIsLOF(false);
184
178
  }, [value, maxFiles]);
185
179
 
186
- const opts = dropzoneOptions
187
- ? dropzoneOptions
188
- : { accept, maxFiles, maxSize, multiple };
180
+ const opts = dropzoneOptions ? dropzoneOptions : { accept, maxFiles, maxSize, multiple };
189
181
 
190
182
  const dropzoneState = useDropzone({
191
183
  ...opts,
@@ -226,33 +218,28 @@ export const FileUploader = ({
226
218
 
227
219
  FileUploader.displayName = "FileUploader";
228
220
 
229
- const FileUploaderContent = forwardRef<
230
- HTMLDivElement,
231
- React.HTMLAttributes<HTMLDivElement>
232
- >(({ children, className, ...props }, ref) => {
233
- const { orientation } = useFileUpload();
234
- const containerRef = useRef<HTMLDivElement>(null);
221
+ const FileUploaderContent = forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
222
+ ({ children, className, ...props }, ref) => {
223
+ const { orientation } = useFileUpload();
224
+ const containerRef = useRef<HTMLDivElement>(null);
235
225
 
236
- return (
237
- <div
238
- className={cn("w-full px-1")}
239
- ref={containerRef}
240
- aria-description="content file holder"
241
- >
242
- <div
243
- {...props}
244
- ref={ref}
245
- className={cn(
246
- "flex rounded-xl gap-1",
247
- orientation === "horizontal" ? "flex-raw flex-wrap" : "flex-col",
248
- className
249
- )}
250
- >
251
- {children}
226
+ return (
227
+ <div className={cn("w-full px-1")} ref={containerRef} aria-description="content file holder">
228
+ <div
229
+ {...props}
230
+ ref={ref}
231
+ className={cn(
232
+ "flex rounded-xl gap-1",
233
+ orientation === "horizontal" ? "flex-raw flex-wrap" : "flex-col",
234
+ className
235
+ )}
236
+ >
237
+ {children}
238
+ </div>
252
239
  </div>
253
- </div>
254
- );
255
- });
240
+ );
241
+ }
242
+ );
256
243
 
257
244
  FileUploaderContent.displayName = "FileUploaderContent";
258
245
 
@@ -277,18 +264,14 @@ const FileUploaderItem = forwardRef<
277
264
  </div>
278
265
  <button
279
266
  type="button"
280
- className={cn(
281
- "absolute",
282
- direction === "rtl" ? "top-1 left-1" : "top-1 right-1"
283
- )}
267
+ className={cn("absolute", direction === "rtl" ? "top-1 left-1" : "top-1 right-1")}
284
268
  onClick={() => removeFileFromSet(index)}
285
269
  >
286
270
  <span className="sr-only">remove item {index}</span>
287
271
  <TrashIcon
288
- className={cn(
289
- "w-4 h-4 shrink-0 hover:stroke-destructive duration-200 ease-in-out",
290
- { "text-error": isSelected }
291
- )}
272
+ className={cn("w-4 h-4 shrink-0 hover:stroke-destructive duration-200 ease-in-out", {
273
+ "text-error": isSelected,
274
+ })}
292
275
  />
293
276
  </button>
294
277
  </div>
@@ -297,13 +280,8 @@ const FileUploaderItem = forwardRef<
297
280
 
298
281
  FileUploaderItem.displayName = "FileUploaderItem";
299
282
 
300
- const FileUploaderInput = ({
301
- classes,
302
- children,
303
- ...props
304
- }: FileUploaderInputProps) => {
305
- const { dropzoneState, isFileTooBig, isLOF, hiddenInputRef } =
306
- useFileUpload();
283
+ const FileUploaderInput = ({ classes, children, ...props }: FileUploaderInputProps) => {
284
+ const { dropzoneState, isFileTooBig, isLOF, hiddenInputRef } = useFileUpload();
307
285
  const rootProps = isLOF ? {} : dropzoneState.getRootProps();
308
286
  return (
309
287
  <div {...props} className="relative w-full">
@@ -1,5 +1,4 @@
1
1
  import { createContext } from "react";
2
2
  import { type FileUploaderContextType } from "./types";
3
3
 
4
- export const FileUploaderContext =
5
- createContext<FileUploaderContextType | null>(null);
4
+ export const FileUploaderContext = createContext<FileUploaderContextType | null>(null);
@@ -1,5 +1,5 @@
1
1
  import type { Dispatch, Ref, SetStateAction } from "react";
2
- import type { DropzoneState, DropzoneOptions } from "react-dropzone";
2
+ import type { DropzoneOptions, DropzoneState } from "react-dropzone";
3
3
 
4
4
  export type FileUploaderProps = {
5
5
  value: File[] | null;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
- import { type CheckboxProps } from "./types";
3
- import { getCheckboxClasses } from "./constants";
4
2
  import { cn } from "../../../utilities";
3
+ import { getCheckboxClasses } from "./constants";
4
+ import { type CheckboxProps } from "./types";
5
5
 
6
6
  const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
7
7
  ({ className, size, variant, ...props }, ref) => (
@@ -1,8 +1,5 @@
1
1
  import { type VariantProps } from "../../../libs";
2
2
  import { getCheckboxClasses } from "./constants";
3
3
 
4
- export type CheckboxProps = Omit<
5
- React.HTMLProps<HTMLInputElement>,
6
- "size" | "ref" | "type"
7
- > &
4
+ export type CheckboxProps = Omit<React.HTMLProps<HTMLInputElement>, "size" | "ref" | "type"> &
8
5
  VariantProps<typeof getCheckboxClasses>;
@@ -1,20 +1,14 @@
1
1
  import React from "react";
2
- import { type InputProps } from "./types";
3
2
  import { cn } from "../../../utilities";
4
3
  import { getInputClasses } from "./constants";
4
+ import { type InputProps } from "./types";
5
5
 
6
6
  export const Input = React.forwardRef<HTMLInputElement, InputProps>(
7
- (
8
- { size, variant, wide, outline, className, type, ...props }: InputProps,
9
- ref
10
- ) => (
7
+ ({ size, variant, wide, outline, className, type, ...props }: InputProps, ref) => (
11
8
  <input
12
9
  ref={ref}
13
10
  type={type}
14
- className={cn(
15
- getInputClasses({ type, size, wide, variant, outline }),
16
- className
17
- )}
11
+ className={cn(getInputClasses({ type, size, wide, variant, outline }), className)}
18
12
  {...props}
19
13
  />
20
14
  )
@@ -1,52 +1,49 @@
1
1
  import { cva } from "../../../libs";
2
2
 
3
- export const getInputClasses = cva(
4
- "input rounded-md transition-all duration-100",
5
- {
6
- variants: {
7
- variant: {
8
- default: "bg-transparent",
9
- accent: "input-accent",
10
- error: "input-error",
11
- ghost: "input-ghost",
12
- info: "input-info",
13
- primary: "input-primary",
14
- secondary: "input-secondary",
15
- success: "input-success",
16
- warning: "input-warning",
17
- },
18
- outline: {
19
- true: "input-bordered",
20
- },
21
- wide: {
22
- true: "w-full",
23
- },
24
- size: {
25
- xs: "input-xs",
26
- sm: "input-sm",
27
- md: "input-md",
28
- lg: "input-lg",
29
- },
30
- type: {
31
- ["file" as string]:
32
- "file:border-0 file:bg-transparent file:text-sm file:font-medium file:h-full",
33
- },
34
- },
35
- compoundVariants: [
36
- {
37
- size: undefined,
38
- className: "min-h-fit h-10",
39
- },
40
- {
41
- variant: undefined,
42
- outline: true,
43
- className: "border-neutral-content",
44
- },
45
- {
46
- variant: "default",
47
- outline: true,
48
- className: "border-base-content",
49
- },
50
- ],
51
- }
52
- );
3
+ export const getInputClasses = cva("input rounded-md transition-all duration-100", {
4
+ variants: {
5
+ variant: {
6
+ default: "bg-transparent",
7
+ accent: "input-accent",
8
+ error: "input-error",
9
+ ghost: "input-ghost",
10
+ info: "input-info",
11
+ primary: "input-primary",
12
+ secondary: "input-secondary",
13
+ success: "input-success",
14
+ warning: "input-warning",
15
+ },
16
+ outline: {
17
+ true: "input-bordered",
18
+ },
19
+ wide: {
20
+ true: "w-full",
21
+ },
22
+ size: {
23
+ xs: "input-xs",
24
+ sm: "input-sm",
25
+ md: "input-md",
26
+ lg: "input-lg",
27
+ },
28
+ type: {
29
+ ["file" as string]:
30
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium file:h-full",
31
+ },
32
+ },
33
+ compoundVariants: [
34
+ {
35
+ size: undefined,
36
+ className: "min-h-fit h-10",
37
+ },
38
+ {
39
+ variant: undefined,
40
+ outline: true,
41
+ className: "border-neutral-content",
42
+ },
43
+ {
44
+ variant: "default",
45
+ outline: true,
46
+ className: "border-base-content",
47
+ },
48
+ ],
49
+ });
@@ -1,8 +1,5 @@
1
1
  import { type VariantProps } from "../../../libs";
2
2
  import { getInputClasses } from "./constants";
3
3
 
4
- export type InputProps = Omit<
5
- React.HTMLProps<HTMLInputElement>,
6
- "size" | "ref"
7
- > &
4
+ export type InputProps = Omit<React.HTMLProps<HTMLInputElement>, "size" | "ref"> &
8
5
  Omit<VariantProps<typeof getInputClasses>, "type">;
@@ -1,14 +1,10 @@
1
+ import { useState } from "react";
1
2
  import OTPInput from "react-otp-input";
2
- import { type OtpInputProps } from "./types";
3
- import { Input } from "../Input";
4
3
  import { cn } from "../../../utilities";
5
- import { useState } from "react";
4
+ import { Input } from "../Input";
5
+ import { type OtpInputProps } from "./types";
6
6
 
7
- export const OtpInput = ({
8
- className,
9
- inputProps,
10
- ...props
11
- }: OtpInputProps) => {
7
+ export const OtpInput = ({ className, inputProps, ...props }: OtpInputProps) => {
12
8
  const [otp, setOtp] = useState("");
13
9
 
14
10
  return (
@@ -20,10 +16,7 @@ export const OtpInput = ({
20
16
  <Input
21
17
  {...inputProps}
22
18
  {...renderProps}
23
- className={cn(
24
- "!w-12 !appearance-none selection:bg-base text-base-content",
25
- className
26
- )}
19
+ className={cn("!w-12 !appearance-none selection:bg-base text-base-content", className)}
27
20
  />
28
21
  )}
29
22
  containerStyle={`flex justify-center items-center flex-wrap text-2xl font-bold ${