@liorian/sdk 0.28.0-alpha.56010ca
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 +483 -0
- package/package.json +94 -0
- package/schemas/module.schema.json +818 -0
- package/src/application/index.ts +3 -0
- package/src/application/module-instance.ts +36 -0
- package/src/application/service/auth-api-service.ts +291 -0
- package/src/application/service/auth-user.service.ts +108 -0
- package/src/application/service/index.ts +12 -0
- package/src/application/service/module-activation-api.service.ts +105 -0
- package/src/application/service/notifications-api-service.ts +38 -0
- package/src/application/service/notifications-push.service.ts +299 -0
- package/src/application/service/notifications-socket-service.ts +76 -0
- package/src/application/service/organizations-api-service.ts +104 -0
- package/src/application/service/otp-api-service.ts +11 -0
- package/src/application/service/storage-api-service.ts +77 -0
- package/src/application/service/storefront-api.service.ts +72 -0
- package/src/application/service/user-preferences-api.service.ts +57 -0
- package/src/domain/config/app.config.ts +35 -0
- package/src/domain/config/auth.config.ts +30 -0
- package/src/domain/config/index.ts +4 -0
- package/src/domain/config/logo.config.ts +17 -0
- package/src/domain/entities/activities.interface.ts +18 -0
- package/src/domain/entities/catalog.interface.ts +96 -0
- package/src/domain/entities/index.ts +13 -0
- package/src/domain/entities/media.ts +22 -0
- package/src/domain/entities/module-activation.interface.ts +173 -0
- package/src/domain/entities/module.interface.ts +101 -0
- package/src/domain/entities/notification.interface.ts +23 -0
- package/src/domain/entities/objectable.type.ts +3 -0
- package/src/domain/entities/organization.interface.ts +81 -0
- package/src/domain/entities/user-auth.interface.ts +17 -0
- package/src/domain/entities/user-phone.interface.ts +11 -0
- package/src/domain/entities/user-profile.interface.ts +23 -0
- package/src/domain/entities/user.interface.ts +79 -0
- package/src/domain/enums/coloring.enum.ts +6 -0
- package/src/domain/enums/domains.enum.ts +282 -0
- package/src/domain/enums/index.ts +8 -0
- package/src/domain/enums/module-category.enum.ts +57 -0
- package/src/domain/enums/module.enum.ts +97 -0
- package/src/domain/enums/routine.enum.ts +12 -0
- package/src/domain/enums/user-profile.enum.ts +25 -0
- package/src/domain/enums/user-status.enum.ts +7 -0
- package/src/domain/index.ts +6 -0
- package/src/domain/typing/auth-caches.ts +12 -0
- package/src/domain/typing/auth-oauth.types.ts +172 -0
- package/src/domain/typing/devise.ts +2 -0
- package/src/domain/typing/index.ts +10 -0
- package/src/domain/typing/response.ts +30 -0
- package/src/domain/typing/routine.types.ts +113 -0
- package/src/domain/typing/session.interface.ts +28 -0
- package/src/domain/typing/statisticals.ts +11 -0
- package/src/domain/typing/user-media-upload.ts +9 -0
- package/src/domain/typing/values.ts +6 -0
- package/src/index.tsx +168 -0
- package/src/infrastructure/capabilities/cache-storage/capability.ts +129 -0
- package/src/infrastructure/capabilities/cache-storage/enum.ts +5 -0
- package/src/infrastructure/capabilities/cache-storage/index.ts +4 -0
- package/src/infrastructure/capabilities/cache-storage/types.ts +13 -0
- package/src/infrastructure/capabilities/index.ts +3 -0
- package/src/infrastructure/capabilities/stackable/capability.ts +55 -0
- package/src/infrastructure/capabilities/stackable/index.ts +3 -0
- package/src/infrastructure/capabilities/stackable/types.ts +24 -0
- package/src/infrastructure/common-classname.constant.ts +4 -0
- package/src/infrastructure/data/countries.ts +208 -0
- package/src/infrastructure/data/gender.ts +5 -0
- package/src/infrastructure/data/index.ts +3 -0
- package/src/infrastructure/dataset/index.ts +3 -0
- package/src/infrastructure/dataset/sign-in.dataset.ts +21 -0
- package/src/infrastructure/dataset/sign-up.dataset.ts +64 -0
- package/src/infrastructure/hooks/index.ts +10 -0
- package/src/infrastructure/hooks/use-activity-lock-draft.ts +69 -0
- package/src/infrastructure/hooks/use-auth.ts +24 -0
- package/src/infrastructure/hooks/use-elastic-interaction.ts +180 -0
- package/src/infrastructure/hooks/use-is-desktop.ts +25 -0
- package/src/infrastructure/hooks/use-is-tauri.ts +17 -0
- package/src/infrastructure/hooks/use-mobile.ts +19 -0
- package/src/infrastructure/hooks/use-notifications.ts +128 -0
- package/src/infrastructure/hooks/use-recent-colors.ts +113 -0
- package/src/infrastructure/hooks/use-recent-modules.ts +76 -0
- package/src/infrastructure/index.tsx +11 -0
- package/src/infrastructure/library/design-system.ts +95 -0
- package/src/infrastructure/library/index.tsx +5 -0
- package/src/infrastructure/library/motion-utils.ts +77 -0
- package/src/infrastructure/library/motion.tsx +31 -0
- package/src/infrastructure/library/scroll-progress.tsx +93 -0
- package/src/infrastructure/providers/auth-guard.provider.tsx +47 -0
- package/src/infrastructure/providers/auth.provider.tsx +168 -0
- package/src/infrastructure/providers/index.tsx +8 -0
- package/src/infrastructure/providers/module-usage.provider.tsx +95 -0
- package/src/infrastructure/providers/modules-guard.provider.tsx +64 -0
- package/src/infrastructure/providers/modules-routines.provider.tsx +33 -0
- package/src/infrastructure/providers/modules-switcher.provider.tsx +25 -0
- package/src/infrastructure/providers/query.provider.tsx +27 -0
- package/src/infrastructure/routines/__tests__/routine.test.ts +368 -0
- package/src/infrastructure/routines/index.tsx +3 -0
- package/src/infrastructure/routines/routine.hook.ts +121 -0
- package/src/infrastructure/routines/routine.ts +283 -0
- package/src/infrastructure/routines/routine.tsx +283 -0
- package/src/infrastructure/stores/activity-lock.store.ts +22 -0
- package/src/infrastructure/stores/auth-user-connected.store.ts +24 -0
- package/src/infrastructure/stores/dataset.store.ts +106 -0
- package/src/infrastructure/stores/index.ts +6 -0
- package/src/infrastructure/stores/module.store.ts +266 -0
- package/src/infrastructure/stores/upload.store.ts +198 -0
- package/src/infrastructure/utilities/access-label.util.ts +158 -0
- package/src/infrastructure/utilities/activities.util.tsx +54 -0
- package/src/infrastructure/utilities/activity-lock.service.ts +263 -0
- package/src/infrastructure/utilities/activity-tracker.service.ts +205 -0
- package/src/infrastructure/utilities/api-service.ts +237 -0
- package/src/infrastructure/utilities/auth-logout.util.ts +23 -0
- package/src/infrastructure/utilities/classname.util.ts +7 -0
- package/src/infrastructure/utilities/encryption.service.ts +125 -0
- package/src/infrastructure/utilities/form-snapshot.service.ts +304 -0
- package/src/infrastructure/utilities/format.util.ts +40 -0
- package/src/infrastructure/utilities/index.tsx +23 -0
- package/src/infrastructure/utilities/media-label.service.ts +47 -0
- package/src/infrastructure/utilities/modules.ts +11 -0
- package/src/infrastructure/utilities/permission.util.ts +22 -0
- package/src/infrastructure/utilities/push-permission.util.ts +43 -0
- package/src/infrastructure/utilities/route-access.ts +38 -0
- package/src/infrastructure/utilities/socket-service.ts +123 -0
- package/src/infrastructure/utilities/sso-auth.util.ts +188 -0
- package/src/infrastructure/utilities/stringable.util.ts +16 -0
- package/src/infrastructure/utilities/strings.util.ts +18 -0
- package/src/infrastructure/utilities/tauri.util.ts +15 -0
- package/src/infrastructure/utilities/utils.ts +6 -0
- package/src/infrastructure/utilities/values.ts +5 -0
- package/src/presentation/8starlabs-ui/button.tsx +94 -0
- package/src/presentation/8starlabs-ui/flip-clock.tsx +368 -0
- package/src/presentation/8starlabs-ui/heatmap.tsx +430 -0
- package/src/presentation/8starlabs-ui/hooks/index.tsx +2 -0
- package/src/presentation/8starlabs-ui/hooks/use-mobile.ts +21 -0
- package/src/presentation/8starlabs-ui/index.tsx +20 -0
- package/src/presentation/8starlabs-ui/json-viewer.tsx +972 -0
- package/src/presentation/8starlabs-ui/marquee.tsx +134 -0
- package/src/presentation/8starlabs-ui/partition-bar.tsx +198 -0
- package/src/presentation/8starlabs-ui/scroll-fade.tsx +158 -0
- package/src/presentation/8starlabs-ui/status-indicator.tsx +86 -0
- package/src/presentation/8starlabs-ui/system-banner.tsx +50 -0
- package/src/presentation/8starlabs-ui/timeline.tsx +576 -0
- package/src/presentation/8starlabs-ui/transport-badge.tsx +249 -0
- package/src/presentation/8starlabs-ui/ui/copy-button.tsx +60 -0
- package/src/presentation/8starlabs-ui/ui/index.tsx +2 -0
- package/src/presentation/analytics-section.tsx +85 -0
- package/src/presentation/app-sidebar.tsx +234 -0
- package/src/presentation/charts/area-widget.chart-skeleton.tsx +61 -0
- package/src/presentation/charts/area-widget.chart.tsx +128 -0
- package/src/presentation/charts/chart-widgets.types.ts +81 -0
- package/src/presentation/charts/index.tsx +16 -0
- package/src/presentation/charts/line-widget.chart-skeleton.tsx +64 -0
- package/src/presentation/charts/line-widget.chart.tsx +105 -0
- package/src/presentation/charts/pie-widget.chart-skeleton.tsx +56 -0
- package/src/presentation/charts/pie-widget.chart.tsx +168 -0
- package/src/presentation/charts/radar-widget.chart-skeleton.tsx +67 -0
- package/src/presentation/charts/radar-widget.chart.tsx +80 -0
- package/src/presentation/charts/radial-stacked-widget.chart-skeleton.tsx +66 -0
- package/src/presentation/charts/radial-stacked-widget.chart.tsx +120 -0
- package/src/presentation/charts/radial-widget.chart-skeleton.tsx +61 -0
- package/src/presentation/charts/radial-widget.chart.tsx +87 -0
- package/src/presentation/charts/tooltip-widget.chart-skeleton.tsx +64 -0
- package/src/presentation/charts/tooltip-widget.chart.tsx +89 -0
- package/src/presentation/components/activity-actions.tsx +20 -0
- package/src/presentation/components/activity-container.tsx +55 -0
- package/src/presentation/components/activity-content.tsx +20 -0
- package/src/presentation/components/activity-descriptor-parser.tsx +37 -0
- package/src/presentation/components/activity-header.tsx +20 -0
- package/src/presentation/components/activity-loader.tsx +19 -0
- package/src/presentation/components/activity-title.tsx +32 -0
- package/src/presentation/components/activity.tsx +22 -0
- package/src/presentation/components/auth/index.tsx +4 -0
- package/src/presentation/components/auth/sso-callback.view.tsx +44 -0
- package/src/presentation/components/auth/sso-disconnect.view.tsx +41 -0
- package/src/presentation/components/auth/sso-sign-in.view.tsx +29 -0
- package/src/presentation/components/auth-lock-screen.tsx +309 -0
- package/src/presentation/components/auth-session.view.tsx +17 -0
- package/src/presentation/components/data-table.tsx +814 -0
- package/src/presentation/components/dynamic-icon.tsx +16 -0
- package/src/presentation/components/floating-upload.tsx +291 -0
- package/src/presentation/components/index.tsx +40 -0
- package/src/presentation/components/local-time.tsx +170 -0
- package/src/presentation/components/markdown-parser.tsx +201 -0
- package/src/presentation/components/message-scroller.tsx +131 -0
- package/src/presentation/components/module-first-access-config.view.tsx +181 -0
- package/src/presentation/components/module-first-access-pending.view.tsx +38 -0
- package/src/presentation/components/module-guard.tsx +34 -0
- package/src/presentation/components/modules-first-access.guard.tsx +88 -0
- package/src/presentation/components/modules-guard-forbidden.tsx +46 -0
- package/src/presentation/components/notification-details.modal.tsx +145 -0
- package/src/presentation/components/notification-item.tsx +127 -0
- package/src/presentation/components/notifications-popover.tsx +128 -0
- package/src/presentation/components/push-notifications.provider.tsx +65 -0
- package/src/presentation/components/upload-progress-dialog.tsx +140 -0
- package/src/presentation/components/waiting-bar.tsx +22 -0
- package/src/presentation/components/waiting-section.tsx +15 -0
- package/src/presentation/components/waiting.tsx +14 -0
- package/src/presentation/data-grid/data-grid-empty.tsx +24 -0
- package/src/presentation/data-grid/data-grid-search-engine.tsx +32 -0
- package/src/presentation/data-grid/data-grid.tsx +892 -0
- package/src/presentation/data-grid/index.tsx +4 -0
- package/src/presentation/form-screen.tsx +95 -0
- package/src/presentation/icons/custom.tsx +20 -0
- package/src/presentation/icons/glyphIcons.tsx +53 -0
- package/src/presentation/icons/icons.enum.ts +4 -0
- package/src/presentation/icons/icons.util.ts +6 -0
- package/src/presentation/icons/index.tsx +8 -0
- package/src/presentation/icons/lucide.tsx +17 -0
- package/src/presentation/icons/remix.tsx +33 -0
- package/src/presentation/icons/types.ts +27 -0
- package/src/presentation/index.tsx +45 -0
- package/src/presentation/modals/components/ModalBox.tsx +74 -0
- package/src/presentation/modals/components/ModalPortal.tsx +31 -0
- package/src/presentation/modals/components/ModalStepper.tsx +319 -0
- package/src/presentation/modals/components/ModalWrapper.tsx +65 -0
- package/src/presentation/modals/components/index.tsx +5 -0
- package/src/presentation/modals/hooks/index.ts +2 -0
- package/src/presentation/modals/hooks/useModal.ts +38 -0
- package/src/presentation/modals/index.tsx +5 -0
- package/src/presentation/modals/stores/index.ts +2 -0
- package/src/presentation/modals/stores/useModalStore.ts +90 -0
- package/src/presentation/modals/types/index.ts +2 -0
- package/src/presentation/modals/types/modal.type.ts +33 -0
- package/src/presentation/module-menubar.tsx +300 -0
- package/src/presentation/module-widget.tsx +233 -0
- package/src/presentation/nav-documents.tsx +89 -0
- package/src/presentation/nav-main.tsx +62 -0
- package/src/presentation/nav-secondary.tsx +41 -0
- package/src/presentation/nav-user.tsx +109 -0
- package/src/presentation/permission-action-badge.tsx +35 -0
- package/src/presentation/reui/index.tsx +3 -0
- package/src/presentation/reui/stepper.tsx +508 -0
- package/src/presentation/reui/timeline.tsx +226 -0
- package/src/presentation/sheets/index.tsx +2 -0
- package/src/presentation/sheets/legacy-sheet-header.tsx +0 -0
- package/src/presentation/sheets/legacy-sheet.tsx +37 -0
- package/src/presentation/size.enum.ts +19 -0
- package/src/presentation/system/index.tsx +3 -0
- package/src/presentation/system/logo.theme.tsx +21 -0
- package/src/presentation/system/types.ts +10 -0
- package/src/presentation/theme/index.tsx +6 -0
- package/src/presentation/theme/prefer-color-scheme.tsx +50 -0
- package/src/presentation/theme/switch-color-scheme.tsx +16 -0
- package/src/presentation/theme/theme-switcher-button.tsx +20 -0
- package/src/presentation/theme/theme.enum.ts +4 -0
- package/src/presentation/theme/theme.store.ts +87 -0
- package/src/presentation/themes/index.tsx +2 -0
- package/src/presentation/themes/katon/dashboard-layout.tsx +1080 -0
- package/src/presentation/themes/katon/edge-section.tsx +19 -0
- package/src/presentation/themes/katon/header-menubar.tsx +270 -0
- package/src/presentation/themes/katon/header-modules-available.tsx +44 -0
- package/src/presentation/themes/katon/header-modules-recents.tsx +52 -0
- package/src/presentation/themes/katon/header-modules-store.tsx +25 -0
- package/src/presentation/themes/katon/header-options.tsx +13 -0
- package/src/presentation/themes/katon/header-organization-select.tsx +146 -0
- package/src/presentation/themes/katon/header-routines.tsx +74 -0
- package/src/presentation/themes/katon/header-tasks-connected-user.tsx +150 -0
- package/src/presentation/themes/katon/index.tsx +16 -0
- package/src/presentation/themes/katon/main-wrapper.tsx +34 -0
- package/src/presentation/themes/katon/module-item-link.tsx +32 -0
- package/src/presentation/themes/katon/view-frame.tsx +25 -0
- package/src/presentation/themes/katon/view-helmet.tsx +53 -0
- package/src/presentation/themes/katon/view-status.tsx +32 -0
- package/src/presentation/themes/katon/view-wrapper.tsx +15 -0
- package/src/presentation/themes/katon/view.tsx +42 -0
- package/src/presentation/ui/accordion-multiselect.tsx +206 -0
- package/src/presentation/ui/accordion.tsx +81 -0
- package/src/presentation/ui/alert-dialog.tsx +199 -0
- package/src/presentation/ui/alert.tsx +76 -0
- package/src/presentation/ui/aspect-ratio.tsx +11 -0
- package/src/presentation/ui/attachment.tsx +204 -0
- package/src/presentation/ui/avatar.tsx +112 -0
- package/src/presentation/ui/badge.tsx +49 -0
- package/src/presentation/ui/breadcrumb.tsx +122 -0
- package/src/presentation/ui/bubble.tsx +125 -0
- package/src/presentation/ui/button-group.tsx +83 -0
- package/src/presentation/ui/button.tsx +87 -0
- package/src/presentation/ui/calendar.tsx +222 -0
- package/src/presentation/ui/card.tsx +106 -0
- package/src/presentation/ui/carousel.tsx +242 -0
- package/src/presentation/ui/chart.tsx +373 -0
- package/src/presentation/ui/checkbox.tsx +33 -0
- package/src/presentation/ui/clickable.tsx +58 -0
- package/src/presentation/ui/collapsible.tsx +33 -0
- package/src/presentation/ui/color-swatch-selector.tsx +81 -0
- package/src/presentation/ui/combobox.tsx +299 -0
- package/src/presentation/ui/command.tsx +195 -0
- package/src/presentation/ui/context-menu.tsx +263 -0
- package/src/presentation/ui/dialog.tsx +168 -0
- package/src/presentation/ui/direction.tsx +22 -0
- package/src/presentation/ui/drawer.tsx +134 -0
- package/src/presentation/ui/dropdown-menu.tsx +269 -0
- package/src/presentation/ui/empty.tsx +104 -0
- package/src/presentation/ui/field.tsx +238 -0
- package/src/presentation/ui/granularity-selector.tsx +58 -0
- package/src/presentation/ui/hover-card.tsx +44 -0
- package/src/presentation/ui/index.tsx +74 -0
- package/src/presentation/ui/input-group.tsx +156 -0
- package/src/presentation/ui/input-otp.tsx +87 -0
- package/src/presentation/ui/input.tsx +19 -0
- package/src/presentation/ui/item.tsx +196 -0
- package/src/presentation/ui/kpi-card.tsx +203 -0
- package/src/presentation/ui/label-selector.tsx +100 -0
- package/src/presentation/ui/label.tsx +24 -0
- package/src/presentation/ui/legacy-birth-date-input.tsx +43 -0
- package/src/presentation/ui/legacy-color-picker/index.tsx +42 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.content.tsx +37 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.context.tsx +42 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.hex-input.tsx +97 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.picker.tsx +266 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.presets.ts +22 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.quick-list.tsx +49 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.recent.tsx +43 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.swatches.tsx +111 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.trigger.tsx +128 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.tsx +110 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.types.ts +1 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.utils.ts +114 -0
- package/src/presentation/ui/legacy-country-input.tsx +171 -0
- package/src/presentation/ui/legacy-gender-input.tsx +22 -0
- package/src/presentation/ui/legacy-input.tsx +106 -0
- package/src/presentation/ui/legacy-phone-input.tsx +213 -0
- package/src/presentation/ui/legacy-select-input.tsx +114 -0
- package/src/presentation/ui/legacy-text-area.tsx +111 -0
- package/src/presentation/ui/list-items.tsx +59 -0
- package/src/presentation/ui/marker.tsx +69 -0
- package/src/presentation/ui/media-player/index.tsx +12 -0
- package/src/presentation/ui/media-player/media-player.context.tsx +36 -0
- package/src/presentation/ui/media-player/media-player.tsx +167 -0
- package/src/presentation/ui/media-player/player-controls.tsx +207 -0
- package/src/presentation/ui/media-player/players/audio-player.tsx +78 -0
- package/src/presentation/ui/media-player/players/index.tsx +4 -0
- package/src/presentation/ui/media-player/players/video-player.tsx +193 -0
- package/src/presentation/ui/media-player/players/voice-note-player.tsx +108 -0
- package/src/presentation/ui/media-player/use-media-player.hook.ts +263 -0
- package/src/presentation/ui/menubar.tsx +281 -0
- package/src/presentation/ui/message.tsx +92 -0
- package/src/presentation/ui/navigation-menu.tsx +172 -0
- package/src/presentation/ui/pagination.tsx +129 -0
- package/src/presentation/ui/popover.tsx +89 -0
- package/src/presentation/ui/progress.tsx +31 -0
- package/src/presentation/ui/resizable.tsx +50 -0
- package/src/presentation/ui/select.tsx +192 -0
- package/src/presentation/ui/separator.tsx +28 -0
- package/src/presentation/ui/sheet.tsx +147 -0
- package/src/presentation/ui/sidebar.tsx +702 -0
- package/src/presentation/ui/skeleton.tsx +13 -0
- package/src/presentation/ui/slide-to-confirm.tsx +129 -0
- package/src/presentation/ui/slider.tsx +59 -0
- package/src/presentation/ui/sonner.tsx +58 -0
- package/src/presentation/ui/switch.tsx +33 -0
- package/src/presentation/ui/table.tsx +116 -0
- package/src/presentation/ui/tabs.tsx +90 -0
- package/src/presentation/ui/text-gradient.tsx +84 -0
- package/src/presentation/ui/textarea.tsx +18 -0
- package/src/presentation/ui/timeline-steps.tsx +235 -0
- package/src/presentation/ui/toggle-group.tsx +89 -0
- package/src/presentation/ui/toggle.tsx +47 -0
- package/src/presentation/ui/tooltip.tsx +57 -0
- package/src/presentation/uploading/index.tsx +3 -0
- package/src/presentation/uploading/media-upload-field.tsx +152 -0
- package/src/presentation/uploading/storage-media.tsx +210 -0
- package/src/styles.css +403 -0
- package/src/themes.css +1038 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {cn} from "../infrastructure/utilities/utils";
|
|
4
|
+
import {ThemeLogo} from "./system/logo.theme";
|
|
5
|
+
import {AppConfig} from "../domain/config/app.config";
|
|
6
|
+
import Link from "next/link";
|
|
7
|
+
import {useAuth} from "../infrastructure/hooks/use-auth";
|
|
8
|
+
import {Button} from "./ui/button";
|
|
9
|
+
import {ThemeSwitcherButton} from "./theme/theme-switcher-button";
|
|
10
|
+
import {Fragment} from "react";
|
|
11
|
+
|
|
12
|
+
export interface FormScreenProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
hideSideImage?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const COPYRIGHT_YEAR = new Intl.DateTimeFormat('fr-FR', {year: 'numeric'}).format(new Date());
|
|
17
|
+
|
|
18
|
+
export function FormScreen({className, children, hideSideImage, ...props}: FormScreenProps) {
|
|
19
|
+
const {user, logout} = useAuth()
|
|
20
|
+
const inPopup = typeof window !== 'undefined' && window.opener && window.opener !== window
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Fragment>
|
|
24
|
+
<div className={cn(
|
|
25
|
+
"hidden w-full",
|
|
26
|
+
inPopup ? "" : "flex justify-end items-center"
|
|
27
|
+
)}>
|
|
28
|
+
<div className="p-4">
|
|
29
|
+
<ThemeSwitcherButton/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div {...props}
|
|
33
|
+
className={cn("flex flex-col min-h-svh items-center justify-center bg-background p-4 md:p-10", className,)}>
|
|
34
|
+
<div
|
|
35
|
+
className={cn(
|
|
36
|
+
"relative w-full max-w-150 min-h-150 rounded-[32px] overflow-hidden bg-background border border-white/5",
|
|
37
|
+
hideSideImage && "flex flex-col justify-center",
|
|
38
|
+
!hideSideImage && "grid lg:grid-cols-[1.15fr_0.85fr]"
|
|
39
|
+
)}>
|
|
40
|
+
{/* Left side (Form) */}
|
|
41
|
+
<div className="flex flex-col justify-between gap-8 p-8 md:p-12 ">
|
|
42
|
+
<div className="flex items-center justify-between w-full">
|
|
43
|
+
<div className="flex items-center gap-2">
|
|
44
|
+
<div className="w-full max-w-80 rounded-full flex items-center justify-center">
|
|
45
|
+
<ThemeLogo variant="banner" color={"black"} onDark={"white"}
|
|
46
|
+
className="object-contain"/>
|
|
47
|
+
</div>
|
|
48
|
+
{/*<span className="font-bold text-sm text-white">Liorian</span>*/}
|
|
49
|
+
</div>
|
|
50
|
+
<div className="flex items-center gap-6 text-xs text-muted-foreground">
|
|
51
|
+
{/*<Link href="/public" className="hover:text-white transition-colors">Accueil</Link>*/}
|
|
52
|
+
{/*<Link href="/auth/sign-in" className="hover:text-white transition-colors">Se connecter</Link>*/}
|
|
53
|
+
{/*<Link href="/auth/sign-up" className="hover:text-white transition-colors">Rejoindre</Link>*/}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="flex flex-1 items-center justify-center w-full">
|
|
57
|
+
{children}
|
|
58
|
+
</div>
|
|
59
|
+
{
|
|
60
|
+
user && (
|
|
61
|
+
<div className="flex flex-row items-center">
|
|
62
|
+
<Button onClick={logout} variant="ghost">
|
|
63
|
+
Se déconnecter
|
|
64
|
+
</Button>
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
<div
|
|
69
|
+
className="text-left text-[10px] text-muted-foreground/30 font-medium uppercase tracking-wider">
|
|
70
|
+
© {COPYRIGHT_YEAR} {AppConfig.APP_NAME}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
{/* Right side (Image with curvy separator) */}
|
|
74
|
+
{!hideSideImage && (<div className="relative hidden lg:block overflow-hidden">
|
|
75
|
+
<img
|
|
76
|
+
src="/assets/images/image-001.jpg"
|
|
77
|
+
alt={AppConfig.APP_NAME}
|
|
78
|
+
className="absolute inset-0 h-full w-full object-cover dark:brightness-[0.4]"
|
|
79
|
+
/>
|
|
80
|
+
{/* Wavy separator overlay */}
|
|
81
|
+
<div className="absolute top-0 bottom-0 left-0 w-8 -ml-px fill-background stroke-none">
|
|
82
|
+
<svg viewBox="0 0 100 1000" preserveAspectRatio="none" className="h-full w-full">
|
|
83
|
+
<path d="M100 0 C 35 250, 40 750, 100 1000 L0 1000 L0 0 Z"/>
|
|
84
|
+
</svg>
|
|
85
|
+
</div>
|
|
86
|
+
{/* Bottom-right watermark logo */}
|
|
87
|
+
<div className="absolute bottom-8 right-8 text-white select-none ">
|
|
88
|
+
<ThemeLogo variant="icon" className="h-8 w-auto object-contain brightness-0 invert"/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>)}
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</Fragment>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {IconKey, IIconCustomProps} from "./types";
|
|
2
|
+
import {Fragment} from "react";
|
|
3
|
+
import {LucideIcon} from "./lucide";
|
|
4
|
+
import {RemixIcon} from "./remix";
|
|
5
|
+
import {IconProviderEnum} from "./icons.enum";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export function CustomIcon({provider = IconProviderEnum.LUCIDE, name, ...props}: IIconCustomProps) {
|
|
10
|
+
return <Fragment>
|
|
11
|
+
{!provider || provider === IconProviderEnum.LUCIDE
|
|
12
|
+
? <LucideIcon {...props} name={name as IconKey}/>
|
|
13
|
+
: null
|
|
14
|
+
}
|
|
15
|
+
{provider === IconProviderEnum.REMIX
|
|
16
|
+
? <RemixIcon {...props} name={name as IconKey}/>
|
|
17
|
+
: null
|
|
18
|
+
}
|
|
19
|
+
</Fragment>
|
|
20
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {cn} from "../../infrastructure/utilities/utils";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {camelCase} from "../../infrastructure/utilities/strings.util";
|
|
4
|
+
|
|
5
|
+
export enum FaTypeEnum {
|
|
6
|
+
Solid = 'fas',
|
|
7
|
+
Regular = 'far',
|
|
8
|
+
Brands = 'fab',
|
|
9
|
+
Light = 'fal',
|
|
10
|
+
Duotone = 'fad',
|
|
11
|
+
SharpRegular = 'fa-sharp fa-regular',
|
|
12
|
+
SharpSolid = 'fa-sharp fa-solid',
|
|
13
|
+
SharpLight = 'fa-sharp fa-light',
|
|
14
|
+
SharpDuotoneSolid = 'fa-sharp-duotone fa-solid',
|
|
15
|
+
SharpDuotoneRegular = 'fa-sharp-duotone fa-regular',
|
|
16
|
+
SharpDuotoneLight = 'fa-sharp-duotone fa-light',
|
|
17
|
+
SharpDuotoneThin = 'fa-sharp-duotone fa-thin',
|
|
18
|
+
BoldRounded = 'fi fi-br',
|
|
19
|
+
SolidRounded = 'fi fi-sr',
|
|
20
|
+
RegularRounded = 'fi fi-rr',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum FaSizeEnum {
|
|
24
|
+
x1 = 1,
|
|
25
|
+
x2 = 2,
|
|
26
|
+
x3 = 3,
|
|
27
|
+
x4 = 4,
|
|
28
|
+
x5 = 5,
|
|
29
|
+
x6 = 6,
|
|
30
|
+
x7 = 7,
|
|
31
|
+
x8 = 8,
|
|
32
|
+
x9 = 9,
|
|
33
|
+
x10 = 10,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface FaIconProps extends React.HTMLProps<HTMLSpanElement>{
|
|
37
|
+
type?: FaTypeEnum;
|
|
38
|
+
name: string;
|
|
39
|
+
size?: FaSizeEnum;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function FaIcon({type, name, size, className, ...props}: FaIconProps) {
|
|
43
|
+
const _type = type ? type.toString().trim() : 'fas';
|
|
44
|
+
const isFa = _type.substring(0, 2) === 'fa';
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<i {...props} className={cn(
|
|
48
|
+
'animate-zoom-in',
|
|
49
|
+
className,
|
|
50
|
+
`${isFa ? _type : ''} ${isFa ? 'fa-': `${type}-`}${camelCase(name)} ${(size ? `fa-${size}x` : 'fa-lg')}`,
|
|
51
|
+
)}></i>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {IconKey, IIconProps} from "./types";
|
|
4
|
+
import * as Icons from "lucide-react";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import {cn} from "../../infrastructure/utilities/utils";
|
|
7
|
+
import {kebabToPascalCase} from "../../infrastructure/utilities/strings.util";
|
|
8
|
+
|
|
9
|
+
export function LucideIcon({name, size = 16, color = "currentColor", className}: IIconProps) {
|
|
10
|
+
name = kebabToPascalCase<IconKey>(name)
|
|
11
|
+
const Icon = Icons[name as IconKey] as React.ForwardRefExoticComponent<any>;
|
|
12
|
+
if(!Icon) return null;
|
|
13
|
+
return <Icon className={cn(
|
|
14
|
+
className,
|
|
15
|
+
`size-${size}`
|
|
16
|
+
)} color={color} />;
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {IconKey, IIconExtendedProps} from "./types";
|
|
4
|
+
import * as Icons from "@remixicon/react";
|
|
5
|
+
import {cn} from "../../infrastructure/utilities/utils";
|
|
6
|
+
import {kebabToPascalCase} from "../../infrastructure/utilities/strings.util";
|
|
7
|
+
import {toIconKey} from "./icons.util";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export function RemixIcon({name, size = 3, color = "currentColor", variant = 'Line', className}: IIconExtendedProps) {
|
|
11
|
+
|
|
12
|
+
name = toIconKey(
|
|
13
|
+
name.startsWith('ri-')
|
|
14
|
+
? name.replace('ri-', '')
|
|
15
|
+
: name
|
|
16
|
+
);
|
|
17
|
+
name = toIconKey(
|
|
18
|
+
name.endsWith('-line')
|
|
19
|
+
? name.replace('-line', '')
|
|
20
|
+
: name
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
name = toIconKey(
|
|
24
|
+
name.endsWith('-fill')
|
|
25
|
+
? name.replace('-fill', '')
|
|
26
|
+
: name
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
name = kebabToPascalCase<IconKey>(`ri-${name}-${variant}`)
|
|
30
|
+
const Icon = Icons[name as keyof typeof Icons] as React.ForwardRefExoticComponent<any>;
|
|
31
|
+
if (!Icon) return null;
|
|
32
|
+
return <Icon className={cn(className, `size-${size}`)} color={color}/>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Icons from "lucide-react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {IconProviderEnum} from "./icons.enum";
|
|
4
|
+
|
|
5
|
+
export type IconKey = keyof typeof Icons;
|
|
6
|
+
|
|
7
|
+
export interface IIconProps extends React.ComponentProps<'i'> {
|
|
8
|
+
name: IconKey | string;
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IIconExtendedProps extends IIconProps {
|
|
14
|
+
variant?: 'Fill' | 'Line';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IIconCustomProps extends IIconExtendedProps {
|
|
18
|
+
provider?: IconProviderEnum;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IPagesIcons {
|
|
22
|
+
default: string;
|
|
23
|
+
create: string;
|
|
24
|
+
read: string;
|
|
25
|
+
update: string;
|
|
26
|
+
delete: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// @liorian/sdk/presentation — presentational layer (components, data-grid, icons, modals, themes, ui…).
|
|
2
|
+
// NOTE: `8starlabs-ui` legacy components are intentionally NOT hoisted here to avoid clashing
|
|
3
|
+
// with the design-system primitives (`Button`, `buttonVariants`, `TimelineItem`, …).
|
|
4
|
+
// They remain available via `@liorian/sdk/presentation/8starlabs-ui`.
|
|
5
|
+
// NOTE: `katon/header-menubar` (custom `NavigationMenu`) is not hoisted either — the design-system
|
|
6
|
+
// `NavigationMenu` wins here; the katon one stays on `@liorian/sdk/presentation/themes/katon`.
|
|
7
|
+
export * from "./analytics-section";
|
|
8
|
+
export * from "./app-sidebar";
|
|
9
|
+
export * from "./charts";
|
|
10
|
+
export * from "./components";
|
|
11
|
+
export * from "./data-grid";
|
|
12
|
+
export * from "./form-screen";
|
|
13
|
+
export * from "./icons";
|
|
14
|
+
export * from "./modals";
|
|
15
|
+
export * from "./module-menubar";
|
|
16
|
+
export * from "./module-widget";
|
|
17
|
+
export * from "./nav-documents";
|
|
18
|
+
export * from "./nav-main";
|
|
19
|
+
export * from "./nav-secondary";
|
|
20
|
+
export * from "./nav-user";
|
|
21
|
+
export * from "./permission-action-badge";
|
|
22
|
+
export * from "./reui";
|
|
23
|
+
export * from "./sheets";
|
|
24
|
+
export * from "./size.enum";
|
|
25
|
+
export * from "./system";
|
|
26
|
+
export * from "./theme";
|
|
27
|
+
export * from "./uploading";
|
|
28
|
+
export * from "./ui";
|
|
29
|
+
|
|
30
|
+
// Katon theme (hoisted individually; `header-menubar` excluded — see note above).
|
|
31
|
+
export * from "./themes/katon/view";
|
|
32
|
+
export * from "./themes/katon/view-wrapper";
|
|
33
|
+
export * from "./themes/katon/view-helmet";
|
|
34
|
+
export * from "./themes/katon/view-frame";
|
|
35
|
+
export * from "./themes/katon/view-status";
|
|
36
|
+
export * from "./themes/katon/main-wrapper";
|
|
37
|
+
export * from "./themes/katon/edge-section";
|
|
38
|
+
export * from "./themes/katon/header-modules-available";
|
|
39
|
+
export * from "./themes/katon/header-modules-recents";
|
|
40
|
+
export * from "./themes/katon/header-options";
|
|
41
|
+
export * from "./themes/katon/header-organization-select";
|
|
42
|
+
export * from "./themes/katon/header-routines";
|
|
43
|
+
export * from "./themes/katon/header-tasks-connected-user";
|
|
44
|
+
export * from "./themes/katon/module-item-link";
|
|
45
|
+
export * from "./themes/katon/dashboard-layout";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import {useModalStore} from '../stores/useModalStore';
|
|
5
|
+
import {ModalInstance} from '../types/modal.type';
|
|
6
|
+
import {cn} from "../../../infrastructure/utilities/utils";
|
|
7
|
+
import {SizeEnum, SizeHeightEnum} from "../../size.enum";
|
|
8
|
+
import {FaIcon, FaSizeEnum, FaTypeEnum} from "../../icons/glyphIcons";
|
|
9
|
+
import {COMMON_CLASSNAMES} from "../../../infrastructure/common-classname.constant";
|
|
10
|
+
import {CircleXIcon, XIcon} from "lucide-react";
|
|
11
|
+
|
|
12
|
+
interface ModalBoxProps {
|
|
13
|
+
modal: ModalInstance;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ModalBox = ({modal}: ModalBoxProps) => {
|
|
17
|
+
const closeModal = useModalStore((state) => state.closeModal);
|
|
18
|
+
let {id, component: Component, props, options} = modal;
|
|
19
|
+
|
|
20
|
+
options = options || {};
|
|
21
|
+
options.scrollable = typeof options.scrollable === 'undefined' ? true : options.scrollable;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
className={cn(
|
|
26
|
+
"relative w-full overflow-hidden flex flex-col rounded-xl! border bg-background text-foreground shadow-lg",
|
|
27
|
+
COMMON_CLASSNAMES.Layer,
|
|
28
|
+
SizeEnum[options.size || 'AUTO'],
|
|
29
|
+
options?.useHeight && SizeHeightEnum[options.size || 'AUTO'],
|
|
30
|
+
options?.className
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
{(options?.title || options?.closable !== false) && (
|
|
34
|
+
<div className="flex items-center justify-between px-4 py-4">
|
|
35
|
+
<div className="flex flex-col px-2">
|
|
36
|
+
{options?.title && (
|
|
37
|
+
<h3 className="text-lg font-semibold text-foreground">
|
|
38
|
+
{options.title}
|
|
39
|
+
</h3>
|
|
40
|
+
)}
|
|
41
|
+
{options?.description && (
|
|
42
|
+
<p className="text-sm text-muted-foreground">
|
|
43
|
+
{options.description}
|
|
44
|
+
</p>
|
|
45
|
+
)}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
{options?.closable !== false && (
|
|
49
|
+
<button
|
|
50
|
+
onClick={() => !options?.locked && closeModal(id)}
|
|
51
|
+
disabled={options?.locked}
|
|
52
|
+
className={cn(
|
|
53
|
+
"absolute top-0 right-0 p-1 m-2 rounded-full transition-colors text-muted-foreground",
|
|
54
|
+
options?.locked ? "opacity-50 cursor-not-allowed" : "hover:bg-muted"
|
|
55
|
+
)}
|
|
56
|
+
>
|
|
57
|
+
<XIcon className="size-7"/>
|
|
58
|
+
</button>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
<div className={cn(
|
|
64
|
+
"flex-auto w-full ",
|
|
65
|
+
options?.scrollable && "overflow-y-auto",
|
|
66
|
+
!options?.scrollable && "overflow-hidden",
|
|
67
|
+
)}>
|
|
68
|
+
{typeof Component === 'function' ? <Component {...props} /> : Component}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default ModalBox;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { useModalStore } from '../stores/useModalStore';
|
|
5
|
+
import ModalWrapper from './ModalWrapper';
|
|
6
|
+
|
|
7
|
+
const ModalPortal = () => {
|
|
8
|
+
const [mounted, setMounted] = useState(false);
|
|
9
|
+
const modals = useModalStore((state) => state.modals);
|
|
10
|
+
|
|
11
|
+
useEffect(() => setMounted(true), []);
|
|
12
|
+
|
|
13
|
+
if (!mounted || modals.length === 0) return null;
|
|
14
|
+
|
|
15
|
+
// Each wrapper portals itself into `document.body` at open time, so stacked
|
|
16
|
+
// overlays follow open order like any other dismissable layer.
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
{modals.map((modal, index) => (
|
|
20
|
+
<ModalWrapper
|
|
21
|
+
key={modal.id}
|
|
22
|
+
modal={modal}
|
|
23
|
+
index={index}
|
|
24
|
+
isLast={index === modals.length - 1}
|
|
25
|
+
/>
|
|
26
|
+
))}
|
|
27
|
+
</>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default ModalPortal;
|