@soroush.tech/design-system 0.1.0

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 (373) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +278 -0
  3. package/dist/AppBar.cjs +71 -0
  4. package/dist/AppBar.d.cts +23 -0
  5. package/dist/AppBar.d.mts +23 -0
  6. package/dist/AppBar.mjs +69 -0
  7. package/dist/Avatar.cjs +106 -0
  8. package/dist/Avatar.d.cts +28 -0
  9. package/dist/Avatar.d.mts +28 -0
  10. package/dist/Avatar.mjs +103 -0
  11. package/dist/Backdrop.cjs +26 -0
  12. package/dist/Backdrop.d.cts +10 -0
  13. package/dist/Backdrop.d.mts +10 -0
  14. package/dist/Backdrop.mjs +25 -0
  15. package/dist/Button.cjs +178 -0
  16. package/dist/Button.d.cts +2 -0
  17. package/dist/Button.d.mts +2 -0
  18. package/dist/Button.mjs +175 -0
  19. package/dist/ButtonGroup.cjs +110 -0
  20. package/dist/ButtonGroup.d.cts +2 -0
  21. package/dist/ButtonGroup.d.mts +2 -0
  22. package/dist/ButtonGroup.mjs +107 -0
  23. package/dist/ButtonGroupContext-DS-kl9lG.mjs +5 -0
  24. package/dist/ButtonGroupContext-NtkVeDVE.cjs +9 -0
  25. package/dist/Card.cjs +95 -0
  26. package/dist/Card.d.cts +18 -0
  27. package/dist/Card.d.mts +18 -0
  28. package/dist/Card.mjs +93 -0
  29. package/dist/Checkbox.cjs +192 -0
  30. package/dist/Checkbox.d.cts +2 -0
  31. package/dist/Checkbox.d.mts +2 -0
  32. package/dist/Checkbox.mjs +190 -0
  33. package/dist/CircularProgress.cjs +136 -0
  34. package/dist/CircularProgress.d.cts +34 -0
  35. package/dist/CircularProgress.d.mts +34 -0
  36. package/dist/CircularProgress.mjs +133 -0
  37. package/dist/CodeBlock.cjs +101 -0
  38. package/dist/CodeBlock.d.cts +2 -0
  39. package/dist/CodeBlock.d.mts +2 -0
  40. package/dist/CodeBlock.mjs +100 -0
  41. package/dist/Drawer.cjs +69 -0
  42. package/dist/Drawer.d.cts +22 -0
  43. package/dist/Drawer.d.mts +22 -0
  44. package/dist/Drawer.mjs +66 -0
  45. package/dist/Field.cjs +59 -0
  46. package/dist/Field.d.cts +36 -0
  47. package/dist/Field.d.mts +36 -0
  48. package/dist/Field.mjs +58 -0
  49. package/dist/Flex.cjs +21 -0
  50. package/dist/Flex.d.cts +2 -0
  51. package/dist/Flex.d.mts +2 -0
  52. package/dist/Flex.mjs +19 -0
  53. package/dist/FocusTrap.cjs +82 -0
  54. package/dist/FocusTrap.d.cts +24 -0
  55. package/dist/FocusTrap.d.mts +24 -0
  56. package/dist/FocusTrap.mjs +81 -0
  57. package/dist/Form.cjs +44 -0
  58. package/dist/Form.d.cts +41 -0
  59. package/dist/Form.d.mts +41 -0
  60. package/dist/Form.mjs +42 -0
  61. package/dist/FormContext-CRmRgDgu.cjs +10 -0
  62. package/dist/FormContext-_G3sxJyQ.mjs +6 -0
  63. package/dist/FormControl.cjs +84 -0
  64. package/dist/FormControl.d.cts +78 -0
  65. package/dist/FormControl.d.mts +78 -0
  66. package/dist/FormControl.mjs +81 -0
  67. package/dist/FormControlContext-CyxdOxdN.mjs +6 -0
  68. package/dist/FormControlContext-aeKTjRKY.cjs +10 -0
  69. package/dist/FormHelperText.cjs +40 -0
  70. package/dist/FormHelperText.d.cts +16 -0
  71. package/dist/FormHelperText.d.mts +16 -0
  72. package/dist/FormHelperText.mjs +39 -0
  73. package/dist/FormLabel.cjs +34 -0
  74. package/dist/FormLabel.d.cts +2 -0
  75. package/dist/FormLabel.d.mts +2 -0
  76. package/dist/FormLabel.mjs +33 -0
  77. package/dist/Grid.cjs +37 -0
  78. package/dist/Grid.d.cts +21 -0
  79. package/dist/Grid.d.mts +21 -0
  80. package/dist/Grid.mjs +32 -0
  81. package/dist/Icon-1YtNCUKo.cjs +755 -0
  82. package/dist/Icon-CAKRmFz3.mjs +742 -0
  83. package/dist/Icon.cjs +4 -0
  84. package/dist/Icon.d.cts +2 -0
  85. package/dist/Icon.d.mts +2 -0
  86. package/dist/Icon.mjs +2 -0
  87. package/dist/Image.cjs +82 -0
  88. package/dist/Image.d.cts +2 -0
  89. package/dist/Image.d.mts +2 -0
  90. package/dist/Image.mjs +80 -0
  91. package/dist/LinearProgress.cjs +217 -0
  92. package/dist/LinearProgress.d.cts +36 -0
  93. package/dist/LinearProgress.d.mts +36 -0
  94. package/dist/LinearProgress.mjs +214 -0
  95. package/dist/Link.cjs +64 -0
  96. package/dist/Link.d.cts +2 -0
  97. package/dist/Link.d.mts +2 -0
  98. package/dist/Link.mjs +62 -0
  99. package/dist/Markdown/Control.cjs +61 -0
  100. package/dist/Markdown/Control.d.cts +18 -0
  101. package/dist/Markdown/Control.d.mts +18 -0
  102. package/dist/Markdown/Control.mjs +60 -0
  103. package/dist/Markdown/Editor.cjs +130 -0
  104. package/dist/Markdown/Editor.d.cts +40 -0
  105. package/dist/Markdown/Editor.d.mts +40 -0
  106. package/dist/Markdown/Editor.mjs +128 -0
  107. package/dist/Markdown/Preview.cjs +241 -0
  108. package/dist/Markdown/Preview.d.cts +55 -0
  109. package/dist/Markdown/Preview.d.mts +55 -0
  110. package/dist/Markdown/Preview.mjs +236 -0
  111. package/dist/Markdown/Toolbar.cjs +4 -0
  112. package/dist/Markdown/Toolbar.d.cts +13 -0
  113. package/dist/Markdown/Toolbar.d.mts +13 -0
  114. package/dist/Markdown/Toolbar.mjs +2 -0
  115. package/dist/Markdown.cjs +13 -0
  116. package/dist/Markdown.d.cts +80 -0
  117. package/dist/Markdown.d.mts +80 -0
  118. package/dist/Markdown.mjs +6 -0
  119. package/dist/MarkdownContext-BN8A3W-J.mjs +11 -0
  120. package/dist/MarkdownContext-DSwjzpH8.cjs +22 -0
  121. package/dist/MenuItem.cjs +150 -0
  122. package/dist/MenuItem.d.cts +51 -0
  123. package/dist/MenuItem.d.mts +51 -0
  124. package/dist/MenuItem.mjs +147 -0
  125. package/dist/Modal-BDMPTSXv.cjs +351 -0
  126. package/dist/Modal-DR60peRg.mjs +327 -0
  127. package/dist/Modal.cjs +6 -0
  128. package/dist/Modal.d.cts +2 -0
  129. package/dist/Modal.d.mts +2 -0
  130. package/dist/Modal.mjs +2 -0
  131. package/dist/NativeSelect.cjs +189 -0
  132. package/dist/NativeSelect.d.cts +62 -0
  133. package/dist/NativeSelect.d.mts +62 -0
  134. package/dist/NativeSelect.mjs +186 -0
  135. package/dist/Pagination/PaginationItem.cjs +116 -0
  136. package/dist/Pagination/PaginationItem.d.cts +2 -0
  137. package/dist/Pagination/PaginationItem.d.mts +2 -0
  138. package/dist/Pagination/PaginationItem.mjs +114 -0
  139. package/dist/Pagination.cjs +134 -0
  140. package/dist/Pagination.d.cts +23 -0
  141. package/dist/Pagination.d.mts +23 -0
  142. package/dist/Pagination.mjs +130 -0
  143. package/dist/Paper.cjs +51 -0
  144. package/dist/Paper.d.cts +2 -0
  145. package/dist/Paper.d.mts +2 -0
  146. package/dist/Paper.mjs +48 -0
  147. package/dist/Popover-B61J7C79.mjs +252 -0
  148. package/dist/Popover-CRDLmywF.cjs +259 -0
  149. package/dist/Popover.cjs +3 -0
  150. package/dist/Popover.d.cts +84 -0
  151. package/dist/Popover.d.mts +84 -0
  152. package/dist/Popover.mjs +2 -0
  153. package/dist/Portal.cjs +20 -0
  154. package/dist/Portal.d.cts +18 -0
  155. package/dist/Portal.d.mts +18 -0
  156. package/dist/Portal.mjs +19 -0
  157. package/dist/Quote.cjs +11 -0
  158. package/dist/Quote.d.cts +2 -0
  159. package/dist/Quote.d.mts +2 -0
  160. package/dist/Quote.mjs +10 -0
  161. package/dist/Radio.cjs +143 -0
  162. package/dist/Radio.d.cts +38 -0
  163. package/dist/Radio.d.mts +38 -0
  164. package/dist/Radio.mjs +141 -0
  165. package/dist/Select.cjs +528 -0
  166. package/dist/Select.d.cts +68 -0
  167. package/dist/Select.d.mts +68 -0
  168. package/dist/Select.mjs +525 -0
  169. package/dist/Skeleton.cjs +82 -0
  170. package/dist/Skeleton.d.cts +21 -0
  171. package/dist/Skeleton.d.mts +21 -0
  172. package/dist/Skeleton.mjs +79 -0
  173. package/dist/Switch.cjs +332 -0
  174. package/dist/Switch.d.cts +40 -0
  175. package/dist/Switch.d.mts +40 -0
  176. package/dist/Switch.mjs +329 -0
  177. package/dist/Table/Table.cjs +65 -0
  178. package/dist/Table/Table.d.cts +2 -0
  179. package/dist/Table/Table.d.mts +2 -0
  180. package/dist/Table/Table.mjs +63 -0
  181. package/dist/Table/TableBody.cjs +42 -0
  182. package/dist/Table/TableBody.d.cts +2 -0
  183. package/dist/Table/TableBody.d.mts +2 -0
  184. package/dist/Table/TableBody.mjs +40 -0
  185. package/dist/Table/TableCell.cjs +93 -0
  186. package/dist/Table/TableCell.d.cts +2 -0
  187. package/dist/Table/TableCell.d.mts +2 -0
  188. package/dist/Table/TableCell.mjs +91 -0
  189. package/dist/Table/TableContainer.cjs +15 -0
  190. package/dist/Table/TableContainer.d.cts +2 -0
  191. package/dist/Table/TableContainer.d.mts +2 -0
  192. package/dist/Table/TableContainer.mjs +14 -0
  193. package/dist/Table/TableControl.cjs +42 -0
  194. package/dist/Table/TableControl.d.cts +2 -0
  195. package/dist/Table/TableControl.d.mts +2 -0
  196. package/dist/Table/TableControl.mjs +41 -0
  197. package/dist/Table/TableFooter.cjs +42 -0
  198. package/dist/Table/TableFooter.d.cts +2 -0
  199. package/dist/Table/TableFooter.d.mts +2 -0
  200. package/dist/Table/TableFooter.mjs +40 -0
  201. package/dist/Table/TableHead.cjs +42 -0
  202. package/dist/Table/TableHead.d.cts +2 -0
  203. package/dist/Table/TableHead.d.mts +2 -0
  204. package/dist/Table/TableHead.mjs +40 -0
  205. package/dist/Table/TablePagination.cjs +89 -0
  206. package/dist/Table/TablePagination.d.cts +2 -0
  207. package/dist/Table/TablePagination.d.mts +2 -0
  208. package/dist/Table/TablePagination.mjs +88 -0
  209. package/dist/Table/TablePaginationActions.cjs +65 -0
  210. package/dist/Table/TablePaginationActions.d.cts +2 -0
  211. package/dist/Table/TablePaginationActions.d.mts +2 -0
  212. package/dist/Table/TablePaginationActions.mjs +63 -0
  213. package/dist/Table/TableRow.cjs +56 -0
  214. package/dist/Table/TableRow.d.cts +2 -0
  215. package/dist/Table/TableRow.d.mts +2 -0
  216. package/dist/Table/TableRow.mjs +54 -0
  217. package/dist/Table/TableSortLabel.cjs +62 -0
  218. package/dist/Table/TableSortLabel.d.cts +2 -0
  219. package/dist/Table/TableSortLabel.d.mts +2 -0
  220. package/dist/Table/TableSortLabel.mjs +60 -0
  221. package/dist/Table/hooks.cjs +112 -0
  222. package/dist/Table/hooks.d.cts +3 -0
  223. package/dist/Table/hooks.d.mts +3 -0
  224. package/dist/Table/hooks.mjs +109 -0
  225. package/dist/Table.cjs +31 -0
  226. package/dist/Table.d.cts +16 -0
  227. package/dist/Table.d.mts +16 -0
  228. package/dist/Table.mjs +15 -0
  229. package/dist/TableContext-2qH7XYJB.d.cts +19 -0
  230. package/dist/TableContext-2qH7XYJB.d.mts +19 -0
  231. package/dist/TableContext-BRWPghAI.mjs +6 -0
  232. package/dist/TableContext-qqp35o8z.cjs +10 -0
  233. package/dist/TableSectionContext-meIG4lFZ.mjs +5 -0
  234. package/dist/TableSectionContext-pYlJ-duI.cjs +9 -0
  235. package/dist/TextInput-6o37Zddp.cjs +231 -0
  236. package/dist/TextInput-D_lHYJlL.mjs +224 -0
  237. package/dist/TextInput.cjs +3 -0
  238. package/dist/TextInput.d.cts +2 -0
  239. package/dist/TextInput.d.mts +2 -0
  240. package/dist/TextInput.mjs +2 -0
  241. package/dist/ThemeProvider.cjs +15 -0
  242. package/dist/ThemeProvider.d.cts +20 -0
  243. package/dist/ThemeProvider.d.mts +20 -0
  244. package/dist/ThemeProvider.mjs +14 -0
  245. package/dist/ToggleButton/ToggleButton.cjs +58 -0
  246. package/dist/ToggleButton/ToggleButton.d.cts +14 -0
  247. package/dist/ToggleButton/ToggleButton.d.mts +14 -0
  248. package/dist/ToggleButton/ToggleButton.mjs +56 -0
  249. package/dist/ToggleButton/ToggleButtonGroup.cjs +54 -0
  250. package/dist/ToggleButton/ToggleButtonGroup.d.cts +23 -0
  251. package/dist/ToggleButton/ToggleButtonGroup.d.mts +23 -0
  252. package/dist/ToggleButton/ToggleButtonGroup.mjs +52 -0
  253. package/dist/ToggleButton.cjs +7 -0
  254. package/dist/ToggleButton.d.cts +4 -0
  255. package/dist/ToggleButton.d.mts +4 -0
  256. package/dist/ToggleButton.mjs +4 -0
  257. package/dist/ToggleButtonGroupContext-CqD-Afho.d.cts +15 -0
  258. package/dist/ToggleButtonGroupContext-CqD-Afho.d.mts +15 -0
  259. package/dist/ToggleButtonGroupContext-DxIyy8ze.mjs +5 -0
  260. package/dist/ToggleButtonGroupContext-Ewc5Ixas.cjs +9 -0
  261. package/dist/Toolbar-B-W22Sk4.cjs +459 -0
  262. package/dist/Toolbar-KbR97iJS.mjs +448 -0
  263. package/dist/Typography.cjs +64 -0
  264. package/dist/Typography.d.cts +3 -0
  265. package/dist/Typography.d.mts +3 -0
  266. package/dist/Typography.mjs +61 -0
  267. package/dist/View.cjs +40 -0
  268. package/dist/View.d.cts +2 -0
  269. package/dist/View.d.mts +2 -0
  270. package/dist/View.mjs +38 -0
  271. package/dist/applyAction-B2B-hnP3.mjs +98 -0
  272. package/dist/applyAction-B2uVHxOE.cjs +103 -0
  273. package/dist/createTheme-Dts2F4R_.d.cts +21 -0
  274. package/dist/createTheme-Dts2F4R_.d.mts +21 -0
  275. package/dist/hooks/useCopyToClipboard.cjs +33 -0
  276. package/dist/hooks/useCopyToClipboard.d.cts +16 -0
  277. package/dist/hooks/useCopyToClipboard.d.mts +16 -0
  278. package/dist/hooks/useCopyToClipboard.mjs +31 -0
  279. package/dist/hooks.cjs +52 -0
  280. package/dist/hooks.d.cts +40 -0
  281. package/dist/hooks.d.mts +40 -0
  282. package/dist/hooks.mjs +41 -0
  283. package/dist/index-4rC2j7fR.d.cts +46 -0
  284. package/dist/index-8dzWTpFp.d.cts +24 -0
  285. package/dist/index-B1rCD6Oo.d.cts +17 -0
  286. package/dist/index-BH8jQOdF.d.mts +46 -0
  287. package/dist/index-BLRMuO_x.d.mts +24 -0
  288. package/dist/index-BLfFycfJ.d.mts +72 -0
  289. package/dist/index-BPrjvi7B.d.cts +13 -0
  290. package/dist/index-BX5-NfbX.d.cts +94 -0
  291. package/dist/index-Bihpwn75.d.cts +64 -0
  292. package/dist/index-BlfIbAMs.d.cts +45 -0
  293. package/dist/index-BnzUumAC2.d.mts +30 -0
  294. package/dist/index-BoqlPb3Z.d.mts +13 -0
  295. package/dist/index-BqVgv2B_.d.mts +42 -0
  296. package/dist/index-Bwi4kRpf.d.mts +79 -0
  297. package/dist/index-Bx24ZnOV.d.mts +43 -0
  298. package/dist/index-C-P_hipv.d.mts +21 -0
  299. package/dist/index-C0xMvDjL.d.mts +49 -0
  300. package/dist/index-C5_ciaeo.d.cts +79 -0
  301. package/dist/index-CDVnvjIE.d.cts +27 -0
  302. package/dist/index-CDcGTGR4.d.cts +21 -0
  303. package/dist/index-CEOZI-6L.d.mts +48 -0
  304. package/dist/index-CLU39rUS2.d.mts +30 -0
  305. package/dist/index-CM_KCTee.d.cts +48 -0
  306. package/dist/index-CT9uGKrs.d.cts +30 -0
  307. package/dist/index-CcYSvIJi.d.cts +21 -0
  308. package/dist/index-CdF_4ckE.d.mts +11 -0
  309. package/dist/index-CeYkEXU2.d.cts +68 -0
  310. package/dist/index-Cl_yBpzW2.d.mts +13 -0
  311. package/dist/index-Cv_UOfYx.d.mts +18 -0
  312. package/dist/index-CxSNNzBT2.d.mts +68 -0
  313. package/dist/index-CyZYXDn0.d.cts +42 -0
  314. package/dist/index-DASvoACZ.d.cts +49 -0
  315. package/dist/index-DBGE6yKw.d.mts +16 -0
  316. package/dist/index-DCQ2fsDu.d.mts +40 -0
  317. package/dist/index-DD2AVtiR.d.cts +16 -0
  318. package/dist/index-DE5PtzPn.d.mts +27 -0
  319. package/dist/index-DOPXpr2J.d.cts +43 -0
  320. package/dist/index-DSCMXFTn.d.cts +30 -0
  321. package/dist/index-DTkQSXQD.d.cts +11 -0
  322. package/dist/index-DeJWkpf9.d.cts +16 -0
  323. package/dist/index-DeiZHSwA.d.cts +12 -0
  324. package/dist/index-Des8BisQ.d.mts +12 -0
  325. package/dist/index-Dg8-CPOO.d.cts +18 -0
  326. package/dist/index-DgRS5Aqv.d.mts +16 -0
  327. package/dist/index-Dm9HfgV6.d.mts +63 -0
  328. package/dist/index-DmJIuQJj.d.mts +24 -0
  329. package/dist/index-Dp81rWM1.d.cts +72 -0
  330. package/dist/index-Dtzj8X58.d.cts +40 -0
  331. package/dist/index-DvW2eETV.d.mts +21 -0
  332. package/dist/index-Dy03o__A.d.mts +94 -0
  333. package/dist/index-FwTocqhP.d.cts +34 -0
  334. package/dist/index-GVsFY00r.d.cts +21 -0
  335. package/dist/index-Nqco3fsM.d.cts +13 -0
  336. package/dist/index-g-9DZ_KQ.d.cts +28 -0
  337. package/dist/index-g9EThkSg.d.mts +21 -0
  338. package/dist/index-kpk9e3xM2.d.mts +45 -0
  339. package/dist/index-pX7tBQdJ.d.mts +34 -0
  340. package/dist/index-u57CbuAU2.d.mts +28 -0
  341. package/dist/index-x80UG39F.d.cts +24 -0
  342. package/dist/index-z35LEYG8.d.mts +17 -0
  343. package/dist/index.cjs +68 -0
  344. package/dist/index.d.cts +4 -0
  345. package/dist/index.d.mts +4 -0
  346. package/dist/index.mjs +3 -0
  347. package/dist/inputVariantStyles-BBkkYQtE.cjs +32 -0
  348. package/dist/inputVariantStyles-CcqpGfuP.mjs +28 -0
  349. package/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
  350. package/dist/rolldown-runtime-DDXJien1.cjs +50 -0
  351. package/dist/src-BiocWFSR.cjs +60 -0
  352. package/dist/src-DcNT2aIK.mjs +49 -0
  353. package/dist/themeDefault-B-QjpGEO.cjs +16 -0
  354. package/dist/themeDefault-CjXaY3ok.mjs +11 -0
  355. package/dist/themes-D1SAp3SL.d.mts +500 -0
  356. package/dist/themes-D81JYbqm.d.cts +500 -0
  357. package/dist/themes.cjs +318 -0
  358. package/dist/themes.d.cts +3 -0
  359. package/dist/themes.d.mts +3 -0
  360. package/dist/themes.mjs +303 -0
  361. package/dist/useDefaultProps-Cb-5FNok.cjs +19 -0
  362. package/dist/useDefaultProps-CoApb4KT.mjs +14 -0
  363. package/dist/useTableSort--XMWjujs.d.cts +51 -0
  364. package/dist/useTableSort-CpDs4cGq.d.mts +51 -0
  365. package/dist/utils/styleCache.cjs +7 -0
  366. package/dist/utils/styleCache.d.cts +3 -0
  367. package/dist/utils/styleCache.d.mts +4 -0
  368. package/dist/utils/styleCache.mjs +5 -0
  369. package/dist/utils.cjs +65 -0
  370. package/dist/utils.d.cts +39 -0
  371. package/dist/utils.d.mts +39 -0
  372. package/dist/utils.mjs +58 -0
  373. package/package.json +125 -0
