gladvn 0.2.17 → 0.2.18

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 (313) hide show
  1. package/bin/cli.js +9 -6
  2. package/dist/components/macro/accordion-preset.d.ts.map +1 -1
  3. package/dist/components/macro/alert-dialog-preset.d.ts.map +1 -1
  4. package/dist/components/macro/alert-preset.d.ts.map +1 -1
  5. package/dist/components/macro/avatar-preset.d.ts.map +1 -1
  6. package/dist/components/macro/breadcrumb-preset.d.ts.map +1 -1
  7. package/dist/components/macro/card-preset.d.ts.map +1 -1
  8. package/dist/components/macro/carousel-preset.d.ts.map +1 -1
  9. package/dist/components/macro/checkbox-preset.d.ts.map +1 -1
  10. package/dist/components/macro/combobox-preset.d.ts.map +1 -1
  11. package/dist/components/macro/command-preset.d.ts +1 -1
  12. package/dist/components/macro/command-preset.d.ts.map +1 -1
  13. package/dist/components/macro/date-picker.d.ts.map +1 -1
  14. package/dist/components/macro/dialog-preset.d.ts.map +1 -1
  15. package/dist/components/macro/empty-preset.d.ts.map +1 -1
  16. package/dist/components/macro/field-preset.d.ts.map +1 -1
  17. package/dist/components/macro/input-otp-preset.d.ts +6 -0
  18. package/dist/components/macro/input-otp-preset.d.ts.map +1 -1
  19. package/dist/components/macro/input-preset.d.ts +1 -1
  20. package/dist/components/macro/input-preset.d.ts.map +1 -1
  21. package/dist/components/macro/pagination-preset.d.ts.map +1 -1
  22. package/dist/components/macro/progress-preset.d.ts.map +1 -1
  23. package/dist/components/macro/radio-group-preset.d.ts.map +1 -1
  24. package/dist/components/macro/select-preset.d.ts.map +1 -1
  25. package/dist/components/macro/slider-preset.d.ts.map +1 -1
  26. package/dist/components/macro/switch-preset.d.ts.map +1 -1
  27. package/dist/components/macro/tabs-preset.d.ts +1 -1
  28. package/dist/components/macro/tabs-preset.d.ts.map +1 -1
  29. package/dist/components/macro/textarea-preset.d.ts +1 -1
  30. package/dist/components/macro/textarea-preset.d.ts.map +1 -1
  31. package/dist/components/micro/accordion.d.ts +7 -0
  32. package/dist/components/micro/accordion.d.ts.map +1 -1
  33. package/dist/components/micro/alert-dialog.d.ts.map +1 -1
  34. package/dist/components/micro/alert.d.ts +7 -0
  35. package/dist/components/micro/alert.d.ts.map +1 -1
  36. package/dist/components/micro/aspect-ratio.d.ts +7 -0
  37. package/dist/components/micro/aspect-ratio.d.ts.map +1 -1
  38. package/dist/components/micro/avatar.d.ts.map +1 -1
  39. package/dist/components/micro/badge.d.ts +8 -1
  40. package/dist/components/micro/badge.d.ts.map +1 -1
  41. package/dist/components/micro/breadcrumb.d.ts +7 -0
  42. package/dist/components/micro/breadcrumb.d.ts.map +1 -1
  43. package/dist/components/micro/button.d.ts +8 -1
  44. package/dist/components/micro/button.d.ts.map +1 -1
  45. package/dist/components/micro/calendar.d.ts +2 -2
  46. package/dist/components/micro/calendar.d.ts.map +1 -1
  47. package/dist/components/micro/carousel.d.ts.map +1 -1
  48. package/dist/components/micro/chart.d.ts.map +1 -1
  49. package/dist/components/micro/checkbox.d.ts.map +1 -1
  50. package/dist/components/micro/collapsible.d.ts.map +1 -1
  51. package/dist/components/micro/combobox.d.ts.map +1 -1
  52. package/dist/components/micro/command.d.ts.map +1 -1
  53. package/dist/components/micro/context-menu.d.ts.map +1 -1
  54. package/dist/components/micro/dialog.d.ts.map +1 -1
  55. package/dist/components/micro/drawer.d.ts.map +1 -1
  56. package/dist/components/micro/dropdown-menu.d.ts.map +1 -1
  57. package/dist/components/micro/empty.d.ts +7 -0
  58. package/dist/components/micro/empty.d.ts.map +1 -1
  59. package/dist/components/micro/field.d.ts.map +1 -1
  60. package/dist/components/micro/hover-card.d.ts +1 -1
  61. package/dist/components/micro/hover-card.d.ts.map +1 -1
  62. package/dist/components/micro/input-group.d.ts.map +1 -1
  63. package/dist/components/micro/input-otp.d.ts.map +1 -1
  64. package/dist/components/micro/input.d.ts +7 -0
  65. package/dist/components/micro/input.d.ts.map +1 -1
  66. package/dist/components/micro/item.d.ts.map +1 -1
  67. package/dist/components/micro/label.d.ts.map +1 -1
  68. package/dist/components/micro/menubar.d.ts.map +1 -1
  69. package/dist/components/micro/navigation-menu.d.ts +8 -1
  70. package/dist/components/micro/navigation-menu.d.ts.map +1 -1
  71. package/dist/components/micro/pagination.d.ts.map +1 -1
  72. package/dist/components/micro/popover.d.ts.map +1 -1
  73. package/dist/components/micro/progress.d.ts.map +1 -1
  74. package/dist/components/micro/radio-group.d.ts.map +1 -1
  75. package/dist/components/micro/select.d.ts +1 -1
  76. package/dist/components/micro/select.d.ts.map +1 -1
  77. package/dist/components/micro/sheet.d.ts.map +1 -1
  78. package/dist/components/micro/sidebar.d.ts.map +1 -1
  79. package/dist/components/micro/skeleton.d.ts +7 -0
  80. package/dist/components/micro/skeleton.d.ts.map +1 -1
  81. package/dist/components/micro/slider.d.ts +7 -0
  82. package/dist/components/micro/slider.d.ts.map +1 -1
  83. package/dist/components/micro/sonner.d.ts.map +1 -1
  84. package/dist/components/micro/spinner.d.ts.map +1 -1
  85. package/dist/components/micro/switch.d.ts.map +1 -1
  86. package/dist/components/micro/table.d.ts.map +1 -1
  87. package/dist/components/micro/tabs.d.ts +1 -1
  88. package/dist/components/micro/tabs.d.ts.map +1 -1
  89. package/dist/components/micro/textarea.d.ts +7 -0
  90. package/dist/components/micro/textarea.d.ts.map +1 -1
  91. package/dist/components/micro/toggle-group.d.ts.map +1 -1
  92. package/dist/components/micro/toggle.d.ts.map +1 -1
  93. package/dist/components/micro/tooltip.d.ts +1 -1
  94. package/dist/components/micro/tooltip.d.ts.map +1 -1
  95. package/dist/dev/App.d.ts.map +1 -1
  96. package/dist/dev/components/code-highlighter.d.ts.map +1 -1
  97. package/dist/dev/components/dev-context.d.ts.map +1 -1
  98. package/dist/dev/components/showcase.d.ts +1 -1
  99. package/dist/dev/components/showcase.d.ts.map +1 -1
  100. package/dist/dev/data.d.ts.map +1 -1
  101. package/dist/dev/main.d.ts.map +1 -1
  102. package/dist/dev/sections/buttons.d.ts.map +1 -1
  103. package/dist/dev/sections/feedback.d.ts.map +1 -1
  104. package/dist/dev/sections/overview.d.ts.map +1 -1
  105. package/dist/dev/showcase/accordion.d.ts.map +1 -1
  106. package/dist/dev/showcase/alert-dialog.d.ts.map +1 -1
  107. package/dist/dev/showcase/alert.d.ts.map +1 -1
  108. package/dist/dev/showcase/aspect-ratio.d.ts.map +1 -1
  109. package/dist/dev/showcase/avatar.d.ts.map +1 -1
  110. package/dist/dev/showcase/breadcrumb.d.ts.map +1 -1
  111. package/dist/dev/showcase/button.d.ts.map +1 -1
  112. package/dist/dev/showcase/calendar.d.ts.map +1 -1
  113. package/dist/dev/showcase/card.d.ts.map +1 -1
  114. package/dist/dev/showcase/carousel.d.ts.map +1 -1
  115. package/dist/dev/showcase/chart.d.ts.map +1 -1
  116. package/dist/dev/showcase/checkbox.d.ts.map +1 -1
  117. package/dist/dev/showcase/collapsible.d.ts.map +1 -1
  118. package/dist/dev/showcase/combobox.d.ts.map +1 -1
  119. package/dist/dev/showcase/command.d.ts.map +1 -1
  120. package/dist/dev/showcase/context-menu.d.ts.map +1 -1
  121. package/dist/dev/showcase/dialog.d.ts.map +1 -1
  122. package/dist/dev/showcase/drawer.d.ts.map +1 -1
  123. package/dist/dev/showcase/dropdown-menu.d.ts.map +1 -1
  124. package/dist/dev/showcase/empty.d.ts.map +1 -1
  125. package/dist/dev/showcase/hover-card.d.ts.map +1 -1
  126. package/dist/dev/showcase/input-group.d.ts.map +1 -1
  127. package/dist/dev/showcase/input-otp.d.ts.map +1 -1
  128. package/dist/dev/showcase/input.d.ts.map +1 -1
  129. package/dist/dev/showcase/item.d.ts.map +1 -1
  130. package/dist/dev/showcase/kbd.d.ts.map +1 -1
  131. package/dist/dev/showcase/label.d.ts.map +1 -1
  132. package/dist/dev/showcase/menubar.d.ts.map +1 -1
  133. package/dist/dev/showcase/navigation-menu.d.ts.map +1 -1
  134. package/dist/dev/showcase/overview.d.ts.map +1 -1
  135. package/dist/dev/showcase/pagination.d.ts.map +1 -1
  136. package/dist/dev/showcase/popover.d.ts.map +1 -1
  137. package/dist/dev/showcase/progress.d.ts.map +1 -1
  138. package/dist/dev/showcase/radio-group.d.ts.map +1 -1
  139. package/dist/dev/showcase/resizable.d.ts.map +1 -1
  140. package/dist/dev/showcase/scroll-area.d.ts.map +1 -1
  141. package/dist/dev/showcase/select.d.ts.map +1 -1
  142. package/dist/dev/showcase/separator.d.ts.map +1 -1
  143. package/dist/dev/showcase/sheet.d.ts.map +1 -1
  144. package/dist/dev/showcase/sidebar.d.ts.map +1 -1
  145. package/dist/dev/showcase/skeleton.d.ts.map +1 -1
  146. package/dist/dev/showcase/slider.d.ts.map +1 -1
  147. package/dist/dev/showcase/sonner.d.ts.map +1 -1
  148. package/dist/dev/showcase/spinner.d.ts.map +1 -1
  149. package/dist/dev/showcase/switch.d.ts.map +1 -1
  150. package/dist/dev/showcase/table.d.ts.map +1 -1
  151. package/dist/dev/showcase/tabs.d.ts.map +1 -1
  152. package/dist/dev/showcase/textarea.d.ts.map +1 -1
  153. package/dist/dev/showcase/theme-provider.d.ts.map +1 -1
  154. package/dist/dev/showcase/toast.d.ts.map +1 -1
  155. package/dist/dev/showcase/toggle-group.d.ts.map +1 -1
  156. package/dist/dev/showcase/toggle.d.ts.map +1 -1
  157. package/dist/dev/showcase/tooltip.d.ts.map +1 -1
  158. package/dist/index.cjs.map +1 -1
  159. package/dist/index.js.map +1 -1
  160. package/dist/lib/utils.d.ts.map +1 -1
  161. package/package.json +3 -1
  162. package/scripts/format-codestrings.ts +87 -0
  163. package/scripts/organize-imports.ts +21 -0
  164. package/scripts/regex-format.cjs +67 -0
  165. package/scripts/tmp.tsx +25 -0
  166. package/src/components/macro/accordion-preset.test.tsx +1 -0
  167. package/src/components/macro/accordion-preset.tsx +2 -1
  168. package/src/components/macro/alert-dialog-preset.tsx +44 -43
  169. package/src/components/macro/alert-preset.tsx +7 -3
  170. package/src/components/macro/avatar-preset.tsx +2 -1
  171. package/src/components/macro/breadcrumb-preset.tsx +2 -1
  172. package/src/components/macro/card-preset.tsx +2 -1
  173. package/src/components/macro/carousel-preset.tsx +5 -2
  174. package/src/components/macro/checkbox-preset.test.tsx +1 -0
  175. package/src/components/macro/checkbox-preset.tsx +6 -2
  176. package/src/components/macro/combobox-preset.tsx +6 -3
  177. package/src/components/macro/command-preset.tsx +7 -3
  178. package/src/components/macro/date-picker.tsx +77 -59
  179. package/src/components/macro/dialog-preset.tsx +42 -38
  180. package/src/components/macro/empty-preset.tsx +2 -1
  181. package/src/components/macro/field-preset.test.tsx +1 -0
  182. package/src/components/macro/field-preset.tsx +2 -1
  183. package/src/components/macro/input-otp-preset.tsx +6 -2
  184. package/src/components/macro/input-preset.test.tsx +1 -0
  185. package/src/components/macro/input-preset.tsx +4 -2
  186. package/src/components/macro/pagination-preset.tsx +3 -1
  187. package/src/components/macro/progress-preset.test.tsx +1 -0
  188. package/src/components/macro/progress-preset.tsx +2 -1
  189. package/src/components/macro/radio-group-preset.tsx +4 -1
  190. package/src/components/macro/select-preset.tsx +35 -30
  191. package/src/components/macro/slider-preset.test.tsx +1 -0
  192. package/src/components/macro/slider-preset.tsx +4 -1
  193. package/src/components/macro/switch-preset.test.tsx +1 -0
  194. package/src/components/macro/switch-preset.tsx +4 -1
  195. package/src/components/macro/tabs-preset.test.tsx +1 -0
  196. package/src/components/macro/tabs-preset.tsx +4 -2
  197. package/src/components/macro/textarea-preset.test.tsx +1 -0
  198. package/src/components/macro/textarea-preset.tsx +4 -1
  199. package/src/components/micro/accordion.tsx +3 -2
  200. package/src/components/micro/alert-dialog.tsx +2 -1
  201. package/src/components/micro/alert.tsx +3 -2
  202. package/src/components/micro/aspect-ratio.tsx +2 -1
  203. package/src/components/micro/avatar.tsx +2 -1
  204. package/src/components/micro/badge.tsx +3 -3
  205. package/src/components/micro/breadcrumb.tsx +3 -2
  206. package/src/components/micro/button.test.tsx +1 -0
  207. package/src/components/micro/button.tsx +3 -3
  208. package/src/components/micro/calendar.tsx +10 -9
  209. package/src/components/micro/carousel.tsx +3 -2
  210. package/src/components/micro/chart.tsx +1 -0
  211. package/src/components/micro/checkbox.tsx +2 -2
  212. package/src/components/micro/collapsible.tsx +4 -2
  213. package/src/components/micro/combobox.tsx +41 -29
  214. package/src/components/micro/command.tsx +23 -16
  215. package/src/components/micro/context-menu.tsx +3 -2
  216. package/src/components/micro/dialog.tsx +2 -1
  217. package/src/components/micro/drawer.tsx +2 -1
  218. package/src/components/micro/dropdown-menu.tsx +3 -2
  219. package/src/components/micro/empty.tsx +2 -1
  220. package/src/components/micro/field.tsx +4 -3
  221. package/src/components/micro/hover-card.tsx +20 -19
  222. package/src/components/micro/input-group.tsx +2 -1
  223. package/src/components/micro/input-otp.tsx +3 -2
  224. package/src/components/micro/input.tsx +3 -2
  225. package/src/components/micro/item.tsx +1 -0
  226. package/src/components/micro/label.tsx +2 -1
  227. package/src/components/micro/menubar.tsx +2 -1
  228. package/src/components/micro/navigation-menu.tsx +18 -17
  229. package/src/components/micro/pagination.tsx +2 -1
  230. package/src/components/micro/popover.tsx +2 -1
  231. package/src/components/micro/progress.tsx +2 -1
  232. package/src/components/micro/radio-group.tsx +3 -3
  233. package/src/components/micro/select.tsx +5 -4
  234. package/src/components/micro/sheet.tsx +2 -1
  235. package/src/components/micro/sidebar.tsx +4 -1
  236. package/src/components/micro/skeleton.tsx +2 -1
  237. package/src/components/micro/slider.tsx +4 -1
  238. package/src/components/micro/sonner.tsx +2 -1
  239. package/src/components/micro/spinner.tsx +1 -2
  240. package/src/components/micro/switch.tsx +2 -2
  241. package/src/components/micro/table.tsx +2 -1
  242. package/src/components/micro/tabs.tsx +4 -3
  243. package/src/components/micro/textarea.tsx +2 -1
  244. package/src/components/micro/toggle-group.tsx +1 -0
  245. package/src/components/micro/toggle.tsx +1 -3
  246. package/src/components/micro/tooltip.tsx +9 -3
  247. package/src/dev/App.tsx +66 -41
  248. package/src/dev/components/code-highlighter.tsx +2 -1
  249. package/src/dev/components/dev-context.tsx +1 -0
  250. package/src/dev/components/showcase.tsx +13 -14
  251. package/src/dev/data.ts +206 -52
  252. package/src/dev/main.tsx +4 -4
  253. package/src/dev/sections/buttons.tsx +14 -12
  254. package/src/dev/sections/feedback.tsx +7 -2
  255. package/src/dev/sections/forms.tsx +11 -11
  256. package/src/dev/sections/overview.tsx +2 -1
  257. package/src/dev/showcase/accordion.tsx +399 -314
  258. package/src/dev/showcase/alert-dialog.tsx +387 -384
  259. package/src/dev/showcase/alert.tsx +271 -258
  260. package/src/dev/showcase/aspect-ratio.tsx +102 -105
  261. package/src/dev/showcase/avatar.tsx +216 -145
  262. package/src/dev/showcase/badge.tsx +78 -50
  263. package/src/dev/showcase/breadcrumb.tsx +88 -85
  264. package/src/dev/showcase/button.tsx +72 -96
  265. package/src/dev/showcase/calendar.tsx +41 -39
  266. package/src/dev/showcase/card.tsx +170 -148
  267. package/src/dev/showcase/carousel.tsx +239 -77
  268. package/src/dev/showcase/chart.tsx +5 -4
  269. package/src/dev/showcase/checkbox.tsx +206 -140
  270. package/src/dev/showcase/collapsible.tsx +108 -84
  271. package/src/dev/showcase/combobox.tsx +272 -199
  272. package/src/dev/showcase/command.tsx +31 -28
  273. package/src/dev/showcase/context-menu.tsx +94 -77
  274. package/src/dev/showcase/dialog.tsx +445 -424
  275. package/src/dev/showcase/drawer.tsx +142 -135
  276. package/src/dev/showcase/dropdown-menu.tsx +165 -161
  277. package/src/dev/showcase/empty.tsx +173 -158
  278. package/src/dev/showcase/hover-card.tsx +92 -52
  279. package/src/dev/showcase/input-group.tsx +193 -160
  280. package/src/dev/showcase/input-otp.tsx +109 -99
  281. package/src/dev/showcase/input.tsx +78 -42
  282. package/src/dev/showcase/item.tsx +101 -98
  283. package/src/dev/showcase/kbd.tsx +78 -62
  284. package/src/dev/showcase/label.tsx +16 -23
  285. package/src/dev/showcase/menubar.tsx +274 -251
  286. package/src/dev/showcase/navigation-menu.tsx +175 -170
  287. package/src/dev/showcase/overview.tsx +164 -148
  288. package/src/dev/showcase/pagination.tsx +101 -69
  289. package/src/dev/showcase/popover.tsx +113 -86
  290. package/src/dev/showcase/progress.tsx +99 -69
  291. package/src/dev/showcase/radio-group.tsx +217 -134
  292. package/src/dev/showcase/resizable.tsx +65 -55
  293. package/src/dev/showcase/scroll-area.tsx +32 -22
  294. package/src/dev/showcase/select.tsx +192 -136
  295. package/src/dev/showcase/separator.tsx +28 -24
  296. package/src/dev/showcase/sheet.tsx +182 -134
  297. package/src/dev/showcase/sidebar.tsx +9 -5
  298. package/src/dev/showcase/skeleton.tsx +54 -59
  299. package/src/dev/showcase/slider.tsx +158 -129
  300. package/src/dev/showcase/sonner.tsx +3 -5
  301. package/src/dev/showcase/spinner.tsx +22 -18
  302. package/src/dev/showcase/switch.tsx +207 -110
  303. package/src/dev/showcase/table.tsx +44 -32
  304. package/src/dev/showcase/tabs.tsx +272 -267
  305. package/src/dev/showcase/textarea.tsx +162 -116
  306. package/src/dev/showcase/theme-provider.tsx +596 -534
  307. package/src/dev/showcase/toast.tsx +37 -38
  308. package/src/dev/showcase/toggle-group.tsx +87 -39
  309. package/src/dev/showcase/toggle.tsx +36 -27
  310. package/src/dev/showcase/tooltip.tsx +154 -119
  311. package/src/lib/utils.test.ts +1 -0
  312. package/src/lib/utils.ts +1 -1
  313. package/src/styles/gladvn.css +1 -1
