@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.
- package/README.md +19 -11
- package/dist/apps/admin/app.js +12 -0
- package/dist/apps/admin/components/admin-app.js +83 -0
- package/dist/apps/admin/components/admin-layout.d.ts +0 -1
- package/dist/apps/admin/components/admin-layout.d.ts.map +1 -1
- package/dist/apps/admin/components/admin-layout.js +250 -0
- package/dist/apps/admin/datahub/auth.js +24 -0
- package/dist/apps/admin/datahub/dashboard.js +16 -0
- package/dist/apps/admin/datahub/index.js +42 -0
- package/dist/apps/admin/datahub/menu.js +16 -0
- package/dist/apps/admin/datahub/mock/auth.js +11 -0
- package/dist/apps/admin/datahub/mock/dashboard.js +10 -0
- package/dist/apps/admin/datahub/mock/menu.js +42 -0
- package/dist/apps/admin/i18n/de-DE.js +37 -0
- package/dist/apps/admin/i18n/en-US.js +37 -0
- package/dist/apps/admin/i18n/es-ES.js +38 -0
- package/dist/apps/admin/i18n/fr-FR.js +37 -0
- package/dist/apps/admin/i18n/index.js +27 -0
- package/dist/apps/admin/i18n/ja-JP.js +38 -0
- package/dist/apps/admin/i18n/ko-KR.js +37 -0
- package/dist/apps/admin/i18n/pt-BR.js +37 -0
- package/dist/apps/admin/i18n/zh-CN.js +37 -0
- package/dist/apps/admin/i18n/zh-HK.js +37 -0
- package/dist/apps/admin/i18n/zh-TW.js +37 -0
- package/dist/apps/admin/pages/dashboard-page.d.ts +1 -0
- package/dist/apps/admin/pages/dashboard-page.d.ts.map +1 -1
- package/dist/apps/admin/pages/dashboard-page.js +199 -0
- package/dist/apps/admin/pages/login-page.js +278 -0
- package/dist/apps/admin/pages/not-found-page.js +57 -0
- package/dist/apps/admin/pages/role-page.js +76 -0
- package/dist/apps/admin/pages/settings-page.js +95 -0
- package/dist/apps/admin/pages/user-page.js +76 -0
- package/dist/apps/admin/router/index.js +43 -0
- package/dist/apps/admin/standalone.js +1 -0
- package/dist/apps/admin/store/auth.js +42 -0
- package/dist/apps/api/app.js +82 -0
- package/dist/apps/api/demo-data.d.ts.map +1 -1
- package/dist/apps/api/demo-data.js +965 -0
- package/dist/apps/api/docs-viewer.js +684 -0
- package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/api/i18n/de-DE.js +131 -0
- package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/api/i18n/en-US.js +141 -0
- package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/api/i18n/es-ES.js +131 -0
- package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/api/i18n/fr-FR.js +131 -0
- package/dist/apps/api/i18n/index.js +27 -0
- package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/api/i18n/ja-JP.js +131 -0
- package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/api/i18n/ko-KR.js +131 -0
- package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/api/i18n/pt-BR.js +131 -0
- package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-CN.js +141 -0
- package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-HK.js +131 -0
- package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-TW.js +131 -0
- package/dist/apps/api/pages/docs.d.ts.map +1 -1
- package/dist/apps/api/pages/docs.js +369 -0
- package/dist/apps/api/standalone.js +1 -0
- package/dist/apps/demo/app.d.ts.map +1 -1
- package/dist/apps/demo/app.js +275 -0
- package/dist/apps/demo/editor.d.ts.map +1 -1
- package/dist/apps/demo/editor.js +270 -0
- package/dist/apps/demo/helpers.js +7 -0
- package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/demo/i18n/de-DE.js +289 -0
- package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/demo/i18n/en-US.js +301 -0
- package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/demo/i18n/es-ES.js +289 -0
- package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/fr-FR.js +289 -0
- package/dist/apps/demo/i18n/index.js +27 -0
- package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ja-JP.js +289 -0
- package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ko-KR.js +289 -0
- package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/pt-BR.js +289 -0
- package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-CN.js +301 -0
- package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-HK.js +289 -0
- package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-TW.js +289 -0
- package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
- package/dist/apps/demo/pages/autoform.js +422 -0
- package/dist/apps/demo/pages/autoview.d.ts +3 -0
- package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
- package/dist/apps/demo/pages/autoview.js +310 -0
- package/dist/apps/demo/pages/basic.js +157 -0
- package/dist/apps/demo/pages/code.js +1088 -0
- package/dist/apps/demo/pages/container.js +42 -0
- package/dist/apps/demo/pages/dashboard.js +159 -0
- package/dist/apps/demo/pages/data.d.ts.map +1 -1
- package/dist/apps/demo/pages/data.js +327 -0
- package/dist/apps/demo/pages/display.d.ts.map +1 -1
- package/dist/apps/demo/pages/display.js +295 -0
- package/dist/apps/demo/pages/feedback.js +94 -0
- package/dist/apps/demo/pages/form.d.ts.map +1 -1
- package/dist/apps/demo/pages/form.js +119 -0
- package/dist/apps/demo/pages/layout.js +74 -0
- package/dist/apps/demo/pages/navigation.js +54 -0
- package/dist/apps/demo/pages/progress.js +42 -0
- package/dist/apps/demo/pages/theme.js +126 -0
- package/dist/apps/demo/standalone.js +1 -0
- package/dist/components/basic/AGENTS.md +1 -0
- package/dist/components/basic/avatar.js +168 -0
- package/dist/components/basic/badge.js +157 -0
- package/dist/components/basic/button-group.js +70 -0
- package/dist/components/basic/button.d.ts +2 -4
- package/dist/components/basic/button.d.ts.map +1 -1
- package/dist/components/basic/button.js +315 -0
- package/dist/components/basic/card.js +186 -0
- package/dist/components/basic/chip.js +103 -0
- package/dist/components/basic/divider.js +127 -0
- package/dist/components/basic/empty.js +72 -0
- package/dist/components/basic/icon.js +129 -0
- package/dist/components/basic/input.d.ts.map +1 -1
- package/dist/components/basic/input.js +314 -0
- package/dist/components/basic/tag.d.ts +7 -2
- package/dist/components/basic/tag.d.ts.map +1 -1
- package/dist/components/basic/tag.js +248 -0
- package/dist/components/basic/textarea.d.ts +0 -1
- package/dist/components/basic/textarea.d.ts.map +1 -1
- package/dist/components/basic/textarea.js +130 -0
- package/dist/components/container/callout.js +108 -0
- package/dist/components/container/details.js +117 -0
- package/dist/components/container/scroller.js +144 -0
- package/dist/components/container/split-panel.js +150 -0
- package/dist/components/data/AGENTS.md +1 -1
- package/dist/components/data/box-table.d.ts +53 -0
- package/dist/components/data/box-table.d.ts.map +1 -0
- package/dist/components/data/box-table.js +220 -0
- package/dist/components/data/dropdown.d.ts +8 -5
- package/dist/components/data/dropdown.d.ts.map +1 -1
- package/dist/components/data/dropdown.js +219 -0
- package/dist/components/data/metrics-group.js +180 -0
- package/dist/components/data/metrics.d.ts +11 -0
- package/dist/components/data/metrics.d.ts.map +1 -1
- package/dist/components/data/metrics.js +309 -0
- package/dist/components/data/pagination.js +119 -0
- package/dist/components/data/tab-pane.d.ts +58 -12
- package/dist/components/data/tab-pane.d.ts.map +1 -1
- package/dist/components/data/tab-pane.js +130 -0
- package/dist/components/data/table-column.d.ts +29 -5
- package/dist/components/data/table-column.d.ts.map +1 -1
- package/dist/components/data/table-column.js +123 -0
- package/dist/components/data/table.d.ts +134 -54
- package/dist/components/data/table.d.ts.map +1 -1
- package/dist/components/data/table.js +1210 -0
- package/dist/components/data/tabs.d.ts +60 -3
- package/dist/components/data/tabs.d.ts.map +1 -1
- package/dist/components/data/tabs.js +416 -0
- package/dist/components/data/timeline-item.js +127 -0
- package/dist/components/data/timeline.js +204 -0
- package/dist/components/data/tree-menu.d.ts +12 -2
- package/dist/components/data/tree-menu.d.ts.map +1 -1
- package/dist/components/data/tree-menu.js +482 -0
- package/dist/components/data/tree.js +269 -0
- package/dist/components/display/AGENTS.md +5 -2
- package/dist/components/display/animated-image.js +98 -0
- package/dist/components/display/autoview.d.ts +139 -0
- package/dist/components/display/autoview.d.ts.map +1 -0
- package/dist/components/display/autoview.js +460 -0
- package/dist/components/display/brief-box.d.ts +42 -0
- package/dist/components/display/brief-box.d.ts.map +1 -0
- package/dist/components/display/brief-box.js +117 -0
- package/dist/components/display/carousel.js +223 -0
- package/dist/components/display/code-editor.d.ts.map +1 -1
- package/dist/components/display/code-editor.js +976 -0
- package/dist/components/display/comparison.js +132 -0
- package/dist/components/display/desc-item.d.ts +48 -0
- package/dist/components/display/desc-item.d.ts.map +1 -0
- package/dist/components/display/desc-item.js +150 -0
- package/dist/components/display/desc.d.ts +68 -0
- package/dist/components/display/desc.d.ts.map +1 -0
- package/dist/components/display/desc.js +405 -0
- package/dist/components/display/detail-box.d.ts +51 -0
- package/dist/components/display/detail-box.d.ts.map +1 -0
- package/dist/components/display/detail-box.js +157 -0
- package/dist/components/display/label.js +166 -0
- package/dist/components/display/markdown-editor.js +319 -0
- package/dist/components/display/markdown.d.ts.map +1 -1
- package/dist/components/display/markdown.js +193 -0
- package/dist/components/display/mini-box.d.ts +31 -0
- package/dist/components/display/mini-box.d.ts.map +1 -0
- package/dist/components/display/mini-box.js +137 -0
- package/dist/components/display/profile.d.ts +18 -0
- package/dist/components/display/profile.d.ts.map +1 -0
- package/dist/components/display/profile.js +164 -0
- package/dist/components/feedback/AGENTS.md +1 -0
- package/dist/components/feedback/alert.js +150 -0
- package/dist/components/feedback/dialog.js +228 -0
- package/dist/components/feedback/drawer.d.ts.map +1 -1
- package/dist/components/feedback/drawer.js +338 -0
- package/dist/components/feedback/loading.js +130 -0
- package/dist/components/feedback/modal.d.ts.map +1 -1
- package/dist/components/feedback/modal.js +303 -0
- package/dist/components/feedback/notification.js +170 -0
- package/dist/components/feedback/popover.d.ts +1 -1
- package/dist/components/feedback/popover.js +124 -0
- package/dist/components/feedback/toast.js +142 -0
- package/dist/components/feedback/tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip.js +153 -0
- package/dist/components/form/AGENTS.md +4 -0
- package/dist/components/form/autoform-item.d.ts +6 -0
- package/dist/components/form/autoform-item.d.ts.map +1 -1
- package/dist/components/form/autoform-item.js +791 -0
- package/dist/components/form/autoform.d.ts +15 -5
- package/dist/components/form/autoform.d.ts.map +1 -1
- package/dist/components/form/autoform.js +303 -0
- package/dist/components/form/checkbox-group.js +118 -0
- package/dist/components/form/checkbox.js +123 -0
- package/dist/components/form/color-picker.js +148 -0
- package/dist/components/form/combobox.d.ts +4 -0
- package/dist/components/form/combobox.d.ts.map +1 -1
- package/dist/components/form/combobox.js +325 -0
- package/dist/components/form/date-picker.js +123 -0
- package/dist/components/form/form-item.d.ts.map +1 -1
- package/dist/components/form/form-item.js +141 -0
- package/dist/components/form/form.js +94 -0
- package/dist/components/form/radio-group.js +106 -0
- package/dist/components/form/radio.js +110 -0
- package/dist/components/form/rate.js +116 -0
- package/dist/components/form/select.d.ts +5 -1
- package/dist/components/form/select.d.ts.map +1 -1
- package/dist/components/form/select.js +539 -0
- package/dist/components/form/slider.js +134 -0
- package/dist/components/form/switch.js +146 -0
- package/dist/components/form/time-picker.js +92 -0
- package/dist/components/form/transfer.js +273 -0
- package/dist/components/form/upload.js +138 -0
- package/dist/components/framework/body.js +333 -0
- package/dist/components/framework/dashboard-panel.js +519 -0
- package/dist/components/framework/dashboard.d.ts.map +1 -1
- package/dist/components/framework/dashboard.js +1084 -0
- package/dist/components/framework/header.js +237 -0
- package/dist/components/framework/log-panel.js +637 -0
- package/dist/components/framework/page.js +151 -0
- package/dist/components/framework/sidebar.d.ts +4 -10
- package/dist/components/framework/sidebar.d.ts.map +1 -1
- package/dist/components/framework/sidebar.js +477 -0
- package/dist/components/layout/affix.js +137 -0
- package/dist/components/layout/col.js +103 -0
- package/dist/components/layout/collapse-item.js +165 -0
- package/dist/components/layout/collapse.js +108 -0
- package/dist/components/layout/container.js +92 -0
- package/dist/components/layout/flex.js +100 -0
- package/dist/components/layout/row.js +103 -0
- package/dist/components/layout/space.js +85 -0
- package/dist/components/navigation/back-top.js +127 -0
- package/dist/components/navigation/breadcrumb-item.js +108 -0
- package/dist/components/navigation/breadcrumb.js +70 -0
- package/dist/components/navigation/menu-item.js +181 -0
- package/dist/components/navigation/menu.js +126 -0
- package/dist/components/navigation/steps.js +183 -0
- package/dist/components/navigation/sub-menu.d.ts.map +1 -1
- package/dist/components/navigation/sub-menu.js +252 -0
- package/dist/components/progress/progress-bar.js +97 -0
- package/dist/components/progress/progress-ring.js +111 -0
- package/dist/components/progress/skeleton.js +108 -0
- package/dist/components/progress/spinner.js +129 -0
- package/dist/components/theme/locale-switch.js +241 -0
- package/dist/components/theme/shadow-picker.js +233 -0
- package/dist/components/theme/shape-picker.js +232 -0
- package/dist/components/theme/theme-picker.js +236 -0
- package/dist/components/theme/theme-preview.d.ts +1 -2
- package/dist/components/theme/theme-preview.d.ts.map +1 -1
- package/dist/components/theme/theme-preview.js +376 -0
- package/dist/components/theme/theme-switch.d.ts.map +1 -1
- package/dist/components/theme/theme-switch.js +318 -0
- package/dist/components/theme/typo-picker.js +219 -0
- package/dist/core/AGENTS.md +6 -1
- package/dist/core/aithe-element.d.ts +2 -2
- package/dist/core/aithe-element.js +135 -0
- package/dist/core/aithe-widget.js +30 -0
- package/dist/core/anchored-overlay.d.ts +3 -0
- package/dist/core/anchored-overlay.d.ts.map +1 -1
- package/dist/core/anchored-overlay.js +111 -0
- package/dist/core/autoform/autoform.js +79 -0
- package/dist/core/autoform/autoview.d.ts +86 -0
- package/dist/core/autoform/autoview.d.ts.map +1 -0
- package/dist/core/autoform/autoview.js +37 -0
- package/dist/core/autoform/condition.js +170 -0
- package/dist/core/autoform/index.d.ts +2 -0
- package/dist/core/autoform/index.d.ts.map +1 -1
- package/dist/core/autoform/index.js +9 -0
- package/dist/core/autoform/types.js +7 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
- package/dist/core/datahub/__tests__/force-options.test.js +161 -0
- package/dist/core/datahub/config/strategy.d.ts +1 -1
- package/dist/core/datahub/config/strategy.d.ts.map +1 -1
- package/dist/core/datahub/config/strategy.js +50 -0
- package/dist/core/datahub/core/adapter/fetch-adapter.d.ts +1 -1
- package/dist/core/datahub/core/adapter/fetch-adapter.d.ts.map +1 -1
- package/dist/core/datahub/core/adapter/fetch-adapter.js +118 -0
- package/dist/core/datahub/core/adapter/index.js +7 -0
- package/dist/core/datahub/core/adapter/mock-adapter.d.ts +1 -1
- package/dist/core/datahub/core/adapter/mock-adapter.d.ts.map +1 -1
- package/dist/core/datahub/core/adapter/mock-adapter.js +58 -0
- package/dist/core/datahub/core/api-styles.d.ts +1 -1
- package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
- package/dist/core/datahub/core/api-styles.js +136 -0
- package/dist/core/datahub/core/datahub-core.d.ts +53 -3
- package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
- package/dist/core/datahub/core/datahub-core.js +520 -0
- package/dist/core/datahub/core/index.js +7 -0
- package/dist/core/datahub/index.js +50 -0
- package/dist/core/datahub/types.d.ts +24 -0
- package/dist/core/datahub/types.d.ts.map +1 -1
- package/dist/core/datahub/types.js +31 -0
- package/dist/core/datahub/utils/cache.js +55 -0
- package/dist/core/datahub/utils/common.js +23 -0
- package/dist/core/datahub/utils/dedup.d.ts +1 -1
- package/dist/core/datahub/utils/dedup.d.ts.map +1 -1
- package/dist/core/datahub/utils/dedup.js +52 -0
- package/dist/core/datahub/utils/idempotent.js +61 -0
- package/dist/core/datahub/utils/is-query.js +53 -0
- package/dist/core/datahub/utils/loading.js +78 -0
- package/dist/core/filter/__tests__/index.test.d.ts +2 -0
- package/dist/core/filter/__tests__/index.test.d.ts.map +1 -0
- package/dist/core/filter/__tests__/index.test.js +230 -0
- package/dist/core/filter/builtins.d.ts +60 -0
- package/dist/core/filter/builtins.d.ts.map +1 -0
- package/dist/core/filter/builtins.js +172 -0
- package/dist/core/filter/factory.d.ts +54 -0
- package/dist/core/filter/factory.d.ts.map +1 -0
- package/dist/core/filter/factory.js +96 -0
- package/dist/core/filter/index.d.ts +11 -0
- package/dist/core/filter/index.d.ts.map +1 -0
- package/dist/core/filter/index.js +9 -0
- package/dist/core/filter/types.d.ts +12 -0
- package/dist/core/filter/types.d.ts.map +1 -0
- package/dist/core/filter/types.js +1 -0
- package/dist/core/floating.js +132 -0
- package/dist/core/highlight/index.js +43 -0
- package/dist/core/highlight/lang-bash.js +27 -0
- package/dist/core/highlight/lang-c.js +27 -0
- package/dist/core/highlight/lang-cmake.js +27 -0
- package/dist/core/highlight/lang-cpp.js +27 -0
- package/dist/core/highlight/lang-css.js +24 -0
- package/dist/core/highlight/lang-dart.js +27 -0
- package/dist/core/highlight/lang-dockerfile.js +16 -0
- package/dist/core/highlight/lang-fsharp.js +23 -0
- package/dist/core/highlight/lang-go.js +22 -0
- package/dist/core/highlight/lang-html.js +12 -0
- package/dist/core/highlight/lang-java.js +22 -0
- package/dist/core/highlight/lang-javascript.js +26 -0
- package/dist/core/highlight/lang-json.js +13 -0
- package/dist/core/highlight/lang-jsonline.js +13 -0
- package/dist/core/highlight/lang-jsx.js +30 -0
- package/dist/core/highlight/lang-kotlin.js +27 -0
- package/dist/core/highlight/lang-latex.js +22 -0
- package/dist/core/highlight/lang-lua.js +26 -0
- package/dist/core/highlight/lang-makefile.js +22 -0
- package/dist/core/highlight/lang-markdown.js +18 -0
- package/dist/core/highlight/lang-objectivec.js +24 -0
- package/dist/core/highlight/lang-perl.js +30 -0
- package/dist/core/highlight/lang-powershell.js +23 -0
- package/dist/core/highlight/lang-python.js +27 -0
- package/dist/core/highlight/lang-r.js +21 -0
- package/dist/core/highlight/lang-ruby.js +29 -0
- package/dist/core/highlight/lang-rust.js +24 -0
- package/dist/core/highlight/lang-scala.js +26 -0
- package/dist/core/highlight/lang-sql.js +21 -0
- package/dist/core/highlight/lang-svelte.js +27 -0
- package/dist/core/highlight/lang-swift.js +28 -0
- package/dist/core/highlight/lang-tsx.js +35 -0
- package/dist/core/highlight/lang-typescript.js +31 -0
- package/dist/core/highlight/lang-vue.js +29 -0
- package/dist/core/highlight/lang-wasm.js +22 -0
- package/dist/core/highlight/lang-xml.js +12 -0
- package/dist/core/highlight/lang-yaml.js +14 -0
- package/dist/core/highlight/registry.js +99 -0
- package/dist/core/logger/LoggerCore.js +626 -0
- package/dist/core/logger/index.js +10 -0
- package/dist/core/logger/types.js +29 -0
- package/dist/core/markdown/index.js +20 -0
- package/dist/core/markdown/parser.d.ts +2 -0
- package/dist/core/markdown/parser.d.ts.map +1 -1
- package/dist/core/markdown/parser.js +376 -0
- package/dist/core/markdown/plugins.d.ts +2 -1
- package/dist/core/markdown/plugins.d.ts.map +1 -1
- package/dist/core/markdown/plugins.js +755 -0
- package/dist/core/markdown/types.d.ts +5 -0
- package/dist/core/markdown/types.d.ts.map +1 -1
- package/dist/core/markdown/types.js +7 -0
- package/dist/core/router/index.js +244 -0
- package/dist/core/styles.js +44 -0
- package/dist/core/types.d.ts +52 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3695 -1622
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1844 -758
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/aithe-ui.d.ts +23 -0
- package/dist/styles/aithe-ui.d.ts.map +1 -1
- package/dist/styles/aithe-ui.js +185 -0
- package/dist/styles/global.css.d.ts +1 -1
- package/dist/styles/global.css.d.ts.map +1 -1
- package/dist/styles/global.css.js +119 -0
- package/dist/styles/i18n/index.js +206 -0
- package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
- package/dist/styles/i18n/locales/de-DE.js +151 -0
- package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
- package/dist/styles/i18n/locales/en-US.js +160 -0
- package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
- package/dist/styles/i18n/locales/es-ES.js +151 -0
- package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/fr-FR.js +151 -0
- package/dist/styles/i18n/locales/index.js +14 -0
- package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ja-JP.js +151 -0
- package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ko-KR.js +151 -0
- package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/pt-BR.js +151 -0
- package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-CN.js +160 -0
- package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-HK.js +151 -0
- package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-TW.js +151 -0
- package/dist/styles/layout/index.js +88 -0
- package/dist/styles/mixins.js +43 -0
- package/dist/styles/shadow/cyber.js +19 -0
- package/dist/styles/shadow/deep.js +19 -0
- package/dist/styles/shadow/diffuse.js +19 -0
- package/dist/styles/shadow/flat.js +19 -0
- package/dist/styles/shadow/glassmorphism.js +19 -0
- package/dist/styles/shadow/index.js +129 -0
- package/dist/styles/shadow/neumorphism.js +21 -0
- package/dist/styles/shadow/retro.js +19 -0
- package/dist/styles/shadow/sharp-business.js +19 -0
- package/dist/styles/shadow/skeuomorphic.js +21 -0
- package/dist/styles/shape/chamfer.js +19 -0
- package/dist/styles/shape/circle.js +19 -0
- package/dist/styles/shape/index.js +174 -0
- package/dist/styles/shape/organic.js +19 -0
- package/dist/styles/shape/pill.js +19 -0
- package/dist/styles/shape/rounded.js +21 -0
- package/dist/styles/shape/rounder.js +19 -0
- package/dist/styles/shape/sharp.js +19 -0
- package/dist/styles/shape/smooth.js +19 -0
- package/dist/styles/theme/aliyun.d.ts +1 -1
- package/dist/styles/theme/aliyun.d.ts.map +1 -1
- package/dist/styles/theme/aliyun.js +102 -0
- package/dist/styles/theme/amber.d.ts +1 -1
- package/dist/styles/theme/amber.d.ts.map +1 -1
- package/dist/styles/theme/amber.js +101 -0
- package/dist/styles/theme/blue.d.ts +1 -1
- package/dist/styles/theme/blue.d.ts.map +1 -1
- package/dist/styles/theme/blue.js +101 -0
- package/dist/styles/theme/charcoal.d.ts +1 -1
- package/dist/styles/theme/charcoal.d.ts.map +1 -1
- package/dist/styles/theme/charcoal.js +106 -0
- package/dist/styles/theme/cyan.d.ts +1 -1
- package/dist/styles/theme/cyan.d.ts.map +1 -1
- package/dist/styles/theme/cyan.js +96 -0
- package/dist/styles/theme/dark.d.ts +1 -1
- package/dist/styles/theme/dark.d.ts.map +1 -1
- package/dist/styles/theme/dark.js +106 -0
- package/dist/styles/theme/ebony.d.ts +1 -1
- package/dist/styles/theme/ebony.d.ts.map +1 -1
- package/dist/styles/theme/ebony.js +106 -0
- package/dist/styles/theme/festive.d.ts +1 -1
- package/dist/styles/theme/festive.d.ts.map +1 -1
- package/dist/styles/theme/festive.js +101 -0
- package/dist/styles/theme/graphite.d.ts +1 -1
- package/dist/styles/theme/graphite.d.ts.map +1 -1
- package/dist/styles/theme/graphite.js +106 -0
- package/dist/styles/theme/gray.d.ts +1 -1
- package/dist/styles/theme/gray.d.ts.map +1 -1
- package/dist/styles/theme/gray.js +101 -0
- package/dist/styles/theme/huawei.d.ts +1 -1
- package/dist/styles/theme/huawei.d.ts.map +1 -1
- package/dist/styles/theme/huawei.js +102 -0
- package/dist/styles/theme/index.d.ts +1 -1
- package/dist/styles/theme/index.d.ts.map +1 -1
- package/dist/styles/theme/index.js +276 -0
- package/dist/styles/theme/indigo.d.ts +1 -1
- package/dist/styles/theme/indigo.d.ts.map +1 -1
- package/dist/styles/theme/indigo.js +101 -0
- package/dist/styles/theme/ink.d.ts +1 -1
- package/dist/styles/theme/ink.d.ts.map +1 -1
- package/dist/styles/theme/ink.js +106 -0
- package/dist/styles/theme/light.d.ts +1 -1
- package/dist/styles/theme/light.d.ts.map +1 -1
- package/dist/styles/theme/light.js +102 -0
- package/dist/styles/theme/midnight.d.ts +1 -1
- package/dist/styles/theme/midnight.d.ts.map +1 -1
- package/dist/styles/theme/midnight.js +106 -0
- package/dist/styles/theme/navy.d.ts +1 -1
- package/dist/styles/theme/navy.d.ts.map +1 -1
- package/dist/styles/theme/navy.js +106 -0
- package/dist/styles/theme/obsidian.d.ts +1 -1
- package/dist/styles/theme/obsidian.d.ts.map +1 -1
- package/dist/styles/theme/obsidian.js +106 -0
- package/dist/styles/theme/onyx.d.ts +1 -1
- package/dist/styles/theme/onyx.d.ts.map +1 -1
- package/dist/styles/theme/onyx.js +106 -0
- package/dist/styles/theme/orange.d.ts +1 -1
- package/dist/styles/theme/orange.d.ts.map +1 -1
- package/dist/styles/theme/orange.js +101 -0
- package/dist/styles/theme/pink.d.ts +1 -1
- package/dist/styles/theme/pink.d.ts.map +1 -1
- package/dist/styles/theme/pink.js +101 -0
- package/dist/styles/theme/purple.d.ts +1 -1
- package/dist/styles/theme/purple.d.ts.map +1 -1
- package/dist/styles/theme/purple.js +101 -0
- package/dist/styles/theme/raisin.d.ts +1 -1
- package/dist/styles/theme/raisin.d.ts.map +1 -1
- package/dist/styles/theme/raisin.js +106 -0
- package/dist/styles/theme/slate.d.ts +1 -1
- package/dist/styles/theme/slate.d.ts.map +1 -1
- package/dist/styles/theme/slate.js +106 -0
- package/dist/styles/theme/teal.d.ts +1 -1
- package/dist/styles/theme/teal.d.ts.map +1 -1
- package/dist/styles/theme/teal.js +101 -0
- package/dist/styles/theme/tianyi.d.ts +1 -1
- package/dist/styles/theme/tianyi.d.ts.map +1 -1
- package/dist/styles/theme/tianyi.js +102 -0
- package/dist/styles/types.js +1 -0
- package/dist/styles/typo/business.js +34 -0
- package/dist/styles/typo/compact.js +34 -0
- package/dist/styles/typo/index.js +99 -0
- package/dist/styles/typo/luxury.js +34 -0
- package/dist/styles/typo/minimal.js +34 -0
- package/dist/types/index.js +2 -0
- package/dist/utils/dom.js +51 -0
- package/dist/utils/events.js +32 -0
- package/dist/utils/icon.js +176 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/utils.d.ts +5 -5
- package/dist/utils/utils.js +89 -0
- package/dist/utils/validation.js +52 -0
- package/docs/api/basic/button.md +9 -6
- package/docs/api/basic/tag.md +24 -17
- package/docs/api/data/box-table.md +73 -0
- package/docs/api/data/dropdown.md +3 -2
- package/docs/api/data/metrics.md +2 -0
- package/docs/api/data/table-column.md +37 -23
- package/docs/api/data/table.md +158 -44
- package/docs/api/data/tabs.md +46 -1
- package/docs/api/data/tree-menu.md +55 -2
- package/docs/api/display/autoview.md +277 -0
- package/docs/api/display/box.md +66 -0
- package/docs/api/display/brief-box.md +73 -0
- package/docs/api/display/desc-item.md +57 -0
- package/docs/api/display/desc.md +246 -0
- package/docs/api/display/detail-box.md +75 -0
- package/docs/api/display/mini-box.md +100 -0
- package/docs/api/display/profile.md +92 -0
- package/docs/api/feedback/popover.md +10 -10
- package/docs/api/feedback/tooltip.md +14 -14
- package/docs/api/form/autoform-item.md +115 -0
- package/docs/api/form/autoform.md +7 -3
- package/docs/api/form/combobox.md +27 -7
- package/docs/api/form/select.md +50 -28
- package/docs/api/framework/log-panel.md +46 -0
- package/docs/api/framework/sidebar.md +3 -2
- package/docs/api/summary.md +46 -35
- package/docs/api/theme/theme-switch.md +1 -1
- package/docs/autoform.md +14 -33
- package/docs/changelog/CHANGELOG.md +155 -0
- package/docs/changelog/VERSION_26.3.1.md +966 -0
- package/docs/changelog/VERSION_26.3.2.md +852 -0
- package/docs/datahub.md +4 -1
- package/docs/filter.md +332 -0
- package/docs/framework-integration.md +2 -2
- package/docs/guide.md +72 -6
- package/docs/i18n.md +2 -4
- package/docs/issue/26.3.1/issue_26.3.1.0.md +84 -0
- package/docs/issue/26.3.1/issue_26.3.1.1.md +72 -0
- package/docs/issue/26.3.1/issue_26.3.1.2.md +75 -0
- package/docs/issue/26.3.1/issue_26.3.1.3.md +78 -0
- package/docs/issue/26.3.1/issue_26.3.1.4.md +113 -0
- package/docs/issue/26.3.1/issue_26.3.1.5.md +142 -0
- package/docs/issue/26.3.1/issue_26.3.1.6.md +100 -0
- package/docs/issue/26.3.1/issue_26.3.1.7.md +78 -0
- package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
- package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
- package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
- package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
- package/docs/issue/AGENTS.md +24 -3
- package/docs/markdown.md +2 -2
- package/docs/quickstart.md +5 -5
- package/docs/theming.md +5 -4
- package/package.json +5 -2
- package/dist/components/navigation/dropdown.d.ts +0 -56
- package/dist/components/navigation/dropdown.d.ts.map +0 -1
- /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
- /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
- /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
- /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
- /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
- /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
- /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
- /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
- /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
- /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
- /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
- /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
- /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
- /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
- /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
- /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
- /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
- /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
11
|
+
import { aitheBaseStyles, aitheScrollbarStyles } from '../../core/styles';
|
|
12
|
+
/**
|
|
13
|
+
* Themed scroll container with optional shadow edges and scrollbar control.
|
|
14
|
+
* 主题化滚动容器,支持可选阴影边缘和滚动条控制。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for scrollable content. 可滚动内容的默认插槽。
|
|
17
|
+
*
|
|
18
|
+
* @fires aithe-scroll - Emitted on scroll with `{ top, left }`. 滚动时发出 `{ top, left }`。
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <aithe-scroller height="300px" shadow scrollbar>
|
|
23
|
+
* <p>Long content here...</p>
|
|
24
|
+
* </aithe-scroller>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
let AitheScroller = class AitheScroller extends AitheElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/** Fixed height of the scroll area (CSS value). 滚动区域的固定高度(CSS 值)。 */
|
|
31
|
+
this.height = '';
|
|
32
|
+
/** Maximum height of the scroll area (CSS value). 滚动区域的最大高度(CSS 值)。 */
|
|
33
|
+
this.maxHeight = '';
|
|
34
|
+
/** Whether to show gradient shadows at scroll edges. 是否在滚动边缘显示渐变阴影。 */
|
|
35
|
+
this.shadow = false;
|
|
36
|
+
/** Whether to show the native scrollbar. 是否显示原生滚动条。 */
|
|
37
|
+
this.scrollbar = true;
|
|
38
|
+
this.shadowTop = false;
|
|
39
|
+
this.shadowBottom = false;
|
|
40
|
+
this.handleScroll = (event) => {
|
|
41
|
+
const element = event.currentTarget;
|
|
42
|
+
this.shadowTop = element.scrollTop > 0;
|
|
43
|
+
this.shadowBottom = element.scrollTop + element.clientHeight < element.scrollHeight;
|
|
44
|
+
this.emit('aithe-scroll', {
|
|
45
|
+
top: element.scrollTop,
|
|
46
|
+
left: element.scrollLeft,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static { this.styles = [
|
|
51
|
+
aitheBaseStyles,
|
|
52
|
+
aitheScrollbarStyles,
|
|
53
|
+
css `
|
|
54
|
+
:host {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.wrap {
|
|
59
|
+
position: relative;
|
|
60
|
+
overflow: auto;
|
|
61
|
+
border: 1px solid var(--aithe-color-border);
|
|
62
|
+
border-radius: var(--aithe-container-radius-lg);
|
|
63
|
+
background: var(--aithe-color-surface-elevated);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.wrap.no-scrollbar {
|
|
67
|
+
scrollbar-width: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.wrap.no-scrollbar::-webkit-scrollbar {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.wrap::before,
|
|
75
|
+
.wrap::after {
|
|
76
|
+
content: '';
|
|
77
|
+
position: sticky;
|
|
78
|
+
left: 0;
|
|
79
|
+
right: 0;
|
|
80
|
+
display: block;
|
|
81
|
+
height: 16px;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.wrap.shadow-top::before {
|
|
86
|
+
top: 0;
|
|
87
|
+
background: linear-gradient(180deg, rgba(11, 17, 29, 0.14), transparent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.wrap.shadow-bottom::after {
|
|
91
|
+
bottom: 0;
|
|
92
|
+
background: linear-gradient(0deg, rgba(11, 17, 29, 0.14), transparent);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.inner {
|
|
96
|
+
padding: var(--aithe-space-4);
|
|
97
|
+
}
|
|
98
|
+
`,
|
|
99
|
+
]; }
|
|
100
|
+
render() {
|
|
101
|
+
const style = [
|
|
102
|
+
this.height ? `height:${this.height};` : '',
|
|
103
|
+
this.maxHeight ? `max-height:${this.maxHeight};` : '',
|
|
104
|
+
].join('');
|
|
105
|
+
return html `
|
|
106
|
+
<div
|
|
107
|
+
class=${classMap({
|
|
108
|
+
wrap: true,
|
|
109
|
+
'no-scrollbar': !this.scrollbar,
|
|
110
|
+
'shadow-top': this.shadow && this.shadowTop,
|
|
111
|
+
'shadow-bottom': this.shadow && this.shadowBottom,
|
|
112
|
+
})}
|
|
113
|
+
style=${style}
|
|
114
|
+
@scroll=${this.handleScroll}
|
|
115
|
+
>
|
|
116
|
+
<div class="inner">
|
|
117
|
+
<slot></slot>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
`;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: String })
|
|
125
|
+
], AitheScroller.prototype, "height", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: String, attribute: 'max-height' })
|
|
128
|
+
], AitheScroller.prototype, "maxHeight", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: Boolean })
|
|
131
|
+
], AitheScroller.prototype, "shadow", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: Boolean })
|
|
134
|
+
], AitheScroller.prototype, "scrollbar", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
state()
|
|
137
|
+
], AitheScroller.prototype, "shadowTop", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
state()
|
|
140
|
+
], AitheScroller.prototype, "shadowBottom", void 0);
|
|
141
|
+
AitheScroller = __decorate([
|
|
142
|
+
customElement('aithe-scroller')
|
|
143
|
+
], AitheScroller);
|
|
144
|
+
export { AitheScroller };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
11
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
12
|
+
/**
|
|
13
|
+
* Resizable two-panel layout with a draggable divider.
|
|
14
|
+
* 可调整大小的双面板布局,带可拖动分隔条。
|
|
15
|
+
*
|
|
16
|
+
* @slot start - Content for the first (start) pane. 第一个(起始)面板的内容。
|
|
17
|
+
* @slot end - Content for the second (end) pane. 第二个(末尾)面板的内容。
|
|
18
|
+
*
|
|
19
|
+
* @fires aithe-resize - Emitted when the divider is dragged with `{ value }`. 分隔条被拖动时发出 `{ value }`。
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <aithe-split-panel direction="horizontal" value="40" min-size="20" max-size="80">
|
|
24
|
+
* <div slot="start">Left pane</div>
|
|
25
|
+
* <div slot="end">Right pane</div>
|
|
26
|
+
* </aithe-split-panel>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
let AitheSplitPanel = class AitheSplitPanel extends AitheElement {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
/** Layout direction of the split. 分割布局的方向。 */
|
|
33
|
+
this.direction = 'horizontal';
|
|
34
|
+
/** Minimum size of the start pane as a percentage. 起始面板的最小百分比尺寸。 */
|
|
35
|
+
this.minSize = 20;
|
|
36
|
+
/** Maximum size of the start pane as a percentage. 起始面板的最大百分比尺寸。 */
|
|
37
|
+
this.maxSize = 80;
|
|
38
|
+
/** Current split position as a percentage (0–100). 当前分割位置百分比(0–100)。 */
|
|
39
|
+
this.value = 50;
|
|
40
|
+
this.dragging = false;
|
|
41
|
+
this.handlePointerDown = () => {
|
|
42
|
+
this.dragging = true;
|
|
43
|
+
};
|
|
44
|
+
this.handlePointerMove = (event) => {
|
|
45
|
+
if (!this.dragging) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const rect = this.getBoundingClientRect();
|
|
49
|
+
const raw = this.direction === 'horizontal'
|
|
50
|
+
? ((event.clientX - rect.left) / rect.width) * 100
|
|
51
|
+
: ((event.clientY - rect.top) / rect.height) * 100;
|
|
52
|
+
this.value = Math.max(this.minSize, Math.min(this.maxSize, raw));
|
|
53
|
+
this.emit('aithe-resize', { value: this.value });
|
|
54
|
+
};
|
|
55
|
+
this.handlePointerUp = () => {
|
|
56
|
+
this.dragging = false;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static { this.styles = [
|
|
60
|
+
aitheBaseStyles,
|
|
61
|
+
css `
|
|
62
|
+
:host {
|
|
63
|
+
display: block;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.split {
|
|
67
|
+
display: grid;
|
|
68
|
+
width: 100%;
|
|
69
|
+
min-height: 280px;
|
|
70
|
+
border: 1px solid var(--aithe-color-border);
|
|
71
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
background: var(--aithe-color-surface-elevated);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.split.horizontal {
|
|
77
|
+
grid-template-columns: minmax(0, var(--aithe-split-start, 50%)) 12px minmax(0, 1fr);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.split.vertical {
|
|
81
|
+
grid-template-rows: minmax(0, var(--aithe-split-start, 50%)) 12px minmax(0, 1fr);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.pane {
|
|
85
|
+
min-width: 0;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
padding: var(--aithe-space-4);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.handle {
|
|
91
|
+
background: var(--aithe-color-surface-muted);
|
|
92
|
+
cursor: col-resize;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vertical .handle {
|
|
96
|
+
cursor: row-resize;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.handle.dragging {
|
|
100
|
+
background: var(--aithe-primary-5);
|
|
101
|
+
}
|
|
102
|
+
`,
|
|
103
|
+
]; }
|
|
104
|
+
connectedCallback() {
|
|
105
|
+
super.connectedCallback();
|
|
106
|
+
document.addEventListener('pointermove', this.handlePointerMove);
|
|
107
|
+
document.addEventListener('pointerup', this.handlePointerUp);
|
|
108
|
+
}
|
|
109
|
+
disconnectedCallback() {
|
|
110
|
+
super.disconnectedCallback();
|
|
111
|
+
document.removeEventListener('pointermove', this.handlePointerMove);
|
|
112
|
+
document.removeEventListener('pointerup', this.handlePointerUp);
|
|
113
|
+
}
|
|
114
|
+
updated() {
|
|
115
|
+
this.style.setProperty('--aithe-split-start', `${this.value}%`);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return html `
|
|
119
|
+
<div class=${classMap({ split: true, [this.direction]: true })}>
|
|
120
|
+
<div class="pane"><slot name="start"></slot></div>
|
|
121
|
+
<div
|
|
122
|
+
class=${classMap({ handle: true, dragging: this.dragging })}
|
|
123
|
+
role="separator"
|
|
124
|
+
aria-orientation=${this.direction === 'horizontal' ? 'vertical' : 'horizontal'}
|
|
125
|
+
@pointerdown=${this.handlePointerDown}
|
|
126
|
+
></div>
|
|
127
|
+
<div class="pane"><slot name="end"></slot></div>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: String })
|
|
134
|
+
], AitheSplitPanel.prototype, "direction", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: Number, attribute: 'min-size' })
|
|
137
|
+
], AitheSplitPanel.prototype, "minSize", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ type: Number, attribute: 'max-size' })
|
|
140
|
+
], AitheSplitPanel.prototype, "maxSize", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Number })
|
|
143
|
+
], AitheSplitPanel.prototype, "value", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
state()
|
|
146
|
+
], AitheSplitPanel.prototype, "dragging", void 0);
|
|
147
|
+
AitheSplitPanel = __decorate([
|
|
148
|
+
customElement('aithe-split-panel')
|
|
149
|
+
], AitheSplitPanel);
|
|
150
|
+
export { AitheSplitPanel };
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
- `aithe-tabs` + `aithe-tab-pane` 配合使用,通过 `active-key` 控制当前标签
|
|
31
31
|
- `aithe-tree` 通过 `data` 属性传入树形数据结构
|
|
32
32
|
- `aithe-timeline` 支持数据驱动模式(通过 `items` 属性)和插槽模式
|
|
33
|
-
- `aithe-dropdown` 依赖 `anchored-overlay` 实现浮层定位,内部使用 `aithe-tree-menu`
|
|
33
|
+
- `aithe-dropdown` 依赖 `anchored-overlay` 实现浮层定位,内部使用 `aithe-tree-menu` 渲染菜单,开关状态变更事件名为 `aithe-dropdown-change`
|
|
34
34
|
- 新增组件需同步更新 `src/index.ts` 和 `docs/api/data/`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file AitheBoxTable — table/box dual-mode data display / AitheBoxTable — 表格/盒子双模式数据展示
|
|
3
|
+
* @description AitheBoxTable extends AitheTable with a `mode` property.
|
|
4
|
+
* When `mode="table"`, it behaves like a standard table.
|
|
5
|
+
* When `mode="box"`, it renders records as a grid of boxes using `aithe-brief-box`.
|
|
6
|
+
* Column definitions with a `box` property map data to the corresponding slot.
|
|
7
|
+
* AitheBoxTable 扩展 AitheTable,增加 `mode` 属性。
|
|
8
|
+
* 当 `mode="table"` 时,行为与标准表格一致。
|
|
9
|
+
* 当 `mode="box"` 时,使用 `aithe-brief-box` 将记录渲染为盒子网格。
|
|
10
|
+
* 带有 `box` 属性的列定义将数据映射到对应的 slot。
|
|
11
|
+
*
|
|
12
|
+
* @fires aithe-sort-change - Emitted when a sortable column header is clicked with `{ sortKey, sortOrder }`. 可排序列头被点击时发出 `{ sortKey, sortOrder }`。
|
|
13
|
+
* @fires aithe-selection-change - Emitted when row selection changes with `{ selectionSet }`. 行选择变更时发出 `{ selectionSet }`。
|
|
14
|
+
* @fires aithe-row-click - Emitted when a box is clicked with `{ record, rowIndex }`. 点击 box 时发出 `{ record, rowIndex }`。
|
|
15
|
+
*
|
|
16
|
+
* @example Data-driven mode with box view / 数据驱动模式 + 盒子视图
|
|
17
|
+
* ```html
|
|
18
|
+
* <aithe-box-table
|
|
19
|
+
* mode="box"
|
|
20
|
+
* columns-json='[{"id":"name","title":"Name","box":"name"},{"id":"status","title":"Status","box":"status"},{"id":"owner","title":"Owner","box":"tags"}]'
|
|
21
|
+
* data-json='[{"name":"Alice","status":"Active","owner":"Team A"},{"name":"Bob","status":"Inactive","owner":"Team B"}]'
|
|
22
|
+
* box-cols="3"
|
|
23
|
+
* ></aithe-box-table>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
import { type TemplateResult } from 'lit';
|
|
27
|
+
import { AitheTable } from './table';
|
|
28
|
+
import '../display/brief-box';
|
|
29
|
+
export declare class AitheBoxTable extends AitheTable {
|
|
30
|
+
/**
|
|
31
|
+
* Display mode: "table" for standard table view, "box" for box grid view.
|
|
32
|
+
* 显示模式:"table" 为标准表格视图,"box" 为盒子网格视图。
|
|
33
|
+
*/
|
|
34
|
+
mode: 'table' | 'box';
|
|
35
|
+
/**
|
|
36
|
+
* Number of box columns in box mode (1–12). 盒子模式下每行显示的盒子数(1–12)。
|
|
37
|
+
*/
|
|
38
|
+
boxCols: number;
|
|
39
|
+
static readonly styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
40
|
+
private get boxColumns();
|
|
41
|
+
private getBoxRecordKey;
|
|
42
|
+
private handleBoxClick;
|
|
43
|
+
private renderBoxValue;
|
|
44
|
+
private renderBoxCard;
|
|
45
|
+
render(): TemplateResult<1>;
|
|
46
|
+
private handleBriefBoxSelect;
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
'aithe-box-table': AitheBoxTable;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=box-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-table.d.ts","sourceRoot":"","sources":["../../../src/components/data/box-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,OAAO,+BAA+B,CAAC;AAIvC,qBACa,aAAc,SAAQ,UAAU;IAC3C;;;OAGG;IACyB,IAAI,EAAE,OAAO,GAAG,KAAK,CAAW;IAE5D;;OAEG;IACgD,OAAO,SAAK;IAE/D,gBAAyB,MAAM,0DAiC7B;IAEF,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;IA0CZ,MAAM;IAoDf,OAAO,CAAC,oBAAoB;CAmB7B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @file AitheBoxTable — table/box dual-mode data display / AitheBoxTable — 表格/盒子双模式数据展示
|
|
9
|
+
* @description AitheBoxTable extends AitheTable with a `mode` property.
|
|
10
|
+
* When `mode="table"`, it behaves like a standard table.
|
|
11
|
+
* When `mode="box"`, it renders records as a grid of boxes using `aithe-brief-box`.
|
|
12
|
+
* Column definitions with a `box` property map data to the corresponding slot.
|
|
13
|
+
* AitheBoxTable 扩展 AitheTable,增加 `mode` 属性。
|
|
14
|
+
* 当 `mode="table"` 时,行为与标准表格一致。
|
|
15
|
+
* 当 `mode="box"` 时,使用 `aithe-brief-box` 将记录渲染为盒子网格。
|
|
16
|
+
* 带有 `box` 属性的列定义将数据映射到对应的 slot。
|
|
17
|
+
*
|
|
18
|
+
* @fires aithe-sort-change - Emitted when a sortable column header is clicked with `{ sortKey, sortOrder }`. 可排序列头被点击时发出 `{ sortKey, sortOrder }`。
|
|
19
|
+
* @fires aithe-selection-change - Emitted when row selection changes with `{ selectionSet }`. 行选择变更时发出 `{ selectionSet }`。
|
|
20
|
+
* @fires aithe-row-click - Emitted when a box is clicked with `{ record, rowIndex }`. 点击 box 时发出 `{ record, rowIndex }`。
|
|
21
|
+
*
|
|
22
|
+
* @example Data-driven mode with box view / 数据驱动模式 + 盒子视图
|
|
23
|
+
* ```html
|
|
24
|
+
* <aithe-box-table
|
|
25
|
+
* mode="box"
|
|
26
|
+
* columns-json='[{"id":"name","title":"Name","box":"name"},{"id":"status","title":"Status","box":"status"},{"id":"owner","title":"Owner","box":"tags"}]'
|
|
27
|
+
* data-json='[{"name":"Alice","status":"Active","owner":"Team A"},{"name":"Bob","status":"Inactive","owner":"Team B"}]'
|
|
28
|
+
* box-cols="3"
|
|
29
|
+
* ></aithe-box-table>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { css, html, nothing } from 'lit';
|
|
33
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
34
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
35
|
+
import { AitheTable } from './table';
|
|
36
|
+
import { getValueByPath, safeStringify } from '../../utils/utils';
|
|
37
|
+
import { t } from '../../styles/i18n';
|
|
38
|
+
import '../display/brief-box';
|
|
39
|
+
let AitheBoxTable = class AitheBoxTable extends AitheTable {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
/**
|
|
43
|
+
* Display mode: "table" for standard table view, "box" for box grid view.
|
|
44
|
+
* 显示模式:"table" 为标准表格视图,"box" 为盒子网格视图。
|
|
45
|
+
*/
|
|
46
|
+
this.mode = 'table';
|
|
47
|
+
/**
|
|
48
|
+
* Number of box columns in box mode (1–12). 盒子模式下每行显示的盒子数(1–12)。
|
|
49
|
+
*/
|
|
50
|
+
this.boxCols = 0;
|
|
51
|
+
}
|
|
52
|
+
static { this.styles = [
|
|
53
|
+
...AitheTable.styles,
|
|
54
|
+
css `
|
|
55
|
+
:host {
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.box-grid {
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.box-grid-row {
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
66
|
+
gap: var(--aithe-space-3, 12px);
|
|
67
|
+
margin-bottom: var(--aithe-space-3, 12px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([box-cols]) .box-grid-row {
|
|
71
|
+
grid-template-columns: repeat(var(--box-cols), 1fr);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.box-grid-col {
|
|
75
|
+
min-width: 0;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.box-empty {
|
|
80
|
+
padding: var(--aithe-space-8, 32px);
|
|
81
|
+
text-align: center;
|
|
82
|
+
color: var(--aithe-color-text-muted, #c9cdd4);
|
|
83
|
+
}
|
|
84
|
+
`,
|
|
85
|
+
]; }
|
|
86
|
+
get boxColumns() {
|
|
87
|
+
return this.resolvedColumns.filter((col) => col.box);
|
|
88
|
+
}
|
|
89
|
+
getBoxRecordKey(record, index) {
|
|
90
|
+
const value = getValueByPath(record, this.rowKey);
|
|
91
|
+
if (value == null)
|
|
92
|
+
return String(index);
|
|
93
|
+
return safeStringify(value);
|
|
94
|
+
}
|
|
95
|
+
handleBoxClick(record, rowIndex) {
|
|
96
|
+
this.emit('aithe-row-click', { record, rowIndex });
|
|
97
|
+
}
|
|
98
|
+
renderBoxValue(column, record) {
|
|
99
|
+
const value = getValueByPath(record, column.dataIndex ? String(column.dataIndex) : column.id);
|
|
100
|
+
if (column.render)
|
|
101
|
+
return column.render(column.id, value, record);
|
|
102
|
+
if (value == null)
|
|
103
|
+
return nothing;
|
|
104
|
+
if (typeof value === 'object')
|
|
105
|
+
return JSON.stringify(value);
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
renderBoxCard(record, rowIndex) {
|
|
109
|
+
const key = this.getBoxRecordKey(record, rowIndex);
|
|
110
|
+
const checked = this.selectionSet.has(key);
|
|
111
|
+
let nameSlot = nothing;
|
|
112
|
+
let statusSlot = nothing;
|
|
113
|
+
let tagsSlot = nothing;
|
|
114
|
+
let actionsSlot = nothing;
|
|
115
|
+
for (const col of this.boxColumns) {
|
|
116
|
+
const value = this.renderBoxValue(col, record);
|
|
117
|
+
switch (col.box) {
|
|
118
|
+
case 'name':
|
|
119
|
+
nameSlot = value;
|
|
120
|
+
break;
|
|
121
|
+
case 'status':
|
|
122
|
+
statusSlot = value;
|
|
123
|
+
break;
|
|
124
|
+
case 'tags':
|
|
125
|
+
tagsSlot = value;
|
|
126
|
+
break;
|
|
127
|
+
case 'actions':
|
|
128
|
+
actionsSlot = value;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return html `
|
|
133
|
+
<aithe-brief-box
|
|
134
|
+
selectable=${this.selectable}
|
|
135
|
+
?selected=${checked}
|
|
136
|
+
@click=${() => this.handleBoxClick(record, rowIndex)}
|
|
137
|
+
@selected-change=${(e) => this.handleBriefBoxSelect(e, record, rowIndex)}
|
|
138
|
+
>
|
|
139
|
+
<span slot="name">${nameSlot}</span>
|
|
140
|
+
${statusSlot === nothing ? nothing : html `<span slot="status">${statusSlot}</span>`}
|
|
141
|
+
${tagsSlot === nothing ? nothing : html `<span slot="tags">${tagsSlot}</span>`}
|
|
142
|
+
${actionsSlot === nothing ? nothing : html `<span slot="actions">${actionsSlot}</span>`}
|
|
143
|
+
</aithe-brief-box>
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
render() {
|
|
147
|
+
if (this.mode === 'table') {
|
|
148
|
+
return super.render();
|
|
149
|
+
}
|
|
150
|
+
const rows = this.rowData;
|
|
151
|
+
const cols = Math.max(1, Math.min(12, this.boxCols));
|
|
152
|
+
if (rows.length === 0) {
|
|
153
|
+
return html `
|
|
154
|
+
<div class="box-empty">
|
|
155
|
+
<slot name="empty">${t('data.table.emptyText')}</slot>
|
|
156
|
+
</div>
|
|
157
|
+
`;
|
|
158
|
+
}
|
|
159
|
+
const cards = [];
|
|
160
|
+
const isFixedCols = this.boxCols > 0;
|
|
161
|
+
if (isFixedCols) {
|
|
162
|
+
for (let i = 0; i < rows.length; i += cols) {
|
|
163
|
+
const chunk = rows.slice(i, i + cols);
|
|
164
|
+
cards.push(html `
|
|
165
|
+
<div class="box-grid-row" style=${styleMap({ '--box-cols': String(cols) })}>
|
|
166
|
+
${chunk.map((record, j) => html `
|
|
167
|
+
<div class="box-grid-col">
|
|
168
|
+
${this.renderBoxCard(record, i + j)}
|
|
169
|
+
</div>
|
|
170
|
+
`)}
|
|
171
|
+
</div>
|
|
172
|
+
`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
cards.push(html `
|
|
177
|
+
<div class="box-grid-row">
|
|
178
|
+
${rows.map((record, i) => html `
|
|
179
|
+
<div class="box-grid-col">
|
|
180
|
+
${this.renderBoxCard(record, i)}
|
|
181
|
+
</div>
|
|
182
|
+
`)}
|
|
183
|
+
</div>
|
|
184
|
+
`);
|
|
185
|
+
}
|
|
186
|
+
return html `
|
|
187
|
+
<slot @slotchange=${() => this.syncSlotColumns()}></slot>
|
|
188
|
+
<div class="box-grid">${cards}</div>
|
|
189
|
+
`;
|
|
190
|
+
}
|
|
191
|
+
handleBriefBoxSelect(e, record, rowIndex) {
|
|
192
|
+
e.stopPropagation();
|
|
193
|
+
const { selected } = e.detail;
|
|
194
|
+
const key = this.getBoxRecordKey(record, rowIndex);
|
|
195
|
+
if (this.selectable === 'single') {
|
|
196
|
+
this.selectionSet.clear();
|
|
197
|
+
if (selected) {
|
|
198
|
+
this.selectionSet.add(key);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else if (selected) {
|
|
202
|
+
this.selectionSet.add(key);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.selectionSet.delete(key);
|
|
206
|
+
}
|
|
207
|
+
this.requestUpdate();
|
|
208
|
+
this.emit('aithe-selection-change', { selectionSet: this.selectionSet });
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
__decorate([
|
|
212
|
+
property({ type: String })
|
|
213
|
+
], AitheBoxTable.prototype, "mode", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: Number, attribute: 'box-cols' })
|
|
216
|
+
], AitheBoxTable.prototype, "boxCols", void 0);
|
|
217
|
+
AitheBoxTable = __decorate([
|
|
218
|
+
customElement('aithe-box-table')
|
|
219
|
+
], AitheBoxTable);
|
|
220
|
+
export { AitheBoxTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropertyValues } from 'lit';
|
|
2
2
|
import { AitheAnchoredOverlayElement } from '../../core/anchored-overlay';
|
|
3
|
-
import type { AitheTreeNodeMeta } from '../../core/types';
|
|
3
|
+
import type { AitheTreeNodeMeta, AitheTreeNodeFilter } from '../../core/types';
|
|
4
4
|
/**
|
|
5
5
|
* Dropdown menu with nested submenus, keyboard navigation, and hover/click triggers.
|
|
6
6
|
* Internally uses `<aithe-tree-menu>` for menu rendering.
|
|
@@ -8,7 +8,7 @@ import type { AitheTreeNodeMeta } from '../../core/types';
|
|
|
8
8
|
*
|
|
9
9
|
* @slot - Default slot for the trigger element. 触发元素内容。
|
|
10
10
|
* @fires aithe-select - Emitted when a menu item is selected, with `{ item, path, id }`. 菜单项选中时触发。
|
|
11
|
-
* @fires aithe-
|
|
11
|
+
* @fires aithe-dropdown-change - Emitted when open state changes, with `{ open }`. 开关状态变更时触发。
|
|
12
12
|
* @example
|
|
13
13
|
* ```html
|
|
14
14
|
* <aithe-dropdown trigger="click" items='[{"id":"a","label":"Action"},{"id":"b","label":"Another"}]'>
|
|
@@ -29,6 +29,12 @@ export declare class AitheDropdown extends AitheAnchoredOverlayElement {
|
|
|
29
29
|
items: readonly AitheTreeNodeMeta[];
|
|
30
30
|
/** Dropdown panel placement. 下拉面板位置。 */
|
|
31
31
|
placement: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
32
|
+
/**
|
|
33
|
+
* Filter callback for menu items. Return `true` to show the item, `false` to hide it.
|
|
34
|
+
* Useful for permission-based access control.
|
|
35
|
+
* 菜单项过滤回调。返回 `true` 显示该项,返回 `false` 隐藏该项。适用于基于权限的访问控制。
|
|
36
|
+
*/
|
|
37
|
+
itemFilter: AitheTreeNodeFilter | null;
|
|
32
38
|
private readonly panel?;
|
|
33
39
|
private activeId;
|
|
34
40
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
@@ -47,10 +53,7 @@ export declare class AitheDropdown extends AitheAnchoredOverlayElement {
|
|
|
47
53
|
private readonly openOnHover;
|
|
48
54
|
/** Closes dropdown on hover end (hover trigger only). 悬停结束时关闭下拉菜单(仅悬停触发)。 */
|
|
49
55
|
private readonly closeOnHoverEnd;
|
|
50
|
-
/** Handles item selection from the tree-menu and emits aithe-select. 处理 tree-menu 的选中事件并触发 aithe-select。 */
|
|
51
56
|
private readonly handleTreeSelect;
|
|
52
|
-
/** Recursively finds an item by id. 递归查找指定 id 的菜单项。 */
|
|
53
|
-
private findItemById;
|
|
54
57
|
render(): import("lit-html").TemplateResult<1>;
|
|
55
58
|
}
|
|
56
59
|
//# sourceMappingURL=dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/data/dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/data/dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAG1E;;;;;;;;;;;;;;GAcG;AACH,qBACa,aAAc,SAAQ,2BAA2B;IAC5D,gDAAgD;IACpB,OAAO,EAAE,OAAO,GAAG,OAAO,CAAW;IACjE,uFAAuF;IAC3D,KAAK,SAAM;IACvC,8EAA8E;IAClD,IAAI,SAAM;IACtC,2DAA2D;IACX,SAAS,SAAM;IAC/D,sDAAsD;IACtB,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAM;IACzE,wCAAwC;IACZ,SAAS,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAC7E;IAEjB;;;;OAIG;IAC6B,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IAE7D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAc;IAE7C,OAAO,CAAC,QAAQ,CAAM;IAE/B,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAUzD,MAAM,CAAC,QAAQ,CAAC,MAAM,0DA+BpB;IAEF,SAAS,KAAK,YAAY,IAAI,WAAW,GAAG,IAAI,CAE/C;IAED,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAM5B,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAYtD,8DAA8D;IAC9D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAYnC;IAEF,uDAAuD;IACvD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAIpC;IAEF,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAIzB;IAEF,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAI1B;IAEF,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAI9B;IAEF,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAE/B;IAEF,MAAM;CAmCP"}
|