@logicplanes/kaeso-ui 0.4.3 → 0.4.5

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 (490) hide show
  1. package/ai/component-guides.md +279 -98
  2. package/ai/component-registry.json +352 -236
  3. package/ai/component-registry.md +241 -219
  4. package/ai/icons.md +2 -2
  5. package/ai/tokens.md +18 -14
  6. package/dist/blocks/delete-resource.js +3 -3
  7. package/dist/blocks/delete-resource.js.map +1 -1
  8. package/dist/blocks/pages.js +47 -42
  9. package/dist/blocks/pages.js.map +1 -1
  10. package/dist/blocks/resource-list.js +68 -55
  11. package/dist/blocks/resource-list.js.map +1 -1
  12. package/dist/chunks/agent-avatar-DHieggHK.js +188 -0
  13. package/dist/chunks/agent-avatar-DHieggHK.js.map +1 -0
  14. package/dist/chunks/app-frame-DysOel2X.js +232 -0
  15. package/dist/chunks/app-frame-DysOel2X.js.map +1 -0
  16. package/dist/chunks/arrow-focus-B0KdRFX8.js +20 -0
  17. package/dist/chunks/arrow-focus-B0KdRFX8.js.map +1 -0
  18. package/dist/chunks/avatar-CYNMK7uY.js +110 -0
  19. package/dist/chunks/avatar-CYNMK7uY.js.map +1 -0
  20. package/dist/chunks/badge-C0GC3B9X.js +27 -0
  21. package/dist/chunks/badge-C0GC3B9X.js.map +1 -0
  22. package/dist/chunks/banner-B3DGLTBu.js +88 -0
  23. package/dist/chunks/banner-B3DGLTBu.js.map +1 -0
  24. package/dist/chunks/button-IblhXUyZ.js +202 -0
  25. package/dist/chunks/button-IblhXUyZ.js.map +1 -0
  26. package/dist/chunks/{calendar-BWaf2MXc.js → calendar-Dc6_dl0f.js} +4 -4
  27. package/dist/chunks/calendar-Dc6_dl0f.js.map +1 -0
  28. package/dist/chunks/checkbox-9tbimmF3.js +141 -0
  29. package/dist/chunks/checkbox-9tbimmF3.js.map +1 -0
  30. package/dist/chunks/{cn-Dj6sRgkF.js → cn-BjnOAUrA.js} +45 -4
  31. package/dist/chunks/cn-BjnOAUrA.js.map +1 -0
  32. package/dist/chunks/code-block-64e-Cy1S.js +346 -0
  33. package/dist/chunks/code-block-64e-Cy1S.js.map +1 -0
  34. package/dist/chunks/code-block-KIvuE8jg.js +352 -0
  35. package/dist/chunks/code-block-KIvuE8jg.js.map +1 -0
  36. package/dist/chunks/{code-tqj0uhBL.js → code-xqjww4Pv.js} +5 -6
  37. package/dist/chunks/code-xqjww4Pv.js.map +1 -0
  38. package/dist/chunks/combobox-DkcjkWc6.js +352 -0
  39. package/dist/chunks/combobox-DkcjkWc6.js.map +1 -0
  40. package/dist/chunks/command-list-CypqsC4T.js +456 -0
  41. package/dist/chunks/command-list-CypqsC4T.js.map +1 -0
  42. package/dist/chunks/{copy-button-FJvPJn72.js → copy-button-CwU8t_9_.js} +22 -15
  43. package/dist/chunks/copy-button-CwU8t_9_.js.map +1 -0
  44. package/dist/chunks/core-CmK-8ObW.js +505 -0
  45. package/dist/chunks/core-CmK-8ObW.js.map +1 -0
  46. package/dist/chunks/data-table-CqY8_6IS.js +581 -0
  47. package/dist/chunks/data-table-CqY8_6IS.js.map +1 -0
  48. package/dist/chunks/date-popup-DAnjptFt.js +58 -0
  49. package/dist/chunks/date-popup-DAnjptFt.js.map +1 -0
  50. package/dist/chunks/{de-CPXJh9cq.js → de-CqC4aSIV.js} +81 -40
  51. package/dist/chunks/de-CqC4aSIV.js.map +1 -0
  52. package/dist/chunks/{dialog-Cg9A_6SF.js → dialog-2zb6ClNR.js} +156 -134
  53. package/dist/chunks/dialog-2zb6ClNR.js.map +1 -0
  54. package/dist/chunks/disclosure-BtYRTDO3.js +22 -0
  55. package/dist/chunks/disclosure-BtYRTDO3.js.map +1 -0
  56. package/dist/chunks/domain-obd_w9xk.js +28 -0
  57. package/dist/chunks/domain-obd_w9xk.js.map +1 -0
  58. package/dist/chunks/{empty-DvhyMXQq.js → empty-BpiUgGzm.js} +2 -2
  59. package/dist/chunks/{empty-DvhyMXQq.js.map → empty-BpiUgGzm.js.map} +1 -1
  60. package/dist/chunks/{field-TviMvYa2.js → field-D7m-yl-D.js} +37 -34
  61. package/dist/chunks/field-D7m-yl-D.js.map +1 -0
  62. package/dist/chunks/{icon-D7ja-_Yk.js → icon-CBzOwqrX.js} +7 -6
  63. package/dist/chunks/{icon-D7ja-_Yk.js.map → icon-CBzOwqrX.js.map} +1 -1
  64. package/dist/chunks/icon-CPJWE2N-.js +95 -0
  65. package/dist/chunks/{icon-DVooQfk4.js.map → icon-CPJWE2N-.js.map} +1 -1
  66. package/dist/chunks/{icon-button-CrdF_eMG.js → icon-button-Dfwpvmav.js} +7 -6
  67. package/dist/chunks/icon-button-Dfwpvmav.js.map +1 -0
  68. package/dist/chunks/{identity-BmhQ6BQ-.js → identity-3Foi5F8w.js} +7 -7
  69. package/dist/chunks/{identity-BmhQ6BQ-.js.map → identity-3Foi5F8w.js.map} +1 -1
  70. package/dist/chunks/{input-2VJuj_M4.js → input-Bo5-UZg2.js} +15 -9
  71. package/dist/chunks/input-Bo5-UZg2.js.map +1 -0
  72. package/dist/chunks/{input-group-DQ_4DoXg.js → input-group-jPcK9T_a.js} +42 -29
  73. package/dist/chunks/input-group-jPcK9T_a.js.map +1 -0
  74. package/dist/chunks/iso-field-DoqHBg8n.js +52 -0
  75. package/dist/chunks/iso-field-DoqHBg8n.js.map +1 -0
  76. package/dist/chunks/json-view-DZ2nL2Ir.js +253 -0
  77. package/dist/chunks/json-view-DZ2nL2Ir.js.map +1 -0
  78. package/dist/chunks/{kbd-BF1vKXJf.js → kbd-8A0ML_up.js} +30 -28
  79. package/dist/chunks/kbd-8A0ML_up.js.map +1 -0
  80. package/dist/chunks/label-DW24Aj0Z.js +26 -0
  81. package/dist/chunks/label-DW24Aj0Z.js.map +1 -0
  82. package/dist/chunks/{link-KWI7PevW.js → link-CMjkcLQK.js} +14 -14
  83. package/dist/chunks/link-CMjkcLQK.js.map +1 -0
  84. package/dist/chunks/list-B4G-sWwV.js +540 -0
  85. package/dist/chunks/list-B4G-sWwV.js.map +1 -0
  86. package/dist/chunks/{loader-DCfPndXa.js → loader-zo8CCIGJ.js} +2 -2
  87. package/dist/chunks/{loader-DCfPndXa.js.map → loader-zo8CCIGJ.js.map} +1 -1
  88. package/dist/chunks/markdown-C565aBR7.js +338 -0
  89. package/dist/chunks/markdown-C565aBR7.js.map +1 -0
  90. package/dist/chunks/menu-Clvv6ftq.js +485 -0
  91. package/dist/chunks/menu-Clvv6ftq.js.map +1 -0
  92. package/dist/chunks/merge-refs-BN1FyQt9.js +20 -0
  93. package/dist/chunks/merge-refs-BN1FyQt9.js.map +1 -0
  94. package/dist/chunks/meter-CASMHlxl.js +100 -0
  95. package/dist/chunks/meter-CASMHlxl.js.map +1 -0
  96. package/dist/chunks/nav-sheet-Dt6JSvzX.js +67 -0
  97. package/dist/chunks/nav-sheet-Dt6JSvzX.js.map +1 -0
  98. package/dist/chunks/{nav-wordmark-_pjheAsZ.js → nav-wordmark-J4pB_vjr.js} +4 -8
  99. package/dist/chunks/nav-wordmark-J4pB_vjr.js.map +1 -0
  100. package/dist/chunks/page-header-kS5tdmvb.js +45 -0
  101. package/dist/chunks/page-header-kS5tdmvb.js.map +1 -0
  102. package/dist/chunks/pagination-D7fAm8qg.js +147 -0
  103. package/dist/chunks/pagination-D7fAm8qg.js.map +1 -0
  104. package/dist/chunks/picker-popover-1FHb1LQG.js +119 -0
  105. package/dist/chunks/picker-popover-1FHb1LQG.js.map +1 -0
  106. package/dist/chunks/popover-Bl5QYqnh.js +51 -0
  107. package/dist/chunks/popover-Bl5QYqnh.js.map +1 -0
  108. package/dist/chunks/{portal-context-BBbzDKmY.js → portal-context-CTatR2Z8.js} +14 -4
  109. package/dist/chunks/portal-context-CTatR2Z8.js.map +1 -0
  110. package/dist/chunks/{radio-CDDFpdtL.js → radio-C6GtzF_t.js} +38 -23
  111. package/dist/chunks/radio-C6GtzF_t.js.map +1 -0
  112. package/dist/chunks/range-popup-lGiZsG3s.js +160 -0
  113. package/dist/chunks/range-popup-lGiZsG3s.js.map +1 -0
  114. package/dist/chunks/reasoning-frame-C3HdQRRS.js +51 -0
  115. package/dist/chunks/reasoning-frame-C3HdQRRS.js.map +1 -0
  116. package/dist/chunks/release-art-ChiT4T2S.js +582 -0
  117. package/dist/chunks/release-art-ChiT4T2S.js.map +1 -0
  118. package/dist/chunks/rights-B68ocZuq.js +312 -0
  119. package/dist/chunks/rights-B68ocZuq.js.map +1 -0
  120. package/dist/chunks/{scroll-area-D8MD7Vpo.js → scroll-area-_Ljh4-bG.js} +11 -6
  121. package/dist/chunks/scroll-area-_Ljh4-bG.js.map +1 -0
  122. package/dist/chunks/section-CFBYhsUi.js +77 -0
  123. package/dist/chunks/section-CFBYhsUi.js.map +1 -0
  124. package/dist/chunks/section-header-DU1Q4Tdf.js +28 -0
  125. package/dist/chunks/section-header-DU1Q4Tdf.js.map +1 -0
  126. package/dist/chunks/segmented-D9i1avik.js +119 -0
  127. package/dist/chunks/segmented-D9i1avik.js.map +1 -0
  128. package/dist/chunks/select-BqjmQOqx.js +222 -0
  129. package/dist/chunks/select-BqjmQOqx.js.map +1 -0
  130. package/dist/chunks/{separator-D7TzNHmX.js → separator-BNWf6BBj.js} +13 -8
  131. package/dist/chunks/separator-BNWf6BBj.js.map +1 -0
  132. package/dist/chunks/sidebar-Dq7oGOje.js +664 -0
  133. package/dist/chunks/sidebar-Dq7oGOje.js.map +1 -0
  134. package/dist/chunks/{sidebar-menu-BN3jkTlK.js → sidebar-menu-QSSNu1jJ.js} +2 -2
  135. package/dist/chunks/{sidebar-menu-BN3jkTlK.js.map → sidebar-menu-QSSNu1jJ.js.map} +1 -1
  136. package/dist/chunks/{skeleton-Dcz57Zyp.js → skeleton-D-qk3mes.js} +3 -3
  137. package/dist/chunks/skeleton-D-qk3mes.js.map +1 -0
  138. package/dist/chunks/slider-CcE8GtuV.js +58 -0
  139. package/dist/chunks/slider-CcE8GtuV.js.map +1 -0
  140. package/dist/chunks/{status-dot-QJTF0Yv4.js → status-dot-CP6runiC.js} +4 -4
  141. package/dist/chunks/{status-dot-QJTF0Yv4.js.map → status-dot-CP6runiC.js.map} +1 -1
  142. package/dist/chunks/{styles-CVJU9t9v.js → styles-hkFkoBbi.js} +2 -2
  143. package/dist/chunks/{styles-CVJU9t9v.js.map → styles-hkFkoBbi.js.map} +1 -1
  144. package/dist/chunks/{swap-text-Dr0Irxz6.js → swap-text-SlUjrTlG.js} +3 -3
  145. package/dist/chunks/swap-text-SlUjrTlG.js.map +1 -0
  146. package/dist/chunks/switch-ngywMQdl.js +76 -0
  147. package/dist/chunks/switch-ngywMQdl.js.map +1 -0
  148. package/dist/chunks/table-CTK5E0J7.js +102 -0
  149. package/dist/chunks/table-CTK5E0J7.js.map +1 -0
  150. package/dist/chunks/tag-BGr6lTSV.js +100 -0
  151. package/dist/chunks/tag-BGr6lTSV.js.map +1 -0
  152. package/dist/chunks/{text-CIXH8rmT.js → text-DkKdTVUf.js} +9 -9
  153. package/dist/chunks/text-DkKdTVUf.js.map +1 -0
  154. package/dist/chunks/{textarea--4FRL3Pb.js → textarea-CO0HP6fK.js} +47 -36
  155. package/dist/chunks/textarea-CO0HP6fK.js.map +1 -0
  156. package/dist/chunks/timeseries-Ck-q0wWn.js +381 -0
  157. package/dist/chunks/timeseries-Ck-q0wWn.js.map +1 -0
  158. package/dist/chunks/toolbar-u0Gm7Q7-.js +61 -0
  159. package/dist/chunks/toolbar-u0Gm7Q7-.js.map +1 -0
  160. package/dist/chunks/tooltip-Tkm-urbi.js +202 -0
  161. package/dist/chunks/tooltip-Tkm-urbi.js.map +1 -0
  162. package/dist/chunks/tooltip-root-BC_RNNiP.js +70 -0
  163. package/dist/chunks/tooltip-root-BC_RNNiP.js.map +1 -0
  164. package/dist/chunks/truncated-d1afmUJT.js +33 -0
  165. package/dist/chunks/truncated-d1afmUJT.js.map +1 -0
  166. package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js +28 -0
  167. package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js.map +1 -0
  168. package/dist/chunks/use-hydrating-COtYVRo4.js +8 -0
  169. package/dist/chunks/use-hydrating-COtYVRo4.js.map +1 -0
  170. package/dist/chunks/use-scroll-fade-uc8mWSDX.js +30 -0
  171. package/dist/chunks/use-scroll-fade-uc8mWSDX.js.map +1 -0
  172. package/dist/chunks/{zh-CN-29X4CDLE.js → zh-CN-BlpsT6d_.js} +80 -39
  173. package/dist/chunks/zh-CN-BlpsT6d_.js.map +1 -0
  174. package/dist/components/agent-avatar.js +1 -1
  175. package/dist/components/app-frame.js +2 -2
  176. package/dist/components/avatar.js +1 -1
  177. package/dist/components/badge.js +1 -1
  178. package/dist/components/banner.js +1 -1
  179. package/dist/components/button-group.js +22 -22
  180. package/dist/components/button-group.js.map +1 -1
  181. package/dist/components/button.js +1 -1
  182. package/dist/components/calendar.js +1 -1
  183. package/dist/components/charts/bar.js +235 -160
  184. package/dist/components/charts/bar.js.map +1 -1
  185. package/dist/components/charts/donut.js +144 -99
  186. package/dist/components/charts/donut.js.map +1 -1
  187. package/dist/components/charts/gauge.js +61 -49
  188. package/dist/components/charts/gauge.js.map +1 -1
  189. package/dist/components/charts/heatmap.js +179 -70
  190. package/dist/components/charts/heatmap.js.map +1 -1
  191. package/dist/components/charts/sankey.js +144 -77
  192. package/dist/components/charts/sankey.js.map +1 -1
  193. package/dist/components/charts/sparkline.js +54 -38
  194. package/dist/components/charts/sparkline.js.map +1 -1
  195. package/dist/components/charts/timeseries.js +1 -1
  196. package/dist/components/charts.js +2 -2
  197. package/dist/components/checkbox.js +1 -1
  198. package/dist/components/code-block.js +4 -3
  199. package/dist/components/code.js +1 -1
  200. package/dist/components/collapsible.js +77 -1
  201. package/dist/components/collapsible.js.map +1 -0
  202. package/dist/components/combobox.js +1 -1
  203. package/dist/components/command-list.js +2 -2
  204. package/dist/components/command-palette.js +89 -66
  205. package/dist/components/command-palette.js.map +1 -1
  206. package/dist/components/copy-button.js +1 -1
  207. package/dist/components/data-table.js +1 -459
  208. package/dist/components/date-picker.js +162 -151
  209. package/dist/components/date-picker.js.map +1 -1
  210. package/dist/components/dialog.js +74 -63
  211. package/dist/components/dialog.js.map +1 -1
  212. package/dist/components/display-options.js +76 -64
  213. package/dist/components/display-options.js.map +1 -1
  214. package/dist/components/empty.js +1 -1
  215. package/dist/components/field.js +1 -1
  216. package/dist/components/figure.js +2 -2
  217. package/dist/components/filter-chip.js +36 -27
  218. package/dist/components/filter-chip.js.map +1 -1
  219. package/dist/components/filter-row.js +4 -4
  220. package/dist/components/filter-row.js.map +1 -1
  221. package/dist/components/flow.js +94 -63
  222. package/dist/components/flow.js.map +1 -1
  223. package/dist/components/heading.js +1 -1
  224. package/dist/components/icon-button.js +1 -1
  225. package/dist/components/icon.js +2 -2
  226. package/dist/components/input.js +176 -98
  227. package/dist/components/input.js.map +1 -1
  228. package/dist/components/kaeso/conversation.js +51 -46
  229. package/dist/components/kaeso/conversation.js.map +1 -1
  230. package/dist/components/kaeso/identity.js +1 -1
  231. package/dist/components/kaeso/moments.js +23 -20
  232. package/dist/components/kaeso/moments.js.map +1 -1
  233. package/dist/components/kaeso/rights.js +1 -1
  234. package/dist/components/kaeso/usage.js +90 -74
  235. package/dist/components/kaeso/usage.js.map +1 -1
  236. package/dist/components/kaeso.js +200 -187
  237. package/dist/components/kaeso.js.map +1 -1
  238. package/dist/components/kbd.js +1 -1
  239. package/dist/components/key-value.js +32 -47
  240. package/dist/components/key-value.js.map +1 -1
  241. package/dist/components/label.js +1 -25
  242. package/dist/components/layout.js +2 -2
  243. package/dist/components/layout.js.map +1 -1
  244. package/dist/components/link.js +1 -1
  245. package/dist/components/list.js +1 -1
  246. package/dist/components/loader.js +11 -10
  247. package/dist/components/loader.js.map +1 -1
  248. package/dist/components/logo.js +2 -2
  249. package/dist/components/markdown.js +1 -1
  250. package/dist/components/menu.js +2 -2
  251. package/dist/components/meter.js +1 -1
  252. package/dist/components/page-header.js +1 -1
  253. package/dist/components/pagination.js +1 -1
  254. package/dist/components/playground.js +644 -529
  255. package/dist/components/playground.js.map +1 -1
  256. package/dist/components/popover.js +4 -4
  257. package/dist/components/popover.js.map +1 -1
  258. package/dist/components/portal.js +1 -1
  259. package/dist/components/qr-code.js +2 -2
  260. package/dist/components/qr-code.js.map +1 -1
  261. package/dist/components/radio.js +1 -1
  262. package/dist/components/release-art.js +1 -1
  263. package/dist/components/scroll-area.js +1 -1
  264. package/dist/components/section.js +1 -1
  265. package/dist/components/segmented.js +1 -1
  266. package/dist/components/select.js +1 -1
  267. package/dist/components/separator.js +1 -1
  268. package/dist/components/settings.js +39 -46
  269. package/dist/components/settings.js.map +1 -1
  270. package/dist/components/sheet.js +10 -9
  271. package/dist/components/sheet.js.map +1 -1
  272. package/dist/components/sidebar.js +1 -1
  273. package/dist/components/skeleton.js +1 -1
  274. package/dist/components/slider.js +1 -1
  275. package/dist/components/stat.js +98 -84
  276. package/dist/components/stat.js.map +1 -1
  277. package/dist/components/status-dot.js +1 -1
  278. package/dist/components/surface.js +1 -1
  279. package/dist/components/swap-text.js +1 -1
  280. package/dist/components/switch.js +1 -1
  281. package/dist/components/table.js +1 -1
  282. package/dist/components/tabs.js +73 -55
  283. package/dist/components/tabs.js.map +1 -1
  284. package/dist/components/tag.js +1 -1
  285. package/dist/components/text.js +1 -1
  286. package/dist/components/theme-image.js +1 -1
  287. package/dist/components/theme-menu.js +5 -2
  288. package/dist/components/theme-menu.js.map +1 -1
  289. package/dist/components/theme-select.js +1 -1
  290. package/dist/components/thumbnail.js +35 -24
  291. package/dist/components/thumbnail.js.map +1 -1
  292. package/dist/components/timeline.js +51 -35
  293. package/dist/components/timeline.js.map +1 -1
  294. package/dist/components/toast.js +76 -66
  295. package/dist/components/toast.js.map +1 -1
  296. package/dist/components/toc.js +14 -8
  297. package/dist/components/toc.js.map +1 -1
  298. package/dist/components/toolbar.js +1 -1
  299. package/dist/components/tooltip.js +1 -1
  300. package/dist/components/visually-hidden.js +1 -1
  301. package/dist/i18n-provider.js +1 -1
  302. package/dist/index.js +101 -101
  303. package/dist/kaeso.css +605 -67
  304. package/dist/styles.css +1 -1
  305. package/dist/tailwind.css +1 -1
  306. package/dist/types/blocks/delete-resource/delete-resource.d.ts +2 -2
  307. package/dist/types/components/agent-avatar/agent-avatar.d.ts +24 -19
  308. package/dist/types/components/badge/badge.d.ts +3 -3
  309. package/dist/types/components/banner/banner.d.ts +3 -3
  310. package/dist/types/components/button/button.d.ts +2 -2
  311. package/dist/types/components/button-group/button-group.d.ts +1 -1
  312. package/dist/types/components/charts/domain.d.ts +11 -0
  313. package/dist/types/components/charts/marks.d.ts +1 -0
  314. package/dist/types/components/code/code.d.ts +3 -3
  315. package/dist/types/components/code-block/diff-view.d.ts +30 -0
  316. package/dist/types/components/code-block/diff.d.ts +26 -0
  317. package/dist/types/components/code-block/docs.d.ts +14 -0
  318. package/dist/types/components/code-block/index.d.ts +1 -0
  319. package/dist/types/components/code-block/json-view.d.ts +2 -1
  320. package/dist/types/components/code-block/numbers.d.ts +1 -0
  321. package/dist/types/components/collapsible/collapsible.d.ts +2 -2
  322. package/dist/types/components/collapsible/disclosure.d.ts +2 -0
  323. package/dist/types/components/data-table/data-table.d.ts +6 -5
  324. package/dist/types/components/data-table/docs.d.ts +1 -0
  325. package/dist/types/components/data-table/time-columns.d.ts +1 -0
  326. package/dist/types/components/date-picker/focus-day.d.ts +1 -0
  327. package/dist/types/components/date-picker/iso-field.d.ts +8 -1
  328. package/dist/types/components/dialog/dialog.d.ts +7 -7
  329. package/dist/types/components/field/field.d.ts +1 -1
  330. package/dist/types/components/flow/flow.d.ts +1 -1
  331. package/dist/types/components/icon-button/icon-button.d.ts +1 -1
  332. package/dist/types/components/input/input-group.d.ts +2 -0
  333. package/dist/types/components/input/number-input.d.ts +4 -4
  334. package/dist/types/components/input/otp-input.d.ts +3 -3
  335. package/dist/types/components/kaeso/client-button.d.ts +2 -1
  336. package/dist/types/components/kaeso/provider-picker.d.ts +1 -0
  337. package/dist/types/components/kaeso/rights.d.ts +1 -1
  338. package/dist/types/components/kaeso/role-picker.d.ts +1 -0
  339. package/dist/types/components/key-value/key-value.d.ts +2 -2
  340. package/dist/types/components/layout/layout.d.ts +2 -2
  341. package/dist/types/components/link/link.d.ts +4 -4
  342. package/dist/types/components/list/list.d.ts +2 -2
  343. package/dist/types/components/menu/menu.d.ts +2 -1
  344. package/dist/types/components/menu/styles.d.ts +3 -3
  345. package/dist/types/components/meter/meter.d.ts +3 -3
  346. package/dist/types/components/page-header/page-header.d.ts +1 -1
  347. package/dist/types/components/pagination/pagination.d.ts +2 -2
  348. package/dist/types/components/playground/prompt-suggestions.d.ts +1 -0
  349. package/dist/types/components/playground/reasoning-frame.d.ts +14 -0
  350. package/dist/types/components/playground/reasoning.d.ts +1 -0
  351. package/dist/types/components/popover/popover.d.ts +1 -1
  352. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  353. package/dist/types/components/section/section-header.d.ts +6 -0
  354. package/dist/types/components/segmented/segmented.d.ts +1 -0
  355. package/dist/types/components/select/select.d.ts +1 -1
  356. package/dist/types/components/sheet/sheet.d.ts +3 -3
  357. package/dist/types/components/sidebar/sidebar.d.ts +1 -0
  358. package/dist/types/components/slider/slider.d.ts +2 -2
  359. package/dist/types/components/stat/stat.d.ts +1 -1
  360. package/dist/types/components/tabs/tabs.d.ts +6 -4
  361. package/dist/types/components/text/truncated.d.ts +7 -0
  362. package/dist/types/components/timeline/timeline.d.ts +5 -5
  363. package/dist/types/components/toc/toc.d.ts +1 -1
  364. package/dist/types/components/toolbar/toolbar.d.ts +1 -1
  365. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  366. package/dist/types/components/tooltip/trigger-props.d.ts +1 -0
  367. package/dist/types/hooks/use-coarse-pointer.d.ts +1 -0
  368. package/dist/types/hooks/use-hydrating.d.ts +1 -0
  369. package/dist/types/icons/groups.d.ts +1 -1
  370. package/dist/types/icons/vocabulary.d.ts +5 -0
  371. package/dist/types/utils/arrow-focus.d.ts +4 -1
  372. package/dist/types/utils/cn.d.ts +33 -0
  373. package/dist/types/utils/portal-context.d.ts +7 -1
  374. package/dist/utils.js +2 -2
  375. package/foundations/accessibility.md +3 -2
  376. package/foundations/color.md +5 -1
  377. package/foundations/elevation.md +1 -0
  378. package/foundations/motion.md +1 -1
  379. package/foundations/shape.md +2 -2
  380. package/foundations/typography.md +12 -12
  381. package/package.json +2 -2
  382. package/dist/chunks/agent-avatar-0pdBTWkR.js +0 -171
  383. package/dist/chunks/agent-avatar-0pdBTWkR.js.map +0 -1
  384. package/dist/chunks/app-frame-DogGRmsu.js +0 -221
  385. package/dist/chunks/app-frame-DogGRmsu.js.map +0 -1
  386. package/dist/chunks/arrow-focus-BcySmwwU.js +0 -11
  387. package/dist/chunks/arrow-focus-BcySmwwU.js.map +0 -1
  388. package/dist/chunks/avatar-CWbdwbJv.js +0 -83
  389. package/dist/chunks/avatar-CWbdwbJv.js.map +0 -1
  390. package/dist/chunks/badge-C2KtxCLB.js +0 -26
  391. package/dist/chunks/badge-C2KtxCLB.js.map +0 -1
  392. package/dist/chunks/banner-BA2ALw9M.js +0 -85
  393. package/dist/chunks/banner-BA2ALw9M.js.map +0 -1
  394. package/dist/chunks/button-CzuxqawA.js +0 -164
  395. package/dist/chunks/button-CzuxqawA.js.map +0 -1
  396. package/dist/chunks/calendar-BWaf2MXc.js.map +0 -1
  397. package/dist/chunks/checkbox-CQjwCPkc.js +0 -126
  398. package/dist/chunks/checkbox-CQjwCPkc.js.map +0 -1
  399. package/dist/chunks/cn-Dj6sRgkF.js.map +0 -1
  400. package/dist/chunks/code-block-D5A-CGXG.js +0 -330
  401. package/dist/chunks/code-block-D5A-CGXG.js.map +0 -1
  402. package/dist/chunks/code-tqj0uhBL.js.map +0 -1
  403. package/dist/chunks/collapsible-CKrCX_T9.js +0 -87
  404. package/dist/chunks/collapsible-CKrCX_T9.js.map +0 -1
  405. package/dist/chunks/combobox-DjDI7SUC.js +0 -319
  406. package/dist/chunks/combobox-DjDI7SUC.js.map +0 -1
  407. package/dist/chunks/command-list-C2Y7V_lt.js +0 -418
  408. package/dist/chunks/command-list-C2Y7V_lt.js.map +0 -1
  409. package/dist/chunks/copy-button-FJvPJn72.js.map +0 -1
  410. package/dist/chunks/core-BYns5ytV.js +0 -472
  411. package/dist/chunks/core-BYns5ytV.js.map +0 -1
  412. package/dist/chunks/date-popup-CPA_zt6o.js +0 -35
  413. package/dist/chunks/date-popup-CPA_zt6o.js.map +0 -1
  414. package/dist/chunks/de-CPXJh9cq.js.map +0 -1
  415. package/dist/chunks/dialog-Cg9A_6SF.js.map +0 -1
  416. package/dist/chunks/field-TviMvYa2.js.map +0 -1
  417. package/dist/chunks/hidden-description-B2zSmLcn.js +0 -23
  418. package/dist/chunks/hidden-description-B2zSmLcn.js.map +0 -1
  419. package/dist/chunks/icon-DVooQfk4.js +0 -94
  420. package/dist/chunks/icon-button-CrdF_eMG.js.map +0 -1
  421. package/dist/chunks/input-2VJuj_M4.js.map +0 -1
  422. package/dist/chunks/input-group-DQ_4DoXg.js.map +0 -1
  423. package/dist/chunks/iso-field-B2rTwiBo.js +0 -33
  424. package/dist/chunks/iso-field-B2rTwiBo.js.map +0 -1
  425. package/dist/chunks/json-view-Dqd2TDkc.js +0 -175
  426. package/dist/chunks/json-view-Dqd2TDkc.js.map +0 -1
  427. package/dist/chunks/kbd-BF1vKXJf.js.map +0 -1
  428. package/dist/chunks/link-KWI7PevW.js.map +0 -1
  429. package/dist/chunks/list-M1csq-d4.js +0 -494
  430. package/dist/chunks/list-M1csq-d4.js.map +0 -1
  431. package/dist/chunks/markdown-DULktoTK.js +0 -313
  432. package/dist/chunks/markdown-DULktoTK.js.map +0 -1
  433. package/dist/chunks/menu-DEmBfdPm.js +0 -450
  434. package/dist/chunks/menu-DEmBfdPm.js.map +0 -1
  435. package/dist/chunks/meter-Bj4N3Xuh.js +0 -84
  436. package/dist/chunks/meter-Bj4N3Xuh.js.map +0 -1
  437. package/dist/chunks/nav-sheet-CzgIwgAm.js +0 -60
  438. package/dist/chunks/nav-sheet-CzgIwgAm.js.map +0 -1
  439. package/dist/chunks/nav-wordmark-_pjheAsZ.js.map +0 -1
  440. package/dist/chunks/page-header-DL2y2iZp.js +0 -41
  441. package/dist/chunks/page-header-DL2y2iZp.js.map +0 -1
  442. package/dist/chunks/pagination-Cn_qF4cg.js +0 -86
  443. package/dist/chunks/pagination-Cn_qF4cg.js.map +0 -1
  444. package/dist/chunks/picker-popover-BxyU1U9F.js +0 -106
  445. package/dist/chunks/picker-popover-BxyU1U9F.js.map +0 -1
  446. package/dist/chunks/popover-DNN4S47w.js +0 -50
  447. package/dist/chunks/popover-DNN4S47w.js.map +0 -1
  448. package/dist/chunks/portal-context-BBbzDKmY.js.map +0 -1
  449. package/dist/chunks/radio-CDDFpdtL.js.map +0 -1
  450. package/dist/chunks/range-popup-CRyWYUB1.js +0 -128
  451. package/dist/chunks/range-popup-CRyWYUB1.js.map +0 -1
  452. package/dist/chunks/release-art-ZwfFQImt.js +0 -561
  453. package/dist/chunks/release-art-ZwfFQImt.js.map +0 -1
  454. package/dist/chunks/rights-Cyp0Pzp-.js +0 -279
  455. package/dist/chunks/rights-Cyp0Pzp-.js.map +0 -1
  456. package/dist/chunks/scroll-area-D8MD7Vpo.js.map +0 -1
  457. package/dist/chunks/scroll-parent-WXvzQcUo.js +0 -14
  458. package/dist/chunks/scroll-parent-WXvzQcUo.js.map +0 -1
  459. package/dist/chunks/section-Ce1efbsP.js +0 -87
  460. package/dist/chunks/section-Ce1efbsP.js.map +0 -1
  461. package/dist/chunks/segmented-CErcoxwi.js +0 -114
  462. package/dist/chunks/segmented-CErcoxwi.js.map +0 -1
  463. package/dist/chunks/select-x4XVsdCI.js +0 -210
  464. package/dist/chunks/select-x4XVsdCI.js.map +0 -1
  465. package/dist/chunks/separator-D7TzNHmX.js.map +0 -1
  466. package/dist/chunks/sidebar-3r1ZRXlN.js +0 -621
  467. package/dist/chunks/sidebar-3r1ZRXlN.js.map +0 -1
  468. package/dist/chunks/skeleton-Dcz57Zyp.js.map +0 -1
  469. package/dist/chunks/slider-Ci83PGtj.js +0 -57
  470. package/dist/chunks/slider-Ci83PGtj.js.map +0 -1
  471. package/dist/chunks/swap-text-Dr0Irxz6.js.map +0 -1
  472. package/dist/chunks/switch-BNMq_kGt.js +0 -59
  473. package/dist/chunks/switch-BNMq_kGt.js.map +0 -1
  474. package/dist/chunks/table-BeOSKl_3.js +0 -84
  475. package/dist/chunks/table-BeOSKl_3.js.map +0 -1
  476. package/dist/chunks/tag-D_M1s2qS.js +0 -87
  477. package/dist/chunks/tag-D_M1s2qS.js.map +0 -1
  478. package/dist/chunks/text-CIXH8rmT.js.map +0 -1
  479. package/dist/chunks/textarea--4FRL3Pb.js.map +0 -1
  480. package/dist/chunks/timeseries-D1xjRXfk.js +0 -339
  481. package/dist/chunks/timeseries-D1xjRXfk.js.map +0 -1
  482. package/dist/chunks/toolbar-WA_oZgu-.js +0 -37
  483. package/dist/chunks/toolbar-WA_oZgu-.js.map +0 -1
  484. package/dist/chunks/tooltip-OcwO0VUT.js +0 -154
  485. package/dist/chunks/tooltip-OcwO0VUT.js.map +0 -1
  486. package/dist/chunks/tooltip-root-DzahJDVj.js +0 -60
  487. package/dist/chunks/tooltip-root-DzahJDVj.js.map +0 -1
  488. package/dist/chunks/zh-CN-29X4CDLE.js.map +0 -1
  489. package/dist/components/data-table.js.map +0 -1
  490. package/dist/components/label.js.map +0 -1
