@kanzo-tech/ui 0.0.1-alpha

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 (499) hide show
  1. package/README.md +60 -0
  2. package/dist/analytics.d.ts +36 -0
  3. package/dist/analytics.d.ts.map +1 -0
  4. package/dist/analytics.js +155 -0
  5. package/dist/analytics.js.map +1 -0
  6. package/dist/charts/arrow.d.ts +37 -0
  7. package/dist/charts/arrow.d.ts.map +1 -0
  8. package/dist/charts/arrow.js +29 -0
  9. package/dist/charts/arrow.js.map +1 -0
  10. package/dist/charts/chart-axes.d.ts +59 -0
  11. package/dist/charts/chart-axes.d.ts.map +1 -0
  12. package/dist/charts/chart-axes.js +39 -0
  13. package/dist/charts/chart-axes.js.map +1 -0
  14. package/dist/charts/chart-config.d.ts +52 -0
  15. package/dist/charts/chart-config.d.ts.map +1 -0
  16. package/dist/charts/chart-config.js +43 -0
  17. package/dist/charts/chart-config.js.map +1 -0
  18. package/dist/charts/chart-inputs.d.ts +174 -0
  19. package/dist/charts/chart-inputs.d.ts.map +1 -0
  20. package/dist/charts/chart-inputs.js +382 -0
  21. package/dist/charts/chart-inputs.js.map +1 -0
  22. package/dist/charts/chart-interactors.d.ts +75 -0
  23. package/dist/charts/chart-interactors.d.ts.map +1 -0
  24. package/dist/charts/chart-interactors.js +35 -0
  25. package/dist/charts/chart-interactors.js.map +1 -0
  26. package/dist/charts/chart-legend.d.ts +38 -0
  27. package/dist/charts/chart-legend.d.ts.map +1 -0
  28. package/dist/charts/chart-legend.js +49 -0
  29. package/dist/charts/chart-legend.js.map +1 -0
  30. package/dist/charts/chart-marks.d.ts +124 -0
  31. package/dist/charts/chart-marks.d.ts.map +1 -0
  32. package/dist/charts/chart-marks.js +109 -0
  33. package/dist/charts/chart-marks.js.map +1 -0
  34. package/dist/charts/chart-root.d.ts +90 -0
  35. package/dist/charts/chart-root.d.ts.map +1 -0
  36. package/dist/charts/chart-root.js +162 -0
  37. package/dist/charts/chart-root.js.map +1 -0
  38. package/dist/charts/chart-spec.d.ts +126 -0
  39. package/dist/charts/chart-spec.d.ts.map +1 -0
  40. package/dist/charts/chart-spec.js +133 -0
  41. package/dist/charts/chart-spec.js.map +1 -0
  42. package/dist/charts/chart-stat.d.ts +23 -0
  43. package/dist/charts/chart-stat.d.ts.map +1 -0
  44. package/dist/charts/chart-stat.js +24 -0
  45. package/dist/charts/chart-stat.js.map +1 -0
  46. package/dist/charts/id-set-client.d.ts +42 -0
  47. package/dist/charts/id-set-client.d.ts.map +1 -0
  48. package/dist/charts/id-set-client.js +43 -0
  49. package/dist/charts/id-set-client.js.map +1 -0
  50. package/dist/charts/mosaic-provider.d.ts +70 -0
  51. package/dist/charts/mosaic-provider.d.ts.map +1 -0
  52. package/dist/charts/mosaic-provider.js +53 -0
  53. package/dist/charts/mosaic-provider.js.map +1 -0
  54. package/dist/charts/query-client.d.ts +22 -0
  55. package/dist/charts/query-client.d.ts.map +1 -0
  56. package/dist/charts/query-client.js +26 -0
  57. package/dist/charts/query-client.js.map +1 -0
  58. package/dist/charts/tokenized-plot.d.ts +26 -0
  59. package/dist/charts/tokenized-plot.d.ts.map +1 -0
  60. package/dist/charts/tokenized-plot.js +41 -0
  61. package/dist/charts/tokenized-plot.js.map +1 -0
  62. package/dist/charts/use-chart-query.d.ts +30 -0
  63. package/dist/charts/use-chart-query.d.ts.map +1 -0
  64. package/dist/charts/use-chart-query.js +19 -0
  65. package/dist/charts/use-chart-query.js.map +1 -0
  66. package/dist/composites/CodeEditor.d.ts +64 -0
  67. package/dist/composites/CodeEditor.d.ts.map +1 -0
  68. package/dist/composites/CodeEditor.js +521 -0
  69. package/dist/composites/CodeEditor.js.map +1 -0
  70. package/dist/composites/MadeWith.d.ts +39 -0
  71. package/dist/composites/MadeWith.d.ts.map +1 -0
  72. package/dist/composites/MadeWith.js +30 -0
  73. package/dist/composites/MadeWith.js.map +1 -0
  74. package/dist/composites/Preferences.d.ts +155 -0
  75. package/dist/composites/Preferences.d.ts.map +1 -0
  76. package/dist/composites/Preferences.js +501 -0
  77. package/dist/composites/Preferences.js.map +1 -0
  78. package/dist/composites/Questionnaire.d.ts +215 -0
  79. package/dist/composites/Questionnaire.d.ts.map +1 -0
  80. package/dist/composites/Questionnaire.js +422 -0
  81. package/dist/composites/Questionnaire.js.map +1 -0
  82. package/dist/composites/SidebarIdentity.d.ts +63 -0
  83. package/dist/composites/SidebarIdentity.d.ts.map +1 -0
  84. package/dist/composites/SidebarIdentity.js +103 -0
  85. package/dist/composites/SidebarIdentity.js.map +1 -0
  86. package/dist/composites/code-editor-search.d.ts +40 -0
  87. package/dist/composites/code-editor-search.d.ts.map +1 -0
  88. package/dist/composites/code-editor-search.js +212 -0
  89. package/dist/composites/code-editor-search.js.map +1 -0
  90. package/dist/composites/sidebar.d.ts +129 -0
  91. package/dist/composites/sidebar.d.ts.map +1 -0
  92. package/dist/composites/sidebar.js +671 -0
  93. package/dist/composites/sidebar.js.map +1 -0
  94. package/dist/composites/theme-notice.d.ts +54 -0
  95. package/dist/composites/theme-notice.d.ts.map +1 -0
  96. package/dist/composites/theme-notice.js +19 -0
  97. package/dist/composites/theme-notice.js.map +1 -0
  98. package/dist/editor.d.ts +3 -0
  99. package/dist/editor.d.ts.map +1 -0
  100. package/dist/editor.js +6 -0
  101. package/dist/editor.js.map +1 -0
  102. package/dist/guard-corpus.d.ts +63 -0
  103. package/dist/guard-corpus.d.ts.map +1 -0
  104. package/dist/index.d.ts +112 -0
  105. package/dist/index.d.ts.map +1 -0
  106. package/dist/index.js +696 -0
  107. package/dist/index.js.map +1 -0
  108. package/dist/layouts/section.d.ts +166 -0
  109. package/dist/layouts/section.d.ts.map +1 -0
  110. package/dist/layouts/section.js +153 -0
  111. package/dist/layouts/section.js.map +1 -0
  112. package/dist/layouts/shell.d.ts +128 -0
  113. package/dist/layouts/shell.d.ts.map +1 -0
  114. package/dist/layouts/shell.js +107 -0
  115. package/dist/layouts/shell.js.map +1 -0
  116. package/dist/lib/cn.d.ts +4 -0
  117. package/dist/lib/cn.d.ts.map +1 -0
  118. package/dist/lib/cn.js +9 -0
  119. package/dist/lib/cn.js.map +1 -0
  120. package/dist/lib/is-active-path.d.ts +13 -0
  121. package/dist/lib/is-active-path.d.ts.map +1 -0
  122. package/dist/lib/is-active-path.js +7 -0
  123. package/dist/lib/is-active-path.js.map +1 -0
  124. package/dist/lib/theme-tick.d.ts +37 -0
  125. package/dist/lib/theme-tick.d.ts.map +1 -0
  126. package/dist/lib/theme-tick.js +30 -0
  127. package/dist/lib/theme-tick.js.map +1 -0
  128. package/dist/lib/token-color.d.ts +74 -0
  129. package/dist/lib/token-color.d.ts.map +1 -0
  130. package/dist/lib/token-color.js +35 -0
  131. package/dist/lib/token-color.js.map +1 -0
  132. package/dist/lib/use-is-mobile.d.ts +2 -0
  133. package/dist/lib/use-is-mobile.d.ts.map +1 -0
  134. package/dist/lib/use-is-mobile.js +17 -0
  135. package/dist/lib/use-is-mobile.js.map +1 -0
  136. package/dist/shark-parity.divergences.d.ts +104 -0
  137. package/dist/shark-parity.divergences.d.ts.map +1 -0
  138. package/dist/simples/FacetFilter.d.ts +57 -0
  139. package/dist/simples/FacetFilter.d.ts.map +1 -0
  140. package/dist/simples/FacetFilter.js +167 -0
  141. package/dist/simples/FacetFilter.js.map +1 -0
  142. package/dist/simples/FieldArray.d.ts +42 -0
  143. package/dist/simples/FieldArray.d.ts.map +1 -0
  144. package/dist/simples/FieldArray.js +76 -0
  145. package/dist/simples/FieldArray.js.map +1 -0
  146. package/dist/simples/Link.d.ts +38 -0
  147. package/dist/simples/Link.d.ts.map +1 -0
  148. package/dist/simples/Link.js +24 -0
  149. package/dist/simples/Link.js.map +1 -0
  150. package/dist/simples/accordion.d.ts +8 -0
  151. package/dist/simples/accordion.d.ts.map +1 -0
  152. package/dist/simples/accordion.js +78 -0
  153. package/dist/simples/accordion.js.map +1 -0
  154. package/dist/simples/action-bar.d.ts +101 -0
  155. package/dist/simples/action-bar.d.ts.map +1 -0
  156. package/dist/simples/action-bar.js +195 -0
  157. package/dist/simples/action-bar.js.map +1 -0
  158. package/dist/simples/alert-dialog.d.ts +24 -0
  159. package/dist/simples/alert-dialog.d.ts.map +1 -0
  160. package/dist/simples/alert-dialog.js +43 -0
  161. package/dist/simples/alert-dialog.js.map +1 -0
  162. package/dist/simples/alert.d.ts +36 -0
  163. package/dist/simples/alert.d.ts.map +1 -0
  164. package/dist/simples/alert.js +123 -0
  165. package/dist/simples/alert.js.map +1 -0
  166. package/dist/simples/avatar.d.ts +37 -0
  167. package/dist/simples/avatar.d.ts.map +1 -0
  168. package/dist/simples/avatar.js +133 -0
  169. package/dist/simples/avatar.js.map +1 -0
  170. package/dist/simples/badge.d.ts +66 -0
  171. package/dist/simples/badge.d.ts.map +1 -0
  172. package/dist/simples/badge.js +138 -0
  173. package/dist/simples/badge.js.map +1 -0
  174. package/dist/simples/breadcrumb.d.ts +19 -0
  175. package/dist/simples/breadcrumb.d.ts.map +1 -0
  176. package/dist/simples/breadcrumb.js +107 -0
  177. package/dist/simples/breadcrumb.js.map +1 -0
  178. package/dist/simples/button-group.d.ts +19 -0
  179. package/dist/simples/button-group.d.ts.map +1 -0
  180. package/dist/simples/button-group.js +69 -0
  181. package/dist/simples/button-group.js.map +1 -0
  182. package/dist/simples/button.d.ts +148 -0
  183. package/dist/simples/button.d.ts.map +1 -0
  184. package/dist/simples/button.js +157 -0
  185. package/dist/simples/button.js.map +1 -0
  186. package/dist/simples/calendar.d.ts +45 -0
  187. package/dist/simples/calendar.d.ts.map +1 -0
  188. package/dist/simples/calendar.js +342 -0
  189. package/dist/simples/calendar.js.map +1 -0
  190. package/dist/simples/card.d.ts +43 -0
  191. package/dist/simples/card.d.ts.map +1 -0
  192. package/dist/simples/card.js +151 -0
  193. package/dist/simples/card.js.map +1 -0
  194. package/dist/simples/checkbox.d.ts +25 -0
  195. package/dist/simples/checkbox.d.ts.map +1 -0
  196. package/dist/simples/checkbox.js +103 -0
  197. package/dist/simples/checkbox.js.map +1 -0
  198. package/dist/simples/client-only.d.ts +3 -0
  199. package/dist/simples/client-only.d.ts.map +1 -0
  200. package/dist/simples/client-only.js +7 -0
  201. package/dist/simples/client-only.js.map +1 -0
  202. package/dist/simples/clipboard.d.ts +11 -0
  203. package/dist/simples/clipboard.d.ts.map +1 -0
  204. package/dist/simples/clipboard.js +99 -0
  205. package/dist/simples/clipboard.js.map +1 -0
  206. package/dist/simples/collapsible.d.ts +8 -0
  207. package/dist/simples/collapsible.d.ts.map +1 -0
  208. package/dist/simples/collapsible.js +79 -0
  209. package/dist/simples/collapsible.js.map +1 -0
  210. package/dist/simples/color-picker.d.ts +62 -0
  211. package/dist/simples/color-picker.d.ts.map +1 -0
  212. package/dist/simples/color-picker.js +391 -0
  213. package/dist/simples/color-picker.js.map +1 -0
  214. package/dist/simples/combobox.d.ts +66 -0
  215. package/dist/simples/combobox.d.ts.map +1 -0
  216. package/dist/simples/combobox.js +230 -0
  217. package/dist/simples/combobox.js.map +1 -0
  218. package/dist/simples/command.d.ts +45 -0
  219. package/dist/simples/command.d.ts.map +1 -0
  220. package/dist/simples/command.js +180 -0
  221. package/dist/simples/command.js.map +1 -0
  222. package/dist/simples/data-list.d.ts +25 -0
  223. package/dist/simples/data-list.d.ts.map +1 -0
  224. package/dist/simples/data-list.js +62 -0
  225. package/dist/simples/data-list.js.map +1 -0
  226. package/dist/simples/date-picker.d.ts +16 -0
  227. package/dist/simples/date-picker.d.ts.map +1 -0
  228. package/dist/simples/date-picker.js +117 -0
  229. package/dist/simples/date-picker.js.map +1 -0
  230. package/dist/simples/diagnostic.d.ts +138 -0
  231. package/dist/simples/diagnostic.d.ts.map +1 -0
  232. package/dist/simples/diagnostic.js +288 -0
  233. package/dist/simples/diagnostic.js.map +1 -0
  234. package/dist/simples/dialog.d.ts +100 -0
  235. package/dist/simples/dialog.d.ts.map +1 -0
  236. package/dist/simples/dialog.js +267 -0
  237. package/dist/simples/dialog.js.map +1 -0
  238. package/dist/simples/download-trigger.d.ts +3 -0
  239. package/dist/simples/download-trigger.d.ts.map +1 -0
  240. package/dist/simples/download-trigger.js +7 -0
  241. package/dist/simples/download-trigger.js.map +1 -0
  242. package/dist/simples/editable.d.ts +23 -0
  243. package/dist/simples/editable.d.ts.map +1 -0
  244. package/dist/simples/editable.js +70 -0
  245. package/dist/simples/editable.js.map +1 -0
  246. package/dist/simples/field.d.ts +58 -0
  247. package/dist/simples/field.d.ts.map +1 -0
  248. package/dist/simples/field.js +285 -0
  249. package/dist/simples/field.js.map +1 -0
  250. package/dist/simples/file-upload.d.ts +19 -0
  251. package/dist/simples/file-upload.d.ts.map +1 -0
  252. package/dist/simples/file-upload.js +192 -0
  253. package/dist/simples/file-upload.js.map +1 -0
  254. package/dist/simples/float.d.ts +45 -0
  255. package/dist/simples/float.d.ts.map +1 -0
  256. package/dist/simples/float.js +40 -0
  257. package/dist/simples/float.js.map +1 -0
  258. package/dist/simples/floating-panel.d.ts +25 -0
  259. package/dist/simples/floating-panel.d.ts.map +1 -0
  260. package/dist/simples/floating-panel.js +95 -0
  261. package/dist/simples/floating-panel.js.map +1 -0
  262. package/dist/simples/highlight.d.ts +6 -0
  263. package/dist/simples/highlight.d.ts.map +1 -0
  264. package/dist/simples/highlight.js +24 -0
  265. package/dist/simples/highlight.js.map +1 -0
  266. package/dist/simples/hover-card.d.ts +11 -0
  267. package/dist/simples/hover-card.d.ts.map +1 -0
  268. package/dist/simples/hover-card.js +83 -0
  269. package/dist/simples/hover-card.js.map +1 -0
  270. package/dist/simples/image-cropper.d.ts +17 -0
  271. package/dist/simples/image-cropper.d.ts.map +1 -0
  272. package/dist/simples/image-cropper.js +139 -0
  273. package/dist/simples/image-cropper.js.map +1 -0
  274. package/dist/simples/input-group.d.ts +116 -0
  275. package/dist/simples/input-group.d.ts.map +1 -0
  276. package/dist/simples/input-group.js +245 -0
  277. package/dist/simples/input-group.js.map +1 -0
  278. package/dist/simples/input.d.ts +26 -0
  279. package/dist/simples/input.d.ts.map +1 -0
  280. package/dist/simples/input.js +60 -0
  281. package/dist/simples/input.js.map +1 -0
  282. package/dist/simples/item.d.ts +72 -0
  283. package/dist/simples/item.d.ts.map +1 -0
  284. package/dist/simples/item.js +180 -0
  285. package/dist/simples/item.js.map +1 -0
  286. package/dist/simples/json-tree-view.d.ts +7 -0
  287. package/dist/simples/json-tree-view.d.ts.map +1 -0
  288. package/dist/simples/json-tree-view.js +71 -0
  289. package/dist/simples/json-tree-view.js.map +1 -0
  290. package/dist/simples/kbd.d.ts +25 -0
  291. package/dist/simples/kbd.d.ts.map +1 -0
  292. package/dist/simples/kbd.js +50 -0
  293. package/dist/simples/kbd.js.map +1 -0
  294. package/dist/simples/listbox.d.ts +46 -0
  295. package/dist/simples/listbox.d.ts.map +1 -0
  296. package/dist/simples/listbox.js +218 -0
  297. package/dist/simples/listbox.js.map +1 -0
  298. package/dist/simples/menu.d.ts +60 -0
  299. package/dist/simples/menu.d.ts.map +1 -0
  300. package/dist/simples/menu.js +294 -0
  301. package/dist/simples/menu.js.map +1 -0
  302. package/dist/simples/native-select.d.ts +36 -0
  303. package/dist/simples/native-select.d.ts.map +1 -0
  304. package/dist/simples/native-select.js +77 -0
  305. package/dist/simples/native-select.js.map +1 -0
  306. package/dist/simples/number-input.d.ts +35 -0
  307. package/dist/simples/number-input.d.ts.map +1 -0
  308. package/dist/simples/number-input.js +142 -0
  309. package/dist/simples/number-input.js.map +1 -0
  310. package/dist/simples/pagination.d.ts +11 -0
  311. package/dist/simples/pagination.d.ts.map +1 -0
  312. package/dist/simples/pagination.js +78 -0
  313. package/dist/simples/pagination.js.map +1 -0
  314. package/dist/simples/password-input.d.ts +23 -0
  315. package/dist/simples/password-input.d.ts.map +1 -0
  316. package/dist/simples/password-input.js +90 -0
  317. package/dist/simples/password-input.js.map +1 -0
  318. package/dist/simples/pin-input.d.ts +30 -0
  319. package/dist/simples/pin-input.d.ts.map +1 -0
  320. package/dist/simples/pin-input.js +71 -0
  321. package/dist/simples/pin-input.js.map +1 -0
  322. package/dist/simples/popover.d.ts +42 -0
  323. package/dist/simples/popover.d.ts.map +1 -0
  324. package/dist/simples/popover.js +188 -0
  325. package/dist/simples/popover.js.map +1 -0
  326. package/dist/simples/progress.d.ts +23 -0
  327. package/dist/simples/progress.d.ts.map +1 -0
  328. package/dist/simples/progress.js +82 -0
  329. package/dist/simples/progress.js.map +1 -0
  330. package/dist/simples/prose.d.ts +17 -0
  331. package/dist/simples/prose.d.ts.map +1 -0
  332. package/dist/simples/prose.js +18 -0
  333. package/dist/simples/prose.js.map +1 -0
  334. package/dist/simples/radio-group.d.ts +23 -0
  335. package/dist/simples/radio-group.d.ts.map +1 -0
  336. package/dist/simples/radio-group.js +149 -0
  337. package/dist/simples/radio-group.js.map +1 -0
  338. package/dist/simples/rating.d.ts +10 -0
  339. package/dist/simples/rating.d.ts.map +1 -0
  340. package/dist/simples/rating.js +81 -0
  341. package/dist/simples/rating.js.map +1 -0
  342. package/dist/simples/resizable.d.ts +16 -0
  343. package/dist/simples/resizable.d.ts.map +1 -0
  344. package/dist/simples/resizable.js +57 -0
  345. package/dist/simples/resizable.js.map +1 -0
  346. package/dist/simples/scroll-area.d.ts +23 -0
  347. package/dist/simples/scroll-area.d.ts.map +1 -0
  348. package/dist/simples/scroll-area.js +88 -0
  349. package/dist/simples/scroll-area.js.map +1 -0
  350. package/dist/simples/segment-group.d.ts +27 -0
  351. package/dist/simples/segment-group.d.ts.map +1 -0
  352. package/dist/simples/segment-group.js +129 -0
  353. package/dist/simples/segment-group.js.map +1 -0
  354. package/dist/simples/select.d.ts +34 -0
  355. package/dist/simples/select.d.ts.map +1 -0
  356. package/dist/simples/select.js +258 -0
  357. package/dist/simples/select.js.map +1 -0
  358. package/dist/simples/separator.d.ts +12 -0
  359. package/dist/simples/separator.d.ts.map +1 -0
  360. package/dist/simples/separator.js +27 -0
  361. package/dist/simples/separator.js.map +1 -0
  362. package/dist/simples/sheet.d.ts +94 -0
  363. package/dist/simples/sheet.d.ts.map +1 -0
  364. package/dist/simples/sheet.js +172 -0
  365. package/dist/simples/sheet.js.map +1 -0
  366. package/dist/simples/show.d.ts +10 -0
  367. package/dist/simples/show.d.ts.map +1 -0
  368. package/dist/simples/show.js +9 -0
  369. package/dist/simples/show.js.map +1 -0
  370. package/dist/simples/skeleton.d.ts +3 -0
  371. package/dist/simples/skeleton.d.ts.map +1 -0
  372. package/dist/simples/skeleton.js +23 -0
  373. package/dist/simples/skeleton.js.map +1 -0
  374. package/dist/simples/skip-nav.d.ts +54 -0
  375. package/dist/simples/skip-nav.d.ts.map +1 -0
  376. package/dist/simples/skip-nav.js +42 -0
  377. package/dist/simples/skip-nav.js.map +1 -0
  378. package/dist/simples/slider.d.ts +29 -0
  379. package/dist/simples/slider.d.ts.map +1 -0
  380. package/dist/simples/slider.js +189 -0
  381. package/dist/simples/slider.js.map +1 -0
  382. package/dist/simples/spinner.d.ts +2 -0
  383. package/dist/simples/spinner.d.ts.map +1 -0
  384. package/dist/simples/spinner.js +20 -0
  385. package/dist/simples/spinner.js.map +1 -0
  386. package/dist/simples/stat-tile.d.ts +31 -0
  387. package/dist/simples/stat-tile.d.ts.map +1 -0
  388. package/dist/simples/stat-tile.js +64 -0
  389. package/dist/simples/stat-tile.js.map +1 -0
  390. package/dist/simples/status.d.ts +48 -0
  391. package/dist/simples/status.d.ts.map +1 -0
  392. package/dist/simples/status.js +57 -0
  393. package/dist/simples/status.js.map +1 -0
  394. package/dist/simples/steps.d.ts +20 -0
  395. package/dist/simples/steps.d.ts.map +1 -0
  396. package/dist/simples/steps.js +171 -0
  397. package/dist/simples/steps.js.map +1 -0
  398. package/dist/simples/suggestions.d.ts +43 -0
  399. package/dist/simples/suggestions.d.ts.map +1 -0
  400. package/dist/simples/suggestions.js +38 -0
  401. package/dist/simples/suggestions.js.map +1 -0
  402. package/dist/simples/swatch.d.ts +73 -0
  403. package/dist/simples/swatch.d.ts.map +1 -0
  404. package/dist/simples/swatch.js +35 -0
  405. package/dist/simples/swatch.js.map +1 -0
  406. package/dist/simples/switch.d.ts +5 -0
  407. package/dist/simples/switch.d.ts.map +1 -0
  408. package/dist/simples/switch.js +71 -0
  409. package/dist/simples/switch.js.map +1 -0
  410. package/dist/simples/table.d.ts +55 -0
  411. package/dist/simples/table.d.ts.map +1 -0
  412. package/dist/simples/table.js +166 -0
  413. package/dist/simples/table.js.map +1 -0
  414. package/dist/simples/tabs.d.ts +55 -0
  415. package/dist/simples/tabs.d.ts.map +1 -0
  416. package/dist/simples/tabs.js +133 -0
  417. package/dist/simples/tabs.js.map +1 -0
  418. package/dist/simples/tags-input.d.ts +64 -0
  419. package/dist/simples/tags-input.d.ts.map +1 -0
  420. package/dist/simples/tags-input.js +228 -0
  421. package/dist/simples/tags-input.js.map +1 -0
  422. package/dist/simples/textarea.d.ts +6 -0
  423. package/dist/simples/textarea.d.ts.map +1 -0
  424. package/dist/simples/textarea.js +34 -0
  425. package/dist/simples/textarea.js.map +1 -0
  426. package/dist/simples/toast.d.ts +20 -0
  427. package/dist/simples/toast.d.ts.map +1 -0
  428. package/dist/simples/toast.js +127 -0
  429. package/dist/simples/toast.js.map +1 -0
  430. package/dist/simples/toggle-group.d.ts +20 -0
  431. package/dist/simples/toggle-group.d.ts.map +1 -0
  432. package/dist/simples/toggle-group.js +82 -0
  433. package/dist/simples/toggle-group.js.map +1 -0
  434. package/dist/simples/toggle.d.ts +35 -0
  435. package/dist/simples/toggle.d.ts.map +1 -0
  436. package/dist/simples/toggle.js +57 -0
  437. package/dist/simples/toggle.js.map +1 -0
  438. package/dist/simples/tooltip.d.ts +8 -0
  439. package/dist/simples/tooltip.d.ts.map +1 -0
  440. package/dist/simples/tooltip.js +80 -0
  441. package/dist/simples/tooltip.js.map +1 -0
  442. package/dist/simples/tour.d.ts +81 -0
  443. package/dist/simples/tour.d.ts.map +1 -0
  444. package/dist/simples/tour.js +253 -0
  445. package/dist/simples/tour.js.map +1 -0
  446. package/dist/simples/tree-view.d.ts +64 -0
  447. package/dist/simples/tree-view.d.ts.map +1 -0
  448. package/dist/simples/tree-view.js +300 -0
  449. package/dist/simples/tree-view.js.map +1 -0
  450. package/dist/styles.css +2 -0
  451. package/dist/table/data-table-content.d.ts +18 -0
  452. package/dist/table/data-table-content.d.ts.map +1 -0
  453. package/dist/table/data-table-content.js +53 -0
  454. package/dist/table/data-table-content.js.map +1 -0
  455. package/dist/table/data-table-pagination.d.ts +8 -0
  456. package/dist/table/data-table-pagination.d.ts.map +1 -0
  457. package/dist/table/data-table-pagination.js +65 -0
  458. package/dist/table/data-table-pagination.js.map +1 -0
  459. package/dist/table/data-table-root.d.ts +10 -0
  460. package/dist/table/data-table-root.d.ts.map +1 -0
  461. package/dist/table/data-table-root.js +21 -0
  462. package/dist/table/data-table-root.js.map +1 -0
  463. package/dist/table/data-table-toolbar.d.ts +44 -0
  464. package/dist/table/data-table-toolbar.d.ts.map +1 -0
  465. package/dist/table/data-table-toolbar.js +87 -0
  466. package/dist/table/data-table-toolbar.js.map +1 -0
  467. package/dist/table/select-column.d.ts +16 -0
  468. package/dist/table/select-column.d.ts.map +1 -0
  469. package/dist/table/select-column.js +39 -0
  470. package/dist/table/select-column.js.map +1 -0
  471. package/dist/table/sortableHeader.d.ts +25 -0
  472. package/dist/table/sortableHeader.d.ts.map +1 -0
  473. package/dist/table/sortableHeader.js +43 -0
  474. package/dist/table/sortableHeader.js.map +1 -0
  475. package/dist/table/use-data-table.d.ts +40 -0
  476. package/dist/table/use-data-table.d.ts.map +1 -0
  477. package/dist/table/use-data-table.js +65 -0
  478. package/dist/table/use-data-table.js.map +1 -0
  479. package/dist/table.d.ts +15 -0
  480. package/dist/table.d.ts.map +1 -0
  481. package/dist/table.js +22 -0
  482. package/dist/table.js.map +1 -0
  483. package/dist/theme/KanzoTheme.d.ts +74 -0
  484. package/dist/theme/KanzoTheme.d.ts.map +1 -0
  485. package/dist/theme/KanzoTheme.js +61 -0
  486. package/dist/theme/KanzoTheme.js.map +1 -0
  487. package/dist/theme/KanzoThemeProvider.d.ts +144 -0
  488. package/dist/theme/KanzoThemeProvider.d.ts.map +1 -0
  489. package/dist/theme/KanzoThemeProvider.js +271 -0
  490. package/dist/theme/KanzoThemeProvider.js.map +1 -0
  491. package/dist/theme/theme-context.d.ts +146 -0
  492. package/dist/theme/theme-context.d.ts.map +1 -0
  493. package/dist/theme/theme-context.js +18 -0
  494. package/dist/theme/theme-context.js.map +1 -0
  495. package/dist/theme/theme-script.d.ts +17 -0
  496. package/dist/theme/theme-script.d.ts.map +1 -0
  497. package/dist/theme/theme-script.js +16 -0
  498. package/dist/theme/theme-script.js.map +1 -0
  499. package/package.json +201 -0
