@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
package/dist/select.js ADDED
@@ -0,0 +1,164 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import { LucideIcon as r } from "@md-code/components/icons";
3
+ import { Input as i } from "@md-code/components/input";
4
+ import a, { css as o } from "styled-components";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
+ // molecules/Select/styles.ts
7
+ var l = a.div`
8
+ position: relative;
9
+ `, u = a.div`
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ padding: ${({ theme: e }) => e.offsets.elementContent};
14
+ border-radius: ${({ theme: e }) => e.border.radius};
15
+ border-style: solid;
16
+ border-width: ${({ theme: e }) => e.border.size};
17
+ border-color: ${({ theme: e }) => e.colors.sectionContent};
18
+ color: ${({ theme: e }) => e.colors.sectionContent};
19
+ background-color: ${({ theme: e }) => e.colors.section};
20
+
21
+ /*
22
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
23
+ * supply a url() for background-image, glass themes supply blur() for
24
+ * backdrop-filter. The control cannot know which theme is active, so it
25
+ * hands the value to BOTH properties; each property keeps only the value it
26
+ * understands and ignores the other (blur() in background-image computes to
27
+ * none, and url() left in backdrop-filter is visually inert — verified in
28
+ * Chromium). Both themes therefore texture the control without a name check.
29
+ */
30
+ background-image: ${({ theme: e }) => e.effects.texture};
31
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
32
+ clip-path: ${({ theme: e }) => e.geometry.shape};
33
+ box-shadow: ${({ theme: e }) => e.shadows.section};
34
+ cursor: ${({ $readOnly: e }) => e ? "default" : "pointer"};
35
+ transition: box-shadow ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
36
+
37
+ /* The former glow collapses into one weak accent glow (wave decision В2). */
38
+ &:hover {
39
+ box-shadow: ${({ theme: e }) => e.shadows.section},
40
+ ${({ theme: e }) => `0 0 10px color-mix(in srgb, ${e.colors.highlighted} 20%, transparent)`};
41
+ }
42
+
43
+ ${({ $readOnly: e, theme: t }) => e && o`
44
+ ${t.effects.interaction.disabled}
45
+ `}
46
+ `, d = a.ul`
47
+ position: absolute;
48
+ top: 100%;
49
+ left: 0;
50
+ width: 100%;
51
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
52
+ max-height: calc(${({ theme: e }) => e.elements.form.height} * 6);
53
+ overflow-y: auto;
54
+ background-color: ${({ theme: e }) => e.colors.section};
55
+
56
+ /*
57
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
58
+ * supply a url() for background-image, glass themes supply blur() for
59
+ * backdrop-filter. The list cannot know which theme is active, so it hands
60
+ * the value to BOTH properties; each property keeps only the value it
61
+ * understands and ignores the other (blur() in background-image computes to
62
+ * none, and url() left in backdrop-filter is visually inert — verified in
63
+ * Chromium). Both themes therefore texture the list without a name check.
64
+ */
65
+ background-image: ${({ theme: e }) => e.effects.texture};
66
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
67
+ list-style-type: none;
68
+ padding: 0;
69
+ margin: 0;
70
+ margin-top: ${({ theme: e }) => e.offsets.betweenElements};
71
+ border-radius: ${({ theme: e }) => e.border.radius};
72
+ box-shadow: ${({ theme: e }) => e.shadows.notification};
73
+ z-index: ${({ theme: e }) => e.zIndex.alert};
74
+ `, f = a.li`
75
+ padding: ${({ theme: e }) => e.offsets.elementContent};
76
+ background-color: ${({ $highlighted: e, theme: t }) => e ? t.colors.highlighted : t.colors.section};
77
+ color: ${({ $highlighted: e, theme: t }) => e ? t.colors.highlightedContent : t.colors.sectionContent};
78
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
79
+ cursor: pointer;
80
+
81
+ &:hover {
82
+ background-color: ${({ theme: e }) => e.colors.highlighted};
83
+ color: ${({ theme: e }) => e.colors.highlightedContent};
84
+ }
85
+ `, p = a.div`
86
+ color: ${({ theme: e }) => e.colors.sectionContent};
87
+ display: flex;
88
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
89
+ padding-left: ${({ theme: e }) => e.offsets.betweenElements};
90
+ `, m = a.li`
91
+ padding: ${({ theme: e }) => e.offsets.elementContent};
92
+ color: ${({ theme: e }) => e.colors.sectionContent};
93
+ `, h = a.button`
94
+ background: none;
95
+ border: none;
96
+ cursor: ${({ $readOnly: e }) => e ? "default" : "pointer"};
97
+ margin-left: ${({ theme: e }) => e.offsets.betweenElements};
98
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
99
+ color: ${({ theme: e }) => e.colors.sectionContent};
100
+ `, g = a.div`
101
+ width: 0;
102
+ border-left: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
103
+ margin-bottom: ${({ theme: e }) => e.offsets.betweenElements};
104
+ margin-top: ${({ theme: e }) => e.offsets.betweenElements};
105
+ box-sizing: border-box;
106
+ `, _ = a.span`
107
+ color: ${({ theme: e }) => e.colors.sectionContent};
108
+ `, v = ({ options: a, value: o, onChange: v, isClearable: y = !1, readOnly: b = !1, placeholder: x = "Select an option", isSearchable: S = !1 }) => {
109
+ let [C, w] = n(!1), [T, E] = n(0), [D, O] = n(""), k = t(null), A = () => {
110
+ b || (w(!C), O(""));
111
+ }, j = (e) => {
112
+ b || (v(e), w(!1));
113
+ }, M = (e) => {
114
+ e.stopPropagation(), b || (v(null), w(!1));
115
+ }, N = (e) => {
116
+ if (!b) switch (e.key) {
117
+ case "ArrowDown":
118
+ E((e) => Math.min(e + 1, P.length - 1));
119
+ break;
120
+ case "ArrowUp":
121
+ E((e) => Math.max(e - 1, 0));
122
+ break;
123
+ case "Enter":
124
+ C && P[T] && j(P[T]);
125
+ break;
126
+ case "Escape": w(!1);
127
+ }
128
+ }, P = a.filter((e) => e.label?.toLowerCase()?.includes(D?.toLowerCase()));
129
+ return e(() => {
130
+ let e = (e) => {
131
+ k.current && !k.current.contains(e.target) && w(!1);
132
+ };
133
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
134
+ }, []), /* @__PURE__ */ c(l, {
135
+ ref: k,
136
+ children: [/* @__PURE__ */ c(u, {
137
+ onClick: A,
138
+ onKeyDown: N,
139
+ tabIndex: 0,
140
+ $readOnly: b,
141
+ children: [o ? o.label : /* @__PURE__ */ s(_, { children: x }), /* @__PURE__ */ c(p, { children: [
142
+ y && o && /* @__PURE__ */ s(h, {
143
+ onClick: M,
144
+ $readOnly: b,
145
+ children: /* @__PURE__ */ s(r, { name: "X" })
146
+ }),
147
+ /* @__PURE__ */ s(g, {}),
148
+ /* @__PURE__ */ s("span", { children: C ? /* @__PURE__ */ s(r, { name: "ChevronUp" }) : /* @__PURE__ */ s(r, { name: "ChevronDown" }) })
149
+ ] })]
150
+ }), C && !b && /* @__PURE__ */ c(d, { children: [S && /* @__PURE__ */ s(i, {
151
+ type: "text",
152
+ value: D,
153
+ onKeyDown: N,
154
+ onChange: (e) => O(e.target.value),
155
+ placeholder: "Search..."
156
+ }), P?.length ? P.map((e, t) => /* @__PURE__ */ s(f, {
157
+ $highlighted: T === t,
158
+ onClick: () => j(e),
159
+ onMouseEnter: () => E(t),
160
+ children: e.label
161
+ }, e.value)) : /* @__PURE__ */ s(m, { children: "No options found" })] })]
162
+ });
163
+ };
164
+ export { v as Select, v as default };
@@ -0,0 +1,16 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/Separator/styles.ts
5
+ var n = e.div`
6
+ width: 100%;
7
+ height: 0;
8
+ border-top: ${({ theme: e }) => e.border.size} ${({ $dashed: e }) => e ? "dashed" : "solid"}
9
+ ${({ $status: e, theme: t }) => e ? t.colors.status?.[e]?.content ?? t.colors.sectionContent : `color-mix(in srgb, ${t.colors.sectionContent} 25%, transparent)`};
10
+ margin: ${({ $dashed: e, theme: t }) => e ? `calc(${t.offsets.elementContent} / 2) 0` : `${t.offsets.section} 0`};
11
+ `, r = ({ $status: e, $dashed: r, ...i }) => /* @__PURE__ */ t(n, {
12
+ $status: e,
13
+ $dashed: r,
14
+ ...i
15
+ });
16
+ export { r as Separator };
@@ -0,0 +1,34 @@
1
+ import "react";
2
+ import { MonoText as e } from "@md-code/components/mono-text";
3
+ import t from "styled-components";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ // molecules/SliderField/styles.ts
6
+ var i = t.label`
7
+ display: flex;
8
+ align-items: center;
9
+ gap: ${({ theme: e }) => e.offsets.elementContent};
10
+ `, a = t.input`
11
+ flex: 1 1 auto;
12
+ min-width: 0;
13
+ accent-color: ${({ $status: e, theme: t }) => e ? t.colors.status?.[e]?.content ?? t.colors.highlighted : t.colors.highlighted};
14
+ `, o = ({ id: t, label: o, status: s, value: c, min: l, max: u, step: d, onChange: f, valueLabel: p }) => /* @__PURE__ */ r(i, {
15
+ htmlFor: t,
16
+ children: [
17
+ o,
18
+ /* @__PURE__ */ n(a, {
19
+ id: t,
20
+ type: "range",
21
+ min: l,
22
+ max: u,
23
+ step: d,
24
+ value: c,
25
+ $status: s,
26
+ onChange: (e) => f(Number(e.target.value))
27
+ }),
28
+ /* @__PURE__ */ n(e, {
29
+ $tone: c === l ? "dim" : "default",
30
+ children: p ?? c
31
+ })
32
+ ]
33
+ });
34
+ export { o as SliderField };
package/dist/stack.js ADDED
@@ -0,0 +1,16 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/Stack/styles.ts
5
+ var n = e.div`
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
9
+ min-width: 0;
10
+ ${({ $grow: e }) => e ? "flex: 1 1 0;\n overflow-wrap: anywhere;" : ""}
11
+ `, r = ({ $grow: e, children: r, ...i }) => /* @__PURE__ */ t(n, {
12
+ $grow: e,
13
+ ...i,
14
+ children: r
15
+ });
16
+ export { r as Stack };
@@ -0,0 +1,10 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // molecules/StatGrid/styles.ts
5
+ var n = e.div`
6
+ display: grid;
7
+ grid-template-columns: repeat(auto-fit, minmax(calc(${({ theme: e }) => e.offsets.section} * 7), 1fr));
8
+ gap: ${({ theme: e }) => e.offsets.elementContent};
9
+ `, r = ({ children: e }) => /* @__PURE__ */ t(n, { children: e });
10
+ export { r as StatGrid };
package/dist/stat.js ADDED
@@ -0,0 +1,24 @@
1
+ import { Caption as e } from "@md-code/components/caption";
2
+ import "react";
3
+ import t from "styled-components";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ // atoms/Stat/styles.ts
6
+ var i = t.div`
7
+ background: ${({ theme: e }) => e.colors.overlay};
8
+ border: ${({ theme: e }) => e.border.size} solid
9
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
10
+ border-radius: ${({ theme: e }) => e.border.radius};
11
+ padding: calc(${({ theme: e }) => e.offsets.elementContent} * 1.25) calc(${({ theme: e }) => e.offsets.betweenElements});
12
+ `, a = t.div`
13
+ font-size: calc(
14
+ ${({ theme: e }) => e.font.sizes.large} + ${({ theme: e }) => e.offsets.elementContent} - ${({ theme: e }) => e.border.size} * 2
15
+ );
16
+ /* The step-0 baseline's number: heavy, on a tight measure (README §6). */
17
+ font-weight: 700;
18
+ line-height: 1.2;
19
+ color: ${({ theme: e, $status: t }) => t ? e.colors.status?.[t]?.content ?? e.colors.sectionContent : e.colors.sectionContent};
20
+ `, o = ({ label: t, value: o, $status: s }) => /* @__PURE__ */ r(i, { children: [/* @__PURE__ */ n(a, {
21
+ $status: s,
22
+ children: o
23
+ }), /* @__PURE__ */ n(e, { children: t })] });
24
+ export { o as Stat };
@@ -0,0 +1,63 @@
1
+ import "react";
2
+ import { Loader as e } from "@md-code/components/loading";
3
+ import t from "styled-components";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ // molecules/StatusLabel/styles.ts
6
+ var i = t.div`
7
+ display: inline-flex;
8
+ align-items: center;
9
+ gap: ${({ theme: e }) => e.offsets.elementContent};
10
+ position: relative;
11
+ padding: ${({ theme: e }) => e.offsets.elementContent};
12
+
13
+ /* The badge is a section surface separated from its neighbours by a border
14
+ in the section content colour (В3); the radius is the theme's. */
15
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
16
+ border-radius: ${({ theme: e }) => e.border.radius};
17
+ background-color: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.background ?? t.colors.section};
18
+ color: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.content ?? t.colors.sectionContent};
19
+ `, a = t.div`
20
+ width: ${({ theme: e }) => e.elements.icons.width};
21
+ height: ${({ theme: e }) => e.elements.icons.height};
22
+
23
+ /* The dot's silhouette is the theme's surface radius: viking (0) is square,
24
+ glass (12px, clamped to half the 20px dot) is round. */
25
+ border-radius: ${({ theme: e }) => e.border.radius};
26
+ background-color: currentcolor;
27
+
28
+ /* The baseline viking dot carried a weak accent glow; glow is a shadow in
29
+ the accent colour, derived — the same pattern the Button uses (README §5.3).
30
+ The blur radius is derived from the dot size (half of it), not stored. */
31
+ box-shadow: 0 0 calc(${({ theme: e }) => e.elements.icons.width} / 2)
32
+ color-mix(in srgb, ${({ theme: e }) => e.colors.highlighted} 20%, transparent);
33
+ position: relative;
34
+ flex-shrink: 0;
35
+ `, o = {
36
+ not_calculated: {
37
+ label: "Not Calculated",
38
+ status: "neutral"
39
+ },
40
+ queued: {
41
+ label: "Processing",
42
+ status: "pending"
43
+ },
44
+ processing: {
45
+ label: "Processing",
46
+ status: "pending"
47
+ },
48
+ failed: {
49
+ label: "Failed",
50
+ status: "failed"
51
+ },
52
+ success: {
53
+ label: "Success",
54
+ status: "success"
55
+ }
56
+ }, s = ({ label: t, $status: s, isLoading: c, state: l }) => {
57
+ let u = l ? o[l] : void 0, d = t, f = s, p = c;
58
+ return l && u ? (d === void 0 && (d = u.label), f === void 0 && (f = u.status), (l === "queued" || l === "processing") && (p = !0)) : l && d === void 0 && (d = l), /* @__PURE__ */ r(i, {
59
+ $status: f,
60
+ children: [p ? /* @__PURE__ */ n(e, { $size: "small" }) : /* @__PURE__ */ n(a, { className: "status-dot" }), /* @__PURE__ */ n("span", { children: d || "Unknown" })]
61
+ });
62
+ };
63
+ export { s as StatusLabel };
@@ -0,0 +1,13 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/StatusText/styles.ts
5
+ var n = e.span`
6
+ color: ${({ $status: e, theme: t }) => e ? t.colors.status?.[e]?.content ?? t.colors.sectionContent : t.colors.sectionContent};
7
+ font-weight: ${({ theme: e }) => e.font.weight.title};
8
+ `, r = ({ $status: e, children: r, ...i }) => /* @__PURE__ */ t(n, {
9
+ $status: e,
10
+ ...i,
11
+ children: r
12
+ });
13
+ export { r as StatusText };
package/dist/submit.js ADDED
@@ -0,0 +1,57 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { withOffsetBottom as t, withOffsetsRight as n } from "@md-code/styles";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ // atoms/Submit/index.tsx
6
+ var i = e.input`
7
+ display: block;
8
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
9
+ height: ${({ theme: e }) => e.elements.form.height};
10
+ margin-right: ${n};
11
+ margin-bottom: ${t};
12
+ padding: ${({ theme: e }) => `${e.offsets.elementContent} calc(${e.offsets.elementContent} * 2)`};
13
+ color: ${({ theme: e }) => e.colors.highlightedContent};
14
+ font-family: ${({ theme: e }) => e.font.family.text};
15
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
16
+ font-weight: ${({ theme: e }) => e.font.weight.text};
17
+ text-transform: ${({ theme: e }) => e.font.transform.text};
18
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
19
+ background-color: ${({ theme: e }) => e.colors.highlighted};
20
+
21
+ /*
22
+ * One texture string handed to both texture properties (README §4.1, §5.3):
23
+ * noise lands in background-image, glass blur in backdrop-filter.
24
+ */
25
+ background-image: ${({ theme: e }) => e.effects.texture};
26
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
27
+ border: none;
28
+ border-radius: ${({ theme: e }) => e.border.radius};
29
+ clip-path: ${({ theme: e }) => e.geometry.shape};
30
+ box-shadow: ${({ theme: e }) => e.shadows.section};
31
+ cursor: pointer;
32
+ position: relative;
33
+ transition: all ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
34
+
35
+ &:hover {
36
+ ${({ theme: e }) => e.effects.interaction.hover}
37
+ }
38
+
39
+ &:active {
40
+ ${({ theme: e }) => e.effects.interaction.active}
41
+ }
42
+
43
+ &:focus-visible {
44
+ ${({ theme: e }) => e.effects.interaction.focus}
45
+ }
46
+
47
+ &:disabled {
48
+ ${({ theme: e }) => e.effects.interaction.disabled}
49
+ }
50
+ `, a = ({ $offsetBottom: e, $offsetRight: t, $fullWidth: n, ...a }) => /* @__PURE__ */ r(i, {
51
+ ...a,
52
+ $offsetBottom: e,
53
+ $offsetRight: t,
54
+ $fullWidth: n,
55
+ type: "submit"
56
+ });
57
+ export { a as Submit };
@@ -0,0 +1,14 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/SubtleText/styles.ts
5
+ var n = e.span`
6
+ color: ${({ theme: e }) => e.colors.status?.faint?.content ?? e.colors.sectionContent};
7
+ font-size: ${({ theme: e }) => e.font.sizes.small};
8
+ ${({ $grow: e }) => e ? "flex: 1 1 0;\n min-width: 0;\n overflow-wrap: anywhere;" : ""}
9
+ `, r = ({ $grow: e, children: r, ...i }) => /* @__PURE__ */ t(n, {
10
+ $grow: e,
11
+ ...i,
12
+ children: r
13
+ });
14
+ export { r as SubtleText };
@@ -0,0 +1,39 @@
1
+ import "react";
2
+ import e, { ThemeProvider as t } from "styled-components";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ // atoms/Surface/styles.ts
5
+ var i = e.section`
6
+ background: ${({ theme: e }) => e.colors.section};
7
+ border: ${({ theme: e }) => e.border.size} solid
8
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
9
+ border-radius: ${({ theme: e }) => e.border.radius};
10
+ padding: ${({ theme: e }) => e.offsets.section};
11
+ min-width: 0;
12
+ max-width: 100%;
13
+ ${({ theme: e, $status: t }) => t ? `border-left: calc(${e.border.size} * 3) solid ${e.colors.status?.[t]?.content ?? e.colors.highlighted};` : ""}
14
+ `, a = e.header`
15
+ display: flex;
16
+ align-items: baseline;
17
+ flex-wrap: wrap;
18
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
19
+ margin-bottom: ${({ theme: e }) => e.offsets.betweenElements};
20
+ min-width: 0;
21
+ `, o = e.h2`
22
+ font-size: ${({ theme: e }) => e.font.sizes.large};
23
+ font-weight: ${({ theme: e }) => e.font.weight.title};
24
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
25
+ margin: 0;
26
+ flex: 1 1 auto;
27
+ min-width: 0;
28
+ overflow-wrap: anywhere;
29
+ `, s = ({ heading: e, actions: s, $status: c, theme: l, children: u }) => {
30
+ let d = /* @__PURE__ */ r(i, {
31
+ $status: c,
32
+ children: [e || s ? /* @__PURE__ */ r(a, { children: [e ? /* @__PURE__ */ n(o, { children: e }) : null, s] }) : null, u]
33
+ });
34
+ return l ? /* @__PURE__ */ n(t, {
35
+ theme: l,
36
+ children: d
37
+ }) : d;
38
+ };
39
+ export { s as Surface };
package/dist/switch.js ADDED
@@ -0,0 +1,99 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ // atoms/Switch/styles.ts
5
+ var r = e.label`
6
+ position: relative;
7
+ display: inline-block;
8
+ width: calc(${({ theme: e }) => e.elements.form.height} * 0.88);
9
+ height: calc(${({ theme: e }) => e.elements.form.height} * 0.48);
10
+ cursor: pointer;
11
+ background-color: ${({ theme: e }) => e.colors.overlay};
12
+
13
+ /*
14
+ * One texture string per theme handed to both texture properties (README
15
+ * §4.1, §5.3): the track keeps a noise url() or a glass blur(), whichever its
16
+ * theme supplies, without a name check.
17
+ */
18
+ background-image: ${({ theme: e }) => e.effects.texture};
19
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
20
+
21
+ /*
22
+ * One shared mute for every muted border in the form wave: 25% of the
23
+ * content colour over the surface matches the legacy disabled outline
24
+ * (#374b4e on #0b0e0f) without reading a legacy palette token (§5.1).
25
+ */
26
+ border: ${({ theme: e }) => e.border.size} solid
27
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
28
+ border-radius: ${({ theme: e }) => e.border.radius};
29
+ clip-path: ${({ theme: e }) => e.geometry.shape};
30
+ transition: background-color ${({ theme: e }) => e.animation.speed.slow}
31
+ ${({ theme: e }) => e.animation.easing.standard};
32
+
33
+ &:hover {
34
+ ${({ theme: e }) => e.effects.interaction.hover}
35
+ }
36
+ `, i = e.input`
37
+ opacity: 0;
38
+ width: 0;
39
+ height: 0;
40
+
41
+ &:checked + .switch-slider {
42
+ background-color: ${({ theme: e }) => e.colors.highlighted};
43
+ }
44
+
45
+ &:focus + .switch-slider {
46
+ box-shadow: ${({ theme: e }) => e.shadows.section};
47
+ }
48
+
49
+ &:checked + .switch-slider::before {
50
+ transform: translateX(calc(${({ theme: e }) => e.elements.form.height} * 0.4));
51
+ }
52
+ `, a = e.span`
53
+ position: absolute;
54
+ inset: 0;
55
+ background-color: transparent;
56
+ transition: background-color ${({ theme: e }) => e.animation.speed.slow}
57
+ ${({ theme: e }) => e.animation.easing.standard};
58
+ border-radius: ${({ theme: e }) => e.border.radius};
59
+
60
+ /* The Knob */
61
+ &::before {
62
+ position: absolute;
63
+ content: "";
64
+ height: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
65
+ width: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
66
+ left: ${({ theme: e }) => e.offsets.elementContent};
67
+ bottom: ${({ theme: e }) => e.offsets.elementContent};
68
+ background-color: ${({ theme: e }) => e.colors.sectionContent};
69
+ transition: transform ${({ theme: e }) => e.animation.speed.slow} ${({ theme: e }) => e.animation.easing.standard};
70
+ border-radius: 50%;
71
+ }
72
+ `, o = e.div`
73
+ display: flex;
74
+ align-items: center;
75
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
76
+ `, s = e.span`
77
+ font-family: ${({ theme: e }) => e.font.family.text};
78
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
79
+ color: ${({ theme: e }) => e.colors.sectionContent};
80
+ `, c = ({ checked: e, onChange: c, leftLabel: l, rightLabel: u, size: d = "default", className: f }) => /* @__PURE__ */ n(o, {
81
+ className: f,
82
+ children: [
83
+ l && /* @__PURE__ */ t(s, { children: l }),
84
+ /* @__PURE__ */ n(r, {
85
+ $size: d,
86
+ children: [/* @__PURE__ */ t(i, {
87
+ type: "checkbox",
88
+ checked: e,
89
+ onChange: (e) => c(e.target.checked),
90
+ $size: d
91
+ }), /* @__PURE__ */ t(a, {
92
+ className: "switch-slider",
93
+ $size: d
94
+ })]
95
+ }),
96
+ u && /* @__PURE__ */ t(s, { children: u })
97
+ ]
98
+ });
99
+ export { c as Switch };