@md-code/components 0.0.0-stage → 0.0.2

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 (344) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +202 -0
  3. package/README.md +77 -2
  4. package/dist/assets/favicon.ico +0 -0
  5. package/dist/assets/logo.png +0 -0
  6. package/dist/atoms/Loading/ouroboros.svg +41 -0
  7. package/dist/atoms/Logo/logo.jpg +0 -0
  8. package/dist/avatar.js +8 -0
  9. package/dist/badge.js +25 -0
  10. package/dist/breadcrumbs.js +60 -0
  11. package/dist/button.js +203 -0
  12. package/dist/calendar.js +101 -0
  13. package/dist/caption.js +14 -0
  14. package/dist/card.js +82 -0
  15. package/dist/carousel.js +125 -0
  16. package/dist/central-modal.js +22 -0
  17. package/dist/chip.js +42 -0
  18. package/dist/circle-image.js +22 -0
  19. package/dist/code-preview.js +38 -0
  20. package/dist/code-view-tokenizer.js +35 -0
  21. package/dist/code-view.js +96 -0
  22. package/dist/conditional-wrapper.js +5 -0
  23. package/dist/containers.js +115 -0
  24. package/dist/diff-legend.js +31 -0
  25. package/dist/div-input.js +103 -0
  26. package/dist/empty.js +12 -0
  27. package/dist/filter-bar.js +15 -0
  28. package/dist/form-label.js +19 -0
  29. package/dist/form.js +17 -0
  30. package/dist/full-screen-modal.js +27 -0
  31. package/dist/header.js +19 -0
  32. package/dist/html-editor.js +81 -0
  33. package/dist/icons.js +42 -0
  34. package/dist/input.js +62 -0
  35. package/dist/link.js +35 -0
  36. package/dist/loading.js +182 -0
  37. package/dist/logo.js +12 -0
  38. package/dist/modals.js +130 -0
  39. package/dist/molecules/Carousel/arrow.svg +5 -0
  40. package/dist/molecules/Select/arrow_down.svg +3 -0
  41. package/dist/mono-text.js +16 -0
  42. package/dist/nav-tabs.js +33 -0
  43. package/dist/page-header.js +20 -0
  44. package/dist/pagination.js +119 -0
  45. package/dist/progress-bar.js +26 -0
  46. package/dist/radio.js +73 -0
  47. package/dist/report-ui.js +358 -0
  48. package/dist/row.js +15 -0
  49. package/dist/score-panel.js +125 -0
  50. package/dist/score-pills.js +25 -0
  51. package/dist/search-input.js +84 -0
  52. package/dist/select.js +164 -0
  53. package/dist/separator.js +16 -0
  54. package/dist/slider-field.js +34 -0
  55. package/dist/stack.js +16 -0
  56. package/dist/stat-grid.js +10 -0
  57. package/dist/stat.js +24 -0
  58. package/dist/status-label.js +63 -0
  59. package/dist/status-text.js +13 -0
  60. package/dist/submit.js +57 -0
  61. package/dist/subtle-text.js +14 -0
  62. package/dist/surface.js +39 -0
  63. package/dist/switch.js +99 -0
  64. package/dist/table.js +132 -0
  65. package/dist/tabs.js +156 -0
  66. package/dist/text-checkbox.js +64 -0
  67. package/dist/text-link.js +20 -0
  68. package/dist/textarea.js +56 -0
  69. package/dist/textures/Cloud/clouds.svg +52 -0
  70. package/dist/textures.js +170 -0
  71. package/dist/toasts.js +79 -0
  72. package/dist/toggle.js +66 -0
  73. package/dist/token-input-field.js +56 -0
  74. package/dist/tooltip.js +95 -0
  75. package/dist/types/atoms/Avatar/index.d.ts +6 -0
  76. package/dist/types/atoms/Avatar/index.d.ts.map +1 -0
  77. package/dist/types/atoms/Breadcrumbs/index.d.ts +10 -0
  78. package/dist/types/atoms/Breadcrumbs/index.d.ts.map +1 -0
  79. package/dist/types/atoms/Breadcrumbs/styles.d.ts +95 -0
  80. package/dist/types/atoms/Breadcrumbs/styles.d.ts.map +1 -0
  81. package/dist/types/atoms/Calendar/index.d.ts +4 -0
  82. package/dist/types/atoms/Calendar/index.d.ts.map +1 -0
  83. package/dist/types/atoms/Calendar/styles.d.ts +12 -0
  84. package/dist/types/atoms/Calendar/styles.d.ts.map +1 -0
  85. package/dist/types/atoms/Caption/index.d.ts +9 -0
  86. package/dist/types/atoms/Caption/index.d.ts.map +1 -0
  87. package/dist/types/atoms/Caption/styles.d.ts +9 -0
  88. package/dist/types/atoms/Caption/styles.d.ts.map +1 -0
  89. package/dist/types/atoms/CentralModal/index.d.ts +3 -0
  90. package/dist/types/atoms/CentralModal/index.d.ts.map +1 -0
  91. package/dist/types/atoms/Chip/index.d.ts +39 -0
  92. package/dist/types/atoms/Chip/index.d.ts.map +1 -0
  93. package/dist/types/atoms/Chip/styles.d.ts +19 -0
  94. package/dist/types/atoms/Chip/styles.d.ts.map +1 -0
  95. package/dist/types/atoms/CircleImage/index.d.ts +13 -0
  96. package/dist/types/atoms/CircleImage/index.d.ts.map +1 -0
  97. package/dist/types/atoms/CodePreview/index.d.ts +23 -0
  98. package/dist/types/atoms/CodePreview/index.d.ts.map +1 -0
  99. package/dist/types/atoms/ConditionalWrapper/index.d.ts +8 -0
  100. package/dist/types/atoms/ConditionalWrapper/index.d.ts.map +1 -0
  101. package/dist/types/atoms/Containers/index.d.ts +3 -0
  102. package/dist/types/atoms/Containers/index.d.ts.map +1 -0
  103. package/dist/types/atoms/Containers/styles.d.ts +87 -0
  104. package/dist/types/atoms/Containers/styles.d.ts.map +1 -0
  105. package/dist/types/atoms/DivInput/index.d.ts +18 -0
  106. package/dist/types/atoms/DivInput/index.d.ts.map +1 -0
  107. package/dist/types/atoms/Empty/index.d.ts +10 -0
  108. package/dist/types/atoms/Empty/index.d.ts.map +1 -0
  109. package/dist/types/atoms/Empty/styles.d.ts +9 -0
  110. package/dist/types/atoms/Empty/styles.d.ts.map +1 -0
  111. package/dist/types/atoms/Form/Form.d.ts +15 -0
  112. package/dist/types/atoms/Form/Form.d.ts.map +1 -0
  113. package/dist/types/atoms/Form/index.d.ts +13 -0
  114. package/dist/types/atoms/Form/index.d.ts.map +1 -0
  115. package/dist/types/atoms/FormLabel/index.d.ts +13 -0
  116. package/dist/types/atoms/FormLabel/index.d.ts.map +1 -0
  117. package/dist/types/atoms/FullScreenModal/index.d.ts +3 -0
  118. package/dist/types/atoms/FullScreenModal/index.d.ts.map +1 -0
  119. package/dist/types/atoms/Header/index.d.ts +3 -0
  120. package/dist/types/atoms/Header/index.d.ts.map +1 -0
  121. package/dist/types/atoms/Header/styles.d.ts +18 -0
  122. package/dist/types/atoms/Header/styles.d.ts.map +1 -0
  123. package/dist/types/atoms/Icons/index.d.ts +49 -0
  124. package/dist/types/atoms/Icons/index.d.ts.map +1 -0
  125. package/dist/types/atoms/Input/index.d.ts +3 -0
  126. package/dist/types/atoms/Input/index.d.ts.map +1 -0
  127. package/dist/types/atoms/Input/styles.d.ts +20 -0
  128. package/dist/types/atoms/Input/styles.d.ts.map +1 -0
  129. package/dist/types/atoms/Link/index.d.ts +3 -0
  130. package/dist/types/atoms/Link/index.d.ts.map +1 -0
  131. package/dist/types/atoms/Link/styles.d.ts +133 -0
  132. package/dist/types/atoms/Link/styles.d.ts.map +1 -0
  133. package/dist/types/atoms/Loading/index.d.ts +27 -0
  134. package/dist/types/atoms/Loading/index.d.ts.map +1 -0
  135. package/dist/types/atoms/Loading/styles.d.ts +31 -0
  136. package/dist/types/atoms/Loading/styles.d.ts.map +1 -0
  137. package/dist/types/atoms/Logo/index.d.ts +3 -0
  138. package/dist/types/atoms/Logo/index.d.ts.map +1 -0
  139. package/dist/types/atoms/MonoText/index.d.ts +23 -0
  140. package/dist/types/atoms/MonoText/index.d.ts.map +1 -0
  141. package/dist/types/atoms/MonoText/styles.d.ts +13 -0
  142. package/dist/types/atoms/MonoText/styles.d.ts.map +1 -0
  143. package/dist/types/atoms/Pagination/index.d.ts +9 -0
  144. package/dist/types/atoms/Pagination/index.d.ts.map +1 -0
  145. package/dist/types/atoms/Pagination/styles.d.ts +38 -0
  146. package/dist/types/atoms/Pagination/styles.d.ts.map +1 -0
  147. package/dist/types/atoms/ProgressBar/index.d.ts +13 -0
  148. package/dist/types/atoms/ProgressBar/index.d.ts.map +1 -0
  149. package/dist/types/atoms/Radio/index.d.ts +12 -0
  150. package/dist/types/atoms/Radio/index.d.ts.map +1 -0
  151. package/dist/types/atoms/Row/index.d.ts +8 -0
  152. package/dist/types/atoms/Row/index.d.ts.map +1 -0
  153. package/dist/types/atoms/Row/styles.d.ts +9 -0
  154. package/dist/types/atoms/Row/styles.d.ts.map +1 -0
  155. package/dist/types/atoms/Separator/index.d.ts +24 -0
  156. package/dist/types/atoms/Separator/index.d.ts.map +1 -0
  157. package/dist/types/atoms/Separator/styles.d.ts +14 -0
  158. package/dist/types/atoms/Separator/styles.d.ts.map +1 -0
  159. package/dist/types/atoms/Stack/index.d.ts +17 -0
  160. package/dist/types/atoms/Stack/index.d.ts.map +1 -0
  161. package/dist/types/atoms/Stack/styles.d.ts +12 -0
  162. package/dist/types/atoms/Stack/styles.d.ts.map +1 -0
  163. package/dist/types/atoms/Stat/index.d.ts +24 -0
  164. package/dist/types/atoms/Stat/index.d.ts.map +1 -0
  165. package/dist/types/atoms/Stat/styles.d.ts +19 -0
  166. package/dist/types/atoms/Stat/styles.d.ts.map +1 -0
  167. package/dist/types/atoms/StatusText/index.d.ts +17 -0
  168. package/dist/types/atoms/StatusText/index.d.ts.map +1 -0
  169. package/dist/types/atoms/StatusText/styles.d.ts +13 -0
  170. package/dist/types/atoms/StatusText/styles.d.ts.map +1 -0
  171. package/dist/types/atoms/Submit/index.d.ts +10 -0
  172. package/dist/types/atoms/Submit/index.d.ts.map +1 -0
  173. package/dist/types/atoms/SubtleText/index.d.ts +17 -0
  174. package/dist/types/atoms/SubtleText/index.d.ts.map +1 -0
  175. package/dist/types/atoms/SubtleText/styles.d.ts +12 -0
  176. package/dist/types/atoms/SubtleText/styles.d.ts.map +1 -0
  177. package/dist/types/atoms/Surface/index.d.ts +34 -0
  178. package/dist/types/atoms/Surface/index.d.ts.map +1 -0
  179. package/dist/types/atoms/Surface/styles.d.ts +27 -0
  180. package/dist/types/atoms/Surface/styles.d.ts.map +1 -0
  181. package/dist/types/atoms/Switch/index.d.ts +12 -0
  182. package/dist/types/atoms/Switch/index.d.ts.map +1 -0
  183. package/dist/types/atoms/Switch/styles.d.ts +31 -0
  184. package/dist/types/atoms/Switch/styles.d.ts.map +1 -0
  185. package/dist/types/atoms/Tabs/index.d.ts +18 -0
  186. package/dist/types/atoms/Tabs/index.d.ts.map +1 -0
  187. package/dist/types/atoms/Tabs/styles.d.ts +40 -0
  188. package/dist/types/atoms/Tabs/styles.d.ts.map +1 -0
  189. package/dist/types/atoms/TextCheckbox/index.d.ts +9 -0
  190. package/dist/types/atoms/TextCheckbox/index.d.ts.map +1 -0
  191. package/dist/types/atoms/TextLink/index.d.ts +22 -0
  192. package/dist/types/atoms/TextLink/index.d.ts.map +1 -0
  193. package/dist/types/atoms/TextLink/styles.d.ts +15 -0
  194. package/dist/types/atoms/TextLink/styles.d.ts.map +1 -0
  195. package/dist/types/atoms/Textarea/index.d.ts +19 -0
  196. package/dist/types/atoms/Textarea/index.d.ts.map +1 -0
  197. package/dist/types/atoms/Toggle/index.d.ts +16 -0
  198. package/dist/types/atoms/Toggle/index.d.ts.map +1 -0
  199. package/dist/types/atoms/Toggle/styles.d.ts +32 -0
  200. package/dist/types/atoms/Toggle/styles.d.ts.map +1 -0
  201. package/dist/types/atoms/Tooltip/index.d.ts +15 -0
  202. package/dist/types/atoms/Tooltip/index.d.ts.map +1 -0
  203. package/dist/types/atoms/Tooltip/styles.d.ts +24 -0
  204. package/dist/types/atoms/Tooltip/styles.d.ts.map +1 -0
  205. package/dist/types/atoms/Typography/index.d.ts +3 -0
  206. package/dist/types/atoms/Typography/index.d.ts.map +1 -0
  207. package/dist/types/atoms/Typography/styles.d.ts +72 -0
  208. package/dist/types/atoms/Typography/styles.d.ts.map +1 -0
  209. package/dist/types/atoms/Validation/index.d.ts +9 -0
  210. package/dist/types/atoms/Validation/index.d.ts.map +1 -0
  211. package/dist/types/atoms/Validation/styles.d.ts +23 -0
  212. package/dist/types/atoms/Validation/styles.d.ts.map +1 -0
  213. package/dist/types/atoms/WideImage/index.d.ts +26 -0
  214. package/dist/types/atoms/WideImage/index.d.ts.map +1 -0
  215. package/dist/types/molecules/Badge/index.d.ts +25 -0
  216. package/dist/types/molecules/Badge/index.d.ts.map +1 -0
  217. package/dist/types/molecules/Button/index.d.ts +31 -0
  218. package/dist/types/molecules/Button/index.d.ts.map +1 -0
  219. package/dist/types/molecules/Button/styles.d.ts +15 -0
  220. package/dist/types/molecules/Button/styles.d.ts.map +1 -0
  221. package/dist/types/molecules/Card/index.d.ts +16 -0
  222. package/dist/types/molecules/Card/index.d.ts.map +1 -0
  223. package/dist/types/molecules/Card/styles.d.ts +70 -0
  224. package/dist/types/molecules/Card/styles.d.ts.map +1 -0
  225. package/dist/types/molecules/Carousel/index.d.ts +13 -0
  226. package/dist/types/molecules/Carousel/index.d.ts.map +1 -0
  227. package/dist/types/molecules/Carousel/styles.d.ts +31 -0
  228. package/dist/types/molecules/Carousel/styles.d.ts.map +1 -0
  229. package/dist/types/molecules/Carousel/useIsMobile.d.ts +3 -0
  230. package/dist/types/molecules/Carousel/useIsMobile.d.ts.map +1 -0
  231. package/dist/types/molecules/CodeView/highlight.d.ts +11 -0
  232. package/dist/types/molecules/CodeView/highlight.d.ts.map +1 -0
  233. package/dist/types/molecules/CodeView/index.d.ts +58 -0
  234. package/dist/types/molecules/CodeView/index.d.ts.map +1 -0
  235. package/dist/types/molecules/CodeView/styles.d.ts +44 -0
  236. package/dist/types/molecules/CodeView/styles.d.ts.map +1 -0
  237. package/dist/types/molecules/CodeView/tokenizer.d.ts +21 -0
  238. package/dist/types/molecules/CodeView/tokenizer.d.ts.map +1 -0
  239. package/dist/types/molecules/DiffLegend/index.d.ts +20 -0
  240. package/dist/types/molecules/DiffLegend/index.d.ts.map +1 -0
  241. package/dist/types/molecules/DiffLegend/styles.d.ts +19 -0
  242. package/dist/types/molecules/DiffLegend/styles.d.ts.map +1 -0
  243. package/dist/types/molecules/FilterBar/index.d.ts +20 -0
  244. package/dist/types/molecules/FilterBar/index.d.ts.map +1 -0
  245. package/dist/types/molecules/FilterBar/styles.d.ts +15 -0
  246. package/dist/types/molecules/FilterBar/styles.d.ts.map +1 -0
  247. package/dist/types/molecules/HtmlEditor/index.d.ts +16 -0
  248. package/dist/types/molecules/HtmlEditor/index.d.ts.map +1 -0
  249. package/dist/types/molecules/HtmlEditor/styles.d.ts +12 -0
  250. package/dist/types/molecules/HtmlEditor/styles.d.ts.map +1 -0
  251. package/dist/types/molecules/NavTabs/index.d.ts +24 -0
  252. package/dist/types/molecules/NavTabs/index.d.ts.map +1 -0
  253. package/dist/types/molecules/NavTabs/styles.d.ts +15 -0
  254. package/dist/types/molecules/NavTabs/styles.d.ts.map +1 -0
  255. package/dist/types/molecules/PageHeader/index.d.ts +15 -0
  256. package/dist/types/molecules/PageHeader/index.d.ts.map +1 -0
  257. package/dist/types/molecules/PageHeader/styles.d.ts +13 -0
  258. package/dist/types/molecules/PageHeader/styles.d.ts.map +1 -0
  259. package/dist/types/molecules/ScorePanel/index.d.ts +70 -0
  260. package/dist/types/molecules/ScorePanel/index.d.ts.map +1 -0
  261. package/dist/types/molecules/ScorePanel/styles.d.ts +63 -0
  262. package/dist/types/molecules/ScorePanel/styles.d.ts.map +1 -0
  263. package/dist/types/molecules/ScorePills/index.d.ts +25 -0
  264. package/dist/types/molecules/ScorePills/index.d.ts.map +1 -0
  265. package/dist/types/molecules/ScorePills/styles.d.ts +8 -0
  266. package/dist/types/molecules/ScorePills/styles.d.ts.map +1 -0
  267. package/dist/types/molecules/SearchInput/index.d.ts +11 -0
  268. package/dist/types/molecules/SearchInput/index.d.ts.map +1 -0
  269. package/dist/types/molecules/SearchInput/styles.d.ts +24 -0
  270. package/dist/types/molecules/SearchInput/styles.d.ts.map +1 -0
  271. package/dist/types/molecules/Select/index.d.ts +18 -0
  272. package/dist/types/molecules/Select/index.d.ts.map +1 -0
  273. package/dist/types/molecules/Select/styles.d.ts +51 -0
  274. package/dist/types/molecules/Select/styles.d.ts.map +1 -0
  275. package/dist/types/molecules/SliderField/index.d.ts +26 -0
  276. package/dist/types/molecules/SliderField/index.d.ts.map +1 -0
  277. package/dist/types/molecules/SliderField/styles.d.ts +20 -0
  278. package/dist/types/molecules/SliderField/styles.d.ts.map +1 -0
  279. package/dist/types/molecules/StatGrid/index.d.ts +12 -0
  280. package/dist/types/molecules/StatGrid/index.d.ts.map +1 -0
  281. package/dist/types/molecules/StatGrid/styles.d.ts +9 -0
  282. package/dist/types/molecules/StatGrid/styles.d.ts.map +1 -0
  283. package/dist/types/molecules/StatusLabel/index.d.ts +51 -0
  284. package/dist/types/molecules/StatusLabel/index.d.ts.map +1 -0
  285. package/dist/types/molecules/StatusLabel/styles.d.ts +18 -0
  286. package/dist/types/molecules/StatusLabel/styles.d.ts.map +1 -0
  287. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts +9 -0
  288. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts.map +1 -0
  289. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts +13 -0
  290. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts.map +1 -0
  291. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts +8 -0
  292. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts.map +1 -0
  293. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts +9 -0
  294. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts.map +1 -0
  295. package/dist/types/molecules/Table/TableCels/TextCell.d.ts +9 -0
  296. package/dist/types/molecules/Table/TableCels/TextCell.d.ts.map +1 -0
  297. package/dist/types/molecules/Table/TableCels/index.d.ts +8 -0
  298. package/dist/types/molecules/Table/TableCels/index.d.ts.map +1 -0
  299. package/dist/types/molecules/Table/TableCels/styles.d.ts +52 -0
  300. package/dist/types/molecules/Table/TableCels/styles.d.ts.map +1 -0
  301. package/dist/types/molecules/Table/index.d.ts +38 -0
  302. package/dist/types/molecules/Table/index.d.ts.map +1 -0
  303. package/dist/types/molecules/Table/styles.d.ts +25 -0
  304. package/dist/types/molecules/Table/styles.d.ts.map +1 -0
  305. package/dist/types/molecules/TokenInputField/index.d.ts +15 -0
  306. package/dist/types/molecules/TokenInputField/index.d.ts.map +1 -0
  307. package/dist/types/molecules/TokenInputField/styles.d.ts +24 -0
  308. package/dist/types/molecules/TokenInputField/styles.d.ts.map +1 -0
  309. package/dist/types/shared/modals/index.d.ts +33 -0
  310. package/dist/types/shared/modals/index.d.ts.map +1 -0
  311. package/dist/types/shared/modals/styles.d.ts +52 -0
  312. package/dist/types/shared/modals/styles.d.ts.map +1 -0
  313. package/dist/types/shared/modals/useModal.d.ts +4 -0
  314. package/dist/types/shared/modals/useModal.d.ts.map +1 -0
  315. package/dist/types/shared/report-ui/DecisionPanel.d.ts +53 -0
  316. package/dist/types/shared/report-ui/DecisionPanel.d.ts.map +1 -0
  317. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts +31 -0
  318. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts.map +1 -0
  319. package/dist/types/shared/report-ui/Pagination.d.ts +13 -0
  320. package/dist/types/shared/report-ui/Pagination.d.ts.map +1 -0
  321. package/dist/types/shared/report-ui/Pagination.styles.d.ts +13 -0
  322. package/dist/types/shared/report-ui/Pagination.styles.d.ts.map +1 -0
  323. package/dist/types/shared/report-ui/Shell.styles.d.ts +26 -0
  324. package/dist/types/shared/report-ui/Shell.styles.d.ts.map +1 -0
  325. package/dist/types/shared/report-ui/index.d.ts +8 -0
  326. package/dist/types/shared/report-ui/index.d.ts.map +1 -0
  327. package/dist/types/shared/report-ui/ui.d.ts +30 -0
  328. package/dist/types/shared/report-ui/ui.d.ts.map +1 -0
  329. package/dist/types/shared/report-ui/ui.styles.d.ts +50 -0
  330. package/dist/types/shared/report-ui/ui.styles.d.ts.map +1 -0
  331. package/dist/types/shared/toasts/index.d.ts +23 -0
  332. package/dist/types/shared/toasts/index.d.ts.map +1 -0
  333. package/dist/types/shared/toasts/styles.d.ts +18 -0
  334. package/dist/types/shared/toasts/styles.d.ts.map +1 -0
  335. package/dist/types/textures/Cloud/index.d.ts +29 -0
  336. package/dist/types/textures/Cloud/index.d.ts.map +1 -0
  337. package/dist/types/textures/Paper/index.d.ts +8 -0
  338. package/dist/types/textures/Paper/index.d.ts.map +1 -0
  339. package/dist/types/textures/index.d.ts +4 -0
  340. package/dist/types/textures/index.d.ts.map +1 -0
  341. package/dist/typography.js +82 -0
  342. package/dist/validation.js +20 -0
  343. package/dist/wide-image.js +97 -0
  344. package/package.json +2100 -5