@@ -5,9 +5,10 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
- import { cn } from "../../lib/utils";
9
8
  import * as React from "react";
10
9
 
10
+ import { cn } from "../../lib/utils";
11
+
11
12
  /**
12
13
  * @description Displays content within a desired ratio.
13
14
  * @example
@@ -7,9 +7,10 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
11
10
  import * as React from "react";
12
11
 
12
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
13
+
13
14
  import { type Size } from "../../lib/types";
14
15
  import { cn } from "../../lib/utils";
15
16
 
@@ -5,9 +5,11 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
+ import * as React from "react";
9
+
8
10
  import { mergeProps } from "@base-ui/react/merge-props";
9
11
  import { useRender } from "@base-ui/react/use-render";
10
- import { cva, type VariantProps } from "class-variance-authority";
12
+ import { type VariantProps, cva } from "class-variance-authority";
11
13
 
12
14
  import { cn } from "../../lib/utils";
13
15
 
@@ -169,8 +171,6 @@ const badgeVariants = cva(
169
171
  },
170
172
  );
171
173
 
172
- import * as React from "react";
173
-
174
174
  /**
175
175
  * @description Displays a badge or a component that looks like a badge.
176
176
  * @example
@@ -5,12 +5,13 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
+ import * as React from "react";
9
+
8
10
  import { mergeProps } from "@base-ui/react/merge-props";
9
11
  import { useRender } from "@base-ui/react/use-render";
10
- import * as React from "react";
12
+ import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
11
13
 
12
14
  import { cn } from "../../lib/utils";
13
- import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
14
15
 
15
16
  /**
16
17
  * @description Displays the path to the current resource using a hierarchy of links.
@@ -1,5 +1,6 @@
1
1
  import { render, screen } from "@testing-library/react";
2
2
  import { describe, expect, it } from "vitest";
3
+
3
4
  import { Button } from "./button";
4
5
 
5
6
  describe("Button", () => {
@@ -5,10 +5,12 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
+ import * as React from "react";
9
+
8
10
  import { Button as ButtonPrimitive } from "@base-ui/react/button";
9
11
  import { mergeProps } from "@base-ui/react/merge-props";
10
12
  import { useRender } from "@base-ui/react/use-render";
11
- import { cva, type VariantProps } from "class-variance-authority";
13
+ import { type VariantProps, cva } from "class-variance-authority";
12
14
 
13
15
  import { cn } from "../../lib/utils";
14
16
 
@@ -291,8 +293,6 @@ const buttonVariants = cva(
291
293
  },
292
294
  );
293
295
 
294
- import * as React from "react";
295
-
296
296
  /**
297
297
  * @description Displays a button or a component that looks like a button.
298
298
  * @example
@@ -7,14 +7,19 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { type Size } from "../../lib/types";
11
- import { cva, type VariantProps } from "class-variance-authority";
12
10
  import * as React from "react";
11
+
12
+ import { type VariantProps, cva } from "class-variance-authority";
13
+ import {
14
+ ChevronDownIcon,
15
+ ChevronLeftIcon,
16
+ ChevronRightIcon,
17
+ } from "lucide-react";
13
18
  import {
14
- DayPicker,
15
- getDefaultClassNames,
16
19
  type DayButton,
20
+ DayPicker,
17
21
  type Locale,
22
+ getDefaultClassNames,
18
23
  } from "react-day-picker";
19
24
 
20
25
  import { buttonVariants } from "../../components/micro/button";
@@ -24,12 +29,8 @@ import {
24
29
  SelectItem,
25
30
  SelectTrigger,
26
31
  } from "../../components/micro/select";
32
+ import { type Size } from "../../lib/types";
27
33
  import { cn } from "../../lib/utils";
28
- import {
29
- ChevronDownIcon,
30
- ChevronLeftIcon,
31
- ChevronRightIcon,
32
- } from "lucide-react";
33
34
 
34
35
  function getDropdownLabel(
35
36
  options: Array<{ value: number | string; label: string }> | undefined,
@@ -7,13 +7,14 @@
7
7
  */
