zudoku 0.64.2 → 0.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dist/app/main.d.ts +91 -1
  2. package/dist/app/main.js +5 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
  5. package/dist/config/validators/NavigationSchema.js +2 -4
  6. package/dist/config/validators/NavigationSchema.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +53 -1
  8. package/dist/config/validators/validate.js +7 -0
  9. package/dist/config/validators/validate.js.map +1 -1
  10. package/dist/config/validators/validate.test.js +43 -0
  11. package/dist/config/validators/validate.test.js.map +1 -1
  12. package/dist/flat-config.d.ts +6 -0
  13. package/dist/lib/authentication/providers/auth0.js +6 -1
  14. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  15. package/dist/lib/components/Autocomplete.d.ts +3 -1
  16. package/dist/lib/components/Autocomplete.js +6 -2
  17. package/dist/lib/components/Autocomplete.js.map +1 -1
  18. package/dist/lib/components/Layout.js +3 -2
  19. package/dist/lib/components/Layout.js.map +1 -1
  20. package/dist/lib/components/navigation/NavigationItem.js +2 -2
  21. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  22. package/dist/lib/errors/ErrorAlert.js +1 -1
  23. package/dist/lib/errors/RouterError.d.ts +3 -1
  24. package/dist/lib/errors/RouterError.js +3 -2
  25. package/dist/lib/errors/RouterError.js.map +1 -1
  26. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
  27. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  29. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  30. package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
  31. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  32. package/dist/lib/plugins/openapi/ParameterList.js +7 -4
  33. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  34. package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
  35. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  36. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
  37. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  38. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
  39. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
  40. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  41. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
  42. package/dist/lib/plugins/openapi/Sidecar.js +39 -15
  43. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  44. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  45. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  46. package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
  47. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  48. package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
  49. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
  50. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  51. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  52. package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
  53. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  54. package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
  55. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  56. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  57. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  58. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  59. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  60. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  61. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  62. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  63. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
  64. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  65. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  66. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  67. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  68. package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
  69. package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
  70. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  71. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
  72. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  73. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  74. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  75. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  76. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  77. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  78. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  79. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  80. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  81. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  82. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
  87. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  88. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
  89. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  90. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
  91. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  92. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  93. package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
  94. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  95. package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
  96. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
  97. package/dist/lib/ui/Badge.d.ts +3 -3
  98. package/dist/lib/ui/Badge.js +9 -7
  99. package/dist/lib/ui/Badge.js.map +1 -1
  100. package/dist/lib/ui/Button.d.ts +1 -1
  101. package/dist/lib/ui/Button.js +1 -0
  102. package/dist/lib/ui/Button.js.map +1 -1
  103. package/dist/lib/ui/Checkbox.d.ts +2 -2
  104. package/dist/lib/ui/Checkbox.js +4 -4
  105. package/dist/lib/ui/Checkbox.js.map +1 -1
  106. package/dist/lib/ui/CodeBlock.js +1 -1
  107. package/dist/lib/ui/CodeBlock.js.map +1 -1
  108. package/dist/lib/ui/Collapsible.d.ts +4 -4
  109. package/dist/lib/ui/Collapsible.js +11 -4
  110. package/dist/lib/ui/Collapsible.js.map +1 -1
  111. package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
  112. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  113. package/dist/lib/ui/Frame.d.ts +8 -0
  114. package/dist/lib/ui/Frame.js +22 -0
  115. package/dist/lib/ui/Frame.js.map +1 -0
  116. package/dist/lib/ui/Item.d.ts +23 -0
  117. package/dist/lib/ui/Item.js +67 -0
  118. package/dist/lib/ui/Item.js.map +1 -0
  119. package/dist/lib/ui/NativeSelect.d.ts +5 -0
  120. package/dist/lib/ui/NativeSelect.js +14 -0
  121. package/dist/lib/ui/NativeSelect.js.map +1 -0
  122. package/dist/lib/ui/Select.d.ts +13 -11
  123. package/dist/lib/ui/Select.js +34 -23
  124. package/dist/lib/ui/Select.js.map +1 -1
  125. package/dist/lib/util/readFrontmatter.d.ts +6 -0
  126. package/dist/lib/util/readFrontmatter.js +12 -0
  127. package/dist/lib/util/readFrontmatter.js.map +1 -0
  128. package/dist/vite/mdx/remark-last-modified.js +57 -3
  129. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  130. package/dist/vite/plugin-api.js +2 -2
  131. package/dist/vite/plugin-api.js.map +1 -1
  132. package/dist/vite/plugin-frontmatter.js +3 -5
  133. package/dist/vite/plugin-frontmatter.js.map +1 -1
  134. package/dist/vite/plugin-markdown-export.js +3 -4
  135. package/dist/vite/plugin-markdown-export.js.map +1 -1
  136. package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
  137. package/lib/Button-B3ucvvQw.js.map +1 -0
  138. package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-D5LKLFOd.js} +1100 -1112
  139. package/lib/ErrorAlert-D5LKLFOd.js.map +1 -0
  140. package/lib/{MdxPage-Bpa9tL63.js → MdxPage-hOCN-u-L.js} +6 -6
  141. package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-hOCN-u-L.js.map} +1 -1
  142. package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-oXnxcJg4.js} +4 -4
  143. package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-oXnxcJg4.js.map} +1 -1
  144. package/lib/{OasProvider-jr0oDSFy.js → OasProvider-BuBeRIHB.js} +2 -2
  145. package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-BuBeRIHB.js.map} +1 -1
  146. package/lib/{OperationList-DLEAg4qw.js → OperationList-Cx8TGKhB.js} +2053 -1830
  147. package/lib/OperationList-Cx8TGKhB.js.map +1 -0
  148. package/lib/{Pagination-H2HW9-Er.js → Pagination-lLSoHnxa.js} +2 -2
  149. package/lib/{Pagination-H2HW9-Er.js.map → Pagination-lLSoHnxa.js.map} +1 -1
  150. package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
  151. package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
  152. package/lib/RouterError-VGZB_wg4.js +42 -0
  153. package/lib/RouterError-VGZB_wg4.js.map +1 -0
  154. package/lib/{SchemaList-CSDSazqV.js → SchemaList-rBWXYJEb.js} +7 -7
  155. package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-rBWXYJEb.js.map} +1 -1
  156. package/lib/SchemaView-jouS_xvc.js +586 -0
  157. package/lib/SchemaView-jouS_xvc.js.map +1 -0
  158. package/lib/Select-DFRCS31-.js +399 -0
  159. package/lib/Select-DFRCS31-.js.map +1 -0
  160. package/lib/{SignUp-Fycafbyg.js → SignUp-D2mmQOkg.js} +2 -2
  161. package/lib/{SignUp-Fycafbyg.js.map → SignUp-D2mmQOkg.js.map} +1 -1
  162. package/lib/{Toc-ChkOg2UU.js → Toc-CBWfFCVf.js} +2 -2
  163. package/lib/{Toc-ChkOg2UU.js.map → Toc-CBWfFCVf.js.map} +1 -1
  164. package/lib/{circular-DGfd8SGc.js → circular-CGkbVs2O.js} +6360 -5953
  165. package/lib/circular-CGkbVs2O.js.map +1 -0
  166. package/lib/{createServer-DGD8hEzT.js → createServer-CcV_75PW.js} +770 -735
  167. package/lib/createServer-CcV_75PW.js.map +1 -0
  168. package/lib/{errors-BTpjwHS6.js → errors-D7xzOd8X.js} +2 -2
  169. package/lib/{errors-BTpjwHS6.js.map → errors-D7xzOd8X.js.map} +1 -1
  170. package/lib/{index-Bvas0H4x.js → index-CF7_erXq.js} +2 -2
  171. package/lib/{index-Bvas0H4x.js.map → index-CF7_erXq.js.map} +1 -1
  172. package/lib/{index-FNRZUtwo.js → index-CPws05Tb.js} +3 -3
  173. package/lib/{index-FNRZUtwo.js.map → index-CPws05Tb.js.map} +1 -1
  174. package/lib/index-I4zC7Yht.js +3680 -0
  175. package/lib/index-I4zC7Yht.js.map +1 -0
  176. package/lib/ui/ActionButton.js +1 -1
  177. package/lib/ui/Badge.js +27 -13
  178. package/lib/ui/Badge.js.map +1 -1
  179. package/lib/ui/Button.js +6 -5
  180. package/lib/ui/Button.js.map +1 -1
  181. package/lib/ui/Checkbox.js +29 -26
  182. package/lib/ui/Checkbox.js.map +1 -1
  183. package/lib/ui/CodeBlock.js +7 -7
  184. package/lib/ui/CodeBlock.js.map +1 -1
  185. package/lib/ui/Collapsible.js +32 -5
  186. package/lib/ui/Collapsible.js.map +1 -1
  187. package/lib/ui/EmbeddedCodeBlock.js +19 -18
  188. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  189. package/lib/ui/Frame.js +81 -0
  190. package/lib/ui/Frame.js.map +1 -0
  191. package/lib/ui/Item.js +188 -0
  192. package/lib/ui/Item.js.map +1 -0
  193. package/lib/ui/NativeSelect.js +57 -0
  194. package/lib/ui/NativeSelect.js.map +1 -0
  195. package/lib/ui/Select.js +166 -116
  196. package/lib/ui/Select.js.map +1 -1
  197. package/lib/ui/Tabs.js +10 -10
  198. package/lib/zudoku.__internal.js +345 -345
  199. package/lib/zudoku.__internal.js.map +1 -1
  200. package/lib/zudoku.auth-auth0.js +7 -7
  201. package/lib/zudoku.auth-auth0.js.map +1 -1
  202. package/lib/zudoku.auth-azureb2c.js +3 -3
  203. package/lib/zudoku.auth-clerk.js +1 -1
  204. package/lib/zudoku.auth-openid.js +3 -3
  205. package/lib/zudoku.auth-supabase.js +3 -3
  206. package/lib/zudoku.components.js +2 -2
  207. package/lib/zudoku.plugin-api-catalog.js +3 -3
  208. package/lib/zudoku.plugin-api-keys.js +4 -4
  209. package/lib/zudoku.plugin-markdown.js +1 -1
  210. package/lib/zudoku.plugin-openapi.js +1 -1
  211. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  212. package/package.json +4 -4
  213. package/src/app/main.tsx +5 -1
  214. package/src/lib/authentication/providers/auth0.tsx +6 -1
  215. package/src/lib/components/Autocomplete.tsx +11 -2
  216. package/src/lib/components/Layout.tsx +3 -2
  217. package/src/lib/components/navigation/NavigationItem.tsx +7 -20
  218. package/src/lib/errors/ErrorAlert.tsx +1 -1
  219. package/src/lib/errors/RouterError.tsx +7 -2
  220. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
  221. package/src/lib/plugins/openapi/OperationList.tsx +3 -1
  222. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
  223. package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
  224. package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
  225. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
  226. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
  227. package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
  228. package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
  229. package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
  230. package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
  231. package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
  232. package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
  233. package/src/lib/plugins/openapi/interfaces.ts +12 -0
  234. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
  235. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  236. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
  237. package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
  238. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  239. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  240. package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
  241. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
  242. package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
  243. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  244. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
  245. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  246. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  247. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
  248. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
  249. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
  250. package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
  251. package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
  252. package/src/lib/ui/Badge.tsx +21 -12
  253. package/src/lib/ui/Button.tsx +1 -0
  254. package/src/lib/ui/Checkbox.tsx +23 -24
  255. package/src/lib/ui/CodeBlock.tsx +3 -3
  256. package/src/lib/ui/Collapsible.tsx +26 -4
  257. package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
  258. package/src/lib/ui/Frame.tsx +81 -0
  259. package/src/lib/ui/Item.tsx +192 -0
  260. package/src/lib/ui/NativeSelect.tsx +47 -0
  261. package/src/lib/ui/Select.tsx +153 -126
  262. package/src/lib/util/readFrontmatter.ts +13 -0
  263. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  264. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  265. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  266. package/lib/Button-DmS4u8Lj.js.map +0 -1
  267. package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
  268. package/lib/OperationList-DLEAg4qw.js.map +0 -1
  269. package/lib/RouterError-DZS2d6Sc.js +0 -41
  270. package/lib/RouterError-DZS2d6Sc.js.map +0 -1
  271. package/lib/SchemaView-DJiBd0_5.js +0 -397
  272. package/lib/SchemaView-DJiBd0_5.js.map +0 -1
  273. package/lib/Select-C1DeCqKv.js +0 -372
  274. package/lib/Select-C1DeCqKv.js.map +0 -1
  275. package/lib/circular-DGfd8SGc.js.map +0 -1
  276. package/lib/createServer-DGD8hEzT.js.map +0 -1
  277. package/lib/index-DP1xZgfJ.js +0 -3364
  278. package/lib/index-DP1xZgfJ.js.map +0 -1
  279. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
