@logicplanes/kaeso-ui 0.4.4 → 0.4.6

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