8
8
  "use client";
9
9
 
10
+ import * as React from "react";
11
+
10
12
  import useEmblaCarousel, {
11
13
  type UseEmblaCarouselType,
12
14
  } from "embla-carousel-react";
13
- import * as React from "react";
15
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
14
16
 
15
17
  import { cn } from "../../lib/utils";
16
- import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
17
18
 
18
19
  type CarouselApi = UseEmblaCarouselType[1];
19
20
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
@@ -8,6 +8,7 @@
8
8
  "use client";
9
9
 
10
10
  import * as React from "react";
11
+
11
12
  import type { TooltipValueType } from "recharts";
12
13
  import * as RechartsPrimitive from "recharts";
13
14
 
@@ -7,10 +7,10 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
11
10
  import * as React from "react";
12
11
 
13
- import { cva, type VariantProps } from "class-variance-authority";
12
+ import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
13
+ import { type VariantProps, cva } from "class-variance-authority";
14
14
 
15
15
  import { type Size } from "../../lib/types";
16
16
  import { cn } from "../../lib/utils";
@@ -7,10 +7,12 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { cn } from "../../lib/utils";
11
- import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
12
10
  import * as React from "react";
13
11
 
12
+ import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
13
+
14
+ import { cn } from "../../lib/utils";
15
+
14
16
  /**
15
17
  * @description An interactive component which expands/collapses a panel.
16
18
  * @requires CollapsibleTrigger, CollapsibleContent
@@ -14,13 +14,14 @@
14
14
  */
