@md-code/components 0.0.1 → 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 (290) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +67 -1
  3. package/dist/avatar.js +3 -3
  4. package/dist/badge.js +18 -18
  5. package/dist/breadcrumbs.js +47 -47
  6. package/dist/button.js +103 -88
  7. package/dist/calendar.js +63 -62
  8. package/dist/caption.js +14 -0
  9. package/dist/card.js +54 -53
  10. package/dist/carousel.js +87 -72
  11. package/dist/central-modal.js +22 -1
  12. package/dist/chip.js +42 -0
  13. package/dist/circle-image.js +12 -12
  14. package/dist/code-preview.js +28 -28
  15. package/dist/code-view-tokenizer.js +35 -0
  16. package/dist/code-view.js +53 -53
  17. package/dist/containers.js +87 -87
  18. package/dist/diff-legend.js +31 -0
  19. package/dist/div-input.js +48 -46
  20. package/dist/empty.js +12 -0
  21. package/dist/filter-bar.js +15 -0
  22. package/dist/form-label.js +11 -11
  23. package/dist/form.js +6 -6
  24. package/dist/full-screen-modal.js +27 -1
  25. package/dist/header.js +14 -14
  26. package/dist/html-editor.js +49 -42
  27. package/dist/icons.js +24 -26
  28. package/dist/input.js +40 -40
  29. package/dist/link.js +25 -25
  30. package/dist/loading.js +161 -66
  31. package/dist/modals.js +130 -1
  32. package/dist/mono-text.js +16 -0
  33. package/dist/nav-tabs.js +33 -0
  34. package/dist/page-header.js +20 -0
  35. package/dist/pagination.js +80 -80
  36. package/dist/progress-bar.js +19 -19
  37. package/dist/radio.js +58 -57
  38. package/dist/report-ui.js +150 -72
  39. package/dist/row.js +15 -0
  40. package/dist/score-panel.js +125 -0
  41. package/dist/score-pills.js +25 -0
  42. package/dist/search-input.js +62 -56
  43. package/dist/select.js +86 -83
  44. package/dist/separator.js +15 -9
  45. package/dist/slider-field.js +34 -0
  46. package/dist/stack.js +16 -0
  47. package/dist/stat-grid.js +10 -0
  48. package/dist/stat.js +24 -0
  49. package/dist/status-label.js +32 -28
  50. package/dist/status-text.js +13 -0
  51. package/dist/submit.js +41 -41
  52. package/dist/subtle-text.js +14 -0
  53. package/dist/surface.js +39 -0
  54. package/dist/switch.js +70 -69
  55. package/dist/table.js +109 -85
  56. package/dist/tabs.js +121 -120
  57. package/dist/text-checkbox.js +48 -48
  58. package/dist/text-link.js +20 -0
  59. package/dist/textarea.js +41 -41
  60. package/dist/textures.js +100 -100
  61. package/dist/toasts.js +48 -48
  62. package/dist/toggle.js +46 -46
  63. package/dist/token-input-field.js +24 -24
  64. package/dist/tooltip.js +61 -59
  65. package/dist/types/atoms/Breadcrumbs/index.d.ts.map +1 -1
  66. package/dist/types/atoms/Breadcrumbs/styles.d.ts.map +1 -1
  67. package/dist/types/atoms/Calendar/index.d.ts +1 -1
  68. package/dist/types/atoms/Calendar/index.d.ts.map +1 -1
  69. package/dist/types/atoms/Calendar/styles.d.ts.map +1 -1
  70. package/dist/types/atoms/Caption/index.d.ts +9 -0
  71. package/dist/types/atoms/Caption/index.d.ts.map +1 -0
  72. package/dist/types/atoms/Caption/styles.d.ts +9 -0
  73. package/dist/types/atoms/Caption/styles.d.ts.map +1 -0
  74. package/dist/types/atoms/CentralModal/index.d.ts.map +1 -1
  75. package/dist/types/atoms/Chip/index.d.ts +39 -0
  76. package/dist/types/atoms/Chip/index.d.ts.map +1 -0
  77. package/dist/types/atoms/Chip/styles.d.ts +19 -0
  78. package/dist/types/atoms/Chip/styles.d.ts.map +1 -0
  79. package/dist/types/atoms/CircleImage/index.d.ts +2 -2
  80. package/dist/types/atoms/CircleImage/index.d.ts.map +1 -1
  81. package/dist/types/atoms/ConditionalWrapper/index.d.ts +1 -1
  82. package/dist/types/atoms/ConditionalWrapper/index.d.ts.map +1 -1
  83. package/dist/types/atoms/Containers/index.d.ts.map +1 -1
  84. package/dist/types/atoms/Containers/styles.d.ts +4 -4
  85. package/dist/types/atoms/Containers/styles.d.ts.map +1 -1
  86. package/dist/types/atoms/DivInput/index.d.ts.map +1 -1
  87. package/dist/types/atoms/Empty/index.d.ts +10 -0
  88. package/dist/types/atoms/Empty/index.d.ts.map +1 -0
  89. package/dist/types/atoms/Empty/styles.d.ts +9 -0
  90. package/dist/types/atoms/Empty/styles.d.ts.map +1 -0
  91. package/dist/types/atoms/Form/Form.d.ts +2 -2
  92. package/dist/types/atoms/Form/Form.d.ts.map +1 -1
  93. package/dist/types/atoms/Form/index.d.ts +10 -10
  94. package/dist/types/atoms/Form/index.d.ts.map +1 -1
  95. package/dist/types/atoms/FormLabel/index.d.ts +1 -1
  96. package/dist/types/atoms/FormLabel/index.d.ts.map +1 -1
  97. package/dist/types/atoms/FullScreenModal/index.d.ts.map +1 -1
  98. package/dist/types/atoms/Header/index.d.ts.map +1 -1
  99. package/dist/types/atoms/Icons/index.d.ts +29 -8
  100. package/dist/types/atoms/Icons/index.d.ts.map +1 -1
  101. package/dist/types/atoms/Input/index.d.ts +1 -1
  102. package/dist/types/atoms/Input/index.d.ts.map +1 -1
  103. package/dist/types/atoms/Input/styles.d.ts +2 -2
  104. package/dist/types/atoms/Input/styles.d.ts.map +1 -1
  105. package/dist/types/atoms/Link/index.d.ts.map +1 -1
  106. package/dist/types/atoms/Link/styles.d.ts.map +1 -1
  107. package/dist/types/atoms/Loading/index.d.ts +10 -4
  108. package/dist/types/atoms/Loading/index.d.ts.map +1 -1
  109. package/dist/types/atoms/Loading/styles.d.ts +4 -2
  110. package/dist/types/atoms/Loading/styles.d.ts.map +1 -1
  111. package/dist/types/atoms/Logo/index.d.ts.map +1 -1
  112. package/dist/types/atoms/MonoText/index.d.ts +23 -0
  113. package/dist/types/atoms/MonoText/index.d.ts.map +1 -0
  114. package/dist/types/atoms/MonoText/styles.d.ts +13 -0
  115. package/dist/types/atoms/MonoText/styles.d.ts.map +1 -0
  116. package/dist/types/atoms/Pagination/index.d.ts.map +1 -1
  117. package/dist/types/atoms/Pagination/styles.d.ts.map +1 -1
  118. package/dist/types/atoms/ProgressBar/index.d.ts +2 -2
  119. package/dist/types/atoms/ProgressBar/index.d.ts.map +1 -1
  120. package/dist/types/atoms/Radio/index.d.ts +2 -2
  121. package/dist/types/atoms/Radio/index.d.ts.map +1 -1
  122. package/dist/types/atoms/Row/index.d.ts +8 -0
  123. package/dist/types/atoms/Row/index.d.ts.map +1 -0
  124. package/dist/types/atoms/Row/styles.d.ts +9 -0
  125. package/dist/types/atoms/Row/styles.d.ts.map +1 -0
  126. package/dist/types/atoms/Separator/index.d.ts +21 -9
  127. package/dist/types/atoms/Separator/index.d.ts.map +1 -1
  128. package/dist/types/atoms/Separator/styles.d.ts +14 -0
  129. package/dist/types/atoms/Separator/styles.d.ts.map +1 -0
  130. package/dist/types/atoms/Stack/index.d.ts +17 -0
  131. package/dist/types/atoms/Stack/index.d.ts.map +1 -0
  132. package/dist/types/atoms/Stack/styles.d.ts +12 -0
  133. package/dist/types/atoms/Stack/styles.d.ts.map +1 -0
  134. package/dist/types/atoms/Stat/index.d.ts +24 -0
  135. package/dist/types/atoms/Stat/index.d.ts.map +1 -0
  136. package/dist/types/atoms/Stat/styles.d.ts +19 -0
  137. package/dist/types/atoms/Stat/styles.d.ts.map +1 -0
  138. package/dist/types/atoms/StatusText/index.d.ts +17 -0
  139. package/dist/types/atoms/StatusText/index.d.ts.map +1 -0
  140. package/dist/types/atoms/StatusText/styles.d.ts +13 -0
  141. package/dist/types/atoms/StatusText/styles.d.ts.map +1 -0
  142. package/dist/types/atoms/Submit/index.d.ts +2 -2
  143. package/dist/types/atoms/Submit/index.d.ts.map +1 -1
  144. package/dist/types/atoms/SubtleText/index.d.ts +17 -0
  145. package/dist/types/atoms/SubtleText/index.d.ts.map +1 -0
  146. package/dist/types/atoms/SubtleText/styles.d.ts +12 -0
  147. package/dist/types/atoms/SubtleText/styles.d.ts.map +1 -0
  148. package/dist/types/atoms/Surface/index.d.ts +34 -0
  149. package/dist/types/atoms/Surface/index.d.ts.map +1 -0
  150. package/dist/types/atoms/Surface/styles.d.ts +27 -0
  151. package/dist/types/atoms/Surface/styles.d.ts.map +1 -0
  152. package/dist/types/atoms/Switch/index.d.ts.map +1 -1
  153. package/dist/types/atoms/Switch/styles.d.ts.map +1 -1
  154. package/dist/types/atoms/Tabs/index.d.ts +1 -1
  155. package/dist/types/atoms/Tabs/index.d.ts.map +1 -1
  156. package/dist/types/atoms/Tabs/styles.d.ts.map +1 -1
  157. package/dist/types/atoms/TextCheckbox/index.d.ts +1 -1
  158. package/dist/types/atoms/TextCheckbox/index.d.ts.map +1 -1
  159. package/dist/types/atoms/TextLink/index.d.ts +22 -0
  160. package/dist/types/atoms/TextLink/index.d.ts.map +1 -0
  161. package/dist/types/atoms/TextLink/styles.d.ts +15 -0
  162. package/dist/types/atoms/TextLink/styles.d.ts.map +1 -0
  163. package/dist/types/atoms/Textarea/index.d.ts +1 -1
  164. package/dist/types/atoms/Textarea/index.d.ts.map +1 -1
  165. package/dist/types/atoms/Toggle/index.d.ts +1 -1
  166. package/dist/types/atoms/Toggle/index.d.ts.map +1 -1
  167. package/dist/types/atoms/Tooltip/index.d.ts.map +1 -1
  168. package/dist/types/atoms/Tooltip/styles.d.ts.map +1 -1
  169. package/dist/types/atoms/Typography/index.d.ts +1 -1
  170. package/dist/types/atoms/Typography/index.d.ts.map +1 -1
  171. package/dist/types/atoms/Typography/styles.d.ts +8 -4
  172. package/dist/types/atoms/Typography/styles.d.ts.map +1 -1
  173. package/dist/types/atoms/Validation/index.d.ts.map +1 -1
  174. package/dist/types/atoms/Validation/styles.d.ts.map +1 -1
  175. package/dist/types/atoms/WideImage/index.d.ts +4 -4
  176. package/dist/types/atoms/WideImage/index.d.ts.map +1 -1
  177. package/dist/types/molecules/Badge/index.d.ts +1 -1
  178. package/dist/types/molecules/Badge/index.d.ts.map +1 -1
  179. package/dist/types/molecules/Button/index.d.ts +1 -1
  180. package/dist/types/molecules/Button/index.d.ts.map +1 -1
  181. package/dist/types/molecules/Button/styles.d.ts +2 -2
  182. package/dist/types/molecules/Button/styles.d.ts.map +1 -1
  183. package/dist/types/molecules/Card/index.d.ts +2 -2
  184. package/dist/types/molecules/Card/index.d.ts.map +1 -1
  185. package/dist/types/molecules/Card/styles.d.ts +1 -1
  186. package/dist/types/molecules/Card/styles.d.ts.map +1 -1
  187. package/dist/types/molecules/Carousel/index.d.ts +1 -1
  188. package/dist/types/molecules/Carousel/index.d.ts.map +1 -1
  189. package/dist/types/molecules/Carousel/styles.d.ts.map +1 -1
  190. package/dist/types/molecules/Carousel/useIsMobile.d.ts +3 -0
  191. package/dist/types/molecules/Carousel/useIsMobile.d.ts.map +1 -0
  192. package/dist/types/molecules/CodeView/highlight.d.ts.map +1 -1
  193. package/dist/types/molecules/CodeView/index.d.ts +5 -5
  194. package/dist/types/molecules/CodeView/index.d.ts.map +1 -1
  195. package/dist/types/molecules/CodeView/styles.d.ts.map +1 -1
  196. package/dist/types/molecules/CodeView/tokenizer.d.ts +21 -0
  197. package/dist/types/molecules/CodeView/tokenizer.d.ts.map +1 -0
  198. package/dist/types/molecules/DiffLegend/index.d.ts +20 -0
  199. package/dist/types/molecules/DiffLegend/index.d.ts.map +1 -0
  200. package/dist/types/molecules/DiffLegend/styles.d.ts +19 -0
  201. package/dist/types/molecules/DiffLegend/styles.d.ts.map +1 -0
  202. package/dist/types/molecules/FilterBar/index.d.ts +20 -0
  203. package/dist/types/molecules/FilterBar/index.d.ts.map +1 -0
  204. package/dist/types/molecules/FilterBar/styles.d.ts +15 -0
  205. package/dist/types/molecules/FilterBar/styles.d.ts.map +1 -0
  206. package/dist/types/molecules/HtmlEditor/index.d.ts.map +1 -1
  207. package/dist/types/molecules/HtmlEditor/styles.d.ts.map +1 -1
  208. package/dist/types/molecules/NavTabs/index.d.ts +24 -0
  209. package/dist/types/molecules/NavTabs/index.d.ts.map +1 -0
  210. package/dist/types/molecules/NavTabs/styles.d.ts +15 -0
  211. package/dist/types/molecules/NavTabs/styles.d.ts.map +1 -0
  212. package/dist/types/molecules/PageHeader/index.d.ts +15 -0
  213. package/dist/types/molecules/PageHeader/index.d.ts.map +1 -0
  214. package/dist/types/molecules/PageHeader/styles.d.ts +13 -0
  215. package/dist/types/molecules/PageHeader/styles.d.ts.map +1 -0
  216. package/dist/types/molecules/ScorePanel/index.d.ts +70 -0
  217. package/dist/types/molecules/ScorePanel/index.d.ts.map +1 -0
  218. package/dist/types/molecules/ScorePanel/styles.d.ts +63 -0
  219. package/dist/types/molecules/ScorePanel/styles.d.ts.map +1 -0
  220. package/dist/types/molecules/ScorePills/index.d.ts +25 -0
  221. package/dist/types/molecules/ScorePills/index.d.ts.map +1 -0
  222. package/dist/types/molecules/ScorePills/styles.d.ts +8 -0
  223. package/dist/types/molecules/ScorePills/styles.d.ts.map +1 -0
  224. package/dist/types/molecules/SearchInput/index.d.ts +2 -2
  225. package/dist/types/molecules/SearchInput/index.d.ts.map +1 -1
  226. package/dist/types/molecules/SearchInput/styles.d.ts +5 -5
  227. package/dist/types/molecules/SearchInput/styles.d.ts.map +1 -1
  228. package/dist/types/molecules/Select/index.d.ts.map +1 -1
  229. package/dist/types/molecules/Select/styles.d.ts.map +1 -1
  230. package/dist/types/molecules/SliderField/index.d.ts +26 -0
  231. package/dist/types/molecules/SliderField/index.d.ts.map +1 -0
  232. package/dist/types/molecules/SliderField/styles.d.ts +20 -0
  233. package/dist/types/molecules/SliderField/styles.d.ts.map +1 -0
  234. package/dist/types/molecules/StatGrid/index.d.ts +12 -0
  235. package/dist/types/molecules/StatGrid/index.d.ts.map +1 -0
  236. package/dist/types/molecules/StatGrid/styles.d.ts +9 -0
  237. package/dist/types/molecules/StatGrid/styles.d.ts.map +1 -0
  238. package/dist/types/molecules/StatusLabel/index.d.ts +1 -1
  239. package/dist/types/molecules/StatusLabel/index.d.ts.map +1 -1
  240. package/dist/types/molecules/StatusLabel/styles.d.ts.map +1 -1
  241. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts +1 -1
  242. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts.map +1 -1
  243. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts +13 -0
  244. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts.map +1 -0
  245. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts +1 -1
  246. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts.map +1 -1
  247. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts +4 -4
  248. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts.map +1 -1
  249. package/dist/types/molecules/Table/TableCels/TextCell.d.ts +3 -3
  250. package/dist/types/molecules/Table/TableCels/TextCell.d.ts.map +1 -1
  251. package/dist/types/molecules/Table/TableCels/index.d.ts +7 -6
  252. package/dist/types/molecules/Table/TableCels/index.d.ts.map +1 -1
  253. package/dist/types/molecules/Table/TableCels/styles.d.ts +25 -2
  254. package/dist/types/molecules/Table/TableCels/styles.d.ts.map +1 -1
  255. package/dist/types/molecules/Table/index.d.ts +16 -5
  256. package/dist/types/molecules/Table/index.d.ts.map +1 -1
  257. package/dist/types/molecules/Table/styles.d.ts +11 -1
  258. package/dist/types/molecules/Table/styles.d.ts.map +1 -1
  259. package/dist/types/molecules/TokenInputField/index.d.ts.map +1 -1
  260. package/dist/types/shared/modals/index.d.ts +4 -4
  261. package/dist/types/shared/modals/index.d.ts.map +1 -1
  262. package/dist/types/shared/modals/styles.d.ts.map +1 -1
  263. package/dist/types/shared/modals/useModal.d.ts.map +1 -1
  264. package/dist/types/shared/report-ui/DecisionPanel.d.ts +1 -1
  265. package/dist/types/shared/report-ui/DecisionPanel.d.ts.map +1 -1
  266. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts.map +1 -1
  267. package/dist/types/shared/report-ui/Pagination.d.ts +13 -0
  268. package/dist/types/shared/report-ui/Pagination.d.ts.map +1 -0
  269. package/dist/types/shared/report-ui/Pagination.styles.d.ts +13 -0
  270. package/dist/types/shared/report-ui/Pagination.styles.d.ts.map +1 -0
  271. package/dist/types/shared/report-ui/Shell.styles.d.ts.map +1 -1
  272. package/dist/types/shared/report-ui/index.d.ts +7 -5
  273. package/dist/types/shared/report-ui/index.d.ts.map +1 -1
  274. package/dist/types/shared/report-ui/ui.d.ts +1 -1
  275. package/dist/types/shared/report-ui/ui.d.ts.map +1 -1
  276. package/dist/types/shared/report-ui/ui.styles.d.ts.map +1 -1
  277. package/dist/types/shared/toasts/index.d.ts +2 -2
  278. package/dist/types/shared/toasts/index.d.ts.map +1 -1
  279. package/dist/types/textures/Cloud/index.d.ts +4 -4
  280. package/dist/types/textures/Cloud/index.d.ts.map +1 -1
  281. package/dist/types/textures/Paper/index.d.ts.map +1 -1
  282. package/dist/types/textures/index.d.ts +3 -3
  283. package/dist/types/textures/index.d.ts.map +1 -1
  284. package/dist/typography.js +71 -70
  285. package/dist/validation.js +15 -15
  286. package/dist/wide-image.js +39 -36
  287. package/package.json +2099 -443
  288. package/dist/CentralModal-ButM9Ggi.js +0 -159
  289. package/dist/dist-DD9Lv2Ja.js +0 -130
  290. package/dist/themes-zS3KQYdw-DIqyzjFD.js +0 -184