@@ -0,0 +1,117 @@
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { useDatePickerContext as m, DatePicker as n } from "@ark-ui/react/date-picker";
3
+ import { Portal as g } from "@ark-ui/react/portal";
4
+ import { CalendarIcon as k, ClockIcon as h } from "lucide-react";
5
+ import { cn as s } from "../lib/cn.js";
6
+ import { Button as f } from "./button.js";
7
+ import { Calendar as P, CalendarPresetTrigger as x } from "./calendar.js";
8
+ import { InputGroup as l, InputGroupInput as d, InputGroupAddon as p, InputGroupButton as C } from "./input-group.js";
9
+ const y = m, G = (t) => {
10
+ const { positioning: r = { placement: "top" }, slot: o, ...a } = t;
11
+ return /* @__PURE__ */ e(
12
+ P,
13
+ {
14
+ inline: !1,
15
+ positioning: r,
16
+ ...a,
17
+ slot: o ?? "date-picker"
18
+ }
19
+ );
20
+ }, j = (t) => {
21
+ const { className: r, children: o, slot: a, ...i } = t;
22
+ return /* @__PURE__ */ e(n.Control, { "data-slot": "date-picker-control", children: /* @__PURE__ */ e(
23
+ n.Trigger,
24
+ {
25
+ className: s(
26
+ "justify-start",
27
+ "text-start data-placeholder-shown:[&>span]:text-muted-foreground",
28
+ "active:scale-100",
29
+ "[&_svg:not([class*='text-'])]:opacity-64",
30
+ r
31
+ ),
32
+ ...i,
33
+ "data-slot": a ?? "date-picker-trigger",
34
+ children: o
35
+ }
36
+ ) });
37
+ }, V = (t) => {
38
+ const { size: r, className: o, slot: a, ...i } = t;
39
+ return /* @__PURE__ */ e(n.Control, { "data-slot": "date-picker-control", children: /* @__PURE__ */ c(l, { size: r, children: [
40
+ /* @__PURE__ */ e(n.Input, { asChild: !0, ...i, children: /* @__PURE__ */ e(d, { slot: a ?? "date-picker-input" }) }),
41
+ /* @__PURE__ */ e(p, { align: "inline-end", children: /* @__PURE__ */ e(C, { asChild: !0, size: "icon-sm", variant: "ghost", children: /* @__PURE__ */ e(n.Trigger, { asChild: !0, children: /* @__PURE__ */ e(f, { slot: "date-picker-trigger", variant: "ghost", children: /* @__PURE__ */ e(k, { "aria-hidden": !0, className: "text-muted-foreground" }) }) }) }) })
42
+ ] }) });
43
+ }, B = (t) => {
44
+ const { id: r, value: o, defaultValue: a, className: i, ...u } = t;
45
+ return /* @__PURE__ */ c(l, { ...u, children: [
46
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(h, {}) }),
47
+ /* @__PURE__ */ e(
48
+ d,
49
+ {
50
+ className: s(
51
+ "[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none",
52
+ i
53
+ ),
54
+ defaultValue: a,
55
+ id: r,
56
+ step: "1",
57
+ type: "time",
58
+ value: o
59
+ }
60
+ )
61
+ ] });
62
+ }, A = (t) => {
63
+ const { className: r, slot: o, ...a } = t;
64
+ return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(n.Positioner, { "data-slot": "date-picker-positioner", children: /* @__PURE__ */ e(
65
+ n.Content,
66
+ {
67
+ className: s(
68
+ "[--cell-size:--spacing(8)]",
69
+ "z-[calc(50+var(--layer-index,0))]",
70
+ "w-fit min-w-72",
71
+ "p-3",
72
+ "bg-popover",
73
+ "text-popover-foreground",
74
+ "rounded-box border shadow-lg/5",
75
+ "outline-none",
76
+ "origin-(--transform-origin)",
77
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
78
+ "data-[state=closed]:animate-out data-[state=open]:animate-in",
79
+ "data-[state=closed]:zoom-out-[98%] data-[state=open]:zoom-in-[98%]",
80
+ "motion-reduce:animate-none!",
81
+ r
82
+ ),
83
+ ...a,
84
+ "data-slot": o ?? "date-picker-content"
85
+ }
86
+ ) }) });
87
+ }, _ = (t) => {
88
+ const { className: r, slot: o, ...a } = t;
89
+ return /* @__PURE__ */ e(
90
+ n.ValueText,
91
+ {
92
+ className: s("font-medium text-sm", r),
93
+ ...a,
94
+ "data-slot": o ?? "date-picker-value"
95
+ }
96
+ );
97
+ }, $ = ({
98
+ slot: t,
99
+ ...r
100
+ }) => /* @__PURE__ */ e(
101
+ x,
102
+ {
103
+ ...r,
104
+ slot: t ?? "date-picker-preset-trigger"
105
+ }
106
+ );
107
+ export {
108
+ G as DatePicker,
109
+ A as DatePickerContent,
110
+ V as DatePickerInput,
111
+ $ as DatePickerPresetTrigger,
112
+ B as DatePickerTimer,
113
+ j as DatePickerTrigger,
114
+ _ as DatePickerValue,
115
+ y as useDatePicker
116
+ };
117
+ //# sourceMappingURL=date-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker.js","sources":["../../src/simples/date-picker.tsx"],"sourcesContent":["import {\n DatePicker as ArkDatePicker,\n useDatePickerContext,\n} from \"@ark-ui/react/date-picker\";\nimport { Portal } from \"@ark-ui/react/portal\";\nimport { CalendarIcon, ClockIcon } from \"lucide-react\";\nimport type React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"./button\";\nimport {\n Calendar,\n CalendarPresetTrigger,\n} from \"./calendar\";\nimport type { Input, InputProps } from \"./input\";\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"./input-group\";\n\nexport const useDatePicker = useDatePickerContext;\n\nexport const DatePicker = (props: React.ComponentProps<typeof Calendar>) => {\n const { positioning = { placement: \"top\" }, slot, ...rest } = props;\n\n return (\n <Calendar\n inline={false}\n positioning={positioning}\n {...rest}\n slot={slot ?? \"date-picker\"}\n />\n );\n};\n\nexport const DatePickerTrigger = (\n props: React.ComponentProps<typeof ArkDatePicker.Trigger>\n) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <ArkDatePicker.Control data-slot=\"date-picker-control\">\n <ArkDatePicker.Trigger\n className={cn(\n \"justify-start\",\n \"text-start data-placeholder-shown:[&>span]:text-muted-foreground\",\n \"active:scale-100\",\n \"[&_svg:not([class*='text-'])]:opacity-64\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"date-picker-trigger\"}\n >\n {children}\n </ArkDatePicker.Trigger>\n </ArkDatePicker.Control>\n );\n};\n\ninterface DatePickerInputProps\n extends Omit<React.ComponentProps<typeof ArkDatePicker.Input>, \"size\">,\n InputProps {}\n\nexport const DatePickerInput = (props: DatePickerInputProps) => {\n const { size, className, slot, ...rest } = props;\n\n return (\n <ArkDatePicker.Control data-slot=\"date-picker-control\">\n <InputGroup size={size}>\n <ArkDatePicker.Input asChild {...rest}>\n <InputGroupInput slot={slot ?? \"date-picker-input\"} />\n </ArkDatePicker.Input>\n\n <InputGroupAddon align=\"inline-end\">\n {/* One size for the chain, and it used to declare two: the outer `InputGroupButton` asked\n for `icon-sm` and the inner `Button` — which exists only because Ark's Trigger needs a\n child to hand its props to — overrode it with `icon-md`. The outer one is the size a\n control inside a group has, so the inner declares none. */}\n <InputGroupButton asChild size=\"icon-sm\" variant=\"ghost\">\n <ArkDatePicker.Trigger asChild>\n <Button slot=\"date-picker-trigger\" variant=\"ghost\">\n <CalendarIcon aria-hidden className=\"text-muted-foreground\" />\n </Button>\n </ArkDatePicker.Trigger>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n </ArkDatePicker.Control>\n );\n};\n\nexport const DatePickerTimer = (props: React.ComponentProps<typeof Input>) => {\n const { id, value, defaultValue, className, ...rest } = props;\n\n return (\n <InputGroup {...rest}>\n <InputGroupAddon>\n <ClockIcon />\n </InputGroupAddon>\n <InputGroupInput\n className={cn(\n \"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none\",\n className\n )}\n defaultValue={defaultValue}\n id={id}\n step=\"1\"\n type=\"time\"\n value={value}\n />\n </InputGroup>\n );\n};\n\nexport const DatePickerContent = (\n props: React.ComponentProps<typeof ArkDatePicker.Content>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <Portal>\n <ArkDatePicker.Positioner data-slot=\"date-picker-positioner\">\n <ArkDatePicker.Content\n className={cn(\n \"[--cell-size:--spacing(8)]\",\n \"z-[calc(50+var(--layer-index,0))]\",\n \"w-fit min-w-72\",\n \"p-3\",\n \"bg-popover\",\n \"text-popover-foreground\",\n \"rounded-box border shadow-lg/5\",\n \"outline-none\",\n \"origin-(--transform-origin)\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:animate-out data-[state=open]:animate-in\",\n \"data-[state=closed]:zoom-out-[98%] data-[state=open]:zoom-in-[98%]\",\n \"motion-reduce:animate-none!\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"date-picker-content\"}\n />\n </ArkDatePicker.Positioner>\n </Portal>\n );\n};\n\nexport const DatePickerValue = (\n props: React.ComponentProps<typeof ArkDatePicker.ValueText>\n) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ArkDatePicker.ValueText\n className={cn(\"font-medium text-sm\", className)}\n {...rest}\n data-slot={slot ?? \"date-picker-value\"}\n />\n );\n};\n\nexport const DatePickerPresetTrigger = ({\n slot,\n ...rest\n}: React.ComponentProps<typeof ArkDatePicker.PresetTrigger>) => (\n <CalendarPresetTrigger\n {...rest}\n slot={slot ?? \"date-picker-preset-trigger\"}\n />\n);\n"],"names":["useDatePicker","useDatePickerContext","DatePicker","props","positioning","slot","rest","jsx","Calendar","DatePickerTrigger","className","children","ArkDatePicker","cn","DatePickerInput","size","jsxs","InputGroup","InputGroupInput","InputGroupAddon","InputGroupButton","Button","CalendarIcon","DatePickerTimer","id","value","defaultValue","ClockIcon","DatePickerContent","Portal","DatePickerValue","DateP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GAAW,MAAAL,GAAM,GAAGC,MAASH;AAErC,SACE,gBAAAI;AAAA,IAACK,EAAc;AAAA,IAAd;AAAA,MACC,WAAWC,EAAG,uBAAuBH,CAAS;AAAA,MAC7C,GAAGJ;AAAA,MACJ,aAAWD,KAAQ;AAAA,IAAA;AAAA,EAAA;AAGzB,GAEa0B,IAA0B,CAAC;AAAA,EACtC,MAAA1B;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACyB;AAAA,EAAA;AAAA,IACE,GAAG1B;AAAA,IACJ,MAAMD,KAAQ;AAAA,EAAA;AAChB;"}
@@ -0,0 +1,138 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import { default as React } from 'react';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ import { Badge } from './badge';
5
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './collapsible';
6
+ export declare const DiagnosticList: (props: React.ComponentProps<typeof ark.ul>) => React.JSX.Element;
7
+ declare const diagnosticVariants: import('tailwind-variants').TVReturnType<{
8
+ /**
9
+ * **The reference's surface, not a coloured rail.**
10
+ *
11
+ * This used to be `border-s-2` in the family's colour over a neutral `bg-foreground/14` — a card with
12
+ * a bar down one edge, which is a shape that appears nowhere in Shark UI and nowhere else in
13
+ * this library. It is the generic callout, and it is what made a diagnostic read as machine
14
+ * furniture rather than as one of these components.
15
+ *
16
+ * `Alert` is the surface a message with a severity has here, and these are its exact steps:
17
+ * the wash at `-a3`, the whole outline at `-a6`, the glyph at the family. It stacks — the
18
+ * reference stacks alerts, and the argument that six of them would read as decoration was made
19
+ * about the rail, not about this.
20
+ */
21
+ variant: {
22
+ destructive: string[];
23
+ warning: string[];
24
+ info: string[];
25
+ };
26
+ }, undefined, string[], {
27
+ /**
28
+ * **The reference's surface, not a coloured rail.**
29
+ *
30
+ * This used to be `border-s-2` in the family's colour over a neutral `bg-foreground/14` — a card with
31
+ * a bar down one edge, which is a shape that appears nowhere in Shark UI and nowhere else in
32
+ * this library. It is the generic callout, and it is what made a diagnostic read as machine
33
+ * furniture rather than as one of these components.
34
+ *
35
+ * `Alert` is the surface a message with a severity has here, and these are its exact steps:
36
+ * the wash at `-a3`, the whole outline at `-a6`, the glyph at the family. It stacks — the
37
+ * reference stacks alerts, and the argument that six of them would read as decoration was made
38
+ * about the rail, not about this.
39
+ */
40
+ variant: {
41
+ destructive: string[];
42
+ warning: string[];
43
+ info: string[];
44
+ };
45
+ }, undefined, import('tailwind-variants').TVReturnType<{
46
+ /**
47
+ * **The reference's surface, not a coloured rail.**
48
+ *
49
+ * This used to be `border-s-2` in the family's colour over a neutral `bg-foreground/14` — a card with
50
+ * a bar down one edge, which is a shape that appears nowhere in Shark UI and nowhere else in
51
+ * this library. It is the generic callout, and it is what made a diagnostic read as machine
52
+ * furniture rather than as one of these components.
53
+ *
54
+ * `Alert` is the surface a message with a severity has here, and these are its exact steps:
55
+ * the wash at `-a3`, the whole outline at `-a6`, the glyph at the family. It stacks — the
56
+ * reference stacks alerts, and the argument that six of them would read as decoration was made
57
+ * about the rail, not about this.
58
+ */
59
+ variant: {
60
+ destructive: string[];
61
+ warning: string[];
62
+ info: string[];
63
+ };
64
+ }, undefined, string[], unknown, unknown, undefined>>;
65
+ export interface DiagnosticProps extends Omit<React.ComponentProps<typeof Collapsible>, "asChild">, VariantProps<typeof diagnosticVariants> {
66
+ }
67
+ /**
68
+ * One diagnostic, collapsed to its header until it is opened. Open state, animation and the
69
+ * trigger/content ARIA come from Ark's Collapsible, so `defaultOpen`, `open` and `onOpenChange`
70
+ * pass through unchanged — the machine's root is handed to the `<li>` through `asChild`, which is
71
+ * how a diagnostic is a real item of `DiagnosticList`'s `<ul>` and a collapsible at the same time.
72
+ *
73
+ * `variant` is written once, here. Repeating it as a prop on the badge is how the two drift.
74
+ */
75
+ export declare const Diagnostic: (props: DiagnosticProps) => React.JSX.Element;
76
+ /**
77
+ * One line **until the caller says otherwise**, and it was `flex-nowrap` — which is not the same
78
+ * thing and cost the message.
79
+ *
80
+ * The argument for nowrap was real: a header that wraps turns a list of six into six different
81
+ * shapes, and the message that overflows is the one `DiagnosticDescription` repeats in full once the
82
+ * row is open. What it did not survive is a narrow column. Measured on the `metadata-form` showcase,
83
+ * whose findings panel is 24 % of the workspace: **a 143 px header, with the title 0 px wide and
84
+ * starting at x=215** — 72 px past its own right edge. The severity, the source and the trigger are
85
+ * all `shrink-0`, so they take the width and `DiagnosticTitle`'s `flex-1` shrinks to nothing. Not
86
+ * truncated with an ellipsis: gone, and the row said only *This field is required.* three times over
87
+ * with nothing to tell the three apart.
88
+ *
89
+ * `flex-wrap` changes nothing for a header that fits, and nothing for a wide list either: the title
90
+ * is `basis-0`, so it never forces a break on its own. What it does is make `basis-full` on the
91
+ * title mean what a reader would expect — *this goes on its own line* — which is what the showcase
92
+ * had already written, with a comment claiming this component wrapped. It did not. Now it does, and
93
+ * an item that cannot fit wraps instead of overflowing the box.
94
+ */
95
+ export declare const DiagnosticHeader: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
96
+ /**
97
+ * The severity, as an icon and whatever word the call site gives it. The icon comes from the root
98
+ * and is not the caller's to pass; the text is.
99
+ *
100
+ * **It is a `Badge`**, and it used to be a `Badge` respelled: `h-5 min-w-5 px-1.5 rounded-md
101
+ * font-medium text-xs` beside three `group-data-[severity=…]` lines that repainted, by hand, the
102
+ * three soft variants `Badge` already ships. `Tool`'s state chip has always used the real one.
103
+ * Nothing is lost by the swap — the size is `Badge`'s `sm`, the fills are the same tokens — and the
104
+ * three selector lines go with it.
105
+ */
106
+ export declare const DiagnosticSeverity: (props: React.ComponentProps<typeof Badge>) => React.JSX.Element;
107
+ export declare const DiagnosticTitle: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
108
+ export declare const DiagnosticSource: (props: React.ComponentProps<typeof ark.span>) => React.JSX.Element;
109
+ export declare const DiagnosticActions: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
110
+ export declare const DiagnosticTrigger: (props: React.ComponentProps<typeof CollapsibleTrigger>) => React.JSX.Element;
111
+ export declare const DiagnosticContent: (props: React.ComponentProps<typeof CollapsibleContent>) => React.JSX.Element;
112
+ export declare const DiagnosticDescription: (props: React.ComponentProps<typeof ark.p>) => React.JSX.Element;
113
+ export declare const DiagnosticFrames: (props: React.ComponentProps<typeof ark.div>) => React.JSX.Element;
114
+ export interface DiagnosticFrameProps extends Omit<React.ComponentProps<typeof ark.button>, "onSelect" | "children"> {
115
+ /** The file, graph or node the position is in. */
116
+ path: string;
117
+ line?: number;
118
+ column?: number;
119
+ /** A short note beside the position — the property path, the frame's function. */
120
+ label?: string;
121
+ /**
122
+ * An inferred or upstream position rather than one the author wrote — the counterpart of a
123
+ * `node_modules` frame. Dimmed, never hidden: it is usually the frame that explains the others.
124
+ */
125
+ secondary?: boolean;
126
+ onSelect?: () => void;
127
+ }
128
+ /**
129
+ * One position, read as a location rather than a string: the directory recedes, the file carries
130
+ * the weight, and the line and column are tabular so a column of frames lines up.
131
+ *
132
+ * With `onSelect` it is a real `<button>` wearing the arrow that says it goes somewhere; without
133
+ * one it is static text, because a control that does nothing is announced as a control and answers
134
+ * to nothing.
135
+ */
136
+ export declare const DiagnosticFrame: (props: DiagnosticFrameProps) => React.JSX.Element;
137
+ export {};
138
+ //# sourceMappingURL=diagnostic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic.d.ts","sourceRoot":"","sources":["../../src/simples/diagnostic.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACL,WAAW,EACX,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAmCvB,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,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,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,sBAU9E,CAAC;AAKF,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,sBAY3E,CAAC;AAqCF,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9E,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,sBAwE1D,CAAC"}
@@ -0,0 +1,288 @@
1
+ "use client";
2
+ import { jsx as a, jsxs as d, Fragment as C } from "react/jsx-runtime";
3
+ import { ark as o } from "@ark-ui/react/factory";
4
+ import { ArrowUpRightIcon as D, InfoIcon as k, TriangleAlertIcon as I, CircleAlertIcon as _ } from "lucide-react";
5
+ import v from "react";
6
+ import { tv as b } from "tailwind-variants";
7
+ import { cn as i } from "../lib/cn.js";
8
+ import { Badge as $ } from "./badge.js";
9
+ import { Collapsible as A, CollapsibleContent as V, CollapsibleTrigger as z, CollapsibleIndicator as T } from "./collapsible.js";
10
+ const F = {
11
+ destructive: _,
12
+ warning: I,
13
+ info: k
14
+ }, N = v.createContext("destructive"), E = (n) => {
15
+ const { className: t, slot: e, ...s } = n;
16
+ return /* @__PURE__ */ a(
17
+ o.ul,
18
+ {
19
+ className: i("flex w-full list-none flex-col gap-1.5", t),
20
+ role: "list",
21
+ ...s,
22
+ "data-slot": e ?? "diagnostic-list"
23
+ }
24
+ );
25
+ }, j = b({
26
+ base: [
27
+ "group/diagnostic",
28
+ "w-full",
29
+ "rounded-xl border",
30
+ "text-card-foreground text-sm"
31
+ ],
32
+ variants: {
33
+ /**
34
+ * **The reference's surface, not a coloured rail.**
35
+ *
36
+ * This used to be `border-s-2` in the family's colour over a neutral `bg-foreground/14` — a card with
37
+ * a bar down one edge, which is a shape that appears nowhere in Shark UI and nowhere else in
38
+ * this library. It is the generic callout, and it is what made a diagnostic read as machine
39
+ * furniture rather than as one of these components.
40
+ *
41
+ * `Alert` is the surface a message with a severity has here, and these are its exact steps:
42
+ * the wash at `-a3`, the whole outline at `-a6`, the glyph at the family. It stacks — the
43
+ * reference stacks alerts, and the argument that six of them would read as decoration was made
44
+ * about the rail, not about this.
45
+ */
46
+ variant: {
47
+ destructive: ["bg-destructive/7", "border-destructive/30"],
48
+ warning: ["bg-warning/7", "border-warning/30"],
49
+ info: ["bg-info/7", "border-info/30"]
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ variant: "destructive"
54
+ }
55
+ }), G = (n) => {
56
+ const { variant: t = "destructive", className: e, children: s, slot: r, ...c } = n;
57
+ return /* @__PURE__ */ a(N.Provider, { value: t, children: /* @__PURE__ */ a(A, { ...c, asChild: !0, children: /* @__PURE__ */ a(
58
+ o.li,
59
+ {
60
+ className: i(j({ variant: t }), e),
61
+ "data-slot": r ?? "diagnostic",
62
+ "data-variant": t,
63
+ children: s
64
+ }
65
+ ) }) });
66
+ }, J = (n) => {
67
+ const { className: t, slot: e, ...s } = n;
68
+ return /* @__PURE__ */ a(
69
+ o.div,
70
+ {
71
+ className: i("flex w-full min-w-0 flex-wrap items-center gap-2 px-3 py-2", t),
72
+ ...s,
73
+ "data-slot": e ?? "diagnostic-header"
74
+ }
75
+ );
76
+ }, K = (n) => {
77
+ const { className: t, children: e, slot: s, ...r } = n, c = v.useContext(N), l = F[c];
78
+ return /* @__PURE__ */ d(
79
+ $,
80
+ {
81
+ className: i("shrink-0", t),
82
+ size: "sm",
83
+ variant: c,
84
+ ...r,
85
+ slot: s ?? "diagnostic-severity",
86
+ children: [
87
+ /* @__PURE__ */ a(l, { "aria-hidden": "true" }),
88
+ e
89
+ ]
90
+ }
91
+ );
92
+ }, M = (n) => {
93
+ const { className: t, slot: e, ...s } = n;
94
+ return /* @__PURE__ */ a(
95
+ o.div,
96
+ {
97
+ className: i(
98
+ "min-w-0 flex-1 truncate font-medium text-sm leading-snug",
99
+ // Opening a row is the one moment the whole message is worth more than the alignment.
100
+ "group-data-[state=open]/diagnostic:whitespace-normal",
101
+ t
102
+ ),
103
+ ...s,
104
+ "data-slot": e ?? "diagnostic-title"
105
+ }
106
+ );
107
+ }, Q = (n) => {
108
+ const { className: t, slot: e, ...s } = n;
109
+ return /* @__PURE__ */ a(
110
+ o.span,
111
+ {
112
+ className: i(
113
+ "shrink-0 whitespace-nowrap font-mono text-muted-foreground text-xs max-sm:hidden",
114
+ t
115
+ ),
116
+ ...s,
117
+ "data-slot": e ?? "diagnostic-source"
118
+ }
119
+ );
120
+ }, W = (n) => {
121
+ const { className: t, slot: e, ...s } = n;
122
+ return /* @__PURE__ */ a(
123
+ o.div,
124
+ {
125
+ className: i("flex shrink-0 items-center gap-1", t),
126
+ ...s,
127
+ "data-slot": e ?? "diagnostic-actions"
128
+ }
129
+ );
130
+ }, X = (n) => {
131
+ const { className: t, children: e, slot: s, ...r } = n;
132
+ return /* @__PURE__ */ d(
133
+ z,
134
+ {
135
+ className: i(
136
+ "inline-flex items-center justify-center gap-1",
137
+ // WCAG 2.5.8 asks 24×24 CSS pixels, and every `rem` here is measured against a root the
138
+ // density axis sets — 14px at compact, where `min-h-6` would be 21. `DiagnosticFrame`'s
139
+ // floor is the same number for the same reason.
140
+ "min-h-[24px] min-w-[24px] px-2",
141
+ "rounded-md font-medium text-muted-foreground text-xs tabular-nums",
142
+ "hover:bg-accent hover:text-accent-foreground",
143
+ "outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
144
+ "[&_svg:not([class*='size-'])]:size-3.5 [&_svg]:shrink-0",
145
+ t
146
+ ),
147
+ ...r,
148
+ slot: s ?? "diagnostic-trigger",
149
+ children: [
150
+ e,
151
+ /* @__PURE__ */ a(T, {})
152
+ ]
153
+ }
154
+ );
155
+ }, Y = (n) => {
156
+ const { className: t, slot: e, ...s } = n;
157
+ return /* @__PURE__ */ a(
158
+ V,
159
+ {
160
+ className: i("flex flex-col gap-2 border-t px-3 pt-2.5 pb-2.5", t),
161
+ ...s,
162
+ slot: e ?? "diagnostic-content"
163
+ }
164
+ );
165
+ }, Z = (n) => {
166
+ const { className: t, slot: e, ...s } = n;
167
+ return /* @__PURE__ */ a(
168
+ o.p,
169
+ {
170
+ className: i("text-muted-foreground text-sm leading-normal", t),
171
+ ...s,
172
+ "data-slot": e ?? "diagnostic-description"
173
+ }
174
+ );
175
+ }, tt = (n) => {
176
+ const { className: t, slot: e, ...s } = n;
177
+ return (
178
+ // Pulled out by the frame's own padding, so a frame's text lines up with the description above
179
+ // it and its hover fill is a full-width row rather than an inset one.
180
+ /* @__PURE__ */ a(
181
+ o.div,
182
+ {
183
+ className: i("-ms-2 -me-2 flex flex-col", t),
184
+ ...s,
185
+ "data-slot": e ?? "diagnostic-frames"
186
+ }
187
+ )
188
+ );
189
+ }, R = b({
190
+ base: [
191
+ "flex w-full items-center gap-1.5",
192
+ "min-h-[24px] rounded-md px-2 py-1",
193
+ "text-start font-mono text-xs",
194
+ "[&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0",
195
+ "[button&]:cursor-pointer [button&]:hover:bg-accent [button&]:hover:text-accent-foreground",
196
+ "[button&]:outline-none [button&]:focus-visible:ring-[3px] [button&]:focus-visible:ring-ring"
197
+ ],
198
+ variants: {
199
+ // Two channels, so the distinction survives a reader who is scanning rather than reading: the
200
+ // row drops a tier, and the file loses the weight that marks an authored position.
201
+ //
202
+ // The tier is `--muted-foreground` and not `--faint`, which is what a dimmed thing usually
203
+ // reaches for here: `--faint` is solved against the page, and a diagnostic is a wash over it.
204
+ // Measured 2026-08 over the six documents in `packages/theme/palettes`, both modes: faint on
205
+ // that surface is 3.96–6.62:1 and lands under WCAG AA's 4.5 in seven of the twelve;
206
+ // muted-foreground is 6.54–9.48 in all of them. Every dimmed part below reads the same way.
207
+ //
208
+ // **Those numbers were taken against `bg-foreground/14`, and the card is now `bg-destructive/7` /
209
+ // `-warning-a3` / `-info-a3`** — the surface moved with the `Alert` alignment. The direction
210
+ // is not in doubt (a family wash at `-a3` is a comparably light tint, and the gap between the
211
+ // two tiers is ~2.5 stops), but the figures no longer describe what is painted. Re-measuring
212
+ // over the three washes on both modes is owed, and until it happens this is a claim about a
213
+ // surface that has been replaced.
214
+ secondary: {
215
+ true: ["text-muted-foreground", "[&_[data-slot=diagnostic-frame-file]]:font-normal"],
216
+ false: "text-foreground"
217
+ }
218
+ },
219
+ defaultVariants: {
220
+ secondary: !1
221
+ }
222
+ }), et = (n) => {
223
+ const { path: t, line: e, column: s, label: r, secondary: c = !1, onSelect: l, className: w, slot: u, ...g } = n, f = t.lastIndexOf("/") + 1, p = t.slice(0, f), y = t.slice(f), m = e === void 0 ? "" : s === void 0 ? `:${e}` : `:${e}:${s}`, x = /* @__PURE__ */ d(C, { children: [
224
+ /* @__PURE__ */ d(o.span, { className: "flex min-w-0 items-baseline", children: [
225
+ p ? /* @__PURE__ */ a(o.span, { className: "truncate text-muted-foreground", "data-slot": "diagnostic-frame-directory", children: p }) : null,
226
+ /* @__PURE__ */ a(o.span, { className: "shrink-0 font-medium", "data-slot": "diagnostic-frame-file", children: y }),
227
+ m ? /* @__PURE__ */ a(
228
+ o.span,
229
+ {
230
+ className: "shrink-0 text-muted-foreground tabular-nums",
231
+ "data-slot": "diagnostic-frame-position",
232
+ children: m
233
+ }
234
+ ) : null
235
+ ] }),
236
+ r || l ? /* @__PURE__ */ d(o.span, { className: "ms-auto flex shrink-0 items-center gap-1.5 font-sans text-muted-foreground", children: [
237
+ r ? /* @__PURE__ */ a(o.span, { "data-slot": "diagnostic-frame-label", children: r }) : null,
238
+ l ? /* @__PURE__ */ a(D, { "aria-hidden": "true" }) : null
239
+ ] }) : null
240
+ ] }), h = {
241
+ className: i(R({ secondary: c }), w),
242
+ "data-secondary": c ? "" : void 0
243
+ };
244
+ return l ? (
245
+ // Ark ships no equivalent, so the ARIA contract is ours: the button is named by the position
246
+ // and its label joined with a dash. Without it the name is the spans run together —
247
+ // "ledgerQ-1058:12:7as claimed" — because the rhythm that separates them is visual only.
248
+ /* @__PURE__ */ a(
249
+ o.button,
250
+ {
251
+ "aria-label": r ? `${t}${m} — ${r}` : `${t}${m}`,
252
+ onClick: l,
253
+ type: "button",
254
+ ...h,
255
+ ...g,
256
+ "data-slot": u ?? "diagnostic-frame",
257
+ children: x
258
+ }
259
+ )
260
+ ) : (
261
+ // One props type cannot describe two elements, and `ref` is the member that conflicts: which
262
+ // element this is depends on `onSelect`, which the type system sees no earlier than we do.
263
+ /* @__PURE__ */ a(
264
+ o.span,
265
+ {
266
+ ...h,
267
+ ...g,
268
+ "data-slot": u ?? "diagnostic-frame",
269
+ children: x
270
+ }
271
+ )
272
+ );
273
+ };
274
+ export {
275
+ G as Diagnostic,
276
+ W as DiagnosticActions,
277
+ Y as DiagnosticContent,
278
+ Z as DiagnosticDescription,
279
+ et as DiagnosticFrame,
280
+ tt as DiagnosticFrames,
281
+ J as DiagnosticHeader,
282
+ E as DiagnosticList,
283
+ K as DiagnosticSeverity,
284
+ Q as DiagnosticSource,
285
+ M as DiagnosticTitle,
286
+ X as DiagnosticTrigger
287
+ };
288
+ //# sourceMappingURL=diagnostic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic.js","sources":["../../src/simples/diagnostic.tsx"],"sourcesContent":["\"use client\";\n\n// A machine's complaint, shown: a severity, a message, and the positions it points at. A SHACL\n// violation, an LSP diagnostic and a stack trace are the same three things, so the vocabulary is\n// theirs and the domain is nobody's. Client, because `DiagnosticFrame` hands `onSelect` to a real\n// `onClick` — a function prop a Server Component may not pass.\n\nimport { ark } from \"@ark-ui/react/factory\";\nimport { ArrowUpRightIcon, CircleAlertIcon, InfoIcon, TriangleAlertIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\nimport { Badge } from \"./badge\";\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleIndicator,\n CollapsibleTrigger,\n} from \"./collapsible\";\n\n/**\n * **`variant`, and the families are the house's.**\n *\n * It was `severity`, with `error | warning | info`. Both halves were a second vocabulary for\n * something the library already says: `Alert`, `Badge`, `Status` and `Button` all colour by\n * `variant`, and the family that means *this went wrong* is `destructive` everywhere else — the\n * word `error` appears in no other recipe here and in none of the reference's. A diagnostic is a\n * severity in the domain sense and a variant in the surface sense, and this is the surface.\n */\ntype Variant = \"destructive\" | \"warning\" | \"info\";\n\nconst VARIANT_ICON: Record<Variant, typeof InfoIcon> = {\n destructive: CircleAlertIcon,\n warning: TriangleAlertIcon,\n info: InfoIcon,\n};\n\n/**\n * The variant, for the two parts CSS cannot carry: the icon, which is a React element no selector\n * can produce, and the `Badge` the header wears, which takes it as a prop. Declared once on the\n * root and read here — not a second source of truth, which is why `DiagnosticSeverity` still takes\n * no variant of its own.\n */\nconst VariantContext = React.createContext<Variant>(\"destructive\");\n\n// A real `<ul>` rather than a div wearing `role=\"list\"`: an implicit role belongs to the element\n// and no merge can hand it away, which is the trap `Item` documents seen from the other side.\n//\n// **And an explicit `role=\"list\"` on top of it, because `list-none` takes the implicit one away.**\n// WebKit drops list semantics from a `<ul>` whose `list-style` is `none` — the whole list, items\n// included — so a styled list announces nothing in VoiceOver while `<ul>`/`<li>` sit right there in\n// the DOM. jsdom does not model that, so `getByRole(\"listitem\")` passed the entire time. The\n// element stays a `<ul>`; the role is the belt.\nexport const DiagnosticList = (props: React.ComponentProps<typeof ark.ul>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.ul\n className={cn(\"flex w-full list-none flex-col gap-1.5\", className)}\n role=\"list\"\n {...rest}\n data-slot={slot ?? \"diagnostic-list\"}\n />\n );\n};\n\nconst diagnosticVariants = tv({\n base: [\n \"group/diagnostic\",\n \"w-full\",\n \"rounded-xl border\",\n \"text-card-foreground text-sm\",\n ],\n variants: {\n /**\n * **The reference's surface, not a coloured rail.**\n *\n * This used to be `border-s-2` in the family's colour over a neutral `bg-foreground/14` — a card with\n * a bar down one edge, which is a shape that appears nowhere in Shark UI and nowhere else in\n * this library. It is the generic callout, and it is what made a diagnostic read as machine\n * furniture rather than as one of these components.\n *\n * `Alert` is the surface a message with a severity has here, and these are its exact steps:\n * the wash at `-a3`, the whole outline at `-a6`, the glyph at the family. It stacks — the\n * reference stacks alerts, and the argument that six of them would read as decoration was made\n * about the rail, not about this.\n */\n variant: {\n destructive: [\"bg-destructive/7\", \"border-destructive/30\"],\n warning: [\"bg-warning/7\", \"border-warning/30\"],\n info: [\"bg-info/7\", \"border-info/30\"],\n },\n },\n defaultVariants: {\n variant: \"destructive\",\n },\n});\n\n// `asChild` is consumed here — the element is the `<li>` — so it is not a prop a caller may pass.\nexport interface DiagnosticProps\n extends Omit<React.ComponentProps<typeof Collapsible>, \"asChild\">,\n VariantProps<typeof diagnosticVariants> {}\n\n/**\n * One diagnostic, collapsed to its header until it is opened. Open state, animation and the\n * trigger/content ARIA come from Ark's Collapsible, so `defaultOpen`, `open` and `onOpenChange`\n * pass through unchanged — the machine's root is handed to the `<li>` through `asChild`, which is\n * how a diagnostic is a real item of `DiagnosticList`'s `<ul>` and a collapsible at the same time.\n *\n * `variant` is written once, here. Repeating it as a prop on the badge is how the two drift.\n */\nexport const Diagnostic = (props: DiagnosticProps) => {\n const { variant = \"destructive\", className, children, slot, ...rest } = props;\n\n return (\n <VariantContext.Provider value={variant}>\n <Collapsible {...rest} asChild>\n <ark.li\n className={cn(diagnosticVariants({ variant }), className)}\n data-slot={slot ?? \"diagnostic\"}\n data-variant={variant}\n >\n {children}\n </ark.li>\n </Collapsible>\n </VariantContext.Provider>\n );\n};\n\n/**\n * One line **until the caller says otherwise**, and it was `flex-nowrap` — which is not the same\n * thing and cost the message.\n *\n * The argument for nowrap was real: a header that wraps turns a list of six into six different\n * shapes, and the message that overflows is the one `DiagnosticDescription` repeats in full once the\n * row is open. What it did not survive is a narrow column. Measured on the `metadata-form` showcase,\n * whose findings panel is 24 % of the workspace: **a 143 px header, with the title 0 px wide and\n * starting at x=215** — 72 px past its own right edge. The severity, the source and the trigger are\n * all `shrink-0`, so they take the width and `DiagnosticTitle`'s `flex-1` shrinks to nothing. Not\n * truncated with an ellipsis: gone, and the row said only *This field is required.* three times over\n * with nothing to tell the three apart.\n *\n * `flex-wrap` changes nothing for a header that fits, and nothing for a wide list either: the title\n * is `basis-0`, so it never forces a break on its own. What it does is make `basis-full` on the\n * title mean what a reader would expect — *this goes on its own line* — which is what the showcase\n * had already written, with a comment claiming this component wrapped. It did not. Now it does, and\n * an item that cannot fit wraps instead of overflowing the box.\n */\nexport const DiagnosticHeader = (props: React.ComponentProps<typeof ark.div>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.div\n className={cn(\"flex w-full min-w-0 flex-wrap items-center gap-2 px-3 py-2\", className)}\n {...rest}\n data-slot={slot ?? \"diagnostic-header\"}\n />\n );\n};\n\n/**\n * The severity, as an icon and whatever word the call site gives it. The icon comes from the root\n * and is not the caller's to pass; the text is.\n *\n * **It is a `Badge`**, and it used to be a `Badge` respelled: `h-5 min-w-5 px-1.5 rounded-md\n * font-medium text-xs` beside three `group-data-[severity=…]` lines that repainted, by hand, the\n * three soft variants `Badge` already ships. `Tool`'s state chip has always used the real one.\n * Nothing is lost by the swap — the size is `Badge`'s `sm`, the fills are the same tokens — and the\n * three selector lines go with it.\n */\nexport const DiagnosticSeverity = (props: React.ComponentProps<typeof Badge>) => {\n const { className, children, slot, ...rest } = props;\n const variant = React.useContext(VariantContext);\n const Icon = VARIANT_ICON[variant];\n\n return (\n <Badge\n className={cn(\"shrink-0\", className)}\n size=\"sm\"\n variant={variant}\n {...rest}\n slot={slot ?? \"diagnostic-severity\"}\n >\n <Icon aria-hidden=\"true\" />\n {children}\n </Badge>\n );\n};\n\nexport const DiagnosticTitle = (props: React.ComponentProps<typeof ark.div>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.div\n className={cn(\n \"min-w-0 flex-1 truncate font-medium text-sm leading-snug\",\n // Opening a row is the one moment the whole message is worth more than the alignment.\n \"group-data-[state=open]/diagnostic:whitespace-normal\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"diagnostic-title\"}\n />\n );\n};\n\n// What produced the diagnostic — a shape name, a rule id. Monospace because it is an identifier\n// somebody has to type back into a tool, not prose.\nexport const DiagnosticSource = (props: React.ComponentProps<typeof ark.span>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.span\n className={cn(\n \"shrink-0 whitespace-nowrap font-mono text-muted-foreground text-xs max-sm:hidden\",\n className\n )}\n {...rest}\n data-slot={slot ?? \"diagnostic-source\"}\n />\n );\n};\n\nexport const DiagnosticActions = (props: React.ComponentProps<typeof ark.div>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.div\n className={cn(\"flex shrink-0 items-center gap-1\", className)}\n {...rest}\n data-slot={slot ?? \"diagnostic-actions\"}\n />\n );\n};\n\nexport const DiagnosticTrigger = (props: React.ComponentProps<typeof CollapsibleTrigger>) => {\n const { className, children, slot, ...rest } = props;\n\n return (\n <CollapsibleTrigger\n className={cn(\n \"inline-flex items-center justify-center gap-1\",\n // WCAG 2.5.8 asks 24×24 CSS pixels, and every `rem` here is measured against a root the\n // density axis sets — 14px at compact, where `min-h-6` would be 21. `DiagnosticFrame`'s\n // floor is the same number for the same reason.\n \"min-h-[24px] min-w-[24px] px-2\",\n \"rounded-md font-medium text-muted-foreground text-xs tabular-nums\",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"outline-none focus-visible:ring-[3px] focus-visible:ring-ring\",\n \"[&_svg:not([class*='size-'])]:size-3.5 [&_svg]:shrink-0\",\n className\n )}\n {...rest}\n slot={slot ?? \"diagnostic-trigger\"}\n >\n {children}\n <CollapsibleIndicator />\n </CollapsibleTrigger>\n );\n};\n\nexport const DiagnosticContent = (props: React.ComponentProps<typeof CollapsibleContent>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <CollapsibleContent\n className={cn(\"flex flex-col gap-2 border-t px-3 pt-2.5 pb-2.5\", className)}\n {...rest}\n slot={slot ?? \"diagnostic-content\"}\n />\n );\n};\n\nexport const DiagnosticDescription = (props: React.ComponentProps<typeof ark.p>) => {\n const { className, slot, ...rest } = props;\n\n return (\n <ark.p\n className={cn(\"text-muted-foreground text-sm leading-normal\", className)}\n {...rest}\n data-slot={slot ?? \"diagnostic-description\"}\n />\n );\n};\n\n// Not a list, deliberately, and `DiagnosticList`'s `<ul>` is the contrast: a frame is a `<button>`\n// whenever it can be pressed, so it can be neither an `<li>` nor a `role=\"listitem\"` without losing\n// the role it already has — the trap `Item` documents.\nexport const DiagnosticFrames = (props: React.ComponentProps<typeof ark.div>) => {\n const { className, slot, ...rest } = props;\n\n return (\n // Pulled out by the frame's own padding, so a frame's text lines up with the description above\n // it and its hover fill is a full-width row rather than an inset one.\n <ark.div\n className={cn(\"-ms-2 -me-2 flex flex-col\", className)}\n {...rest}\n data-slot={slot ?? \"diagnostic-frames\"}\n />\n );\n};\n\nconst diagnosticFrameVariants = tv({\n base: [\n \"flex w-full items-center gap-1.5\",\n \"min-h-[24px] rounded-md px-2 py-1\",\n \"text-start font-mono text-xs\",\n \"[&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"[button&]:cursor-pointer [button&]:hover:bg-accent [button&]:hover:text-accent-foreground\",\n \"[button&]:outline-none [button&]:focus-visible:ring-[3px] [button&]:focus-visible:ring-ring\",\n ],\n variants: {\n // Two channels, so the distinction survives a reader who is scanning rather than reading: the\n // row drops a tier, and the file loses the weight that marks an authored position.\n //\n // The tier is `--muted-foreground` and not `--faint`, which is what a dimmed thing usually\n // reaches for here: `--faint` is solved against the page, and a diagnostic is a wash over it.\n // Measured 2026-08 over the six documents in `packages/theme/palettes`, both modes: faint on\n // that surface is 3.96–6.62:1 and lands under WCAG AA's 4.5 in seven of the twelve;\n // muted-foreground is 6.54–9.48 in all of them. Every dimmed part below reads the same way.\n //\n // **Those numbers were taken against `bg-foreground/14`, and the card is now `bg-destructive/7` /\n // `-warning-a3` / `-info-a3`** — the surface moved with the `Alert` alignment. The direction\n // is not in doubt (a family wash at `-a3` is a comparably light tint, and the gap between the\n // two tiers is ~2.5 stops), but the figures no longer describe what is painted. Re-measuring\n // over the three washes on both modes is owed, and until it happens this is a claim about a\n // surface that has been replaced.\n secondary: {\n true: [\"text-muted-foreground\", \"[&_[data-slot=diagnostic-frame-file]]:font-normal\"],\n false: \"text-foreground\",\n },\n },\n defaultVariants: {\n secondary: false,\n },\n});\n\nexport interface DiagnosticFrameProps\n extends Omit<React.ComponentProps<typeof ark.button>, \"onSelect\" | \"children\"> {\n /** The file, graph or node the position is in. */\n path: string;\n line?: number;\n column?: number;\n /** A short note beside the position — the property path, the frame's function. */\n label?: string;\n /**\n * An inferred or upstream position rather than one the author wrote — the counterpart of a\n * `node_modules` frame. Dimmed, never hidden: it is usually the frame that explains the others.\n */\n secondary?: boolean;\n onSelect?: () => void;\n}\n\n/**\n * One position, read as a location rather than a string: the directory recedes, the file carries\n * the weight, and the line and column are tabular so a column of frames lines up.\n *\n * With `onSelect` it is a real `<button>` wearing the arrow that says it goes somewhere; without\n * one it is static text, because a control that does nothing is announced as a control and answers\n * to nothing.\n */\nexport const DiagnosticFrame = (props: DiagnosticFrameProps) => {\n const { path, line, column, label, secondary = false, onSelect, className, slot, ...rest } = props;\n\n const cut = path.lastIndexOf(\"/\") + 1;\n const directory = path.slice(0, cut);\n const file = path.slice(cut);\n const position =\n line === undefined ? \"\" : column === undefined ? `:${line}` : `:${line}:${column}`;\n\n const body = (\n <>\n <ark.span className=\"flex min-w-0 items-baseline\">\n {directory ? (\n <ark.span className=\"truncate text-muted-foreground\" data-slot=\"diagnostic-frame-directory\">\n {directory}\n </ark.span>\n ) : null}\n <ark.span className=\"shrink-0 font-medium\" data-slot=\"diagnostic-frame-file\">\n {file}\n </ark.span>\n {position ? (\n <ark.span\n className=\"shrink-0 text-muted-foreground tabular-nums\"\n data-slot=\"diagnostic-frame-position\"\n >\n {position}\n </ark.span>\n ) : null}\n </ark.span>\n {label || onSelect ? (\n <ark.span className=\"ms-auto flex shrink-0 items-center gap-1.5 font-sans text-muted-foreground\">\n {label ? <ark.span data-slot=\"diagnostic-frame-label\">{label}</ark.span> : null}\n {onSelect ? <ArrowUpRightIcon aria-hidden=\"true\" /> : null}\n </ark.span>\n ) : null}\n </>\n );\n\n const shared = {\n className: cn(diagnosticFrameVariants({ secondary }), className),\n \"data-secondary\": secondary ? \"\" : undefined,\n };\n\n if (onSelect) {\n return (\n // Ark ships no equivalent, so the ARIA contract is ours: the button is named by the position\n // and its label joined with a dash. Without it the name is the spans run together —\n // \"ledgerQ-1058:12:7as claimed\" — because the rhythm that separates them is visual only.\n <ark.button\n aria-label={label ? `${path}${position} — ${label}` : `${path}${position}`}\n onClick={onSelect}\n type=\"button\"\n {...shared}\n {...rest}\n data-slot={slot ?? \"diagnostic-frame\"}\n >\n {body}\n </ark.button>\n );\n }\n\n return (\n // One props type cannot describe two elements, and `ref` is the member that conflicts: which\n // element this is depends on `onSelect`, which the type system sees no earlier than we do.\n <ark.span\n {...shared}\n {...(rest as React.ComponentProps<typeof ark.span>)}\n data-slot={slot ?? \"diagnostic-frame\"}\n >\n {body}\n </ark.span>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA+BA;AAAuD;AACxC;AACJ;AAEX;AAmBE;AAEA;AACE;AAAK;AAAJ;AACkE;AAC5D;AACD;AACe;AAAA;AAGzB;AAE8B;AACtB;AACJ;AACA;AACA;AACA;AAAA;AAEQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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