@@ -0,0 +1,192 @@
1
+ import { Slot } from "@radix-ui/react-slot";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+ import type * as React from "react";
4
+ import { cn } from "../util/cn.js";
5
+ import { Separator } from "./Separator.js";
6
+
7
+ function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
8
+ return (
9
+ <div
10
+ role="list"
11
+ data-slot="item-group"
12
+ className={cn("group/item-group flex flex-col", className)}
13
+ {...props}
14
+ />
15
+ );
16
+ }
17
+
18
+ function ItemSeparator({
19
+ className,
20
+ ...props
21
+ }: React.ComponentProps<typeof Separator>) {
22
+ return (
23
+ <Separator
24
+ data-slot="item-separator"
25
+ orientation="horizontal"
26
+ className={cn("my-0", className)}
27
+ {...props}
28
+ />
29
+ );
30
+ }
31
+
32
+ const itemVariants = cva(
33
+ "group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
34
+ {
35
+ variants: {
36
+ variant: {
37
+ default: "bg-transparent",
38
+ outline: "border-border",
39
+ muted: "bg-muted/50",
40
+ },
41
+ size: {
42
+ default: "p-4 gap-4 ",
43
+ sm: "py-3 px-4 gap-2.5",
44
+ },
45
+ },
46
+ defaultVariants: {
47
+ variant: "default",
48
+ size: "default",
49
+ },
50
+ },
51
+ );
52
+
53
+ function Item({
54
+ className,
55
+ variant = "default",
56
+ size = "default",
57
+ asChild = false,
58
+ ...props
59
+ }: React.ComponentProps<"div"> &
60
+ VariantProps<typeof itemVariants> & { asChild?: boolean }) {
61
+ const Comp = asChild ? Slot : "div";
62
+ return (
63
+ <Comp
64
+ data-slot="item"
65
+ data-variant={variant}
66
+ data-size={size}
67
+ className={cn(itemVariants({ variant, size, className }))}
68
+ {...props}
69
+ />
70
+ );
71
+ }
72
+
73
+ const itemMediaVariants = cva(
74
+ "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
75
+ {
76
+ variants: {
77
+ variant: {
78
+ default: "bg-transparent",
79
+ icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
80
+ image:
81
+ "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover",
82
+ },
83
+ },
84
+ defaultVariants: {
85
+ variant: "default",
86
+ },
87
+ },
88
+ );
89
+
90
+ function ItemMedia({
91
+ className,
92
+ variant = "default",
93
+ ...props
94
+ }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
95
+ return (
96
+ <div
97
+ data-slot="item-media"
98
+ data-variant={variant}
99
+ className={cn(itemMediaVariants({ variant, className }))}
100
+ {...props}
101
+ />
102
+ );
103
+ }
104
+
105
+ function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
106
+ return (
107
+ <div
108
+ data-slot="item-content"
109
+ className={cn(
110
+ "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
111
+ className,
112
+ )}
113
+ {...props}
114
+ />
115
+ );
116
+ }
117
+
118
+ function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
119
+ return (
120
+ <div
121
+ data-slot="item-title"
122
+ className={cn(
123
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium",
124
+ className,
125
+ )}
126
+ {...props}
127
+ />
128
+ );
129
+ }
130
+
131
+ function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
132
+ return (
133
+ <p
134
+ data-slot="item-description"
135
+ className={cn(
136
+ "text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
137
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
138
+ className,
139
+ )}
140
+ {...props}
141
+ />
142
+ );
143
+ }
144
+
145
+ function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
146
+ return (
147
+ <div
148
+ data-slot="item-actions"
149
+ className={cn("flex items-center gap-2", className)}
150
+ {...props}
151
+ />
152
+ );
153
+ }
154
+
155
+ function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
156
+ return (
157
+ <div
158
+ data-slot="item-header"
159
+ className={cn(
160
+ "flex basis-full items-center justify-between gap-2",
161
+ className,
162
+ )}
163
+ {...props}
164
+ />
165
+ );
166
+ }
167
+
168
+ function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
169
+ return (
170
+ <div
171
+ data-slot="item-footer"
172
+ className={cn(
173
+ "flex basis-full items-center justify-between gap-2",
174
+ className,
175
+ )}
176
+ {...props}
177
+ />
178
+ );
179
+ }
180
+
181
+ export {
182
+ Item,
183
+ ItemMedia,
184
+ ItemContent,
185
+ ItemActions,
186
+ ItemGroup,
187
+ ItemSeparator,
188
+ ItemTitle,
189
+ ItemDescription,
190
+ ItemHeader,
191
+ ItemFooter,
192
+ };
@@ -0,0 +1,47 @@
1
+ import { ChevronDownIcon } from "lucide-react";
2
+ import type * as React from "react";
3
+ import { cn } from "../util/cn.js";
4
+
5
+ function NativeSelect({ className, ...props }: React.ComponentProps<"select">) {
6
+ return (
7
+ <div
8
+ className="group/native-select relative w-fit has-[select:disabled]:opacity-50"
9
+ data-slot="native-select-wrapper"
10
+ >
11
+ <select
12
+ data-slot="native-select"
13
+ className={cn(
14
+ "border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed",
15
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
16
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
17
+ className,
18
+ )}
19
+ {...props}
20
+ />
21
+ <ChevronDownIcon
22
+ className="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none"
23
+ aria-hidden="true"
24
+ data-slot="native-select-icon"
25
+ />
26
+ </div>
27
+ );
28
+ }
29
+
30
+ function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {
31
+ return <option data-slot="native-select-option" {...props} />;
32
+ }
33
+
34
+ function NativeSelectOptGroup({
35
+ className,
36
+ ...props
37
+ }: React.ComponentProps<"optgroup">) {
38
+ return (
39
+ <optgroup
40
+ data-slot="native-select-optgroup"
41
+ className={cn(className)}
42
+ {...props}
43
+ />
44
+ );
45
+ }
46
+
47
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -1,147 +1,174 @@
1
1
  import * as SelectPrimitive from "@radix-ui/react-select";
