@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,315 @@
|
|
|
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
|
+
* Button component with multiple visual types, sizes, and states.
|
|
14
|
+
* 按钮组件,支持多种视觉类型、尺寸和状态。
|
|
15
|
+
*
|
|
16
|
+
* When `href` is set, the button renders as an `<a>` element for native link behavior.
|
|
17
|
+
* Navigation occurs by default; call `event.preventDefault()` on `aithe-click` to suppress it.
|
|
18
|
+
* 设置 `href` 后,按钮渲染为 `<a>` 元素以获得原生链接行为。
|
|
19
|
+
* 默认执行导航;在 `aithe-click` 事件中调用 `preventDefault()` 可阻止导航。
|
|
20
|
+
*
|
|
21
|
+
* @slot - Default slot for button label. 默认插槽,用于按钮标签。
|
|
22
|
+
* @slot prefix - Icon or content before the label. 标签前的图标或内容。
|
|
23
|
+
* @slot suffix - Icon or content after the label. 标签后的图标或内容。
|
|
24
|
+
*
|
|
25
|
+
* @fires aithe-click - Emitted when the button is clicked (not when disabled/loading). 按钮被点击时发出(禁用/加载时不发出)。
|
|
26
|
+
* When `href` is set, navigation runs by default. Call `preventDefault()` to suppress. 设置 `href` 后默认执行导航,调用 `preventDefault()` 可阻止。
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```html
|
|
30
|
+
* <aithe-button type="primary" size="medium">Submit</aithe-button>
|
|
31
|
+
* <aithe-button variant="danger" loading>Deleting...</aithe-button>
|
|
32
|
+
* <aithe-button type="primary" href="/dashboard">Go to Dashboard</aithe-button>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
let AitheButton = class AitheButton extends AitheElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
/** Visual type of the button. 按钮的视觉类型。 */
|
|
39
|
+
this.type = 'default';
|
|
40
|
+
/** Size scale of the button. 按钮的尺寸规格。 */
|
|
41
|
+
this.size = 'medium';
|
|
42
|
+
/** Display title for the button (shown as tooltip). 按钮的显示标题(作为工具提示)。 */
|
|
43
|
+
this.title = '';
|
|
44
|
+
/** Icon name to display before the label. 在标签前显示的图标名称。 */
|
|
45
|
+
this.icon = '';
|
|
46
|
+
/** Whether the button is disabled. 按钮是否禁用。 */
|
|
47
|
+
this.disabled = false;
|
|
48
|
+
/** Whether the button shows a loading spinner. 按钮是否显示加载旋转器。 */
|
|
49
|
+
this.loading = false;
|
|
50
|
+
/** Whether the button spans the full width of its container. 按钮是否占满容器宽度。 */
|
|
51
|
+
this.block = false;
|
|
52
|
+
/** Link URL. When set, the button renders as an `<a>` element. 链接地址。设置后按钮渲染为 `<a>` 元素。 */
|
|
53
|
+
this.href = '';
|
|
54
|
+
/** Link target attribute (e.g. `_blank`). Only applies when `href` is set. 链接 target 属性(如 `_blank`)。仅在设置 `href` 时生效。 */
|
|
55
|
+
this.target = '';
|
|
56
|
+
/**
|
|
57
|
+
* Handle click: prevent interaction when disabled or loading,
|
|
58
|
+
* then emit `aithe-click` with the original mouse event.
|
|
59
|
+
* 处理点击:在禁用或加载时阻止交互,然后附带原始鼠标事件发出 `aithe-click`。
|
|
60
|
+
*/
|
|
61
|
+
this.handleClick = (event) => {
|
|
62
|
+
if (this.disabled || this.loading) {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
event.stopImmediatePropagation();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (this.href) {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
const notPrevented = this.emit('aithe-click', { originalEvent: event });
|
|
71
|
+
if (notPrevented && this.href) {
|
|
72
|
+
if (this.target) {
|
|
73
|
+
globalThis.open(this.href, this.target);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
globalThis.location.href = this.href;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
static { this.styles = [
|
|
82
|
+
aitheBaseStyles,
|
|
83
|
+
css `
|
|
84
|
+
:host {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
flex: 0 0 auto;
|
|
87
|
+
max-width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([block]) {
|
|
91
|
+
display: flex;
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
button,
|
|
96
|
+
a {
|
|
97
|
+
position: relative;
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
gap: var(--aithe-space-2);
|
|
102
|
+
width: auto;
|
|
103
|
+
max-width: 100%;
|
|
104
|
+
border: 1px solid transparent;
|
|
105
|
+
border-radius: var(--aithe-radius-md);
|
|
106
|
+
background: var(--aithe-color-surface-elevated);
|
|
107
|
+
color: var(--aithe-color-text);
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
transition:
|
|
110
|
+
transform var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
111
|
+
background var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
112
|
+
border-color var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
113
|
+
color var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
114
|
+
box-shadow var(--aithe-duration-fast) var(--aithe-ease-standard);
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
text-decoration: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
button:hover:not(:disabled),
|
|
120
|
+
a:hover:not([aria-disabled='true']) {
|
|
121
|
+
transform: translateY(-1px);
|
|
122
|
+
border-color: var(--aithe-color-border-strong);
|
|
123
|
+
box-shadow: var(--aithe-shadow-1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
button:active:not(:disabled),
|
|
127
|
+
a:active:not([aria-disabled='true']) {
|
|
128
|
+
transform: translateY(0);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
button:disabled,
|
|
132
|
+
a[aria-disabled='true'] {
|
|
133
|
+
opacity: 0.56;
|
|
134
|
+
cursor: not-allowed;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([block]) button {
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.small {
|
|
142
|
+
min-height: var(--aithe-control-height-sm);
|
|
143
|
+
min-width: 72px;
|
|
144
|
+
padding: 0 var(--aithe-space-3);
|
|
145
|
+
font-size: var(--aithe-font-size-sm);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.medium {
|
|
149
|
+
min-height: var(--aithe-control-height-md);
|
|
150
|
+
min-width: 96px;
|
|
151
|
+
padding: 0 var(--aithe-space-4);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.large {
|
|
155
|
+
min-height: var(--aithe-control-height-lg);
|
|
156
|
+
min-width: 112px;
|
|
157
|
+
padding: 0 var(--aithe-space-5);
|
|
158
|
+
font-size: var(--aithe-font-size-lg);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.text,
|
|
162
|
+
.link {
|
|
163
|
+
min-width: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.primary {
|
|
167
|
+
background: linear-gradient(180deg, var(--aithe-primary-6), var(--aithe-primary-7));
|
|
168
|
+
color: var(--aithe-color-text-on-primary, #ffffff);
|
|
169
|
+
box-shadow: 0 10px 24px rgba(50, 111, 225, 0.22);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:host([variant='danger']) .primary {
|
|
173
|
+
background: linear-gradient(180deg, var(--aithe-danger-6), var(--aithe-danger-7));
|
|
174
|
+
box-shadow: 0 10px 24px rgba(207, 57, 80, 0.24);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([variant='danger']) .default,
|
|
178
|
+
:host([variant='danger']) .dashed,
|
|
179
|
+
:host([variant='danger']) .text,
|
|
180
|
+
:host([variant='danger']) .link {
|
|
181
|
+
color: var(--aithe-danger-7);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.default {
|
|
185
|
+
border-color: var(--aithe-color-border);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dashed {
|
|
189
|
+
border-style: dashed;
|
|
190
|
+
border-color: var(--aithe-color-border-strong);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.text,
|
|
194
|
+
.link {
|
|
195
|
+
background: transparent;
|
|
196
|
+
border-color: transparent;
|
|
197
|
+
box-shadow: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.link {
|
|
201
|
+
color: var(--aithe-primary-6);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.title-icon {
|
|
205
|
+
flex-shrink: 0;
|
|
206
|
+
color: var(--aithe-color-text-muted);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.icon {
|
|
210
|
+
display: inline-flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
justify-content: center;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.spinner {
|
|
216
|
+
width: 1em;
|
|
217
|
+
height: 1em;
|
|
218
|
+
border: 2px solid currentColor;
|
|
219
|
+
border-right-color: transparent;
|
|
220
|
+
border-radius: 50%;
|
|
221
|
+
animation: aithe-spin 0.85s linear infinite;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@keyframes aithe-spin {
|
|
225
|
+
to {
|
|
226
|
+
transform: rotate(360deg);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
`,
|
|
230
|
+
]; }
|
|
231
|
+
render() {
|
|
232
|
+
const classes = {
|
|
233
|
+
[this.type]: true,
|
|
234
|
+
[this.size]: true,
|
|
235
|
+
[this.variant]: true,
|
|
236
|
+
};
|
|
237
|
+
let prefixSlot;
|
|
238
|
+
if (this.loading) {
|
|
239
|
+
prefixSlot = html `
|
|
240
|
+
<span class="spinner" aria-hidden="true"></span>
|
|
241
|
+
`;
|
|
242
|
+
}
|
|
243
|
+
else if (this.icon) {
|
|
244
|
+
prefixSlot = html `
|
|
245
|
+
<aithe-icon class="title-icon" name=${this.icon} size="16"></aithe-icon>
|
|
246
|
+
`;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
prefixSlot = html `
|
|
250
|
+
<slot name="prefix"></slot>
|
|
251
|
+
`;
|
|
252
|
+
}
|
|
253
|
+
const inner = html `
|
|
254
|
+
<span class="icon">${prefixSlot}</span>
|
|
255
|
+
<slot></slot>
|
|
256
|
+
<span class="icon"><slot name="suffix"></slot></span>
|
|
257
|
+
`;
|
|
258
|
+
const isDisabled = this.disabled || this.loading;
|
|
259
|
+
if (this.href && !isDisabled) {
|
|
260
|
+
return html `
|
|
261
|
+
<a
|
|
262
|
+
class=${classMap(classes)}
|
|
263
|
+
href=${this.href}
|
|
264
|
+
target=${this.target || undefined}
|
|
265
|
+
title=${this.title}
|
|
266
|
+
@click=${this.handleClick}
|
|
267
|
+
>
|
|
268
|
+
${inner}
|
|
269
|
+
</a>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
return html `
|
|
273
|
+
<button
|
|
274
|
+
class=${classMap(classes)}
|
|
275
|
+
?disabled=${isDisabled}
|
|
276
|
+
title=${this.title}
|
|
277
|
+
type="button"
|
|
278
|
+
@click=${this.handleClick}
|
|
279
|
+
>
|
|
280
|
+
${inner}
|
|
281
|
+
</button>
|
|
282
|
+
`;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: String })
|
|
287
|
+
], AitheButton.prototype, "type", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ type: String })
|
|
290
|
+
], AitheButton.prototype, "size", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
property({ type: String })
|
|
293
|
+
], AitheButton.prototype, "title", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
property({ type: String })
|
|
296
|
+
], AitheButton.prototype, "icon", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: Boolean, reflect: true })
|
|
299
|
+
], AitheButton.prototype, "disabled", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ type: Boolean, reflect: true })
|
|
302
|
+
], AitheButton.prototype, "loading", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
property({ type: Boolean, reflect: true })
|
|
305
|
+
], AitheButton.prototype, "block", void 0);
|
|
306
|
+
__decorate([
|
|
307
|
+
property({ type: String })
|
|
308
|
+
], AitheButton.prototype, "href", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
property({ type: String })
|
|
311
|
+
], AitheButton.prototype, "target", void 0);
|
|
312
|
+
AitheButton = __decorate([
|
|
313
|
+
customElement('aithe-button')
|
|
314
|
+
], AitheButton);
|
|
315
|
+
export { AitheButton };
|
|
@@ -0,0 +1,186 @@
|
|
|
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, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, queryAssignedElements, state } from 'lit/decorators.js';
|
|
9
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
11
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
12
|
+
/**
|
|
13
|
+
* Card container with header, body, and footer sections.
|
|
14
|
+
* 卡片容器,包含标题、正文和底部区域。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for card body content. 卡片正文内容。
|
|
17
|
+
* @slot header - Custom header content (overrides title). 自定义头部内容。
|
|
18
|
+
* @slot footer - Footer action area. 底部操作区域。
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <aithe-card title="Settings" icon="settings" shadow="2">
|
|
22
|
+
* <p>Card body content here.</p>
|
|
23
|
+
* <slot name="footer"><button>Save</button></slot>
|
|
24
|
+
* </aithe-card>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
let AitheCard = class AitheCard extends AitheElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/** Card title text. 卡片标题文本。 */
|
|
31
|
+
this.title = '';
|
|
32
|
+
/** Icon name to display before the title. 在标题前显示的图标名称。 */
|
|
33
|
+
this.icon = '';
|
|
34
|
+
/** Shadow elevation level (0–4). 阴影层级(0–4)。 */
|
|
35
|
+
this.shadow = 2;
|
|
36
|
+
/** Padding for the card body section. 卡片正文区域内边距。 */
|
|
37
|
+
this.bodyPadding = 'var(--aithe-space-lg)';
|
|
38
|
+
/** Whether to show a border around the card. 是否显示卡片边框。 */
|
|
39
|
+
this.bordered = true;
|
|
40
|
+
/** Divider style between sections: 'border' | 'none'. 区域间分割线样式:'border' | 'none'。 */
|
|
41
|
+
this.divider = 'border';
|
|
42
|
+
this.hasHeaderSlot = false;
|
|
43
|
+
this.hasFooterSlot = false;
|
|
44
|
+
this.syncSlots = () => {
|
|
45
|
+
this.hasHeaderSlot = this.headerSlotNodes.length > 0;
|
|
46
|
+
this.hasFooterSlot = this.footerSlotNodes.length > 0;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static { this.styles = [
|
|
50
|
+
aitheBaseStyles,
|
|
51
|
+
css `
|
|
52
|
+
:host {
|
|
53
|
+
display: block;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.card {
|
|
58
|
+
width: 100%;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
62
|
+
background: var(--aithe-color-surface-elevated);
|
|
63
|
+
backdrop-filter: blur(16px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.header {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
gap: var(--aithe-space-1);
|
|
70
|
+
min-width: 0;
|
|
71
|
+
padding: var(--aithe-space-lg) var(--aithe-space-lg) 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.header-divider {
|
|
75
|
+
border-bottom: 1px solid var(--aithe-color-border);
|
|
76
|
+
margin: var(--aithe-space-sm) var(--aithe-space-lg) 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.title {
|
|
80
|
+
margin: 0;
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: var(--aithe-space-2);
|
|
84
|
+
font-size: var(--aithe-font-size-lg);
|
|
85
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.title-icon {
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
color: var(--aithe-color-text-muted);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.body {
|
|
94
|
+
min-width: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.footer-divider {
|
|
98
|
+
border-top: 1px solid var(--aithe-color-border);
|
|
99
|
+
margin: 0 var(--aithe-space-lg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.footer {
|
|
103
|
+
min-width: 0;
|
|
104
|
+
padding: var(--aithe-space-sm) var(--aithe-space-lg) var(--aithe-space-lg);
|
|
105
|
+
color: var(--aithe-color-text-muted);
|
|
106
|
+
}
|
|
107
|
+
`,
|
|
108
|
+
]; }
|
|
109
|
+
render() {
|
|
110
|
+
const showHeader = this.title || this.hasHeaderSlot;
|
|
111
|
+
const showDivider = this.divider !== 'none';
|
|
112
|
+
const titleIcon = this.icon
|
|
113
|
+
? html `
|
|
114
|
+
<aithe-icon class="title-icon" name=${this.icon} size="18"></aithe-icon>
|
|
115
|
+
`
|
|
116
|
+
: nothing;
|
|
117
|
+
return html `
|
|
118
|
+
<article
|
|
119
|
+
class="card"
|
|
120
|
+
style=${styleMap({
|
|
121
|
+
border: this.bordered ? '1px solid var(--aithe-color-border)' : 'none',
|
|
122
|
+
boxShadow: this.shadow > 0 ? `var(--aithe-shadow-${this.shadow})` : 'none',
|
|
123
|
+
})}
|
|
124
|
+
>
|
|
125
|
+
<header class="header" ?hidden=${!showHeader}>
|
|
126
|
+
<slot name="header" @slotchange=${this.syncSlots}></slot>
|
|
127
|
+
${this.title
|
|
128
|
+
? html `
|
|
129
|
+
<div class="title">${titleIcon}${this.title}</div>
|
|
130
|
+
`
|
|
131
|
+
: null}
|
|
132
|
+
</header>
|
|
133
|
+
${showHeader && showDivider
|
|
134
|
+
? html `
|
|
135
|
+
<div class="header-divider"></div>
|
|
136
|
+
`
|
|
137
|
+
: nothing}
|
|
138
|
+
<section class="body" style=${styleMap({ padding: this.bodyPadding })}>
|
|
139
|
+
<slot></slot>
|
|
140
|
+
</section>
|
|
141
|
+
${this.hasFooterSlot && showDivider
|
|
142
|
+
? html `
|
|
143
|
+
<div class="footer-divider"></div>
|
|
144
|
+
`
|
|
145
|
+
: nothing}
|
|
146
|
+
<footer class="footer" ?hidden=${!this.hasFooterSlot}>
|
|
147
|
+
<slot name="footer" @slotchange=${this.syncSlots}></slot>
|
|
148
|
+
</footer>
|
|
149
|
+
</article>
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: String })
|
|
155
|
+
], AitheCard.prototype, "title", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: String })
|
|
158
|
+
], AitheCard.prototype, "icon", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Number })
|
|
161
|
+
], AitheCard.prototype, "shadow", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: String, attribute: 'body-padding' })
|
|
164
|
+
], AitheCard.prototype, "bodyPadding", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: Boolean })
|
|
167
|
+
], AitheCard.prototype, "bordered", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: String })
|
|
170
|
+
], AitheCard.prototype, "divider", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
queryAssignedElements({ slot: 'header' })
|
|
173
|
+
], AitheCard.prototype, "headerSlotNodes", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
queryAssignedElements({ slot: 'footer' })
|
|
176
|
+
], AitheCard.prototype, "footerSlotNodes", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
state()
|
|
179
|
+
], AitheCard.prototype, "hasHeaderSlot", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
state()
|
|
182
|
+
], AitheCard.prototype, "hasFooterSlot", void 0);
|
|
183
|
+
AitheCard = __decorate([
|
|
184
|
+
customElement('aithe-card')
|
|
185
|
+
], AitheCard);
|
|
186
|
+
export { AitheCard };
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
* Compact selectable chip with optional close button.
|
|
14
|
+
* 紧凑的可选中芯片,支持可选关闭按钮。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for chip label content. 芯片标签内容。
|
|
17
|
+
* @fires aithe-select - Emitted when chip selection state changes. 选中状态变更时触发。
|
|
18
|
+
* @fires aithe-close - Emitted when the close button is clicked. 关闭按钮点击时触发。
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <aithe-chip closable>Filter Tag</aithe-chip>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
let AitheChip = class AitheChip extends AitheElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/** Whether the chip is selected. 是否选中。 */
|
|
28
|
+
this.selected = false;
|
|
29
|
+
/** Whether the chip shows a close button. 是否显示关闭按钮。 */
|
|
30
|
+
this.closable = false;
|
|
31
|
+
/** Toggles the selected state and emits select event. 切换选中状态并触发 select 事件。 */
|
|
32
|
+
this.toggleSelect = () => {
|
|
33
|
+
this.selected = !this.selected;
|
|
34
|
+
this.emit('aithe-select', { selected: this.selected });
|
|
35
|
+
};
|
|
36
|
+
/** Handles close button click: emits event, then removes the chip from DOM. 处理关闭按钮点击:触发事件、然后从 DOM 移除芯片。 */
|
|
37
|
+
this.handleClose = (event) => {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
this.emit('aithe-close');
|
|
40
|
+
this.remove();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static { this.styles = [
|
|
44
|
+
aitheBaseStyles,
|
|
45
|
+
css `
|
|
46
|
+
:host {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
button {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--aithe-space-2);
|
|
54
|
+
min-height: 28px;
|
|
55
|
+
padding: 0 var(--aithe-space-3);
|
|
56
|
+
border: 1px solid var(--aithe-color-border);
|
|
57
|
+
border-radius: var(--aithe-radius-full);
|
|
58
|
+
background: var(--aithe-color-surface-elevated);
|
|
59
|
+
color: var(--aithe-color-text);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
button.selected {
|
|
64
|
+
border-color: var(--aithe-primary-5);
|
|
65
|
+
background: var(--aithe-primary-1);
|
|
66
|
+
color: var(--aithe-primary-8);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.close {
|
|
70
|
+
border: none;
|
|
71
|
+
background: transparent;
|
|
72
|
+
color: inherit;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
`,
|
|
76
|
+
]; }
|
|
77
|
+
render() {
|
|
78
|
+
return html `
|
|
79
|
+
<button
|
|
80
|
+
class=${classMap({ selected: this.selected })}
|
|
81
|
+
type="button"
|
|
82
|
+
@click=${this.toggleSelect}
|
|
83
|
+
>
|
|
84
|
+
<slot></slot>
|
|
85
|
+
${this.closable
|
|
86
|
+
? html `
|
|
87
|
+
<span class="close" role="button" @click=${this.handleClose}>×</span>
|
|
88
|
+
`
|
|
89
|
+
: null}
|
|
90
|
+
</button>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: Boolean, reflect: true })
|
|
96
|
+
], AitheChip.prototype, "selected", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: Boolean })
|
|
99
|
+
], AitheChip.prototype, "closable", void 0);
|
|
100
|
+
AitheChip = __decorate([
|
|
101
|
+
customElement('aithe-chip')
|
|
102
|
+
], AitheChip);
|
|
103
|
+
export { AitheChip };
|