docusaurus-theme-openapi-docs 0.0.0-1000

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 (312) hide show
  1. package/LICENSE +21 -0
  2. package/babel.config.js +35 -0
  3. package/lib/index.d.ts +2 -0
  4. package/lib/index.js +81 -0
  5. package/lib/markdown/createDescription.d.ts +1 -0
  6. package/lib/markdown/createDescription.js +15 -0
  7. package/lib/markdown/schema.d.ts +3 -0
  8. package/lib/markdown/schema.js +149 -0
  9. package/lib/markdown/utils.d.ts +10 -0
  10. package/lib/markdown/utils.js +49 -0
  11. package/lib/markdown/utils.test.d.ts +1 -0
  12. package/lib/markdown/utils.test.js +43 -0
  13. package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
  14. package/lib/theme/ApiExplorer/Accept/index.js +38 -0
  15. package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
  16. package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
  17. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  18. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
  19. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
  20. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
  21. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
  22. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
  23. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
  24. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  25. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  26. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +3 -0
  27. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
  28. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  29. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
  30. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
  31. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  32. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
  33. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
  34. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  35. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
  36. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
  37. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  38. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
  39. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
  40. package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
  41. package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
  42. package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
  43. package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
  44. package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
  45. package/lib/theme/ApiExplorer/Authorization/index.js +160 -0
  46. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
  47. package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
  48. package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
  49. package/lib/theme/ApiExplorer/Body/index.js +381 -0
  50. package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
  51. package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
  52. package/lib/theme/ApiExplorer/Body/slice.js +97 -0
  53. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
  54. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
  55. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +10 -0
  56. package/lib/theme/ApiExplorer/CodeSnippets/index.js +389 -0
  57. package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
  58. package/lib/theme/ApiExplorer/CodeSnippets/languages.js +95 -0
  59. package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  60. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
  61. package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
  62. package/lib/theme/ApiExplorer/CodeTabs/index.js +271 -0
  63. package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
  64. package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
  65. package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
  66. package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
  67. package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
  68. package/lib/theme/ApiExplorer/Export/index.js +57 -0
  69. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  70. package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
  71. package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
  72. package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  73. package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
  74. package/lib/theme/ApiExplorer/FormFileUpload/index.js +173 -0
  75. package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  76. package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
  77. package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
  78. package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  79. package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
  80. package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
  81. package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  82. package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
  83. package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
  84. package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  85. package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
  86. package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
  87. package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  88. package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
  89. package/lib/theme/ApiExplorer/LiveEditor/index.js +168 -0
  90. package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  91. package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
  92. package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
  93. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  94. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +220 -0
  95. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  96. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
  97. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  98. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
  99. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  100. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
  101. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  102. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  103. package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  104. package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
  105. package/lib/theme/ApiExplorer/ParamOptions/index.js +223 -0
  106. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
  107. package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
  108. package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
  109. package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
  110. package/lib/theme/ApiExplorer/Request/index.js +396 -0
  111. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
  112. package/lib/theme/ApiExplorer/Request/makeRequest.js +222 -0
  113. package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
  114. package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
  115. package/lib/theme/ApiExplorer/Response/index.js +193 -0
  116. package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
  117. package/lib/theme/ApiExplorer/Response/slice.js +51 -0
  118. package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
  119. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
  120. package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
  121. package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
  122. package/lib/theme/ApiExplorer/Server/index.js +199 -0
  123. package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
  124. package/lib/theme/ApiExplorer/Server/slice.js +33 -0
  125. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
  126. package/lib/theme/ApiExplorer/buildPostmanRequest.js +465 -0
  127. package/lib/theme/ApiExplorer/index.d.ts +7 -0
  128. package/lib/theme/ApiExplorer/index.js +41 -0
  129. package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
  130. package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
  131. package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
  132. package/lib/theme/ApiExplorer/storage-utils.js +41 -0
  133. package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
  134. package/lib/theme/ApiItem/Layout/index.js +121 -0
  135. package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
  136. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  137. package/lib/theme/ApiItem/hooks.js +13 -0
  138. package/lib/theme/ApiItem/index.d.ts +2 -0
  139. package/lib/theme/ApiItem/index.js +238 -0
  140. package/lib/theme/ApiItem/store.d.ts +46 -0
  141. package/lib/theme/ApiItem/store.js +53 -0
  142. package/lib/theme/ApiLogo/index.d.ts +2 -0
  143. package/lib/theme/ApiLogo/index.js +51 -0
  144. package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
  145. package/lib/theme/ApiTabs/index.d.ts +7 -0
  146. package/lib/theme/ApiTabs/index.js +270 -0
  147. package/lib/theme/ArrayBrackets/index.d.ts +3 -0
  148. package/lib/theme/ArrayBrackets/index.js +50 -0
  149. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  150. package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
  151. package/lib/theme/DiscriminatorTabs/index.js +258 -0
  152. package/lib/theme/Markdown/Details/_Details.scss +122 -0
  153. package/lib/theme/Markdown/index.js +179 -0
  154. package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
  155. package/lib/theme/MimeTabs/index.d.ts +6 -0
  156. package/lib/theme/MimeTabs/index.js +286 -0
  157. package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
  158. package/lib/theme/OperationTabs/index.d.ts +3 -0
  159. package/lib/theme/OperationTabs/index.js +248 -0
  160. package/lib/theme/ParamsDetails/index.d.ts +6 -0
  161. package/lib/theme/ParamsDetails/index.js +85 -0
  162. package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
  163. package/lib/theme/ParamsItem/index.d.ts +25 -0
  164. package/lib/theme/ParamsItem/index.js +218 -0
  165. package/lib/theme/RequestSchema/index.d.ts +15 -0
  166. package/lib/theme/RequestSchema/index.js +194 -0
  167. package/lib/theme/ResponseExamples/index.d.ts +18 -0
  168. package/lib/theme/ResponseExamples/index.js +193 -0
  169. package/lib/theme/ResponseHeaders/index.d.ts +13 -0
  170. package/lib/theme/ResponseHeaders/index.js +39 -0
  171. package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  172. package/lib/theme/ResponseSamples/index.d.ts +8 -0
  173. package/lib/theme/ResponseSamples/index.js +27 -0
  174. package/lib/theme/ResponseSchema/index.d.ts +15 -0
  175. package/lib/theme/ResponseSchema/index.js +159 -0
  176. package/lib/theme/Schema/index.d.ts +8 -0
  177. package/lib/theme/Schema/index.js +885 -0
  178. package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
  179. package/lib/theme/SchemaItem/index.d.ts +12 -0
  180. package/lib/theme/SchemaItem/index.js +213 -0
  181. package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  182. package/lib/theme/SchemaTabs/index.d.ts +3 -0
  183. package/lib/theme/SchemaTabs/index.js +255 -0
  184. package/lib/theme/SkeletonLoader/index.d.ts +6 -0
  185. package/lib/theme/SkeletonLoader/index.js +20 -0
  186. package/lib/theme/StatusCodes/index.d.ts +9 -0
  187. package/lib/theme/StatusCodes/index.js +81 -0
  188. package/lib/theme/styles.scss +212 -0
  189. package/lib/types.d.ts +157 -0
  190. package/lib/types.js +8 -0
  191. package/package.json +83 -0
  192. package/src/index.ts +85 -0
  193. package/src/markdown/createDescription.ts +13 -0
  194. package/src/markdown/schema.ts +181 -0
  195. package/src/markdown/utils.test.ts +49 -0
  196. package/src/markdown/utils.ts +59 -0
  197. package/src/plugin-content-docs.d.ts +20 -0
  198. package/src/postman-code-generators.d.ts +9 -0
  199. package/src/react-magic-dropzone.d.ts +9 -0
  200. package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
  201. package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
  202. package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  203. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
  204. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
  205. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
  206. package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  207. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  208. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +79 -0
  209. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  210. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
  211. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  212. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
  213. package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  214. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
  215. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  216. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
  217. package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
  218. package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
  219. package/src/theme/ApiExplorer/Authorization/index.tsx +158 -0
  220. package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
  221. package/src/theme/ApiExplorer/Body/index.tsx +376 -0
  222. package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
  223. package/src/theme/ApiExplorer/Body/slice.ts +133 -0
  224. package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
  225. package/src/theme/ApiExplorer/CodeSnippets/index.tsx +338 -0
  226. package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  227. package/src/theme/ApiExplorer/CodeSnippets/languages.ts +96 -0
  228. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
  229. package/src/theme/ApiExplorer/CodeTabs/index.tsx +248 -0
  230. package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
  231. package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
  232. package/src/theme/ApiExplorer/Export/index.tsx +47 -0
  233. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  234. package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
  235. package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  236. package/src/theme/ApiExplorer/FormFileUpload/index.tsx +119 -0
  237. package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  238. package/src/theme/ApiExplorer/FormItem/index.tsx +33 -0
  239. package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  240. package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
  241. package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  242. package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
  243. package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  244. package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
  245. package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  246. package/src/theme/ApiExplorer/LiveEditor/index.tsx +114 -0
  247. package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  248. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
  249. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +175 -0
  250. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
  251. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
  252. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
  253. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  254. package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  255. package/src/theme/ApiExplorer/ParamOptions/index.tsx +146 -0
  256. package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
  257. package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
  258. package/src/theme/ApiExplorer/Request/index.tsx +309 -0
  259. package/src/theme/ApiExplorer/Request/makeRequest.ts +254 -0
  260. package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
  261. package/src/theme/ApiExplorer/Response/index.tsx +157 -0
  262. package/src/theme/ApiExplorer/Response/slice.ts +52 -0
  263. package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +287 -0
  264. package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
  265. package/src/theme/ApiExplorer/Server/index.tsx +130 -0
  266. package/src/theme/ApiExplorer/Server/slice.ts +39 -0
  267. package/src/theme/ApiExplorer/buildPostmanRequest.ts +526 -0
  268. package/src/theme/ApiExplorer/index.tsx +41 -0
  269. package/src/theme/ApiExplorer/persistanceMiddleware.ts +71 -0
  270. package/src/theme/ApiExplorer/postman-collection.d.ts +10 -0
  271. package/src/theme/ApiExplorer/react-modal.d.ts +8 -0
  272. package/src/theme/ApiExplorer/storage-utils.ts +39 -0
  273. package/src/theme/ApiItem/Layout/index.tsx +85 -0
  274. package/src/theme/ApiItem/Layout/styles.module.css +17 -0
  275. package/src/theme/ApiItem/hooks.ts +13 -0
  276. package/src/theme/ApiItem/index.tsx +222 -0
  277. package/src/theme/ApiItem/store.ts +51 -0
  278. package/src/theme/ApiLogo/index.tsx +52 -0
  279. package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
  280. package/src/theme/ApiTabs/index.tsx +238 -0
  281. package/src/theme/ArrayBrackets/index.tsx +37 -0
  282. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  283. package/src/theme/DiscriminatorTabs/index.tsx +229 -0
  284. package/src/theme/Markdown/Details/_Details.scss +122 -0
  285. package/src/theme/Markdown/index.js +179 -0
  286. package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
  287. package/src/theme/MimeTabs/index.tsx +257 -0
  288. package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
  289. package/src/theme/OperationTabs/index.tsx +220 -0
  290. package/src/theme/ParamsDetails/index.tsx +81 -0
  291. package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
  292. package/src/theme/ParamsItem/index.tsx +205 -0
  293. package/src/theme/RequestSchema/index.tsx +157 -0
  294. package/src/theme/ResponseExamples/index.tsx +192 -0
  295. package/src/theme/ResponseHeaders/index.tsx +49 -0
  296. package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  297. package/src/theme/ResponseSamples/index.tsx +31 -0
  298. package/src/theme/ResponseSchema/index.tsx +144 -0
  299. package/src/theme/Schema/index.tsx +939 -0
  300. package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
  301. package/src/theme/SchemaItem/index.tsx +198 -0
  302. package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  303. package/src/theme/SchemaTabs/index.tsx +224 -0
  304. package/src/theme/SkeletonLoader/index.tsx +18 -0
  305. package/src/theme/StatusCodes/index.tsx +72 -0
  306. package/src/theme/styles.scss +212 -0
  307. package/src/theme-classic.d.ts +80 -0
  308. package/src/theme-openapi.d.ts +288 -0
  309. package/src/theme-translations.d.ts +9 -0
  310. package/src/types.ts +182 -0
  311. package/tsconfig.json +16 -0
  312. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,248 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React, { cloneElement, ReactElement, useEffect, useRef } from "react";
