@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,252 @@
|
|
|
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
|
+
* Nested branch (sub-menu) item for `aithe-menu` with expandable children.
|
|
14
|
+
* aithe-menu 的嵌套分支(子菜单)项,支持展开子项。
|
|
15
|
+
*
|
|
16
|
+
* Supports collapsed mode: when `collapsed` is true, the trigger displays only
|
|
17
|
+
* the icon and children are shown in a popup panel on click.
|
|
18
|
+
* 支持折叠模式:当 collapsed 为 true 时,触发器仅显示图标,子菜单以弹出面板形式展示。
|
|
19
|
+
*
|
|
20
|
+
* @slot - Default slot for nested `aithe-menu-item` elements. 嵌套的 aithe-menu-item 元素。
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <aithe-sub-menu title="Settings" name="settings" icon="settings">
|
|
24
|
+
* <aithe-menu-item name="profile">Profile</aithe-menu-item>
|
|
25
|
+
* <aithe-menu-item name="security">Security</aithe-menu-item>
|
|
26
|
+
* </aithe-sub-menu>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
let AitheSubMenu = class AitheSubMenu extends AitheElement {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
/** Unique key identifying this sub-menu. 子菜单唯一标识键。 */
|
|
33
|
+
this.name = '';
|
|
34
|
+
/** Display title for the sub-menu trigger. 子菜单触发器的显示标题。 */
|
|
35
|
+
this.title = '';
|
|
36
|
+
/** Icon name to display before the title. 在标题前显示的图标名称。 */
|
|
37
|
+
this.icon = '';
|
|
38
|
+
/** Whether the sub-menu is disabled. 是否禁用子菜单。 */
|
|
39
|
+
this.disabled = false;
|
|
40
|
+
/** Whether the sub-menu is currently expanded. 是否当前展开。 */
|
|
41
|
+
this.open = false;
|
|
42
|
+
/** Whether any child item is currently active. 是否有子项当前选中。 */
|
|
43
|
+
this.active = false;
|
|
44
|
+
/** Inherited menu mode from parent `aithe-menu`. 从父级 aithe-menu 继承的菜单模式。 */
|
|
45
|
+
this.menuMode = 'vertical';
|
|
46
|
+
/** Inherited collapsed state from parent `aithe-menu`. When true, the trigger shows only the icon and children are displayed in a popup panel. 从父级 aithe-menu 继承的折叠状态。为 true 时触发器仅显示图标,子菜单以弹出面板形式展示。 */
|
|
47
|
+
this.collapsed = false;
|
|
48
|
+
this.toggle = () => {
|
|
49
|
+
if (this.disabled) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.open = !this.open;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static { this.styles = [
|
|
56
|
+
aitheBaseStyles,
|
|
57
|
+
css `
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
position: relative;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.toggle {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--aithe-space-3);
|
|
67
|
+
width: 100%;
|
|
68
|
+
min-height: 42px;
|
|
69
|
+
padding: 0 var(--aithe-space-4);
|
|
70
|
+
border: none;
|
|
71
|
+
border-radius: var(--aithe-radius-md);
|
|
72
|
+
background: transparent;
|
|
73
|
+
color: var(--aithe-color-text-muted);
|
|
74
|
+
text-align: left;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.toggle.collapsed {
|
|
79
|
+
justify-content: center;
|
|
80
|
+
padding: 0;
|
|
81
|
+
gap: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.toggle-label {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: var(--aithe-space-2);
|
|
88
|
+
flex: 1;
|
|
89
|
+
min-width: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.toggle-icon {
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
color: var(--aithe-color-text-muted);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.toggle.active {
|
|
98
|
+
color: var(--aithe-color-text);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.toggle.active .toggle-icon {
|
|
102
|
+
color: var(--aithe-color-text);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.toggle:hover:not(:disabled) {
|
|
106
|
+
background: var(--aithe-color-surface-muted);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.toggle:disabled {
|
|
110
|
+
opacity: 0.48;
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.children {
|
|
115
|
+
display: grid;
|
|
116
|
+
gap: var(--aithe-space-2);
|
|
117
|
+
padding-top: var(--aithe-space-2);
|
|
118
|
+
padding-left: var(--aithe-space-4);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([open][data-mode='horizontal']) .children {
|
|
122
|
+
position: absolute;
|
|
123
|
+
z-index: var(--aithe-z-dropdown);
|
|
124
|
+
min-width: 220px;
|
|
125
|
+
padding: var(--aithe-space-3);
|
|
126
|
+
border: 1px solid var(--aithe-color-border);
|
|
127
|
+
border-radius: var(--aithe-container-radius-lg);
|
|
128
|
+
background: var(--aithe-color-surface-elevated);
|
|
129
|
+
box-shadow: var(--aithe-shadow-3);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.arrow {
|
|
133
|
+
transition: transform var(--aithe-duration-fast) var(--aithe-ease-standard);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.arrow.open {
|
|
137
|
+
transform: rotate(180deg);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.collapsed-children {
|
|
141
|
+
display: grid;
|
|
142
|
+
gap: var(--aithe-space-2);
|
|
143
|
+
padding-top: var(--aithe-space-2);
|
|
144
|
+
}
|
|
145
|
+
`,
|
|
146
|
+
]; }
|
|
147
|
+
connectedCallback() {
|
|
148
|
+
super.connectedCallback();
|
|
149
|
+
}
|
|
150
|
+
updated(changed) {
|
|
151
|
+
if (changed.has('menuMode')) {
|
|
152
|
+
this.dataset.mode = this.menuMode;
|
|
153
|
+
}
|
|
154
|
+
if (changed.has('collapsed')) {
|
|
155
|
+
if (this.collapsed) {
|
|
156
|
+
this.open = false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (changed.has('open') && this.collapsed && this.open) {
|
|
160
|
+
requestAnimationFrame(() => {
|
|
161
|
+
const items = this.querySelectorAll('aithe-menu-item');
|
|
162
|
+
for (const item of items) {
|
|
163
|
+
item.collapsed = false;
|
|
164
|
+
}
|
|
165
|
+
const subMenus = this.querySelectorAll('aithe-sub-menu');
|
|
166
|
+
for (const sm of subMenus) {
|
|
167
|
+
sm.collapsed = false;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
render() {
|
|
173
|
+
if (this.collapsed) {
|
|
174
|
+
return html `
|
|
175
|
+
<button
|
|
176
|
+
class=${classMap({
|
|
177
|
+
toggle: true,
|
|
178
|
+
active: this.active,
|
|
179
|
+
collapsed: true,
|
|
180
|
+
})}
|
|
181
|
+
type="button"
|
|
182
|
+
title=${this.title || this.name}
|
|
183
|
+
?disabled=${this.disabled}
|
|
184
|
+
aria-expanded=${String(this.open)}
|
|
185
|
+
@click=${this.toggle}
|
|
186
|
+
>
|
|
187
|
+
${this.icon
|
|
188
|
+
? html `
|
|
189
|
+
<aithe-icon class="toggle-icon" name=${this.icon} size="16"></aithe-icon>
|
|
190
|
+
`
|
|
191
|
+
: nothing}
|
|
192
|
+
</button>
|
|
193
|
+
<div class="collapsed-children" ?hidden=${!this.open}>
|
|
194
|
+
<slot></slot>
|
|
195
|
+
</div>
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
198
|
+
return html `
|
|
199
|
+
<button
|
|
200
|
+
class=${classMap({
|
|
201
|
+
toggle: true,
|
|
202
|
+
active: this.active,
|
|
203
|
+
})}
|
|
204
|
+
type="button"
|
|
205
|
+
?disabled=${this.disabled}
|
|
206
|
+
aria-expanded=${String(this.open)}
|
|
207
|
+
@click=${this.toggle}
|
|
208
|
+
>
|
|
209
|
+
<span class="toggle-label">
|
|
210
|
+
${this.icon
|
|
211
|
+
? html `
|
|
212
|
+
<aithe-icon class="toggle-icon" name=${this.icon} size="16"></aithe-icon>
|
|
213
|
+
`
|
|
214
|
+
: nothing}
|
|
215
|
+
<span>${this.title || this.name}</span>
|
|
216
|
+
</span>
|
|
217
|
+
<span class=${classMap({ arrow: true, open: this.open })}>⌄</span>
|
|
218
|
+
</button>
|
|
219
|
+
<div class="children" ?hidden=${!this.open}>
|
|
220
|
+
<slot></slot>
|
|
221
|
+
</div>
|
|
222
|
+
`;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: String })
|
|
227
|
+
], AitheSubMenu.prototype, "name", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
property({ type: String })
|
|
230
|
+
], AitheSubMenu.prototype, "title", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: String })
|
|
233
|
+
], AitheSubMenu.prototype, "icon", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
property({ type: Boolean, reflect: true })
|
|
236
|
+
], AitheSubMenu.prototype, "disabled", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ type: Boolean, reflect: true })
|
|
239
|
+
], AitheSubMenu.prototype, "open", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
property({ attribute: false })
|
|
242
|
+
], AitheSubMenu.prototype, "active", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ attribute: false })
|
|
245
|
+
], AitheSubMenu.prototype, "menuMode", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
property({ attribute: false })
|
|
248
|
+
], AitheSubMenu.prototype, "collapsed", void 0);
|
|
249
|
+
AitheSubMenu = __decorate([
|
|
250
|
+
customElement('aithe-sub-menu')
|
|
251
|
+
], AitheSubMenu);
|
|
252
|
+
export { AitheSubMenu };
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
* Linear progress bar with status colors and optional percentage label.
|
|
13
|
+
* 线性进度条,支持状态颜色和可选百分比标签。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <aithe-progress-bar percent="75" status="success" show-info></aithe-progress-bar>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
let AitheProgressBar = class AitheProgressBar extends AitheElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
/** Current progress percentage (0–100). 当前进度百分比(0–100)。 */
|
|
24
|
+
this.percent = 0;
|
|
25
|
+
/** Status color variant. 状态颜色类型。 */
|
|
26
|
+
this.status = 'default';
|
|
27
|
+
/** Whether to display the percentage text. 是否显示百分比文本。 */
|
|
28
|
+
this.showInfo = true;
|
|
29
|
+
}
|
|
30
|
+
static { this.styles = [
|
|
31
|
+
aitheBaseStyles,
|
|
32
|
+
css `
|
|
33
|
+
:host {
|
|
34
|
+
display: grid;
|
|
35
|
+
gap: var(--aithe-space-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.track {
|
|
39
|
+
height: 10px;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
border-radius: var(--aithe-radius-full);
|
|
42
|
+
background: var(--aithe-neutral-2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bar {
|
|
46
|
+
height: 100%;
|
|
47
|
+
border-radius: inherit;
|
|
48
|
+
background: linear-gradient(90deg, var(--aithe-primary-5), var(--aithe-primary-7));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bar.success {
|
|
52
|
+
background: linear-gradient(90deg, var(--aithe-success-5), var(--aithe-success-7));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bar.warning {
|
|
56
|
+
background: linear-gradient(90deg, var(--aithe-warning-5), var(--aithe-warning-7));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bar.danger {
|
|
60
|
+
background: linear-gradient(90deg, var(--aithe-danger-5), var(--aithe-danger-7));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.info {
|
|
64
|
+
color: var(--aithe-color-text-muted);
|
|
65
|
+
font-size: var(--aithe-font-size-sm);
|
|
66
|
+
}
|
|
67
|
+
`,
|
|
68
|
+
]; }
|
|
69
|
+
render() {
|
|
70
|
+
return html `
|
|
71
|
+
<div class="track">
|
|
72
|
+
<div
|
|
73
|
+
class="bar ${this.status}"
|
|
74
|
+
style=${`width:${Math.max(0, Math.min(100, this.percent))}%;`}
|
|
75
|
+
></div>
|
|
76
|
+
</div>
|
|
77
|
+
${this.showInfo
|
|
78
|
+
? html `
|
|
79
|
+
<span class="info">${this.percent}%</span>
|
|
80
|
+
`
|
|
81
|
+
: null}
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Number })
|
|
87
|
+
], AitheProgressBar.prototype, "percent", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String })
|
|
90
|
+
], AitheProgressBar.prototype, "status", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Boolean, attribute: 'show-info' })
|
|
93
|
+
], AitheProgressBar.prototype, "showInfo", void 0);
|
|
94
|
+
AitheProgressBar = __decorate([
|
|
95
|
+
customElement('aithe-progress-bar')
|
|
96
|
+
], AitheProgressBar);
|
|
97
|
+
export { AitheProgressBar };
|
|
@@ -0,0 +1,111 @@
|
|
|
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, svg } 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
|
+
* Circular progress ring indicator with status colors and percentage label.
|
|
13
|
+
* 圆形进度环指示器,支持状态颜色和百分比标签。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <aithe-progress-ring percent="60" size="160" stroke-width="12" status="warning"></aithe-progress-ring>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
let AitheProgressRing = class AitheProgressRing extends AitheElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
/** Current progress percentage (0–100). 当前进度百分比(0–100)。 */
|
|
24
|
+
this.percent = 0;
|
|
25
|
+
/** Diameter of the ring in pixels. 环的直径(像素)。 */
|
|
26
|
+
this.size = '120';
|
|
27
|
+
/** Stroke width of the ring in pixels. 环的描边宽度(像素)。 */
|
|
28
|
+
this.strokeWidth = 10;
|
|
29
|
+
/** Status color variant. 状态颜色类型。 */
|
|
30
|
+
this.status = 'default';
|
|
31
|
+
}
|
|
32
|
+
static { this.styles = [
|
|
33
|
+
aitheBaseStyles,
|
|
34
|
+
css `
|
|
35
|
+
:host {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
svg {
|
|
40
|
+
overflow: visible;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.track {
|
|
44
|
+
stroke: var(--aithe-neutral-2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bar {
|
|
48
|
+
stroke: var(--aithe-primary-6);
|
|
49
|
+
transition: stroke-dashoffset var(--aithe-duration-base) var(--aithe-ease-standard);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.bar.success {
|
|
53
|
+
stroke: var(--aithe-success-6);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.bar.warning {
|
|
57
|
+
stroke: var(--aithe-warning-6);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.bar.danger {
|
|
61
|
+
stroke: var(--aithe-danger-6);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.label {
|
|
65
|
+
font-size: var(--aithe-font-size-sm);
|
|
66
|
+
fill: var(--aithe-color-text-muted);
|
|
67
|
+
}
|
|
68
|
+
`,
|
|
69
|
+
]; }
|
|
70
|
+
render() {
|
|
71
|
+
const size = Number(this.size) || 120;
|
|
72
|
+
const radius = Math.max(0, (size - this.strokeWidth) / 2);
|
|
73
|
+
const circumference = 2 * Math.PI * radius;
|
|
74
|
+
const offset = circumference - (Math.max(0, Math.min(100, this.percent)) / 100) * circumference;
|
|
75
|
+
const center = size / 2;
|
|
76
|
+
return svg `
|
|
77
|
+
<svg width=${size} height=${size} viewBox=${`0 0 ${size} ${size}`}>
|
|
78
|
+
<circle class="track" cx=${center} cy=${center} r=${radius} fill="none" stroke-width=${this.strokeWidth}></circle>
|
|
79
|
+
<circle
|
|
80
|
+
class=${`bar ${this.status}`}
|
|
81
|
+
cx=${center}
|
|
82
|
+
cy=${center}
|
|
83
|
+
r=${radius}
|
|
84
|
+
fill="none"
|
|
85
|
+
stroke-width=${this.strokeWidth}
|
|
86
|
+
stroke-linecap="round"
|
|
87
|
+
stroke-dasharray=${circumference}
|
|
88
|
+
stroke-dashoffset=${offset}
|
|
89
|
+
transform=${`rotate(-90 ${center} ${center})`}
|
|
90
|
+
></circle>
|
|
91
|
+
<text class="label" x="50%" y="50%" text-anchor="middle" dominant-baseline="middle">${this.percent}%</text>
|
|
92
|
+
</svg>
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
__decorate([
|
|
97
|
+
property({ type: Number })
|
|
98
|
+
], AitheProgressRing.prototype, "percent", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: String })
|
|
101
|
+
], AitheProgressRing.prototype, "size", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: Number, attribute: 'stroke-width' })
|
|
104
|
+
], AitheProgressRing.prototype, "strokeWidth", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
property({ type: String })
|
|
107
|
+
], AitheProgressRing.prototype, "status", void 0);
|
|
108
|
+
AitheProgressRing = __decorate([
|
|
109
|
+
customElement('aithe-progress-ring')
|
|
110
|
+
], AitheProgressRing);
|
|
111
|
+
export { AitheProgressRing };
|
|
@@ -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 { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
11
|
+
import { aitheBaseStyles } from '../../core/styles';
|
|
12
|
+
/**
|
|
13
|
+
* Skeleton placeholder for content loading states with line, circle, and rect shapes.
|
|
14
|
+
* 骨架屏占位组件,用于内容加载状态,支持线条、圆形和矩形形状。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot shown when `active` is false. `active` 为 false 时显示的默认插槽。
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-skeleton rows="4" shape="line" animated active></aithe-skeleton>
|
|
21
|
+
* <aithe-skeleton shape="circle" :active="loading">
|
|
22
|
+
* <aithe-avatar src="user.jpg"></aithe-avatar>
|
|
23
|
+
* </aithe-skeleton>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
let AitheSkeleton = class AitheSkeleton extends AitheElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
/** Number of placeholder rows. 占位行数。 */
|
|
30
|
+
this.rows = 3;
|
|
31
|
+
/** Whether rows have a shimmer animation. 行是否具有闪烁动画。 */
|
|
32
|
+
this.animated = true;
|
|
33
|
+
/** Shape of each placeholder row. 每行占位的形状。 */
|
|
34
|
+
this.shape = 'line';
|
|
35
|
+
/** Whether the skeleton is active (true = show placeholder, false = show slot content). 骨架屏是否激活(true = 显示占位,false = 显示插槽内容)。 */
|
|
36
|
+
this.active = true;
|
|
37
|
+
}
|
|
38
|
+
static { this.styles = [
|
|
39
|
+
aitheBaseStyles,
|
|
40
|
+
css `
|
|
41
|
+
:host {
|
|
42
|
+
display: grid;
|
|
43
|
+
gap: var(--aithe-space-3);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.row {
|
|
47
|
+
height: 14px;
|
|
48
|
+
border-radius: var(--aithe-container-radius-full);
|
|
49
|
+
background: linear-gradient(
|
|
50
|
+
90deg,
|
|
51
|
+
var(--aithe-neutral-2) 0%,
|
|
52
|
+
var(--aithe-neutral-1) 50%,
|
|
53
|
+
var(--aithe-neutral-2) 100%
|
|
54
|
+
);
|
|
55
|
+
background-size: 200% 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.row.circle {
|
|
59
|
+
width: 48px;
|
|
60
|
+
height: 48px;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.row.rect {
|
|
65
|
+
height: 120px;
|
|
66
|
+
border-radius: var(--aithe-container-radius-lg);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.row.animated {
|
|
70
|
+
animation: aithe-skeleton 1.2s linear infinite;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes aithe-skeleton {
|
|
74
|
+
to {
|
|
75
|
+
background-position: -200% 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`,
|
|
79
|
+
]; }
|
|
80
|
+
render() {
|
|
81
|
+
if (!this.active) {
|
|
82
|
+
return html `
|
|
83
|
+
<slot></slot>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
return html `
|
|
87
|
+
${Array.from({ length: this.rows }, () => html `
|
|
88
|
+
<div class=${classMap({ row: true, [this.shape]: true, animated: this.animated })}></div>
|
|
89
|
+
`)}
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: Number })
|
|
95
|
+
], AitheSkeleton.prototype, "rows", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
property({ type: Boolean })
|
|
98
|
+
], AitheSkeleton.prototype, "animated", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: String })
|
|
101
|
+
], AitheSkeleton.prototype, "shape", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: Boolean })
|
|
104
|
+
], AitheSkeleton.prototype, "active", void 0);
|
|
105
|
+
AitheSkeleton = __decorate([
|
|
106
|
+
customElement('aithe-skeleton')
|
|
107
|
+
], AitheSkeleton);
|
|
108
|
+
export { AitheSkeleton };
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
* Generic loading spinner with ring and dots variants.
|
|
13
|
+
* 通用加载旋转器,支持环形和圆点两种变体。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <aithe-spinner size="lg" variant="dots" color="var(--aithe-danger-6)"></aithe-spinner>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
let AitheSpinner = class AitheSpinner extends AitheElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
/** Size scale of the spinner. 旋转器的尺寸规格。 */
|
|
24
|
+
this.size = 'md';
|
|
25
|
+
/** Custom color for the spinner (CSS value). 旋转器的自定义颜色(CSS 值)。 */
|
|
26
|
+
this.color = 'var(--aithe-primary-6)';
|
|
27
|
+
/** Visual variant of the spinner. 旋转器的视觉变体。 */
|
|
28
|
+
this.variant = 'ring';
|
|
29
|
+
}
|
|
30
|
+
static { this.styles = [
|
|
31
|
+
aitheBaseStyles,
|
|
32
|
+
css `
|
|
33
|
+
:host {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ring {
|
|
38
|
+
border: 3px solid rgba(77, 141, 255, 0.18);
|
|
39
|
+
border-right-color: transparent;
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
animation: aithe-spin 0.85s linear infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ring.sm {
|
|
45
|
+
width: 18px;
|
|
46
|
+
height: 18px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ring.md {
|
|
50
|
+
width: 26px;
|
|
51
|
+
height: 26px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ring.lg {
|
|
55
|
+
width: 38px;
|
|
56
|
+
height: 38px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dots {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
gap: 4px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dot {
|
|
65
|
+
width: 8px;
|
|
66
|
+
height: 8px;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
background: var(--aithe-spinner-color, var(--aithe-primary-6));
|
|
69
|
+
animation: aithe-bounce 0.9s infinite ease-in-out both;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dot:nth-child(2) {
|
|
73
|
+
animation-delay: 0.12s;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dot:nth-child(3) {
|
|
77
|
+
animation-delay: 0.24s;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes aithe-spin {
|
|
81
|
+
to {
|
|
82
|
+
transform: rotate(360deg);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes aithe-bounce {
|
|
87
|
+
0%,
|
|
88
|
+
80%,
|
|
89
|
+
100% {
|
|
90
|
+
transform: scale(0.5);
|
|
91
|
+
opacity: 0.5;
|
|
92
|
+
}
|
|
93
|
+
40% {
|
|
94
|
+
transform: scale(1);
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`,
|
|
99
|
+
]; }
|
|
100
|
+
render() {
|
|
101
|
+
return this.variant === 'dots'
|
|
102
|
+
? html `
|
|
103
|
+
<span class="dots" style=${`--aithe-spinner-color:${this.color};`}>
|
|
104
|
+
<span class="dot"></span>
|
|
105
|
+
<span class="dot"></span>
|
|
106
|
+
<span class="dot"></span>
|
|
107
|
+
</span>
|
|
108
|
+
`
|
|
109
|
+
: html `
|
|
110
|
+
<span
|
|
111
|
+
class=${`ring ${this.size}`}
|
|
112
|
+
style=${`border-top-color:${this.color};border-left-color:${this.color};border-bottom-color:${this.color};`}
|
|
113
|
+
></span>
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
__decorate([
|
|
118
|
+
property({ type: String })
|
|
119
|
+
], AitheSpinner.prototype, "size", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: String })
|
|
122
|
+
], AitheSpinner.prototype, "color", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: String })
|
|
125
|
+
], AitheSpinner.prototype, "variant", void 0);
|
|
126
|
+
AitheSpinner = __decorate([
|
|
127
|
+
customElement('aithe-spinner')
|
|
128
|
+
], AitheSpinner);
|
|
129
|
+
export { AitheSpinner };
|