@aithe/aithe-ui 26.2.3 → 26.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (620) hide show
  1. package/README.md +19 -11
  2. package/dist/apps/admin/app.js +12 -0
  3. package/dist/apps/admin/components/admin-app.js +83 -0
  4. package/dist/apps/admin/components/admin-layout.d.ts +0 -1
  5. package/dist/apps/admin/components/admin-layout.d.ts.map +1 -1
  6. package/dist/apps/admin/components/admin-layout.js +250 -0
  7. package/dist/apps/admin/datahub/auth.js +24 -0
  8. package/dist/apps/admin/datahub/dashboard.js +16 -0
  9. package/dist/apps/admin/datahub/index.js +42 -0
  10. package/dist/apps/admin/datahub/menu.js +16 -0
  11. package/dist/apps/admin/datahub/mock/auth.js +11 -0
  12. package/dist/apps/admin/datahub/mock/dashboard.js +10 -0
  13. package/dist/apps/admin/datahub/mock/menu.js +42 -0
  14. package/dist/apps/admin/i18n/de-DE.js +37 -0
  15. package/dist/apps/admin/i18n/en-US.js +37 -0
  16. package/dist/apps/admin/i18n/es-ES.js +38 -0
  17. package/dist/apps/admin/i18n/fr-FR.js +37 -0
  18. package/dist/apps/admin/i18n/index.js +27 -0
  19. package/dist/apps/admin/i18n/ja-JP.js +38 -0
  20. package/dist/apps/admin/i18n/ko-KR.js +37 -0
  21. package/dist/apps/admin/i18n/pt-BR.js +37 -0
  22. package/dist/apps/admin/i18n/zh-CN.js +37 -0
  23. package/dist/apps/admin/i18n/zh-HK.js +37 -0
  24. package/dist/apps/admin/i18n/zh-TW.js +37 -0
  25. package/dist/apps/admin/pages/dashboard-page.d.ts +1 -0
  26. package/dist/apps/admin/pages/dashboard-page.d.ts.map +1 -1
  27. package/dist/apps/admin/pages/dashboard-page.js +199 -0
  28. package/dist/apps/admin/pages/login-page.js +278 -0
  29. package/dist/apps/admin/pages/not-found-page.js +57 -0
  30. package/dist/apps/admin/pages/role-page.js +76 -0
  31. package/dist/apps/admin/pages/settings-page.js +95 -0
  32. package/dist/apps/admin/pages/user-page.js +76 -0
  33. package/dist/apps/admin/router/index.js +43 -0
  34. package/dist/apps/admin/standalone.js +1 -0
  35. package/dist/apps/admin/store/auth.js +42 -0
  36. package/dist/apps/api/app.js +82 -0
  37. package/dist/apps/api/demo-data.d.ts.map +1 -1
  38. package/dist/apps/api/demo-data.js +965 -0
  39. package/dist/apps/api/docs-viewer.js +684 -0
  40. package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
  41. package/dist/apps/api/i18n/de-DE.js +131 -0
  42. package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
  43. package/dist/apps/api/i18n/en-US.js +141 -0
  44. package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
  45. package/dist/apps/api/i18n/es-ES.js +131 -0
  46. package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
  47. package/dist/apps/api/i18n/fr-FR.js +131 -0
  48. package/dist/apps/api/i18n/index.js +27 -0
  49. package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
  50. package/dist/apps/api/i18n/ja-JP.js +131 -0
  51. package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
  52. package/dist/apps/api/i18n/ko-KR.js +131 -0
  53. package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
  54. package/dist/apps/api/i18n/pt-BR.js +131 -0
  55. package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
  56. package/dist/apps/api/i18n/zh-CN.js +141 -0
  57. package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
  58. package/dist/apps/api/i18n/zh-HK.js +131 -0
  59. package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
  60. package/dist/apps/api/i18n/zh-TW.js +131 -0
  61. package/dist/apps/api/pages/docs.d.ts.map +1 -1
  62. package/dist/apps/api/pages/docs.js +369 -0
  63. package/dist/apps/api/standalone.js +1 -0
  64. package/dist/apps/demo/app.d.ts.map +1 -1
  65. package/dist/apps/demo/app.js +275 -0
  66. package/dist/apps/demo/editor.d.ts.map +1 -1
  67. package/dist/apps/demo/editor.js +270 -0
  68. package/dist/apps/demo/helpers.js +7 -0
  69. package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
  70. package/dist/apps/demo/i18n/de-DE.js +289 -0
  71. package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
  72. package/dist/apps/demo/i18n/en-US.js +301 -0
  73. package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
  74. package/dist/apps/demo/i18n/es-ES.js +289 -0
  75. package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
  76. package/dist/apps/demo/i18n/fr-FR.js +289 -0
  77. package/dist/apps/demo/i18n/index.js +27 -0
  78. package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
  79. package/dist/apps/demo/i18n/ja-JP.js +289 -0
  80. package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
  81. package/dist/apps/demo/i18n/ko-KR.js +289 -0
  82. package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
  83. package/dist/apps/demo/i18n/pt-BR.js +289 -0
  84. package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
  85. package/dist/apps/demo/i18n/zh-CN.js +301 -0
  86. package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
  87. package/dist/apps/demo/i18n/zh-HK.js +289 -0
  88. package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
  89. package/dist/apps/demo/i18n/zh-TW.js +289 -0
  90. package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
  91. package/dist/apps/demo/pages/autoform.js +422 -0
  92. package/dist/apps/demo/pages/autoview.d.ts +3 -0
  93. package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
  94. package/dist/apps/demo/pages/autoview.js +310 -0
  95. package/dist/apps/demo/pages/basic.js +157 -0
  96. package/dist/apps/demo/pages/code.js +1088 -0
  97. package/dist/apps/demo/pages/container.js +42 -0
  98. package/dist/apps/demo/pages/dashboard.js +159 -0
  99. package/dist/apps/demo/pages/data.d.ts.map +1 -1
  100. package/dist/apps/demo/pages/data.js +327 -0
  101. package/dist/apps/demo/pages/display.d.ts.map +1 -1
  102. package/dist/apps/demo/pages/display.js +295 -0
  103. package/dist/apps/demo/pages/feedback.js +94 -0
  104. package/dist/apps/demo/pages/form.d.ts.map +1 -1
  105. package/dist/apps/demo/pages/form.js +119 -0
  106. package/dist/apps/demo/pages/layout.js +74 -0
  107. package/dist/apps/demo/pages/navigation.js +54 -0
  108. package/dist/apps/demo/pages/progress.js +42 -0
  109. package/dist/apps/demo/pages/theme.js +126 -0
  110. package/dist/apps/demo/standalone.js +1 -0
  111. package/dist/components/basic/AGENTS.md +1 -0
  112. package/dist/components/basic/avatar.js +168 -0
  113. package/dist/components/basic/badge.js +157 -0
  114. package/dist/components/basic/button-group.js +70 -0
  115. package/dist/components/basic/button.d.ts +2 -4
  116. package/dist/components/basic/button.d.ts.map +1 -1
  117. package/dist/components/basic/button.js +315 -0
  118. package/dist/components/basic/card.js +186 -0
  119. package/dist/components/basic/chip.js +103 -0
  120. package/dist/components/basic/divider.js +127 -0
  121. package/dist/components/basic/empty.js +72 -0
  122. package/dist/components/basic/icon.js +129 -0
  123. package/dist/components/basic/input.d.ts.map +1 -1
  124. package/dist/components/basic/input.js +314 -0
  125. package/dist/components/basic/tag.d.ts +7 -2
  126. package/dist/components/basic/tag.d.ts.map +1 -1
  127. package/dist/components/basic/tag.js +248 -0
  128. package/dist/components/basic/textarea.d.ts +0 -1
  129. package/dist/components/basic/textarea.d.ts.map +1 -1
  130. package/dist/components/basic/textarea.js +130 -0
  131. package/dist/components/container/callout.js +108 -0
  132. package/dist/components/container/details.js +117 -0
  133. package/dist/components/container/scroller.js +144 -0
  134. package/dist/components/container/split-panel.js +150 -0
  135. package/dist/components/data/AGENTS.md +1 -1
  136. package/dist/components/data/box-table.d.ts +53 -0
  137. package/dist/components/data/box-table.d.ts.map +1 -0
  138. package/dist/components/data/box-table.js +220 -0
  139. package/dist/components/data/dropdown.d.ts +8 -5
  140. package/dist/components/data/dropdown.d.ts.map +1 -1
  141. package/dist/components/data/dropdown.js +219 -0
  142. package/dist/components/data/metrics-group.js +180 -0
  143. package/dist/components/data/metrics.d.ts +11 -0
  144. package/dist/components/data/metrics.d.ts.map +1 -1
  145. package/dist/components/data/metrics.js +309 -0
  146. package/dist/components/data/pagination.js +119 -0
  147. package/dist/components/data/tab-pane.d.ts +58 -12
  148. package/dist/components/data/tab-pane.d.ts.map +1 -1
  149. package/dist/components/data/tab-pane.js +130 -0
  150. package/dist/components/data/table-column.d.ts +29 -5
  151. package/dist/components/data/table-column.d.ts.map +1 -1
  152. package/dist/components/data/table-column.js +123 -0
  153. package/dist/components/data/table.d.ts +134 -54
  154. package/dist/components/data/table.d.ts.map +1 -1
  155. package/dist/components/data/table.js +1210 -0
  156. package/dist/components/data/tabs.d.ts +60 -3
  157. package/dist/components/data/tabs.d.ts.map +1 -1
  158. package/dist/components/data/tabs.js +416 -0
  159. package/dist/components/data/timeline-item.js +127 -0
  160. package/dist/components/data/timeline.js +204 -0
  161. package/dist/components/data/tree-menu.d.ts +12 -2
  162. package/dist/components/data/tree-menu.d.ts.map +1 -1
  163. package/dist/components/data/tree-menu.js +482 -0
  164. package/dist/components/data/tree.js +269 -0
  165. package/dist/components/display/AGENTS.md +5 -2
  166. package/dist/components/display/animated-image.js +98 -0
  167. package/dist/components/display/autoview.d.ts +139 -0
  168. package/dist/components/display/autoview.d.ts.map +1 -0
  169. package/dist/components/display/autoview.js +460 -0
  170. package/dist/components/display/brief-box.d.ts +42 -0
  171. package/dist/components/display/brief-box.d.ts.map +1 -0
  172. package/dist/components/display/brief-box.js +117 -0
  173. package/dist/components/display/carousel.js +223 -0
  174. package/dist/components/display/code-editor.d.ts.map +1 -1
  175. package/dist/components/display/code-editor.js +976 -0
  176. package/dist/components/display/comparison.js +132 -0
  177. package/dist/components/display/desc-item.d.ts +48 -0
  178. package/dist/components/display/desc-item.d.ts.map +1 -0
  179. package/dist/components/display/desc-item.js +150 -0
  180. package/dist/components/display/desc.d.ts +68 -0
  181. package/dist/components/display/desc.d.ts.map +1 -0
  182. package/dist/components/display/desc.js +405 -0
  183. package/dist/components/display/detail-box.d.ts +51 -0
  184. package/dist/components/display/detail-box.d.ts.map +1 -0
  185. package/dist/components/display/detail-box.js +157 -0
  186. package/dist/components/display/label.js +166 -0
  187. package/dist/components/display/markdown-editor.js +319 -0
  188. package/dist/components/display/markdown.d.ts.map +1 -1
  189. package/dist/components/display/markdown.js +193 -0
  190. package/dist/components/display/mini-box.d.ts +31 -0
  191. package/dist/components/display/mini-box.d.ts.map +1 -0
  192. package/dist/components/display/mini-box.js +137 -0
  193. package/dist/components/display/profile.d.ts +18 -0
  194. package/dist/components/display/profile.d.ts.map +1 -0
  195. package/dist/components/display/profile.js +164 -0
  196. package/dist/components/feedback/AGENTS.md +1 -0
  197. package/dist/components/feedback/alert.js +150 -0
  198. package/dist/components/feedback/dialog.js +228 -0
  199. package/dist/components/feedback/drawer.d.ts.map +1 -1
  200. package/dist/components/feedback/drawer.js +338 -0
  201. package/dist/components/feedback/loading.js +130 -0
  202. package/dist/components/feedback/modal.d.ts.map +1 -1
  203. package/dist/components/feedback/modal.js +303 -0
  204. package/dist/components/feedback/notification.js +170 -0
  205. package/dist/components/feedback/popover.d.ts +1 -1
  206. package/dist/components/feedback/popover.js +124 -0
  207. package/dist/components/feedback/toast.js +142 -0
  208. package/dist/components/feedback/tooltip.d.ts +1 -1
  209. package/dist/components/feedback/tooltip.js +153 -0
  210. package/dist/components/form/AGENTS.md +4 -0
  211. package/dist/components/form/autoform-item.d.ts +6 -0
  212. package/dist/components/form/autoform-item.d.ts.map +1 -1
  213. package/dist/components/form/autoform-item.js +791 -0
  214. package/dist/components/form/autoform.d.ts +15 -5
  215. package/dist/components/form/autoform.d.ts.map +1 -1
  216. package/dist/components/form/autoform.js +303 -0
  217. package/dist/components/form/checkbox-group.js +118 -0
  218. package/dist/components/form/checkbox.js +123 -0
  219. package/dist/components/form/color-picker.js +148 -0
  220. package/dist/components/form/combobox.d.ts +4 -0
  221. package/dist/components/form/combobox.d.ts.map +1 -1
  222. package/dist/components/form/combobox.js +325 -0
  223. package/dist/components/form/date-picker.js +123 -0
  224. package/dist/components/form/form-item.d.ts.map +1 -1
  225. package/dist/components/form/form-item.js +141 -0
  226. package/dist/components/form/form.js +94 -0
  227. package/dist/components/form/radio-group.js +106 -0
  228. package/dist/components/form/radio.js +110 -0
  229. package/dist/components/form/rate.js +116 -0
  230. package/dist/components/form/select.d.ts +5 -1
  231. package/dist/components/form/select.d.ts.map +1 -1
  232. package/dist/components/form/select.js +539 -0
  233. package/dist/components/form/slider.js +134 -0
  234. package/dist/components/form/switch.js +146 -0
  235. package/dist/components/form/time-picker.js +92 -0
  236. package/dist/components/form/transfer.js +273 -0
  237. package/dist/components/form/upload.js +138 -0
  238. package/dist/components/framework/body.js +333 -0
  239. package/dist/components/framework/dashboard-panel.js +519 -0
  240. package/dist/components/framework/dashboard.d.ts.map +1 -1
  241. package/dist/components/framework/dashboard.js +1084 -0
  242. package/dist/components/framework/header.js +237 -0
  243. package/dist/components/framework/log-panel.js +637 -0
  244. package/dist/components/framework/page.js +151 -0
  245. package/dist/components/framework/sidebar.d.ts +4 -10
  246. package/dist/components/framework/sidebar.d.ts.map +1 -1
  247. package/dist/components/framework/sidebar.js +477 -0
  248. package/dist/components/layout/affix.js +137 -0
  249. package/dist/components/layout/col.js +103 -0
  250. package/dist/components/layout/collapse-item.js +165 -0
  251. package/dist/components/layout/collapse.js +108 -0
  252. package/dist/components/layout/container.js +92 -0
  253. package/dist/components/layout/flex.js +100 -0
  254. package/dist/components/layout/row.js +103 -0
  255. package/dist/components/layout/space.js +85 -0
  256. package/dist/components/navigation/back-top.js +127 -0
  257. package/dist/components/navigation/breadcrumb-item.js +108 -0
  258. package/dist/components/navigation/breadcrumb.js +70 -0
  259. package/dist/components/navigation/menu-item.js +181 -0
  260. package/dist/components/navigation/menu.js +126 -0
  261. package/dist/components/navigation/steps.js +183 -0
  262. package/dist/components/navigation/sub-menu.d.ts.map +1 -1
  263. package/dist/components/navigation/sub-menu.js +252 -0
  264. package/dist/components/progress/progress-bar.js +97 -0
  265. package/dist/components/progress/progress-ring.js +111 -0
  266. package/dist/components/progress/skeleton.js +108 -0
  267. package/dist/components/progress/spinner.js +129 -0
  268. package/dist/components/theme/locale-switch.js +241 -0
  269. package/dist/components/theme/shadow-picker.js +233 -0
  270. package/dist/components/theme/shape-picker.js +232 -0
  271. package/dist/components/theme/theme-picker.js +236 -0
  272. package/dist/components/theme/theme-preview.d.ts +1 -2
  273. package/dist/components/theme/theme-preview.d.ts.map +1 -1
  274. package/dist/components/theme/theme-preview.js +376 -0
  275. package/dist/components/theme/theme-switch.d.ts.map +1 -1
  276. package/dist/components/theme/theme-switch.js +318 -0
  277. package/dist/components/theme/typo-picker.js +219 -0
  278. package/dist/core/AGENTS.md +6 -1
  279. package/dist/core/aithe-element.d.ts +2 -2
  280. package/dist/core/aithe-element.js +135 -0
  281. package/dist/core/aithe-widget.js +30 -0
  282. package/dist/core/anchored-overlay.d.ts +3 -0
  283. package/dist/core/anchored-overlay.d.ts.map +1 -1
  284. package/dist/core/anchored-overlay.js +111 -0
  285. package/dist/core/autoform/autoform.js +79 -0
  286. package/dist/core/autoform/autoview.d.ts +86 -0
  287. package/dist/core/autoform/autoview.d.ts.map +1 -0
  288. package/dist/core/autoform/autoview.js +37 -0
  289. package/dist/core/autoform/condition.js +170 -0
  290. package/dist/core/autoform/index.d.ts +2 -0
  291. package/dist/core/autoform/index.d.ts.map +1 -1
  292. package/dist/core/autoform/index.js +9 -0
  293. package/dist/core/autoform/types.js +7 -0
  294. package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
  295. package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
  296. package/dist/core/datahub/__tests__/force-options.test.js +161 -0
  297. package/dist/core/datahub/config/strategy.d.ts +1 -1
  298. package/dist/core/datahub/config/strategy.d.ts.map +1 -1
  299. package/dist/core/datahub/config/strategy.js +50 -0
  300. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts +1 -1
  301. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts.map +1 -1
  302. package/dist/core/datahub/core/adapter/fetch-adapter.js +118 -0
  303. package/dist/core/datahub/core/adapter/index.js +7 -0
  304. package/dist/core/datahub/core/adapter/mock-adapter.d.ts +1 -1
  305. package/dist/core/datahub/core/adapter/mock-adapter.d.ts.map +1 -1
  306. package/dist/core/datahub/core/adapter/mock-adapter.js +58 -0
  307. package/dist/core/datahub/core/api-styles.d.ts +1 -1
  308. package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
  309. package/dist/core/datahub/core/api-styles.js +136 -0
  310. package/dist/core/datahub/core/datahub-core.d.ts +53 -3
  311. package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
  312. package/dist/core/datahub/core/datahub-core.js +520 -0
  313. package/dist/core/datahub/core/index.js +7 -0
  314. package/dist/core/datahub/index.js +50 -0
  315. package/dist/core/datahub/types.d.ts +24 -0
  316. package/dist/core/datahub/types.d.ts.map +1 -1
  317. package/dist/core/datahub/types.js +31 -0
  318. package/dist/core/datahub/utils/cache.js +55 -0
  319. package/dist/core/datahub/utils/common.js +23 -0
  320. package/dist/core/datahub/utils/dedup.d.ts +1 -1
  321. package/dist/core/datahub/utils/dedup.d.ts.map +1 -1
  322. package/dist/core/datahub/utils/dedup.js +52 -0
  323. package/dist/core/datahub/utils/idempotent.js +61 -0
  324. package/dist/core/datahub/utils/is-query.js +53 -0
  325. package/dist/core/datahub/utils/loading.js +78 -0
  326. package/dist/core/filter/__tests__/index.test.d.ts +2 -0
  327. package/dist/core/filter/__tests__/index.test.d.ts.map +1 -0
  328. package/dist/core/filter/__tests__/index.test.js +230 -0
  329. package/dist/core/filter/builtins.d.ts +60 -0
  330. package/dist/core/filter/builtins.d.ts.map +1 -0
  331. package/dist/core/filter/builtins.js +172 -0
  332. package/dist/core/filter/factory.d.ts +54 -0
  333. package/dist/core/filter/factory.d.ts.map +1 -0
  334. package/dist/core/filter/factory.js +96 -0
  335. package/dist/core/filter/index.d.ts +11 -0
  336. package/dist/core/filter/index.d.ts.map +1 -0
  337. package/dist/core/filter/index.js +9 -0
  338. package/dist/core/filter/types.d.ts +12 -0
  339. package/dist/core/filter/types.d.ts.map +1 -0
  340. package/dist/core/filter/types.js +1 -0
  341. package/dist/core/floating.js +132 -0
  342. package/dist/core/highlight/index.js +43 -0
  343. package/dist/core/highlight/lang-bash.js +27 -0
  344. package/dist/core/highlight/lang-c.js +27 -0
  345. package/dist/core/highlight/lang-cmake.js +27 -0
  346. package/dist/core/highlight/lang-cpp.js +27 -0
  347. package/dist/core/highlight/lang-css.js +24 -0
  348. package/dist/core/highlight/lang-dart.js +27 -0
  349. package/dist/core/highlight/lang-dockerfile.js +16 -0
  350. package/dist/core/highlight/lang-fsharp.js +23 -0
  351. package/dist/core/highlight/lang-go.js +22 -0
  352. package/dist/core/highlight/lang-html.js +12 -0
  353. package/dist/core/highlight/lang-java.js +22 -0
  354. package/dist/core/highlight/lang-javascript.js +26 -0
  355. package/dist/core/highlight/lang-json.js +13 -0
  356. package/dist/core/highlight/lang-jsonline.js +13 -0
  357. package/dist/core/highlight/lang-jsx.js +30 -0
  358. package/dist/core/highlight/lang-kotlin.js +27 -0
  359. package/dist/core/highlight/lang-latex.js +22 -0
  360. package/dist/core/highlight/lang-lua.js +26 -0
  361. package/dist/core/highlight/lang-makefile.js +22 -0
  362. package/dist/core/highlight/lang-markdown.js +18 -0
  363. package/dist/core/highlight/lang-objectivec.js +24 -0
  364. package/dist/core/highlight/lang-perl.js +30 -0
  365. package/dist/core/highlight/lang-powershell.js +23 -0
  366. package/dist/core/highlight/lang-python.js +27 -0
  367. package/dist/core/highlight/lang-r.js +21 -0
  368. package/dist/core/highlight/lang-ruby.js +29 -0
  369. package/dist/core/highlight/lang-rust.js +24 -0
  370. package/dist/core/highlight/lang-scala.js +26 -0
  371. package/dist/core/highlight/lang-sql.js +21 -0
  372. package/dist/core/highlight/lang-svelte.js +27 -0
  373. package/dist/core/highlight/lang-swift.js +28 -0
  374. package/dist/core/highlight/lang-tsx.js +35 -0
  375. package/dist/core/highlight/lang-typescript.js +31 -0
  376. package/dist/core/highlight/lang-vue.js +29 -0
  377. package/dist/core/highlight/lang-wasm.js +22 -0
  378. package/dist/core/highlight/lang-xml.js +12 -0
  379. package/dist/core/highlight/lang-yaml.js +14 -0
  380. package/dist/core/highlight/registry.js +99 -0
  381. package/dist/core/logger/LoggerCore.js +626 -0
  382. package/dist/core/logger/index.js +10 -0
  383. package/dist/core/logger/types.js +29 -0
  384. package/dist/core/markdown/index.js +20 -0
  385. package/dist/core/markdown/parser.d.ts +2 -0
  386. package/dist/core/markdown/parser.d.ts.map +1 -1
  387. package/dist/core/markdown/parser.js +376 -0
  388. package/dist/core/markdown/plugins.d.ts +2 -1
  389. package/dist/core/markdown/plugins.d.ts.map +1 -1
  390. package/dist/core/markdown/plugins.js +755 -0
  391. package/dist/core/markdown/types.d.ts +5 -0
  392. package/dist/core/markdown/types.d.ts.map +1 -1
  393. package/dist/core/markdown/types.js +7 -0
  394. package/dist/core/router/index.js +244 -0
  395. package/dist/core/styles.js +44 -0
  396. package/dist/core/types.d.ts +52 -3
  397. package/dist/core/types.d.ts.map +1 -1
  398. package/dist/core/types.js +1 -0
  399. package/dist/index.d.ts +9 -0
  400. package/dist/index.d.ts.map +1 -1
  401. package/dist/index.js +3695 -1622
  402. package/dist/index.js.map +1 -1
  403. package/dist/index.umd.js +1844 -758
  404. package/dist/index.umd.js.map +1 -1
  405. package/dist/styles/aithe-ui.d.ts +23 -0
  406. package/dist/styles/aithe-ui.d.ts.map +1 -1
  407. package/dist/styles/aithe-ui.js +185 -0
  408. package/dist/styles/global.css.d.ts +1 -1
  409. package/dist/styles/global.css.d.ts.map +1 -1
  410. package/dist/styles/global.css.js +119 -0
  411. package/dist/styles/i18n/index.js +206 -0
  412. package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
  413. package/dist/styles/i18n/locales/de-DE.js +151 -0
  414. package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
  415. package/dist/styles/i18n/locales/en-US.js +160 -0
  416. package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
  417. package/dist/styles/i18n/locales/es-ES.js +151 -0
  418. package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
  419. package/dist/styles/i18n/locales/fr-FR.js +151 -0
  420. package/dist/styles/i18n/locales/index.js +14 -0
  421. package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
  422. package/dist/styles/i18n/locales/ja-JP.js +151 -0
  423. package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
  424. package/dist/styles/i18n/locales/ko-KR.js +151 -0
  425. package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
  426. package/dist/styles/i18n/locales/pt-BR.js +151 -0
  427. package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
  428. package/dist/styles/i18n/locales/zh-CN.js +160 -0
  429. package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
  430. package/dist/styles/i18n/locales/zh-HK.js +151 -0
  431. package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
  432. package/dist/styles/i18n/locales/zh-TW.js +151 -0
  433. package/dist/styles/layout/index.js +88 -0
  434. package/dist/styles/mixins.js +43 -0
  435. package/dist/styles/shadow/cyber.js +19 -0
  436. package/dist/styles/shadow/deep.js +19 -0
  437. package/dist/styles/shadow/diffuse.js +19 -0
  438. package/dist/styles/shadow/flat.js +19 -0
  439. package/dist/styles/shadow/glassmorphism.js +19 -0
  440. package/dist/styles/shadow/index.js +129 -0
  441. package/dist/styles/shadow/neumorphism.js +21 -0
  442. package/dist/styles/shadow/retro.js +19 -0
  443. package/dist/styles/shadow/sharp-business.js +19 -0
  444. package/dist/styles/shadow/skeuomorphic.js +21 -0
  445. package/dist/styles/shape/chamfer.js +19 -0
  446. package/dist/styles/shape/circle.js +19 -0
  447. package/dist/styles/shape/index.js +174 -0
  448. package/dist/styles/shape/organic.js +19 -0
  449. package/dist/styles/shape/pill.js +19 -0
  450. package/dist/styles/shape/rounded.js +21 -0
  451. package/dist/styles/shape/rounder.js +19 -0
  452. package/dist/styles/shape/sharp.js +19 -0
  453. package/dist/styles/shape/smooth.js +19 -0
  454. package/dist/styles/theme/aliyun.d.ts +1 -1
  455. package/dist/styles/theme/aliyun.d.ts.map +1 -1
  456. package/dist/styles/theme/aliyun.js +102 -0
  457. package/dist/styles/theme/amber.d.ts +1 -1
  458. package/dist/styles/theme/amber.d.ts.map +1 -1
  459. package/dist/styles/theme/amber.js +101 -0
  460. package/dist/styles/theme/blue.d.ts +1 -1
  461. package/dist/styles/theme/blue.d.ts.map +1 -1
  462. package/dist/styles/theme/blue.js +101 -0
  463. package/dist/styles/theme/charcoal.d.ts +1 -1
  464. package/dist/styles/theme/charcoal.d.ts.map +1 -1
  465. package/dist/styles/theme/charcoal.js +106 -0
  466. package/dist/styles/theme/cyan.d.ts +1 -1
  467. package/dist/styles/theme/cyan.d.ts.map +1 -1
  468. package/dist/styles/theme/cyan.js +96 -0
  469. package/dist/styles/theme/dark.d.ts +1 -1
  470. package/dist/styles/theme/dark.d.ts.map +1 -1
  471. package/dist/styles/theme/dark.js +106 -0
  472. package/dist/styles/theme/ebony.d.ts +1 -1
  473. package/dist/styles/theme/ebony.d.ts.map +1 -1
  474. package/dist/styles/theme/ebony.js +106 -0
  475. package/dist/styles/theme/festive.d.ts +1 -1
  476. package/dist/styles/theme/festive.d.ts.map +1 -1
  477. package/dist/styles/theme/festive.js +101 -0
  478. package/dist/styles/theme/graphite.d.ts +1 -1
  479. package/dist/styles/theme/graphite.d.ts.map +1 -1
  480. package/dist/styles/theme/graphite.js +106 -0
  481. package/dist/styles/theme/gray.d.ts +1 -1
  482. package/dist/styles/theme/gray.d.ts.map +1 -1
  483. package/dist/styles/theme/gray.js +101 -0
  484. package/dist/styles/theme/huawei.d.ts +1 -1
  485. package/dist/styles/theme/huawei.d.ts.map +1 -1
  486. package/dist/styles/theme/huawei.js +102 -0
  487. package/dist/styles/theme/index.d.ts +1 -1
  488. package/dist/styles/theme/index.d.ts.map +1 -1
  489. package/dist/styles/theme/index.js +276 -0
  490. package/dist/styles/theme/indigo.d.ts +1 -1
  491. package/dist/styles/theme/indigo.d.ts.map +1 -1
  492. package/dist/styles/theme/indigo.js +101 -0
  493. package/dist/styles/theme/ink.d.ts +1 -1
  494. package/dist/styles/theme/ink.d.ts.map +1 -1
  495. package/dist/styles/theme/ink.js +106 -0
  496. package/dist/styles/theme/light.d.ts +1 -1
  497. package/dist/styles/theme/light.d.ts.map +1 -1
  498. package/dist/styles/theme/light.js +102 -0
  499. package/dist/styles/theme/midnight.d.ts +1 -1
  500. package/dist/styles/theme/midnight.d.ts.map +1 -1
  501. package/dist/styles/theme/midnight.js +106 -0
  502. package/dist/styles/theme/navy.d.ts +1 -1
  503. package/dist/styles/theme/navy.d.ts.map +1 -1
  504. package/dist/styles/theme/navy.js +106 -0
  505. package/dist/styles/theme/obsidian.d.ts +1 -1
  506. package/dist/styles/theme/obsidian.d.ts.map +1 -1
  507. package/dist/styles/theme/obsidian.js +106 -0
  508. package/dist/styles/theme/onyx.d.ts +1 -1
  509. package/dist/styles/theme/onyx.d.ts.map +1 -1
  510. package/dist/styles/theme/onyx.js +106 -0
  511. package/dist/styles/theme/orange.d.ts +1 -1
  512. package/dist/styles/theme/orange.d.ts.map +1 -1
  513. package/dist/styles/theme/orange.js +101 -0
  514. package/dist/styles/theme/pink.d.ts +1 -1
  515. package/dist/styles/theme/pink.d.ts.map +1 -1
  516. package/dist/styles/theme/pink.js +101 -0
  517. package/dist/styles/theme/purple.d.ts +1 -1
  518. package/dist/styles/theme/purple.d.ts.map +1 -1
  519. package/dist/styles/theme/purple.js +101 -0
  520. package/dist/styles/theme/raisin.d.ts +1 -1
  521. package/dist/styles/theme/raisin.d.ts.map +1 -1
  522. package/dist/styles/theme/raisin.js +106 -0
  523. package/dist/styles/theme/slate.d.ts +1 -1
  524. package/dist/styles/theme/slate.d.ts.map +1 -1
  525. package/dist/styles/theme/slate.js +106 -0
  526. package/dist/styles/theme/teal.d.ts +1 -1
  527. package/dist/styles/theme/teal.d.ts.map +1 -1
  528. package/dist/styles/theme/teal.js +101 -0
  529. package/dist/styles/theme/tianyi.d.ts +1 -1
  530. package/dist/styles/theme/tianyi.d.ts.map +1 -1
  531. package/dist/styles/theme/tianyi.js +102 -0
  532. package/dist/styles/types.js +1 -0
  533. package/dist/styles/typo/business.js +34 -0
  534. package/dist/styles/typo/compact.js +34 -0
  535. package/dist/styles/typo/index.js +99 -0
  536. package/dist/styles/typo/luxury.js +34 -0
  537. package/dist/styles/typo/minimal.js +34 -0
  538. package/dist/types/index.js +2 -0
  539. package/dist/utils/dom.js +51 -0
  540. package/dist/utils/events.js +32 -0
  541. package/dist/utils/icon.js +176 -0
  542. package/dist/utils/index.js +4 -0
  543. package/dist/utils/utils.d.ts +5 -5
  544. package/dist/utils/utils.js +89 -0
  545. package/dist/utils/validation.js +52 -0
  546. package/docs/api/basic/button.md +9 -6
  547. package/docs/api/basic/tag.md +24 -17
  548. package/docs/api/data/box-table.md +73 -0
  549. package/docs/api/data/dropdown.md +3 -2
  550. package/docs/api/data/metrics.md +2 -0
  551. package/docs/api/data/table-column.md +37 -23
  552. package/docs/api/data/table.md +158 -44
  553. package/docs/api/data/tabs.md +46 -1
  554. package/docs/api/data/tree-menu.md +55 -2
  555. package/docs/api/display/autoview.md +277 -0
  556. package/docs/api/display/box.md +66 -0
  557. package/docs/api/display/brief-box.md +73 -0
  558. package/docs/api/display/desc-item.md +57 -0
  559. package/docs/api/display/desc.md +246 -0
  560. package/docs/api/display/detail-box.md +75 -0
  561. package/docs/api/display/mini-box.md +100 -0
  562. package/docs/api/display/profile.md +92 -0
  563. package/docs/api/feedback/popover.md +10 -10
  564. package/docs/api/feedback/tooltip.md +14 -14
  565. package/docs/api/form/autoform-item.md +115 -0
  566. package/docs/api/form/autoform.md +7 -3
  567. package/docs/api/form/combobox.md +27 -7
  568. package/docs/api/form/select.md +50 -28
  569. package/docs/api/framework/log-panel.md +46 -0
  570. package/docs/api/framework/sidebar.md +3 -2
  571. package/docs/api/summary.md +46 -35
  572. package/docs/api/theme/theme-switch.md +1 -1
  573. package/docs/autoform.md +14 -33
  574. package/docs/changelog/CHANGELOG.md +155 -0
  575. package/docs/changelog/VERSION_26.3.1.md +966 -0
  576. package/docs/changelog/VERSION_26.3.2.md +852 -0
  577. package/docs/datahub.md +4 -1
  578. package/docs/filter.md +332 -0
  579. package/docs/framework-integration.md +2 -2
  580. package/docs/guide.md +72 -6
  581. package/docs/i18n.md +2 -4
  582. package/docs/issue/26.3.1/issue_26.3.1.0.md +84 -0
  583. package/docs/issue/26.3.1/issue_26.3.1.1.md +72 -0
  584. package/docs/issue/26.3.1/issue_26.3.1.2.md +75 -0
  585. package/docs/issue/26.3.1/issue_26.3.1.3.md +78 -0
  586. package/docs/issue/26.3.1/issue_26.3.1.4.md +113 -0
  587. package/docs/issue/26.3.1/issue_26.3.1.5.md +142 -0
  588. package/docs/issue/26.3.1/issue_26.3.1.6.md +100 -0
  589. package/docs/issue/26.3.1/issue_26.3.1.7.md +78 -0
  590. package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
  591. package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
  592. package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
  593. package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
  594. package/docs/issue/AGENTS.md +24 -3
  595. package/docs/markdown.md +2 -2
  596. package/docs/quickstart.md +5 -5
  597. package/docs/theming.md +5 -4
  598. package/package.json +5 -2
  599. package/dist/components/navigation/dropdown.d.ts +0 -56
  600. package/dist/components/navigation/dropdown.d.ts.map +0 -1
  601. /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
  602. /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
  603. /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
  604. /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
  605. /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
  606. /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
  607. /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
  608. /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
  609. /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
  610. /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
  611. /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
  612. /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
  613. /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
  614. /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
  615. /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
  616. /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
  617. /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
  618. /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
  619. /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
  620. /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