@@ -0,0 +1,96 @@
1
+ import { useMemo as e } from "react";
2
+ import t, { useTheme as n } from "styled-components";
3
+ import r from "prismjs";
4
+ import "prismjs/components/prism-javascript.js";
5
+ import "prismjs/components/prism-typescript.js";
6
+ import "prismjs/components/prism-json.js";
7
+ import "prismjs/components/prism-yaml.js";
8
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
9
+ // molecules/CodeView/highlight.ts
10
+ var o = {
11
+ ts: "typescript",
12
+ js: "javascript",
13
+ yml: "yaml"
14
+ }, s = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), c = (e, t = "typescript") => {
15
+ let n = o[t] ?? t, i = r.languages[n];
16
+ return i ? r.highlight(e, i, n) : s(e);
17
+ }, l = t.div`
18
+ border: ${({ theme: e }) => e.border.size} solid ${({ $border: e }) => e};
19
+ border-radius: ${({ theme: e }) => e.border.radius};
20
+ background: ${({ theme: e }) => e.colors.section};
21
+ overflow: hidden;
22
+ `, u = t.div`
23
+ display: flex;
24
+ align-items: center;
25
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
26
+ padding: ${({ theme: e }) => e.offsets.elementContent};
27
+ background: ${({ $bg: e }) => e};
28
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ $border: e }) => e};
29
+ font-family: ${({ theme: e }) => e.font.family.text};
30
+ font-size: ${({ theme: e }) => e.font.sizes.small};
31
+ color: ${({ $text: e }) => e};
32
+ `, d = t.span`
33
+ font-weight: ${({ theme: e }) => e.font.weight.title};
34
+ color: ${({ $color: e }) => e};
35
+ `, f = t.pre`
36
+ margin: 0;
37
+ padding: ${({ theme: e }) => e.offsets.elementContent};
38
+ overflow: auto;
39
+ max-height: ${({ $max: e }) => e};
40
+ font-family: ${({ theme: e }) => e.font.family.text};
41
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
42
+ line-height: ${({ $lineHeight: e }) => e};
43
+ tab-size: ${({ $tabSize: e }) => e};
44
+
45
+ code {
46
+ font-family: inherit;
47
+ font-size: inherit;
48
+ display: block;
49
+ }
50
+ `, p = t.div`
51
+ padding: ${({ theme: e }) => e.offsets.elementContent};
52
+ font-size: ${({ theme: e }) => e.font.sizes.small};
53
+ color: ${({ $color: e }) => e};
54
+ border-top: ${({ theme: e }) => e.border.size} dashed ${({ $border: e }) => e};
55
+ `, m = (e) => e === "bad" ? "✗" : e === "good" ? "✓" : null, h = (e, t, n) => {
56
+ let r = n.find((e) => t >= e.from && t <= e.to);
57
+ return r ? `<span class="md-codeview-matched" title="${String(r.why ?? "matched").replace(/"/g, "&quot;")}">${e}</span>` : e;
58
+ }, g = ({ title: t, html: r, code: o, lang: s = "typescript", highlight: g, tone: _, note: v, max: y = "320px", mark: b, matched: x = null }) => {
59
+ let S = n(), C = _ ? S.colors.status?.[_] : void 0, w = S.colors.status?.edge?.background ?? S.colors.sectionContent, T = S.colors.status?.dim?.content ?? S.colors.sectionContent, E = `color-mix(in srgb, ${S.colors.sectionContent} 3%, transparent)`, D = `color-mix(in srgb, ${S.colors.highlighted} 14%, transparent)`, O = S.offsets.elementContent, k = C?.background ?? w, A = C?.background ?? E, j = C?.content ?? T, M = C?.content ?? S.colors.highlighted, N = e(() => {
60
+ let e = r ?? (o == null ? "" : (g ?? c)(o, s));
61
+ return x?.length ? e.split("\n").map((e, t) => h(e, t, x)).join("\n") : e;
62
+ }, [
63
+ r,
64
+ o,
65
+ g,
66
+ s,
67
+ x
68
+ ]), P = `.md-codeview-matched{display:inline-block;min-width:100%;background:${D};box-shadow:inset 3px 0 0 ${S.colors.highlighted};margin:0 calc(-1 * ${O});padding:0 ${O} 0 calc(${O} - 3px);}`, F = _ ? m(_) : null;
69
+ return /* @__PURE__ */ a(l, {
70
+ $border: k,
71
+ children: [
72
+ t == null ? null : /* @__PURE__ */ a(u, {
73
+ $bg: A,
74
+ $text: j,
75
+ $border: w,
76
+ children: [F ? /* @__PURE__ */ i(d, {
77
+ $color: M,
78
+ children: F
79
+ }) : null, /* @__PURE__ */ i("span", { children: t })]
80
+ }),
81
+ /* @__PURE__ */ a(f, {
82
+ $max: y,
83
+ $tabSize: 2,
84
+ $lineHeight: "1.55",
85
+ children: [x?.length ? /* @__PURE__ */ i("style", { children: P }) : null, /* @__PURE__ */ i("code", { dangerouslySetInnerHTML: { __html: N } })]
86
+ }),
87
+ v ? /* @__PURE__ */ i(p, {
88
+ $color: T,
89
+ $border: w,
90
+ children: v
91
+ }) : null,
92
+ b
93
+ ]
94
+ });
95
+ };
96
+ export { g as CodeView };
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ // atoms/ConditionalWrapper/index.tsx
3
+ var t = ({ Wrapper: t, children: n }) => t ? /* @__PURE__ */ e(t, { children: n }) : n;
4
+ t.displayName = "ConditionalWrapper";
5
+ export { t as default };
@@ -0,0 +1,115 @@
1
+ import e, { css as t } from "styled-components";
2
+ import { withFullWidth as n, withOffsetBottom as r, withOffsetsRight as i } from "@md-code/styles";
3
+ // atoms/Containers/styles.ts
4
+ var a = t`
5
+ height: auto;
6
+ min-height: ${({ theme: e }) => `calc(${e.screens.tablet.height}px - ${e.elements.header.height})`};
7
+ max-height: unset;
8
+ `, o = (e) => e && a, s = e.div`
9
+ padding: ${({ theme: e }) => e.offsets.section};
10
+ background-color: ${({ theme: e }) => e.colors.section};
11
+ background-image: ${({ theme: e }) => e.effects.texture};
12
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
13
+ box-shadow: ${({ theme: e }) => e.shadows.section};
14
+ border-top: ${({ theme: e }) => e.border.size} solid
15
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
16
+ border-bottom: ${({ theme: e }) => e.border.size} solid
17
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
18
+
19
+ @media ${({ theme: e }) => e.screens.tablet.device} {
20
+ height: ${({ theme: e }) => `calc(${e.screens.tablet.height}px - ${e.elements.header.height})`};
21
+ }
22
+
23
+ @media ${({ theme: e }) => e.screens.desktop.device} {
24
+ height: ${({ theme: e }) => `calc(${e.screens.desktop.height}px - ${e.elements.header.height})`};
25
+ padding: ${({ theme: e }) => e.offsets.section};
26
+ }
27
+
28
+ ${({ $noHeightLimit: e }) => o(e)}
29
+ `, c = e.div`
30
+ min-height: 100vh;
31
+ padding: ${({ theme: e }) => e.offsets.section};
32
+ padding-top: ${({ theme: e }) => e.elements.header.height};
33
+ background-color: ${({ theme: e }) => e.colors.section};
34
+ `, l = e.div`
35
+ width: 100%;
36
+ text-align: left;
37
+ ${n}
38
+ margin-right: ${i};
39
+ margin-bottom: ${r};
40
+ `, u = e.div`
41
+ display: flex;
42
+ flex-direction: column;
43
+ `, d = e.div`
44
+ display: grid;
45
+ column-gap: ${({ theme: e }) => e.offsets.betweenElements};
46
+ grid-template-rows: 1fr;
47
+ grid-template-columns: ${({ $colsRatio: e = ["1fr", "1fr"] }) => e.map((e) => `${e}`).join(" ")};
48
+ margin-right: ${i};
49
+ margin-bottom: ${r};
50
+ `, f = e.div`
51
+ display: flex;
52
+ flex-wrap: wrap;
53
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
54
+ padding: ${({ theme: e }) => e.offsets.section} 0;
55
+ `, p = e.div`
56
+ position: relative;
57
+
58
+ &:hover > * {
59
+ color: ${({ theme: e }) => e.colors.highlightedContent};
60
+ background: ${({ theme: e }) => e.colors.highlighted};
61
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.highlighted};
62
+ }
63
+ `, m = e.div`
64
+ display: flex;
65
+ align-items: center;
66
+ gap: ${({ theme: e }) => e.offsets.elementContent};
67
+ ${({ $width: e }) => {
68
+ switch (e) {
69
+ case "1/2": return "width: 50%;";
70
+ case "1/3": return "flex: 1;";
71
+ default: return "width: 100%;";
72
+ }
73
+ }}
74
+ `, h = e.div`
75
+ cursor: pointer;
76
+
77
+ div {
78
+ cursor: pointer;
79
+ color: ${({ theme: e }) => e.colors.sectionContent};
80
+ }
81
+ `, g = e.div`
82
+ display: flex;
83
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
84
+ margin-right: ${i};
85
+ margin-bottom: ${r};
86
+ `, _ = {
87
+ horizontal: "display: flex; align-items: center;",
88
+ "horizontal-reversed": "display: flex; align-items: center; flex-direction: row-reverse;",
89
+ vertical: "display: flex; flex-direction: column;",
90
+ top: "display: flex; flex-direction: column; justify-content: flex-start;"
91
+ }, v = e.section`
92
+ position: relative;
93
+ width: 100%;
94
+
95
+ ${({ $direction: e }) => _[e]}
96
+ ${({ $sectionSize: e }) => {
97
+ switch (e) {
98
+ case "full": return "height: 100vh; z-index: 10;";
99
+ case "medium": return "height: calc(100vh * 0.75);";
100
+ case "half":
101
+ case "dot-section": return "height: 50vh;";
102
+ case "footsteps": return "position: absolute; height: auto; overflow: initial;";
103
+ default: return "";
104
+ }
105
+ }}
106
+ `, y = e.div`
107
+ display: flex;
108
+ flex-direction: column;
109
+ align-items: center;
110
+ justify-content: center;
111
+ height: 100%;
112
+ width: 50vw;
113
+ margin: 0 auto;
114
+ `;
115
+ export { s as BasicSection, u as Column, d as ColumnsContainer, f as DashboardCardsContainer, p as FocusedContainer, l as HeadingContainer, h as LinksContainer, g as MenuItemContainer, m as OneLineContainer, c as PageContainer, v as Section, y as TextContainer };
@@ -0,0 +1,31 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ // molecules/DiffLegend/styles.ts
5
+ var r = e.div`
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
9
+ margin-top: ${({ theme: e }) => e.offsets.betweenElements};
10
+ padding-top: ${({ theme: e }) => e.offsets.betweenElements};
11
+ border-top: ${({ theme: e }) => e.border.size} dashed
12
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
13
+ font-size: ${({ theme: e }) => e.font.sizes.small};
14
+ color: ${({ theme: e }) => e.colors.status?.faint?.content ?? e.colors.sectionContent};
15
+ `, i = e.span`
16
+ display: inline-block;
17
+ width: calc(${({ theme: e }) => e.offsets.betweenElements} - ${({ theme: e }) => e.border.size} * 2);
18
+ height: calc(${({ theme: e }) => e.offsets.betweenElements} - ${({ theme: e }) => e.border.size} * 2);
19
+ border-radius: calc(${({ theme: e }) => e.border.radius} / 3);
20
+ background: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.content ?? t.colors.section};
21
+ margin-right: calc(${({ theme: e }) => e.offsets.betweenElements} / 2 - ${({ theme: e }) => e.border.size});
22
+ vertical-align: baseline;
23
+ `, a = ({ entries: e = [], children: a }) => {
24
+ let o = [];
25
+ for (let r of e) o.push(/* @__PURE__ */ n("span", {
26
+ title: r.title,
27
+ children: [/* @__PURE__ */ t(i, { $status: r.status }), r.label]
28
+ }, r.key));
29
+ return /* @__PURE__ */ n(r, { children: [a, o] });
30
+ };
31
+ export { a as DiffLegend };
@@ -0,0 +1,103 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import r from "styled-components";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ // atoms/DivInput/index.tsx
5
+ var a = r.div`
6
+ width: 100%;
7
+ height: ${({ theme: e }) => e.elements.form.height};
8
+ position: relative;
9
+ `, o = r.div`
10
+ position: absolute;
11
+ overflow-x: hidden;
12
+ width: 100%;
13
+ padding: ${({ theme: e }) => e.offsets.elementContent};
14
+ border-radius: ${({ theme: e }) => e.border.radius};
15
+
16
+ /*
17
+ * The same sunken-field treatment as Input/Textarea: no box border, only an
18
+ * underline derived from sectionContent (no disabled pair, README §5.1),
19
+ * the overlay surface and the theme's silhouette/shadow.
20
+ */
21
+ border: none;
22
+ border-bottom: ${({ theme: e }) => e.border.size} solid
23
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
24
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
25
+ font-family: ${({ theme: e }) => e.font.family.text};
26
+ box-sizing: border-box;
27
+ background-color: ${({ theme: e }) => e.colors.overlay};
28
+
29
+ /*
30
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
31
+ * supply a url() for background-image, glass themes supply blur() for
32
+ * backdrop-filter. The field cannot know which theme is active, so it hands
33
+ * the value to BOTH properties; each property keeps only the value it
34
+ * understands and ignores the other (blur() in background-image computes to
35
+ * none, and url() left in backdrop-filter is visually inert — verified in
36
+ * Chromium). Both themes therefore texture the field without a name check.
37
+ */
38
+ background-image: ${({ theme: e }) => e.effects.texture};
39
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
40
+ clip-path: ${({ theme: e }) => e.geometry.shape};
41
+ box-shadow: ${({ theme: e }) => e.shadows.section};
42
+ color: ${({ theme: e }) => e.colors.sectionContent};
43
+ outline: none;
44
+ transition: border-color ${({ theme: e }) => e.animation.speed.normal}
45
+ ${({ theme: e }) => e.animation.easing.standard};
46
+ cursor: text;
47
+ white-space: nowrap;
48
+
49
+ /*
50
+ * Focus is a state (README §4.3): the accent may paint text, caret and the
51
+ * underline. theme.effects.interaction.focus adds the theme's glow.
52
+ */
53
+ ${({ $isFocused: e, theme: t }) => e && `
54
+ ${t.effects.interaction.focus}
55
+ color: ${t.colors.highlighted};
56
+ caret-color: ${t.colors.highlighted};
57
+ border-bottom-color: ${t.colors.highlighted};
58
+ `}
59
+
60
+ /* Стили плейсхолдера */
61
+ &:empty::before {
62
+ content: attr(data-placeholder);
63
+ color: ${({ theme: e }) => e.colors.sectionContent};
64
+ opacity: 0.5;
65
+ }
66
+
67
+ /* Маскировка пароля */
68
+ &.password {
69
+ -webkit-text-security: disc;
70
+ appearance: textfield;
71
+ user-select: text;
72
+ }
73
+ `, s = ({ id: r, value: s = "", type: c = "text", autoFocus: l, onChange: u, onKeyDown: d, placeholder: f, style: p, readOnly: m }) => {
74
+ let [h, g] = n(!1), _ = t(null);
75
+ return e(() => {
76
+ l && _.current && _.current.focus();
77
+ }, [l]), e(() => {
78
+ _.current && _.current.textContent !== s && (_.current.textContent = s || "");
79
+ }, [s]), /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(o, {
80
+ id: r,
81
+ ref: _,
82
+ role: "textbox",
83
+ contentEditable: !m,
84
+ suppressContentEditableWarning: !0,
85
+ "data-placeholder": f,
86
+ spellCheck: !1,
87
+ className: c === "password" ? "password" : "",
88
+ onInput: () => {
89
+ let e = _.current?.textContent || "";
90
+ u && u({ target: { value: e } });
91
+ },
92
+ onFocus: () => {
93
+ g(!0);
94
+ },
95
+ onBlur: () => {
96
+ g(!1);
97
+ },
98
+ onKeyDown: d,
99
+ $isFocused: h,
100
+ style: p
101
+ }) });
102
+ };
103
+ export { s as DivInput };
package/dist/empty.js ADDED
@@ -0,0 +1,12 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/Empty/styles.ts
5
+ var n = e.div`
6
+ padding: calc(${({ theme: e }) => e.offsets.section} + ${({ theme: e }) => e.offsets.betweenElements})
7
+ ${({ theme: e }) => e.offsets.elementContent};
8
+ text-align: center;
9
+ color: ${({ theme: e }) => e.colors.status?.faint?.content ?? e.colors.sectionContent};
10
+ font-size: calc(${({ theme: e }) => e.font.sizes.small} + ${({ theme: e }) => e.border.size});
11
+ `, r = ({ children: e }) => /* @__PURE__ */ t(n, { children: e });
12
+ export { r as Empty };
@@ -0,0 +1,15 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ // molecules/FilterBar/styles.ts
5
+ var r = e.div`
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
9
+ `, i = e.div`
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: center;
13
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
14
+ `, a = ({ rows: e }) => /* @__PURE__ */ t(r, { children: e.map((e, t) => /* @__PURE__ */ n(i, { children: [e.label, e.controls] }, t)) });
15
+ export { a as FilterBar };
@@ -0,0 +1,19 @@
1
+ import e from "styled-components";
2
+ import { withOffsetBottom as t, withOffsetsRight as n } from "@md-code/styles";
3
+ // atoms/FormLabel/index.tsx
4
+ var r = e.label`
5
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
6
+ margin-right: ${n};
7
+ margin-bottom: ${t};
8
+ color: ${({ theme: e }) => e.colors.sectionContent};
9
+
10
+ /*
11
+ * A label is content on the section surface, so it takes the text role
12
+ * explicitly instead of inheriting whatever font an outer shell happens to
13
+ * set (README §4.2).
14
+ */
15
+ font-family: ${({ theme: e }) => e.font.family.text};
16
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
17
+ font-weight: ${({ theme: e }) => e.font.weight.text};
18
+ `;
19
+ export { r as FormLabel };
package/dist/form.js ADDED
@@ -0,0 +1,17 @@
1
+ import e from "styled-components";
2
+ import { withOffsetBottom as t, withOffsetsRight as n } from "@md-code/styles";
3
+ import { FormLabel as r } from "@md-code/components/form-label";
4
+ import { Input as i } from "@md-code/components/input";
5
+ import { Radio as a } from "@md-code/components/radio";
6
+ import { SearchInput as o } from "@md-code/components/search-input";
7
+ import { Select as s } from "@md-code/components/select";
8
+ import { Submit as c } from "@md-code/components/submit";
9
+ import { Textarea as l } from "@md-code/components/textarea";
10
+ import { TextCheckbox as u } from "@md-code/components/text-checkbox";
11
+ // atoms/Form/Form.tsx
12
+ var d = e.form`
13
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
14
+ margin-right: ${n};
15
+ margin-bottom: ${t};
16
+ `, f = d;
17
+ export { d as Form, r as FormLabel, i as Input, a as Radio, o as SearchInput, s as Select, c as Submit, u as TextCheckbox, l as Textarea, f as default };
@@ -0,0 +1,27 @@
1
+ import { useState as e } from "react";
2
+ import t from "react-dom";
3
+ import { LucideIcon as n } from "@md-code/components/icons";
4
+ import { CloseButton as r, ModalContainer as i, ModalContentContainer as a, Overlay as o, StyledModal as s, useModal as c } from "@md-code/components/modals";
5
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
6
+ // atoms/FullScreenModal/index.tsx
7
+ var f = () => {
8
+ let { fullScreenData: f, setFullScreenData: p } = c(), [m, h] = e(!1), g = () => {
9
+ h(!0), setTimeout(() => {
10
+ p(null), h(!1);
11
+ }, 300);
12
+ };
13
+ return f ? t.createPortal(/* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(o, {
14
+ onClick: g,
15
+ $isClosing: m
16
+ }), /* @__PURE__ */ d(i, {
17
+ $isClosing: m,
18
+ $fullScreen: !0,
19
+ "data-test-id": "fullscreen-modal-container",
20
+ children: [/* @__PURE__ */ u(r, {
21
+ onClick: g,
22
+ className: "close-button",
23
+ children: /* @__PURE__ */ u(n, { name: "Minimize2" })
24
+ }), /* @__PURE__ */ u(s, { children: /* @__PURE__ */ u(a, { children: f.content }) })]
25
+ })] }), document.body) : null;
26
+ };
27
+ export { f as FullScreenModal };
package/dist/header.js ADDED
@@ -0,0 +1,19 @@
1
+ import e from "styled-components";
2
+ // atoms/Header/styles.ts
3
+ var t = e.header`
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: ${({ theme: e }) => e.elements.header.height};
9
+ background: ${({ theme: e }) => e.colors.section};
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
14
+ box-shadow: ${({ theme: e }) => e.shadows.section};
15
+ background-image: ${({ theme: e }) => e.effects.texture};
16
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
17
+ z-index: ${({ theme: e, $zIndex: t }) => t ? e.zIndex[t] : e.zIndex.content};
18
+ `;
19
+ export { t as Header };
@@ -0,0 +1,81 @@
1
+ import { useState as e } from "react";
2
+ import t from "next/dynamic";
3
+ import n, { ThemeProvider as r, css as i } from "styled-components";
4
+ import { Button as a } from "@md-code/components/button";
5
+ import { codeEditor as o } from "@md-code/styles";
6
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ // molecules/HtmlEditor/styles.ts
8
+ var u = n.div`
9
+ border-radius: ${({ theme: e }) => e.border.radius};
10
+ margin-bottom: ${({ theme: e }) => e.offsets.elementContent};
11
+ overflow: auto;
12
+ ${({ $fullHeight: e, theme: t }) => e ? i`
13
+ height: 100%;
14
+ ` : i`
15
+ height: ${t.elements.form.height};
16
+ `}
17
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
18
+ background-color: ${({ theme: e }) => e.colors.section};
19
+
20
+ /*
21
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
22
+ * supply a url() for background-image, glass themes supply blur() for
23
+ * backdrop-filter. The frame cannot know which theme is active, so it hands
24
+ * the value to BOTH properties; each property keeps only the value it
25
+ * understands and ignores the other (blur() in background-image computes to
26
+ * none, and url() left in backdrop-filter is visually inert — verified in
27
+ * Chromium). Both themes therefore texture the frame without a name check.
28
+ */
29
+ background-image: ${({ theme: e }) => e.effects.texture};
30
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
31
+ box-shadow: ${({ theme: e }) => e.shadows.section};
32
+
33
+ /* The editor frame lives inside the code-editor zone theme, whose text
34
+ role IS monospace (there is no code family, README §5.5). */
35
+ font-family: ${({ theme: e }) => e.font.family.text};
36
+
37
+ pre {
38
+ background-color: transparent;
39
+ }
40
+
41
+ /* The code is content on the section surface: section content colour plus
42
+ the theme's content (ink/glow) text-shadow. */
43
+ pre,
44
+ textarea {
45
+ color: ${({ theme: e }) => e.colors.sectionContent};
46
+ text-shadow: ${({ theme: e }) => e.shadows.content};
47
+ }
48
+
49
+ div {
50
+ line-height: 1.5;
51
+ }
52
+ `, d = t(() => import("@uiw/react-textarea-code-editor"), { ssr: !1 }), f = ({ initialValue: t, onSave: n, fullHeight: i, value: f, setValue: p }) => {
53
+ let [m, h] = e(t || ""), [g, _] = e(!0), v = f ?? m, y = p ?? h;
54
+ return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {
55
+ theme: o,
56
+ children: /* @__PURE__ */ c(u, {
57
+ $fullHeight: i,
58
+ children: /* @__PURE__ */ c(d, {
59
+ language: "html",
60
+ value: v,
61
+ onChange: (e) => {
62
+ y(e.target.value), p || _(e.target.value === t);
63
+ },
64
+ style: {
65
+ fontSize: o.font.sizes.small,
66
+ lineHeight: "1.5",
67
+ backgroundColor: "transparent",
68
+ width: "max-content",
69
+ fontFamily: o.font.family.text
70
+ }
71
+ })
72
+ })
73
+ }), !p && /* @__PURE__ */ c(a, {
74
+ text: "Save changes",
75
+ disabled: g,
76
+ onClick: () => {
77
+ n?.(v), p || _(!0);
78
+ }
79
+ })] });
80
+ };
81
+ export { f as HtmlEditor };
package/dist/icons.js ADDED
@@ -0,0 +1,42 @@
1
+ import { ChevronDown as e, ChevronRight as t, ChevronUp as n, Copy as r, Home as i, Minimize2 as a, X as o } from "lucide-react";
2
+ import "react";
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ // atoms/Icons/index.tsx
5
+ var c = {
6
+ ChevronDown: e,
7
+ ChevronRight: t,
8
+ ChevronUp: n,
9
+ Copy: r,
10
+ Home: i,
11
+ Minimize2: a,
12
+ X: o
13
+ }, l = {
14
+ xs: 16,
15
+ sm: 20,
16
+ md: 24,
17
+ lg: 32,
18
+ xl: 40
19
+ }, u = (e) => {
20
+ if (e !== void 0) {
21
+ if (typeof e == "number") return e;
22
+ if (typeof e == "string") {
23
+ if (e in l) return l[e];
24
+ let t = Number(e);
25
+ if (!isNaN(t)) return t;
26
+ }
27
+ }
28
+ }, d = ({ name: e, icon: t, size: n, color: r, ...i }) => {
29
+ if (!t && !e) return console.warn("No icon name or icon component provided to LucideIcon"), null;
30
+ let a = t ?? (e ? c[e] : void 0);
31
+ if (!a) return console.warn(`Lucide icon "${e}" is not mapped in atoms/Icons (ICONS)`), null;
32
+ try {
33
+ return /* @__PURE__ */ s(a, {
34
+ size: u(n),
35
+ color: r,
36
+ ...i
37
+ });
38
+ } catch (t) {
39
+ return console.error(`Error rendering Lucide icon "${e}":`, t), null;
40
+ }
41
+ };
42
+ export { c as ICONS, d as LucideIcon, d as default };
package/dist/input.js ADDED
@@ -0,0 +1,62 @@
1
+ import e from "styled-components";
2
+ import { withOffsetBottom as t, withOffsetsRight as n } from "@md-code/styles";
3
+ // atoms/Input/styles.ts
4
+ var r = e.input`
5
+ display: block;
6
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
7
+ height: ${({ theme: e }) => e.elements.form.height};
8
+ margin-right: ${n};
9
+ margin-bottom: ${t};
10
+ padding: ${({ theme: e }) => e.offsets.elementContent};
11
+ color: ${({ theme: e }) => e.colors.sectionContent};
12
+ font-family: ${({ theme: e }) => e.font.family.text};
13
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
14
+ font-weight: ${({ theme: e }) => e.font.weight.text};
15
+ background-color: ${({ theme: e }) => e.colors.overlay};
16
+
17
+ /*
18
+ * effects.texture is ONE string per theme (README §4.1, §5.3): noise themes
19
+ * supply a url() for background-image, glass themes a blur() for
20
+ * backdrop-filter. Handing the same value to both properties lets each keep
21
+ * the one it understands, so the input stays theme-agnostic.
22
+ */
23
+ background-image: ${({ theme: e }) => e.effects.texture};
24
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
25
+
26
+ /*
27
+ * A sunken field draws only an underline, not a full box border: the theme's
28
+ * silhouette clips the surface (viking parchment) and a low-contrast mix of
29
+ * the content colour reads as the carved groove. The contract has no
30
+ * disabled-colour pair any more (README §4.3, §5.1), so the mute is derived
31
+ * from sectionContent — never a stored grey.
32
+ */
33
+ border: none;
34
+ border-bottom: ${({ theme: e }) => e.border.size} solid
35
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
36
+ border-radius: ${({ theme: e }) => e.border.radius};
37
+ clip-path: ${({ theme: e }) => e.geometry.shape};
38
+ box-shadow: ${({ theme: e }) => e.shadows.section};
39
+ transition:
40
+ color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
41
+ border-color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
42
+ box-shadow ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
43
+
44
+ &::placeholder {
45
+ color: ${({ theme: e }) => e.colors.sectionContent};
46
+ opacity: 0.5;
47
+ font-style: italic;
48
+ }
49
+
50
+ /*
51
+ * The focus accent is a STATE (README §4.3), so the accent colour is legal
52
+ * here: text, caret and underline all light up, and the theme supplies the
53
+ * glow fragment (interaction.focus).
54
+ */
55
+ &:focus-visible {
56
+ ${({ theme: e }) => e.effects.interaction.focus}
57
+ color: ${({ theme: e }) => e.colors.highlighted};
58
+ caret-color: ${({ theme: e }) => e.colors.highlighted};
59
+ border-bottom-color: ${({ theme: e }) => e.colors.highlighted};
60
+ }
61
+ `;
62
+ export { r as Input };