package/dist/report-ui.js CHANGED
@@ -1,23 +1,24 @@
1
1
  import "react";
2
- import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import r from "styled-components";
2
+ import e from "styled-components";
3
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  // shared/report-ui/ui.styles.ts
5
- var i = r.section`
5
+ var i = e.section`
6
6
  background: ${(e) => e.theme.colors.section};
7
- border: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
7
+ border: ${(e) => e.theme.border.size} solid
8
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
8
9
  border-radius: ${(e) => e.theme.border.radius};
9
10
  padding: ${(e) => e.theme.offsets.section};
10
11
  min-width: 0;
11
12
  max-width: 100%;
12
13
  ${(e) => e.$accent ? `border-left: 3px solid ${e.$accent};` : ""}
13
- `, a = r.header`
14
+ `, a = e.header`
14
15
  display: flex;
15
16
  align-items: baseline;
16
17
  flex-wrap: wrap;
17
18
  gap: ${(e) => e.theme.offsets.betweenElements};
18
19
  margin-bottom: ${(e) => e.theme.offsets.betweenElements};
19
20
  min-width: 0;
20
- `, o = r.h2`
21
+ `, o = e.h2`
21
22
  font-size: 15px;
22
23
  font-weight: 650;
23
24
  margin: 0;
@@ -25,15 +26,15 @@ var i = r.section`
25
26
  flex: 1 1 auto;
26
27
  min-width: 0;
27
28
  overflow-wrap: anywhere;
28
- `, s = r.span`
29
+ `, s = e.span`
29
30
  color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
30
31
  font-size: 12px;
31
- `, c = r.code`
32
+ `, c = e.code`
32
33
  font-family: ${(e) => e.theme.font.family.text};
33
34
  font-size: 12.5px;
34
35
  overflow-wrap: anywhere;
35
36
  color: ${(e) => e.theme.colors.sectionContent};
36
- `, l = r.span`
37
+ `, l = e.span`
37
38
  display: inline-flex;
38
39
  align-items: center;
39
40
  gap: 5px;
@@ -46,109 +47,121 @@ var i = r.section`
46
47
  max-width: 100%;
