@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,137 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
10
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
11
|
+
/**
|
|
12
|
+
* Sticky / affix wrapper that pins content to a fixed position on scroll.
|
|
13
|
+
* 固定/吸顶包装器,滚动时将内容固定到指定位置。
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for content to be affixed. 需要固定的内容。
|
|
16
|
+
* @fires aithe-affix - Emitted when affix state changes. 固定状态变更时触发。
|
|
17
|
+
* @example
|
|
18
|
+
* ```html
|
|
19
|
+
* <aithe-affix offset-top="64">
|
|
20
|
+
* <aithe-button>Sticky Button</aithe-button>
|
|
21
|
+
* </aithe-affix>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
let AitheAffix = class AitheAffix extends AitheElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/** Top offset in pixels before affixing. 吸顶前的顶部偏移量(像素)。 */
|
|
28
|
+
this.offsetTop = 0;
|
|
29
|
+
/** CSS selector for the scroll container target (defaults to window). 滚动容器目标的 CSS 选择器(默认为 window)。 */
|
|
30
|
+
this.target = '';
|
|
31
|
+
this.affixed = false;
|
|
32
|
+
this.width = 0;
|
|
33
|
+
this.height = 0;
|
|
34
|
+
this.left = 0;
|
|
35
|
+
this.scrollTarget = null;
|
|
36
|
+
this.handleScroll = () => {
|
|
37
|
+
const rect = this.getBoundingClientRect();
|
|
38
|
+
this.width = rect.width;
|
|
39
|
+
this.height = rect.height;
|
|
40
|
+
this.left = rect.left;
|
|
41
|
+
this.affixed = rect.top <= this.offsetTop;
|
|
42
|
+
this.style.setProperty('--aithe-affix-width', `${this.width}px`);
|
|
43
|
+
this.style.setProperty('--aithe-affix-left', `${this.left}px`);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
static { this.styles = [
|
|
47
|
+
aitheBaseStyles,
|
|
48
|
+
css `
|
|
49
|
+
:host {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.placeholder {
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.content.affixed {
|
|
58
|
+
position: fixed;
|
|
59
|
+
top: var(--aithe-affix-offset, 0px);
|
|
60
|
+
left: var(--aithe-affix-left, 0px);
|
|
61
|
+
z-index: var(--aithe-z-dropdown);
|
|
62
|
+
width: var(--aithe-affix-width, auto);
|
|
63
|
+
}
|
|
64
|
+
`,
|
|
65
|
+
]; }
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
super.connectedCallback();
|
|
68
|
+
this.bindTarget();
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
super.disconnectedCallback();
|
|
72
|
+
this.unbindTarget();
|
|
73
|
+
}
|
|
74
|
+
updated(changed) {
|
|
75
|
+
if (changed.has('target')) {
|
|
76
|
+
this.unbindTarget();
|
|
77
|
+
this.bindTarget();
|
|
78
|
+
}
|
|
79
|
+
if (changed.has('offsetTop')) {
|
|
80
|
+
this.style.setProperty('--aithe-affix-offset', `${this.offsetTop}px`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
resolveTarget() {
|
|
84
|
+
const root = this.getRootNode();
|
|
85
|
+
const shadowTarget = root instanceof ShadowRoot && this.target
|
|
86
|
+
? root.querySelector(this.target)
|
|
87
|
+
: null;
|
|
88
|
+
const target = shadowTarget ?? (this.target ? document.querySelector(this.target) : null);
|
|
89
|
+
return target ?? globalThis.window;
|
|
90
|
+
}
|
|
91
|
+
bindTarget() {
|
|
92
|
+
if (typeof globalThis === 'undefined') {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this.scrollTarget = this.resolveTarget();
|
|
96
|
+
this.scrollTarget.addEventListener('scroll', this.handleScroll, { passive: true });
|
|
97
|
+
globalThis.addEventListener('resize', this.handleScroll, { passive: true });
|
|
98
|
+
queueMicrotask(() => this.handleScroll());
|
|
99
|
+
}
|
|
100
|
+
unbindTarget() {
|
|
101
|
+
this.scrollTarget?.removeEventListener('scroll', this.handleScroll);
|
|
102
|
+
globalThis.removeEventListener('resize', this.handleScroll);
|
|
103
|
+
this.scrollTarget = null;
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
const placeholderHeight = this.affixed ? `${this.height}px` : 'auto';
|
|
107
|
+
return html `
|
|
108
|
+
<div class="placeholder" style=${`height:${placeholderHeight};`}>
|
|
109
|
+
<div class=${this.affixed ? 'content affixed' : 'content'}>
|
|
110
|
+
<slot></slot>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
`;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
__decorate([
|
|
117
|
+
property({ type: Number, attribute: 'offset-top' })
|
|
118
|
+
], AitheAffix.prototype, "offsetTop", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
property({ type: String })
|
|
121
|
+
], AitheAffix.prototype, "target", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
state()
|
|
124
|
+
], AitheAffix.prototype, "affixed", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
state()
|
|
127
|
+
], AitheAffix.prototype, "width", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
state()
|
|
130
|
+
], AitheAffix.prototype, "height", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
state()
|
|
133
|
+
], AitheAffix.prototype, "left", void 0);
|
|
134
|
+
AitheAffix = __decorate([
|
|
135
|
+
customElement('aithe-affix')
|
|
136
|
+
], AitheAffix);
|
|
137
|
+
export { AitheAffix };
|
|
@@ -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 { AitheElement } from '../../core/aithe-element';
|
|
10
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
11
|
+
/**
|
|
12
|
+
* 24-grid column item for use inside `aithe-row`.
|
|
13
|
+
* 24栅格列元素,用于 aithe-row 内部。
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for column content. 列内容。
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <aithe-row gutter="16">
|
|
19
|
+
* <aithe-col span="8" offset="4">Content</aithe-col>
|
|
20
|
+
* <aithe-col span="12" flex="1 1 auto">Flexible</aithe-col>
|
|
21
|
+
* </aithe-row>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
let AitheCol = class AitheCol extends AitheElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/** Number of grid columns to occupy (1–24). 占据的栅格数(1–24)。 */
|
|
28
|
+
this.span = 24;
|
|
29
|
+
/** Number of grid columns to offset from the left. 左侧偏移的栅格数。 */
|
|
30
|
+
this.offset = 0;
|
|
31
|
+
/** Number of grid columns to push right. 向右推的栅格数。 */
|
|
32
|
+
this.push = 0;
|
|
33
|
+
/** Number of grid columns to pull left. 向左拉的栅格数。 */
|
|
34
|
+
this.pull = 0;
|
|
35
|
+
/** Custom flex value (overrides span-based width). 自定义 flex 值(覆盖基于 span 的宽度)。 */
|
|
36
|
+
this.flex = '';
|
|
37
|
+
}
|
|
38
|
+
static { this.styles = [
|
|
39
|
+
aitheBaseStyles,
|
|
40
|
+
css `
|
|
41
|
+
:host {
|
|
42
|
+
display: block;
|
|
43
|
+
position: relative;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
width: var(--aithe-col-width, 100%);
|
|
46
|
+
max-width: var(--aithe-col-max-width, 100%);
|
|
47
|
+
flex: var(--aithe-col-flex, 0 0 100%);
|
|
48
|
+
margin-inline-start: var(--aithe-col-offset, 0%);
|
|
49
|
+
inset-inline-start: var(--aithe-col-push, 0%);
|
|
50
|
+
inset-inline-end: var(--aithe-col-pull, 0%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
::slotted(*) {
|
|
54
|
+
min-width: 0;
|
|
55
|
+
}
|
|
56
|
+
`,
|
|
57
|
+
]; }
|
|
58
|
+
connectedCallback() {
|
|
59
|
+
super.connectedCallback();
|
|
60
|
+
this.applyLayoutStyles();
|
|
61
|
+
}
|
|
62
|
+
updated() {
|
|
63
|
+
this.applyLayoutStyles();
|
|
64
|
+
}
|
|
65
|
+
applyLayoutStyles() {
|
|
66
|
+
const width = this.span <= 0 ? '0%' : `${(this.span / 24) * 100}%`;
|
|
67
|
+
const marginLeft = this.offset <= 0 ? '0%' : `${(this.offset / 24) * 100}%`;
|
|
68
|
+
const push = this.push <= 0 ? '0%' : `${(this.push / 24) * 100}%`;
|
|
69
|
+
const pull = this.pull <= 0 ? '0%' : `${(this.pull / 24) * 100}%`;
|
|
70
|
+
const flexValue = this.flex || `0 0 ${width}`;
|
|
71
|
+
this.hidden = this.span <= 0;
|
|
72
|
+
this.style.setProperty('--aithe-col-width', this.flex ? 'auto' : width);
|
|
73
|
+
this.style.setProperty('--aithe-col-max-width', this.flex ? 'none' : width);
|
|
74
|
+
this.style.setProperty('--aithe-col-flex', flexValue);
|
|
75
|
+
this.style.setProperty('--aithe-col-offset', marginLeft);
|
|
76
|
+
this.style.setProperty('--aithe-col-push', push);
|
|
77
|
+
this.style.setProperty('--aithe-col-pull', pull);
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return html `
|
|
81
|
+
<slot></slot>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Number })
|
|
87
|
+
], AitheCol.prototype, "span", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: Number })
|
|
90
|
+
], AitheCol.prototype, "offset", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Number })
|
|
93
|
+
], AitheCol.prototype, "push", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: Number })
|
|
96
|
+
], AitheCol.prototype, "pull", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: String })
|
|
99
|
+
], AitheCol.prototype, "flex", void 0);
|
|
100
|
+
AitheCol = __decorate([
|
|
101
|
+
customElement('aithe-col')
|
|
102
|
+
], AitheCol);
|
|
103
|
+
export { AitheCol };
|
|
@@ -0,0 +1,165 @@
|
|
|
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 } 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
|
+
* Single collapsible panel for use inside `aithe-collapse`.
|
|
14
|
+
* 单个可折叠面板,用于 aithe-collapse 内部。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for panel body content. 面板正文内容。
|
|
17
|
+
* @fires aithe-collapse-toggle - Emitted when the panel is toggled. 面板切换时触发。
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-collapse-item title="Details" name="detail-1" icon="info">
|
|
21
|
+
* <p>Expanded content here.</p>
|
|
22
|
+
* </aithe-collapse-item>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
let AitheCollapseItem = class AitheCollapseItem extends AitheElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/** Panel header title text. 面板标题文本。 */
|
|
29
|
+
this.title = '';
|
|
30
|
+
/** Unique key identifying this panel. 面板唯一标识键。 */
|
|
31
|
+
this.name = '';
|
|
32
|
+
/** Icon name to display before the title. 在标题前显示的图标名称。 */
|
|
33
|
+
this.icon = '';
|
|
34
|
+
/** Whether the panel is disabled and cannot be toggled. 是否禁用面板切换。 */
|
|
35
|
+
this.disabled = false;
|
|
36
|
+
/** Whether the panel is currently expanded. 是否当前展开。 */
|
|
37
|
+
this.open = false;
|
|
38
|
+
this.toggle = () => {
|
|
39
|
+
if (this.disabled) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.emit('aithe-collapse-toggle', {
|
|
43
|
+
name: this.name,
|
|
44
|
+
open: !this.open,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
this.handleKeydown = (event) => {
|
|
48
|
+
if (event.key !== 'Enter' && event.key !== ' ') {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
this.toggle();
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static { this.styles = [
|
|
56
|
+
aitheBaseStyles,
|
|
57
|
+
css `
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
border: 1px solid var(--aithe-color-border);
|
|
61
|
+
border-radius: var(--aithe-container-radius-lg);
|
|
62
|
+
background: var(--aithe-color-surface-elevated);
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.trigger {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: var(--aithe-space-4);
|
|
70
|
+
width: 100%;
|
|
71
|
+
min-height: 52px;
|
|
72
|
+
padding: var(--aithe-space-4) var(--aithe-space-5);
|
|
73
|
+
border: none;
|
|
74
|
+
background: transparent;
|
|
75
|
+
color: var(--aithe-color-text);
|
|
76
|
+
text-align: left;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.trigger.disabled {
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
opacity: 0.56;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.trigger:hover:not(.disabled) {
|
|
86
|
+
background: var(--aithe-color-surface-muted);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.title-group {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: var(--aithe-space-2);
|
|
93
|
+
flex: 1;
|
|
94
|
+
min-width: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.title-icon {
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
color: var(--aithe-color-text-muted);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.title {
|
|
103
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.icon {
|
|
107
|
+
color: var(--aithe-color-text-muted);
|
|
108
|
+
transition: transform var(--aithe-duration-fast) var(--aithe-ease-standard);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.icon.open {
|
|
112
|
+
transform: rotate(180deg);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.content {
|
|
116
|
+
padding: 0 var(--aithe-space-5) var(--aithe-space-5);
|
|
117
|
+
color: var(--aithe-color-text-muted);
|
|
118
|
+
}
|
|
119
|
+
`,
|
|
120
|
+
]; }
|
|
121
|
+
render() {
|
|
122
|
+
return html `
|
|
123
|
+
<button
|
|
124
|
+
class=${classMap({ trigger: true, disabled: this.disabled })}
|
|
125
|
+
type="button"
|
|
126
|
+
aria-expanded=${String(this.open)}
|
|
127
|
+
?disabled=${this.disabled}
|
|
128
|
+
@click=${this.toggle}
|
|
129
|
+
@keydown=${this.handleKeydown}
|
|
130
|
+
>
|
|
131
|
+
<span class="title-group">
|
|
132
|
+
${this.icon
|
|
133
|
+
? html `
|
|
134
|
+
<aithe-icon class="title-icon" name=${this.icon} size="16"></aithe-icon>
|
|
135
|
+
`
|
|
136
|
+
: nothing}
|
|
137
|
+
<span class="title">${this.title}</span>
|
|
138
|
+
</span>
|
|
139
|
+
<span class=${classMap({ icon: true, open: this.open })} aria-hidden="true">⌄</span>
|
|
140
|
+
</button>
|
|
141
|
+
<div class="content" ?hidden=${!this.open}>
|
|
142
|
+
<slot></slot>
|
|
143
|
+
</div>
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ type: String })
|
|
149
|
+
], AitheCollapseItem.prototype, "title", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: String })
|
|
152
|
+
], AitheCollapseItem.prototype, "name", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: String })
|
|
155
|
+
], AitheCollapseItem.prototype, "icon", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: Boolean, reflect: true })
|
|
158
|
+
], AitheCollapseItem.prototype, "disabled", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Boolean, reflect: true })
|
|
161
|
+
], AitheCollapseItem.prototype, "open", void 0);
|
|
162
|
+
AitheCollapseItem = __decorate([
|
|
163
|
+
customElement('aithe-collapse-item')
|
|
164
|
+
], AitheCollapseItem);
|
|
165
|
+
export { AitheCollapseItem };
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
* Accordion / multi-expand collapse container for collapsible panels.
|
|
13
|
+
* 手风琴/多展开折叠容器,用于可折叠面板。
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for `aithe-collapse-item` elements. aithe-collapse-item 面板元素。
|
|
16
|
+
* @fires aithe-change - Emitted when the active panel changes. 活动面板变更时触发。
|
|
17
|
+
* @example
|
|
18
|
+
* ```html
|
|
19
|
+
* <aithe-collapse active-key="panel-1" accordion>
|
|
20
|
+
* <aithe-collapse-item title="Section A" name="panel-1">Content A</aithe-collapse-item>
|
|
21
|
+
* <aithe-collapse-item title="Section B" name="panel-2">Content B</aithe-collapse-item>
|
|
22
|
+
* </aithe-collapse>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
let AitheCollapse = class AitheCollapse extends AitheElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/** Comma-separated keys of active (expanded) panels. 活动(展开)面板的键,逗号分隔。 */
|
|
29
|
+
this.activeKey = '';
|
|
30
|
+
/** Whether only one panel can be open at a time (accordion mode). 是否只允许同时打开一个面板(手风琴模式)。 */
|
|
31
|
+
this.accordion = false;
|
|
32
|
+
this.syncItems = () => {
|
|
33
|
+
const activeKeys = this.activeKeys;
|
|
34
|
+
for (const [index, item] of this.items.entries()) {
|
|
35
|
+
const name = item.name || `item-${index + 1}`;
|
|
36
|
+
item.name = name;
|
|
37
|
+
item.open = activeKeys.has(name);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
this.handleToggle = (event) => {
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
const name = event.detail.name;
|
|
43
|
+
if (!name) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeKeys = this.activeKeys;
|
|
47
|
+
if (this.accordion) {
|
|
48
|
+
this.activeKey = activeKeys.has(name) ? '' : name;
|
|
49
|
+
}
|
|
50
|
+
else if (activeKeys.has(name)) {
|
|
51
|
+
activeKeys.delete(name);
|
|
52
|
+
this.activeKey = Array.from(activeKeys).join(',');
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
activeKeys.add(name);
|
|
56
|
+
this.activeKey = Array.from(activeKeys).join(',');
|
|
57
|
+
}
|
|
58
|
+
this.syncItems();
|
|
59
|
+
this.emit('aithe-change', { activeKey: this.activeKey });
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static { this.styles = [
|
|
63
|
+
aitheBaseStyles,
|
|
64
|
+
css `
|
|
65
|
+
:host {
|
|
66
|
+
display: grid;
|
|
67
|
+
gap: var(--aithe-space-3);
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
70
|
+
]; }
|
|
71
|
+
connectedCallback() {
|
|
72
|
+
super.connectedCallback();
|
|
73
|
+
this.addEventListener('aithe-collapse-toggle', this.handleToggle);
|
|
74
|
+
}
|
|
75
|
+
disconnectedCallback() {
|
|
76
|
+
super.disconnectedCallback();
|
|
77
|
+
this.removeEventListener('aithe-collapse-toggle', this.handleToggle);
|
|
78
|
+
}
|
|
79
|
+
updated(changed) {
|
|
80
|
+
if (changed.has('activeKey') || changed.has('accordion')) {
|
|
81
|
+
this.syncItems();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
get items() {
|
|
85
|
+
return Array.from(this.querySelectorAll('aithe-collapse-item'));
|
|
86
|
+
}
|
|
87
|
+
get activeKeys() {
|
|
88
|
+
return new Set(this.activeKey
|
|
89
|
+
.split(',')
|
|
90
|
+
.map((item) => item.trim())
|
|
91
|
+
.filter(Boolean));
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return html `
|
|
95
|
+
<slot @slotchange=${this.syncItems}></slot>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: String, attribute: 'active-key' })
|
|
101
|
+
], AitheCollapse.prototype, "activeKey", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: Boolean })
|
|
104
|
+
], AitheCollapse.prototype, "accordion", void 0);
|
|
105
|
+
AitheCollapse = __decorate([
|
|
106
|
+
customElement('aithe-collapse')
|
|
107
|
+
], AitheCollapse);
|
|
108
|
+
export { AitheCollapse };
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { styleMap } from 'lit/directives/style-map.js';
|
|
10
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
11
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
12
|
+
import { normalizeCssUnit } from '../../utils';
|
|
13
|
+
/**
|
|
14
|
+
* Top-level page layout container with configurable width, padding, and direction.
|
|
15
|
+
* 顶层页面布局容器,支持配置宽度、内边距和方向。
|
|
16
|
+
*
|
|
17
|
+
* @slot - Default slot for container content. 容器内容。
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-container max-width="960px" padding="var(--aithe-space-lg)" direction="column">
|
|
21
|
+
* <p>Centered content</p>
|
|
22
|
+
* </aithe-container>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
let AitheContainer = class AitheContainer extends AitheElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/** Maximum width of the container (CSS value). 容器最大宽度(CSS 值)。 */
|
|
29
|
+
this.maxWidth = '1280px';
|
|
30
|
+
/** Horizontal padding of the container (CSS value). 容器水平内边距(CSS 值)。 */
|
|
31
|
+
this.padding = 'var(--aithe-space-lg)';
|
|
32
|
+
/** Gap between child elements (CSS value). 子元素间距(CSS 值)。 */
|
|
33
|
+
this.gap = '0';
|
|
34
|
+
/** Whether the container fills the full width without max-width constraint. 是否填满全宽,不受最大宽度限制。 */
|
|
35
|
+
this.fluid = false;
|
|
36
|
+
/** Whether the container fills the full viewport height. 是否填满整个视口高度。 */
|
|
37
|
+
this.full = false;
|
|
38
|
+
/** Flex direction for child layout. 子元素排列方向。 */
|
|
39
|
+
this.direction = 'column';
|
|
40
|
+
}
|
|
41
|
+
static { this.styles = [
|
|
42
|
+
aitheBaseStyles,
|
|
43
|
+
css `
|
|
44
|
+
:host {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
`,
|
|
49
|
+
]; }
|
|
50
|
+
render() {
|
|
51
|
+
const gap = normalizeCssUnit(this.gap, '0');
|
|
52
|
+
const padding = normalizeCssUnit(this.padding, 'var(--aithe-space-lg)');
|
|
53
|
+
return html `
|
|
54
|
+
<div
|
|
55
|
+
style=${styleMap({
|
|
56
|
+
display: 'flex',
|
|
57
|
+
flexDirection: this.direction,
|
|
58
|
+
gap,
|
|
59
|
+
marginInline: 'auto',
|
|
60
|
+
maxWidth: this.full || this.fluid ? '100%' : this.maxWidth,
|
|
61
|
+
minHeight: this.full ? '100vh' : undefined,
|
|
62
|
+
paddingInline: padding,
|
|
63
|
+
width: '100%',
|
|
64
|
+
})}
|
|
65
|
+
>
|
|
66
|
+
<slot></slot>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
__decorate([
|
|
72
|
+
property({ type: String })
|
|
73
|
+
], AitheContainer.prototype, "maxWidth", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
property({ type: String })
|
|
76
|
+
], AitheContainer.prototype, "padding", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ type: String })
|
|
79
|
+
], AitheContainer.prototype, "gap", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property({ type: Boolean, reflect: true })
|
|
82
|
+
], AitheContainer.prototype, "fluid", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
property({ type: Boolean })
|
|
85
|
+
], AitheContainer.prototype, "full", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
property({ type: String })
|
|
88
|
+
], AitheContainer.prototype, "direction", void 0);
|
|
89
|
+
AitheContainer = __decorate([
|
|
90
|
+
customElement('aithe-container')
|
|
91
|
+
], AitheContainer);
|
|
92
|
+
export { AitheContainer };
|