@@ -0,0 +1,581 @@
1
+ "use client";
2
+ import { t as e } from "./cn-BjnOAUrA.js";
3
+ import { a as t, i as n, o as r } from "./inset-BUzyXLK4.js";
4
+ import { i } from "./context-BELWW79w.js";
5
+ import { formatDate as a, formatDuration as o, formatNumber as s, formatRelative as c, formatTokens as l, formatUSD as u } from "../format.js";
6
+ import { t as ee } from "./icon-CBzOwqrX.js";
7
+ import { r as d } from "./tooltip-Tkm-urbi.js";
8
+ import { t as te } from "./observe-resize-DhxhmoyB.js";
9
+ import { r as ne } from "./text-DkKdTVUf.js";
10
+ import { n as re } from "./button-IblhXUyZ.js";
11
+ import { n as ie } from "./checkbox-9tbimmF3.js";
12
+ import { t as f } from "./menu-Clvv6ftq.js";
13
+ import { r as ae } from "./skeleton-D-qk3mes.js";
14
+ import { r as oe } from "./pagination-D7fAm8qg.js";
15
+ import { t as se } from "./empty-BpiUgGzm.js";
16
+ import { t as p } from "./truncated-d1afmUJT.js";
17
+ import { i as m } from "./status-dot-CP6runiC.js";
18
+ import { t as ce } from "./use-scroll-fade-uc8mWSDX.js";
19
+ import { t as h } from "./avatar-CYNMK7uY.js";
20
+ import { n as le, t as ue } from "./use-coarse-pointer-Ml5oE6oX.js";
21
+ import { t as de } from "./tone-CWpsHPb6.js";
22
+ import { t as fe } from "./use-scroll-margin-atRtf0v_.js";
23
+ import { forwardRef as pe, useLayoutEffect as g, useMemo as me, useRef as _, useState as v } from "react";
24
+ import { Fragment as he, jsx as y, jsxs as b } from "react/jsx-runtime";
25
+ import { ArrowDown01Icon as ge, ArrowUp01Icon as _e } from "@hugeicons/core-free-icons";
26
+ import { useVirtualizer as ve } from "@tanstack/react-virtual";
27
+ import { flexRender as ye, getCoreRowModel as be, getSortedRowModel as xe, useReactTable as Se } from "@tanstack/react-table";
28
+ //#region src/components/data-table/time-columns.ts
29
+ var x = /* @__PURE__ */ new WeakSet(), S = { density: {
30
+ compact: { classes: "h-36 coarse:h-44" },
31
+ default: { classes: "h-40 coarse:h-44" },
32
+ comfortable: { classes: "h-48" }
33
+ } }, Ce = { density: "default" }, we = {
34
+ compact: 36,
35
+ default: 40,
36
+ comfortable: 48
37
+ }, Te = 136;
38
+ function Ee(e, t, n = 48) {
39
+ if (!t) return {
40
+ hidden: [],
41
+ tight: !1,
42
+ overflow: !1
43
+ };
44
+ let r = [...e].sort((e, t) => e.priority - t.priority), i = n, a = /* @__PURE__ */ new Set();
45
+ for (let e of r) i += e.size, (i <= t || e.priority <= 1 || e.fixed) && a.add(e.id);
46
+ let o = e.filter((e) => a.has(e.id)), s = o.reduce((e, t) => e + t.size, n), c = o.reduce((e, t) => e + (t.grow ? Ne(t) : t.size), 0);
47
+ if (c > t && o.some((e) => e.grow)) {
48
+ let e = o[o.length - 1];
49
+ for (let n of [...o].reverse()) {
50
+ if (c <= t) break;
51
+ n.grow || n.fixed || n === e || (a.delete(n.id), c -= n.size);
52
+ }
53
+ }
54
+ return {
55
+ hidden: e.filter((e) => !a.has(e.id)).map((e) => e.id),
56
+ tight: s > t,
57
+ overflow: c > t
58
+ };
59
+ }
60
+ function De(e) {
61
+ let t = getComputedStyle(e);
62
+ return e.getBoundingClientRect().width - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0);
63
+ }
64
+ function Oe(e) {
65
+ let t = e.filter((e) => e.id && e.meta?.text && e.meta.align !== "end");
66
+ return t.find((e) => !x.has(e)) ?? t[0] ?? e[0];
67
+ }
68
+ function ke(e, t) {
69
+ if (!e?.id) return;
70
+ let n = e.meta?.text?.(t.original);
71
+ if (n) return n;
72
+ let r = t.getValue(e.id);
73
+ return typeof r == "string" && r ? r : void 0;
74
+ }
75
+ var C = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", Ae = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
76
+ function je(e) {
77
+ return [...e.querySelectorAll(C)].filter((e) => !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
78
+ }
79
+ function w(e) {
80
+ return e ? [...e.querySelectorAll("[role=columnheader]")].flatMap((e) => {
81
+ let t = e.querySelector("[role=checkbox], button") ?? e.querySelector("[role=separator]");
82
+ return t ? [t] : [];
83
+ }) : [];
84
+ }
85
+ function Me(t, n) {
86
+ return n ? e("controls-on-fill", t ? "bg-raised-pressed hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 hover:bg-fill-3 active:bg-fill-3") : t ? "hover:bg-raised-hover active:bg-raised-pressed hover:controls-on-fill" : "hover:bg-fill-1 active:bg-fill-2 hover:controls-on-fill";
87
+ }
88
+ var Ne = (e) => Math.min(e.size, e.minWidth ?? 136);
89
+ function T({ data: a, columns: o, getRowId: s, density: c = "default", onRowClick: l, rowMenu: u, selectable: d, canSelectRow: m, selection: h, onSelectionChange: pe, sorting: x, onSortingChange: Ce, manualSorting: Te, loading: T, error: E, onRetry: D, empty: O, hasMore: k, loadingMore: Pe, onLoadMore: Fe, stickyFirstColumn: Ie, virtualizeAbove: Le = 100, className: Re, activeRowId: ze, freshRowIds: Be, onHiddenColumnsChange: Ve, "aria-label": He, "data-force-row": Ue }, A) {
90
+ let j = t(), We = r(), Ge = n(), M = i(), [Ke, qe] = v([]), [Je, Ye] = v({}), [Xe, Ze] = v(0), [Qe, N] = v("body"), [$e, et] = v(0), P = _(null), tt = x ?? Ke, F = h ?? Je, nt = me(() => d ? [{
91
+ id: "__select",
92
+ size: 44,
93
+ enableSorting: !1,
94
+ enableResizing: !1,
95
+ meta: { priority: 1 },
96
+ header: ({ table: e }) => /* @__PURE__ */ y(ie, {
97
+ "aria-label": M("dataTable.selectAllRows", "Select all rows"),
98
+ checked: e.getIsAllRowsSelected(),
99
+ indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
100
+ onCheckedChange: (t) => e.toggleAllRowsSelected(t)
101
+ }),
102
+ cell: ({ row: e }) => {
103
+ let t = ke(Oe(o), e);
104
+ return /* @__PURE__ */ y(ie, {
105
+ "aria-label": t ? M("dataTable.selectNamed", "Select {name}", { name: t }) : M("dataTable.selectRow", "Select row"),
106
+ checked: e.getIsSelected(),
107
+ disabled: !e.getCanSelect(),
108
+ onCheckedChange: (t) => e.toggleSelected(t)
109
+ });
110
+ }
111
+ }, ...o] : o, [
112
+ o,
113
+ d,
114
+ M
115
+ ]), I = Se({
116
+ data: a,
117
+ columns: nt,
118
+ state: {
119
+ sorting: tt,
120
+ rowSelection: F
121
+ },
122
+ onSortingChange: (e) => {
123
+ let t = typeof e == "function" ? e(tt) : e;
124
+ P.current = null, x || qe(t), Ce?.(t);
125
+ },
126
+ onRowSelectionChange: (e) => {
127
+ let t = typeof e == "function" ? e(F) : e;
128
+ h || Ye(t), pe?.(t);
129
+ },
130
+ getCoreRowModel: be(),
131
+ getSortedRowModel: xe(),
132
+ manualSorting: !!Te,
133
+ enableRowSelection: d ? m ? (e) => m(e.original) : !0 : !1,
134
+ columnResizeMode: "onChange",
135
+ ...s ? { getRowId: (e) => s(e) } : {},
136
+ defaultColumn: {
137
+ size: 140,
138
+ minSize: 64,
139
+ maxSize: 640
140
+ }
141
+ }), L = _(null), R = _(null), z = _(null), rt = I.getVisibleLeafColumns(), it = rt.map((e) => ({
142
+ id: e.id,
143
+ size: e.getSize(),
144
+ priority: e.columnDef.meta?.priority ?? 2,
145
+ grow: !!e.columnDef.meta?.grow,
146
+ minWidth: e.columnDef.meta?.minWidth,
147
+ fixed: e.id === "__select"
148
+ })), at = JSON.stringify(it), ot = (e) => {
149
+ let t = Ee(it, e, j ? 48 : 0);
150
+ return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
151
+ }, B = _(ot);
152
+ B.current = ot;
153
+ let [st, ct] = v("|");
154
+ g(() => {
155
+ let e = L.current;
156
+ if (e) return te([e], ([e]) => ct(B.current(Math.round(e?.contentRect.width ?? 0))));
157
+ }, []), g(() => {
158
+ L.current && ct(B.current(Math.round(De(L.current))));
159
+ }, [at]);
160
+ let [lt = "", ut = ""] = st.split("|"), dt = lt.includes("!"), ft = lt.includes(">"), V = me(() => new Set(ut.split(" ").filter(Boolean)), [ut]), pt = _(Ve);
161
+ pt.current = Ve, g(() => {
162
+ pt.current?.([...V]);
163
+ }, [V]);
164
+ let H = rt.filter((e) => !V.has(e.id)), mt = (e) => e.columnDef.meta?.grow && dt ? Ne({
165
+ size: e.getSize(),
166
+ minWidth: e.columnDef.meta.minWidth
167
+ }) : e.getSize(), U = {
168
+ gridTemplateColumns: H.map((e) => e.columnDef.meta?.grow ? `minmax(${mt(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
169
+ minWidth: H.reduce((e, t) => e + mt(t), 0)
170
+ }, ht = ft && H.length > 1 && !H[H.length - 1]?.columnDef.meta?.grow, W = I.getRowModel().rows, G = W.length > Le, gt = Math.max(we[c], ue() ? 44 : 0), K = () => le(L.current), _t = fe(z, K, W.length, G), q = ve({
171
+ count: W.length,
172
+ getScrollElement: K,
173
+ estimateSize: () => gt,
174
+ overscan: 16,
175
+ enabled: G,
176
+ scrollMargin: _t
177
+ }), J = (t) => e("flex min-w-0 items-center px-12", j && t === 0 && "pl-20", j && t === H.length - 1 && "pr-20"), Y = j || We, X = (t, n = !1, r = !1) => (Ie && t === 0 || ht && t === H.length - 1) && e("sticky z-10", n ? Y ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : Y ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !j && !n && (t === 0 ? "rounded-l-item" : "rounded-r-item")), Z = !!l || !!d, vt = Z && W.length > 0 && Qe === "body", yt = Math.min(Xe, Math.max(W.length - 1, 0)), bt = (e) => {
178
+ let t = Math.max(0, Math.min(W.length - 1, e));
179
+ N("body"), Ze(t), G && q.scrollToIndex(t, { align: "auto" });
180
+ let n = () => z.current?.querySelector(`[data-row-index="${t}"]`), r = n();
181
+ r ? r.focus() : requestAnimationFrame(() => n()?.focus());
182
+ }, xt = (e) => {
183
+ let t = w(R.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
184
+ return n ? (N("head"), et(t.indexOf(n)), n.focus(), !0) : !1;
185
+ }, Q = _(() => {});
186
+ Q.current = () => {
187
+ let e = w(R.current), t = Math.min($e, e.length - 1);
188
+ for (let n of R.current?.querySelectorAll(C) ?? []) {
189
+ let r = e.indexOf(n) === t && !vt ? "0" : "-1";
190
+ n.getAttribute("tabindex") !== r && n.setAttribute("tabindex", r);
191
+ }
192
+ }, g(() => Q.current()), g(() => {
193
+ let e = R.current;
194
+ if (!e) return;
195
+ let t = new MutationObserver(() => Q.current());
196
+ return t.observe(e, {
197
+ subtree: !0,
198
+ childList: !0,
199
+ attributes: !0,
200
+ attributeFilter: ["tabindex"]
201
+ }), () => t.disconnect();
202
+ }, []), g(() => {
203
+ let e = z.current;
204
+ if (!e || !Z) return;
205
+ let t = () => {
206
+ for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(C)) e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1");
207
+ };
208
+ t();
209
+ let n = new MutationObserver(t);
210
+ return n.observe(e, {
211
+ subtree: !0,
212
+ childList: !0,
213
+ attributes: !0,
214
+ attributeFilter: ["tabindex"]
215
+ }), () => n.disconnect();
216
+ }, [Z]), ce(z, "[role=row]");
217
+ let $ = (e, t) => {
218
+ let n = e ? I.getColumn(e) : void 0;
219
+ if (!n?.getCanResize()) return !1;
220
+ let r = n.columnDef.minSize ?? 64, i = n.columnDef.maxSize ?? 640;
221
+ return I.setColumnSizing((e) => ({
222
+ ...e,
223
+ [n.id]: Math.max(r, Math.min(i, n.getSize() + t))
224
+ })), !0;
225
+ }, St = (e) => {
226
+ if (e.altKey || e.metaKey || e.ctrlKey) return;
227
+ let t = w(R.current), n = t.indexOf(e.target);
228
+ if (n < 0) return;
229
+ let r = {
230
+ ArrowLeft: -16,
231
+ ArrowRight: 16
232
+ }[e.key];
233
+ if (e.shiftKey) {
234
+ r !== void 0 && $(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
235
+ return;
236
+ }
237
+ let i = {
238
+ ArrowLeft: n - 1,
239
+ ArrowRight: n + 1,
240
+ Home: 0,
241
+ End: t.length - 1
242
+ }[e.key];
243
+ i === void 0 ? e.key === "ArrowDown" && Z && W.length && (e.preventDefault(), bt(yt)) : (e.preventDefault(), i >= 0 && i < t.length && xt(i));
244
+ }, Ct = () => Math.max(1, Math.floor((K()?.clientHeight ?? 400) / gt) - 1), wt = (e, t) => {
245
+ let n = P.current ? W.findIndex((e) => e.id === P.current?.id) : -1;
246
+ n < 0 && (P.current = {
247
+ id: W[e].id,
248
+ base: F
249
+ });
250
+ let r = n < 0 ? e : n, i = { ...P.current?.base };
251
+ for (let e of W.slice(Math.min(r, t), Math.max(r, t) + 1)) e.getCanSelect() && (i[e.id] = !0);
252
+ I.setRowSelection(i);
253
+ }, Tt = (e, t, n) => {
254
+ let r = e.currentTarget, i = e.target;
255
+ if (i !== r) {
256
+ if (e.altKey || e.metaKey || e.ctrlKey || i.closest(Ae)) return;
257
+ let t = je(r), n = t.indexOf(i);
258
+ if (n < 0) return;
259
+ if (e.key === "Escape" && !i.closest("[data-popup-open], [aria-expanded=true]")) e.preventDefault(), r.focus();
260
+ else if (e.defaultPrevented) return;
261
+ else e.key === "ArrowRight" && t[n + 1] ? (e.preventDefault(), t[n + 1]?.focus()) : e.key === "ArrowLeft" && (e.preventDefault(), (t[n - 1] ?? r).focus());
262
+ return;
263
+ }
264
+ if (e.altKey) return;
265
+ if (e.metaKey || e.ctrlKey) {
266
+ e.key.toLowerCase() === "a" && d && !e.shiftKey && (e.preventDefault(), P.current = null, I.toggleAllRowsSelected(!0));
267
+ return;
268
+ }
269
+ let a = {
270
+ ArrowDown: n + 1,
271
+ ArrowUp: n - 1,
272
+ Home: 0,
273
+ End: W.length - 1,
274
+ PageDown: n + Ct(),
275
+ PageUp: n - Ct()
276
+ }[e.key];
277
+ if (a !== void 0) {
278
+ if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && xt($e)) return;
279
+ let t = Math.max(0, Math.min(W.length - 1, a));
280
+ e.shiftKey && d ? wt(n, t) : P.current = null, bt(t);
281
+ } else if (e.shiftKey) return;
282
+ else if (e.key === "ArrowRight") {
283
+ let t = je(r)[0];
284
+ if (!t) return;
285
+ e.preventDefault(), t.focus();
286
+ } else e.key === "Enter" ? (e.preventDefault(), l?.(t.original)) : (e.key === " " || e.key === "x") && d ? (e.preventDefault(), P.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && d && Object.keys(F).length && (e.preventDefault(), P.current = null, I.toggleAllRowsSelected(!1));
287
+ }, Et = (t, n, r) => {
288
+ let i = t.getVisibleCells().filter((e) => !V.has(e.column.id)), a = t.id === ze, o = a || !!d && t.getIsSelected(), s = /* @__PURE__ */ y("div", {
289
+ role: "row",
290
+ "aria-rowindex": n + 2,
291
+ "aria-selected": d ? t.getIsSelected() : void 0,
292
+ "aria-current": a || void 0,
293
+ "data-active": a || void 0,
294
+ "data-fresh": Be?.has(t.id) || void 0,
295
+ "data-row-index": n,
296
+ ...Ue && n === 0 ? { "data-force": Ue } : {},
297
+ tabIndex: Z ? vt && n === yt ? 0 : -1 : void 0,
298
+ onFocus: (e) => {
299
+ e.target === e.currentTarget && (N("body"), n !== Xe && Ze(n));
300
+ },
301
+ onClick: (e) => {
302
+ P.current = null, !e.target.closest("button, a, [role=checkbox]") && l?.(t.original);
303
+ },
304
+ onKeyDown: (e) => Tt(e, t, n),
305
+ style: {
306
+ ...U,
307
+ ...r
308
+ },
309
+ className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !j && "rounded-item", S.density[c].classes, l && "cursor-pointer", Me(Y, o), "data-fresh:animate-row-fresh", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
310
+ children: i.map((n, r) => {
311
+ let i = n.column.columnDef.meta, a = ye(n.column.columnDef.cell, n.getContext()), s = n.getValue(), c = i?.text ? i.text(t.original) : typeof s == "string" ? s : void 0, l = i?.tone?.(t.original);
312
+ return /* @__PURE__ */ y("div", {
313
+ role: "cell",
314
+ className: e(J(r), i?.align === "end" && "justify-end text-right tabular", i?.mono && "mono text-small", l && de[l], X(r, !1, o)),
315
+ children: c !== void 0 && typeof a != "object" ? /* @__PURE__ */ y(ne, {
316
+ truncate: !0,
317
+ tone: l ?? "default",
318
+ className: e("min-w-0", i?.mono && "text-small"),
319
+ mono: !!i?.mono,
320
+ children: c
321
+ }) : n.column.id === "__select" ? /* @__PURE__ */ y("span", {
322
+ className: "flex",
323
+ children: a
324
+ }) : /* @__PURE__ */ y(p, {
325
+ className: e("min-w-0 cell-fit", i?.grow && "flex-1"),
326
+ children: a
327
+ })
328
+ }, n.id);
329
+ })
330
+ });
331
+ return u ? /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ y(f.Trigger, { children: s }), /* @__PURE__ */ y(f.Content, { children: u(t.original) })] }, t.id) : /* @__PURE__ */ y("div", { children: s }, t.id);
332
+ }, Dt = (t, n) => {
333
+ let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), o = t.column.getIsSorted(), s = ye(t.column.columnDef.header, t.getContext()), c = /* @__PURE__ */ b(he, { children: [i ? /* @__PURE__ */ b("button", {
334
+ type: "button",
335
+ onClick: t.column.getToggleSortingHandler(),
336
+ className: e("relative -mx-6 inline-flex h-28 min-w-0 cursor-pointer items-center gap-4 rounded-pill px-6 text-caption font-medium transition-control focus-ring tap-target", Y ? "hover:bg-raised-hover active:bg-raised-pressed" : "hover:bg-fill-1 active:bg-fill-2", "hover:text-fg", o ? "text-fg" : "text-fg-secondary", r?.align === "end" && "flex-row-reverse"),
337
+ children: [/* @__PURE__ */ y(p, { children: s }), /* @__PURE__ */ y(ee, {
338
+ icon: o === "desc" ? ge : _e,
339
+ size: "xs",
340
+ className: e("shrink-0 transition-control", o ? "opacity-100" : "opacity-0 group-hover/th:opacity-60")
341
+ })]
342
+ }) : /* @__PURE__ */ y(p, {
343
+ className: "text-caption font-medium text-fg-secondary",
344
+ children: s
345
+ }), a && /* @__PURE__ */ y("div", {
346
+ role: "separator",
347
+ "aria-orientation": "vertical",
348
+ "aria-label": M("dataTable.resizeColumn", "Resize column"),
349
+ "aria-valuenow": t.column.getSize(),
350
+ "aria-valuemin": t.column.columnDef.minSize ?? 64,
351
+ "aria-valuemax": t.column.columnDef.maxSize ?? 640,
352
+ tabIndex: -1,
353
+ onMouseDown: t.getResizeHandler(),
354
+ onTouchStart: t.getResizeHandler(),
355
+ onDoubleClick: () => t.column.resetSize(),
356
+ className: "absolute inset-y-0 -right-8 z-10 w-16 cursor-col-resize after:absolute after:inset-y-8 after:right-8 after:w-1 after:bg-transparent after:transition-control group-hover/th:after:bg-line-strong coarse:after:bg-line focus-ring-inset"
357
+ })] });
358
+ return /* @__PURE__ */ y("div", {
359
+ role: "columnheader",
360
+ "data-col": t.column.id,
361
+ "aria-sort": o === "asc" ? "ascending" : o === "desc" ? "descending" : i ? "none" : void 0,
362
+ className: e("group/th relative", J(n), r?.align === "end" && "justify-end", X(n, !0), X(n, !0) && "hairline-b-strong"),
363
+ children: a ? /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ y(f.Trigger, {
364
+ className: e("flex min-w-0 flex-1 items-center self-stretch", r?.align === "end" && "justify-end"),
365
+ children: c
366
+ }), /* @__PURE__ */ b(f.Content, { children: [
367
+ /* @__PURE__ */ y(f.Item, {
368
+ onClick: () => $(t.column.id, 32),
369
+ children: M("dataTable.widenColumn", "Widen column")
370
+ }),
371
+ /* @__PURE__ */ y(f.Item, {
372
+ onClick: () => $(t.column.id, -32),
373
+ children: M("dataTable.narrowColumn", "Narrow column")
374
+ }),
375
+ /* @__PURE__ */ y(f.Item, {
376
+ onClick: () => t.column.resetSize(),
377
+ children: M("dataTable.resetWidth", "Reset width")
378
+ })
379
+ ] })] }) : c
380
+ }, t.id);
381
+ };
382
+ return /* @__PURE__ */ b("div", {
383
+ ref: (e) => {
384
+ L.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
385
+ },
386
+ className: e("relative w-full min-w-0", !j && !Ge && "px-24", Re),
387
+ children: [/* @__PURE__ */ b("div", {
388
+ role: "table",
389
+ "aria-label": He,
390
+ "aria-rowcount": W.length + 1,
391
+ "aria-busy": T || void 0,
392
+ className: e("w-full overflow-clip", j && "rounded-group bg-raised shadow-xs"),
393
+ children: [/* @__PURE__ */ y("div", {
394
+ ref: R,
395
+ role: "rowgroup",
396
+ className: e("sticky top-0 z-20 overflow-hidden", Y ? "bg-raised" : "bg-panel"),
397
+ onKeyDown: St,
398
+ onFocus: (e) => {
399
+ let t = w(R.current).indexOf(e.target);
400
+ t < 0 || (P.current = null, N("head"), et(t));
401
+ },
402
+ onScroll: (e) => {
403
+ z.current && z.current.scrollLeft !== e.currentTarget.scrollLeft && (z.current.scrollLeft = e.currentTarget.scrollLeft);
404
+ },
405
+ children: I.getHeaderGroups().map((e) => /* @__PURE__ */ y("div", {
406
+ role: "row",
407
+ "aria-rowindex": 1,
408
+ className: "grid h-36 hairline-b-strong",
409
+ style: U,
410
+ children: e.headers.filter((e) => !V.has(e.column.id)).map(Dt)
411
+ }, e.id))
412
+ }), /* @__PURE__ */ y("div", {
413
+ ref: z,
414
+ role: "rowgroup",
415
+ className: "overflow-x-auto scrollbar-quiet scroll-fade-x",
416
+ onScroll: (e) => {
417
+ R.current && R.current.scrollLeft !== e.currentTarget.scrollLeft && (R.current.scrollLeft = e.currentTarget.scrollLeft);
418
+ },
419
+ children: E ? /* @__PURE__ */ y("div", {
420
+ role: "row",
421
+ children: /* @__PURE__ */ y("div", {
422
+ role: "cell",
423
+ "aria-colspan": H.length,
424
+ className: "block",
425
+ children: /* @__PURE__ */ y("div", {
426
+ role: "alert",
427
+ children: /* @__PURE__ */ y(se, {
428
+ size: "compact",
429
+ title: M("dataTable.loadFailed", "Couldn't load these rows"),
430
+ ...D ? {} : { description: M("dataTable.reloadToRetry", "Reload the page to try again.") },
431
+ actions: D && /* @__PURE__ */ y(re, {
432
+ size: "sm",
433
+ onClick: D,
434
+ children: M("dataTable.tryAgain", "Try again")
435
+ })
436
+ })
437
+ })
438
+ })
439
+ }) : T && W.length === 0 ? Array.from({ length: 8 }, (t, n) => /* @__PURE__ */ y("div", {
440
+ role: "row",
441
+ className: e("grid", S.density[c].classes),
442
+ style: U,
443
+ children: H.map((t, r) => /* @__PURE__ */ y("div", {
444
+ role: "cell",
445
+ className: e(J(r), t.columnDef.meta?.align === "end" && "justify-end"),
446
+ children: /* @__PURE__ */ y(ae, {
447
+ shape: "line",
448
+ style: { width: `${40 + (n * 7 + r * 13) % 45}%` }
449
+ })
450
+ }, t.id))
451
+ }, n)) : W.length === 0 ? /* @__PURE__ */ y("div", {
452
+ role: "row",
453
+ children: /* @__PURE__ */ y("div", {
454
+ role: "cell",
455
+ "aria-colspan": H.length,
456
+ className: "block",
457
+ children: O ?? /* @__PURE__ */ y(se, {
458
+ size: "compact",
459
+ title: M("dataTable.noRows", "No rows")
460
+ })
461
+ })
462
+ }) : G ? /* @__PURE__ */ y("div", {
463
+ className: "relative",
464
+ style: { height: q.getTotalSize() },
465
+ children: q.getVirtualItems().map((e) => Et(W[e.index], e.index, {
466
+ position: "absolute",
467
+ top: 0,
468
+ left: 0,
469
+ transform: `translateY(${Math.round(e.start - _t)}px)`
470
+ }))
471
+ }) : W.map((e, t) => Et(e, t))
472
+ })]
473
+ }), /* @__PURE__ */ y(oe, {
474
+ variant: "load-more",
475
+ hasMore: !!k,
476
+ loading: Pe,
477
+ onLoadMore: Fe
478
+ })]
479
+ });
480
+ }
481
+ var E = /* @__PURE__ */ pe(T);
482
+ process.env.NODE_ENV !== "production" && (E.displayName = "DataTable");
483
+ var D = E;
484
+ //#endregion
485
+ //#region src/components/data-table/columns.tsx
486
+ function O(e) {
487
+ return x.add(e), e;
488
+ }
489
+ function k(e, t, n, r = {}, i) {
490
+ return {
491
+ id: e.id,
492
+ header: () => e.header,
493
+ accessorFn: t,
494
+ cell: (e) => n(e.getValue(), e.row.original),
495
+ ...e.size ? { size: e.size } : {},
496
+ ...i ? { sortingFn: i } : {},
497
+ meta: {
498
+ ...e.priority === void 0 ? {} : { priority: e.priority },
499
+ ...e.grow ? { grow: !0 } : {},
500
+ ...e.minWidth === void 0 ? {} : { minWidth: e.minWidth },
501
+ ...e.tone ? { tone: e.tone } : {},
502
+ ...r
503
+ }
504
+ };
505
+ }
506
+ function Pe({ value: e }) {
507
+ let t = i()("dataTable.tokenCount", "{count} tokens", { count: s(e) });
508
+ return /* @__PURE__ */ y(d, {
509
+ content: t,
510
+ children: /* @__PURE__ */ b("span", { children: [/* @__PURE__ */ y("span", {
511
+ "aria-hidden": !0,
512
+ children: l(e)
513
+ }), /* @__PURE__ */ y("span", {
514
+ className: "sr-only",
515
+ children: t
516
+ })] })
517
+ });
518
+ }
519
+ function Fe({ value: e, now: t }) {
520
+ let n = a(e, {
521
+ time: !0,
522
+ seconds: !0
523
+ });
524
+ return /* @__PURE__ */ y(d, {
525
+ content: `${n} · ${a(e, {
526
+ time: !0,
527
+ utc: !0
528
+ })}`,
529
+ shape: "multiline",
530
+ children: /* @__PURE__ */ b("span", {
531
+ className: "text-fg-secondary",
532
+ children: [/* @__PURE__ */ y("time", {
533
+ dateTime: new Date(e).toISOString(),
534
+ children: c(e, t)
535
+ }), /* @__PURE__ */ b("span", {
536
+ className: "sr-only",
537
+ children: [" ", n]
538
+ })]
539
+ })
540
+ });
541
+ }
542
+ var Ie = {
543
+ text: (e, t) => k(e, t, (e) => e, { text: (e) => t(e) }),
544
+ mono: (e, t) => k(e, t, (e) => e, {
545
+ mono: !0,
546
+ text: (e) => t(e)
547
+ }),
548
+ number: (e, t) => k(e, t, (e) => s(e), { align: "end" }),
549
+ money: (e, t, n = {}) => k(e, t, (e) => u(e, n.decimals === void 0 ? {} : { decimals: n.decimals }), {
550
+ align: "end",
551
+ mono: !1
552
+ }, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
553
+ tokens: (e, t) => k(e, t, (e) => /* @__PURE__ */ y(Pe, { value: e }), { align: "end" }),
554
+ duration: (e, t) => k(e, t, (e) => o(e), { align: "end" }),
555
+ date: (e, t) => O(k(e, t, (e) => /* @__PURE__ */ y("time", {
556
+ dateTime: new Date(e).toISOString(),
557
+ children: a(e, { time: !0 })
558
+ }), { text: (e) => a(t(e), { time: !0 }) }, "datetime")),
559
+ relative: (e, t, n = {}) => O(k(e, t, (e) => /* @__PURE__ */ y(Fe, {
560
+ value: e,
561
+ now: n.now ?? Date.now()
562
+ }), { text: (e) => a(t(e), { time: !0 }) }, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime())),
563
+ status: (e, t) => k(e, t, (e) => /* @__PURE__ */ y(m, {
564
+ tone: e.tone,
565
+ children: e.label
566
+ }), { text: void 0 }),
567
+ avatar: (e, t) => k(e, t, (e) => /* @__PURE__ */ b("span", {
568
+ className: "inline-flex min-w-0 items-center gap-8",
569
+ children: [/* @__PURE__ */ y(h, {
570
+ name: e.name,
571
+ ...e.src ? { src: e.src } : {},
572
+ size: 24,
573
+ decorative: !0
574
+ }), /* @__PURE__ */ y(p, { children: e.name })]
575
+ }), { text: (e) => t(e).name }),
576
+ custom: (e, t, n, r = {}) => k(e, t, n, r)
577
+ };
578
+ //#endregion
579
+ export { S as a, Ce as i, Te as n, Ee as o, D as r, Ie as t };
580
+
581
+ //# sourceMappingURL=data-table-CqY8_6IS.js.map