@@ -0,0 +1,89 @@
1
+ /** Auto-incrementing ID counter for unique element identifiers. 自增ID计数器,用于生成唯一元素标识符。 */
2
+ let aitheId = 0;
3
+ /**
4
+ * Clamp a numeric value between a minimum and maximum bound.
5
+ * 将数值限制在最小值和最大值之间。
6
+ *
7
+ * @param value - The number to clamp. 要限制的数值。
8
+ * @param min - Lower bound. 下界。
9
+ * @param max - Upper bound. 上界。
10
+ * @returns The clamped value. 限制后的值。
11
+ */
12
+ export function clamp(value, min, max) {
13
+ return Math.min(Math.max(value, min), max);
14
+ }
15
+ /**
16
+ * Resolve a nested property from an object using a dot-separated path.
17
+ * 使用点分隔路径从对象中解析嵌套属性。
18
+ *
19
+ * @param record - Source object. 源对象。
20
+ * @param dataIndex - Dot-separated key path, e.g. `"user.name"`. 点分隔的键路径,如 `"user.name"`。
21
+ * @returns The resolved value, or `undefined` if the path cannot be traversed. 解析后的值,若路径无法遍历则返回 `undefined`。
22
+ */
23
+ export function getValueByPath(record, dataIndex) {
24
+ if (!dataIndex || typeof record !== 'object' || record === null) {
25
+ return dataIndex ? undefined : record;
26
+ }
27
+ return dataIndex.split('.').reduce((current, key) => {
28
+ if (typeof current === 'object' && current !== null && key in current) {
29
+ return current[key];
30
+ }
31
+ return undefined;
32
+ }, record);
33
+ }
34
+ /**
35
+ * Generate a unique ID string with the given prefix.
36
+ * 使用给定前缀生成唯一ID字符串。
37
+ *
38
+ * @param prefix - Prefix for the ID. Defaults to `"aithe"`. ID前缀,默认为 `"aithe"`。
39
+ * @returns A unique string like `"aithe-1"`. 类似 `"aithe-1"` 的唯一字符串。
40
+ */
41
+ export function uid(prefix = 'aithe') {
42
+ aitheId += 1;
43
+ return `${prefix}-${aitheId}`;
44
+ }
45
+ /**
46
+ * Find the first focusable element inside a root container.
47
+ * 在根容器中查找第一个可聚焦元素。
48
+ *
49
+ * @param root - Parent node to search within. 要搜索的父节点。
50
+ * @returns The first visible, non-disabled focusable element, or `null`. 第一个可见、非禁用的可聚焦元素,或 `null`。
51
+ */
52
+ export function findFirstFocusable(root) {
53
+ const selectors = [
54
+ 'button:not([disabled])',
55
+ '[href]',
56
+ 'input:not([disabled])',
57
+ 'select:not([disabled])',
58
+ 'textarea:not([disabled])',
59
+ '[tabindex]:not([tabindex="-1"])',
60
+ ];
61
+ const items = Array.from(root.querySelectorAll(selectors.join(',')));
62
+ return items.find((item) => !item.hasAttribute('hidden') && item.offsetParent !== null) ?? null;
63
+ }
64
+ /**
65
+ * Safely converts an unknown value to a string, preventing "[object Object]" output.
66
+ * Falls back gracefully through multiple strategies:
67
+ * 1. Pretty-print JSON.stringify for objects (fails on circular references)
68
+ * 2. Compact JSON.stringify as second attempt
69
+ * 3. String() as final fallback
70
+ *
71
+ * 安全地将任意值转换为字符串,避免 "[object Object]" 输出。
72
+ * 对象优先尝试格式化 JSON.stringify,失败后降级为紧凑格式,最后 String() 兜底。
73
+ */
74
+ export function safeStringify(value) {
75
+ if (typeof value !== 'object' || value === null) {
76
+ return String(value);
77
+ }
78
+ try {
79
+ return JSON.stringify(value, null, 2);
80
+ }
81
+ catch {
82
+ try {
83
+ return JSON.stringify(value);
84
+ }
85
+ catch {
86
+ return String(value);
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Check whether a value is `null` or `undefined`.
3
+ * 检查值是否为 `null` 或 `undefined`。
4
+ *
5
+ * @param value - Value to check. 要检查的值。
6
+ * @returns `true` when the value is nullish. 当值为空时返回 `true`。
7
+ */
8
+ export function isNil(value) {
9
+ return value === null || value === undefined;
10
+ }
11
+ /**
12
+ * Convert an HTML attribute value to a boolean, treating empty string and
13
+ * `"true"` as truthy (matches HTML boolean attribute semantics).
14
+ * 将 HTML 属性值转换为布尔值,将空字符串和 `"true"` 视为真值(符合 HTML 布尔属性语义)。
15
+ *
16
+ * @param value - Attribute value to convert. 要转换的属性值。
17
+ * @returns Boolean interpretation. 布尔解释。
18
+ */
19
+ export function toBooleanAttribute(value) {
20
+ return value === '' || value === true || value === 'true';
21
+ }
22
+ /**
23
+ * Normalize a CSS dimension value: bare numbers get `px` appended,
24
+ * size aliases (`xs`/`sm`/`md`/`lg`/`xl`) resolve to design tokens,
25
+ * and already-valid CSS values pass through unchanged.
26
+ * 规范化 CSS 尺寸值:纯数字追加 `px`,尺寸别名(`xs`/`sm`/`md`/`lg`/`xl`)解析为设计令牌,
27
+ * 已有效的 CSS 值直接通过。
28
+ *
29
+ * @param value - Raw value to normalize. 要规范化的原始值。
30
+ * @param fallback - Default value when input is empty. Defaults to `""`. 输入为空时的默认值,默认为 `""`。
31
+ * @returns A valid CSS dimension string. 有效的 CSS 尺寸字符串。
32
+ */
33
+ export function normalizeCssUnit(value, fallback = '') {
34
+ if (typeof value === 'number') {
35
+ return `${value}px`;
36
+ }
37
+ const normalized = (value ?? '').trim();
38
+ if (!normalized) {
39
+ return fallback;
40
+ }
41
+ if (/^-?\d+(\.\d+)?$/.test(normalized)) {
42
+ return `${normalized}px`;
43
+ }
44
+ const sizeAliasMap = {
45
+ xs: 'var(--aithe-space-xs)',
46
+ sm: 'var(--aithe-space-sm)',
47
+ md: 'var(--aithe-space-md)',
48
+ lg: 'var(--aithe-space-lg)',
49
+ xl: 'var(--aithe-space-xl)',
50
+ };
51
+ return sizeAliasMap[normalized] ?? normalized;
52
+ }
@@ -15,13 +15,13 @@
15
15
 
16
16
  | Name | Type | Default | Description (EN) | Description (CN) |
17
17
  | -------- | -------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------- |
18
- | type | `'primary' \| 'default' \| 'dashed' \| 'text' \| 'link'` | `'default'` | Visual type of the button. | 按钮的视觉类型。 |
18
+ | variant | `'default' \| 'primary' \| 'danger' \| 'success' \| 'warning' \| 'neutral'` | `'default'` | Color intent of the button. Controls emphasis and semantic color. | 按钮的颜色意图。控制强调程度和语义色。 |
19
+ | type | `'default' \| 'dashed' \| 'text' \| 'link'` | `'default'` | Appearance style of the button. | 按钮的外观风格。 |
19
20
  | size | `'small' \| 'medium' \| 'large'` | `'medium'` | Size scale of the button. | 按钮的尺寸规格。 |
20
21
  | title | `string` | `''` | Display title (shown as tooltip). | 显示标题(作为工具提示)。 |
21
22
  | icon | `string` | `''` | Icon name to display before the label. | 在标签前显示的图标名称。 |
22
23
  | disabled | `boolean` | `false` | Whether the button is disabled. | 按钮是否禁用。 |
23
24
  | loading | `boolean` | `false` | Whether the button shows a loading spinner. | 按钮是否显示加载旋转器。 |
24
- | danger | `boolean` | `false` | Whether the button uses danger styling. | 按钮是否使用危险样式。 |
25
25
  | block | `boolean` | `false` | Whether the button spans the full width of its container. | 按钮是否占满容器宽度。 |
26
26
  | href | `string` | `''` | Link URL. When set, the button renders as an `<a>` element with native link behavior. | 链接地址。设置后按钮渲染为 `<a>` 元素,具有原生链接行为。 |
27
27
  | target | `string` | `''` | Link target attribute (e.g. `_blank`). Only applies when `href` is set. | 链接 target 属性(如 `_blank`)。仅在设置 `href` 时生效。 |
@@ -37,15 +37,18 @@
37
37
  ### Basic buttons / 基础按钮
38
38
 
39
39
  ```html
40
- <aithe-button type="primary" size="medium" title="Submit form" icon="check">Submit</aithe-button>
41
- <aithe-button type="danger" loading>Deleting...</aithe-button>
40
+ <aithe-button variant="primary" size="medium" title="Submit form" icon="check">Submit</aithe-button>
41
+ <aithe-button variant="danger" loading>Deleting...</aithe-button>
42
+ <aithe-button type="dashed">Dashed</aithe-button>
43
+ <aithe-button type="text">Text</aithe-button>
44
+ <aithe-button type="link">Link</aithe-button>
42
45
  ```
43
46
 
44
47
  ### Link button / 链接按钮
45
48
 
46
49
  ```html
47
- <aithe-button type="primary" href="/dashboard">Go to Dashboard</aithe-button>
48
- <aithe-button type="default" href="https://example.com" target="_blank">External Link</aithe-button>
50
+ <aithe-button variant="primary" href="/dashboard">Go to Dashboard</aithe-button>
51
+ <aithe-button href="https://example.com" target="_blank">External Link</aithe-button>
49
52
  ```
50
53
 
51
54
  No event listener is required — the component navigates to `href` internally by default.
@@ -5,30 +5,37 @@
5
5
 
6
6
  ## Slots / 插槽
7
7
 
8
- | Name | Description (EN) | Description (CN) |
9
- |------|-------------------|-------------------|
10
- | (default) | Default slot for tag label text. | 标签文本内容。 |
8
+ | Name | Description (EN) | Description (CN) |
9
+ | --------- | -------------------------------- | ---------------- |
10
+ | (default) | Default slot for tag label text. | 标签文本内容。 |
11
11
 
12
12
  ## Properties / 属性
13
13
 
14
- | Name | Type | Default | Description (EN) | Description (CN) |
15
- |------|------|---------|-------------------|-------------------|
16
- | type | `'primary' \| 'success' \| 'warning' \| 'danger' \| 'default'` | `'default'` | Tag color variant. | 标签颜色类型。 |
17
- | closable | `boolean` | `false` | Whether the tag shows a close button. Clicking it animates and removes the tag from DOM. | 是否显示关闭按钮。点击后动画移除标签。 |
18
- | selectable | `boolean` | `false` | Whether the tag can be toggled (selected/unselected). | 是否可选中切换。 |
19
- | selected | `boolean` | `false` | Whether the tag is currently selected. | 当前是否选中。 |
20
- | rounded | `'sm' \| 'md' \| 'lg' \| 'full'` | `'full'` | Border-radius preset. | 圆角预设。 |
21
- | disabled | `boolean` | `false` | Whether the tag is disabled. | 是否禁用。 |
14
+ | Name | Type | Default | Description (EN) | Description (CN) |
15
+ | ---------- | --------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------- |
16
+ | variant | `'default' \| 'primary' \| 'success' \| 'warning' \| 'danger' \| 'neutral'` | `'default'` | Color intent of the tag. Inherited from `AitheElement`. Controls semantic color. | 标签的颜色意图。继承自 `AitheElement`。控制语义色。 |
17
+ | type | `'primary' \| 'success' \| 'warning' \| 'danger' \| 'default'` | `'success'` | _(Deprecated)_ Tag color variant. Use `variant` instead. | _(已废弃)_ 标签颜色类型。请使用 `variant` 代替。 |
18
+ | size | `'sm' \| 'md' \| 'lg'` | `'sm'` | Size preset of the tag. | 标签的尺寸预设。 |
19
+ | closable | `boolean` | `false` | Whether the tag shows a close button. Clicking it animates and removes the tag from DOM. | 是否显示关闭按钮。点击后动画移除标签。 |
20
+ | selectable | `boolean` | `false` | Whether the tag can be toggled (selected/unselected). | 是否可选中切换。 |
21
+ | selected | `boolean` | `false` | Whether the tag is currently selected. | 当前是否选中。 |
22
+ | rounded | `'sm' \| 'md' \| 'lg' \| 'full'` | `'full'` | Border-radius preset. | 圆角预设。 |
23
+ | disabled | `boolean` | `false` | Whether the tag is disabled. | 是否禁用。 |
22
24
 
23
25
  ## Events / 事件
24
26
 
25
- | Name | Detail | Description (EN) | Description (CN) |
26
- |------|--------|-------------------|-------------------|
27
- | aithe-change | `{ selected }` | Emitted when selectable tag is toggled. | 选中状态变更时触发。 |
28
- | aithe-close | — | Emitted when the close button is clicked, before the tag is removed from DOM. | 关闭按钮点击时触发,在标签从 DOM 移除之前。 |
27
+ | Name | Detail | Description (EN) | Description (CN) |
28
+ | ------------ | -------------- | ----------------------------------------------------------------------------- | ------------------------------------------- |
29
+ | aithe-change | `{ selected }` | Emitted when selectable tag is toggled. | 选中状态变更时触发。 |
30
+ | aithe-close | — | Emitted when the close button is clicked, before the tag is removed from DOM. | 关闭按钮点击时触发,在标签从 DOM 移除之前。 |
29
31
 
30
32
  ## Examples / 示例
31
33
 
32
34
  ```html
33
- <aithe-tag type="primary" closable>Selectable Tag</aithe-tag>
34
- ```
35
+ <aithe-tag variant="primary" closable>Selectable Tag</aithe-tag>
36
+ <aithe-tag variant="success">Success</aithe-tag>
37
+ <aithe-tag variant="warning">Warning</aithe-tag>
38
+ <aithe-tag variant="danger">Danger</aithe-tag>
39
+ <aithe-tag size="sm">Small</aithe-tag>
40
+ <aithe-tag size="lg">Large</aithe-tag>
41
+ ```
@@ -0,0 +1,73 @@
1
+ # AitheBoxTable / AitheBoxTable 盒子表格
2
+
3
+ > Dual-mode table/box data display with sorting, selection, and box grid view.
4
+ > 双模式表格/盒子数据展示,支持排序、选择和盒子网格视图。
5
+
6
+ AitheBoxTable extends AitheTable with a `mode` property. When `mode="table"`, it behaves like a standard table. When `mode="box"`, it renders records as a grid of cards using box layout.
7
+ AitheBoxTable 扩展 AitheTable,增加 `mode` 属性。当 `mode="table"` 时,行为与标准表格一致。当 `mode="box"` 时,使用盒子布局将记录渲染为卡片网格。
8
+
9
+ ## Column Box Mapping / 列 Box 映射
10
+
11
+ In box mode, columns with a `box` property map their data to the corresponding box slot:
12
+
13
+ | box value | Box slot | Description |
14
+ |-----------|----------|-------------|
15
+ | `"name"` | Name/title region | 主标签/标题区域 |
16
+ | `"status"` | Status indicator | 状态指示器区域 |
17
+ | `"tags"` | Tags region | 标签区域 |
18
+ | `"content"` | Content region | 内容区域 |
19
+ | `"actions"` | Actions region | 操作按钮区域 |
20
+
21
+ ## Properties / 属性
22
+
23
+ | Name | Type | Default | Description (EN) | Description (CN) |
24
+ |------|------|---------|-------------------|-------------------|
25
+ | mode | 'table' \| 'box' | 'table' | Display mode: "table" for standard table view, "box" for box grid view. | 显示模式:"table" 为标准表格视图,"box" 为盒子网格视图。 |
26
+ | boxCols | Number | 3 | Number of box columns in box mode (1–12). | 盒子模式下每行显示的盒子数(1–12)。 |
27
+
28
+ All properties from `aithe-table` are also inherited (see [Table API](table.md)).
29
+ 所有 `aithe-table` 的属性也继承自(参见 [Table API](table.md))。
30
+
31
+ ## Events / 事件
32
+
33
+ | Name | Detail | Description (EN) | Description (CN) |
34
+ |------|--------|-------------------|-------------------|
35
+ | aithe-sort-change | { sortKey, sortOrder } | Emitted when a sortable column header is clicked. | 可排序列头被点击时触发。 |
36
+ | aithe-selection-change | { selectionSet } | Emitted when row selection changes. | 行选择变更时触发。 |
37
+ | aithe-row-click | { record, rowIndex } | Emitted when a box is clicked. | 点击 box 时触发。 |
38
+
39
+ ## Examples / 示例
40
+
41
+ ### Basic box mode / 基本盒子模式
42
+
43
+ ```html
44
+ <aithe-box-table
45
+ mode="box"
46
+ box-cols="3"
47
+ columns='[{"id":"name","title":"Module","box":"name"},{"id":"owner","title":"Owner","box":"tags"},{"id":"status","title":"Status","box":"status"}]'
48
+ data='[{"id":1,"name":"Theme Engine","owner":"Design Systems","status":"Ready"},{"id":2,"name":"Component API","owner":"Frontend Platform","status":"Review"}]'
49
+ ></aithe-box-table>
50
+ ```
51
+
52
+ ### Box mode with selection / 盒子模式 + 选择
53
+
54
+ ```html
55
+ <aithe-box-table
56
+ mode="box"
57
+ box-cols="3"
58
+ selectable="multi"
59
+ .selectionSet=${mySet}
60
+ columns='[{"id":"name","title":"Module","box":"name"},{"id":"status","title":"Status","box":"status"}]'
61
+ data='[{"id":1,"name":"Theme Engine","status":"Ready"},{"id":2,"name":"Component API","status":"Review"}]'
62
+ ></aithe-box-table>
63
+ ```
64
+
65
+ ### Table mode (standard) / 表格模式(标准)
66
+
67
+ ```html
68
+ <aithe-box-table
69
+ mode="table"
70
+ columns='[{"id":"name","title":"Name","sortable":true},{"id":"owner","title":"Owner"}]'
71
+ data='[{"name":"Alice","owner":"Team A"},{"name":"Bob","owner":"Team B"}]'
72
+ ></aithe-box-table>
73
+ ```
@@ -20,14 +20,15 @@
20
20
  | itemsJson | String | '' | JSON string of dropdown menu items. | 下拉菜单项的 JSON 字符串。 |
21
21
  | items | AitheTreeNodeMeta[] | [] | Array of dropdown menu item objects. Each item supports `icon` and `variant` (AitheVariant) fields. | 下拉菜单项对象数组。每项支持 `icon` 和 `variant`(AitheVariant)字段。 |
22
22
  | placement | 'bottom-start' \| 'bottom-end' \| 'top-start' \| 'top-end' | 'bottom-start' | Dropdown panel placement. Auto-adapts to viewport. | 下拉面板位置。自动适应视口。 |
23
+ | item-filter | `AitheTreeNodeFilter \| null` | 内置默认值 | Filter callback for menu items. Return `true` to show, `false` to hide. Defaults to `(item) => item.hasPermission !== false` — items with `hasPermission: false` are hidden. Useful for permission control. | 菜单项过滤回调。返回 `true` 显示,`false` 隐藏。默认值为 `(item) => item.hasPermission !== false` — 设置 `hasPermission: false` 的项会被隐藏。适用于权限控制。 |
23
24
  | offset | `number` | 8 | Pixel gap between anchor and dropdown panel. | 锚点与下拉面板之间的像素间距。 |
24
25
 
25
26
  ## Events / 事件
26
27
 
27
28
  | Name | Detail | Description (EN) | Description (CN) |
28
29
  | ----------------- | ------------------ | ------------------------------------- | -------------------- |
29
- | aithe-select | { item, path, id } | Emitted when a menu item is selected. | 菜单项选中时触发。 |
30
- | aithe-open-change | { open } | Emitted when open state changes. | 开关状态变更时触发。 |
30
+ | aithe-select | `{ value, item }` | Emitted when a menu item is selected. Propagated from the inner `<aithe-tree-menu>` (composed event). `value` is the item's `id`, `item` is the full `AitheTreeNodeMeta` object. | 菜单项选中时触发。由内部 `<aithe-tree-menu>` 透传(composed 事件)。`value` 为项的 `id`,`item` 为完整的 `AitheTreeNodeMeta` 对象。 |
31
+ | aithe-dropdown-change | { open } | Emitted when open state changes. | 开关状态变更时触发。 |
31
32
 
32
33
  ## Item Fields / 菜单项字段
33
34
 
@@ -37,6 +37,7 @@ import '@aithe/aithe-ui/components/data/metrics';
37
37
  | showDivider | `boolean` | `false` | `show-divider` | Whether to show a primary-colored divider on the left side. | 是否在左侧显示 primary 颜色的分割线。 |
38
38
  | align | `'left' \| 'center' \| 'right'` | `'center'` | `align` | Text alignment of the metric content. | 指标内容的对齐方式。 |
39
39
  | scale | `'small' \| 'normal' \| 'large'` | `'small'` | `scale` | Size scale of the metric. | 指标的尺寸规格。 |
40
+ | filter | `string` | — | — | Filter expression to format the value. See [Filter](/docs/filter.md). | 用于格式化数值的过滤器表达式。参见 [Filter](/docs/filter.md)。 |
40
41
  | data | `MetricsData \| MetricsData[] \| null` | `null` | — | Data-driven mode: set all properties from one object. Array uses first item. | 数据驱动模式:通过单个对象设置所有属性。数组仅取首项。 |
41
42
  | params | `MetricsData` | `{}` | — | Generic config object. Overrides `data` for overlapping keys. | 通用配置对象。同名键优先级高于 `data`。 |
42
43
 
@@ -47,6 +48,7 @@ import '@aithe/aithe-ui/components/data/metrics';
47
48
  | label | `string` | `''` | Metric label text. | 指标标签文本。 |
48
49
  | value | `string` | `''` | Metric value text. | 指标数值文本。 |
49
50
  | variant | `'default' \| 'primary' \| 'success' \| 'warning' \| 'danger' \| 'neutral'` | `'default'` | Color variant for the value text. | 数值文本的颜色变体。 |
51
+ | filter | `string` | — | Filter expression to format the value. See [Filter](/docs/filter.md). | 用于格式化数值的过滤器表达式。参见 [Filter](/docs/filter.md)。 |
50
52
  | showDivider | `boolean` | `false` | Whether to show a divider. | 是否显示分割线。 |
51
53
  | align | `'left' \| 'center' \| 'right'` | `'center'` | Text alignment of the metric content.| 指标内容的对齐方式。 |
52
54
  | scale | `'small' \| 'normal' \| 'large'` | `'small'` | Size scale of the metric. | 指标的尺寸规格。 |
@@ -9,37 +9,42 @@ Place `<aithe-table-column>` elements as children of `<aithe-table>` to define c
9
9
 
10
10
  ## Properties / 属性
11
11
 
12
- | Name | Type | Default | Attribute | Description (EN) | Description (CN) |
13
- |------|------|---------|-----------|-------------------|-------------------|
14
- | id | `string` | '' | `id` | Unique column key. | 唯一列键。 |
15
- | title | `string` | '' | `title` | Header title. | 表头标题。 |
16
- | dataIndex | `string` | '' | `data-index` | Property path on the data record. Defaults to `id` if empty. | 数据记录上的属性路径。为空时默认使用 `id`。 |
17
- | width | `string` | '' | `width` | Fixed column width. | 固定列宽。 |
18
- | align | 'left' \| 'center' \| 'right' | 'left' | `align` | Text alignment. | 文本对齐方式。 |
19
- | sortable | `boolean` | false | `sortable` | Enable client-side sorting. | 启用客户端排序。 |
20
- | icon | `string` | '' | `icon` | Icon name rendered in the header via aithe-icon. | 通过 aithe-icon 在表头渲染的图标名称。 |
21
- | variant | AitheVariant | 'default' | `variant` | Visual variant / semantic color for the column cells. | 列单元格的视觉变体/语义色。 |
22
- | cellRenderer | Function | undefined | | Custom cell renderer: `(value, record, rowIndex) => unknown`. Only settable via JS property (not an HTML attribute). | 自定义单元格渲染器:`(value, record, rowIndex) => unknown`。仅可通过 JS 属性设置(非 HTML 属性)。 |
12
+ | Name | Type | Default | Attribute | Description (EN) | Description (CN) |
13
+ | ------------ | ----------------------------- | --------- | ------------ | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
14
+ | id | `string` | '' | `id` | Unique column key. | 唯一列键。 |
15
+ | title | `string` | '' | `title` | Header title. | 表头标题。 |
16
+ | dataIndex | `string` | '' | `data-index` | Property path on the data record. Defaults to `id` if empty. | 数据记录上的属性路径。为空时默认使用 `id`。 |
17
+ | width | `string` | '' | `width` | Fixed column width. | 固定列宽。 |
18
+ | minWidth | `string` | '' | `min-width` | Minimum column width (for resizable columns). | 最小列宽(用于可调整宽度的列)。 |
19
+ | align | 'left' \| 'center' \| 'right' | 'left' | `align` | Text alignment. | 文本对齐方式。 |
20
+ | sortable | `boolean` | false | `sortable` | Enable client-side sorting. | 启用客户端排序。 |
21
+ | fixed | AitheColumnFixed \| '' | '' | `fixed` | Fixed column position (`'left'` / `'right'`). The column sticks to the side with shadow indicators. | 固定列位置(`'left'` / `'right'`)。列固定在侧边并显示阴影指示器。 |
22
+ | resizable | `boolean` | false | `resizable` | Enable column width resizing via drag handle on the right edge of the header. | 启用通过表头右侧边缘拖拽手柄调整列宽。 |
23
+ | draggable | `boolean` | false | `draggable` | Enable column drag-to-reorder via drag handle icon in the header. | 启用通过表头拖拽手柄图标拖拽排序列。 |
24
+ | icon | `string` | '' | `icon` | Icon name rendered in the header via aithe-icon. | 通过 aithe-icon 在表头渲染的图标名称。 |
25
+ | variant | AitheVariant | 'default' | `variant` | Visual variant / semantic color for the column cells. | 列单元格的视觉变体/语义色。 |
26
+ | filter | `string` | '' | `filter` | Filter expression to format cell value. See [Filter](/docs/filter.md). | 用于格式化单元格值的过滤器表达式。参见 [Filter](/docs/filter.md)。 |
27
+ | cellRenderer | AitheDataRenderer | undefined | — | Custom cell renderer: `(key, value, record) => unknown`. Only settable via JS property (not an HTML attribute). | 自定义单元格渲染器:`(key, value, record) => unknown`。仅可通过 JS 属性设置(非 HTML 属性)。 |
23
28
 
24
29
  ## cellRenderer Signature / cellRenderer 签名
25
30
 
26
31
  ```typescript
27
- (value: unknown, record: Record<string, unknown>, rowIndex: number) => unknown
32
+ (key: string, value: unknown, record: Record<string, unknown>) => unknown;
28
33
  ```
29
34
 
30
- | Parameter | Type | Description (EN) | Description (CN) |
31
- |-----------|------|-------------------|-------------------|
32
- | value | `unknown` | Cell value resolved from `dataIndex` or `id`. | 从 `dataIndex` 或 `id` 解析的单元格值。 |
33
- | record | `Record<string, unknown>` | The full data record for the current row. | 当前行完整的数据记录。 |
34
- | rowIndex | `number` | Zero-based row index. | 从零开始的行索引。 |
35
- | (return) | `unknown` | Rendered content (string, number, HTMLElement, TemplateResult, etc.). | 渲染内容(字符串、数字、HTMLElement、TemplateResult 等)。 |
35
+ | Parameter | Type | Description (EN) | Description (CN) |
36
+ | --------- | ------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------- |
37
+ | key | `string` | Column id / dataIndex. | id / dataIndex|
38
+ | value | `unknown` | Cell value resolved from `dataIndex` or `id`. | `dataIndex` `id` 解析的单元格值。 |
39
+ | record | `Record<string, unknown>` | The full data record for the current row. | 当前行完整的数据记录。 |
40
+ | (return) | `unknown` | Rendered content (string, number, HTMLElement, TemplateResult, etc.). | 渲染内容(字符串、数字、HTMLElement、TemplateResult 等)。 |
36
41
 
37
42
  ## Examples / 示例
38
43
 
39
44
  ### Basic columns / 基础列
40
45
 
41
46
  ```html
42
- <aithe-table .data=${records} striped>
47
+ <aithe-table .data="${records}" striped>
43
48
  <aithe-table-column id="name" title="Name" sortable></aithe-table-column>
44
49
  <aithe-table-column id="owner" title="Owner"></aithe-table-column>
45
50
  </aithe-table>
@@ -48,11 +53,20 @@ Place `<aithe-table-column>` elements as children of `<aithe-table>` to define c
48
53
  ### Custom cell renderer / 自定义单元格渲染
49
54
 
50
55
  ```html
51
- <aithe-table .data=${records} striped>
56
+ <aithe-table .data="${records}" striped>
52
57
  <aithe-table-column id="name" title="Name" sortable></aithe-table-column>
53
58
  <aithe-table-column id="status" title="Status" variant="success"></aithe-table-column>
54
- <aithe-table-column id="action" title="Action" align="center"
55
- .cellRenderer=${(value, record, rowIndex) => html`<aithe-button type="primary" size="sm">Edit</aithe-button>`}
56
- ></aithe-table-column>
59
+ <aithe-table-column
60
+ id="action"
61
+ title="Action"
62
+ align="center"
63
+ .cellRenderer="${(key,"
64
+ value,
65
+ record)=""
66
+ >
67
+ html`
68
+ <aithe-button type="primary" size="sm">Edit</aithe-button>
69
+ `} >
70
+ </aithe-table-column>
57
71
  </aithe-table>
58
72
  ```