15
15
  "use client";
16
16
 
17
- import { Combobox as ComboboxPrimitive } from "@base-ui/react";
18
17
  import * as React from "react";
19
18
 
19
+ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
20
+ import { type VariantProps, cva } from "class-variance-authority";
21
+ import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
22
+
20
23
  import { InputGroupButton } from "../../components/micro/input-group";
21
- import { ThemeWrapper } from "../../components/micro/theme-provider";
22
24
  import { cn } from "../../lib/utils";
23
- import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
24
25
 
25
26
  const ComboboxContext = React.createContext<{
26
27
  anchor: Element | null;
@@ -98,30 +99,43 @@ const ComboboxContent = React.forwardRef<
98
99
  ComboboxPrimitive.Positioner.Props,
99
100
  "side" | "align" | "sideOffset" | "alignOffset" | "anchor"
100
101
  >
101
- >(({ className, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, anchor, ...props }, ref) => {
102
- const { anchor: contextAnchor } = React.useContext(ComboboxContext);
103
- return (
104
- <ComboboxPrimitive.Positioner
105
- side={side}
106
- sideOffset={sideOffset}
107
- align={align}
108
- alignOffset={alignOffset}
109
- anchor={anchor || contextAnchor}
110
- className="isolate z-50"
111
- >
112
- <ComboboxPrimitive.Popup
113
- ref={ref}
114
- data-slot="combobox-content"
115
- data-chips={!!anchor}
116
- className={cn(
117
- "group/combobox-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 p-1 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[data-slot=input-group]]:mb-1 [&_[data-slot=input-group]]:w-full [&_[data-slot=input-group]]:border-input/30 [&_[data-slot=input-group]]:bg-input/30 [&_[data-slot=input-group]]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
118
- className,
119
- )}
120
- {...props}
121
- />
122
- </ComboboxPrimitive.Positioner>
123
- );
124
- });
102
+ >(
103
+ (
104
+ {
105
+ className,
106
+ side = "bottom",
107
+ sideOffset = 4,
108
+ align = "start",
109
+ alignOffset = 0,
110
+ anchor,
111
+ ...props
112
+ },
113
+ ref,
114
+ ) => {
115
+ const { anchor: contextAnchor } = React.useContext(ComboboxContext);
116
+ return (
117
+ <ComboboxPrimitive.Positioner
118
+ side={side}
119
+ sideOffset={sideOffset}
120
+ align={align}
121
+ alignOffset={alignOffset}
122
+ anchor={anchor || contextAnchor}
123
+ className="isolate z-50"
124
+ >
125
+ <ComboboxPrimitive.Popup
126
+ ref={ref}
127
+ data-slot="combobox-content"
128
+ data-chips={!!anchor}
129
+ className={cn(
130
+ "group/combobox-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 p-1 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[data-slot=input-group]]:mb-1 [&_[data-slot=input-group]]:w-full [&_[data-slot=input-group]]:border-input/30 [&_[data-slot=input-group]]:bg-input/30 [&_[data-slot=input-group]]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
131
+ className,
132
+ )}
133
+ {...props}
134
+ />
135
+ </ComboboxPrimitive.Positioner>
136
+ );
137
+ },
138
+ );
125
139
  ComboboxContent.displayName = "ComboboxContent";
126
140
 
127
141
  function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
@@ -220,8 +234,6 @@ function ComboboxSeparator({
220
234
 
221
235
  const ComboboxPortal = ComboboxPrimitive.Portal;
222
236
 
223
- import { cva, type VariantProps } from "class-variance-authority";
224
-
225
237
  const comboboxChipsVariants = cva(
226
238
  "group/combobox-chips flex flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:focus-within:ring-3 has-aria-invalid:focus-within:ring-destructive/20 has-[[data-slot=combobox-chip]]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:focus-within:ring-destructive/40 has-disabled:opacity-50 has-disabled:cursor-not-allowed has-disabled:pointer-events-none",
227
239
  {
@@ -7,14 +7,18 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { Command as CommandPrimitive } from "cmdk";
11
10
  import * as React from "react";
12
- import { cva, type VariantProps } from "class-variance-authority";
13
11
 
14
- import { InputGroup, InputGroupAddon } from "../../components/micro/input-group";
15
- import { cn } from "../../lib/utils";
12
+ import { cva } from "class-variance-authority";
13
+ import { Command as CommandPrimitive } from "cmdk";
16
14
  import { SearchIcon } from "lucide-react";
15
+
16
+ import {
17
+ InputGroup,
18
+ InputGroupAddon,
19
+ } from "../../components/micro/input-group";
17
20
  import { type Size } from "../../lib/types";
21
+ import { cn } from "../../lib/utils";
18
22
 
19
23
  const CommandContext = React.createContext<{ size: Size }>({ size: "md" });
20
24
 
@@ -38,7 +42,6 @@ const Command = React.forwardRef<
38
42
  ));
39
43
  Command.displayName = "Command";
40
44
 
41
-
42
45
  const commandInputVariants = cva(
43
46
  "w-full outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
44
47
  {
@@ -52,7 +55,7 @@ const commandInputVariants = cva(
52
55
  defaultVariants: {
53
56
  size: "md",
54
57
  },
55
- }
58
+ },
56
59
  );
57
60
 
58
61
  const CommandInput = React.forwardRef<
@@ -61,21 +64,21 @@ const CommandInput = React.forwardRef<
61
64
  >(({ className, ...props }, ref) => {
62
65
  const { size } = React.useContext(CommandContext);
63
66
  return (
64
- <div
65
- data-slot="command-input-wrapper"
67
+ <div
68
+ data-slot="command-input-wrapper"
66
69
  className={cn(
67
70
  "pb-0",
68
71
  size === "sm" && "p-1",
69
72
  size === "md" && "p-2",
70
- size === "lg" && "p-3"
73
+ size === "lg" && "p-3",
71
74
  )}
72
75
  >
73
- <InputGroup
76
+ <InputGroup
74
77
  className={cn(
75
78
  "rounded-lg border-input/30 bg-input/30 shadow-none",
76
79
  size === "sm" && "h-8",
77
80
  size === "md" && "h-10",
78
- size === "lg" && "h-11"
81
+ size === "lg" && "h-11",
79
82
  )}
80
83
  >
81
84
  <CommandPrimitive.Input
@@ -84,8 +87,12 @@ const CommandInput = React.forwardRef<
84
87
  className={cn(commandInputVariants({ size }), className)}
85
88
  {...props}
86
89
  />
87
- <InputGroupAddon className={cn("shrink-0", size === "lg" ? "pl-3" : "pl-2")}>
88
- <SearchIcon className={cn("opacity-50", size === "lg" ? "size-5" : "size-4")} />
90
+ <InputGroupAddon
91
+ className={cn("shrink-0", size === "lg" ? "pl-3" : "pl-2")}
92
+ >
93
+ <SearchIcon
94
+ className={cn("opacity-50", size === "lg" ? "size-5" : "size-4")}
95
+ />
89
96
  </InputGroupAddon>
90
97
  </InputGroup>
91
98
  </div>
@@ -123,7 +130,7 @@ const CommandEmpty = React.forwardRef<
123
130
  size === "sm" && "py-4 text-xs",
124
131
  size === "md" && "py-6 text-sm",
125
132
  size === "lg" && "py-8 text-base",
126
- className
133
+ className,
127
134
  )}
128
135
  {...props}
129
136
  />
@@ -144,7 +151,7 @@ const commandGroupVariants = cva(
144
151
  defaultVariants: {
145
152
  size: "md",
146
153
  },
147
- }
154
+ },
148
155
  );
149
156
 
150
157
  const CommandGroup = React.forwardRef<
@@ -189,7 +196,7 @@ const commandItemVariants = cva(
189
196
  defaultVariants: {
190
197
  size: "md",
191
198
  },
192
- }
199
+ },
193
200
  );