47
48
  color: ${(e) => e.$color ?? e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
48
49
  background: ${(e) => e.$color ? `${e.$color}1f` : `${e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted}88`};
49
- border: ${(e) => e.theme.border.size} solid ${(e) => e.$color ? `${e.$color}55` : e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
50
- `, u = r.input`
50
+ border: ${(e) => e.theme.border.size} solid
51
+ ${(e) => e.$color ? `${e.$color}55` : e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
52
+ `, u = e.input`
51
53
  width: 100%;
52
54
  background: ${(e) => e.theme.colors.overlay};
53
- border: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
55
+ border: ${(e) => e.theme.border.size} solid
56
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
54
57
  border-radius: ${(e) => e.theme.border.radius};
55
58
  color: ${(e) => e.theme.colors.sectionContent};
56
59
  padding: 8px 11px;
57
60
  font-size: 13px;
58
61
  outline: none;
59
- &:focus { border-color: ${(e) => e.theme.colors.highlighted}; }
60
- &::placeholder { color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent}; }
61
- `, d = r.div`
62
+
63
+ &:focus {
64
+ border-color: ${(e) => e.theme.colors.highlighted};
65
+ }
66
+
67
+ &::placeholder {
68
+ color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
69
+ }
70
+ `, d = e.div`
62
71
  display: grid;
63
72
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
64
73
  gap: ${(e) => e.theme.offsets.elementContent};
65
- `, f = r.div`
74
+ `, f = e.div`
66
75
  background: ${(e) => e.theme.colors.overlay};
67
- border: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
76
+ border: ${(e) => e.theme.border.size} solid
77
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
68
78
  border-radius: ${(e) => e.theme.border.radius};
69
79
  padding: 10px 12px;
70
- `, p = r.div`
80
+ `, p = e.div`
71
81
  display: flex;
72
82
  flex-direction: column;
73
83
  gap: ${(e) => e.theme.offsets.betweenElements};
74
84
  min-width: 0;
75
- `, m = r.div`
85
+ `, m = e.div`
76
86
  display: flex;
77
87
  align-items: baseline;
78
88
  flex-wrap: wrap;
79
89
  gap: ${(e) => e.theme.offsets.elementContent};
80
90
  min-width: 0;
81
- `, h = r.div`
82
- padding: calc(${(e) => e.theme.offsets.section} + ${(e) => e.theme.offsets.betweenElements}) ${(e) => e.theme.offsets.elementContent};
91
+ `, h = e.div`
92
+ padding: calc(${(e) => e.theme.offsets.section} + ${(e) => e.theme.offsets.betweenElements})
93
+ ${(e) => e.theme.offsets.elementContent};
83
94
  text-align: center;
84
95
  color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
85
96
  font-size: 13px;
86
- `, g = r.div`
97
+ `, g = e.div`
87
98
  font-size: 21px;
88
99
  font-weight: 700;
89
100
  color: ${(e) => e.$color ?? e.theme.colors.sectionContent};
90
101
  line-height: 1.2;
91
- `, _ = r.div`
102
+ `, _ = e.div`
92
103
  font-size: 11px;
93
104
  color: ${(e) => e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
94
105
  text-transform: uppercase;
95
106
  letter-spacing: 0.6px;
96
- `, v = ({ children: e, color: n, nowrap: r, ...i }) => /* @__PURE__ */ t(l, {
97
- $color: n,
107
+ `, v = ({ children: e, color: t, nowrap: r, ...i }) => /* @__PURE__ */ n(l, {
108
+ $color: t,
98
109
  $nowrap: r,
99
110
  ...i,
100
111
  children: e
101
- }), y = ({ children: e }) => /* @__PURE__ */ t(h, { children: e }), b = ({ value: e, onChange: n, placeholder: r = "Filter…" }) => /* @__PURE__ */ t(u, {
112
+ }), y = ({ children: e }) => /* @__PURE__ */ n(h, { children: e }), b = ({ value: e, onChange: t, placeholder: r = "Filter…" }) => /* @__PURE__ */ n(u, {
102
113
  value: e,
103
- onChange: (e) => n(e.target.value),
114
+ onChange: (e) => t(e.target.value),
104
115
  placeholder: r,
105
116
  "aria-label": r
106
- }), x = ({ label: e, value: r, color: i }) => /* @__PURE__ */ n(f, { children: [/* @__PURE__ */ t(g, {
117
+ }), x = ({ label: e, value: t, color: i }) => /* @__PURE__ */ r(f, { children: [/* @__PURE__ */ n(g, {
107
118
  $color: i,
108
- children: r
109
- }), /* @__PURE__ */ t(_, { children: e })] }), S = ({ children: e }) => /* @__PURE__ */ t(d, { children: e }), C = r.div`
119
+ children: t
120
+ }), /* @__PURE__ */ n(_, { children: e })] }), S = ({ children: e }) => /* @__PURE__ */ n(d, { children: e }), C = e.div`
110
121
  display: grid;
111
122
  grid-template-columns: 96px minmax(0, 1fr) 120px;
112
123
  align-items: center;
113
124
  gap: ${(e) => e.theme.offsets.elementContent};
114
125
  margin-bottom: 6px;
115
- `, w = r.div`
126
+ `, w = e.div`
116
127
  position: relative;
117
128
  height: 10px;
118
129
  border-radius: 999px;
119
130
  background: ${(e) => e.theme.colors.overlay};
120
- border: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
131
+ border: ${(e) => e.theme.border.size} solid
132
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
121
133
  overflow: hidden;
122
- `, T = r.div`
134
+ `, T = e.div`
123
135
  position: absolute;
124
136
  inset: 0 auto 0 0;
125
137
  width: ${(e) => `${Math.round(e.$score * 100)}%`};
126
138
  background: ${(e) => e.$color};
127
139
  opacity: ${(e) => e.$applied ? 1 : .25};
128
- `, E = r.div`
140
+ `, E = e.div`
129
141
  display: flex;
130
142
  flex-wrap: wrap;
131
143
  gap: 4px;
132
- margin: 0 0 10px 0;
133
- `, D = r.span`
144
+ margin: 0 0 10px;
145
+ `, D = e.span`
134
146
  font-family: ${(e) => e.theme.font.family.text};
135
147
  font-size: 11px;
136
148
  padding: 1px 6px;
137
149
  border-radius: 4px;
138
150
  color: ${(e) => e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
139
151
  background: ${(e) => e.theme.colors.overlay};
140
- border: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
141
- `, O = r.ul`
152
+ border: ${(e) => e.theme.border.size} solid
153
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
154
+ `, O = e.ul`
142
155
  margin: 0;
143
156
  padding-left: 18px;
144
157
  font-size: 12.5px;
145
158
  color: ${(e) => e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
146
- `, k = r.li`
159
+ `, k = e.li`
147
160
  margin-bottom: 3px;
148
161
  color: ${(e) => e.$tone === "veto" ? e.theme.colors.status?.warn?.content ?? e.theme.colors.sectionContent : e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
149
- `, A = r.strong`
162
+ `, A = e.strong`
150
163
  color: ${(e) => e.theme.colors.status?.ok?.content ?? e.theme.colors.sectionContent};
151
- `, j = (e) => Number.isFinite(e) ? e.toFixed(2) : "—", M = (e) => Number.isFinite(e) ? `${Math.round(e * 100)}%` : "—", N = ({ decision: r }) => /* @__PURE__ */ t(e, { children: (r?.signals ?? []).map((e) => /* @__PURE__ */ n(v, {
164
+ `, j = (e) => Number.isFinite(e) ? e.toFixed(2) : "—", M = (e) => Number.isFinite(e) ? `${Math.round(e * 100)}%` : "—", N = ({ decision: e }) => /* @__PURE__ */ n(t, { children: (e?.signals ?? []).map((e) => /* @__PURE__ */ r(v, {
152
165
  color: e.color,
153
166
  nowrap: !0,
154
167
  title: `${String(e.label)} ${j(e.score)} · ${M(e.weight)} weight · ${M(e.contribution)} of the verdict`,
@@ -157,12 +170,12 @@ var i = r.section`
157
170
  " ",
158
171
  j(e.score)
159
172
  ]
160
- }, e.key)) }), P = ({ decision: e, fix: r, title: c = "Why this verdict", accent: l }) => e ? /* @__PURE__ */ n(i, {
173
+ }, e.key)) }), P = ({ decision: e, fix: t, title: c = "Why this verdict", accent: l }) => e ? /* @__PURE__ */ r(i, {
161
174
  $accent: l,
162
175
  children: [
163
- /* @__PURE__ */ n(a, { children: [
164
- /* @__PURE__ */ t(o, { children: c }),
165
- /* @__PURE__ */ n(v, {
176
+ /* @__PURE__ */ r(a, { children: [
177
+ /* @__PURE__ */ n(o, { children: c }),
178
+ /* @__PURE__ */ r(v, {
166
179
  color: l,
167
180
  nowrap: !0,
168
181
  children: [
@@ -173,39 +186,37 @@ var i = r.section`
173
186
  ")"
174
187
  ]
175
188
  }),
176
- /* @__PURE__ */ n(s, { children: [
189
+ /* @__PURE__ */ r(s, { children: [
177
190
  "duplicate ≥ ",
178
191
  j(e.thresholds.duplicate),
179
- " · similar ≥",
180
- " ",
192
+ " · similar ≥ ",
181
193
  j(e.thresholds.similar)
182
194
  ] })
183
195
  ] }),
184
- (e.signals ?? []).map((e) => /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ n(C, {
196
+ (e.signals ?? []).map((e) => /* @__PURE__ */ r("div", { children: [/* @__PURE__ */ r(C, {
185
197
  title: e.what,
186
198
  children: [
187
- /* @__PURE__ */ t("span", {
199
+ /* @__PURE__ */ n("span", {
188
200
  style: {
189
201
  color: e.color,
190
202
  fontWeight: 600
191
203
  },
192
204
  children: e.label
193
205
  }),
194
- /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(T, {
206
+ /* @__PURE__ */ n(w, { children: /* @__PURE__ */ n(T, {
195
207
  $score: e.score,
196
208
  $color: e.color,
197
209
  $applied: e.applied
198
210
  }) }),
199
- /* @__PURE__ */ n(s, { children: [
211
+ /* @__PURE__ */ r(s, { children: [
200
212
  j(e.score),
201
213
  " · w ",
202
214
  M(e.weight),
203
- " ·",
204
- " ",
215
+ " · ",
205
216
  M(e.contribution)
206
217
  ] })
207
218
  ]
208
- }), e.evidence?.length ? /* @__PURE__ */ t(E, { children: e.evidence.map((e) => /* @__PURE__ */ n(D, {
219
+ }), e.evidence?.length ? /* @__PURE__ */ n(E, { children: e.evidence.map((e) => /* @__PURE__ */ r(D, {
209
220
  title: e.key,
210
221
  children: [
211
222
  e.label,
@@ -213,44 +224,106 @@ var i = r.section`
213
224
  e.value
214
225
  ]
215
226
  }, e.key)) }) : null] }, e.key)),
216
- /* @__PURE__ */ t(O, { children: (e.why ?? []).map((e, n) => /* @__PURE__ */ t(k, {
227
+ /* @__PURE__ */ n(O, { children: (e.why ?? []).map((e, t) => /* @__PURE__ */ n(k, {
217
228
  $tone: e.tone,
218
229
  children: e.text
219
- }, n)) }),
220
- r ? /* @__PURE__ */ n("div", {
230
+ }, t)) }),
231
+ t ? /* @__PURE__ */ r("div", {
221
232
  style: {
222
233
  marginTop: 12,
223
234
  fontSize: 13
224
235
  },
225
236
  children: [
226
- /* @__PURE__ */ t(A, { children: "Fix." }),
237
+ /* @__PURE__ */ n(A, { children: "Fix." }),
227
238
  " ",
228
- r.text
239
+ t.text
229
240
  ]
230
241
  }) : null
231
242
  ]
232
- }) : null, F = r.div`
243
+ }) : null, F = e.nav`
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ gap: ${(e) => e.theme.offsets.elementContent};
248
+ margin-top: ${(e) => e.theme.offsets.betweenElements};
249
+ `, I = e.button`
250
+ font-size: 12px;
251
+ padding: 3px 10px;
252
+ border-radius: 999px;
253
+ cursor: pointer;
254
+ color: ${(e) => e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
255
+ background: ${(e) => e.theme.colors.overlay};
256
+ border: ${(e) => e.theme.border.size} solid
257
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
258
+
259
+ &:disabled {
260
+ opacity: 0.4;
261
+ cursor: default;
262
+ }
263
+
264
+ &:hover:not(:disabled) {
265
+ color: ${(e) => e.theme.colors.sectionContent};
266
+ }
267
+ `, L = e.span`
268
+ font-size: 12px;
269
+ color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
270
+ `, R = e.span`
271
+ font-size: 12px;
272
+ color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
273
+ `, z = ({ page: e, pageCount: t, onChange: i }) => /* @__PURE__ */ r(F, {
274
+ "aria-label": "pagination",
275
+ children: [
276
+ /* @__PURE__ */ n(I, {
277
+ type: "button",
278
+ disabled: e <= 0,
279
+ onClick: () => i(e - 1),
280
+ children: "«← prev"
281
+ }),
282
+ /* @__PURE__ */ n(L, {
283
+ "aria-hidden": "true",
284
+ children: "·"
285
+ }),
286
+ /* @__PURE__ */ r(R, { children: [
287
+ "page ",
288
+ e + 1,
289
+ " / ",
290
+ t
291
+ ] }),
292
+ /* @__PURE__ */ n(L, {
293
+ "aria-hidden": "true",
294
+ children: "·"
295
+ }),
296
+ /* @__PURE__ */ n(I, {
297
+ type: "button",
298
+ disabled: e >= t - 1,
299
+ onClick: () => i(e + 1),
300
+ children: "next →»"
301
+ })
302
+ ]
303
+ }), B = e.div`
233
304
  max-width: none;
234
305
  margin: 0 auto;
235
- padding: calc(${(e) => e.theme.offsets.section} + ${(e) => e.theme.offsets.elementContent} / 2) ${(e) => e.theme.offsets.section} calc(${(e) => e.theme.offsets.section} * 4);
236
- `, I = r.header`
306
+ padding: calc(${(e) => e.theme.offsets.section} + ${(e) => e.theme.offsets.elementContent} / 2)
307
+ ${(e) => e.theme.offsets.section} calc(${(e) => e.theme.offsets.section} * 4);
308
+ `, V = e.header`
237
309
  display: flex;
238
310
  flex-wrap: wrap;
239
311
  align-items: baseline;
240
312
  gap: ${(e) => e.theme.offsets.betweenElements};
241
313
  padding-bottom: ${(e) => e.theme.offsets.betweenElements};
242
- border-bottom: ${(e) => e.theme.border.size} solid ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
314
+ border-bottom: ${(e) => e.theme.border.size} solid
315
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
243
316
  margin-bottom: ${(e) => e.theme.offsets.section};
244
- `, L = r.h1`
317
+ `, H = e.h1`
245
318
  font-size: 18px;
246
319
  margin: 0;
247
320
  letter-spacing: 0.2px;
248
- `, R = r.nav`
321
+ `, U = e.nav`
249
322
  display: flex;
250
323
  flex-wrap: wrap;
251
324
  gap: 4px;
252
325
  margin-bottom: ${(e) => e.theme.offsets.section};
253
- `, z = r.a`
326
+ `, W = e.a`
254
327
  padding: 6px 12px;
255
328
  border-radius: ${(e) => e.theme.border.radius};
256
329
  font-size: 13px;
@@ -258,17 +331,22 @@ var i = r.section`
258
331
  color: ${(e) => e.$active ? e.theme.colors.sectionContent : e.theme.colors.status?.dim?.content ?? e.theme.colors.sectionContent};
259
332
  background: ${(e) => e.$active ? e.theme.colors.overlay : "transparent"};
260
333
  border: ${(e) => e.theme.border.size} solid ${(e) => e.$active ? e.theme.colors.highlighted : "transparent"};
261
- &:hover { text-decoration: none; color: ${(e) => e.theme.colors.sectionContent}; }
262
- `, B = r.div`
334
+
335
+ &:hover {
336
+ text-decoration: none;
337
+ color: ${(e) => e.theme.colors.sectionContent};
338
+ }
339
+ `, G = e.div`
263
340
  display: flex;
264
341
  flex-wrap: wrap;
265
342
  gap: ${(e) => e.theme.offsets.betweenElements};
266
343
  margin-top: ${(e) => e.theme.offsets.betweenElements};
267
344
  padding-top: ${(e) => e.theme.offsets.betweenElements};
268
- border-top: ${(e) => e.theme.border.size} dashed ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
345
+ border-top: ${(e) => e.theme.border.size} dashed
346
+ ${(e) => e.theme.colors.status?.edge?.background ?? e.theme.colors.highlighted};
269
347
  font-size: 12px;
270
348
  color: ${(e) => e.theme.colors.status?.faint?.content ?? e.theme.colors.sectionContent};
271
- `, V = r.span`
349
+ `, K = e.span`
272
350
  display: inline-block;
273
351
  width: 10px;
274
352
  height: 10px;
@@ -277,4 +355,4 @@ var i = r.section`
277
355
  margin-right: 5px;
278
356
  vertical-align: baseline;
279
357
  `;
280
- export { v as Badge, l as BadgeBox, C as Bar, D as Chip, E as ChipRow, P as DecisionPanel, y as Empty, h as EmptyBox, T as Fill, A as FixMark, F as Frame, I as Head, B as Legend, c as Mono, i as Panel, a as PanelHead, L as Repo, m as Row, b as SearchBox, u as SearchInput, N as SignalPills, p as Stack, x as Stat, f as StatCell, d as StatGrid, _ as StatLabel, g as StatValue, S as Stats, s as Subtle, V as Swatch, z as TabLink, R as Tabs, o as Title, w as Track, O as Why, k as WhyLine };
358
+ export { v as Badge, l as BadgeBox, C as Bar, D as Chip, E as ChipRow, P as DecisionPanel, y as Empty, h as EmptyBox, T as Fill, A as FixMark, B as Frame, V as Head, G as Legend, c as Mono, L as PageDot, R as PagePosition, I as PageStep, F as PagerRow, z as Pagination, i as Panel, a as PanelHead, H as Repo, m as Row, b as SearchBox, u as SearchInput, N as SignalPills, p as Stack, x as Stat, f as StatCell, d as StatGrid, _ as StatLabel, g as StatValue, S as Stats, s as Subtle, K as Swatch, W as TabLink, U as Tabs, o as Title, w as Track, O as Why, k as WhyLine };
package/dist/row.js ADDED
@@ -0,0 +1,15 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/Row/styles.ts
5
+ var n = e.div`
6
+ display: flex;
7
+ align-items: baseline;
8
+ flex-wrap: wrap;
9
+ gap: ${({ theme: e }) => e.offsets.elementContent};
10
+ min-width: 0;
11
+ `, r = ({ children: e, ...r }) => /* @__PURE__ */ t(n, {
12
+ ...r,
13
+ children: e
14
+ });
15
+ export { r as Row };
@@ -0,0 +1,125 @@
1
+ import { Chip as e } from "@md-code/components/chip";
2
+ import { SubtleText as t } from "@md-code/components/subtle-text";
3
+ import { Surface as n } from "@md-code/components/surface";
4
+ import "react";
5
+ import r from "styled-components";
6
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ // molecules/ScorePanel/styles.ts
8
+ var s = r.div`
9
+ display: grid;
10
+ grid-template-columns: calc(${({ theme: e }) => e.offsets.section} * 6) minmax(0, 1fr)
11
+ calc(${({ theme: e }) => e.font.sizes.large} * 8);
12
+ align-items: center;
13
+ gap: ${({ theme: e }) => e.offsets.elementContent};
14
+ margin-bottom: calc(${({ theme: e }) => e.offsets.elementContent} - ${({ theme: e }) => e.border.size} * 2);
15
+ `, c = r.div`
16
+ position: relative;
17
+ height: calc(${({ theme: e }) => e.offsets.elementContent} + ${({ theme: e }) => e.border.size} * 2);
18
+ border-radius: calc(${({ theme: e }) => e.border.radius} * 100);
19
+ background: ${({ theme: e }) => e.colors.overlay};
20
+ border: ${({ theme: e }) => e.border.size} solid
21
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
22
+ overflow: hidden;
23
+ `, l = r.div`
24
+ position: absolute;
25
+ inset: 0 auto 0 0;
26
+ width: ${({ $score: e }) => `${Math.round(e * 100)}%`};
27
+ background: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.content ?? t.colors.section};
28
+ opacity: ${({ $applied: e }) => e ? 1 : .25};
29
+ `, u = r.span`
30
+ font-weight: ${({ theme: e }) => e.font.weight.title};
31
+ color: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.content ?? t.colors.sectionContent};
32
+ `, d = r.div`
33
+ display: flex;
34
+ flex-wrap: wrap;
35
+ gap: calc(${({ theme: e }) => e.offsets.elementContent} / 2);
36
+ margin: 0 0 calc(${({ theme: e }) => e.offsets.elementContent} + ${({ theme: e }) => e.border.size} * 2);
37
+ `, f = r.span`
38
+ font-family: ${({ theme: e }) => e.font.family.text};
39
+ font-size: calc(${({ theme: e }) => e.font.sizes.small} - ${({ theme: e }) => e.border.size});
40
+ padding: ${({ theme: e }) => e.border.size} calc(${({ theme: e }) => e.offsets.elementContent} - ${({ theme: e }) => e.border.size} * 2);
41
+ border-radius: calc(${({ theme: e }) => e.border.radius} - ${({ theme: e }) => e.border.size} * 2);
42
+ color: ${({ theme: e }) => e.colors.status?.dim?.content ?? e.colors.sectionContent};
43
+ background: ${({ theme: e }) => e.colors.overlay};
44
+ border: ${({ theme: e }) => e.border.size} solid
45
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
46
+ `, p = r.ul`
47
+ margin: 0;
48
+ padding-left: calc(${({ theme: e }) => e.offsets.section} + ${({ theme: e }) => e.border.size} * 2);
49
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
50
+ color: ${({ theme: e }) => e.colors.status?.dim?.content ?? e.colors.sectionContent};
51
+ `, m = r.li`
52
+ margin-bottom: calc(${({ theme: e }) => e.border.size} * 3);
53
+ color: ${({ $status: e, theme: t }) => (e ? t.colors.status?.[e] : void 0)?.content ?? t.colors.status?.dim?.content ?? t.colors.sectionContent};
54
+ `, h = r.strong`
55
+ color: ${({ theme: e }) => e.colors.status?.ok?.content ?? e.colors.sectionContent};
56
+ `, g = r.div`
57
+ margin-top: ${({ theme: e }) => e.offsets.betweenElements};
58
+ font-size: calc(${({ theme: e }) => e.font.sizes.small} + ${({ theme: e }) => e.border.size});
59
+ `, _ = (e) => Number.isFinite(e) ? e.toFixed(2) : "—", v = (e) => Number.isFinite(e) ? `${Math.round(e * 100)}%` : "—", y = ({ heading: r, status: y, value: b, thresholds: x, parts: S, notes: C, valueLabel: w = "score", action: T }) => {
60
+ let E = [];
61
+ for (let e of S ?? []) {
62
+ let n = [];
63
+ for (let t of e.facts ?? []) n.push(/* @__PURE__ */ o(f, {
64
+ title: String(t.key),
65
+ children: [
66
+ t.label,
67
+ ": ",
68
+ t.value
69
+ ]
70
+ }, t.key));
71
+ E.push(/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ o(s, {
72
+ title: e.note,
73
+ children: [
74
+ /* @__PURE__ */ a(u, {
75
+ $status: e.status,
76
+ children: e.label
77
+ }),
78
+ /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(l, {
79
+ $score: e.score,
80
+ $status: e.status,
81
+ $applied: e.applied
82
+ }) }),
83
+ /* @__PURE__ */ o(t, { children: [
84
+ _(e.score),
85
+ " · w ",
86
+ v(e.weight),
87
+ " · ",
88
+ v(e.contribution)
89
+ ] })
90
+ ]
91
+ }), n.length ? /* @__PURE__ */ a(d, { children: n }) : null] }, e.key));
92
+ }
93
+ let D = [];
94
+ for (let e of C ?? []) D.push(/* @__PURE__ */ a(m, {
95
+ $status: e.status,
96
+ children: e.text
97
+ }, String(e.text)));
98
+ let O = (x ?? []).map((e) => `${String(e.label)} ≥ ${_(e.value)}`).join(" · ");
99
+ return /* @__PURE__ */ o(n, {
100
+ $status: y,
101
+ heading: r,
102
+ actions: /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o(e, {
103
+ $status: y,
104
+ $nowrap: !0,
105
+ children: [
106
+ w,
107
+ " ",
108
+ _(b),
109
+ " (",
110
+ v(b),
111
+ ")"
112
+ ]
113
+ }), O ? /* @__PURE__ */ a(t, { children: O }) : null] }),
114
+ children: [
115
+ E,
116
+ D.length ? /* @__PURE__ */ a(p, { children: D }) : null,
117
+ T ? /* @__PURE__ */ o(g, { children: [
118
+ T.mark == null ? null : /* @__PURE__ */ a(h, { children: T.mark }),
119
+ T.mark == null ? null : " ",
120
+ T.text
121
+ ] }) : null
122
+ ]
123
+ });
124
+ };
125
+ export { y as ScorePanel };
@@ -0,0 +1,25 @@
1
+ import { Chip as e } from "@md-code/components/chip";
2
+ import "react";
3
+ import t from "styled-components";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ // molecules/ScorePills/styles.ts
6
+ var i = t.div`
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+ align-items: center;
10
+ gap: ${({ theme: e }) => e.offsets.elementContent};
11
+ `, a = (e) => Number.isFinite(e) ? e.toFixed(2) : "—", o = ({ items: t = [] }) => {
12
+ let o = [];
13
+ for (let n of t) o.push(/* @__PURE__ */ r(e, {
14
+ $status: n.status,
15
+ $nowrap: !0,
16
+ title: n.title,
17
+ children: [
18
+ n.label,
19
+ " ",
20
+ a(n.value)
21
+ ]
22
+ }, n.key));
23
+ return /* @__PURE__ */ n(i, { children: o });
24
+ };
25
+ export { o as ScorePills };