2
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
3
- import * as React from "react";
4
- import { cn } from "../util/cn.js";
2
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
3
+ import type * as React from "react";
4
+ import { cn } from "./util.js";
5
5
 
6
- const Select = SelectPrimitive.Root;
6
+ function Select({
7
+ ...props
8
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
9
+ return <SelectPrimitive.Root data-slot="select" {...props} />;
10
+ }
7
11
 
8
- const SelectGroup = SelectPrimitive.Group;
12
+ function SelectGroup({
13
+ ...props
14
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
15
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />;
16
+ }
9
17
 
10
- const SelectValue = SelectPrimitive.Value;
18
+ function SelectValue({
19
+ ...props
20
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
21
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />;
22
+ }
11
23
 
12
- const SelectTrigger = React.forwardRef<
13
- React.ElementRef<typeof SelectPrimitive.Trigger>,
14
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
15
- >(({ className, children, ...props }, ref) => (
16
- <SelectPrimitive.Trigger
17
- ref={ref}
18
- className={cn(
19
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
20
- className,
21
- )}
22
- {...props}
23
- >
24
- <span className="truncate">{children}</span>
25
- <SelectPrimitive.Icon asChild>
26
- <ChevronDown className="shrink-0 h-4 w-4 opacity-50" />
27
- </SelectPrimitive.Icon>
28
- </SelectPrimitive.Trigger>
29
- ));
30
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
31
-
32
- const SelectScrollUpButton = React.forwardRef<
33
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
34
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
35
- >(({ className, ...props }, ref) => (
36
- <SelectPrimitive.ScrollUpButton
37
- ref={ref}
38
- className={cn(
39
- "flex cursor-default items-center justify-center py-1",
40
- className,
41
- )}
42
- {...props}
43
- >
44
- <ChevronUp className="h-4 w-4" />
45
- </SelectPrimitive.ScrollUpButton>
46
- ));
47
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
48
-
49
- const SelectScrollDownButton = React.forwardRef<
50
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
51
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
52
- >(({ className, ...props }, ref) => (
53
- <SelectPrimitive.ScrollDownButton
54
- ref={ref}
55
- className={cn(
56
- "flex cursor-default items-center justify-center py-1",
57
- className,
58
- )}
59
- {...props}
60
- >
61
- <ChevronDown className="h-4 w-4" />
62
- </SelectPrimitive.ScrollDownButton>
63
- ));
64
- SelectScrollDownButton.displayName =
65
- SelectPrimitive.ScrollDownButton.displayName;
66
-
67
- const SelectContent = React.forwardRef<
68
- React.ElementRef<typeof SelectPrimitive.Content>,
69
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
70
- >(({ className, children, position = "popper", ...props }, ref) => (
71
- <SelectPrimitive.Portal>
72
- <SelectPrimitive.Content
73
- ref={ref}
24
+ function SelectTrigger({
25
+ className,
26
+ size = "default",
27
+ children,
28
+ ...props
29
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
30
+ size?: "sm" | "default";
31
+ }) {
32
+ return (
33
+ <SelectPrimitive.Trigger
34
+ data-slot="select-trigger"
35
+ data-size={size}
74
36
  className={cn(
75
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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
- position === "popper" &&
77
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
37
+ "border-input data-placeholder:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
78
38
  className,
79
39
  )}
80
- position={position}
81
40
  {...props}
82
41
  >
83
- <SelectScrollUpButton />
84
- <SelectPrimitive.Viewport
42
+ {children}
43
+ <SelectPrimitive.Icon asChild>
44
+ <ChevronDownIcon className="size-4 opacity-50" />
45
+ </SelectPrimitive.Icon>
46
+ </SelectPrimitive.Trigger>
47
+ );
48
+ }
49
+
50
+ function SelectContent({
51
+ className,
52
+ children,
53
+ position = "popper",
54
+ align = "center",
55
+ ...props
56
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
57
+ return (
58
+ <SelectPrimitive.Portal>
59
+ <SelectPrimitive.Content
60
+ data-slot="select-content"
85
61
  className={cn(
62
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
86
63
  position === "popper" &&
87
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
88
- "divide-y",
64
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
65
+ className,
89
66
  )}
67
+ position={position}
68
+ align={align}
69
+ {...props}
90
70
  >
91
- {children}
92
- </SelectPrimitive.Viewport>
93
- <SelectScrollDownButton />
94
- </SelectPrimitive.Content>
95
- </SelectPrimitive.Portal>
96
- ));
97
- SelectContent.displayName = SelectPrimitive.Content.displayName;
71
+ <SelectScrollUpButton />
72
+ <SelectPrimitive.Viewport
73
+ className={cn(
74
+ "p-1",
75
+ position === "popper" &&
76
+ "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1",
77
+ )}
78
+ >
79
+ {children}
80
+ </SelectPrimitive.Viewport>
81
+ <SelectScrollDownButton />
82
+ </SelectPrimitive.Content>
83
+ </SelectPrimitive.Portal>
84
+ );
85
+ }
86
+
87
+ function SelectLabel({
88
+ className,
89
+ ...props
90
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
91
+ return (
92
+ <SelectPrimitive.Label
93
+ data-slot="select-label"
94
+ className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
95
+ {...props}
96
+ />
97
+ );
98
+ }
98
99
 
99
- const SelectLabel = React.forwardRef<
100
- React.ElementRef<typeof SelectPrimitive.Label>,
101
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
102
- >(({ className, ...props }, ref) => (
103
- <SelectPrimitive.Label
104
- ref={ref}
105
- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
106
- {...props}
107
- />
108
- ));
109
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
100
+ function SelectItem({
101
+ className,
102
+ children,
103
+ ...props
104
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
105
+ return (
106
+ <SelectPrimitive.Item
107
+ data-slot="select-item"
108
+ className={cn(
109
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
110
+ className,
111
+ )}
112
+ {...props}
113
+ >
114
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
115
+ <SelectPrimitive.ItemIndicator>
116
+ <CheckIcon className="size-4" />
117
+ </SelectPrimitive.ItemIndicator>
118
+ </span>
119
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
120
+ </SelectPrimitive.Item>
121
+ );
122
+ }
110
123
 
111
- const SelectItem = React.forwardRef<
112
- React.ElementRef<typeof SelectPrimitive.Item>,
113
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
114
- >(({ className, children, ...props }, ref) => (
115
- <SelectPrimitive.Item
116
- ref={ref}
117
- className={cn(
118
- "relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
119
- className,
120
- )}
121
- {...props}
122
- >
123
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
124
- <SelectPrimitive.ItemIndicator>
125
- <Check className="h-4 w-4" />
126
- </SelectPrimitive.ItemIndicator>
127
- </span>
124
+ function SelectSeparator({
125
+ className,
126
+ ...props
127
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
128
+ return (
129
+ <SelectPrimitive.Separator
130
+ data-slot="select-separator"
131
+ className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
132
+ {...props}
133
+ />
134
+ );
135
+ }
128
136
 
129
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
130
- </SelectPrimitive.Item>
131
- ));
132
- SelectItem.displayName = SelectPrimitive.Item.displayName;
137
+ function SelectScrollUpButton({
138
+ className,
139
+ ...props
140
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
141
+ return (
142
+ <SelectPrimitive.ScrollUpButton
143
+ data-slot="select-scroll-up-button"
144
+ className={cn(
145
+ "flex cursor-default items-center justify-center py-1",
146
+ className,
147
+ )}
148
+ {...props}
149
+ >
150
+ <ChevronUpIcon className="size-4" />
151
+ </SelectPrimitive.ScrollUpButton>
152
+ );
153
+ }
133
154
 
134
- const SelectSeparator = React.forwardRef<
135
- React.ElementRef<typeof SelectPrimitive.Separator>,
136
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
137
- >(({ className, ...props }, ref) => (
138
- <SelectPrimitive.Separator
139
- ref={ref}
140
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
141
- {...props}
142
- />
143
- ));
144
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
155
+ function SelectScrollDownButton({
156
+ className,
157
+ ...props
158
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
159
+ return (
160
+ <SelectPrimitive.ScrollDownButton
161
+ data-slot="select-scroll-down-button"
162
+ className={cn(
163
+ "flex cursor-default items-center justify-center py-1",
164
+ className,
165
+ )}
166
+ {...props}
167
+ >
168
+ <ChevronDownIcon className="size-4" />
169
+ </SelectPrimitive.ScrollDownButton>
170
+ );
171
+ }
145
172
 
146
173
  export {
147
174
  Select,
@@ -0,0 +1,13 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import matter from "gray-matter";
3
+ import { parse, stringify } from "yaml";
4
+
5
+ export const yaml = {
6
+ parse: (input: string) => parse(input) ?? {},
7
+ stringify: (obj: object) => stringify(obj),
8
+ };
9
+
10
+ export const readFrontmatter = async (filePath: string) => {
11
+ const content = await readFile(filePath, "utf-8");
12
+ return matter(content, { engines: { yaml } });
13
+ };
@@ -1,4 +0,0 @@
1
- export declare const InlineInput: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
2
- className?: import("clsx").ClassValue;
3
- asChild?: boolean;
4
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,3 +0,0 @@
1
- import createVariantComponent from "../../../util/createVariantComponent.js";
2
- export const InlineInput = createVariantComponent("input", "bg-transparent h-9 font-mono text-xs");
3
- //# sourceMappingURL=InlineInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InlineInput.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/InlineInput.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAC/C,OAAO,EACP,sCAAsC,CACvC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-DmS4u8Lj.js","sources":["../src/lib/ui/Button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nexport const buttonVariants = cva(\n \"not-prose inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n \"ghost-destructive\":\n \"text-destructive hover:bg-destructive hover:text-destructive-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n expand:\n \"flex gap-1.5 border bg-transparent rounded-xl text-muted-foreground hover:text-foreground\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n xl: \"h-14 rounded-lg px-10 text-lg\",\n icon: \"size-9\",\n \"icon-xs\": \"size-7\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":";;;;;AAKO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,qBACE;AAAA,QACF,MAAM;AAAA,QACN,QACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAQaC,IAASC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,MAAQ;AAChE,UAAMC,IAAOH,IAAUI,IAAO;AAC9B,WACEC,gBAAAA,EAAAA;AAAAA,MAACF;AAAA,MAAA;AAAA,QACC,WAAWG,EAAGb,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAK;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAN,EAAO,cAAc;"}