@@ -0,0 +1,190 @@
1
+ import { a as createShouldForwardProp, c as props, d as styled, l as src_exports } from "./src-DcNT2aIK.mjs";
2
+ import { t as themeDefault } from "./themeDefault-CjXaY3ok.mjs";
3
+ import { useFormControl } from "./FormControl.mjs";
4
+ import { useEffect, useRef } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/Checkbox/Checkbox.tsx
7
+ const UncheckedIcon = () => /* @__PURE__ */ jsx("svg", {
8
+ viewBox: "0 0 18 18",
9
+ width: "1em",
10
+ height: "1em",
11
+ fill: "none",
12
+ "aria-hidden": "true",
13
+ children: /* @__PURE__ */ jsx("rect", {
14
+ x: "1.5",
15
+ y: "1.5",
16
+ width: "15",
17
+ height: "15",
18
+ rx: "2.5",
19
+ stroke: "currentColor",
20
+ strokeWidth: "1.5"
21
+ })
22
+ });
23
+ const CheckedIcon = () => /* @__PURE__ */ jsxs("svg", {
24
+ viewBox: "0 0 18 18",
25
+ width: "1em",
26
+ height: "1em",
27
+ "aria-hidden": "true",
28
+ children: [/* @__PURE__ */ jsx("rect", {
29
+ width: "18",
30
+ height: "18",
31
+ rx: "3",
32
+ fill: "currentColor"
33
+ }), /* @__PURE__ */ jsx("path", {
34
+ d: "M4.5 9L7.5 12L13.5 6",
35
+ stroke: "white",
36
+ strokeWidth: "1.8",
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round",
39
+ fill: "none"
40
+ })]
41
+ });
42
+ const IndeterminateIcon = () => /* @__PURE__ */ jsxs("svg", {
43
+ viewBox: "0 0 18 18",
44
+ width: "1em",
45
+ height: "1em",
46
+ "aria-hidden": "true",
47
+ children: [/* @__PURE__ */ jsx("rect", {
48
+ width: "18",
49
+ height: "18",
50
+ rx: "3",
51
+ fill: "currentColor"
52
+ }), /* @__PURE__ */ jsx("rect", {
53
+ x: "4.5",
54
+ y: "8.1",
55
+ width: "9",
56
+ height: "1.8",
57
+ rx: "0.9",
58
+ fill: "white"
59
+ })]
60
+ });
61
+ const HiddenInput = styled("input", {
62
+ name: "Checkbox",
63
+ slot: "input",
64
+ label: "CheckboxInput"
65
+ })({
66
+ position: "absolute",
67
+ width: 0,
68
+ height: 0,
69
+ opacity: 0,
70
+ margin: 0,
71
+ padding: 0,
72
+ pointerEvents: "none"
73
+ });
74
+ const CheckboxIconWrapper = styled("span", {
75
+ name: "Checkbox",
76
+ slot: "icon",
77
+ label: "CheckboxIcon",
78
+ shouldForwardProp: (prop) => prop !== "size"
79
+ })(({ theme, size = themeDefault(theme, "size", "md") }) => ({
80
+ display: "inline-flex",
81
+ alignItems: "center",
82
+ justifyContent: "center",
83
+ flexShrink: 0,
84
+ fontSize: theme.icon[size],
85
+ lineHeight: 0,
86
+ transition: "color 0.15s ease"
87
+ }));
88
+ const shouldForwardProp = createShouldForwardProp([
89
+ ...props,
90
+ "color",
91
+ "size",
92
+ "disabled",
93
+ "fullWidth"
94
+ ]);
95
+ const baseStyle = ({ disabled, theme }) => ({
96
+ display: "inline-flex",
97
+ alignItems: "center",
98
+ position: "relative",
99
+ cursor: disabled ? "not-allowed" : "pointer",
100
+ gap: (theme?.space)?.[1],
101
+ userSelect: "none",
102
+ ...disabled && { opacity: .5 },
103
+ "& input:not(:checked):not(:indeterminate) ~ span > .cb-checked": { display: "none" },
104
+ "& input:not(:checked):not(:indeterminate) ~ span > .cb-indeterminate": { display: "none" },
105
+ "& input:checked:not(:indeterminate) ~ span > .cb-unchecked": { display: "none" },
106
+ "& input:checked:not(:indeterminate) ~ span > .cb-indeterminate": { display: "none" },
107
+ "& input:indeterminate ~ span > .cb-unchecked": { display: "none" },
108
+ "& input:indeterminate ~ span > .cb-checked": { display: "none" },
109
+ "&:has(input:focus-visible) > span:first-of-type": {
110
+ outline: `2px solid ${theme.palette.primary.main}`,
111
+ outlineOffset: "2px",
112
+ borderRadius: "3px"
113
+ }
114
+ });
115
+ const colorStyle = ({ theme, color = themeDefault(theme, "neutralColor", "default") }) => {
116
+ return { color: color === "default" ? theme.text.secondary : theme.palette[color].main };
117
+ };
118
+ const fullWidthStyle = ({ fullWidth }) => fullWidth ? {
119
+ display: "flex",
120
+ width: "100%"
121
+ } : {};
122
+ const CheckboxRoot = styled("label", {
123
+ name: "Checkbox",
124
+ label: "Checkbox",
125
+ shouldForwardProp,
126
+ systemProps: [src_exports.space]
127
+ })(baseStyle, colorStyle, fullWidthStyle);
128
+ function Checkbox({ checked, defaultChecked, disabled: disabledProp, color: colorProp, size: sizeProp, fullWidth: fullWidthProp, indeterminate = false, icon, checkedIcon, onChange, id: idProp, required: requiredProp, name, value, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestid, ...spaceProps }) {
129
+ const fc = useFormControl({
130
+ id: idProp,
131
+ disabled: disabledProp,
132
+ required: requiredProp,
133
+ size: sizeProp,
134
+ fullWidth: fullWidthProp
135
+ });
136
+ const { id, disabled, required, size, fullWidth } = fc;
137
+ const color = colorProp ?? fc.color;
138
+ const describedBy = ariaDescribedby ?? fc["aria-describedby"];
139
+ const inputRef = useRef(null);
140
+ useEffect(() => {
141
+ inputRef.current.indeterminate = indeterminate;
142
+ }, [indeterminate]);
143
+ return /* @__PURE__ */ jsxs(CheckboxRoot, {
144
+ color,
145
+ size,
146
+ disabled,
147
+ fullWidth,
148
+ className,
149
+ "data-testid": dataTestid,
150
+ ...spaceProps,
151
+ children: [
152
+ /* @__PURE__ */ jsx(HiddenInput, {
153
+ ref: inputRef,
154
+ type: "checkbox",
155
+ checked,
156
+ defaultChecked,
157
+ disabled,
158
+ id,
159
+ required,
160
+ name,
161
+ value,
162
+ onChange,
163
+ "data-indeterminate": indeterminate || void 0,
164
+ "aria-label": ariaLabel,
165
+ "aria-labelledby": ariaLabelledby,
166
+ "aria-describedby": describedBy
167
+ }),
168
+ /* @__PURE__ */ jsxs(CheckboxIconWrapper, {
169
+ size,
170
+ children: [
171
+ /* @__PURE__ */ jsx("span", {
172
+ className: "cb-unchecked",
173
+ children: icon ?? /* @__PURE__ */ jsx(UncheckedIcon, {})
174
+ }),
175
+ /* @__PURE__ */ jsx("span", {
176
+ className: "cb-checked",
177
+ children: checkedIcon ?? /* @__PURE__ */ jsx(CheckedIcon, {})
178
+ }),
179
+ /* @__PURE__ */ jsx("span", {
180
+ className: "cb-indeterminate",
181
+ children: /* @__PURE__ */ jsx(IndeterminateIcon, {})
182
+ })
183
+ ]
184
+ }),
185
+ children != null && /* @__PURE__ */ jsx("span", { children })
186
+ ]
187
+ });
188
+ }
189
+ //#endregion
190
+ export { Checkbox };
@@ -0,0 +1,136 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_src = require("./src-BiocWFSR.cjs");
3
+ const require_themeDefault = require("./themeDefault-B-QjpGEO.cjs");
4
+ const require_utils = require("./utils.cjs");
5
+ require("react");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
8
+ let _emotion_react = require("@emotion/react");
9
+ //#region src/CircularProgress/CircularProgress.tsx
10
+ const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
11
+ ..._soroush_tech_styled_system_should_forward_prop.props,
12
+ "color",
13
+ "size",
14
+ "thickness",
15
+ "variant",
16
+ "disableShrink",
17
+ "value",
18
+ "min",
19
+ "max",
20
+ "spinning",
21
+ "easing",
22
+ "showTrack"
23
+ ]);
24
+ const VIEWBOX = 44;
25
+ const SIZE_DEFAULT = 40;
26
+ const THICKNESS_DEFAULT = 3.6;
27
+ const rotate = (0, _emotion_react.keyframes)({
28
+ "0%": { transform: "rotate(0deg)" },
29
+ "100%": { transform: "rotate(360deg)" }
30
+ });
31
+ const dash = (0, _emotion_react.keyframes)({
32
+ "0%": {
33
+ strokeDasharray: "1px, 200px",
34
+ strokeDashoffset: "0px"
35
+ },
36
+ "50%": {
37
+ strokeDasharray: "100px, 200px",
38
+ strokeDashoffset: "-15px"
39
+ },
40
+ "100%": {
41
+ strokeDasharray: "100px, 200px",
42
+ strokeDashoffset: "-125px"
43
+ }
44
+ });
45
+ const CircularProgressTrack = require_src.styled("circle", {
46
+ name: "CircularProgress",
47
+ slot: "track",
48
+ label: "CircularProgressTrack"
49
+ })({
50
+ fill: "none",
51
+ stroke: "currentColor",
52
+ opacity: .2
53
+ });
54
+ const CircularProgressCircle = require_src.styled("circle", {
55
+ name: "CircularProgress",
56
+ slot: "circle",
57
+ label: "CircularProgressCircle",
58
+ shouldForwardProp: (prop) => prop !== "variant" && prop !== "disableShrink"
59
+ })(({ variant, disableShrink }) => ({
60
+ fill: "none",
61
+ stroke: "currentColor",
62
+ ...variant === "indeterminate" ? {
63
+ strokeDasharray: "80px, 200px",
64
+ strokeDashoffset: "0px",
65
+ ...!disableShrink && { animation: `${dash} 1.4s ease-in-out infinite` }
66
+ } : {}
67
+ }));
68
+ const colorStyle = ({ color: colorProp, theme }) => {
69
+ const color = colorProp ?? require_themeDefault.themeDefault(theme, "color", "primary");
70
+ if (color === "inherit") return {};
71
+ return { color: theme.palette[color].main };
72
+ };
73
+ const sizeStyle = ({ size = SIZE_DEFAULT }) => ({
74
+ display: "inline-flex",
75
+ width: size,
76
+ height: size,
77
+ flexShrink: 0,
78
+ verticalAlign: "middle"
79
+ });
80
+ const rotationStyle = ({ variant = "indeterminate", spinning, easing = "linear" }) => variant === "indeterminate" || spinning ? { animation: `${rotate} 1.4s ${easing} infinite` } : {};
81
+ const safeLayout = (props) => (0, require_src.src_exports.layout)({
82
+ ...props,
83
+ size: void 0
84
+ });
85
+ const CircularProgressRoot = require_src.styled("span", {
86
+ name: "CircularProgress",
87
+ label: "CircularProgress",
88
+ shouldForwardProp,
89
+ systemProps: [require_src.src_exports.space, safeLayout]
90
+ })(colorStyle, sizeStyle, rotationStyle);
91
+ function CircularProgress({ variant = "indeterminate", color, size = SIZE_DEFAULT, thickness = THICKNESS_DEFAULT, value, min = 0, max = 100, disableShrink = false, spinning = false, easing = "linear", showTrack = false, ...rest }) {
92
+ const r = (VIEWBOX - thickness * 2) / 2;
93
+ const circumference = 2 * Math.PI * r;
94
+ const normalizedValue = require_utils.clamp(value ?? min, min, max);
95
+ const circleStyle = variant === "determinate" ? {
96
+ strokeDasharray: `${circumference}px`,
97
+ strokeDashoffset: `${circumference * (1 - normalizedValue / max)}px`,
98
+ transition: `stroke-dashoffset 0.3s ${easing}`
99
+ } : void 0;
100
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CircularProgressRoot, {
101
+ role: "progressbar",
102
+ "aria-label": "Loading",
103
+ color,
104
+ size,
105
+ variant,
106
+ spinning,
107
+ easing,
108
+ ...variant === "determinate" ? {
109
+ "aria-valuenow": value,
110
+ "aria-valuemin": min,
111
+ "aria-valuemax": max
112
+ } : {},
113
+ ...rest,
114
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
115
+ viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
116
+ width: "100%",
117
+ height: "100%",
118
+ children: [showTrack && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CircularProgressTrack, {
119
+ cx: VIEWBOX / 2,
120
+ cy: VIEWBOX / 2,
121
+ r,
122
+ strokeWidth: thickness
123
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CircularProgressCircle, {
124
+ cx: VIEWBOX / 2,
125
+ cy: VIEWBOX / 2,
126
+ r,
127
+ strokeWidth: thickness,
128
+ style: circleStyle,
129
+ variant,
130
+ disableShrink
131
+ })]
132
+ })
133
+ });
134
+ }
135
+ //#endregion
136
+ exports.CircularProgress = CircularProgress;
@@ -0,0 +1,34 @@
1
+ import { l as index_d_exports, o as Theme } from "./index-Bihpwn75.cjs";
2
+ import { n as ButtonColor } from "./index-DASvoACZ.cjs";
3
+ import { HTMLAttributes } from "react";
4
+ //#region src/CircularProgress/CircularProgress.d.ts
5
+ type CircularProgressVariant = 'indeterminate' | 'determinate';
6
+ type CircularProgressColor = ButtonColor | 'inherit';
7
+ type CircularProgressEasing = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
8
+ interface CircularProgressProps extends HTMLAttributes<HTMLSpanElement>, Omit<index_d_exports.SpaceProps<Theme>, keyof index_d_exports.PaddingProps>, index_d_exports.LayoutProps<Theme> {
9
+ /** Visual variant — looping animation or value-driven arc. Default: `'indeterminate'`. */
10
+ variant?: CircularProgressVariant;
11
+ /** Stroke color — resolves to `theme.palette[color].main`; `'inherit'` uses `currentColor`. Default: 'primary', overridable via `theme.defaults.color`. */
12
+ color?: CircularProgressColor;
13
+ /** Width and height. Number → px; string → raw CSS unit (e.g. `'3rem'`). Default: `40`. */
14
+ size?: number | string;
15
+ /** SVG stroke width in viewBox user units. Default: `3.6`. */
16
+ thickness?: number;
17
+ /** Progress value for the `'determinate'` variant. Clamped between `min` and `max`. */
18
+ value?: number;
19
+ /** Minimum value for `'determinate'`. Default: `0`. */
20
+ min?: number;
21
+ /** Maximum value for `'determinate'`. Default: `100`. */
22
+ max?: number;
23
+ /** Disables the stroke shrink/expand animation (`'indeterminate'` only). */
24
+ disableShrink?: boolean;
25
+ /** Applies the rotation animation to a `'determinate'` arc — arc length reflects `value` while the spinner still rotates. */
26
+ spinning?: boolean;
27
+ /** Timing function for the rotation animation. Default: `'linear'`. */
28
+ easing?: CircularProgressEasing;
29
+ /** Renders a faint full-ring track behind the progress arc. Default: `false`. */
30
+ showTrack?: boolean;
31
+ }
32
+ declare function CircularProgress({ variant, color, size, thickness, value, min, max, disableShrink, spinning, easing, showTrack, ...rest }: Readonly<CircularProgressProps>): import("react").JSX.Element;
33
+ //#endregion
34
+ export { CircularProgress, CircularProgressColor, CircularProgressEasing, CircularProgressProps, CircularProgressVariant };
@@ -0,0 +1,34 @@
1
+ import { l as index_d_exports, o as Theme } from "./index-Dm9HfgV6.mjs";
2
+ import { n as ButtonColor } from "./index-C0xMvDjL.mjs";
3
+ import { HTMLAttributes } from "react";
4
+ //#region src/CircularProgress/CircularProgress.d.ts
5
+ type CircularProgressVariant = 'indeterminate' | 'determinate';
6
+ type CircularProgressColor = ButtonColor | 'inherit';
7
+ type CircularProgressEasing = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
8
+ interface CircularProgressProps extends HTMLAttributes<HTMLSpanElement>, Omit<index_d_exports.SpaceProps<Theme>, keyof index_d_exports.PaddingProps>, index_d_exports.LayoutProps<Theme> {
9
+ /** Visual variant — looping animation or value-driven arc. Default: `'indeterminate'`. */
10
+ variant?: CircularProgressVariant;
11
+ /** Stroke color — resolves to `theme.palette[color].main`; `'inherit'` uses `currentColor`. Default: 'primary', overridable via `theme.defaults.color`. */
12
+ color?: CircularProgressColor;
13
+ /** Width and height. Number → px; string → raw CSS unit (e.g. `'3rem'`). Default: `40`. */
14
+ size?: number | string;
15
+ /** SVG stroke width in viewBox user units. Default: `3.6`. */
16
+ thickness?: number;
17
+ /** Progress value for the `'determinate'` variant. Clamped between `min` and `max`. */
18
+ value?: number;
19
+ /** Minimum value for `'determinate'`. Default: `0`. */
20
+ min?: number;
21
+ /** Maximum value for `'determinate'`. Default: `100`. */
22
+ max?: number;
23
+ /** Disables the stroke shrink/expand animation (`'indeterminate'` only). */
24
+ disableShrink?: boolean;
25
+ /** Applies the rotation animation to a `'determinate'` arc — arc length reflects `value` while the spinner still rotates. */
26
+ spinning?: boolean;
27
+ /** Timing function for the rotation animation. Default: `'linear'`. */
28
+ easing?: CircularProgressEasing;
29
+ /** Renders a faint full-ring track behind the progress arc. Default: `false`. */
30
+ showTrack?: boolean;
31
+ }
32
+ declare function CircularProgress({ variant, color, size, thickness, value, min, max, disableShrink, spinning, easing, showTrack, ...rest }: Readonly<CircularProgressProps>): import("react").JSX.Element;
33
+ //#endregion
34
+ export { CircularProgress, CircularProgressColor, CircularProgressEasing, CircularProgressProps, CircularProgressVariant };
@@ -0,0 +1,133 @@
1
+ import { a as createShouldForwardProp, c as props, d as styled, l as src_exports, s as keyframes } from "./src-DcNT2aIK.mjs";
2
+ import { t as themeDefault } from "./themeDefault-CjXaY3ok.mjs";
3
+ import { clamp } from "./utils.mjs";
4
+ import "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/CircularProgress/CircularProgress.tsx
7
+ const shouldForwardProp = createShouldForwardProp([
8
+ ...props,
9
+ "color",
10
+ "size",
11
+ "thickness",
12
+ "variant",
13
+ "disableShrink",
14
+ "value",
15
+ "min",
16
+ "max",
17
+ "spinning",
18
+ "easing",
19
+ "showTrack"
20
+ ]);
21
+ const VIEWBOX = 44;
22
+ const SIZE_DEFAULT = 40;
23
+ const THICKNESS_DEFAULT = 3.6;
24
+ const rotate = keyframes({
25
+ "0%": { transform: "rotate(0deg)" },
26
+ "100%": { transform: "rotate(360deg)" }
27
+ });
28
+ const dash = keyframes({
29
+ "0%": {
30
+ strokeDasharray: "1px, 200px",
31
+ strokeDashoffset: "0px"
32
+ },
33
+ "50%": {
34
+ strokeDasharray: "100px, 200px",
35
+ strokeDashoffset: "-15px"
36
+ },
37
+ "100%": {
38
+ strokeDasharray: "100px, 200px",
39
+ strokeDashoffset: "-125px"
40
+ }
41
+ });
42
+ const CircularProgressTrack = styled("circle", {
43
+ name: "CircularProgress",
44
+ slot: "track",
45
+ label: "CircularProgressTrack"
46
+ })({
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ opacity: .2
50
+ });
51
+ const CircularProgressCircle = styled("circle", {
52
+ name: "CircularProgress",
53
+ slot: "circle",
54
+ label: "CircularProgressCircle",
55
+ shouldForwardProp: (prop) => prop !== "variant" && prop !== "disableShrink"
56
+ })(({ variant, disableShrink }) => ({
57
+ fill: "none",
58
+ stroke: "currentColor",
59
+ ...variant === "indeterminate" ? {
60
+ strokeDasharray: "80px, 200px",
61
+ strokeDashoffset: "0px",
62
+ ...!disableShrink && { animation: `${dash} 1.4s ease-in-out infinite` }
63
+ } : {}
64
+ }));
65
+ const colorStyle = ({ color: colorProp, theme }) => {
66
+ const color = colorProp ?? themeDefault(theme, "color", "primary");
67
+ if (color === "inherit") return {};
68
+ return { color: theme.palette[color].main };
69
+ };
70
+ const sizeStyle = ({ size = SIZE_DEFAULT }) => ({
71
+ display: "inline-flex",
72
+ width: size,
73
+ height: size,
74
+ flexShrink: 0,
75
+ verticalAlign: "middle"
76
+ });
77
+ const rotationStyle = ({ variant = "indeterminate", spinning, easing = "linear" }) => variant === "indeterminate" || spinning ? { animation: `${rotate} 1.4s ${easing} infinite` } : {};
78
+ const safeLayout = (props) => (0, src_exports.layout)({
79
+ ...props,
80
+ size: void 0
81
+ });
82
+ const CircularProgressRoot = styled("span", {
83
+ name: "CircularProgress",
84
+ label: "CircularProgress",
85
+ shouldForwardProp,
86
+ systemProps: [src_exports.space, safeLayout]
87
+ })(colorStyle, sizeStyle, rotationStyle);
88
+ function CircularProgress({ variant = "indeterminate", color, size = SIZE_DEFAULT, thickness = THICKNESS_DEFAULT, value, min = 0, max = 100, disableShrink = false, spinning = false, easing = "linear", showTrack = false, ...rest }) {
89
+ const r = (VIEWBOX - thickness * 2) / 2;
90
+ const circumference = 2 * Math.PI * r;
91
+ const normalizedValue = clamp(value ?? min, min, max);
92
+ const circleStyle = variant === "determinate" ? {
93
+ strokeDasharray: `${circumference}px`,
94
+ strokeDashoffset: `${circumference * (1 - normalizedValue / max)}px`,
95
+ transition: `stroke-dashoffset 0.3s ${easing}`
96
+ } : void 0;
97
+ return /* @__PURE__ */ jsx(CircularProgressRoot, {
98
+ role: "progressbar",
99
+ "aria-label": "Loading",
100
+ color,
101
+ size,
102
+ variant,
103
+ spinning,
104
+ easing,
105
+ ...variant === "determinate" ? {
106
+ "aria-valuenow": value,
107
+ "aria-valuemin": min,
108
+ "aria-valuemax": max
109
+ } : {},
110
+ ...rest,
111
+ children: /* @__PURE__ */ jsxs("svg", {
112
+ viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
113
+ width: "100%",
114
+ height: "100%",
115
+ children: [showTrack && /* @__PURE__ */ jsx(CircularProgressTrack, {
116
+ cx: VIEWBOX / 2,
117
+ cy: VIEWBOX / 2,
118
+ r,
119
+ strokeWidth: thickness
120
+ }), /* @__PURE__ */ jsx(CircularProgressCircle, {
121
+ cx: VIEWBOX / 2,
122
+ cy: VIEWBOX / 2,
123
+ r,
124
+ strokeWidth: thickness,
125
+ style: circleStyle,
126
+ variant,
127
+ disableShrink
128
+ })]
129
+ })
130
+ });
131
+ }
132
+ //#endregion
133
+ export { CircularProgress };
@@ -0,0 +1,101 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_src = require("./src-BiocWFSR.cjs");
3
+ const require_hooks_useCopyToClipboard = require("./hooks/useCopyToClipboard.cjs");
4
+ const require_View = require("./View.cjs");
5
+ const require_Button = require("./Button.cjs");
6
+ const require_Icon = require("./Icon-1YtNCUKo.cjs");
7
+ let react = require("react");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ //#region src/CodeBlock/CodeBlock.tsx
10
+ const syntaxStyles = ({ theme }) => ({
11
+ color: theme.syntax.base,
12
+ fontFamily: theme.fonts.mono,
13
+ "& .hljs-comment, & .hljs-quote, & .hljs-doctag, & .hljs-meta.prompt_": {
14
+ color: theme.syntax.comment,
15
+ fontStyle: "italic"
16
+ },
17
+ "& .hljs-keyword, & .hljs-built_in, & .hljs-literal, & .hljs-selector-tag, & .hljs-selector-pseudo, & .hljs-selector-attr": { color: theme.syntax.keyword },
18
+ "& .hljs-type, & .hljs-title.class_": { color: theme.syntax.type },
19
+ "& .hljs-string, & .hljs-regexp, & .hljs-char, & .hljs-meta .hljs-string, & .hljs-addition": { color: theme.syntax.string },
20
+ "& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-link": { color: theme.syntax.number },
21
+ "& .hljs-variable.constant_, & .hljs-property": { color: theme.syntax.constant },
22
+ "& .hljs-title, & .hljs-section, & .hljs-attr, & .hljs-attribute, & .hljs-selector-id": { color: theme.syntax.title },
23
+ "& .hljs-tag, & .hljs-name, & .hljs-meta, & .hljs-variable, & .hljs-selector-class, & .hljs-deletion": { color: theme.syntax.tag },
24
+ "& .hljs-emphasis": { fontStyle: "italic" },
25
+ "& .hljs-strong": { fontWeight: "bold" }
26
+ });
27
+ const CodeSurface = require_src.styled(require_View.View, {
28
+ name: "CodeBlock",
29
+ slot: "surface",
30
+ label: "CodeSurface"
31
+ })(syntaxStyles);
32
+ const Wrapper = require_src.styled(require_View.View, {
33
+ name: "CodeBlock",
34
+ label: "CodeBlock"
35
+ })({
36
+ display: "grid",
37
+ gridTemplateColumns: "minmax(0, 1fr)",
38
+ "& .code-copy": {
39
+ opacity: 0,
40
+ transition: "opacity 120ms ease"
41
+ },
42
+ "&:hover .code-copy, &:focus-within .code-copy": { opacity: 1 },
43
+ "@media (hover: none)": { "& .code-copy": { opacity: 1 } }
44
+ });
45
+ /**
46
+ * Fenced-code block: a horizontally scrollable, syntax-highlighted surface with a
47
+ * copy-to-clipboard button that sticks to the top-right while the block is in view.
48
+ */
49
+ function CodeBlock({ children, ...rest }) {
50
+ const surfaceRef = (0, react.useRef)(null);
51
+ const { copied, copy } = require_hooks_useCopyToClipboard.useCopyToClipboard();
52
+ const handleCopy = () => {
53
+ const raw = surfaceRef.current.textContent;
54
+ let end = raw.length;
55
+ while (end > 0 && raw[end - 1] === "\n") end--;
56
+ const text = raw.slice(0, end);
57
+ if (text) copy(text);
58
+ };
59
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, {
60
+ my: 2,
61
+ position: "relative",
62
+ ...rest,
63
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_View.View, {
64
+ position: "absolute",
65
+ top: "8px",
66
+ right: "8px",
67
+ zIndex: 1,
68
+ bg: "paper",
69
+ borderRadius: "sm",
70
+ className: "code-copy",
71
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
72
+ type: "button",
73
+ variant: "outlined",
74
+ color: "default",
75
+ size: "sm",
76
+ borderRadius: "sm",
77
+ onClick: handleCopy,
78
+ "aria-label": copied ? "Copied" : "Copy code",
79
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
80
+ name: copied ? "check" : "content_copy",
81
+ color: copied ? "success" : "primary",
82
+ size: "1.1rem"
83
+ })
84
+ })
85
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodeSurface, {
86
+ as: "pre",
87
+ tabIndex: 0,
88
+ ref: surfaceRef,
89
+ bg: "terminal",
90
+ p: 3,
91
+ borderRadius: "md",
92
+ borderColor: "light",
93
+ borderWidth: "thin",
94
+ maxWidth: "100%",
95
+ overflow: "auto",
96
+ children
97
+ })]
98
+ });
99
+ }
100
+ //#endregion
101
+ exports.CodeBlock = CodeBlock;
@@ -0,0 +1,2 @@
1
+ import { n as CodeBlockProps, t as CodeBlock } from "./index-BPrjvi7B.cjs";
2
+ export { CodeBlock, CodeBlockProps };
@@ -0,0 +1,2 @@
1
+ import { n as CodeBlockProps, t as CodeBlock } from "./index-BoqlPb3Z.mjs";
2
+ export { CodeBlock, CodeBlockProps };