@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,309 @@
|
|
|
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 Metrics display component / 业务指标展示组件
|
|
9
|
+
* @description Displays a business metric with label, value, and an optional slot for custom content.
|
|
10
|
+
* Supports variant-based color styling for the value, an optional divider,
|
|
11
|
+
* and data-driven mode via the inherited `params` and `data` properties from AitheWidget.
|
|
12
|
+
* `params` takes precedence over `data` for overlapping fields.
|
|
13
|
+
* 展示业务指标,含标签、数值和可选的自定义内容插槽。数值支持基于 variant 的颜色样式,
|
|
14
|
+
* 支持可选分割线。通过 AitheWidget 继承的 `params` 和 `data` 属性支持数据驱动模式,
|
|
15
|
+
* `params` 中同名字段优先级高于 `data`。
|
|
16
|
+
*/
|
|
17
|
+
import { css, html } from 'lit';
|
|
18
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
19
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
20
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
21
|
+
import { AitheWidget } from '../../core/aithe-widget';
|
|
22
|
+
import { filterFactory } from '../../core/filter';
|
|
23
|
+
/**
|
|
24
|
+
* A business metrics display component. Renders a value with optional slot content
|
|
25
|
+
* on top and a label below, suitable for dashboard panels and statistic cards.
|
|
26
|
+
*
|
|
27
|
+
* Inherits from AitheWidget, using `params` for layout configuration (align, scale, showDivider)
|
|
28
|
+
* and `data` for content (label, value, variant). `params` only overrides layout fields
|
|
29
|
+
* (align, scale, showDivider); content fields (label, value, variant) are always read from
|
|
30
|
+
* `data` first, falling back to the component's own properties. `data` accepts both a single
|
|
31
|
+
* MetricsData object and an array; when an array is provided, only the first item is used.
|
|
32
|
+
*
|
|
33
|
+
* 业务指标展示组件。上方渲染数值和可选的插槽内容,下方渲染标签,适用于仪表盘面板和统计卡片。
|
|
34
|
+
*
|
|
35
|
+
* 继承自 AitheWidget,`params` 用于布局配置(align, scale, showDivider),
|
|
36
|
+
* `data` 用于内容数据(label, value, variant)。`params` 仅覆盖布局字段
|
|
37
|
+
* (align, scale, showDivider);内容字段(label, value, variant)始终优先从 `data` 读取,
|
|
38
|
+
* 再回退到组件自身属性。`data` 支持单个 MetricsData 对象或数组,传入数组时仅取第一个元素。
|
|
39
|
+
*
|
|
40
|
+
* @slot - Custom content displayed next to the value. 显示在数值旁边的自定义内容。
|
|
41
|
+
*
|
|
42
|
+
* @csspart value - The metric value element. 指标数值元素。
|
|
43
|
+
* @csspart label - The metric label element. 指标标签元素。
|
|
44
|
+
* @csspart divider - The divider element (shown when showDivider is true). 分割线元素。
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```html
|
|
48
|
+
* <!-- Attribute mode -->
|
|
49
|
+
* <aithe-metrics label="Active Users" value="1,024" variant="primary"></aithe-metrics>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```html
|
|
54
|
+
* <!-- Data-driven mode with slot content -->
|
|
55
|
+
* <aithe-metrics label="Revenue" value="$42.5K" variant="success">
|
|
56
|
+
* <aithe-icon name="arrowUp" size="16"></aithe-icon>
|
|
57
|
+
* </aithe-metrics>
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```js
|
|
62
|
+
* // Programmatic mode with params and data
|
|
63
|
+
* const el = document.querySelector('aithe-metrics');
|
|
64
|
+
* el.params = { align: 'center', scale: 'large', showDivider: true };
|
|
65
|
+
* el.data = { label: 'Users', value: '1,024', variant: 'primary' };
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
let AitheMetrics = class AitheMetrics extends AitheWidget {
|
|
69
|
+
constructor() {
|
|
70
|
+
super(...arguments);
|
|
71
|
+
/** Metric label text displayed below the value. 显示在数值下方的标签文本。 */
|
|
72
|
+
this.label = '';
|
|
73
|
+
/** Metric value text displayed prominently. 突出显示的数值文本。 */
|
|
74
|
+
this.value = '';
|
|
75
|
+
/**
|
|
76
|
+
* Whether to show a divider on the left side.
|
|
77
|
+
* 是否在左侧显示分割线。由 params / data 驱动,仅用于 CSS 反射。
|
|
78
|
+
*
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
this.showDivider = false;
|
|
82
|
+
/**
|
|
83
|
+
* Text alignment of the metric content. Reflected for CSS selectors.
|
|
84
|
+
* 指标内容的对齐方式。由 params / data 驱动,仅用于 CSS 反射。
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
this.align = 'center';
|
|
89
|
+
/**
|
|
90
|
+
* Size scale of the metric. Reflected for CSS selectors.
|
|
91
|
+
* 指标的尺寸规格。由 params / data 驱动,仅用于 CSS 反射。
|
|
92
|
+
*
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
this.scale = 'small';
|
|
96
|
+
/**
|
|
97
|
+
* Generic configuration object. Fields with the same name as MetricsData
|
|
98
|
+
* take precedence over `data` when both are set.
|
|
99
|
+
* 通用配置对象。与 MetricsData 同名的字段优先级高于 `data`。
|
|
100
|
+
*/
|
|
101
|
+
this.params = {};
|
|
102
|
+
/**
|
|
103
|
+
* Generic data object. Fields with the same name in `params` take precedence.
|
|
104
|
+
* 通用数据对象。同名时 `params` 中的值优先。
|
|
105
|
+
*/
|
|
106
|
+
this.data = null;
|
|
107
|
+
}
|
|
108
|
+
static { this.styles = [
|
|
109
|
+
aitheBaseStyles,
|
|
110
|
+
css `
|
|
111
|
+
:host {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: var(--aithe-space-1, 4px);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([align="center"]) {
|
|
118
|
+
align-items: center;
|
|
119
|
+
text-align: center;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([align="right"]) {
|
|
123
|
+
align-items: flex-end;
|
|
124
|
+
text-align: right;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:host([align="left"]) {
|
|
128
|
+
align-items: flex-start;
|
|
129
|
+
text-align: left;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Scale: small */
|
|
133
|
+
:host([scale="small"]) .metrics-value {
|
|
134
|
+
font-size: var(--aithe-font-size-3xl, 32px);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([scale="small"]) .metrics-label {
|
|
138
|
+
font-size: var(--aithe-font-size-md, 16px);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host([scale="small"]) {
|
|
142
|
+
gap: var(--aithe-space-1, 4px);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Scale: normal (default) */
|
|
146
|
+
:host([scale="normal"]) .metrics-value {
|
|
147
|
+
font-size: var(--aithe-font-size-4xl, 48px);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host([scale="normal"]) .metrics-label {
|
|
151
|
+
font-size: var(--aithe-font-size-lg, 18px);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Scale: large */
|
|
155
|
+
:host([scale="large"]) .metrics-value {
|
|
156
|
+
font-size: var(--aithe-font-size-5xl, 64px);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([scale="large"]) .metrics-label {
|
|
160
|
+
font-size: var(--aithe-font-size-xl, 20px);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host([scale="large"]) {
|
|
164
|
+
gap: var(--aithe-space-3, 16px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.metrics-top {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
gap: var(--aithe-space-2, 8px);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.metrics-value {
|
|
174
|
+
font-weight: var(--aithe-font-weight-bold, 700);
|
|
175
|
+
line-height: 1.2;
|
|
176
|
+
color: var(--aithe-color-text, #1a1a1a);
|
|
177
|
+
transition: color var(--aithe-duration-fast, 0.15s) var(--aithe-ease-standard, ease);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.metrics-slot {
|
|
181
|
+
display: inline-flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.metrics-label {
|
|
187
|
+
color: var(--aithe-color-text-muted, #6b7280);
|
|
188
|
+
line-height: 1.4;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Variant styles — applied to .metrics-value */
|
|
192
|
+
.default {
|
|
193
|
+
color: var(--aithe-color-text, #1a1a1a);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.primary {
|
|
197
|
+
color: var(--aithe-primary-8);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.success {
|
|
201
|
+
color: var(--aithe-success-8);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.warning {
|
|
205
|
+
color: var(--aithe-warning-8);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.danger {
|
|
209
|
+
color: var(--aithe-danger-8);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.neutral {
|
|
213
|
+
color: var(--aithe-color-text-muted, #6b7280);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Divider */
|
|
217
|
+
.divider {
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
background: var(--aithe-primary-8);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:host([show-divider]) .divider {
|
|
223
|
+
display: block;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:host(:not([show-divider])) .divider {
|
|
227
|
+
display: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:host([show-divider]) {
|
|
231
|
+
padding-left: 12px;
|
|
232
|
+
position: relative;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:host([show-divider]) .divider {
|
|
236
|
+
position: absolute;
|
|
237
|
+
left: 0;
|
|
238
|
+
top: 0;
|
|
239
|
+
width: 2px;
|
|
240
|
+
height: 100%;
|
|
241
|
+
border-radius: 1px;
|
|
242
|
+
}
|
|
243
|
+
`,
|
|
244
|
+
]; }
|
|
245
|
+
render() {
|
|
246
|
+
const raw = this.data;
|
|
247
|
+
const data = Array.isArray(raw) ? raw[0] : raw;
|
|
248
|
+
const resolvedLabel = data?.label ?? this.label;
|
|
249
|
+
const resolvedValue = data?.value ?? this.value;
|
|
250
|
+
const resolvedVariant = data?.variant ?? this.variant;
|
|
251
|
+
const resolvedFilter = data?.filter ?? this.params.filter;
|
|
252
|
+
const resolvedShowDivider = this.params.showDivider ?? data?.showDivider ?? this.showDivider;
|
|
253
|
+
const resolvedAlign = this.params.align ?? data?.align ?? this.align;
|
|
254
|
+
const resolvedScale = this.params.scale ?? data?.scale ?? this.scale;
|
|
255
|
+
if (resolvedAlign !== this.align) {
|
|
256
|
+
this.align = resolvedAlign;
|
|
257
|
+
}
|
|
258
|
+
if (resolvedScale !== this.scale) {
|
|
259
|
+
this.scale = resolvedScale;
|
|
260
|
+
}
|
|
261
|
+
if (resolvedShowDivider !== this.showDivider) {
|
|
262
|
+
this.showDivider = resolvedShowDivider;
|
|
263
|
+
}
|
|
264
|
+
const displayValue = resolvedFilter && resolvedValue != null
|
|
265
|
+
? filterFactory.format(resolvedValue, resolvedFilter)
|
|
266
|
+
: resolvedValue;
|
|
267
|
+
const valueClasses = classMap({
|
|
268
|
+
'metrics-value': true,
|
|
269
|
+
[resolvedVariant]: true,
|
|
270
|
+
});
|
|
271
|
+
return html `
|
|
272
|
+
<span class="divider" part="divider" ?hidden=${!resolvedShowDivider}></span>
|
|
273
|
+
<div class="metrics-top">
|
|
274
|
+
<span class=${valueClasses} part="value">${displayValue}</span>
|
|
275
|
+
<span class="metrics-slot">
|
|
276
|
+
<slot></slot>
|
|
277
|
+
</span>
|
|
278
|
+
</div>
|
|
279
|
+
${resolvedLabel
|
|
280
|
+
? html ` <span class="metrics-label" part="label">${resolvedLabel}</span> `
|
|
281
|
+
: ''}
|
|
282
|
+
`;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: String })
|
|
287
|
+
], AitheMetrics.prototype, "label", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ type: String })
|
|
290
|
+
], AitheMetrics.prototype, "value", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
property({ type: Boolean, attribute: 'show-divider', reflect: true })
|
|
293
|
+
], AitheMetrics.prototype, "showDivider", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
property({ type: String, reflect: true })
|
|
296
|
+
], AitheMetrics.prototype, "align", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: String, reflect: true })
|
|
299
|
+
], AitheMetrics.prototype, "scale", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ type: Object })
|
|
302
|
+
], AitheMetrics.prototype, "params", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
property({ type: Object })
|
|
305
|
+
], AitheMetrics.prototype, "data", void 0);
|
|
306
|
+
AitheMetrics = __decorate([
|
|
307
|
+
customElement('aithe-metrics')
|
|
308
|
+
], AitheMetrics);
|
|
309
|
+
export { AitheMetrics };
|
|
@@ -0,0 +1,119 @@
|
|
|
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 } 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
|
+
* Pagination controller for navigating through paged data.
|
|
14
|
+
* 分页控制器,用于浏览分页数据。
|
|
15
|
+
*
|
|
16
|
+
* @fires aithe-page-change - Emitted when the current page changes with `{ currentPage, pageSize }`. 当前页变更时发出 `{ currentPage, pageSize }`。
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-pagination total="100" page-size="10" current-page="1"></aithe-pagination>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
let AithePagination = class AithePagination extends AitheElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
/** Total number of data items. 数据项总数。 */
|
|
27
|
+
this.total = 0;
|
|
28
|
+
/** Number of items per page. 每页的数据项数。 */
|
|
29
|
+
this.pageSize = 10;
|
|
30
|
+
/** Currently active page number. 当前活动页码。 */
|
|
31
|
+
this.currentPage = 1;
|
|
32
|
+
/** Size scale of the pagination buttons. 分页按钮的尺寸规格。 */
|
|
33
|
+
this.size = 'md';
|
|
34
|
+
}
|
|
35
|
+
static { this.styles = [
|
|
36
|
+
aitheBaseStyles,
|
|
37
|
+
css `
|
|
38
|
+
:host {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pager {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: var(--aithe-space-2);
|
|
46
|
+
flex-wrap: wrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
button {
|
|
50
|
+
min-width: 36px;
|
|
51
|
+
min-height: 36px;
|
|
52
|
+
padding: 0 var(--aithe-space-3);
|
|
53
|
+
border: 1px solid var(--aithe-color-border);
|
|
54
|
+
border-radius: var(--aithe-radius-md);
|
|
55
|
+
background: var(--aithe-color-surface-elevated);
|
|
56
|
+
color: var(--aithe-color-text);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
button.active {
|
|
61
|
+
border-color: transparent;
|
|
62
|
+
background: linear-gradient(180deg, var(--aithe-primary-6), var(--aithe-primary-7));
|
|
63
|
+
color: var(--aithe-color-text-on-primary, #ffffff);
|
|
64
|
+
}
|
|
65
|
+
`,
|
|
66
|
+
]; }
|
|
67
|
+
get pageCount() {
|
|
68
|
+
return Math.max(1, Math.ceil(this.total / Math.max(1, this.pageSize)));
|
|
69
|
+
}
|
|
70
|
+
change(page) {
|
|
71
|
+
this.currentPage = Math.min(Math.max(1, page), this.pageCount);
|
|
72
|
+
this.emit('aithe-page-change', { currentPage: this.currentPage, pageSize: this.pageSize });
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return html `
|
|
76
|
+
<div class="pager">
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
?disabled=${this.currentPage <= 1}
|
|
80
|
+
@click=${() => this.change(this.currentPage - 1)}
|
|
81
|
+
>
|
|
82
|
+
‹
|
|
83
|
+
</button>
|
|
84
|
+
${Array.from({ length: this.pageCount }, (_, index) => index + 1).map((page) => html `
|
|
85
|
+
<button
|
|
86
|
+
class=${classMap({ active: page === this.currentPage })}
|
|
87
|
+
type="button"
|
|
88
|
+
@click=${() => this.change(page)}
|
|
89
|
+
>
|
|
90
|
+
${page}
|
|
91
|
+
</button>
|
|
92
|
+
`)}
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
?disabled=${this.currentPage >= this.pageCount}
|
|
96
|
+
@click=${() => this.change(this.currentPage + 1)}
|
|
97
|
+
>
|
|
98
|
+
›
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
__decorate([
|
|
105
|
+
property({ type: Number })
|
|
106
|
+
], AithePagination.prototype, "total", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
property({ type: Number, attribute: 'page-size' })
|
|
109
|
+
], AithePagination.prototype, "pageSize", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: Number, attribute: 'current-page' })
|
|
112
|
+
], AithePagination.prototype, "currentPage", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property({ type: String })
|
|
115
|
+
], AithePagination.prototype, "size", void 0);
|
|
116
|
+
AithePagination = __decorate([
|
|
117
|
+
customElement('aithe-pagination')
|
|
118
|
+
], AithePagination);
|
|
119
|
+
export { AithePagination };
|
|
@@ -1,31 +1,77 @@
|
|
|
1
1
|
import { AitheElement } from '../../core/aithe-element';
|
|
2
2
|
/**
|
|
3
|
-
* Single tab pane used inside `aithe-tabs`.
|
|
4
|
-
* 单个标签面板,用于 `aithe-tabs` 内部。
|
|
3
|
+
* Single tab pane used inside `aithe-tabs` or `aithe-tab-group`.
|
|
4
|
+
* 单个标签面板,用于 `aithe-tabs` 或 `aithe-tab-group` 内部。
|
|
5
5
|
*
|
|
6
6
|
* @slot - Default slot for tab pane content. 默认插槽,用于标签面板内容。
|
|
7
7
|
*
|
|
8
|
+
* @csspart host - The host element. 宿主元素。
|
|
9
|
+
*
|
|
8
10
|
* @example
|
|
9
11
|
* ```html
|
|
10
|
-
* <aithe-
|
|
11
|
-
* Settings
|
|
12
|
-
*
|
|
12
|
+
* <aithe-tabs type="card" active-key="settings">
|
|
13
|
+
* <aithe-tab-pane tab-id="settings" label="Settings" icon="settings" closable>
|
|
14
|
+
* Settings content here
|
|
15
|
+
* </aithe-tab-pane>
|
|
16
|
+
* <aithe-tab-pane tab-id="profile" label="Profile" disabled>
|
|
17
|
+
* Profile content here
|
|
18
|
+
* </aithe-tab-pane>
|
|
19
|
+
* </aithe-tabs>
|
|
13
20
|
* ```
|
|
14
21
|
*/
|
|
15
22
|
export declare class AitheTabPane extends AitheElement {
|
|
16
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for this pane within the tabs.
|
|
25
|
+
* 标签页内标识此面板的唯一标识。
|
|
26
|
+
*
|
|
27
|
+
* Used to match `active-key` on the parent `aithe-tabs`.
|
|
28
|
+
* 用于匹配父级 `aithe-tabs` 的 `active-key`。
|
|
29
|
+
*/
|
|
17
30
|
tabId: string;
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Display label shown on the tab button.
|
|
33
|
+
* 标签按钮上显示的文本。
|
|
34
|
+
*
|
|
35
|
+
* If `tab-id` is not set, the label is also used as the fallback identifier.
|
|
36
|
+
* 如果未设置 `tab-id`,标签也会作为备用标识符。
|
|
37
|
+
*/
|
|
19
38
|
label: string;
|
|
20
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Icon name to display before the tab label.
|
|
41
|
+
* 在标签文本前显示的图标名称。
|
|
42
|
+
*
|
|
43
|
+
* Uses the `aithe-icon` component internally. Refer to the icon library for available names.
|
|
44
|
+
* 内部使用 `aithe-icon` 组件。可用的图标名称请参考图标库。
|
|
45
|
+
*/
|
|
21
46
|
icon: string;
|
|
22
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Display title for the tab pane (shown as tooltip on hover).
|
|
49
|
+
* 标签面板的显示标题(悬停时作为工具提示)。
|
|
50
|
+
*/
|
|
23
51
|
title: string;
|
|
24
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Whether this tab pane is disabled (cannot be activated by clicking or keyboard).
|
|
54
|
+
* 此标签面板是否禁用(无法通过点击或键盘激活)。
|
|
55
|
+
*
|
|
56
|
+
* Disabled tabs are skipped when navigating with arrow keys.
|
|
57
|
+
* 使用方向键导航时会跳过禁用的标签。
|
|
58
|
+
*/
|
|
25
59
|
disabled: boolean;
|
|
26
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Whether this tab pane shows a close (remove) button.
|
|
62
|
+
* 此标签面板是否显示关闭按钮。
|
|
63
|
+
*
|
|
64
|
+
* When clicked, the `aithe-tab-remove` event is emitted on the parent `aithe-tabs`.
|
|
65
|
+
* 点击时,父级 `aithe-tabs` 会触发 `aithe-tab-remove` 事件。
|
|
66
|
+
*/
|
|
27
67
|
closable: boolean;
|
|
28
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Whether this tab pane is currently active (managed by parent `aithe-tabs`).
|
|
70
|
+
* 此标签面板是否当前活动(由父级 `aithe-tabs` 管理)。
|
|
71
|
+
*
|
|
72
|
+
* This is automatically set by the parent `aithe-tabs` component. Do not set manually.
|
|
73
|
+
* 由父级 `aithe-tabs` 组件自动设置,请勿手动设置。
|
|
74
|
+
*/
|
|
29
75
|
active: boolean;
|
|
30
76
|
static readonly styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
31
77
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-pane.d.ts","sourceRoot":"","sources":["../../../src/components/data/tab-pane.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD
|
|
1
|
+
{"version":3,"file":"tab-pane.d.ts","sourceRoot":"","sources":["../../../src/components/data/tab-pane.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,YAAa,SAAQ,YAAY;IAC5C;;;;;;OAMG;IAC8C,KAAK,SAAM;IAC5D;;;;;;OAMG;IACyB,KAAK,SAAM;IACvC;;;;;;OAMG;IACyB,IAAI,SAAM;IACtC;;;OAGG;IACyB,KAAK,SAAM;IACvC;;;;;;OAMG;IACyC,QAAQ,UAAS;IAC7D;;;;;;OAMG;IACyC,QAAQ,UAAS;IAC7D;;;;;;OAMG;IACyC,MAAM,UAAS;IAE3D,MAAM,CAAC,QAAQ,CAAC,MAAM,0DAWpB;IAEF,MAAM;CAKP"}
|
|
@@ -0,0 +1,130 @@
|
|
|
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 } from 'lit/decorators.js';
|
|
9
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
10
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
11
|
+
/**
|
|
12
|
+
* Single tab pane used inside `aithe-tabs` or `aithe-tab-group`.
|
|
13
|
+
* 单个标签面板,用于 `aithe-tabs` 或 `aithe-tab-group` 内部。
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for tab pane content. 默认插槽,用于标签面板内容。
|
|
16
|
+
*
|
|
17
|
+
* @csspart host - The host element. 宿主元素。
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <aithe-tabs type="card" active-key="settings">
|
|
22
|
+
* <aithe-tab-pane tab-id="settings" label="Settings" icon="settings" closable>
|
|
23
|
+
* Settings content here
|
|
24
|
+
* </aithe-tab-pane>
|
|
25
|
+
* <aithe-tab-pane tab-id="profile" label="Profile" disabled>
|
|
26
|
+
* Profile content here
|
|
27
|
+
* </aithe-tab-pane>
|
|
28
|
+
* </aithe-tabs>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
let AitheTabPane = class AitheTabPane extends AitheElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/**
|
|
35
|
+
* Unique identifier for this pane within the tabs.
|
|
36
|
+
* 标签页内标识此面板的唯一标识。
|
|
37
|
+
*
|
|
38
|
+
* Used to match `active-key` on the parent `aithe-tabs`.
|
|
39
|
+
* 用于匹配父级 `aithe-tabs` 的 `active-key`。
|
|
40
|
+
*/
|
|
41
|
+
this.tabId = '';
|
|
42
|
+
/**
|
|
43
|
+
* Display label shown on the tab button.
|
|
44
|
+
* 标签按钮上显示的文本。
|
|
45
|
+
*
|
|
46
|
+
* If `tab-id` is not set, the label is also used as the fallback identifier.
|
|
47
|
+
* 如果未设置 `tab-id`,标签也会作为备用标识符。
|
|
48
|
+
*/
|
|
49
|
+
this.label = '';
|
|
50
|
+
/**
|
|
51
|
+
* Icon name to display before the tab label.
|
|
52
|
+
* 在标签文本前显示的图标名称。
|
|
53
|
+
*
|
|
54
|
+
* Uses the `aithe-icon` component internally. Refer to the icon library for available names.
|
|
55
|
+
* 内部使用 `aithe-icon` 组件。可用的图标名称请参考图标库。
|
|
56
|
+
*/
|
|
57
|
+
this.icon = '';
|
|
58
|
+
/**
|
|
59
|
+
* Display title for the tab pane (shown as tooltip on hover).
|
|
60
|
+
* 标签面板的显示标题(悬停时作为工具提示)。
|
|
61
|
+
*/
|
|
62
|
+
this.title = '';
|
|
63
|
+
/**
|
|
64
|
+
* Whether this tab pane is disabled (cannot be activated by clicking or keyboard).
|
|
65
|
+
* 此标签面板是否禁用(无法通过点击或键盘激活)。
|
|
66
|
+
*
|
|
67
|
+
* Disabled tabs are skipped when navigating with arrow keys.
|
|
68
|
+
* 使用方向键导航时会跳过禁用的标签。
|
|
69
|
+
*/
|
|
70
|
+
this.disabled = false;
|
|
71
|
+
/**
|
|
72
|
+
* Whether this tab pane shows a close (remove) button.
|
|
73
|
+
* 此标签面板是否显示关闭按钮。
|
|
74
|
+
*
|
|
75
|
+
* When clicked, the `aithe-tab-remove` event is emitted on the parent `aithe-tabs`.
|
|
76
|
+
* 点击时,父级 `aithe-tabs` 会触发 `aithe-tab-remove` 事件。
|
|
77
|
+
*/
|
|
78
|
+
this.closable = false;
|
|
79
|
+
/**
|
|
80
|
+
* Whether this tab pane is currently active (managed by parent `aithe-tabs`).
|
|
81
|
+
* 此标签面板是否当前活动(由父级 `aithe-tabs` 管理)。
|
|
82
|
+
*
|
|
83
|
+
* This is automatically set by the parent `aithe-tabs` component. Do not set manually.
|
|
84
|
+
* 由父级 `aithe-tabs` 组件自动设置,请勿手动设置。
|
|
85
|
+
*/
|
|
86
|
+
this.active = false;
|
|
87
|
+
}
|
|
88
|
+
static { this.styles = [
|
|
89
|
+
aitheBaseStyles,
|
|
90
|
+
css `
|
|
91
|
+
:host {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host([active]) {
|
|
96
|
+
display: block;
|
|
97
|
+
}
|
|
98
|
+
`,
|
|
99
|
+
]; }
|
|
100
|
+
render() {
|
|
101
|
+
return html `
|
|
102
|
+
<slot></slot>
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: String, attribute: 'tab-id' })
|
|
108
|
+
], AitheTabPane.prototype, "tabId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: String })
|
|
111
|
+
], AitheTabPane.prototype, "label", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: String })
|
|
114
|
+
], AitheTabPane.prototype, "icon", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: String })
|
|
117
|
+
], AitheTabPane.prototype, "title", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: Boolean, reflect: true })
|
|
120
|
+
], AitheTabPane.prototype, "disabled", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ type: Boolean, reflect: true })
|
|
123
|
+
], AitheTabPane.prototype, "closable", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: Boolean, reflect: true })
|
|
126
|
+
], AitheTabPane.prototype, "active", void 0);
|
|
127
|
+
AitheTabPane = __decorate([
|
|
128
|
+
customElement('aithe-tab-pane')
|
|
129
|
+
], AitheTabPane);
|
|
130
|
+
export { AitheTabPane };
|