194
201
 
195
202
  const CommandItem = React.forwardRef<
@@ -7,12 +7,13 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
11
10
  import * as React from "react";
12
11
 
13
- import { cn } from "../../lib/utils";
12
+ import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
14
13
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
15
14
 
15
+ import { cn } from "../../lib/utils";
16
+
16
17
  type ContextMenuVariant = "destructive";
17
18
 
18
19
  /**
@@ -7,9 +7,10 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
11
10
  import * as React from "react";
12
11
 
12
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
13
+
13
14
  import { cn } from "../../lib/utils";
14
15
 
15
16
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
@@ -8,9 +8,10 @@
8
8
  "use client";
9
9
 
10
10
  import * as React from "react";
11
- import { Drawer as DrawerPrimitive } from "vaul";
11
+
12
12
  // Fix TS2883: The inferred type cannot be named without a reference to @radix-ui/react-dialog
13
13
  import type {} from "@radix-ui/react-dialog";
14
+ import { Drawer as DrawerPrimitive } from "vaul";
14
15
 
15
16
  import { cn } from "../../lib/utils";
16
17
 
@@ -7,12 +7,13 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
11
10
  import * as React from "react";
12
11
 
13
- import { cn } from "../../lib/utils";
12
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
14
13
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
15
14
 
15
+ import { cn } from "../../lib/utils";
16
+
16
17
  export type DropdownMenuVariant = "destructive";
17
18
 
18
19
  function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
@@ -5,9 +5,10 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
- import { cva, type VariantProps } from "class-variance-authority";
9
8
  import * as React from "react";
10
9
 
10
+ import { type VariantProps, cva } from "class-variance-authority";
11
+
11
12
  import { cn } from "../../lib/utils";
12
13
 
13
14
  /**
@@ -7,10 +7,11 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { cva, type VariantProps } from "class-variance-authority";
11
- import { AlertCircleIcon } from "lucide-react";
12
10
  import * as React from "react";
13
11
 
12
+ import { type VariantProps, cva } from "class-variance-authority";
13
+ import { AlertCircleIcon } from "lucide-react";
14
+
14
15
  import { Label } from "../../components/micro/label";
15
16
  import { Separator } from "../../components/micro/separator";
16
17
  import { cn } from "../../lib/utils";
@@ -112,7 +113,7 @@ const fieldVariants = cva("group/field flex min-w-fit", {
112
113
  const Field = React.forwardRef<
113
114
  HTMLDivElement,
114
115
  React.ComponentProps<"div"> &
115
- VariantProps<typeof fieldVariants> & { error?: boolean | string }
116
+ VariantProps<typeof fieldVariants> & { error?: boolean | string }
116
117
  >(
117
118
  (
118
119
  { className, orientation = "vertical", size = "md", error, ...props },
@@ -8,6 +8,7 @@
8
8
  "use client";
9
9
 
10
10
  import * as React from "react";
11
+
11
12
  import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
12
13
 
13
14
  import { cn } from "../../lib/utils";
@@ -60,27 +61,27 @@ const HoverCardContent = React.forwardRef<
60
61
  ) => {
61
62
  return (
62
63
  <PreviewCardPrimitive.Positioner
63
- align={align}
64
- alignOffset={alignOffset}
65
- side={side}
66
- sideOffset={sideOffset}
67
- className="isolate"
68
- >
69
- <PreviewCardPrimitive.Popup
70
- ref={ref}
71
- data-slot="hover-card-content"
72
- className={cn(
73
- "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100",
74
- "data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
75
- "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none",
76
- className,
77
- )}
78
- {...props}
79
- />
80
- </PreviewCardPrimitive.Positioner>
64
+ align={align}
65
+ alignOffset={alignOffset}
66
+ side={side}
67
+ sideOffset={sideOffset}
68
+ className="isolate"
69
+ >
70
+ <PreviewCardPrimitive.Popup
71
+ ref={ref}
72
+ data-slot="hover-card-content"
73
+ className={cn(
74
+ "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100",
75
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
76
+ "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none",
77
+ className,
78
+ )}
79
+ {...props}
80
+ />
81
+ </PreviewCardPrimitive.Positioner>
81
82
  );
82
83
  },
83
84
  );
84
85
  HoverCardContent.displayName = "HoverCardContent";
85
86
 
86
- export { HoverCard, HoverCardContent, HoverCardTrigger, HoverCardPortal };
87
+ export { HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger };
@@ -7,9 +7,10 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { cva, type VariantProps } from "class-variance-authority";
11
10
  import * as React from "react";
12
11
 
12
+ import { type VariantProps, cva } from "class-variance-authority";
13
+
13
14
  import { cn } from "../../lib/utils";
14
15
 
15
16
  /* ── InputGroup ─────────────────────────────────────────────────
@@ -7,10 +7,11 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { cva, type VariantProps } from "class-variance-authority";
11
- import { OTPInput, OTPInputContext } from "input-otp";
12
10
  import * as React from "react";
13
11
 
12
+ import { type VariantProps, cva } from "class-variance-authority";
13
+ import { OTPInput, OTPInputContext } from "input-otp";
14
+
14
15
  import { cn } from "../../lib/utils";
15
16
 
16
17
  const inputOTPVariants = cva(
@@ -5,10 +5,11 @@
5
5
  * - Form Control Parity
6
6
  * - CSS Delegated Logic
7
7
  */
