shared-lib-web 0.0.0-stage → 0.0.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/CODING_RULES.md +118 -0
- package/LICENSE +21 -0
- package/README.md +630 -2
- package/dist/components/app-brand.d.ts +9 -0
- package/dist/components/app-brand.d.ts.map +1 -0
- package/dist/components/app-brand.js +23 -0
- package/dist/components/app-brand.js.map +1 -0
- package/dist/components/branch-switcher.d.ts +7 -0
- package/dist/components/branch-switcher.d.ts.map +1 -0
- package/dist/components/branch-switcher.js +37 -0
- package/dist/components/branch-switcher.js.map +1 -0
- package/dist/components/coming-soon.d.ts +6 -0
- package/dist/components/coming-soon.d.ts.map +1 -0
- package/dist/components/coming-soon.js +19 -0
- package/dist/components/coming-soon.js.map +1 -0
- package/dist/components/empty-state.d.ts +15 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +14 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/language-switcher.d.ts +8 -0
- package/dist/components/language-switcher.d.ts.map +1 -0
- package/dist/components/language-switcher.js +48 -0
- package/dist/components/language-switcher.js.map +1 -0
- package/dist/components/page-loader.d.ts +2 -0
- package/dist/components/page-loader.d.ts.map +1 -0
- package/dist/components/page-loader.js +8 -0
- package/dist/components/page-loader.js.map +1 -0
- package/dist/components/page-not-found.d.ts +2 -0
- package/dist/components/page-not-found.d.ts.map +1 -0
- package/dist/components/page-not-found.js +18 -0
- package/dist/components/page-not-found.js.map +1 -0
- package/dist/components/permission-denied.d.ts +2 -0
- package/dist/components/permission-denied.d.ts.map +1 -0
- package/dist/components/permission-denied.js +12 -0
- package/dist/components/permission-denied.js.map +1 -0
- package/dist/components/require-access.d.ts +11 -0
- package/dist/components/require-access.d.ts.map +1 -0
- package/dist/components/require-access.js +15 -0
- package/dist/components/require-access.js.map +1 -0
- package/dist/components/scroll-to-top.d.ts +12 -0
- package/dist/components/scroll-to-top.d.ts.map +1 -0
- package/dist/components/scroll-to-top.js +42 -0
- package/dist/components/scroll-to-top.js.map +1 -0
- package/dist/components/settings-menu.d.ts +17 -0
- package/dist/components/settings-menu.d.ts.map +1 -0
- package/dist/components/settings-menu.js +102 -0
- package/dist/components/settings-menu.js.map +1 -0
- package/dist/components/theme-switcher.d.ts +5 -0
- package/dist/components/theme-switcher.d.ts.map +1 -0
- package/dist/components/theme-switcher.js +33 -0
- package/dist/components/theme-switcher.js.map +1 -0
- package/dist/components/toast-container.d.ts +5 -0
- package/dist/components/toast-container.d.ts.map +1 -0
- package/dist/components/toast-container.js +51 -0
- package/dist/components/toast-container.js.map +1 -0
- package/dist/components/top-progress.d.ts +2 -0
- package/dist/components/top-progress.d.ts.map +1 -0
- package/dist/components/top-progress.js +14 -0
- package/dist/components/top-progress.js.map +1 -0
- package/dist/components/user-menu.d.ts +26 -0
- package/dist/components/user-menu.d.ts.map +1 -0
- package/dist/components/user-menu.js +85 -0
- package/dist/components/user-menu.js.map +1 -0
- package/dist/context/ui-context.d.ts +5 -0
- package/dist/context/ui-context.d.ts.map +1 -0
- package/dist/context/ui-context.js +16 -0
- package/dist/context/ui-context.js.map +1 -0
- package/dist/context/use-ui.d.ts +3 -0
- package/dist/context/use-ui.d.ts.map +1 -0
- package/dist/context/use-ui.js +39 -0
- package/dist/context/use-ui.js.map +1 -0
- package/dist/i18n/default-messages.d.ts +5 -0
- package/dist/i18n/default-messages.d.ts.map +1 -0
- package/dist/i18n/default-messages.js +64 -0
- package/dist/i18n/default-messages.js.map +1 -0
- package/dist/i18n/direction.d.ts +10 -0
- package/dist/i18n/direction.d.ts.map +1 -0
- package/dist/i18n/direction.js +35 -0
- package/dist/i18n/direction.js.map +1 -0
- package/dist/i18n/locale-service.d.ts +36 -0
- package/dist/i18n/locale-service.d.ts.map +1 -0
- package/dist/i18n/locale-service.js +163 -0
- package/dist/i18n/locale-service.js.map +1 -0
- package/dist/i18n/translator.d.ts +14 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +81 -0
- package/dist/i18n/translator.js.map +1 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/app-types.d.ts +137 -0
- package/dist/interfaces/app-types.d.ts.map +1 -0
- package/dist/interfaces/app-types.js +5 -0
- package/dist/interfaces/app-types.js.map +1 -0
- package/dist/interfaces/toast.d.ts +9 -0
- package/dist/interfaces/toast.d.ts.map +1 -0
- package/dist/interfaces/toast.js +4 -0
- package/dist/interfaces/toast.js.map +1 -0
- package/dist/interfaces/ui-config.d.ts +172 -0
- package/dist/interfaces/ui-config.d.ts.map +1 -0
- package/dist/interfaces/ui-config.js +6 -0
- package/dist/interfaces/ui-config.js.map +1 -0
- package/dist/interfaces/ui-context.d.ts +37 -0
- package/dist/interfaces/ui-context.d.ts.map +1 -0
- package/dist/interfaces/ui-context.js +4 -0
- package/dist/interfaces/ui-context.js.map +1 -0
- package/dist/layout.d.ts +10 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +22 -0
- package/dist/layout.js.map +1 -0
- package/dist/layouts/app-layout.d.ts +23 -0
- package/dist/layouts/app-layout.d.ts.map +1 -0
- package/dist/layouts/app-layout.js +52 -0
- package/dist/layouts/app-layout.js.map +1 -0
- package/dist/layouts/article-layout.d.ts +7 -0
- package/dist/layouts/article-layout.d.ts.map +1 -0
- package/dist/layouts/article-layout.js +8 -0
- package/dist/layouts/article-layout.js.map +1 -0
- package/dist/layouts/aside-layout.d.ts +27 -0
- package/dist/layouts/aside-layout.d.ts.map +1 -0
- package/dist/layouts/aside-layout.js +70 -0
- package/dist/layouts/aside-layout.js.map +1 -0
- package/dist/layouts/auth-layout.d.ts +7 -0
- package/dist/layouts/auth-layout.d.ts.map +1 -0
- package/dist/layouts/auth-layout.js +20 -0
- package/dist/layouts/auth-layout.js.map +1 -0
- package/dist/layouts/content-layout.d.ts +3 -0
- package/dist/layouts/content-layout.d.ts.map +1 -0
- package/dist/layouts/content-layout.js +10 -0
- package/dist/layouts/content-layout.js.map +1 -0
- package/dist/layouts/float-layout.d.ts +3 -0
- package/dist/layouts/float-layout.d.ts.map +1 -0
- package/dist/layouts/float-layout.js +10 -0
- package/dist/layouts/float-layout.js.map +1 -0
- package/dist/layouts/grid-layout.d.ts +3 -0
- package/dist/layouts/grid-layout.d.ts.map +1 -0
- package/dist/layouts/grid-layout.js +10 -0
- package/dist/layouts/grid-layout.js.map +1 -0
- package/dist/layouts/head-layout.d.ts +16 -0
- package/dist/layouts/head-layout.d.ts.map +1 -0
- package/dist/layouts/head-layout.js +36 -0
- package/dist/layouts/head-layout.js.map +1 -0
- package/dist/layouts/header.d.ts +18 -0
- package/dist/layouts/header.d.ts.map +1 -0
- package/dist/layouts/header.js +26 -0
- package/dist/layouts/header.js.map +1 -0
- package/dist/layouts/layout-constants.d.ts +3 -0
- package/dist/layouts/layout-constants.d.ts.map +1 -0
- package/dist/layouts/layout-constants.js +5 -0
- package/dist/layouts/layout-constants.js.map +1 -0
- package/dist/layouts/mega-menu.d.ts +3 -0
- package/dist/layouts/mega-menu.d.ts.map +1 -0
- package/dist/layouts/mega-menu.js +104 -0
- package/dist/layouts/mega-menu.js.map +1 -0
- package/dist/layouts/navigation.d.ts +11 -0
- package/dist/layouts/navigation.d.ts.map +1 -0
- package/dist/layouts/navigation.js +41 -0
- package/dist/layouts/navigation.js.map +1 -0
- package/dist/layouts/rail-flyout.d.ts +5 -0
- package/dist/layouts/rail-flyout.d.ts.map +1 -0
- package/dist/layouts/rail-flyout.js +49 -0
- package/dist/layouts/rail-flyout.js.map +1 -0
- package/dist/layouts/rail-tooltip.d.ts +8 -0
- package/dist/layouts/rail-tooltip.d.ts.map +1 -0
- package/dist/layouts/rail-tooltip.js +60 -0
- package/dist/layouts/rail-tooltip.js.map +1 -0
- package/dist/layouts/sidebar.d.ts +38 -0
- package/dist/layouts/sidebar.d.ts.map +1 -0
- package/dist/layouts/sidebar.js +137 -0
- package/dist/layouts/sidebar.js.map +1 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +12 -0
- package/dist/markdown.js.map +1 -0
- package/dist/providers/provider-effects.d.ts +9 -0
- package/dist/providers/provider-effects.d.ts.map +1 -0
- package/dist/providers/provider-effects.js +26 -0
- package/dist/providers/provider-effects.js.map +1 -0
- package/dist/providers/register-config.d.ts +4 -0
- package/dist/providers/register-config.d.ts.map +1 -0
- package/dist/providers/register-config.js +28 -0
- package/dist/providers/register-config.js.map +1 -0
- package/dist/providers/shared-web-ui-provider.d.ts +31 -0
- package/dist/providers/shared-web-ui-provider.d.ts.map +1 -0
- package/dist/providers/shared-web-ui-provider.js +54 -0
- package/dist/providers/shared-web-ui-provider.js.map +1 -0
- package/dist/providers/theme-provider.d.ts +6 -0
- package/dist/providers/theme-provider.d.ts.map +1 -0
- package/dist/providers/theme-provider.js +11 -0
- package/dist/providers/theme-provider.js.map +1 -0
- package/dist/providers/translation-provider.d.ts +8 -0
- package/dist/providers/translation-provider.d.ts.map +1 -0
- package/dist/providers/translation-provider.js +21 -0
- package/dist/providers/translation-provider.js.map +1 -0
- package/dist/query/page-link.d.ts +20 -0
- package/dist/query/page-link.d.ts.map +1 -0
- package/dist/query/page-link.js +53 -0
- package/dist/query/page-link.js.map +1 -0
- package/dist/query/page-path.d.ts +5 -0
- package/dist/query/page-path.d.ts.map +1 -0
- package/dist/query/page-path.js +24 -0
- package/dist/query/page-path.js.map +1 -0
- package/dist/query/query-param.d.ts +63 -0
- package/dist/query/query-param.d.ts.map +1 -0
- package/dist/query/query-param.js +215 -0
- package/dist/query/query-param.js.map +1 -0
- package/dist/query/use-query-param.d.ts +5 -0
- package/dist/query/use-query-param.d.ts.map +1 -0
- package/dist/query/use-query-param.js +21 -0
- package/dist/query/use-query-param.js.map +1 -0
- package/dist/skeleton/skeleton-article.d.ts +2 -0
- package/dist/skeleton/skeleton-article.d.ts.map +1 -0
- package/dist/skeleton/skeleton-article.js +7 -0
- package/dist/skeleton/skeleton-article.js.map +1 -0
- package/dist/skeleton/skeleton-auth-form.d.ts +6 -0
- package/dist/skeleton/skeleton-auth-form.d.ts.map +1 -0
- package/dist/skeleton/skeleton-auth-form.js +9 -0
- package/dist/skeleton/skeleton-auth-form.js.map +1 -0
- package/dist/skeleton/skeleton-cards.d.ts +6 -0
- package/dist/skeleton/skeleton-cards.d.ts.map +1 -0
- package/dist/skeleton/skeleton-cards.js +16 -0
- package/dist/skeleton/skeleton-cards.js.map +1 -0
- package/dist/skeleton/skeleton-chat.d.ts +2 -0
- package/dist/skeleton/skeleton-chat.d.ts.map +1 -0
- package/dist/skeleton/skeleton-chat.js +17 -0
- package/dist/skeleton/skeleton-chat.js.map +1 -0
- package/dist/skeleton/skeleton-dashboard.d.ts +2 -0
- package/dist/skeleton/skeleton-dashboard.d.ts.map +1 -0
- package/dist/skeleton/skeleton-dashboard.js +16 -0
- package/dist/skeleton/skeleton-dashboard.js.map +1 -0
- package/dist/skeleton/skeleton-float.d.ts +2 -0
- package/dist/skeleton/skeleton-float.d.ts.map +1 -0
- package/dist/skeleton/skeleton-float.js +7 -0
- package/dist/skeleton/skeleton-float.js.map +1 -0
- package/dist/skeleton/skeleton-form.d.ts +10 -0
- package/dist/skeleton/skeleton-form.d.ts.map +1 -0
- package/dist/skeleton/skeleton-form.js +16 -0
- package/dist/skeleton/skeleton-form.js.map +1 -0
- package/dist/skeleton/skeleton-menu.d.ts +2 -0
- package/dist/skeleton/skeleton-menu.d.ts.map +1 -0
- package/dist/skeleton/skeleton-menu.js +16 -0
- package/dist/skeleton/skeleton-menu.js.map +1 -0
- package/dist/skeleton/skeleton-page.d.ts +2 -0
- package/dist/skeleton/skeleton-page.d.ts.map +1 -0
- package/dist/skeleton/skeleton-page.js +9 -0
- package/dist/skeleton/skeleton-page.js.map +1 -0
- package/dist/skeleton/skeleton-table.d.ts +2 -0
- package/dist/skeleton/skeleton-table.d.ts.map +1 -0
- package/dist/skeleton/skeleton-table.js +16 -0
- package/dist/skeleton/skeleton-table.js.map +1 -0
- package/dist/state/auth-service.d.ts +28 -0
- package/dist/state/auth-service.d.ts.map +1 -0
- package/dist/state/auth-service.js +92 -0
- package/dist/state/auth-service.js.map +1 -0
- package/dist/state/branch-service.d.ts +42 -0
- package/dist/state/branch-service.d.ts.map +1 -0
- package/dist/state/branch-service.js +193 -0
- package/dist/state/branch-service.js.map +1 -0
- package/dist/state/document-sync.d.ts +7 -0
- package/dist/state/document-sync.d.ts.map +1 -0
- package/dist/state/document-sync.js +39 -0
- package/dist/state/document-sync.js.map +1 -0
- package/dist/state/language-service.d.ts +16 -0
- package/dist/state/language-service.d.ts.map +1 -0
- package/dist/state/language-service.js +73 -0
- package/dist/state/language-service.js.map +1 -0
- package/dist/state/menu-service.d.ts +20 -0
- package/dist/state/menu-service.d.ts.map +1 -0
- package/dist/state/menu-service.js +59 -0
- package/dist/state/menu-service.js.map +1 -0
- package/dist/state/navigation-service.d.ts +37 -0
- package/dist/state/navigation-service.d.ts.map +1 -0
- package/dist/state/navigation-service.js +131 -0
- package/dist/state/navigation-service.js.map +1 -0
- package/dist/state/preference-sync.d.ts +15 -0
- package/dist/state/preference-sync.d.ts.map +1 -0
- package/dist/state/preference-sync.js +85 -0
- package/dist/state/preference-sync.js.map +1 -0
- package/dist/state/progress-service.d.ts +3 -0
- package/dist/state/progress-service.d.ts.map +1 -0
- package/dist/state/progress-service.js +17 -0
- package/dist/state/progress-service.js.map +1 -0
- package/dist/state/screen-access.d.ts +15 -0
- package/dist/state/screen-access.d.ts.map +1 -0
- package/dist/state/screen-access.js +60 -0
- package/dist/state/screen-access.js.map +1 -0
- package/dist/state/sidebar-service.d.ts +8 -0
- package/dist/state/sidebar-service.d.ts.map +1 -0
- package/dist/state/sidebar-service.js +18 -0
- package/dist/state/sidebar-service.js.map +1 -0
- package/dist/state/signals.d.ts +84 -0
- package/dist/state/signals.d.ts.map +1 -0
- package/dist/state/signals.js +137 -0
- package/dist/state/signals.js.map +1 -0
- package/dist/state/toast-service.d.ts +9 -0
- package/dist/state/toast-service.d.ts.map +1 -0
- package/dist/state/toast-service.js +36 -0
- package/dist/state/toast-service.js.map +1 -0
- package/dist/styles.css +15 -0
- package/dist/theme/dark-themes.d.ts +2 -0
- package/dist/theme/dark-themes.d.ts.map +1 -0
- package/dist/theme/dark-themes.js +20 -0
- package/dist/theme/dark-themes.js.map +1 -0
- package/dist/theme/logo.d.ts +4 -0
- package/dist/theme/logo.d.ts.map +1 -0
- package/dist/theme/logo.js +10 -0
- package/dist/theme/logo.js.map +1 -0
- package/dist/theme/theme-service.d.ts +21 -0
- package/dist/theme/theme-service.d.ts.map +1 -0
- package/dist/theme/theme-service.js +69 -0
- package/dist/theme/theme-service.js.map +1 -0
- package/dist/types/class-names.d.ts +9 -0
- package/dist/types/class-names.d.ts.map +1 -0
- package/dist/types/class-names.js +45 -0
- package/dist/types/class-names.js.map +1 -0
- package/dist/types/field-error.d.ts +5 -0
- package/dist/types/field-error.d.ts.map +1 -0
- package/dist/types/field-error.js +16 -0
- package/dist/types/field-error.js.map +1 -0
- package/dist/types/field-props.d.ts +20 -0
- package/dist/types/field-props.d.ts.map +1 -0
- package/dist/types/field-props.js +4 -0
- package/dist/types/field-props.js.map +1 -0
- package/dist/types/field-registry.d.ts +11 -0
- package/dist/types/field-registry.d.ts.map +1 -0
- package/dist/types/field-registry.js +18 -0
- package/dist/types/field-registry.js.map +1 -0
- package/dist/types/field-wrapper.d.ts +13 -0
- package/dist/types/field-wrapper.d.ts.map +1 -0
- package/dist/types/field-wrapper.js +16 -0
- package/dist/types/field-wrapper.js.map +1 -0
- package/dist/types/lang-field.d.ts +15 -0
- package/dist/types/lang-field.d.ts.map +1 -0
- package/dist/types/lang-field.js +68 -0
- package/dist/types/lang-field.js.map +1 -0
- package/dist/types/markdown-color-mode.d.ts +7 -0
- package/dist/types/markdown-color-mode.d.ts.map +1 -0
- package/dist/types/markdown-color-mode.js +11 -0
- package/dist/types/markdown-color-mode.js.map +1 -0
- package/dist/types/media-service.d.ts +24 -0
- package/dist/types/media-service.d.ts.map +1 -0
- package/dist/types/media-service.js +41 -0
- package/dist/types/media-service.js.map +1 -0
- package/dist/types/media-viewer.d.ts +2 -0
- package/dist/types/media-viewer.d.ts.map +1 -0
- package/dist/types/media-viewer.js +23 -0
- package/dist/types/media-viewer.js.map +1 -0
- package/dist/types/type.button.d.ts +36 -0
- package/dist/types/type.button.d.ts.map +1 -0
- package/dist/types/type.button.js +27 -0
- package/dist/types/type.button.js.map +1 -0
- package/dist/types/type.checkbox.d.ts +5 -0
- package/dist/types/type.checkbox.d.ts.map +1 -0
- package/dist/types/type.checkbox.js +26 -0
- package/dist/types/type.checkbox.js.map +1 -0
- package/dist/types/type.confirm.d.ts +19 -0
- package/dist/types/type.confirm.d.ts.map +1 -0
- package/dist/types/type.confirm.js +15 -0
- package/dist/types/type.confirm.js.map +1 -0
- package/dist/types/type.date.d.ts +16 -0
- package/dist/types/type.date.d.ts.map +1 -0
- package/dist/types/type.date.js +65 -0
- package/dist/types/type.date.js.map +1 -0
- package/dist/types/type.drawer.d.ts +20 -0
- package/dist/types/type.drawer.d.ts.map +1 -0
- package/dist/types/type.drawer.js +31 -0
- package/dist/types/type.drawer.js.map +1 -0
- package/dist/types/type.dropdown.d.ts +23 -0
- package/dist/types/type.dropdown.d.ts.map +1 -0
- package/dist/types/type.dropdown.js +34 -0
- package/dist/types/type.dropdown.js.map +1 -0
- package/dist/types/type.filter.d.ts +17 -0
- package/dist/types/type.filter.d.ts.map +1 -0
- package/dist/types/type.filter.js +28 -0
- package/dist/types/type.filter.js.map +1 -0
- package/dist/types/type.icon.d.ts +21 -0
- package/dist/types/type.icon.d.ts.map +1 -0
- package/dist/types/type.icon.js +24 -0
- package/dist/types/type.icon.js.map +1 -0
- package/dist/types/type.image.d.ts +34 -0
- package/dist/types/type.image.d.ts.map +1 -0
- package/dist/types/type.image.js +46 -0
- package/dist/types/type.image.js.map +1 -0
- package/dist/types/type.input.d.ts +13 -0
- package/dist/types/type.input.d.ts.map +1 -0
- package/dist/types/type.input.js +29 -0
- package/dist/types/type.input.js.map +1 -0
- package/dist/types/type.lang-md.d.ts +10 -0
- package/dist/types/type.lang-md.d.ts.map +1 -0
- package/dist/types/type.lang-md.js +56 -0
- package/dist/types/type.lang-md.js.map +1 -0
- package/dist/types/type.lang.d.ts +11 -0
- package/dist/types/type.lang.d.ts.map +1 -0
- package/dist/types/type.lang.js +56 -0
- package/dist/types/type.lang.js.map +1 -0
- package/dist/types/type.list.d.ts +13 -0
- package/dist/types/type.list.d.ts.map +1 -0
- package/dist/types/type.list.js +42 -0
- package/dist/types/type.list.js.map +1 -0
- package/dist/types/type.mdv.d.ts +10 -0
- package/dist/types/type.mdv.d.ts.map +1 -0
- package/dist/types/type.mdv.js +22 -0
- package/dist/types/type.mdv.js.map +1 -0
- package/dist/types/type.mdx.d.ts +10 -0
- package/dist/types/type.mdx.d.ts.map +1 -0
- package/dist/types/type.mdx.js +30 -0
- package/dist/types/type.mdx.js.map +1 -0
- package/dist/types/type.modal.d.ts +18 -0
- package/dist/types/type.modal.d.ts.map +1 -0
- package/dist/types/type.modal.js +30 -0
- package/dist/types/type.modal.js.map +1 -0
- package/dist/types/type.otp.d.ts +8 -0
- package/dist/types/type.otp.d.ts.map +1 -0
- package/dist/types/type.otp.js +48 -0
- package/dist/types/type.otp.js.map +1 -0
- package/dist/types/type.search.d.ts +16 -0
- package/dist/types/type.search.d.ts.map +1 -0
- package/dist/types/type.search.js +48 -0
- package/dist/types/type.search.js.map +1 -0
- package/dist/types/type.select.d.ts +14 -0
- package/dist/types/type.select.d.ts.map +1 -0
- package/dist/types/type.select.js +53 -0
- package/dist/types/type.select.js.map +1 -0
- package/dist/types/type.switch.d.ts +8 -0
- package/dist/types/type.switch.d.ts.map +1 -0
- package/dist/types/type.switch.js +26 -0
- package/dist/types/type.switch.js.map +1 -0
- package/dist/types/type.table.d.ts +28 -0
- package/dist/types/type.table.d.ts.map +1 -0
- package/dist/types/type.table.js +72 -0
- package/dist/types/type.table.js.map +1 -0
- package/dist/types/type.text-area.d.ts +9 -0
- package/dist/types/type.text-area.d.ts.map +1 -0
- package/dist/types/type.text-area.js +26 -0
- package/dist/types/type.text-area.js.map +1 -0
- package/dist/types/type.time.d.ts +9 -0
- package/dist/types/type.time.d.ts.map +1 -0
- package/dist/types/type.time.js +34 -0
- package/dist/types/type.time.js.map +1 -0
- package/dist/types/type.upload.d.ts +45 -0
- package/dist/types/type.upload.d.ts.map +1 -0
- package/dist/types/type.upload.js +90 -0
- package/dist/types/type.upload.js.map +1 -0
- package/dist/types/type.video.d.ts +19 -0
- package/dist/types/type.video.d.ts.map +1 -0
- package/dist/types/type.video.js +33 -0
- package/dist/types/type.video.js.map +1 -0
- package/dist/types/upload-service.d.ts +47 -0
- package/dist/types/upload-service.d.ts.map +1 -0
- package/dist/types/upload-service.js +191 -0
- package/dist/types/upload-service.js.map +1 -0
- package/dist/utils/app-config.d.ts +6 -0
- package/dist/utils/app-config.d.ts.map +1 -0
- package/dist/utils/app-config.js +17 -0
- package/dist/utils/app-config.js.map +1 -0
- package/dist/utils/app-http.d.ts +49 -0
- package/dist/utils/app-http.d.ts.map +1 -0
- package/dist/utils/app-http.js +229 -0
- package/dist/utils/app-http.js.map +1 -0
- package/dist/utils/app-storage.d.ts +56 -0
- package/dist/utils/app-storage.d.ts.map +1 -0
- package/dist/utils/app-storage.js +236 -0
- package/dist/utils/app-storage.js.map +1 -0
- package/dist/utils/crypto-util.d.ts +15 -0
- package/dist/utils/crypto-util.d.ts.map +1 -0
- package/dist/utils/crypto-util.js +76 -0
- package/dist/utils/crypto-util.js.map +1 -0
- package/dist/utils/event-util.d.ts +16 -0
- package/dist/utils/event-util.d.ts.map +1 -0
- package/dist/utils/event-util.js +51 -0
- package/dist/utils/event-util.js.map +1 -0
- package/dist/utils/file-util.d.ts +30 -0
- package/dist/utils/file-util.d.ts.map +1 -0
- package/dist/utils/file-util.js +165 -0
- package/dist/utils/file-util.js.map +1 -0
- package/dist/utils/lang-util.d.ts +12 -0
- package/dist/utils/lang-util.d.ts.map +1 -0
- package/dist/utils/lang-util.js +53 -0
- package/dist/utils/lang-util.js.map +1 -0
- package/dist/utils/language-util.d.ts +21 -0
- package/dist/utils/language-util.d.ts.map +1 -0
- package/dist/utils/language-util.js +96 -0
- package/dist/utils/language-util.js.map +1 -0
- package/dist/utils/leave-guard.d.ts +5 -0
- package/dist/utils/leave-guard.d.ts.map +1 -0
- package/dist/utils/leave-guard.js +24 -0
- package/dist/utils/leave-guard.js.map +1 -0
- package/dist/utils/lucide-icon.d.ts +10 -0
- package/dist/utils/lucide-icon.d.ts.map +1 -0
- package/dist/utils/lucide-icon.js +48 -0
- package/dist/utils/lucide-icon.js.map +1 -0
- package/dist/utils/menu-util.d.ts +33 -0
- package/dist/utils/menu-util.d.ts.map +1 -0
- package/dist/utils/menu-util.js +151 -0
- package/dist/utils/menu-util.js.map +1 -0
- package/dist/utils/option-util.d.ts +21 -0
- package/dist/utils/option-util.d.ts.map +1 -0
- package/dist/utils/option-util.js +101 -0
- package/dist/utils/option-util.js.map +1 -0
- package/dist/utils/session-id.d.ts +5 -0
- package/dist/utils/session-id.d.ts.map +1 -0
- package/dist/utils/session-id.js +44 -0
- package/dist/utils/session-id.js.map +1 -0
- package/dist/utils/shared-regexp.d.ts +31 -0
- package/dist/utils/shared-regexp.d.ts.map +1 -0
- package/dist/utils/shared-regexp.js +17 -0
- package/dist/utils/shared-regexp.js.map +1 -0
- package/dist/utils/storage-keys.d.ts +68 -0
- package/dist/utils/storage-keys.d.ts.map +1 -0
- package/dist/utils/storage-keys.js +75 -0
- package/dist/utils/storage-keys.js.map +1 -0
- package/package.json +101 -4
- package/src/components/app-brand.tsx +37 -0
- package/src/components/branch-switcher.tsx +74 -0
- package/src/components/coming-soon.tsx +35 -0
- package/src/components/empty-state.tsx +42 -0
- package/src/components/language-switcher.tsx +77 -0
- package/src/components/page-loader.tsx +11 -0
- package/src/components/page-not-found.tsx +42 -0
- package/src/components/permission-denied.tsx +21 -0
- package/src/components/require-access.tsx +30 -0
- package/src/components/scroll-to-top.tsx +62 -0
- package/src/components/settings-menu.tsx +224 -0
- package/src/components/theme-switcher.tsx +72 -0
- package/src/components/toast-container.tsx +73 -0
- package/src/components/top-progress.tsx +14 -0
- package/src/components/user-menu.tsx +179 -0
- package/src/context/ui-context.ts +20 -0
- package/src/context/use-ui.ts +42 -0
- package/src/i18n/default-messages.ts +67 -0
- package/src/i18n/direction.ts +43 -0
- package/src/i18n/locale-service.ts +187 -0
- package/src/i18n/translator.ts +88 -0
- package/src/index.ts +341 -0
- package/src/interfaces/app-types.ts +154 -0
- package/src/interfaces/toast.ts +12 -0
- package/src/interfaces/ui-config.ts +189 -0
- package/src/interfaces/ui-context.ts +43 -0
- package/src/layout.ts +29 -0
- package/src/layouts/app-layout.tsx +103 -0
- package/src/layouts/article-layout.tsx +16 -0
- package/src/layouts/aside-layout.tsx +118 -0
- package/src/layouts/auth-layout.tsx +41 -0
- package/src/layouts/content-layout.tsx +11 -0
- package/src/layouts/float-layout.tsx +11 -0
- package/src/layouts/grid-layout.tsx +11 -0
- package/src/layouts/head-layout.tsx +61 -0
- package/src/layouts/header.tsx +74 -0
- package/src/layouts/layout-constants.ts +5 -0
- package/src/layouts/mega-menu.tsx +203 -0
- package/src/layouts/navigation.ts +45 -0
- package/src/layouts/rail-flyout.tsx +77 -0
- package/src/layouts/rail-tooltip.tsx +77 -0
- package/src/layouts/sidebar.tsx +296 -0
- package/src/markdown.ts +12 -0
- package/src/providers/provider-effects.ts +30 -0
- package/src/providers/register-config.ts +30 -0
- package/src/providers/shared-web-ui-provider.tsx +98 -0
- package/src/providers/theme-provider.tsx +15 -0
- package/src/providers/translation-provider.tsx +28 -0
- package/src/query/page-link.tsx +84 -0
- package/src/query/page-path.ts +26 -0
- package/src/query/query-param.ts +263 -0
- package/src/query/use-query-param.ts +23 -0
- package/src/skeleton/skeleton-article.tsx +11 -0
- package/src/skeleton/skeleton-auth-form.tsx +20 -0
- package/src/skeleton/skeleton-cards.tsx +35 -0
- package/src/skeleton/skeleton-chat.tsx +34 -0
- package/src/skeleton/skeleton-dashboard.tsx +34 -0
- package/src/skeleton/skeleton-float.tsx +10 -0
- package/src/skeleton/skeleton-form.tsx +45 -0
- package/src/skeleton/skeleton-menu.tsx +30 -0
- package/src/skeleton/skeleton-page.tsx +18 -0
- package/src/skeleton/skeleton-table.tsx +25 -0
- package/src/state/auth-service.ts +104 -0
- package/src/state/branch-service.ts +217 -0
- package/src/state/document-sync.ts +43 -0
- package/src/state/language-service.ts +80 -0
- package/src/state/menu-service.ts +67 -0
- package/src/state/navigation-service.ts +160 -0
- package/src/state/preference-sync.ts +93 -0
- package/src/state/progress-service.ts +18 -0
- package/src/state/screen-access.ts +70 -0
- package/src/state/sidebar-service.ts +22 -0
- package/src/state/signals.ts +183 -0
- package/src/state/toast-service.ts +45 -0
- package/src/styles.css +15 -0
- package/src/theme/dark-themes.ts +20 -0
- package/src/theme/logo.ts +12 -0
- package/src/theme/theme-service.ts +82 -0
- package/src/types/class-names.ts +53 -0
- package/src/types/field-error.ts +19 -0
- package/src/types/field-props.ts +23 -0
- package/src/types/field-registry.ts +27 -0
- package/src/types/field-wrapper.tsx +42 -0
- package/src/types/lang-field.ts +71 -0
- package/src/types/markdown-color-mode.ts +13 -0
- package/src/types/media-service.ts +61 -0
- package/src/types/media-viewer.tsx +57 -0
- package/src/types/type.button.tsx +108 -0
- package/src/types/type.checkbox.tsx +49 -0
- package/src/types/type.confirm.tsx +50 -0
- package/src/types/type.date.tsx +97 -0
- package/src/types/type.drawer.tsx +86 -0
- package/src/types/type.dropdown.tsx +81 -0
- package/src/types/type.filter.tsx +64 -0
- package/src/types/type.icon.ts +53 -0
- package/src/types/type.image.tsx +115 -0
- package/src/types/type.input.tsx +57 -0
- package/src/types/type.lang-md.tsx +129 -0
- package/src/types/type.lang.tsx +156 -0
- package/src/types/type.list.tsx +97 -0
- package/src/types/type.mdv.tsx +35 -0
- package/src/types/type.mdx.tsx +54 -0
- package/src/types/type.modal.tsx +77 -0
- package/src/types/type.otp.tsx +82 -0
- package/src/types/type.search.tsx +87 -0
- package/src/types/type.select.tsx +87 -0
- package/src/types/type.switch.tsx +52 -0
- package/src/types/type.table.tsx +152 -0
- package/src/types/type.text-area.tsx +51 -0
- package/src/types/type.time.tsx +61 -0
- package/src/types/type.upload.tsx +294 -0
- package/src/types/type.video.tsx +119 -0
- package/src/types/upload-service.ts +229 -0
- package/src/utils/app-config.ts +21 -0
- package/src/utils/app-http.ts +255 -0
- package/src/utils/app-storage.ts +259 -0
- package/src/utils/crypto-util.ts +88 -0
- package/src/utils/event-util.ts +58 -0
- package/src/utils/file-util.ts +186 -0
- package/src/utils/lang-util.ts +60 -0
- package/src/utils/language-util.ts +107 -0
- package/src/utils/leave-guard.ts +26 -0
- package/src/utils/lucide-icon.ts +55 -0
- package/src/utils/menu-util.ts +165 -0
- package/src/utils/option-util.ts +108 -0
- package/src/utils/session-id.ts +48 -0
- package/src/utils/shared-regexp.ts +18 -0
- package/src/utils/storage-keys.ts +80 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// settings-menu.tsx
|
|
2
|
+
// One settings button that opens a dialog with the language list (from config.languages),
|
|
3
|
+
// the theme list (from config.themes) and the navigation style. The branches (when the app passes them)
|
|
4
|
+
// come first, titled with config.branchLabel.
|
|
5
|
+
// Used by the header when config.layout.headerSettings is "menu"; can also be placed anywhere.
|
|
6
|
+
// isInSidebar: a full-width "Settings" row for the sidebar (icon only on the collapsed rail, with a rail tooltip).
|
|
7
|
+
// In an AsideLayout the navigation style choice is hidden (no mega menu there).
|
|
8
|
+
|
|
9
|
+
import type { MouseEvent, ReactElement } from "react";
|
|
10
|
+
import { useUi } from "../context/use-ui.ts";
|
|
11
|
+
import { changeLanguage } from "../i18n/locale-service.ts";
|
|
12
|
+
import type { LanguageOption, NavigationMode, Theme } from "../interfaces/ui-config.ts";
|
|
13
|
+
import { changeNavigationMode } from "../state/navigation-service.ts";
|
|
14
|
+
import {
|
|
15
|
+
isAsideLayoutSignal,
|
|
16
|
+
isRailEverywhereSignal,
|
|
17
|
+
isSettingsOpenSignal,
|
|
18
|
+
isSidebarCollapsedSignal,
|
|
19
|
+
navigationModeSignal,
|
|
20
|
+
navigationSignal,
|
|
21
|
+
} from "../state/signals.ts";
|
|
22
|
+
import { changeTheme } from "../theme/theme-service.ts";
|
|
23
|
+
import { TypeIcon } from "../types/type.icon.ts";
|
|
24
|
+
import { TypeModal } from "../types/type.modal.tsx";
|
|
25
|
+
import { readDataValue } from "../utils/event-util.ts";
|
|
26
|
+
import { readLanguageLabel } from "./language-switcher.tsx";
|
|
27
|
+
import { DEFAULT_BRANCH_LABEL, readBranchName } from "./branch-switcher.tsx";
|
|
28
|
+
import type { BranchOption } from "../interfaces/app-types.ts";
|
|
29
|
+
import { branchesSignal, branchIdSignal, handleBranchSelect } from "../state/branch-service.ts";
|
|
30
|
+
|
|
31
|
+
export interface SettingsMenuProps {
|
|
32
|
+
/** Show the sidebar / mega menu choice. Default true. Never shown without menu items or in an AsideLayout. */
|
|
33
|
+
showNavigationMode?: boolean;
|
|
34
|
+
/** Sidebar look: full-width row with the label; icon only on the collapsed rail. Default false. */
|
|
35
|
+
isInSidebar?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function openSettings(): void {
|
|
39
|
+
isSettingsOpenSignal.value = true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function closeSettings(): void {
|
|
43
|
+
isSettingsOpenSignal.value = false;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Language buttons carry the code in data-value. */
|
|
47
|
+
export function handleSettingsLanguageSelect(event: MouseEvent<HTMLButtonElement>): void {
|
|
48
|
+
const languageCode = readDataValue(event);
|
|
49
|
+
void changeLanguage(languageCode);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Theme buttons carry the theme in data-value. */
|
|
53
|
+
export function handleSettingsThemeSelect(event: MouseEvent<HTMLButtonElement>): void {
|
|
54
|
+
const themeName = readDataValue(event);
|
|
55
|
+
changeTheme(themeName);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Navigation buttons carry "sidebar" or "megamenu" in data-value. */
|
|
59
|
+
export function handleSettingsNavigationSelect(event: MouseEvent<HTMLButtonElement>): void {
|
|
60
|
+
const mode = readDataValue(event) as NavigationMode;
|
|
61
|
+
changeNavigationMode(mode);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Builds one choice button. */
|
|
65
|
+
function buildChoice(
|
|
66
|
+
value: string,
|
|
67
|
+
label: string,
|
|
68
|
+
isActive: boolean,
|
|
69
|
+
onSelect: (event: MouseEvent<HTMLButtonElement>) => void,
|
|
70
|
+
isDisabled: boolean = false,
|
|
71
|
+
): ReactElement {
|
|
72
|
+
const className = isActive ? "btn btn-sm btn-primary" : "btn btn-sm btn-ghost border border-base-300";
|
|
73
|
+
return (
|
|
74
|
+
<button key={value} type="button" className={className} aria-pressed={isActive} disabled={isDisabled} data-value={value} onClick={onSelect}>
|
|
75
|
+
{label}
|
|
76
|
+
</button>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Builds the branch buttons (data-value = branch id). */
|
|
81
|
+
function buildBranchChoices(branches: BranchOption[], activeId: string): ReactElement[] {
|
|
82
|
+
const choices: ReactElement[] = [];
|
|
83
|
+
for (const branch of branches) {
|
|
84
|
+
const name = readBranchName(branch);
|
|
85
|
+
const isActive = branch.id === activeId;
|
|
86
|
+
const choice = buildChoice(branch.id, name, isActive, handleBranchSelect, branch.isDisabled);
|
|
87
|
+
choices.push(choice);
|
|
88
|
+
}
|
|
89
|
+
return choices;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Builds the language buttons. */
|
|
93
|
+
function buildLanguageChoices(languages: LanguageOption[], activeCode: string): ReactElement[] {
|
|
94
|
+
const choices: ReactElement[] = [];
|
|
95
|
+
for (const language of languages) {
|
|
96
|
+
const label = readLanguageLabel(language);
|
|
97
|
+
const isActive = language.code === activeCode;
|
|
98
|
+
const choice = buildChoice(language.code, label, isActive, handleSettingsLanguageSelect);
|
|
99
|
+
choices.push(choice);
|
|
100
|
+
}
|
|
101
|
+
return choices;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Builds the theme buttons, each with the theme's primary / secondary / accent colours. */
|
|
105
|
+
function buildThemeChoices(themes: Theme[], activeTheme: Theme): ReactElement[] {
|
|
106
|
+
const choices: ReactElement[] = [];
|
|
107
|
+
for (const themeName of themes) {
|
|
108
|
+
const isActive = themeName === activeTheme;
|
|
109
|
+
const className = isActive ? "btn btn-sm btn-primary gap-2" : "btn btn-sm btn-ghost gap-2 border border-base-300";
|
|
110
|
+
const choice = (
|
|
111
|
+
<button
|
|
112
|
+
key={themeName}
|
|
113
|
+
type="button"
|
|
114
|
+
className={className}
|
|
115
|
+
aria-pressed={isActive}
|
|
116
|
+
data-value={themeName}
|
|
117
|
+
onClick={handleSettingsThemeSelect}
|
|
118
|
+
>
|
|
119
|
+
<span data-theme={themeName} className="flex gap-0.5 rounded bg-base-100 p-1" aria-hidden="true">
|
|
120
|
+
<span className="size-2 rounded-full bg-primary" />
|
|
121
|
+
<span className="size-2 rounded-full bg-secondary" />
|
|
122
|
+
<span className="size-2 rounded-full bg-accent" />
|
|
123
|
+
</span>
|
|
124
|
+
{themeName}
|
|
125
|
+
</button>
|
|
126
|
+
);
|
|
127
|
+
choices.push(choice);
|
|
128
|
+
}
|
|
129
|
+
return choices;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SettingsMenu(props: SettingsMenuProps) {
|
|
133
|
+
const { isInSidebar = false } = props;
|
|
134
|
+
const { t, config, languages, lightThemes, darkThemes, locale, theme } = useUi();
|
|
135
|
+
const branches = branchesSignal.value;
|
|
136
|
+
const hasBranches = branches.length > 0;
|
|
137
|
+
const branchLabelKey = config.branchLabel ?? DEFAULT_BRANCH_LABEL;
|
|
138
|
+
const branchTitle = t(branchLabelKey);
|
|
139
|
+
const branchChoices = buildBranchChoices(branches, branchIdSignal.value);
|
|
140
|
+
const isAsideLayout = isAsideLayoutSignal.value;
|
|
141
|
+
// No menu (nav null / [] and no config.navigation): there is nothing to show as sidebar or mega menu.
|
|
142
|
+
const hasMenu = navigationSignal.value.length > 0;
|
|
143
|
+
const isNavigationModeAllowed = hasMenu && !isAsideLayout;
|
|
144
|
+
const showNavigationMode = isNavigationModeAllowed && (props.showNavigationMode ?? true);
|
|
145
|
+
const hasLanguages = languages.length > 0;
|
|
146
|
+
const isCollapsed = isSidebarCollapsedSignal.value || isRailEverywhereSignal.value;
|
|
147
|
+
const showLabel = isInSidebar && !isCollapsed;
|
|
148
|
+
const isOpen = isSettingsOpenSignal.value;
|
|
149
|
+
const navigationMode = navigationModeSignal.value;
|
|
150
|
+
const settingsText = t("ui.settings");
|
|
151
|
+
const languageChoices = buildLanguageChoices(languages, locale);
|
|
152
|
+
const lightThemeChoices = buildThemeChoices(lightThemes, theme);
|
|
153
|
+
const darkThemeChoices = buildThemeChoices(darkThemes, theme);
|
|
154
|
+
const lightTitle = t("ui.lightThemes");
|
|
155
|
+
const darkTitle = t("ui.darkThemes");
|
|
156
|
+
const sidebarText = t("ui.sidebar");
|
|
157
|
+
const megaMenuText = t("ui.megaMenu");
|
|
158
|
+
const sidebarChoice = buildChoice("sidebar", sidebarText, navigationMode === "sidebar", handleSettingsNavigationSelect);
|
|
159
|
+
const megaMenuChoice = buildChoice("megamenu", megaMenuText, navigationMode === "megamenu", handleSettingsNavigationSelect);
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
<>
|
|
163
|
+
{isInSidebar ? (
|
|
164
|
+
<div data-rail-tip={isCollapsed ? settingsText : undefined}>
|
|
165
|
+
<button
|
|
166
|
+
type="button"
|
|
167
|
+
className={isCollapsed ? "btn btn-ghost w-full justify-center px-0" : "btn btn-ghost w-full justify-start gap-3"}
|
|
168
|
+
aria-label={settingsText}
|
|
169
|
+
onClick={openSettings}
|
|
170
|
+
>
|
|
171
|
+
<TypeIcon name="Settings" size={18} />
|
|
172
|
+
{showLabel ? <span className="font-normal">{settingsText}</span> : null}
|
|
173
|
+
</button>
|
|
174
|
+
</div>
|
|
175
|
+
) : (
|
|
176
|
+
<button type="button" className="btn btn-ghost btn-sm btn-square" aria-label={settingsText} title={settingsText} onClick={openSettings}>
|
|
177
|
+
<TypeIcon name="Settings" size={18} />
|
|
178
|
+
</button>
|
|
179
|
+
)}
|
|
180
|
+
<TypeModal isOpen={isOpen} title={settingsText} onClose={closeSettings}>
|
|
181
|
+
<div className="flex flex-col gap-5">
|
|
182
|
+
{hasBranches ? (
|
|
183
|
+
<section>
|
|
184
|
+
<h4 className="mb-2 text-sm font-semibold opacity-70">{branchTitle}</h4>
|
|
185
|
+
<div className="flex flex-wrap gap-2">{branchChoices}</div>
|
|
186
|
+
</section>
|
|
187
|
+
) : null}
|
|
188
|
+
{hasLanguages ? (
|
|
189
|
+
<section>
|
|
190
|
+
<h4 className="mb-2 text-sm font-semibold opacity-70">{t("ui.language")}</h4>
|
|
191
|
+
<div className="flex flex-wrap gap-2">{languageChoices}</div>
|
|
192
|
+
</section>
|
|
193
|
+
) : null}
|
|
194
|
+
<section>
|
|
195
|
+
<h4 className="mb-2 text-sm font-semibold opacity-70">{t("ui.theme")}</h4>
|
|
196
|
+
<div className="max-h-64 space-y-3 overflow-y-auto">
|
|
197
|
+
{lightThemeChoices.length > 0 ? (
|
|
198
|
+
<div>
|
|
199
|
+
<h5 className="mb-1 text-xs font-medium opacity-60">{lightTitle}</h5>
|
|
200
|
+
<div className="flex flex-wrap gap-2 capitalize">{lightThemeChoices}</div>
|
|
201
|
+
</div>
|
|
202
|
+
) : null}
|
|
203
|
+
{darkThemeChoices.length > 0 ? (
|
|
204
|
+
<div>
|
|
205
|
+
<h5 className="mb-1 text-xs font-medium opacity-60">{darkTitle}</h5>
|
|
206
|
+
<div className="flex flex-wrap gap-2 capitalize">{darkThemeChoices}</div>
|
|
207
|
+
</div>
|
|
208
|
+
) : null}
|
|
209
|
+
</div>
|
|
210
|
+
</section>
|
|
211
|
+
{showNavigationMode ? (
|
|
212
|
+
<section>
|
|
213
|
+
<h4 className="mb-2 text-sm font-semibold opacity-70">{t("ui.navigationMode")}</h4>
|
|
214
|
+
<div className="flex flex-wrap gap-2">
|
|
215
|
+
{sidebarChoice}
|
|
216
|
+
{megaMenuChoice}
|
|
217
|
+
</div>
|
|
218
|
+
</section>
|
|
219
|
+
) : null}
|
|
220
|
+
</div>
|
|
221
|
+
</TypeModal>
|
|
222
|
+
</>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// theme-switcher.tsx
|
|
2
|
+
// Dropdown that lists the DaisyUI themes from config.themes (light and dark ones in two groups) and switches the theme.
|
|
3
|
+
|
|
4
|
+
import type { MouseEvent, ReactElement } from "react";
|
|
5
|
+
import { useUi } from "../context/use-ui.ts";
|
|
6
|
+
import type { Theme } from "../interfaces/ui-config.ts";
|
|
7
|
+
import { changeTheme } from "../theme/theme-service.ts";
|
|
8
|
+
import { TypeIcon } from "../types/type.icon.ts";
|
|
9
|
+
|
|
10
|
+
/** Switches to the theme stored in the button's data-theme-name attribute. */
|
|
11
|
+
export function handleThemeButtonClick(event: MouseEvent<HTMLButtonElement>): void {
|
|
12
|
+
const button = event.currentTarget;
|
|
13
|
+
const themeName = button.dataset.themeName;
|
|
14
|
+
if (!themeName) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
changeTheme(themeName);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Builds one menu entry per theme, each with a small colour preview. */
|
|
21
|
+
function buildThemeItems(themes: Theme[], activeTheme: Theme): ReactElement[] {
|
|
22
|
+
const items: ReactElement[] = [];
|
|
23
|
+
for (const themeName of themes) {
|
|
24
|
+
const isActive = themeName === activeTheme;
|
|
25
|
+
const item = (
|
|
26
|
+
<li key={themeName}>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
className={isActive ? "menu-active capitalize" : "capitalize"}
|
|
30
|
+
aria-current={isActive}
|
|
31
|
+
data-theme-name={themeName}
|
|
32
|
+
onClick={handleThemeButtonClick}
|
|
33
|
+
>
|
|
34
|
+
<span data-theme={themeName} className="flex gap-0.5 rounded bg-base-100 p-1" aria-hidden="true">
|
|
35
|
+
<span className="size-2 rounded-full bg-primary" />
|
|
36
|
+
<span className="size-2 rounded-full bg-secondary" />
|
|
37
|
+
<span className="size-2 rounded-full bg-accent" />
|
|
38
|
+
</span>
|
|
39
|
+
{themeName}
|
|
40
|
+
</button>
|
|
41
|
+
</li>
|
|
42
|
+
);
|
|
43
|
+
items.push(item);
|
|
44
|
+
}
|
|
45
|
+
return items;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ThemeSwitcher() {
|
|
49
|
+
const { lightThemes, darkThemes, theme, t } = useUi();
|
|
50
|
+
const themeText = t("ui.theme");
|
|
51
|
+
const lightItems = buildThemeItems(lightThemes, theme);
|
|
52
|
+
const darkItems = buildThemeItems(darkThemes, theme);
|
|
53
|
+
const lightTitle = t("ui.lightThemes");
|
|
54
|
+
const darkTitle = t("ui.darkThemes");
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div className="dropdown dropdown-end">
|
|
58
|
+
<div tabIndex={0} role="button" className="btn btn-ghost btn-sm" aria-label={themeText}>
|
|
59
|
+
<TypeIcon name="Palette" size={16} />
|
|
60
|
+
</div>
|
|
61
|
+
<ul
|
|
62
|
+
tabIndex={0}
|
|
63
|
+
className="dropdown-content menu bg-base-100 rounded-box z-40 mt-2 max-h-80 w-52 flex-nowrap overflow-y-auto p-2 shadow-lg"
|
|
64
|
+
>
|
|
65
|
+
{lightItems.length > 0 ? <li className="menu-title">{lightTitle}</li> : null}
|
|
66
|
+
{lightItems}
|
|
67
|
+
{darkItems.length > 0 ? <li className="menu-title">{darkTitle}</li> : null}
|
|
68
|
+
{darkItems}
|
|
69
|
+
</ul>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// toast-container.tsx
|
|
2
|
+
// Shows the messages from ShowToast(). Rendered once by SharedWebUiProvider.
|
|
3
|
+
|
|
4
|
+
import type { MouseEvent, ReactElement } from "react";
|
|
5
|
+
import { useUi } from "../context/use-ui.ts";
|
|
6
|
+
import type { ToastItem, ToastType } from "../interfaces/toast.ts";
|
|
7
|
+
import type { ToastPosition } from "../interfaces/ui-config.ts";
|
|
8
|
+
import { toastsSignal } from "../state/signals.ts";
|
|
9
|
+
import { removeToast } from "../state/toast-service.ts";
|
|
10
|
+
import { TypeIcon } from "../types/type.icon.ts";
|
|
11
|
+
|
|
12
|
+
const TOAST_TYPE_CLASSES: Record<ToastType, string> = {
|
|
13
|
+
info: "alert alert-info",
|
|
14
|
+
success: "alert alert-success",
|
|
15
|
+
warning: "alert alert-warning",
|
|
16
|
+
error: "alert alert-error",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const TOAST_POSITION_CLASSES: Record<ToastPosition, string> = {
|
|
20
|
+
"top-start": "toast toast-top toast-start",
|
|
21
|
+
"top-center": "toast toast-top toast-center",
|
|
22
|
+
"top-end": "toast toast-top toast-end",
|
|
23
|
+
"bottom-start": "toast toast-bottom toast-start",
|
|
24
|
+
"bottom-center": "toast toast-bottom toast-center",
|
|
25
|
+
"bottom-end": "toast toast-bottom toast-end",
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** Closes the toast whose id is in the button's data-toast-id attribute. */
|
|
29
|
+
export function handleToastCloseClick(event: MouseEvent<HTMLButtonElement>): void {
|
|
30
|
+
const button = event.currentTarget;
|
|
31
|
+
const toastId = button.dataset.toastId;
|
|
32
|
+
if (toastId) {
|
|
33
|
+
removeToast(toastId);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Builds one alert per toast. */
|
|
38
|
+
function buildToastElements(toasts: ToastItem[], closeText: string): ReactElement[] {
|
|
39
|
+
const toastElements: ReactElement[] = [];
|
|
40
|
+
for (const toast of toasts) {
|
|
41
|
+
const toastClassName = TOAST_TYPE_CLASSES[toast.type];
|
|
42
|
+
const toastRole = toast.type === "error" ? "alert" : "status";
|
|
43
|
+
const toastElement = (
|
|
44
|
+
<div key={toast.id} role={toastRole} className={toastClassName}>
|
|
45
|
+
<span>{toast.message}</span>
|
|
46
|
+
<button
|
|
47
|
+
type="button"
|
|
48
|
+
className="btn btn-ghost btn-xs btn-circle"
|
|
49
|
+
aria-label={closeText}
|
|
50
|
+
data-toast-id={toast.id}
|
|
51
|
+
onClick={handleToastCloseClick}
|
|
52
|
+
>
|
|
53
|
+
<TypeIcon name="X" size={14} />
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
toastElements.push(toastElement);
|
|
58
|
+
}
|
|
59
|
+
return toastElements;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ToastContainer() {
|
|
63
|
+
const { t, config } = useUi();
|
|
64
|
+
const toasts = toastsSignal.value;
|
|
65
|
+
if (toasts.length === 0) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const closeText = t("ui.close");
|
|
69
|
+
const toastElements = buildToastElements(toasts, closeText);
|
|
70
|
+
const position = config.layout?.toastPosition ?? "top-end";
|
|
71
|
+
const positionClass = TOAST_POSITION_CLASSES[position];
|
|
72
|
+
return <div className={`${positionClass} z-[70]`}>{toastElements}</div>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// top-progress.tsx
|
|
2
|
+
// Thin DaisyUI progress bar fixed at the top while ShowProgress(true) is active. Rendered by SharedWebUiProvider.
|
|
3
|
+
|
|
4
|
+
import { useSignals } from "@preact/signals-react/runtime";
|
|
5
|
+
import { progressSignal } from "../state/signals.ts";
|
|
6
|
+
|
|
7
|
+
export function TopProgress() {
|
|
8
|
+
useSignals();
|
|
9
|
+
const isRunning = progressSignal.value;
|
|
10
|
+
if (!isRunning) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return <progress className="progress progress-primary fixed inset-x-0 top-0 z-[60] h-1 rounded-none" aria-label="Loading" />;
|
|
14
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// user-menu.tsx
|
|
2
|
+
// Avatar dropdown with the user name, menu items and log out.
|
|
3
|
+
// - In the header (default): a round avatar, the menu opens below.
|
|
4
|
+
// - In the sidebar (isInSidebar): avatar + name + email over the full width, the menu opens above;
|
|
5
|
+
// on the collapsed rail only the avatar, the menu opens next to the rail.
|
|
6
|
+
//
|
|
7
|
+
// <UserMenu name="Asha Rao" email="asha@example.com" items={userMenuItems} onLogout={handleLogout} />
|
|
8
|
+
// <AppLayout sidebarUser={<UserMenu isInSidebar ... />}> // at the bottom of the side menu
|
|
9
|
+
|
|
10
|
+
import type { MouseEventHandler, ReactElement } from "react";
|
|
11
|
+
import { useUi } from "../context/use-ui.ts";
|
|
12
|
+
import { PageLink } from "../query/page-link.tsx";
|
|
13
|
+
import { isRailEverywhereSignal, isSidebarCollapsedSignal } from "../state/signals.ts";
|
|
14
|
+
import { TypeIcon, type IconName } from "../types/type.icon.ts";
|
|
15
|
+
|
|
16
|
+
export interface UserMenuItem {
|
|
17
|
+
id: string;
|
|
18
|
+
/** Translation key (or text). */
|
|
19
|
+
labelKey: string;
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
/** Route to open. */
|
|
22
|
+
path?: string;
|
|
23
|
+
/** Click handler (used when there is no path). */
|
|
24
|
+
onPress?: MouseEventHandler<HTMLButtonElement>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface UserMenuProps {
|
|
28
|
+
name: string;
|
|
29
|
+
email?: string;
|
|
30
|
+
avatarUrl?: string;
|
|
31
|
+
items?: UserMenuItem[];
|
|
32
|
+
/** Shows a "Log out" entry when set. */
|
|
33
|
+
onLogout?: MouseEventHandler<HTMLButtonElement>;
|
|
34
|
+
/** Sidebar look: full-width row with name and email, menu opens above (next to the rail when collapsed). Default false. */
|
|
35
|
+
isInSidebar?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface UserAvatarProps {
|
|
39
|
+
name: string;
|
|
40
|
+
avatarUrl?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Round picture, or the initials when there is no picture. */
|
|
44
|
+
function UserAvatar(props: UserAvatarProps) {
|
|
45
|
+
const { name, avatarUrl } = props;
|
|
46
|
+
const initials = readInitials(name);
|
|
47
|
+
if (avatarUrl) {
|
|
48
|
+
return (
|
|
49
|
+
<div className="w-9 shrink-0 rounded-full">
|
|
50
|
+
<img src={avatarUrl} alt="" />
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return (
|
|
55
|
+
<div className="flex size-9 shrink-0 items-center justify-center rounded-full bg-primary text-sm font-bold text-primary-content">
|
|
56
|
+
{initials}
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Dropdown and menu classes for the header, the open sidebar and the collapsed rail. */
|
|
62
|
+
interface UserMenuClasses {
|
|
63
|
+
dropdown: string;
|
|
64
|
+
trigger: string;
|
|
65
|
+
menu: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function readUserMenuClasses(isInSidebar: boolean, isCollapsed: boolean, isRailEverywhere: boolean): UserMenuClasses {
|
|
69
|
+
if (!isInSidebar) {
|
|
70
|
+
return {
|
|
71
|
+
dropdown: "dropdown dropdown-end",
|
|
72
|
+
trigger: "btn btn-ghost btn-circle avatar",
|
|
73
|
+
menu: "dropdown-content menu z-50 mt-2 w-60 rounded-box bg-base-100 p-2 shadow-lg",
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (isRailEverywhere) {
|
|
77
|
+
// AsideLayout rail (every screen size): the menu is always fixed next to the rail.
|
|
78
|
+
return {
|
|
79
|
+
dropdown: "dropdown dropdown-top w-full",
|
|
80
|
+
trigger: "btn btn-ghost h-auto w-full justify-center px-0 py-1",
|
|
81
|
+
menu: "dropdown-content menu fixed start-22 bottom-3 z-50 w-60 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (isCollapsed) {
|
|
85
|
+
// The sidebar scrolls (overflow), so on the narrow rail the menu is fixed next to it instead of inside it
|
|
86
|
+
// (Sidebar sets lg:translate-none lg:will-change-auto so "fixed" is relative to the window, not the drawer).
|
|
87
|
+
return {
|
|
88
|
+
dropdown: "dropdown dropdown-top w-full",
|
|
89
|
+
trigger: "btn btn-ghost h-auto w-full justify-center px-0 py-1 lg:justify-center",
|
|
90
|
+
menu: "dropdown-content menu z-50 mb-2 w-60 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg lg:fixed lg:bottom-3 lg:start-22 lg:mb-0",
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
dropdown: "dropdown dropdown-top w-full",
|
|
95
|
+
trigger: "btn btn-ghost h-auto w-full flex-nowrap justify-start gap-3 px-2 py-1 text-start font-normal",
|
|
96
|
+
menu: "dropdown-content menu z-50 mb-2 w-full rounded-box border border-base-300 bg-base-100 p-2 shadow-lg",
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** First letters of the first two words: "Asha Rao" -> "AR". */
|
|
101
|
+
export function readInitials(name: string): string {
|
|
102
|
+
const words = name.split(" ");
|
|
103
|
+
let initials = "";
|
|
104
|
+
for (const word of words) {
|
|
105
|
+
if (initials.length >= 2) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
const firstLetter = word.charAt(0);
|
|
109
|
+
initials += firstLetter;
|
|
110
|
+
}
|
|
111
|
+
return initials.toUpperCase();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Builds one menu entry per item. */
|
|
115
|
+
function buildUserMenuItems(items: UserMenuItem[], t: (key: string) => string): ReactElement[] {
|
|
116
|
+
const elements: ReactElement[] = [];
|
|
117
|
+
for (const item of items) {
|
|
118
|
+
const label = t(item.labelKey);
|
|
119
|
+
const iconElement = item.icon ? <TypeIcon name={item.icon} size={16} /> : null;
|
|
120
|
+
const content = item.path ? (
|
|
121
|
+
<PageLink page={item.path}>
|
|
122
|
+
{iconElement}
|
|
123
|
+
{label}
|
|
124
|
+
</PageLink>
|
|
125
|
+
) : (
|
|
126
|
+
<button type="button" onClick={item.onPress}>
|
|
127
|
+
{iconElement}
|
|
128
|
+
{label}
|
|
129
|
+
</button>
|
|
130
|
+
);
|
|
131
|
+
const element = <li key={item.id}>{content}</li>;
|
|
132
|
+
elements.push(element);
|
|
133
|
+
}
|
|
134
|
+
return elements;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function UserMenu(props: UserMenuProps) {
|
|
138
|
+
const { name, email, avatarUrl, items = [], onLogout, isInSidebar = false } = props;
|
|
139
|
+
const { t } = useUi();
|
|
140
|
+
const isRailEverywhere = isRailEverywhereSignal.value;
|
|
141
|
+
const isCollapsed = isSidebarCollapsedSignal.value || isRailEverywhere;
|
|
142
|
+
const classes = readUserMenuClasses(isInSidebar, isCollapsed, isRailEverywhere);
|
|
143
|
+
const showDetails = isInSidebar && !isCollapsed;
|
|
144
|
+
// On the collapsed rail the name shows as a tooltip (RailTooltip reads data-rail-tip).
|
|
145
|
+
const railTip = isInSidebar && isCollapsed ? name : undefined;
|
|
146
|
+
const itemElements = buildUserMenuItems(items, t);
|
|
147
|
+
const logoutText = t("ui.logout");
|
|
148
|
+
const accountText = t("ui.account");
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<div className={classes.dropdown} data-rail-tip={railTip}>
|
|
152
|
+
<div tabIndex={0} role="button" className={classes.trigger} aria-label={accountText}>
|
|
153
|
+
<UserAvatar name={name} avatarUrl={avatarUrl} />
|
|
154
|
+
{showDetails ? (
|
|
155
|
+
<span className="flex min-w-0 flex-1 flex-col">
|
|
156
|
+
<span className="truncate text-sm font-semibold">{name}</span>
|
|
157
|
+
{email ? <span className="truncate text-xs opacity-60">{email}</span> : null}
|
|
158
|
+
</span>
|
|
159
|
+
) : null}
|
|
160
|
+
{showDetails ? <TypeIcon name="ChevronsUpDown" size={16} className="shrink-0 opacity-60" /> : null}
|
|
161
|
+
</div>
|
|
162
|
+
<ul tabIndex={0} className={classes.menu}>
|
|
163
|
+
<li className="menu-title">
|
|
164
|
+
<span className="truncate text-base-content">{name}</span>
|
|
165
|
+
{email ? <span className="truncate text-xs font-normal opacity-60">{email}</span> : null}
|
|
166
|
+
</li>
|
|
167
|
+
{itemElements}
|
|
168
|
+
{onLogout ? (
|
|
169
|
+
<li>
|
|
170
|
+
<button type="button" className="text-error" onClick={onLogout}>
|
|
171
|
+
<TypeIcon name="LogOut" size={16} />
|
|
172
|
+
{logoutText}
|
|
173
|
+
</button>
|
|
174
|
+
</li>
|
|
175
|
+
) : null}
|
|
176
|
+
</ul>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ui-context.ts
|
|
2
|
+
// The React context that carries the config. Live values (locale, theme ...) come from signals.
|
|
3
|
+
|
|
4
|
+
import { createContext } from "react";
|
|
5
|
+
import type { UiContextState } from "../interfaces/ui-context.ts";
|
|
6
|
+
|
|
7
|
+
export const UiContext = createContext<UiContextState | null>(null);
|
|
8
|
+
|
|
9
|
+
const contextStateCache = new WeakMap<object, UiContextState>();
|
|
10
|
+
|
|
11
|
+
/** Returns one stable context object per config, so consumers do not re-render needlessly. */
|
|
12
|
+
export function readContextState(config: UiContextState["config"]): UiContextState {
|
|
13
|
+
const cachedState = contextStateCache.get(config);
|
|
14
|
+
if (cachedState) {
|
|
15
|
+
return cachedState;
|
|
16
|
+
}
|
|
17
|
+
const newState: UiContextState = { config: config };
|
|
18
|
+
contextStateCache.set(config, newState);
|
|
19
|
+
return newState;
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// use-ui.ts
|
|
2
|
+
// The one hook every page and component uses.
|
|
3
|
+
//
|
|
4
|
+
// const { locale, theme, direction, t, changeLanguage, changeTheme } = useUi();
|
|
5
|
+
//
|
|
6
|
+
// It subscribes the component to the signals, so it re-renders when the language or theme changes.
|
|
7
|
+
|
|
8
|
+
import { useSignals } from "@preact/signals-react/runtime";
|
|
9
|
+
import { useContext } from "react";
|
|
10
|
+
import { changeLanguage } from "../i18n/locale-service.ts";
|
|
11
|
+
import { translate } from "../i18n/translator.ts";
|
|
12
|
+
import type { UiContextValue } from "../interfaces/ui-context.ts";
|
|
13
|
+
import { directionSignal, isTranslationReadySignal, languagesSignal, localeSignal, themeSignal } from "../state/signals.ts";
|
|
14
|
+
import { changeTheme, splitThemesByMode } from "../theme/theme-service.ts";
|
|
15
|
+
import { UiContext } from "./ui-context.ts";
|
|
16
|
+
|
|
17
|
+
const USE_UI_OUTSIDE_PROVIDER = "shared-lib-web: useUi() must be used inside <SharedWebUiProvider config={config}>.";
|
|
18
|
+
|
|
19
|
+
export function useUi(): UiContextValue {
|
|
20
|
+
useSignals();
|
|
21
|
+
const contextState = useContext(UiContext);
|
|
22
|
+
if (!contextState) {
|
|
23
|
+
throw new Error(USE_UI_OUTSIDE_PROVIDER);
|
|
24
|
+
}
|
|
25
|
+
const config = contextState.config;
|
|
26
|
+
const themeGroups = splitThemesByMode(config.themes);
|
|
27
|
+
const uiValue: UiContextValue = {
|
|
28
|
+
config: config,
|
|
29
|
+
locale: localeSignal.value,
|
|
30
|
+
theme: themeSignal.value,
|
|
31
|
+
direction: directionSignal.value,
|
|
32
|
+
isReady: isTranslationReadySignal.value,
|
|
33
|
+
languages: languagesSignal.value,
|
|
34
|
+
themes: config.themes,
|
|
35
|
+
lightThemes: themeGroups.lightThemes,
|
|
36
|
+
darkThemes: themeGroups.darkThemes,
|
|
37
|
+
t: translate,
|
|
38
|
+
changeLanguage: changeLanguage,
|
|
39
|
+
changeTheme: changeTheme,
|
|
40
|
+
};
|
|
41
|
+
return uiValue;
|
|
42
|
+
}
|