9
+
10
+ import {
11
+ sanitizeTabsChildren,
12
+ type TabProps,
13
+ useScrollPositionBlocker,
14
+ useTabs,
15
+ } from "@docusaurus/theme-common/internal";
16
+ import { TabItemProps } from "@docusaurus/theme-common/lib/utils/tabsUtils";
17
+ import useIsBrowser from "@docusaurus/useIsBrowser";
18
+ import { Language } from "@theme/ApiExplorer/CodeSnippets";
19
+ import clsx from "clsx";
20
+
21
+ export interface Props {
22
+ action: {
23
+ [key: string]: React.Dispatch<any>;
24
+ };
25
+ currentLanguage: Language;
26
+ languageSet: Language[];
27
+ includeVariant: boolean;
28
+ }
29
+
30
+ export interface CodeTabsProps extends Props, TabProps {
31
+ includeSample?: boolean;
32
+ }
33
+
34
+ function TabList({
35
+ action,
36
+ currentLanguage,
37
+ languageSet,
38
+ includeVariant,
39
+ includeSample,
40
+ className,
41
+ block,
42
+ selectedValue,
43
+ selectValue,
44
+ tabValues,
45
+ }: CodeTabsProps & ReturnType<typeof useTabs>) {
46
+ const tabRefs = useRef<(HTMLLIElement | null)[]>([]);
47
+ const tabsScrollContainerRef = useRef<any>(null);
48
+ const { blockElementScrollPositionUntilNextRender } =
49
+ useScrollPositionBlocker();
50
+
51
+ useEffect(() => {
52
+ const activeTab = tabRefs.current.find(
53
+ (tab) => tab?.getAttribute("aria-selected") === "true"
54
+ );
55
+
56
+ if (activeTab && tabsScrollContainerRef.current) {
57
+ const container = tabsScrollContainerRef.current;
58
+ const containerRect = container.getBoundingClientRect();
59
+ const activeTabRect = activeTab.getBoundingClientRect();
60
+
61
+ // Calculate the distance to scroll to align active tab to the left
62
+ const glowOffset = 3;
63
+ const scrollOffset =
64
+ activeTabRect.left -
65
+ containerRect.left +
66
+ container.scrollLeft -
67
+ glowOffset;
68
+
69
+ // Check if the active tab is not already at the left position
70
+
71
+ if (Math.abs(scrollOffset - container.scrollLeft) > 4) {
72
+ // Adjust the scroll of the container
73
+ container.scrollLeft = scrollOffset;
74
+ }
75
+ }
76
+ }, []);
77
+
78
+ const handleTabChange = (
79
+ event:
80
+ | React.FocusEvent<HTMLLIElement>
81
+ | React.MouseEvent<HTMLLIElement>
82
+ | React.KeyboardEvent<HTMLLIElement>
83
+ ) => {
84
+ const newTab = event.currentTarget;
85
+ const newTabIndex = tabRefs.current.indexOf(newTab);
86
+ const newTabValue = tabValues[newTabIndex]!.value;
87
+
88
+ if (newTabValue !== selectedValue) {
89
+ blockElementScrollPositionUntilNextRender(newTab);
90
+ selectValue(newTabValue);
91
+ }
92
+
93
+ if (action) {
94
+ let newLanguage: Language;
95
+ if (currentLanguage && includeVariant) {
96
+ newLanguage = languageSet.filter(
97
+ (lang: Language) => lang.language === currentLanguage
98
+ )[0];
99
+ newLanguage.variant = newTabValue;
100
+ action.setSelectedVariant(newTabValue.toLowerCase());
101
+ } else if (currentLanguage && includeSample) {
102
+ newLanguage = languageSet.filter(
103
+ (lang: Language) => lang.language === currentLanguage
104
+ )[0];
105
+ newLanguage.sample = newTabValue;
106
+ action.setSelectedSample(newTabValue);
107
+ } else {
108
+ newLanguage = languageSet.filter(
109
+ (lang: Language) => lang.language === newTabValue
110
+ )[0];
111
+ action.setSelectedVariant(newLanguage.variants[0].toLowerCase());
112
+ action.setSelectedSample(newLanguage.sample);
113
+ }
114
+ action.setLanguage(newLanguage);
115
+ }
116
+ };
117
+
118
+ const handleKeydown = (event: React.KeyboardEvent<HTMLLIElement>) => {
119
+ let focusElement: HTMLLIElement | null = null;
120
+
121
+ switch (event.key) {
122
+ case "Enter": {
123
+ handleTabChange(event);
124
+ break;
125
+ }
126
+ case "ArrowRight": {
127
+ const nextTab = tabRefs.current.indexOf(event.currentTarget) + 1;
128
+ focusElement = tabRefs.current[nextTab] ?? tabRefs.current[0]!;
129
+ break;
130
+ }
131
+ case "ArrowLeft": {
132
+ const prevTab = tabRefs.current.indexOf(event.currentTarget) - 1;
133
+ focusElement =
134
+ tabRefs.current[prevTab] ??
135
+ tabRefs.current[tabRefs.current.length - 1]!;
136
+ break;
137
+ }
138
+ default:
139
+ break;
140
+ }
141
+
142
+ focusElement?.focus();
143
+ };
144
+
145
+ return (
146
+ <ul
147
+ role="tablist"
148
+ aria-orientation="horizontal"
149
+ className={clsx(
150
+ "tabs",
151
+ "openapi-tabs__code-list-container",
152
+ {
153
+ "tabs--block": block,
154
+ },
155
+ className
156
+ )}
157
+ ref={tabsScrollContainerRef}
158
+ >
159
+ {tabValues.map(({ value, label, attributes }) => (
160
+ <li
161
+ // TODO extract TabListItem
162
+ role="tab"
163
+ tabIndex={selectedValue === value ? 0 : -1}
164
+ aria-selected={selectedValue === value}
165
+ key={value}
166
+ ref={(tabControl) => {
167
+ if (tabControl) {
168
+ tabRefs.current.push(tabControl);
169
+ }
170
+ }}
171
+ onKeyDown={handleKeydown}
172
+ onClick={handleTabChange}
173
+ {...attributes}
174
+ className={clsx(
175
+ "tabs__item",
176
+ "openapi-tabs__code-item",
177
+ attributes?.className as string,
178
+ {
179
+ active: selectedValue === value,
180
+ }
181
+ )}
182
+ >
183
+ <span>{label ?? value}</span>
184
+ </li>
185
+ ))}
186
+ </ul>
187
+ );
188
+ }
189
+
190
+ function TabContent({
191
+ lazy,
192
+ children,
193
+ selectedValue,
194
+ }: CodeTabsProps & ReturnType<typeof useTabs>): React.JSX.Element | null {
195
+ const childTabs = (Array.isArray(children) ? children : [children]).filter(
196
+ Boolean
197
+ ) as ReactElement<TabItemProps>[];
198
+ if (lazy) {
199
+ const selectedTabItem = childTabs.find(
200
+ (tabItem) => tabItem.props.value === selectedValue
201
+ );
202
+ if (!selectedTabItem) {
203
+ // fail-safe or fail-fast? not sure what's best here
204
+ return null;
205
+ }
206
+ return cloneElement(selectedTabItem, { className: "margin-top--md" });
207
+ }
208
+ return (
209
+ <div className="margin-top--md openapi-tabs__code-content">
210
+ {childTabs.map((tabItem, i) =>
211
+ cloneElement(tabItem, {
212
+ key: i,
213
+ hidden: tabItem.props.value !== selectedValue,
214
+ })
215
+ )}
216
+ </div>
217
+ );
218
+ }
219
+
220
+ function TabsComponent(props: CodeTabsProps & Props): React.JSX.Element {
221
+ const tabs = useTabs(props);
222
+ const { className } = props;
223
+
224
+ return (
225
+ <div
226
+ className={clsx("tabs-container openapi-tabs__code-container", className)}
227
+ >
228
+ <TabList {...props} {...tabs} />
229
+ <TabContent {...props} {...tabs} />
230
+ </div>
231
+ );
232
+ }
233
+
234
+ export default function CodeTabs(
235
+ props: CodeTabsProps & Props
236
+ ): React.JSX.Element {
237
+ const isBrowser = useIsBrowser();
238
+ return (
239
+ <TabsComponent
240
+ // Remount tabs after hydration
241
+ // Temporary fix for https://github.com/facebook/docusaurus/issues/5653
242
+ key={String(isBrowser)}
243
+ {...props}
244
+ >
245
+ {sanitizeTabsChildren(props.children)}
246
+ </TabsComponent>
247
+ );
248
+ }
@@ -0,0 +1,38 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React from "react";
9
+
10
+ import FormItem from "@theme/ApiExplorer/FormItem";
11
+ import FormSelect from "@theme/ApiExplorer/FormSelect";
12
+ import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
13
+
14
+ import { setContentType } from "./slice";
15
+
16
+ function ContentType() {
17
+ const value = useTypedSelector((state: any) => state.contentType.value);
18
+ const options = useTypedSelector((state: any) => state.contentType.options);
19
+ const dispatch = useTypedDispatch();
20
+
21
+ if (options.length <= 1) {
22
+ return null;
23
+ }
24
+
25
+ return (
26
+ <FormItem label="Content-Type">
27
+ <FormSelect
28
+ value={value}
29
+ options={options}
30
+ onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
31
+ dispatch(setContentType(e.target.value))
32
+ }
33
+ />
34
+ </FormItem>
35
+ );
36
+ }
37
+
38
+ export default ContentType;
@@ -0,0 +1,29 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import { createSlice, PayloadAction } from "@reduxjs/toolkit";
9
+
10
+ export interface State {
11
+ value: string;
12
+ options: string[];
13
+ }
14
+
15
+ const initialState: State = {} as any;
16
+
17
+ export const slice = createSlice({
18
+ name: "contentType",
19
+ initialState,
20
+ reducers: {
21
+ setContentType: (state, action: PayloadAction<string>) => {
22
+ state.value = action.payload;
23
+ },
24
+ },
25
+ });
26
+
27
+ export const { setContentType } = slice.actions;
28
+
29
+ export default slice.reducer;
@@ -0,0 +1,47 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React from "react";
9
+
10
+ import fileSaver from "file-saver";
11
+
12
+ const saveFile = (url: string) => {
13
+ let fileName;
14
+ if (url.endsWith("json") || url.endsWith("yaml") || url.endsWith("yml")) {
15
+ fileName = url.substring(url.lastIndexOf("/") + 1);
16
+ }
17
+ fileSaver.saveAs(url, fileName ? fileName : "openapi.txt");
18
+ };
19
+
20
+ function Export({ url, proxy }: any) {
21
+ return (
22
+ <div
23
+ style={{ float: "right" }}
24
+ className="dropdown dropdown--hoverable dropdown--right"
25
+ >
26
+ <button className="export-button button button--sm button--secondary">
27
+ Export
28
+ </button>
29
+ <ul className="export-dropdown dropdown__menu">
30
+ <li>
31
+ <a
32
+ onClick={(e) => {
33
+ e.preventDefault();
34
+ saveFile(`${url}`);
35
+ }}
36
+ className="dropdown__link"
37
+ href={`${url}`}
38
+ >
39
+ OpenAPI Spec
40
+ </a>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ );
45
+ }
46
+
47
+ export default Export;
@@ -0,0 +1,27 @@
1
+ .openapi-explorer__floating-btn {
2
+ position: relative;
3
+
4
+ button {
5
+ position: relative;
6
+ background: var(--ifm-color-emphasis-900);
7
+ border: none;
8
+ border-radius: var(--ifm-global-radius);
9
+ color: var(--ifm-color-emphasis-100);
10
+ cursor: pointer;
11
+ padding: 0.4rem 0.5rem;
12
+ opacity: 0;
13
+ visibility: hidden;
14
+ transition:
15
+ opacity 0.2s ease-in-out,
16
+ visibility 0.2s ease-in-out,
17
+ bottom 0.2s ease-in-out;
18
+ position: absolute;
19
+ right: calc(var(--ifm-pre-padding) / 2);
20
+ }
21
+ }
22
+ .openapi-explorer__floating-btn:hover button,
23
+ .openapi-explorer__floating-btn:focus-visible button,
24
+ .openapi-explorer__floating-btn button:focus-visible {
25
+ visibility: visible;
26
+ opacity: 1;
27
+ }
@@ -0,0 +1,29 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React from "react";
9
+
10
+ export interface Props {
11
+ label?: string;
12
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
13
+ children?: React.ReactNode;
14
+ }
15
+
16
+ function FloatingButton({ label, onClick, children }: Props) {
17
+ return (
18
+ <div tabIndex={0} className="openapi-explorer__floating-btn">
19
+ {label && (
20
+ <button tabIndex={0} onClick={onClick}>
21
+ {label}
22
+ </button>
23
+ )}
24
+ {children}
25
+ </div>
26
+ );
27
+ }
28
+
29
+ export default FloatingButton;
@@ -0,0 +1,74 @@
1
+ .openapi-explorer__dropzone {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ cursor: pointer;
6
+ border: 2px dashed var(--openapi-monaco-border-color);
7
+ background-color: var(--openapi-input-background);
8
+
9
+ width: 100%;
10
+ border-radius: 4px;
11
+ padding: var(--ifm-pre-padding);
12
+ font-size: var(--ifm-code-font-size);
13
+
14
+ &:hover {
15
+ border: 2px dashed var(--ifm-color-primary);
16
+ background:
17
+ linear-gradient(
18
+ var(--openapi-dropzone-hover-shim),
19
+ var(--openapi-dropzone-hover-shim)
20
+ ),
21
+ linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
22
+
23
+ .openapi-explorer__dropzone-content {
24
+ color: var(--ifm-pre-color);
25
+ }
26
+ }
27
+ }
28
+
29
+ .openapi-explorer__dropzone-hover {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ cursor: pointer;
34
+ border: 2px dashed var(--openapi-monaco-border-color);
35
+ background-color: var(--openapi-input-background);
36
+ width: 100%;
37
+ border-radius: 4px;
38
+ padding: var(--ifm-pre-padding);
39
+ font-size: var(--ifm-code-font-size);
40
+ border: 2px dashed var(--ifm-color-primary);
41
+
42
+ background:
43
+ linear-gradient(
44
+ var(--openapi-dropzone-hover-shim),
45
+ var(--openapi-dropzone-hover-shim)
46
+ ),
47
+ linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
48
+
49
+ .openapi-explorer__dropzone-content {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ flex-wrap: wrap;
54
+ margin: var(--ifm-pre-padding) 0;
55
+ color: var(--ifm-pre-color);
56
+ }
57
+
58
+ .openapi-explorer__file-name {
59
+ margin: 0 calc(var(--ifm-pre-padding) * 1.5);
60
+ white-space: nowrap;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ flex: 1;
64
+ }
65
+ }
66
+
67
+ .openapi-explorer__dropzone-content {
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ flex-wrap: wrap;
72
+ margin: var(--ifm-pre-padding) 0;
73
+ color: var(--openapi-dropzone-color);
74
+ }
@@ -0,0 +1,119 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React, { useState } from "react";
9
+
10
+ import FloatingButton from "@theme/ApiExplorer/FloatingButton";
11
+ import MagicDropzone from "react-magic-dropzone";
12
+
13
+ type PreviewFile = { preview: string } & File;
14
+
15
+ interface RenderPreviewProps {
16
+ file: PreviewFile;
17
+ }
18
+
19
+ function RenderPreview({ file }: RenderPreviewProps) {
20
+ switch (file.type) {
21
+ case "image/png":
22
+ case "image/jpeg":
23
+ case "image/jpg":
24
+ case "image/svg+xml":
25
+ return (
26
+ <img
27
+ style={{
28
+ borderRadius: "4px",
29
+ }}
30
+ src={file.preview}
31
+ alt=""
32
+ />
33
+ );
34
+ default:
35
+ return (
36
+ <div
37
+ style={{
38
+ display: "flex",
39
+ alignItems: "center",
40
+ minWidth: 0,
41
+ }}
42
+ >
43
+ <svg viewBox="0 0 100 120" style={{ width: "50px", height: "60px" }}>
44
+ <path
45
+ fillRule="evenodd"
46
+ fill="#b3beca"
47
+ d="M100.000,39.790 L100.000,105.000 C100.000,113.284 93.284,120.000 85.000,120.000 L15.000,120.000 C6.716,120.000 -0.000,113.284 -0.000,105.000 L-0.000,15.000 C-0.000,6.716 6.716,-0.000 15.000,-0.000 L60.210,-0.000 L100.000,39.790 Z"
48
+ />
49
+ <path
50
+ fillRule="evenodd"
51
+ fill="#90a1b1"
52
+ transform="translate(60, 0)"
53
+ d="M0.210,-0.000 L40.000,39.790 L40.000,40.000 L15.000,40.000 C6.716,40.000 0.000,33.284 0.000,25.000 L0.000,-0.000 L0.210,-0.000 Z"
54
+ />
55
+ </svg>
56
+ <div className="openapi-explorer__file-name">{file.name}</div>
57
+ </div>
58
+ );
59
+ }
60
+ }
61
+
62
+ export interface Props {
63
+ placeholder: string;
64
+ onChange?(file?: File): any;
65
+ }
66
+
67
+ function FormFileUpload({ placeholder, onChange }: Props) {
68
+ const [hover, setHover] = useState(false);
69
+ const [file, setFile] = useState<PreviewFile>();
70
+
71
+ function setAndNotifyFile(file?: PreviewFile) {
72
+ setFile(file);
73
+ onChange?.(file);
74
+ }
75
+
76
+ function handleDrop(accepted: PreviewFile[]) {
77
+ const [file] = accepted;
78
+ setAndNotifyFile(file);
79
+ setHover(false);
80
+ }
81
+
82
+ return (
83
+ <FloatingButton>
84
+ <MagicDropzone
85
+ className={
86
+ hover
87
+ ? "openapi-explorer__dropzone-hover"
88
+ : "openapi-explorer__dropzone"
89
+ }
90
+ onDrop={handleDrop}
91
+ onDragEnter={() => setHover(true)}
92
+ onDragLeave={() => setHover(false)}
93
+ multiple={false}
94
+ style={{ marginTop: "calc(var(--ifm-pre-padding) / 2)" }}
95
+ >
96
+ {file ? (
97
+ <>
98
+ <button
99
+ style={{ marginTop: "calc(var(--ifm-pre-padding) / 2)" }}
100
+ onClick={(e) => {
101
+ e.stopPropagation();
102
+ setAndNotifyFile(undefined);
103
+ }}
104
+ >
105
+ Clear
106
+ </button>
107
+ <RenderPreview file={file} />
108
+ </>
109
+ ) : (
110
+ <div className="openapi-explorer__dropzone-content">
111
+ {placeholder}
112
+ </div>
113
+ )}
114
+ </MagicDropzone>
115
+ </FloatingButton>
116
+ );
117
+ }
118
+
119
+ export default FormFileUpload;
@@ -0,0 +1,21 @@
1
+ .openapi-explorer__form-item {
2
+ padding: var(--openapi-explorer-padding-input);
3
+ font-size: var(--openapi-explorer-font-size-input);
4
+
5
+ &:first-child {
6
+ margin-top: 0;
7
+ }
8
+
9
+ .required {
10
+ color: var(--openapi-required);
11
+ }
12
+ }
13
+
14
+ .openapi-explorer__form-item-body-container {
15
+ padding: 0;
16
+ }
17
+
18
+ .openapi-explorer__form-item-label {
19
+ font-family: var(--ifm-font-family-monospace);
20
+ font-weight: bold;
21
+ }
@@ -0,0 +1,33 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React from "react";
9
+
10
+ import clsx from "clsx";
11
+
12
+ export interface Props {
13
+ label?: string;
14
+ type?: string;
15
+ required?: boolean | undefined;
16
+ children?: React.ReactNode;
17
+ className?: string;
18
+ }
19
+
20
+ function FormItem({ label, type, required, children, className }: Props) {
21
+ return (
22
+ <div className={clsx("openapi-explorer__form-item", className)}>
23
+ {label && (
24
+ <label className="openapi-explorer__form-item-label">{label}</label>
25
+ )}
26
+ {type && <span style={{ opacity: 0.6 }}> — {type}</span>}
27
+ {required && <span className="openapi-schema__required">required</span>}
28
+ <div>{children}</div>
29
+ </div>
30
+ );
31
+ }
32
+
33
+ export default FormItem;
@@ -0,0 +1,30 @@
1
+ .openapi-explorer__multi-select-input {
2
+ width: 100%;
3
+ margin-top: calc(var(--ifm-pre-padding) / 2);
4
+ padding: 1rem;
5
+ border-radius: 4px;
6
+ border: 1px solid transparent;
7
+ background-color: var(--openapi-input-background);
8
+ outline: none;
9
+ font-size: var(--openapi-explorer-font-size-input);
10
+ color: var(--ifm-pre-color);
11
+ -moz-appearance: none;
12
+ -webkit-appearance: none;
13
+ appearance: none;
14
+
15
+ &:focus {
16
+ border: 1px solid var(--openapi-input-border);
17
+ }
18
+
19
+ &.error {
20
+ border: 1px solid var(--ifm-color-danger);
21
+ }
22
+
23
+ option {
24
+ border-radius: 0.25rem;
25
+ color: var(--ifm-menu-color);
26
+ margin: 0.25rem 0;
27
+ padding: var(--ifm-menu-link-padding-vertical)
28
+ var(--ifm-menu-link-padding-horizontal);
29
+ }
30
+ }