8
- import { Input as InputPrimitive } from "@base-ui/react/input";
9
- import { cva, type VariantProps } from "class-variance-authority";
10
8
  import * as React from "react";
11
9
 
10
+ import { Input as InputPrimitive } from "@base-ui/react/input";
11
+ import { type VariantProps, cva } from "class-variance-authority";
12
+
12
13
  import { type Size } from "../../lib/types";
13
14
  import { cn } from "../../lib/utils";
14
15
 
@@ -6,6 +6,7 @@
6
6
  * - CSS Delegated Logic
7
7
  */
8
8
  import * as React from "react";
9
+
9
10
  import { mergeProps } from "@base-ui/react/merge-props";
10
11
  import { useRender } from "@base-ui/react/use-render";
11
12
  import { cva } from "class-variance-authority";
@@ -7,9 +7,10 @@
7
7
  */
8
8
  "use client";
9
9
 
10
- import { cva, type VariantProps } from "class-variance-authority";
11
10
  import * as React from "react";
12
11
 
12
+ import { type VariantProps, cva } from "class-variance-authority";
13
+
13
14
  import { cn } from "../../lib/utils";
14
15
 
15
16
  const labelVariants = cva(
@@ -8,8 +8,10 @@
8
8
  "use client";
9
9
 
10
10
  import * as React from "react";
11
+
11
12
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
12
13
  import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
14
+ import { CheckIcon } from "lucide-react";
13
15
 
14
16
  import {
15
17
  DropdownMenu,
@@ -27,7 +29,6 @@ import {
27
29
  DropdownMenuTrigger,
28
30
  } from "../../components/micro/dropdown-menu";
29
31
  import { cn } from "../../lib/utils";
30
- import { CheckIcon } from "lucide-react";
31
32
 
32
33
  /**
33
34
  * @description A visually persistent menu common in desktop applications.