@aithe/aithe-ui 26.2.3 → 26.3.1
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 +16 -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 +130 -0
- package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/api/i18n/en-US.js +140 -0
- package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/api/i18n/es-ES.js +130 -0
- package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/api/i18n/fr-FR.js +130 -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 +130 -0
- package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/api/i18n/ko-KR.js +130 -0
- package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/api/i18n/pt-BR.js +130 -0
- package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-CN.js +140 -0
- package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-HK.js +130 -0
- package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-TW.js +130 -0
- package/dist/apps/api/pages/docs.d.ts.map +1 -1
- package/dist/apps/api/pages/docs.js +367 -0
- package/dist/apps/api/standalone.js +1 -0
- package/dist/apps/demo/app.js +273 -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 +269 -0
- package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/demo/i18n/en-US.js +281 -0
- package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/demo/i18n/es-ES.js +269 -0
- package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/fr-FR.js +269 -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 +269 -0
- package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ko-KR.js +269 -0
- package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/pt-BR.js +269 -0
- package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-CN.js +281 -0
- package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-HK.js +269 -0
- package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-TW.js +269 -0
- package/dist/apps/demo/pages/autoform.js +412 -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.js +99 -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/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 +64 -0
- package/dist/components/display/desc.d.ts.map +1 -0
- package/dist/components/display/desc.js +363 -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.js +761 -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.map +1 -1
- package/dist/components/form/combobox.js +282 -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 +1 -1
- package/dist/components/form/select.js +495 -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.js +253 -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/condition.js +170 -0
- package/dist/core/autoform/index.js +8 -0
- package/dist/core/autoform/types.js +7 -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 +131 -0
- package/dist/core/datahub/core/datahub-core.d.ts +3 -3
- package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
- package/dist/core/datahub/core/datahub-core.js +441 -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 +6 -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.js +608 -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 +50 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2812 -1253
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1670 -728
- 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 +148 -0
- package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
- package/dist/styles/i18n/locales/en-US.js +157 -0
- package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
- package/dist/styles/i18n/locales/es-ES.js +148 -0
- package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/fr-FR.js +148 -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 +148 -0
- package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ko-KR.js +148 -0
- package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/pt-BR.js +148 -0
- package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-CN.js +157 -0
- package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-HK.js +148 -0
- package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-TW.js +148 -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/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 +204 -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 +100 -0
- package/docs/api/form/autoform.md +4 -1
- package/docs/api/form/select.md +28 -28
- package/docs/api/framework/log-panel.md +46 -0
- package/docs/api/framework/sidebar.md +3 -2
- package/docs/api/summary.md +45 -35
- package/docs/api/theme/theme-switch.md +1 -1
- package/docs/autoform.md +13 -1
- package/docs/changelog/CHANGELOG.md +80 -0
- package/docs/changelog/VERSION_26.3.1.md +966 -0
- package/docs/datahub.md +1 -1
- package/docs/filter.md +332 -0
- package/docs/framework-integration.md +2 -2
- package/docs/guide.md +66 -1
- package/docs/i18n.md +2 -2
- package/docs/issue/issue_26.3.1.0.md +84 -0
- package/docs/issue/issue_26.3.1.1.md +72 -0
- package/docs/issue/issue_26.3.1.2.md +75 -0
- package/docs/issue/issue_26.3.1.3.md +78 -0
- package/docs/issue/issue_26.3.1.4.md +113 -0
- package/docs/issue/issue_26.3.1.5.md +142 -0
- package/docs/issue/issue_26.3.1.6.md +100 -0
- package/docs/issue/issue_26.3.1.7.md +78 -0
- package/docs/quickstart.md +5 -5
- package/package.json +5 -2
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aithe UI 核心繁體中文(香港)翻譯資源
|
|
3
|
+
* Core Traditional Chinese (zh-HK) translation resource for Aithe UI components.
|
|
4
|
+
*/
|
|
5
|
+
export const zhHk = {
|
|
6
|
+
'basic.input.ariaLabel': '輸入框',
|
|
7
|
+
'basic.avatar.ariaLabel': '頭像',
|
|
8
|
+
'basic.empty.defaultText': '暫無資料',
|
|
9
|
+
'navigation.breadcrumb.ariaLabel': '麵包屑',
|
|
10
|
+
'navigation.backTop.ariaLabel': '回到頂部',
|
|
11
|
+
'form.select.placeholder': '請選擇',
|
|
12
|
+
'form.select.searchAriaLabel': '搜尋選項',
|
|
13
|
+
'form.select.searchPlaceholder': '搜尋選項',
|
|
14
|
+
'form.select.clearAriaLabel': '清除',
|
|
15
|
+
'form.select.emptyText': '暫無匹配項',
|
|
16
|
+
'form.combobox.placeholder': '搜尋或選擇',
|
|
17
|
+
'form.combobox.emptyText': '暫無匹配項',
|
|
18
|
+
'form.dialog.confirmText': '確認',
|
|
19
|
+
'form.dialog.cancelText': '取消',
|
|
20
|
+
'form.dialog.closeAriaLabel': '關閉',
|
|
21
|
+
'form.rate.ariaLabel': '評分 {index}',
|
|
22
|
+
'form.upload.chooseFiles': '選擇檔案',
|
|
23
|
+
'form.upload.kb': 'KB',
|
|
24
|
+
'form.transfer.sourceTitle': '來源列表',
|
|
25
|
+
'form.transfer.targetTitle': '目標列表',
|
|
26
|
+
'form.formItem.required': '{label}為必填項',
|
|
27
|
+
'form.formItem.requiredField': '欄位',
|
|
28
|
+
'form.autoform.submit': '提交',
|
|
29
|
+
'form.autoform.patternMismatch': '格式不符',
|
|
30
|
+
'feedback.modal.closeAriaLabel': '關閉彈窗',
|
|
31
|
+
'feedback.drawer.closeAriaLabel': '關閉抽屜',
|
|
32
|
+
'data.tabs.removeTabAriaLabel': '移除標籤頁',
|
|
33
|
+
'data.tabs.addTabAriaLabel': '新增標籤頁',
|
|
34
|
+
'data.tabs.moreTabsAriaLabel': '更多標籤頁',
|
|
35
|
+
'data.table.selectAllAriaLabel': '全選',
|
|
36
|
+
'data.table.selectRowAriaLabel': '選擇列',
|
|
37
|
+
'data.table.emptyText': '暫無資料',
|
|
38
|
+
'display.carousel.prevSlideAriaLabel': '上一張',
|
|
39
|
+
'display.carousel.nextSlideAriaLabel': '下一張',
|
|
40
|
+
'display.comparison.beforeAlt': '之前',
|
|
41
|
+
'display.comparison.afterAlt': '之後',
|
|
42
|
+
'container.details.defaultSummary': '詳情',
|
|
43
|
+
'theme.light': '淺色',
|
|
44
|
+
'theme.dark': '深色',
|
|
45
|
+
'theme.gray': '灰色',
|
|
46
|
+
'theme.blue': '藍色',
|
|
47
|
+
'theme.festive': '喜慶',
|
|
48
|
+
'theme.orange': '橙色',
|
|
49
|
+
'theme.purple': '紫色',
|
|
50
|
+
'theme.pink': '粉色',
|
|
51
|
+
'theme.teal': '青色',
|
|
52
|
+
'theme.indigo': '靛藍',
|
|
53
|
+
'theme.cyan': '天藍',
|
|
54
|
+
'theme.amber': '琥珀',
|
|
55
|
+
'theme.slate': '石板',
|
|
56
|
+
'theme.charcoal': '木炭',
|
|
57
|
+
'theme.midnight': '午夜',
|
|
58
|
+
'theme.obsidian': '黑曜石',
|
|
59
|
+
'theme.graphite': '石墨',
|
|
60
|
+
'theme.ink': '墨水',
|
|
61
|
+
'theme.onyx': '縞瑪瑙',
|
|
62
|
+
'theme.ebony': '烏木',
|
|
63
|
+
'theme.navy': '海軍藍',
|
|
64
|
+
'theme.raisin': '葡萄乾',
|
|
65
|
+
'theme.huawei': '華為雲',
|
|
66
|
+
'theme.aliyun': '阿里雲',
|
|
67
|
+
'theme.tianyi': '天翼雲',
|
|
68
|
+
'theme.preview.title': '主題預覽',
|
|
69
|
+
'theme.preview.applyTheme': '套用主題',
|
|
70
|
+
'theme.preview.dashboard': '儀表板',
|
|
71
|
+
'theme.preview.components': '元件',
|
|
72
|
+
'theme.preview.themes': '主題',
|
|
73
|
+
'theme.preview.settings': '設定',
|
|
74
|
+
'theme.preview.buttons': '按鈕',
|
|
75
|
+
'theme.preview.input': '輸入框',
|
|
76
|
+
'theme.preview.tags': '標籤',
|
|
77
|
+
'theme.preview.table': '表格',
|
|
78
|
+
'theme.preview.primary': '主要',
|
|
79
|
+
'theme.preview.default': '預設',
|
|
80
|
+
'theme.preview.dashed': '虛線',
|
|
81
|
+
'theme.preview.text': '文字',
|
|
82
|
+
'theme.preview.link': '連結',
|
|
83
|
+
'theme.preview.danger': '危險',
|
|
84
|
+
'theme.preview.enterText': '請輸入文字...',
|
|
85
|
+
'theme.preview.search': '搜尋...',
|
|
86
|
+
'theme.preview.brand': 'Aithe UI',
|
|
87
|
+
'theme.preview.success': '成功',
|
|
88
|
+
'theme.preview.warning': '警告',
|
|
89
|
+
'theme.preview.name': '姓名',
|
|
90
|
+
'theme.preview.role': '角色',
|
|
91
|
+
'theme.preview.status': '狀態',
|
|
92
|
+
'theme.preview.admin': '管理員',
|
|
93
|
+
'theme.preview.editor': '編輯者',
|
|
94
|
+
'theme.preview.viewer': '檢視者',
|
|
95
|
+
'theme.preview.active': '活躍',
|
|
96
|
+
'theme.preview.inactive': '未啟用',
|
|
97
|
+
'localeSwitch.label': '語言',
|
|
98
|
+
'localeSwitch.english': 'English',
|
|
99
|
+
'localeSwitch.chinese': '中文',
|
|
100
|
+
'localeSwitch.traditionalChinese': '繁體中文',
|
|
101
|
+
'localeSwitch.japanese': '日本語',
|
|
102
|
+
'localeSwitch.korean': '한국어',
|
|
103
|
+
'localeSwitch.spanish': 'Español',
|
|
104
|
+
'localeSwitch.portuguese': 'Português',
|
|
105
|
+
'localeSwitch.french': 'Français',
|
|
106
|
+
'localeSwitch.german': 'Deutsch',
|
|
107
|
+
'body.backTop': '回到頂部',
|
|
108
|
+
'body.switchLayout': '切換佈局',
|
|
109
|
+
'body.layout.compact': '緊湊',
|
|
110
|
+
'body.layout.medium': '適中',
|
|
111
|
+
'body.layout.wide': '寬鬆',
|
|
112
|
+
'sidebar.collapse': '收起側邊欄',
|
|
113
|
+
'sidebar.expand': '展開側邊欄',
|
|
114
|
+
'shapePicker.sharp': '直角',
|
|
115
|
+
'shapePicker.smooth': '微圓角',
|
|
116
|
+
'shapePicker.rounded': '標準圓角',
|
|
117
|
+
'shapePicker.rounder': '大圓角',
|
|
118
|
+
'shapePicker.pill': '膠囊',
|
|
119
|
+
'shapePicker.circle': '圓形',
|
|
120
|
+
'shapePicker.chamfer': '斜切角',
|
|
121
|
+
'shapePicker.organic': '有機曲線',
|
|
122
|
+
'shadowPicker.flat': '扁平極簡',
|
|
123
|
+
'shadowPicker.neumorphism': '新擬態',
|
|
124
|
+
'shadowPicker.skeuomorphic': '輕擬物',
|
|
125
|
+
'shadowPicker.glassmorphism': '玻璃擬態',
|
|
126
|
+
'shadowPicker.cyber': '賽博發光',
|
|
127
|
+
'shadowPicker.deep': '深邃暗黑',
|
|
128
|
+
'shadowPicker.diffuse': '柔和彌散',
|
|
129
|
+
'shadowPicker.sharpBusiness': '硬朗商務',
|
|
130
|
+
'shadowPicker.retro': '復古膠片',
|
|
131
|
+
'typoPicker.minimal': '極簡',
|
|
132
|
+
'typoPicker.business': '商務',
|
|
133
|
+
'typoPicker.luxury': '輕奢',
|
|
134
|
+
'typoPicker.compact': '緊湊資訊流',
|
|
135
|
+
'appearance.label': '外觀',
|
|
136
|
+
'appearance.group.theme': '主題',
|
|
137
|
+
'appearance.group.shadow': '陰影',
|
|
138
|
+
'appearance.group.shape': '形狀',
|
|
139
|
+
'appearance.group.typo': '排版',
|
|
140
|
+
'display.codeEditor.hideLineNumbers': '隱藏行號',
|
|
141
|
+
'display.codeEditor.showLineNumbers': '顯示行號',
|
|
142
|
+
'display.codeEditor.hidePreview': '隱藏預覽',
|
|
143
|
+
'display.codeEditor.showPreview': '顯示預覽',
|
|
144
|
+
'display.codeEditor.copied': '已複製!',
|
|
145
|
+
'display.codeEditor.copyCode': '複製代碼',
|
|
146
|
+
'display.codeEditor.exitFullscreen': '退出全屏',
|
|
147
|
+
'display.codeEditor.fullscreen': '全屏',
|
|
148
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-TW.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../../src/styles/i18n/locales/zh-TW.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+IvC,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aithe UI 核心繁體中文(台灣)翻譯資源
|
|
3
|
+
* Core Traditional Chinese (zh-TW) translation resource for Aithe UI components.
|
|
4
|
+
*/
|
|
5
|
+
export const zhTw = {
|
|
6
|
+
'basic.input.ariaLabel': '輸入框',
|
|
7
|
+
'basic.avatar.ariaLabel': '頭像',
|
|
8
|
+
'basic.empty.defaultText': '暫無資料',
|
|
9
|
+
'navigation.breadcrumb.ariaLabel': '麵包屑',
|
|
10
|
+
'navigation.backTop.ariaLabel': '回到頂部',
|
|
11
|
+
'form.select.placeholder': '請選擇',
|
|
12
|
+
'form.select.searchAriaLabel': '搜尋選項',
|
|
13
|
+
'form.select.searchPlaceholder': '搜尋選項',
|
|
14
|
+
'form.select.clearAriaLabel': '清除',
|
|
15
|
+
'form.select.emptyText': '暫無匹配項',
|
|
16
|
+
'form.combobox.placeholder': '搜尋或選擇',
|
|
17
|
+
'form.combobox.emptyText': '暫無匹配項',
|
|
18
|
+
'form.dialog.confirmText': '確認',
|
|
19
|
+
'form.dialog.cancelText': '取消',
|
|
20
|
+
'form.dialog.closeAriaLabel': '關閉',
|
|
21
|
+
'form.rate.ariaLabel': '評分 {index}',
|
|
22
|
+
'form.upload.chooseFiles': '選擇檔案',
|
|
23
|
+
'form.upload.kb': 'KB',
|
|
24
|
+
'form.transfer.sourceTitle': '來源列表',
|
|
25
|
+
'form.transfer.targetTitle': '目標列表',
|
|
26
|
+
'form.formItem.required': '{label}為必填項',
|
|
27
|
+
'form.formItem.requiredField': '欄位',
|
|
28
|
+
'form.autoform.submit': '提交',
|
|
29
|
+
'form.autoform.patternMismatch': '格式不符',
|
|
30
|
+
'feedback.modal.closeAriaLabel': '關閉彈窗',
|
|
31
|
+
'feedback.drawer.closeAriaLabel': '關閉抽屜',
|
|
32
|
+
'data.tabs.removeTabAriaLabel': '移除標籤頁',
|
|
33
|
+
'data.tabs.addTabAriaLabel': '新增標籤頁',
|
|
34
|
+
'data.tabs.moreTabsAriaLabel': '更多標籤頁',
|
|
35
|
+
'data.table.selectAllAriaLabel': '全選',
|
|
36
|
+
'data.table.selectRowAriaLabel': '選擇列',
|
|
37
|
+
'data.table.emptyText': '暫無資料',
|
|
38
|
+
'display.carousel.prevSlideAriaLabel': '上一張',
|
|
39
|
+
'display.carousel.nextSlideAriaLabel': '下一張',
|
|
40
|
+
'display.comparison.beforeAlt': '之前',
|
|
41
|
+
'display.comparison.afterAlt': '之後',
|
|
42
|
+
'container.details.defaultSummary': '詳情',
|
|
43
|
+
'theme.light': '淺色',
|
|
44
|
+
'theme.dark': '深色',
|
|
45
|
+
'theme.gray': '灰色',
|
|
46
|
+
'theme.blue': '藍色',
|
|
47
|
+
'theme.festive': '喜慶',
|
|
48
|
+
'theme.orange': '橙色',
|
|
49
|
+
'theme.purple': '紫色',
|
|
50
|
+
'theme.pink': '粉色',
|
|
51
|
+
'theme.teal': '青色',
|
|
52
|
+
'theme.indigo': '靛藍',
|
|
53
|
+
'theme.cyan': '天藍',
|
|
54
|
+
'theme.amber': '琥珀',
|
|
55
|
+
'theme.slate': '石板',
|
|
56
|
+
'theme.charcoal': '木炭',
|
|
57
|
+
'theme.midnight': '午夜',
|
|
58
|
+
'theme.obsidian': '黑曜石',
|
|
59
|
+
'theme.graphite': '石墨',
|
|
60
|
+
'theme.ink': '墨水',
|
|
61
|
+
'theme.onyx': '縞瑪瑙',
|
|
62
|
+
'theme.ebony': '烏木',
|
|
63
|
+
'theme.navy': '海軍藍',
|
|
64
|
+
'theme.raisin': '葡萄乾',
|
|
65
|
+
'theme.huawei': '華為雲',
|
|
66
|
+
'theme.aliyun': '阿里雲',
|
|
67
|
+
'theme.tianyi': '天翼雲',
|
|
68
|
+
'theme.preview.title': '主題預覽',
|
|
69
|
+
'theme.preview.applyTheme': '套用主題',
|
|
70
|
+
'theme.preview.dashboard': '儀表板',
|
|
71
|
+
'theme.preview.components': '元件',
|
|
72
|
+
'theme.preview.themes': '主題',
|
|
73
|
+
'theme.preview.settings': '設定',
|
|
74
|
+
'theme.preview.buttons': '按鈕',
|
|
75
|
+
'theme.preview.input': '輸入框',
|
|
76
|
+
'theme.preview.tags': '標籤',
|
|
77
|
+
'theme.preview.table': '表格',
|
|
78
|
+
'theme.preview.primary': '主要',
|
|
79
|
+
'theme.preview.default': '預設',
|
|
80
|
+
'theme.preview.dashed': '虛線',
|
|
81
|
+
'theme.preview.text': '文字',
|
|
82
|
+
'theme.preview.link': '連結',
|
|
83
|
+
'theme.preview.danger': '危險',
|
|
84
|
+
'theme.preview.enterText': '請輸入文字...',
|
|
85
|
+
'theme.preview.search': '搜尋...',
|
|
86
|
+
'theme.preview.brand': 'Aithe UI',
|
|
87
|
+
'theme.preview.success': '成功',
|
|
88
|
+
'theme.preview.warning': '警告',
|
|
89
|
+
'theme.preview.name': '姓名',
|
|
90
|
+
'theme.preview.role': '角色',
|
|
91
|
+
'theme.preview.status': '狀態',
|
|
92
|
+
'theme.preview.admin': '管理員',
|
|
93
|
+
'theme.preview.editor': '編輯者',
|
|
94
|
+
'theme.preview.viewer': '檢視者',
|
|
95
|
+
'theme.preview.active': '活躍',
|
|
96
|
+
'theme.preview.inactive': '未啟用',
|
|
97
|
+
'localeSwitch.label': '語言',
|
|
98
|
+
'localeSwitch.english': 'English',
|
|
99
|
+
'localeSwitch.chinese': '中文',
|
|
100
|
+
'localeSwitch.traditionalChinese': '繁體中文',
|
|
101
|
+
'localeSwitch.japanese': '日本語',
|
|
102
|
+
'localeSwitch.korean': '한국어',
|
|
103
|
+
'localeSwitch.spanish': 'Español',
|
|
104
|
+
'localeSwitch.portuguese': 'Português',
|
|
105
|
+
'localeSwitch.french': 'Français',
|
|
106
|
+
'localeSwitch.german': 'Deutsch',
|
|
107
|
+
'body.backTop': '回到頂部',
|
|
108
|
+
'body.switchLayout': '切換佈局',
|
|
109
|
+
'body.layout.compact': '緊湊',
|
|
110
|
+
'body.layout.medium': '適中',
|
|
111
|
+
'body.layout.wide': '寬鬆',
|
|
112
|
+
'sidebar.collapse': '收起側邊欄',
|
|
113
|
+
'sidebar.expand': '展開側邊欄',
|
|
114
|
+
'shapePicker.sharp': '直角',
|
|
115
|
+
'shapePicker.smooth': '微圓角',
|
|
116
|
+
'shapePicker.rounded': '標準圓角',
|
|
117
|
+
'shapePicker.rounder': '大圓角',
|
|
118
|
+
'shapePicker.pill': '膠囊',
|
|
119
|
+
'shapePicker.circle': '圓形',
|
|
120
|
+
'shapePicker.chamfer': '斜切角',
|
|
121
|
+
'shapePicker.organic': '有機曲線',
|
|
122
|
+
'shadowPicker.flat': '扁平極簡',
|
|
123
|
+
'shadowPicker.neumorphism': '新擬態',
|
|
124
|
+
'shadowPicker.skeuomorphic': '輕擬物',
|
|
125
|
+
'shadowPicker.glassmorphism': '玻璃擬態',
|
|
126
|
+
'shadowPicker.cyber': '賽博發光',
|
|
127
|
+
'shadowPicker.deep': '深邃暗黑',
|
|
128
|
+
'shadowPicker.diffuse': '柔和彌散',
|
|
129
|
+
'shadowPicker.sharpBusiness': '硬朗商務',
|
|
130
|
+
'shadowPicker.retro': '復古膠片',
|
|
131
|
+
'typoPicker.minimal': '極簡',
|
|
132
|
+
'typoPicker.business': '商務',
|
|
133
|
+
'typoPicker.luxury': '輕奢',
|
|
134
|
+
'typoPicker.compact': '緊湊資訊流',
|
|
135
|
+
'appearance.label': '外觀',
|
|
136
|
+
'appearance.group.theme': '主題',
|
|
137
|
+
'appearance.group.shadow': '陰影',
|
|
138
|
+
'appearance.group.shape': '形狀',
|
|
139
|
+
'appearance.group.typo': '排版',
|
|
140
|
+
'display.codeEditor.hideLineNumbers': '隱藏行號',
|
|
141
|
+
'display.codeEditor.showLineNumbers': '顯示行號',
|
|
142
|
+
'display.codeEditor.hidePreview': '隱藏預覽',
|
|
143
|
+
'display.codeEditor.showPreview': '顯示預覽',
|
|
144
|
+
'display.codeEditor.copied': '已複製!',
|
|
145
|
+
'display.codeEditor.copyCode': '複製代碼',
|
|
146
|
+
'display.codeEditor.exitFullscreen': '退出全屏',
|
|
147
|
+
'display.codeEditor.fullscreen': '全屏',
|
|
148
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** localStorage key for persisting the selected layout density. 用于持久化所选布局密度的 localStorage 键名。 */
|
|
2
|
+
const STORAGE_KEY = 'aithe-layout';
|
|
3
|
+
/** Default layout density name. 默认布局密度名称。 */
|
|
4
|
+
export const AITHE_DEFAULT_LAYOUT = 'medium';
|
|
5
|
+
/** Current active layout density. 当前激活的布局密度。 */
|
|
6
|
+
let currentLayout = AITHE_DEFAULT_LAYOUT;
|
|
7
|
+
/** Set of listener functions for layout density changes. 布局密度变更监听函数集合。 */
|
|
8
|
+
const listeners = new Set();
|
|
9
|
+
/**
|
|
10
|
+
* Load the previously persisted layout density from localStorage.
|
|
11
|
+
* 从 localStorage 加载之前持久化的布局密度。
|
|
12
|
+
*
|
|
13
|
+
* @returns Stored layout name, or `undefined` if none. 存储的布局名称,若无则返回 `undefined`。
|
|
14
|
+
*/
|
|
15
|
+
function loadStoredLayout() {
|
|
16
|
+
try {
|
|
17
|
+
const raw = localStorage.getItem(STORAGE_KEY);
|
|
18
|
+
if (!raw)
|
|
19
|
+
return undefined;
|
|
20
|
+
return raw;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Persist the layout density name to localStorage.
|
|
28
|
+
* 将布局密度名称持久化到 localStorage。
|
|
29
|
+
*
|
|
30
|
+
* @param layout - Layout density name to persist. 要持久化的布局密度名称。
|
|
31
|
+
*/
|
|
32
|
+
function storeLayout(layout) {
|
|
33
|
+
try {
|
|
34
|
+
localStorage.setItem(STORAGE_KEY, layout);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// ignore
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Set the global layout density and optionally persist to localStorage.
|
|
42
|
+
* 设置全局布局密度,可选持久化到 localStorage。
|
|
43
|
+
*
|
|
44
|
+
* @param layout - Layout density name to apply. 要应用的布局密度名称。
|
|
45
|
+
* @param persist - Whether to save to localStorage. Defaults to `true`. 是否保存到 localStorage,默认为 `true`。
|
|
46
|
+
*/
|
|
47
|
+
export function setAitheLayout(layout, persist = true) {
|
|
48
|
+
if (layout === currentLayout)
|
|
49
|
+
return;
|
|
50
|
+
currentLayout = layout;
|
|
51
|
+
if (persist)
|
|
52
|
+
storeLayout(layout);
|
|
53
|
+
document.documentElement.dataset.aitheLayout = layout;
|
|
54
|
+
for (const fn of listeners) {
|
|
55
|
+
fn();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get the current global layout density.
|
|
60
|
+
* 获取当前全局布局密度。
|
|
61
|
+
*
|
|
62
|
+
* @returns Current layout density name. 当前布局密度名称。
|
|
63
|
+
*/
|
|
64
|
+
export function getAitheLayout() {
|
|
65
|
+
return currentLayout;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Initialize the layout subsystem: load stored preference and apply layout.
|
|
69
|
+
* 初始化布局子系统:加载存储的偏好并应用布局。
|
|
70
|
+
*
|
|
71
|
+
* @param defaultLayout - Fallback layout when no stored preference exists. Defaults to `AITHE_DEFAULT_LAYOUT`. 无存储偏好时的回退布局,默认为 `AITHE_DEFAULT_LAYOUT`。
|
|
72
|
+
*/
|
|
73
|
+
export function initAitheLayout(defaultLayout = AITHE_DEFAULT_LAYOUT) {
|
|
74
|
+
const stored = loadStoredLayout();
|
|
75
|
+
currentLayout = stored || defaultLayout;
|
|
76
|
+
document.documentElement.dataset.aitheLayout = currentLayout;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Subscribe to layout density changes. Returns an unsubscribe function.
|
|
80
|
+
* 订阅布局密度变更,返回取消订阅函数。
|
|
81
|
+
*
|
|
82
|
+
* @param fn - Callback function invoked when layout changes. 布局变更时调用的回调函数。
|
|
83
|
+
* @returns Unsubscribe function. 取消订阅函数。
|
|
84
|
+
*/
|
|
85
|
+
export function onAitheLayoutChange(fn) {
|
|
86
|
+
listeners.add(fn);
|
|
87
|
+
return () => listeners.delete(fn);
|
|
88
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
/** Primitive design tokens (spacing, radius, shadow, typography, z-index, duration, control heights) scoped to `:host`. 作用域为 `:host` 的基础设计令牌(间距、圆角、阴影、排版、z-index、时长、控件高度)。 */
|
|
3
|
+
export const aithePrimitiveTokens = css `
|
|
4
|
+
:host {
|
|
5
|
+
--aithe-font-family: 'Sora', 'IBM Plex Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
6
|
+
--aithe-font-family-mono: 'JetBrains Mono', 'SFMono-Regular', 'Consolas', monospace;
|
|
7
|
+
--aithe-z-base: 1;
|
|
8
|
+
--aithe-z-dropdown: 1000;
|
|
9
|
+
--aithe-z-popover: 1010;
|
|
10
|
+
--aithe-z-modal: 1080;
|
|
11
|
+
--aithe-z-drawer: 1090;
|
|
12
|
+
--aithe-z-tooltip: 1120;
|
|
13
|
+
--aithe-duration-fast: 140ms;
|
|
14
|
+
--aithe-duration-base: 220ms;
|
|
15
|
+
--aithe-duration-slow: 320ms;
|
|
16
|
+
--aithe-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
/** Panel surface styles (background, border, radius, shadow, backdrop-filter). 面板表面样式(背景、边框、圆角、阴影、背景滤镜)。 */
|
|
20
|
+
export const aitheSurfaceStyles = css `
|
|
21
|
+
background: var(--aithe-color-surface-elevated);
|
|
22
|
+
border: 1px solid var(--aithe-color-border);
|
|
23
|
+
border-radius: var(--aithe-container-radius-lg);
|
|
24
|
+
box-shadow: var(--aithe-shadow-2);
|
|
25
|
+
backdrop-filter: blur(16px);
|
|
26
|
+
`;
|
|
27
|
+
/** Base styles for interactive controls (border, radius, background, color, transitions). 交互控件的基础样式(边框、圆角、背景、颜色、过渡)。 */
|
|
28
|
+
export const aitheControlStyles = css `
|
|
29
|
+
border: 1px solid var(--aithe-color-border);
|
|
30
|
+
border-radius: var(--aithe-radius-md);
|
|
31
|
+
background: var(--aithe-color-surface-elevated);
|
|
32
|
+
color: var(--aithe-color-text);
|
|
33
|
+
transition:
|
|
34
|
+
border-color var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
35
|
+
box-shadow var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
36
|
+
background var(--aithe-duration-fast) var(--aithe-ease-standard),
|
|
37
|
+
color var(--aithe-duration-fast) var(--aithe-ease-standard);
|
|
38
|
+
`;
|
|
39
|
+
/** Focus ring styles for interactive controls (border-color + box-shadow). 交互控件的聚焦环样式(边框颜色 + box-shadow)。 */
|
|
40
|
+
export const aitheControlFocusStyles = css `
|
|
41
|
+
border-color: var(--aithe-primary-5);
|
|
42
|
+
box-shadow: 0 0 0 4px var(--aithe-color-focus-ring);
|
|
43
|
+
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cyber shadow style tokens.
|
|
3
|
+
* 赛博朋克阴影风格令牌。
|
|
4
|
+
*
|
|
5
|
+
* Provides glowing neon shadows with a futuristic, tech-inspired aesthetic.
|
|
6
|
+
* 提供霓虹光晕阴影,营造未来科技感。
|
|
7
|
+
*/
|
|
8
|
+
export const cyberShadowTokens = {
|
|
9
|
+
'--aithe-shadow-1': '0 2px 8px rgba(0, 0, 0, 0.25), 0 0 8px var(--aithe-primary-6, rgba(77, 141, 255, 0.15))',
|
|
10
|
+
'--aithe-shadow-2': '0 4px 12px rgba(0, 0, 0, 0.3), 0 0 12px var(--aithe-primary-6, rgba(77, 141, 255, 0.2))',
|
|
11
|
+
'--aithe-shadow-3': '0 6px 16px rgba(0, 0, 0, 0.35), 0 0 18px var(--aithe-primary-6, rgba(77, 141, 255, 0.24))',
|
|
12
|
+
'--aithe-shadow-4': '0 8px 20px rgba(0, 0, 0, 0.4), 0 0 24px var(--aithe-primary-6, rgba(77, 141, 255, 0.28))',
|
|
13
|
+
'--aithe-shadow-5': '0 10px 24px rgba(0, 0, 0, 0.45), 0 0 30px var(--aithe-primary-6, rgba(77, 141, 255, 0.3))',
|
|
14
|
+
'--aithe-shadow-glow': '0 0 8px var(--aithe-primary-6, rgba(77, 141, 255, 0.2))',
|
|
15
|
+
'--aithe-shadow-inner': 'none',
|
|
16
|
+
'--aithe-shadow-blur': '0px',
|
|
17
|
+
'--aithe-shadow-opacity': '1',
|
|
18
|
+
'--aithe-shadow-border-glow': '1px',
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep shadow style tokens.
|
|
3
|
+
* 深度阴影风格令牌。
|
|
4
|
+
*
|
|
5
|
+
* Provides dramatic, high-contrast shadows with a sense of depth.
|
|
6
|
+
* 提供戏剧性、高对比度的阴影,营造深邃感。
|
|
7
|
+
*/
|
|
8
|
+
export const deepShadowTokens = {
|
|
9
|
+
'--aithe-shadow-1': '0 6px 16px rgba(0, 0, 0, 0.28)',
|
|
10
|
+
'--aithe-shadow-2': '0 10px 28px rgba(0, 0, 0, 0.35)',
|
|
11
|
+
'--aithe-shadow-3': '0 16px 40px rgba(0, 0, 0, 0.42)',
|
|
12
|
+
'--aithe-shadow-4': '0 22px 52px rgba(0, 0, 0, 0.5)',
|
|
13
|
+
'--aithe-shadow-5': '0 28px 64px rgba(0, 0, 0, 0.58)',
|
|
14
|
+
'--aithe-shadow-glow': 'none',
|
|
15
|
+
'--aithe-shadow-inner': 'inset 0 2px 6px rgba(0, 0, 0, 0.2)',
|
|
16
|
+
'--aithe-shadow-blur': '0px',
|
|
17
|
+
'--aithe-shadow-opacity': '1',
|
|
18
|
+
'--aithe-shadow-border-glow': '0px',
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diffuse shadow style tokens.
|
|
3
|
+
* 漫射阴影风格令牌。
|
|
4
|
+
*
|
|
5
|
+
* Provides wide, soft shadows with a gentle, ambient appearance.
|
|
6
|
+
* 提供宽阔、柔和的阴影,营造轻盈的氛围感。
|
|
7
|
+
*/
|
|
8
|
+
export const diffuseShadowTokens = {
|
|
9
|
+
'--aithe-shadow-1': '0 4px 24px rgba(18, 24, 38, 0.1)',
|
|
10
|
+
'--aithe-shadow-2': '0 8px 36px rgba(18, 24, 38, 0.12)',
|
|
11
|
+
'--aithe-shadow-3': '0 14px 48px rgba(18, 24, 38, 0.15)',
|
|
12
|
+
'--aithe-shadow-4': '0 20px 60px rgba(18, 24, 38, 0.18)',
|
|
13
|
+
'--aithe-shadow-5': '0 28px 72px rgba(18, 24, 38, 0.22)',
|
|
14
|
+
'--aithe-shadow-glow': 'none',
|
|
15
|
+
'--aithe-shadow-inner': 'none',
|
|
16
|
+
'--aithe-shadow-blur': '0px',
|
|
17
|
+
'--aithe-shadow-opacity': '1',
|
|
18
|
+
'--aithe-shadow-border-glow': '0px',
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flat shadow style tokens.
|
|
3
|
+
* 平坦阴影风格令牌。
|
|
4
|
+
*
|
|
5
|
+
* Provides minimal, subtle shadows with no elevation effect.
|
|
6
|
+
* 提供最小化、细腻的阴影,无立体感。
|
|
7
|
+
*/
|
|
8
|
+
export const flatShadowTokens = {
|
|
9
|
+
'--aithe-shadow-1': '0 1px 2px rgba(18, 24, 38, 0.02)',
|
|
10
|
+
'--aithe-shadow-2': '0 1px 2px rgba(18, 24, 38, 0.03)',
|
|
11
|
+
'--aithe-shadow-3': '0 1px 2px rgba(18, 24, 38, 0.03)',
|
|
12
|
+
'--aithe-shadow-4': '0 1px 2px rgba(18, 24, 38, 0.03)',
|
|
13
|
+
'--aithe-shadow-5': '0 1px 2px rgba(18, 24, 38, 0.03)',
|
|
14
|
+
'--aithe-shadow-glow': 'none',
|
|
15
|
+
'--aithe-shadow-inner': 'none',
|
|
16
|
+
'--aithe-shadow-blur': '0px',
|
|
17
|
+
'--aithe-shadow-opacity': '1',
|
|
18
|
+
'--aithe-shadow-border-glow': '0px',
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glassmorphism shadow style tokens.
|
|
3
|
+
* 玻璃拟态阴影风格令牌。
|
|
4
|
+
*
|
|
5
|
+
* Provides soft, diffused shadows with subtle blur for a frosted glass effect.
|
|
6
|
+
* 提供柔和、模糊的阴影,营造磨砂玻璃质感。
|
|
7
|
+
*/
|
|
8
|
+
export const glassmorphismShadowTokens = {
|
|
9
|
+
'--aithe-shadow-1': '0 4px 16px rgba(18, 24, 38, 0.12), 0 0 1px rgba(255, 255, 255, 0.3)',
|
|
10
|
+
'--aithe-shadow-2': '0 8px 24px rgba(18, 24, 38, 0.14), 0 0 1px rgba(255, 255, 255, 0.3)',
|
|
11
|
+
'--aithe-shadow-3': '0 12px 32px rgba(18, 24, 38, 0.18), 0 0 1px rgba(255, 255, 255, 0.3)',
|
|
12
|
+
'--aithe-shadow-4': '0 16px 40px rgba(18, 24, 38, 0.22), 0 0 1px rgba(255, 255, 255, 0.3)',
|
|
13
|
+
'--aithe-shadow-5': '0 20px 48px rgba(18, 24, 38, 0.26), 0 0 1px rgba(255, 255, 255, 0.3)',
|
|
14
|
+
'--aithe-shadow-glow': 'none',
|
|
15
|
+
'--aithe-shadow-inner': 'none',
|
|
16
|
+
'--aithe-shadow-blur': '20px',
|
|
17
|
+
'--aithe-shadow-opacity': '0.7',
|
|
18
|
+
'--aithe-shadow-border-glow': '0px',
|
|
19
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export { flatShadowTokens } from './flat';
|
|
2
|
+
export { neumorphismShadowTokens } from './neumorphism';
|
|
3
|
+
export { skeuomorphicShadowTokens } from './skeuomorphic';
|
|
4
|
+
export { glassmorphismShadowTokens } from './glassmorphism';
|
|
5
|
+
export { cyberShadowTokens } from './cyber';
|
|
6
|
+
export { deepShadowTokens } from './deep';
|
|
7
|
+
export { diffuseShadowTokens } from './diffuse';
|
|
8
|
+
export { sharpBusinessShadowTokens } from './sharp-business';
|
|
9
|
+
export { retroShadowTokens } from './retro';
|
|
10
|
+
import { flatShadowTokens } from './flat';
|
|
11
|
+
import { neumorphismShadowTokens } from './neumorphism';
|
|
12
|
+
import { skeuomorphicShadowTokens } from './skeuomorphic';
|
|
13
|
+
import { glassmorphismShadowTokens } from './glassmorphism';
|
|
14
|
+
import { cyberShadowTokens } from './cyber';
|
|
15
|
+
import { deepShadowTokens } from './deep';
|
|
16
|
+
import { diffuseShadowTokens } from './diffuse';
|
|
17
|
+
import { sharpBusinessShadowTokens } from './sharp-business';
|
|
18
|
+
import { retroShadowTokens } from './retro';
|
|
19
|
+
/** Map of all built-in shadow style names to their CSS variable token maps. 所有内置阴影风格名称到其 CSS 变量 token 映射的映射表。 */
|
|
20
|
+
const SHADOW_TOKENS = {
|
|
21
|
+
flat: flatShadowTokens,
|
|
22
|
+
neumorphism: neumorphismShadowTokens,
|
|
23
|
+
skeuomorphic: skeuomorphicShadowTokens,
|
|
24
|
+
glassmorphism: glassmorphismShadowTokens,
|
|
25
|
+
cyber: cyberShadowTokens,
|
|
26
|
+
deep: deepShadowTokens,
|
|
27
|
+
diffuse: diffuseShadowTokens,
|
|
28
|
+
'sharp-business': sharpBusinessShadowTokens,
|
|
29
|
+
retro: retroShadowTokens,
|
|
30
|
+
};
|
|
31
|
+
/** Preview icon characters for each built-in shadow style. 每个内置阴影风格的预览图标字符。 */
|
|
32
|
+
const SHADOW_ICONS = {
|
|
33
|
+
flat: '▭',
|
|
34
|
+
neumorphism: '◧',
|
|
35
|
+
skeuomorphic: '▣',
|
|
36
|
+
glassmorphism: '◈',
|
|
37
|
+
cyber: '⬡',
|
|
38
|
+
deep: '⬢',
|
|
39
|
+
diffuse: '○',
|
|
40
|
+
'sharp-business': '▬',
|
|
41
|
+
retro: '▢',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Static tree menu data for shadow selection, compatible with `<aithe-tree-menu>`.
|
|
45
|
+
* 用于阴影选择的静态树形菜单数据,兼容 `<aithe-tree-menu>`。
|
|
46
|
+
* Each item carries an `icon` extension field with the preview character.
|
|
47
|
+
* 每个项携带 `icon` 扩展字段,包含预览字符。
|
|
48
|
+
*/
|
|
49
|
+
export const shadowMenu = Object.keys(SHADOW_TOKENS).map((shadow) => ({
|
|
50
|
+
id: shadow,
|
|
51
|
+
label: shadow === 'sharp-business' ? 'Sharp Business' : shadow.charAt(0).toUpperCase() + shadow.slice(1),
|
|
52
|
+
icon: SHADOW_ICONS[shadow],
|
|
53
|
+
i18n: `shadowPicker.${shadow === 'sharp-business' ? 'sharpBusiness' : shadow}`,
|
|
54
|
+
}));
|
|
55
|
+
/** localStorage key for persisting the selected shadow style. 用于持久化所选阴影风格的 localStorage 键名。 */
|
|
56
|
+
const STORAGE_KEY = 'aithe-shadow';
|
|
57
|
+
/** Default shadow style name. 默认阴影风格名称。 */
|
|
58
|
+
export const AITHE_DEFAULT_SHADOW = 'skeuomorphic';
|
|
59
|
+
/** Current active shadow style. 当前激活的阴影风格。 */
|
|
60
|
+
let currentShadow = AITHE_DEFAULT_SHADOW;
|
|
61
|
+
/** Set of listener functions for shadow style changes. 阴影风格变更监听函数集合。 */
|
|
62
|
+
const listeners = new Set();
|
|
63
|
+
/** Get the CSS variable token map for a given shadow style. 获取指定阴影风格的 CSS 变量 token 映射。 */
|
|
64
|
+
export function getShadowTokens(shadow) {
|
|
65
|
+
return SHADOW_TOKENS[shadow];
|
|
66
|
+
}
|
|
67
|
+
/** Get the list of all built-in shadow style names. 获取所有内置阴影风格名称列表。 */
|
|
68
|
+
export function getAitheShadows() {
|
|
69
|
+
return Object.keys(SHADOW_TOKENS);
|
|
70
|
+
}
|
|
71
|
+
/** Load the previously persisted shadow style from localStorage. 从 localStorage 加载之前持久化的阴影风格。 */
|
|
72
|
+
function loadStoredShadow() {
|
|
73
|
+
try {
|
|
74
|
+
const raw = localStorage.getItem(STORAGE_KEY);
|
|
75
|
+
if (!raw)
|
|
76
|
+
return undefined;
|
|
77
|
+
return raw;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** Persist the shadow style name to localStorage. 将阴影风格名称持久化到 localStorage。 */
|
|
84
|
+
function storeShadow(shadow) {
|
|
85
|
+
try {
|
|
86
|
+
localStorage.setItem(STORAGE_KEY, shadow);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// ignore
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** Apply shadow CSS variable tokens to the document root and body. 将阴影 CSS 变量 token 应用到文档根元素和 body。 */
|
|
93
|
+
function applyShadowTokens(shadow) {
|
|
94
|
+
const tokens = SHADOW_TOKENS[shadow];
|
|
95
|
+
if (!tokens)
|
|
96
|
+
return;
|
|
97
|
+
const html = document.documentElement;
|
|
98
|
+
const body = document.body;
|
|
99
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
100
|
+
html.style.setProperty(key, value);
|
|
101
|
+
body.style.setProperty(key, value);
|
|
102
|
+
}
|
|
103
|
+
html.dataset.aitheShadow = shadow;
|
|
104
|
+
}
|
|
105
|
+
export function setAitheShadow(shadow, persist = true) {
|
|
106
|
+
if (shadow === currentShadow)
|
|
107
|
+
return;
|
|
108
|
+
currentShadow = shadow;
|
|
109
|
+
if (persist)
|
|
110
|
+
storeShadow(shadow);
|
|
111
|
+
document.documentElement.dataset.aitheShadow = shadow;
|
|
112
|
+
applyShadowTokens(shadow);
|
|
113
|
+
for (const fn of listeners) {
|
|
114
|
+
fn();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export function getAitheShadow() {
|
|
118
|
+
return currentShadow;
|
|
119
|
+
}
|
|
120
|
+
export function initAitheShadow(defaultShadow = AITHE_DEFAULT_SHADOW) {
|
|
121
|
+
const stored = loadStoredShadow();
|
|
122
|
+
currentShadow = stored || defaultShadow;
|
|
123
|
+
document.documentElement.dataset.aitheShadow = currentShadow;
|
|
124
|
+
applyShadowTokens(currentShadow);
|
|
125
|
+
}
|
|
126
|
+
export function onAitheShadowChange(fn) {
|
|
127
|
+
listeners.add(fn);
|
|
128
|
+
return () => listeners.delete(fn);
|
|
129
|
+
}
|