@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM1C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD;;;;;;;;;;;;;;;GAeG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C,0CAA0C;IACE,IAAI,UAAS;IACzD,iCAAiC;IACL,KAAK,SAAM;IACvC,0DAA0D;IAC9B,IAAI,SAAM;IACtC,6CAA6C;IACjB,KAAK,SAAW;IAC5C,4DAA4D;IAChB,UAAU,UAAS;IAC/D,wEAAwE;IACf,WAAW,UAAQ;IAC5E,kEAAkE;IACV,UAAU,UAAQ;IAC1E,oEAAoE;IACd,SAAS,UAAQ;IAEtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAc;IACX,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAE/E,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAS;IAEvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IACpD,OAAO,CAAC,WAAW,CAA4B;IAE/C,MAAM,CAAC,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM1C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD;;;;;;;;;;;;;;;GAeG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C,0CAA0C;IACE,IAAI,UAAS;IACzD,iCAAiC;IACL,KAAK,SAAM;IACvC,0DAA0D;IAC9B,IAAI,SAAM;IACtC,6CAA6C;IACjB,KAAK,SAAW;IAC5C,4DAA4D;IAChB,UAAU,UAAS;IAC/D,wEAAwE;IACf,WAAW,UAAQ;IAC5E,kEAAkE;IACV,UAAU,UAAQ;IAC1E,oEAAoE;IACd,SAAS,UAAQ;IAEtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAc;IACX,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAE/E,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAS;IAEvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IACpD,OAAO,CAAC,WAAW,CAA4B;IAE/C,MAAM,CAAC,QAAQ,CAAC,MAAM,0DAyGpB;IAEF,oBAAoB,IAAI,IAAI;IAK5B,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAiBtD,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAGxB;IAEF,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAIpC;IAEF,0DAA0D;IAC1D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAMlC;IAEF,8BAA8B;IAC9B,IAAI,QAAO,IAAI,CAEb;IAEF,+BAA+B;IAC/B,IAAI,QAAO,IAAI,CAEb;IAEF,MAAM;CAuDP"}
|
|
@@ -0,0 +1,303 @@
|
|
|
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, query, queryAssignedElements, state } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
|
+
import { AitheElement } from '../../core/aithe-element';
|
|
12
|
+
import { aitheBaseStyles, aithePanelStyles } from '../../core/styles';
|
|
13
|
+
import { uid } from '../../utils/utils';
|
|
14
|
+
import { t } from '../../styles/i18n';
|
|
15
|
+
/**
|
|
16
|
+
* Full-featured modal dialog with header, body, footer slots and focus trapping.
|
|
17
|
+
* 全功能模态对话框,支持头部、正文、底部插槽和焦点捕获。
|
|
18
|
+
*
|
|
19
|
+
* @slot - Default slot for modal body content. 模态框正文内容。
|
|
20
|
+
* @slot header - Custom header content (overrides title property). 自定义头部内容。
|
|
21
|
+
* @slot footer - Footer action area. 底部操作区域。
|
|
22
|
+
* @fires aithe-open-change - Emitted when open state changes, with `{ open }`. 开关状态变更时触发。
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <aithe-modal title="Edit Profile" width="520px">
|
|
26
|
+
* <p>Modal body content here.</p>
|
|
27
|
+
* <button slot="footer">Save</button>
|
|
28
|
+
* </aithe-modal>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
let AitheModal = class AitheModal extends AitheElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/** Whether the modal is open. 是否打开模态框。 */
|
|
35
|
+
this.open = false;
|
|
36
|
+
/** Modal title text. 模态框标题文本。 */
|
|
37
|
+
this.title = '';
|
|
38
|
+
/** Icon name to display before the title. 在标题前显示的图标名称。 */
|
|
39
|
+
this.icon = '';
|
|
40
|
+
/** Modal width (CSS value). 模态框宽度(CSS 值)。 */
|
|
41
|
+
this.width = '640px';
|
|
42
|
+
/** Whether the modal takes up the full viewport. 是否全屏显示。 */
|
|
43
|
+
this.fullscreen = false;
|
|
44
|
+
/** Whether clicking the backdrop mask closes the modal. 点击遮罩是否关闭模态框。 */
|
|
45
|
+
this.closeOnMask = true;
|
|
46
|
+
/** Whether pressing Escape closes the modal. 按 Escape 是否关闭模态框。 */
|
|
47
|
+
this.closeOnEsc = true;
|
|
48
|
+
/** Whether the close button is shown in the header. 是否在头部显示关闭按钮。 */
|
|
49
|
+
this.showClose = true;
|
|
50
|
+
this.hasHeaderSlot = false;
|
|
51
|
+
this.hasFooterSlot = false;
|
|
52
|
+
this.titleId = uid('aithe-modal-title');
|
|
53
|
+
this.lastFocused = null;
|
|
54
|
+
/** Syncs header/footer slot presence state. 同步头部/底部插槽状态。 */
|
|
55
|
+
this.syncSlots = () => {
|
|
56
|
+
this.hasHeaderSlot = this.headerNodes.length > 0;
|
|
57
|
+
this.hasFooterSlot = this.footerNodes.length > 0;
|
|
58
|
+
};
|
|
59
|
+
/** Handles Escape key to close modal. 处理 Escape 键关闭模态框。 */
|
|
60
|
+
this.handleDocumentKeydown = (event) => {
|
|
61
|
+
if (event.key === 'Escape' && this.closeOnEsc && this.open) {
|
|
62
|
+
this.hide();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
/** Handles backdrop click to close modal. 处理遮罩点击关闭模态框。 */
|
|
66
|
+
this.handleBackdropClick = (event) => {
|
|
67
|
+
if (!this.closeOnMask || event.target !== event.currentTarget) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.hide();
|
|
71
|
+
};
|
|
72
|
+
/** Opens the modal. 打开模态框。 */
|
|
73
|
+
this.show = () => {
|
|
74
|
+
this.open = true;
|
|
75
|
+
};
|
|
76
|
+
/** Closes the modal. 关闭模态框。 */
|
|
77
|
+
this.hide = () => {
|
|
78
|
+
this.open = false;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
static { this.styles = [
|
|
82
|
+
aitheBaseStyles,
|
|
83
|
+
aithePanelStyles('.panel'),
|
|
84
|
+
css `
|
|
85
|
+
:host {
|
|
86
|
+
display: contents;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.overlay {
|
|
90
|
+
position: fixed;
|
|
91
|
+
inset: 0;
|
|
92
|
+
z-index: var(--aithe-z-modal);
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
padding: var(--aithe-space-lg);
|
|
97
|
+
background: var(--aithe-color-overlay);
|
|
98
|
+
opacity: 0;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
transition: opacity var(--aithe-duration-base) var(--aithe-ease-standard);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.overlay.open {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
pointer-events: auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.panel {
|
|
109
|
+
width: min(100%, var(--aithe-modal-width, 640px));
|
|
110
|
+
max-height: min(88vh, 960px);
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.panel-inner {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
transform: translateY(14px) scale(0.98);
|
|
119
|
+
transition: transform var(--aithe-duration-base) var(--aithe-ease-standard);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.overlay.open .panel-inner {
|
|
123
|
+
transform: translateY(0) scale(1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.panel.fullscreen {
|
|
127
|
+
width: 100vw;
|
|
128
|
+
max-width: 100vw;
|
|
129
|
+
height: 100vh;
|
|
130
|
+
max-height: 100vh;
|
|
131
|
+
border-radius: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.header,
|
|
135
|
+
.footer {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
gap: var(--aithe-space-4);
|
|
140
|
+
padding: var(--aithe-space-lg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.header {
|
|
144
|
+
border-bottom: 1px solid var(--aithe-color-border);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.footer {
|
|
148
|
+
border-top: 1px solid var(--aithe-color-border);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.title {
|
|
152
|
+
margin: 0;
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: var(--aithe-space-2);
|
|
156
|
+
font-size: var(--aithe-font-size-lg);
|
|
157
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.title-icon {
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
color: var(--aithe-color-text-muted);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.body {
|
|
166
|
+
flex: 1;
|
|
167
|
+
overflow: auto;
|
|
168
|
+
padding: var(--aithe-space-lg);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.close {
|
|
172
|
+
flex-shrink: 0;
|
|
173
|
+
width: 36px;
|
|
174
|
+
height: 36px;
|
|
175
|
+
border: none;
|
|
176
|
+
border-radius: 50%;
|
|
177
|
+
background: transparent;
|
|
178
|
+
color: var(--aithe-color-text-muted);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.close:hover {
|
|
183
|
+
background: var(--aithe-color-surface-muted);
|
|
184
|
+
}
|
|
185
|
+
`,
|
|
186
|
+
]; }
|
|
187
|
+
disconnectedCallback() {
|
|
188
|
+
super.disconnectedCallback();
|
|
189
|
+
document.removeEventListener('keydown', this.handleDocumentKeydown);
|
|
190
|
+
}
|
|
191
|
+
updated(changed) {
|
|
192
|
+
super.updated(changed);
|
|
193
|
+
if (changed.has('open')) {
|
|
194
|
+
this.emit('aithe-open-change', { open: this.open });
|
|
195
|
+
if (this.open) {
|
|
196
|
+
this.lastFocused = document.activeElement;
|
|
197
|
+
document.addEventListener('keydown', this.handleDocumentKeydown);
|
|
198
|
+
queueMicrotask(() => this.focusFirst(this.panel ?? this.renderRoot));
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
document.removeEventListener('keydown', this.handleDocumentKeydown);
|
|
202
|
+
this.lastFocused?.focus?.();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
render() {
|
|
207
|
+
const showHeader = this.title || this.hasHeaderSlot || this.showClose;
|
|
208
|
+
const modalIcon = this.icon
|
|
209
|
+
? html `
|
|
210
|
+
<aithe-icon class="title-icon" name=${this.icon} size="18"></aithe-icon>
|
|
211
|
+
`
|
|
212
|
+
: nothing;
|
|
213
|
+
return html `
|
|
214
|
+
<div class=${classMap({ overlay: true, open: this.open })} @click=${this.handleBackdropClick}>
|
|
215
|
+
<div
|
|
216
|
+
class=${classMap({ panel: true, fullscreen: this.fullscreen })}
|
|
217
|
+
aria-labelledby=${this.titleId}
|
|
218
|
+
aria-modal="true"
|
|
219
|
+
role="dialog"
|
|
220
|
+
style=${styleMap({ '--aithe-modal-width': this.width })}
|
|
221
|
+
tabindex="-1"
|
|
222
|
+
@click=${(event) => event.stopPropagation()}
|
|
223
|
+
@keydown=${(event) => this.trapFocus(event, this.panel ?? this.renderRoot)}
|
|
224
|
+
>
|
|
225
|
+
<div class="panel-inner">
|
|
226
|
+
<header class="header" ?hidden=${!showHeader}>
|
|
227
|
+
<slot name="header" @slotchange=${this.syncSlots}>
|
|
228
|
+
${this.title
|
|
229
|
+
? html `
|
|
230
|
+
<h2 id=${this.titleId} class="title">${modalIcon}${this.title}</h2>
|
|
231
|
+
`
|
|
232
|
+
: html `
|
|
233
|
+
<span id=${this.titleId}></span>
|
|
234
|
+
`}
|
|
235
|
+
</slot>
|
|
236
|
+
${this.showClose
|
|
237
|
+
? html `
|
|
238
|
+
<button
|
|
239
|
+
class="close"
|
|
240
|
+
type="button"
|
|
241
|
+
aria-label=${t('feedback.modal.closeAriaLabel')}
|
|
242
|
+
@click=${this.hide}
|
|
243
|
+
>
|
|
244
|
+
×
|
|
245
|
+
</button>
|
|
246
|
+
`
|
|
247
|
+
: null}
|
|
248
|
+
</header>
|
|
249
|
+
<div class="body">
|
|
250
|
+
<slot></slot>
|
|
251
|
+
</div>
|
|
252
|
+
<footer class="footer" ?hidden=${!this.hasFooterSlot}>
|
|
253
|
+
<slot name="footer" @slotchange=${this.syncSlots}></slot>
|
|
254
|
+
</footer>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
__decorate([
|
|
262
|
+
property({ type: Boolean, reflect: true })
|
|
263
|
+
], AitheModal.prototype, "open", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
property({ type: String })
|
|
266
|
+
], AitheModal.prototype, "title", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
property({ type: String })
|
|
269
|
+
], AitheModal.prototype, "icon", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
property({ type: String })
|
|
272
|
+
], AitheModal.prototype, "width", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ type: Boolean, reflect: true })
|
|
275
|
+
], AitheModal.prototype, "fullscreen", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
property({ type: Boolean, attribute: 'close-on-mask' })
|
|
278
|
+
], AitheModal.prototype, "closeOnMask", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
property({ type: Boolean, attribute: 'close-on-esc' })
|
|
281
|
+
], AitheModal.prototype, "closeOnEsc", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
property({ type: Boolean, attribute: 'show-close' })
|
|
284
|
+
], AitheModal.prototype, "showClose", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
query('.panel')
|
|
287
|
+
], AitheModal.prototype, "panel", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
queryAssignedElements({ slot: 'header' })
|
|
290
|
+
], AitheModal.prototype, "headerNodes", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
queryAssignedElements({ slot: 'footer' })
|
|
293
|
+
], AitheModal.prototype, "footerNodes", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
state()
|
|
296
|
+
], AitheModal.prototype, "hasHeaderSlot", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
state()
|
|
299
|
+
], AitheModal.prototype, "hasFooterSlot", void 0);
|
|
300
|
+
AitheModal = __decorate([
|
|
301
|
+
customElement('aithe-modal')
|
|
302
|
+
], AitheModal);
|
|
303
|
+
export { AitheModal };
|
|
@@ -0,0 +1,170 @@
|
|
|
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
|
+
* Top-right notification card with auto-dismiss timer and close button.
|
|
14
|
+
* 右上角通知卡片,支持自动消失计时器和关闭按钮。
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot (unused; content driven by `content` property). 默认插槽(未使用,内容由 content 属性控制)。
|
|
17
|
+
* @fires aithe-close - Emitted when the notification auto-dismisses or is manually closed. 通知自动消失或手动关闭时触发。
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-notification title="Update" content="New version available" type="success" duration="3200"></aithe-notification>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
let AitheNotification = class AitheNotification extends AitheElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
/** Notification title text. 通知标题文本。 */
|
|
27
|
+
this.title = '';
|
|
28
|
+
/** Icon name to display before the title. 在标题前显示的图标名称。 */
|
|
29
|
+
this.icon = '';
|
|
30
|
+
/** Notification body text. 通知正文文本。 */
|
|
31
|
+
this.content = '';
|
|
32
|
+
/** Notification color variant. 通知颜色类型。 */
|
|
33
|
+
this.type = 'default';
|
|
34
|
+
/** Auto-dismiss duration in milliseconds. 自动消失时长(毫秒)。 */
|
|
35
|
+
this.duration = 3200;
|
|
36
|
+
/** Whether the notification is visible. 是否显示通知。 */
|
|
37
|
+
this.open = true;
|
|
38
|
+
this.timer = 0;
|
|
39
|
+
this.close = () => {
|
|
40
|
+
this.open = false;
|
|
41
|
+
this.emit('aithe-close');
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static { this.styles = [
|
|
45
|
+
aitheBaseStyles,
|
|
46
|
+
css `
|
|
47
|
+
:host {
|
|
48
|
+
position: fixed;
|
|
49
|
+
top: 24px;
|
|
50
|
+
right: 24px;
|
|
51
|
+
z-index: var(--aithe-z-popover);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.card {
|
|
55
|
+
width: min(360px, calc(100vw - 48px));
|
|
56
|
+
padding: var(--aithe-space-4);
|
|
57
|
+
border: 1px solid var(--aithe-color-border);
|
|
58
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
59
|
+
background: var(--aithe-color-surface-elevated);
|
|
60
|
+
box-shadow: var(--aithe-shadow-4);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.head {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
gap: var(--aithe-space-3);
|
|
68
|
+
margin-bottom: var(--aithe-space-2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.title {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: var(--aithe-space-2);
|
|
75
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.title-icon {
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
color: var(--aithe-color-text-muted);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.content {
|
|
84
|
+
color: var(--aithe-color-text-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.success {
|
|
88
|
+
border-color: rgba(53, 166, 111, 0.28);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.warning {
|
|
92
|
+
border-color: rgba(209, 143, 41, 0.28);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.danger {
|
|
96
|
+
border-color: rgba(223, 82, 107, 0.28);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
button {
|
|
100
|
+
border: none;
|
|
101
|
+
background: transparent;
|
|
102
|
+
color: var(--aithe-color-text-subtle);
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
`,
|
|
106
|
+
]; }
|
|
107
|
+
connectedCallback() {
|
|
108
|
+
super.connectedCallback();
|
|
109
|
+
this.startTimer();
|
|
110
|
+
}
|
|
111
|
+
disconnectedCallback() {
|
|
112
|
+
super.disconnectedCallback();
|
|
113
|
+
globalThis.clearTimeout(this.timer);
|
|
114
|
+
}
|
|
115
|
+
updated(changed) {
|
|
116
|
+
if (changed.has('duration') || changed.has('open') || changed.has('content')) {
|
|
117
|
+
this.startTimer();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
startTimer() {
|
|
121
|
+
globalThis.clearTimeout(this.timer);
|
|
122
|
+
if (!this.open || !this.duration) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.timer = globalThis.setTimeout(() => {
|
|
126
|
+
this.open = false;
|
|
127
|
+
this.emit('aithe-close');
|
|
128
|
+
}, this.duration);
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
if (!this.open)
|
|
132
|
+
return html ``;
|
|
133
|
+
const notifIcon = this.icon
|
|
134
|
+
? html `
|
|
135
|
+
<aithe-icon class="title-icon" name=${this.icon} size="16"></aithe-icon>
|
|
136
|
+
`
|
|
137
|
+
: nothing;
|
|
138
|
+
return html `
|
|
139
|
+
<div class=${classMap({ card: true, [this.type]: true })}>
|
|
140
|
+
<div class="head">
|
|
141
|
+
<span class="title">${notifIcon}${this.title}</span>
|
|
142
|
+
<button type="button" @click=${this.close}>×</button>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="content">${this.content}</div>
|
|
145
|
+
</div>
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: String })
|
|
151
|
+
], AitheNotification.prototype, "title", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: String })
|
|
154
|
+
], AitheNotification.prototype, "icon", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: String })
|
|
157
|
+
], AitheNotification.prototype, "content", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: String })
|
|
160
|
+
], AitheNotification.prototype, "type", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property({ type: Number })
|
|
163
|
+
], AitheNotification.prototype, "duration", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
property({ type: Boolean, reflect: true })
|
|
166
|
+
], AitheNotification.prototype, "open", void 0);
|
|
167
|
+
AitheNotification = __decorate([
|
|
168
|
+
customElement('aithe-notification')
|
|
169
|
+
], AitheNotification);
|
|
170
|
+
export { AitheNotification };
|
|
@@ -6,7 +6,7 @@ import { AitheAnchoredOverlayElement } from '../../core/anchored-overlay';
|
|
|
6
6
|
*
|
|
7
7
|
* @slot - Default slot for the trigger element. 触发元素内容。
|
|
8
8
|
* @slot content - Custom popover content. 自定义弹出面板内容。
|
|
9
|
-
* @fires aithe-
|
|
9
|
+
* @fires aithe-dropdown-change - Emitted when open state changes, with `{ open }`. 开关状态变更时触发。
|
|
10
10
|
* @example
|
|
11
11
|
* ```html
|
|
12
12
|
* <aithe-popover placement="bottom">
|
|
@@ -0,0 +1,124 @@
|
|
|
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, query } from 'lit/decorators.js';
|
|
9
|
+
import { AitheAnchoredOverlayElement } from '../../core/anchored-overlay';
|
|
10
|
+
import { aitheBaseStyles, aithePanelStyles, aitheScrollbarStyles } from '../../core/styles';
|
|
11
|
+
/**
|
|
12
|
+
* Click-triggered popover panel anchored to a trigger element.
|
|
13
|
+
* 点击触发的弹出面板,锚定于触发元素。
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot for the trigger element. 触发元素内容。
|
|
16
|
+
* @slot content - Custom popover content. 自定义弹出面板内容。
|
|
17
|
+
* @fires aithe-dropdown-change - Emitted when open state changes, with `{ open }`. 开关状态变更时触发。
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <aithe-popover placement="bottom">
|
|
21
|
+
* <button>Click me</button>
|
|
22
|
+
* <slot name="content"><p>Popover content here.</p></slot>
|
|
23
|
+
* </aithe-popover>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
let AithePopover = class AithePopover extends AitheAnchoredOverlayElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
/** Popover placement relative to trigger. 弹出面板相对于触发元素的位置。 */
|
|
30
|
+
this.placement = 'bottom';
|
|
31
|
+
/** Closes popover on outside pointer events. 点击外部时关闭弹出面板。 */
|
|
32
|
+
this.handleOutsidePointer = (event) => {
|
|
33
|
+
if (!this.open) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const path = event.composedPath();
|
|
37
|
+
if (!path.includes(this)) {
|
|
38
|
+
this.open = false;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
/** Closes popover on Escape key. 按 Escape 键关闭弹出面板。 */
|
|
42
|
+
this.handleDocumentKeydown = (event) => {
|
|
43
|
+
if (event.key === 'Escape' && this.open) {
|
|
44
|
+
this.open = false;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/** Toggles popover open state. 切换弹出面板开关状态。 */
|
|
48
|
+
this.togglePanel = () => {
|
|
49
|
+
this.open = !this.open;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static { this.styles = [
|
|
53
|
+
aitheBaseStyles,
|
|
54
|
+
aithePanelStyles('.panel'),
|
|
55
|
+
aitheScrollbarStyles,
|
|
56
|
+
css `
|
|
57
|
+
:host {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.trigger {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.panel {
|
|
66
|
+
position: fixed;
|
|
67
|
+
z-index: var(--aithe-z-popover);
|
|
68
|
+
min-width: 240px;
|
|
69
|
+
max-width: min(360px, calc(100vw - 24px));
|
|
70
|
+
max-height: min(70vh, 520px);
|
|
71
|
+
overflow: auto;
|
|
72
|
+
padding: var(--aithe-space-4);
|
|
73
|
+
}
|
|
74
|
+
`,
|
|
75
|
+
]; }
|
|
76
|
+
get panelElement() {
|
|
77
|
+
return this.panel ?? null;
|
|
78
|
+
}
|
|
79
|
+
connectedCallback() {
|
|
80
|
+
super.connectedCallback();
|
|
81
|
+
document.addEventListener('mousedown', this.handleOutsidePointer);
|
|
82
|
+
document.addEventListener('keydown', this.handleDocumentKeydown);
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
super.disconnectedCallback();
|
|
86
|
+
document.removeEventListener('mousedown', this.handleOutsidePointer);
|
|
87
|
+
document.removeEventListener('keydown', this.handleDocumentKeydown);
|
|
88
|
+
}
|
|
89
|
+
updated(changed) {
|
|
90
|
+
super.updated(changed);
|
|
91
|
+
if (changed.has('open')) {
|
|
92
|
+
this.emit('aithe-dropdown-change', { open: this.open });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
return html `
|
|
97
|
+
<span class="trigger" @click=${this.togglePanel}>
|
|
98
|
+
<slot></slot>
|
|
99
|
+
</span>
|
|
100
|
+
${this.open
|
|
101
|
+
? html `
|
|
102
|
+
<div
|
|
103
|
+
class="panel"
|
|
104
|
+
role="dialog"
|
|
105
|
+
tabindex="-1"
|
|
106
|
+
@click=${(event) => event.stopPropagation()}
|
|
107
|
+
>
|
|
108
|
+
<slot name="content"></slot>
|
|
109
|
+
</div>
|
|
110
|
+
`
|
|
111
|
+
: null}
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: String })
|
|
117
|
+
], AithePopover.prototype, "placement", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
query('.panel')
|
|
120
|
+
], AithePopover.prototype, "panel", void 0);
|
|
121
|
+
AithePopover = __decorate([
|
|
122
|
+
customElement('aithe-popover')
|
|
123
|
+
], AithePopover);
|
|
124
|
+
export { AithePopover };
|