@tulip-systems/core 0.2.1 → 0.4.0
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/dist/auth/client.d.ts +3 -1
- package/dist/auth/client.js +4 -2
- package/dist/auth/server.d.ts +2 -2
- package/dist/auth/server.js +3 -3
- package/dist/auth.d.ts +2 -1
- package/dist/auth.js +3 -2
- package/dist/commands/client.d.ts +4 -4
- package/dist/commands/client.js +4 -4
- package/dist/components/client.d.ts +5 -3
- package/dist/components/client.js +6 -4
- package/dist/components/common/icons.d.ts +5 -2
- package/dist/components/common/icons.d.ts.map +1 -1
- package/dist/components/common/icons.js +4 -1
- package/dist/components/common/icons.js.map +1 -1
- package/dist/components/common/status.d.ts +3 -3
- package/dist/components/editor/components/content.client.d.ts +2 -2
- package/dist/components/editor/components/fixed-menu.client.d.ts +2 -2
- package/dist/components/editor/context.client.d.ts +2 -2
- package/dist/components/editor/index.client.d.ts +2 -2
- package/dist/components/editor/preview.client.d.ts +2 -2
- package/dist/components/header/back-button.client.d.ts +2 -2
- package/dist/components/header/bottom-bar.client.d.ts +5 -5
- package/dist/components/header/bottom-bar.client.d.ts.map +1 -1
- package/dist/components/header/bottom-bar.client.js.map +1 -1
- package/dist/components/header/breadcrumbs.client.d.ts +7 -7
- package/dist/components/header/breadcrumbs.client.js +1 -1
- package/dist/components/header/header.client.d.ts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.ts +2 -2
- package/dist/components/header/top-bar.client.d.ts +4 -4
- package/dist/components/layouts/admin-content.client.d.ts +13 -0
- package/dist/components/layouts/admin-content.client.d.ts.map +1 -0
- package/dist/components/layouts/admin-layout.d.ts +8 -0
- package/dist/components/layouts/admin-layout.d.ts.map +1 -0
- package/dist/components/layouts/admin-layout.js +15 -0
- package/dist/components/layouts/admin-layout.js.map +1 -0
- package/dist/components/layouts/admin-loading.d.ts +3 -3
- package/dist/components/layouts/admin-loading.d.ts.map +1 -1
- package/dist/components/layouts/admin-loading.js +2 -2
- package/dist/components/layouts/admin-loading.js.map +1 -1
- package/dist/components/layouts/empty-page.d.ts +4 -4
- package/dist/components/layouts/list-layout.d.ts +2 -2
- package/dist/components/layouts/not-found-page.d.ts +4 -3
- package/dist/components/layouts/not-found-page.d.ts.map +1 -1
- package/dist/components/layouts/not-found-page.js +8 -2
- package/dist/components/layouts/not-found-page.js.map +1 -1
- package/dist/components/layouts/not-found-section.js +1 -1
- package/dist/components/layouts/not-found-section.js.map +1 -1
- package/dist/components/layouts/providers.client.d.ts +2 -2
- package/dist/components/layouts/root-layout.server.d.ts +2 -2
- package/dist/components/layouts/root-layout.server.d.ts.map +1 -1
- package/dist/components/layouts/root-loading.d.ts +7 -0
- package/dist/components/layouts/root-loading.d.ts.map +1 -0
- package/dist/components/layouts/root-loading.js +14 -0
- package/dist/components/layouts/root-loading.js.map +1 -0
- package/dist/components/layouts/tab-layout.d.ts +2 -2
- package/dist/components/lists/data-list.d.ts +5 -5
- package/dist/components/lists/data-stack.d.ts +8 -8
- package/dist/components/{layouts → navigation}/admin-sidebar-header.client.js +8 -9
- package/dist/components/navigation/admin-sidebar-header.client.js.map +1 -0
- package/dist/components/navigation/admin-sidebar-paths.client.d.ts +81 -0
- package/dist/components/navigation/admin-sidebar-paths.client.d.ts.map +1 -0
- package/dist/components/navigation/admin-sidebar-paths.client.js +143 -0
- package/dist/components/navigation/admin-sidebar-paths.client.js.map +1 -0
- package/dist/components/navigation/admin-sidebar-skeleton.js +31 -0
- package/dist/components/navigation/admin-sidebar-skeleton.js.map +1 -0
- package/dist/components/server.d.ts +1 -1
- package/dist/components/server.js +1 -1
- package/dist/components/ui/accordion.d.ts +5 -5
- package/dist/components/ui/alert-dialog.d.ts +12 -12
- package/dist/components/ui/alert.d.ts +6 -6
- package/dist/components/ui/aspect-ratio.d.ts +2 -2
- package/dist/components/ui/avatar.client.d.ts +4 -4
- package/dist/components/ui/badge.d.ts +4 -4
- package/dist/components/ui/breadcrumb.d.ts +8 -8
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/calendar.d.ts +2 -2
- package/dist/components/ui/card.d.ts +7 -7
- package/dist/components/ui/carousel.d.ts +6 -6
- package/dist/components/ui/chart.client.d.ts +5 -5
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/collapsible.client.d.ts +4 -4
- package/dist/components/ui/color-picker.client.d.ts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.ts +2 -2
- package/dist/components/ui/combobox.client.d.ts +2 -2
- package/dist/components/ui/command.d.ts +10 -10
- package/dist/components/ui/context-menu.d.ts +16 -16
- package/dist/components/ui/dialog.client.d.ts +11 -11
- package/dist/components/ui/drawer.client.d.ts +11 -11
- package/dist/components/ui/dropdown-menu.d.ts +16 -16
- package/dist/components/ui/form.client.d.ts +8 -8
- package/dist/components/ui/hover-card.client.d.ts +4 -4
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/navigation-menu.d.ts +11 -11
- package/dist/components/ui/pagination.d.ts +8 -8
- package/dist/components/ui/popover.d.ts +5 -5
- package/dist/components/ui/progress.client.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/resizable.client.d.ts +4 -4
- package/dist/components/ui/scroll-area.d.ts +3 -3
- package/dist/components/ui/select.client.d.ts +11 -11
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/sheet.client.d.ts +9 -9
- package/dist/components/ui/sidebar.client.d.ts +24 -24
- package/dist/components/ui/sidebar.client.js +1 -1
- package/dist/components/ui/skeleton.d.ts +2 -2
- package/dist/components/ui/slider.d.ts +2 -2
- package/dist/components/ui/sonner.client.d.ts +2 -2
- package/dist/components/ui/sonner.client.js +1 -1
- package/dist/components/ui/spinner.js +63 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts +5 -5
- package/dist/components/ui/textarea.d.ts +2 -2
- package/dist/components/ui/time-input.client.d.ts +2 -2
- package/dist/components/ui/toggle-group.client.d.ts +3 -3
- package/dist/components/ui/toggle.d.ts +4 -4
- package/dist/components/ui/tooltip.client.d.ts +5 -5
- package/dist/components/ui/tree.client.d.ts +5 -5
- package/dist/components/ui/tree.client.d.ts.map +1 -1
- package/dist/components.d.ts +6 -5
- package/dist/components.js +8 -7
- package/dist/config/server.d.ts +2 -3
- package/dist/config/server.js +3 -4
- package/dist/config.d.ts +3 -2
- package/dist/config.js +2 -1
- package/dist/lib/client.js +1 -1
- package/dist/lib/hooks/use-action.d.ts +2 -2
- package/dist/modules/auth/components/allowed.client.js +1 -1
- package/dist/modules/auth/components/allowed.client.js.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.ts +3 -4
- package/dist/modules/auth/components/auth-layout.server.d.ts.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.js +1 -4
- package/dist/modules/auth/components/auth-layout.server.js.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.ts +7 -0
- package/dist/modules/auth/components/auth-loading.d.ts.map +1 -0
- package/dist/modules/auth/components/auth-loading.js +18 -0
- package/dist/modules/auth/components/auth-loading.js.map +1 -0
- package/dist/modules/auth/components/forget-password-page.client.js +2 -2
- package/dist/modules/auth/components/guard.client.js +16 -0
- package/dist/modules/auth/components/guard.client.js.map +1 -0
- package/dist/modules/auth/components/login-page.client.d.ts +1 -5
- package/dist/modules/auth/components/login-page.client.d.ts.map +1 -1
- package/dist/modules/auth/components/login-page.client.js +41 -31
- package/dist/modules/auth/components/login-page.client.js.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.js +3 -3
- package/dist/modules/auth/components/update-password-command.d.ts +1 -1
- package/dist/modules/auth/components/update-password-command.js +1 -1
- package/dist/modules/auth/handler/client.client.d.ts +48 -48
- package/dist/modules/auth/handler/client.client.d.ts.map +1 -1
- package/dist/modules/auth/handler/proxy.server.d.ts +13 -0
- package/dist/modules/auth/handler/proxy.server.d.ts.map +1 -0
- package/dist/modules/auth/handler/proxy.server.js +22 -0
- package/dist/modules/auth/handler/proxy.server.js.map +1 -0
- package/dist/modules/auth/handler/server.server.js +3 -1
- package/dist/modules/auth/handler/server.server.js.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.ts +26 -0
- package/dist/modules/auth/hooks/use-permission.d.ts.map +1 -0
- package/dist/modules/auth/hooks/{use-permission.client.js → use-permission.js} +5 -3
- package/dist/modules/auth/hooks/use-permission.js.map +1 -0
- package/dist/modules/auth/hooks/use-session.d.ts +34 -0
- package/dist/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/dist/modules/auth/hooks/use-session.js +21 -0
- package/dist/modules/auth/hooks/use-session.js.map +1 -0
- package/dist/modules/auth/lib/helpers.server.d.ts +2 -2
- package/dist/modules/auth/lib/helpers.server.d.ts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.js +3 -6
- package/dist/modules/auth/lib/helpers.server.js.map +1 -1
- package/dist/modules/auth/lib/validators.d.ts +4 -4
- package/dist/modules/auth/lib/validators.d.ts.map +1 -1
- package/dist/modules/auth/lib/validators.js +1 -1
- package/dist/modules/auth/lib/validators.js.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.ts +11 -11
- package/dist/modules/commands/components/alert-dialog-command.client.js +1 -1
- package/dist/modules/commands/components/click-command.client.d.ts +2 -2
- package/dist/modules/commands/components/command-trigger.client.d.ts +4 -4
- package/dist/modules/commands/components/command-trigger.client.js +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.ts +8 -8
- package/dist/modules/commands/components/dialog-command.client.js +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.ts +5 -5
- package/dist/modules/commands/components/empty-command.client.d.ts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.ts +12 -12
- package/dist/modules/commands/components/form-dialog-command.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-action.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.ts +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.d.ts +8 -4
- package/dist/modules/commands/menus/dropdown-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.js +9 -1
- package/dist/modules/commands/menus/dropdown-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.ts +8 -4
- package/dist/modules/commands/menus/inline-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.js +12 -1
- package/dist/modules/commands/menus/inline-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.ts +2 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.js +6 -3
- package/dist/modules/commands/menus/responsive-menu.client.js.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.ts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.ts +2 -2
- package/dist/modules/commands/utils/send-mail-command.client.d.ts +2 -2
- package/dist/modules/commands/utils/send-mail-command.client.d.ts.map +1 -1
- package/dist/modules/commands/utils/send-mail-command.client.js +3 -3
- package/dist/modules/config/db/helpers.d.ts +5 -5
- package/dist/modules/config/db/helpers.d.ts.map +1 -1
- package/dist/modules/config/lib/config.server.d.ts +0 -2
- package/dist/modules/config/lib/config.server.d.ts.map +1 -1
- package/dist/modules/config/lib/config.server.js.map +1 -1
- package/dist/modules/config/lib/resolve.server.d.ts +192 -190
- package/dist/modules/config/lib/resolve.server.d.ts.map +1 -1
- package/dist/modules/config/paths/helpers.d.ts +11 -0
- package/dist/modules/config/paths/helpers.d.ts.map +1 -0
- package/dist/modules/config/paths/helpers.js +9 -0
- package/dist/modules/config/paths/helpers.js.map +1 -0
- package/dist/modules/config/paths/types.d.ts +8 -37
- package/dist/modules/config/paths/types.d.ts.map +1 -1
- package/dist/modules/config/router/client.server.d.ts +4 -4
- package/dist/modules/config/router/client.server.d.ts.map +1 -1
- package/dist/modules/config/router/context.server.d.ts +194 -192
- package/dist/modules/config/router/context.server.d.ts.map +1 -1
- package/dist/modules/config/router/init.server.d.ts +200 -198
- package/dist/modules/config/router/init.server.d.ts.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.ts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.js +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.js.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/header.d.ts +4 -4
- package/dist/modules/data-tables/components/layout.d.ts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.ts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/skeleton.d.ts +2 -2
- package/dist/modules/data-tables/components/table.d.ts +7 -7
- package/dist/modules/data-tables/components/toolbar.d.ts +3 -3
- package/dist/modules/data-tables/hooks/use-context.client.d.ts +2 -2
- package/dist/modules/data-tables/hooks/use-context.client.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.ts +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/search-params.d.ts +5 -5
- package/dist/modules/data-tables/lib/search-params.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/types.d.ts +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.js +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.ts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.js +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/input.client.d.ts +3 -3
- package/dist/modules/inline-edit/components/richtext.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/select.client.d.ts +6 -6
- package/dist/modules/inline-edit/components/switch.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.ts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.ts +2 -2
- package/dist/modules/inline-edit/hooks/use-inline.client.js +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.js.map +1 -1
- package/dist/modules/uploads/components/button.client.d.ts +2 -2
- package/dist/modules/uploads/components/button.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/images/grid.client.d.ts +2 -2
- package/dist/modules/uploads/components/images/grid.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/images/grid.client.js +1 -1
- package/dist/modules/uploads/components/images/input.client.d.ts +2 -2
- package/dist/modules/uploads/components/images/input.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/preview-dialog.client.d.ts +2 -2
- package/dist/modules/uploads/components/preview-dialog.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/zone.client.d.ts +2 -2
- package/dist/modules/uploads/components/zone.client.d.ts.map +1 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.js +1 -1
- package/dist/modules/uploads/lib/proxy.server.d.ts +1 -1
- package/dist/modules/uploads/lib/proxy.server.js +4 -4
- package/dist/modules/uploads/lib/route.server.d.ts +1 -1
- package/dist/modules/uploads/lib/route.server.js +2 -2
- package/dist/modules/uploads/lib/router.server.d.ts +965 -965
- package/dist/modules/uploads/lib/router.server.d.ts.map +1 -1
- package/dist/modules/uploads/lib/router.server.js +2 -2
- package/dist/modules/uploads/lib/schema.d.ts +61 -61
- package/dist/modules/uploads/lib/validators.d.ts +56 -56
- package/dist/modules/uploads/lib/validators.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/components/common/icons.tsx +6 -0
- package/src/components/entry.client.ts +6 -0
- package/src/components/entry.server.ts +1 -1
- package/src/components/entry.ts +1 -0
- package/src/components/header/bottom-bar.client.tsx +2 -2
- package/src/components/layouts/admin-layout.tsx +13 -0
- package/src/components/layouts/admin-loading.tsx +1 -1
- package/src/components/layouts/not-found-page.tsx +9 -1
- package/src/components/layouts/not-found-section.tsx +10 -5
- package/src/components/layouts/root-loading.tsx +9 -0
- package/src/components/{layouts → navigation}/admin-sidebar-header.client.tsx +11 -6
- package/src/components/navigation/admin-sidebar-paths.client.tsx +190 -0
- package/src/components/navigation/admin-sidebar-skeleton.tsx +44 -0
- package/src/components/navigation/admin-sidebar.client.tsx +123 -0
- package/src/components/ui/spinner.tsx +51 -0
- package/src/modules/auth/components/allowed.client.tsx +1 -1
- package/src/modules/auth/components/auth-layout.server.tsx +2 -10
- package/src/modules/auth/components/auth-loading.tsx +11 -0
- package/src/modules/auth/components/guard.client.tsx +12 -0
- package/src/modules/auth/components/login-page.client.tsx +45 -37
- package/src/modules/auth/entry.client.ts +2 -0
- package/src/modules/auth/entry.server.ts +1 -1
- package/src/modules/auth/entry.ts +1 -0
- package/src/modules/auth/handler/proxy.server.ts +28 -0
- package/src/modules/auth/handler/server.server.ts +5 -0
- package/src/modules/auth/hooks/{use-permission.client.ts → use-permission.ts} +4 -2
- package/src/modules/auth/hooks/use-session.ts +18 -0
- package/src/modules/auth/lib/helpers.server.ts +1 -5
- package/src/modules/auth/lib/validators.ts +1 -1
- package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -7
- package/src/modules/commands/menus/dropdown-menu.client.tsx +11 -2
- package/src/modules/commands/menus/inline-menu.client.tsx +14 -1
- package/src/modules/commands/menus/responsive-menu.client.tsx +11 -2
- package/src/modules/config/entry.server.ts +1 -2
- package/src/modules/config/entry.ts +3 -0
- package/src/modules/config/lib/config.server.ts +1 -2
- package/src/modules/config/lib/router.server.ts +64 -0
- package/src/modules/config/paths/helpers.ts +6 -0
- package/src/modules/config/paths/types.ts +26 -38
- package/src/modules/data-tables/components/filters/combobox.client.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts +1 -1
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/dist/components/layouts/admin-layout.server.d.ts +0 -14
- package/dist/components/layouts/admin-layout.server.d.ts.map +0 -1
- package/dist/components/layouts/admin-layout.server.js +0 -26
- package/dist/components/layouts/admin-layout.server.js.map +0 -1
- package/dist/components/layouts/admin-sidebar-context.client.js +0 -28
- package/dist/components/layouts/admin-sidebar-context.client.js.map +0 -1
- package/dist/components/layouts/admin-sidebar-header.client.js.map +0 -1
- package/dist/components/layouts/admin-sidebar.client.js +0 -51
- package/dist/components/layouts/admin-sidebar.client.js.map +0 -1
- package/dist/modules/auth/components/allowed.server.d.ts +0 -23
- package/dist/modules/auth/components/allowed.server.d.ts.map +0 -1
- package/dist/modules/auth/components/allowed.server.js +0 -24
- package/dist/modules/auth/components/allowed.server.js.map +0 -1
- package/dist/modules/auth/hooks/use-permission.client.js.map +0 -1
- package/dist/modules/config/paths/create.server.d.ts +0 -14
- package/dist/modules/config/paths/create.server.d.ts.map +0 -1
- package/dist/modules/config/paths/create.server.js +0 -12
- package/dist/modules/config/paths/create.server.js.map +0 -1
- package/dist/modules/config/paths/get.server.js +0 -47
- package/dist/modules/config/paths/get.server.js.map +0 -1
- package/src/components/layouts/admin-layout.server.tsx +0 -31
- package/src/components/layouts/admin-sidebar-context.client.tsx +0 -34
- package/src/components/layouts/admin-sidebar.client.tsx +0 -88
- package/src/modules/auth/components/allowed.server.tsx +0 -41
- package/src/modules/config/paths/create.server.ts +0 -10
- package/src/modules/config/paths/get.server.ts +0 -69
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-layout.js","names":[],"sources":["../../../src/components/layouts/admin-layout.tsx"],"sourcesContent":["import { AuthGuard } from \"@/modules/auth/components/guard.client\";\nimport { PropsWithChildren } from \"react\";\nimport { SidebarProvider } from \"../ui/sidebar.client\";\n\nexport function AdminLayout(props: PropsWithChildren) {\n return (\n <AuthGuard>\n <SidebarProvider className=\"max-h-[100dvh] overflow-hidden border\">\n {props.children}\n </SidebarProvider>\n </AuthGuard>\n );\n}\n"],"mappings":";;;;;AAIA,SAAgB,YAAY,OAA0B;AACpD,QACE,oBAAC,uBACC,oBAAC;EAAgB,WAAU;YACxB,MAAM;GACS,GACR"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime243 from "react/jsx-runtime";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/admin-loading.d.ts
|
|
5
|
-
declare function
|
|
5
|
+
declare function AdminLoadingLayout(props: PropsWithChildren): react_jsx_runtime243.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { AdminLoadingLayout };
|
|
8
8
|
//# sourceMappingURL=admin-loading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-loading.d.ts","names":[],"sources":["../../../src/components/layouts/admin-loading.tsx"],"sourcesContent":[],"mappings":";;;;iBAGgB,
|
|
1
|
+
{"version":3,"file":"admin-loading.d.ts","names":[],"sources":["../../../src/components/layouts/admin-loading.tsx"],"sourcesContent":[],"mappings":";;;;iBAGgB,kBAAA,QAA0B,oBAAiB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { Skeleton } from "../ui/skeleton.js";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/admin-loading.tsx
|
|
5
|
-
function
|
|
5
|
+
function AdminLoadingLayout(props) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
7
7
|
className: "h-dvh",
|
|
8
8
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-[var(--header-top-bar-height)] w-full rounded-none border-b" }), props.children]
|
|
@@ -10,5 +10,5 @@ function AdminLoading(props) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { AdminLoadingLayout };
|
|
14
14
|
//# sourceMappingURL=admin-loading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-loading.js","names":[],"sources":["../../../src/components/layouts/admin-loading.tsx"],"sourcesContent":["import { PropsWithChildren } from \"react\";\nimport { Skeleton } from \"../ui/skeleton\";\n\nexport function
|
|
1
|
+
{"version":3,"file":"admin-loading.js","names":[],"sources":["../../../src/components/layouts/admin-loading.tsx"],"sourcesContent":["import { PropsWithChildren } from \"react\";\nimport { Skeleton } from \"../ui/skeleton\";\n\nexport function AdminLoadingLayout(props: PropsWithChildren) {\n return (\n <div className=\"h-dvh\">\n <Skeleton className=\"h-[var(--header-top-bar-height)] w-full rounded-none border-b\" />\n {props.children}\n </div>\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,mBAAmB,OAA0B;AAC3D,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC,YAAS,WAAU,kEAAkE,EACrF,MAAM;GACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime244 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, HTMLAttributes } from "react";
|
|
3
3
|
import { Route } from "next";
|
|
4
4
|
|
|
@@ -15,17 +15,17 @@ declare function EmptyPage({
|
|
|
15
15
|
className,
|
|
16
16
|
children,
|
|
17
17
|
...props
|
|
18
|
-
}: ComponentProps<"div">):
|
|
18
|
+
}: ComponentProps<"div">): react_jsx_runtime244.JSX.Element;
|
|
19
19
|
declare function EmptyPageTitle({
|
|
20
20
|
className,
|
|
21
21
|
children,
|
|
22
22
|
...props
|
|
23
|
-
}: ComponentProps<"h2">):
|
|
23
|
+
}: ComponentProps<"h2">): react_jsx_runtime244.JSX.Element;
|
|
24
24
|
declare function EmptyPageDescription({
|
|
25
25
|
className,
|
|
26
26
|
children,
|
|
27
27
|
...props
|
|
28
|
-
}: ComponentProps<"p">):
|
|
28
|
+
}: ComponentProps<"p">): react_jsx_runtime244.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle };
|
|
31
31
|
//# sourceMappingURL=empty-page.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime247 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/list-layout.d.ts
|
|
@@ -6,7 +6,7 @@ declare function ListLayout({
|
|
|
6
6
|
className,
|
|
7
7
|
children,
|
|
8
8
|
...props
|
|
9
|
-
}: ComponentProps<"div">):
|
|
9
|
+
}: ComponentProps<"div">): react_jsx_runtime247.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ListLayout };
|
|
12
12
|
//# sourceMappingURL=list-layout.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime238 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/layouts/not-found-page.d.ts
|
|
4
|
-
declare function
|
|
4
|
+
declare function AdminNotFoundPage(): react_jsx_runtime238.JSX.Element;
|
|
5
|
+
declare function NotFoundPage(): react_jsx_runtime238.JSX.Element;
|
|
5
6
|
//#endregion
|
|
6
|
-
export { NotFoundPage };
|
|
7
|
+
export { AdminNotFoundPage, NotFoundPage };
|
|
7
8
|
//# sourceMappingURL=not-found-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-page.d.ts","names":[],"sources":["../../../src/components/layouts/not-found-page.tsx"],"sourcesContent":[],"mappings":";;;iBAEgB,YAAA,CAAA,GAAY,oBAAA,CAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"not-found-page.d.ts","names":[],"sources":["../../../src/components/layouts/not-found-page.tsx"],"sourcesContent":[],"mappings":";;;iBAEgB,iBAAA,CAAA,GAAiB,oBAAA,CAAA,GAAA,CAAA;iBAQjB,YAAA,CAAA,GAAY,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -2,13 +2,19 @@ import { NotFoundSection } from "./not-found-section.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/not-found-page.tsx
|
|
5
|
+
function AdminNotFoundPage() {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: "relative z-0 grid h-[100dvh] w-full place-items-center",
|
|
8
|
+
children: /* @__PURE__ */ jsx(NotFoundSection, { href: "/admin" })
|
|
9
|
+
});
|
|
10
|
+
}
|
|
5
11
|
function NotFoundPage() {
|
|
6
12
|
return /* @__PURE__ */ jsx("div", {
|
|
7
13
|
className: "relative z-0 grid h-[100dvh] w-full place-items-center",
|
|
8
|
-
children: /* @__PURE__ */ jsx(NotFoundSection, {
|
|
14
|
+
children: /* @__PURE__ */ jsx(NotFoundSection, {})
|
|
9
15
|
});
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
//#endregion
|
|
13
|
-
export { NotFoundPage };
|
|
19
|
+
export { AdminNotFoundPage, NotFoundPage };
|
|
14
20
|
//# sourceMappingURL=not-found-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-page.js","names":[],"sources":["../../../src/components/layouts/not-found-page.tsx"],"sourcesContent":["import { NotFoundSection } from \"./not-found-section\";\n\nexport function
|
|
1
|
+
{"version":3,"file":"not-found-page.js","names":[],"sources":["../../../src/components/layouts/not-found-page.tsx"],"sourcesContent":["import { NotFoundSection } from \"./not-found-section\";\n\nexport function AdminNotFoundPage() {\n return (\n <div className=\"relative z-0 grid h-[100dvh] w-full place-items-center\">\n <NotFoundSection href=\"/admin\" />\n </div>\n );\n}\n\nexport function NotFoundPage() {\n return (\n <div className=\"relative z-0 grid h-[100dvh] w-full place-items-center\">\n <NotFoundSection />\n </div>\n );\n}\n"],"mappings":";;;;AAEA,SAAgB,oBAAoB;AAClC,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC,mBAAgB,MAAK,WAAW;GAC7B;;AAIV,SAAgB,eAAe;AAC7B,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC,oBAAkB;GACf"}
|
|
@@ -17,7 +17,7 @@ function NotFoundSection({ href }) {
|
|
|
17
17
|
className: "text-2xl font-bold lg:text-3xl",
|
|
18
18
|
children: "Oeps, deze pagina is niet gevonden."
|
|
19
19
|
})]
|
|
20
|
-
}), /* @__PURE__ */ jsxs(Link, {
|
|
20
|
+
}), href && /* @__PURE__ */ jsxs(Link, {
|
|
21
21
|
href,
|
|
22
22
|
className: cn(buttonVariants({ variant: "secondary" }), "text-foreground"),
|
|
23
23
|
children: [/* @__PURE__ */ jsx(HomeIcon, { className: "mr-2 size-4" }), "Terug naar home"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-section.js","names":[],"sources":["../../../src/components/layouts/not-found-section.tsx"],"sourcesContent":["import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { HomeIcon } from \"lucide-react\";\nimport type { Route } from \"next\";\nimport Link from \"next/link\";\n\nexport function NotFoundSection({ href }: { href
|
|
1
|
+
{"version":3,"file":"not-found-section.js","names":[],"sources":["../../../src/components/layouts/not-found-section.tsx"],"sourcesContent":["import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { HomeIcon } from \"lucide-react\";\nimport type { Route } from \"next\";\nimport Link from \"next/link\";\n\nexport function NotFoundSection({ href }: { href?: Route }) {\n return (\n <div className=\"flex flex-col items-center gap-12 text-center\">\n <span className=\"text-foreground space-y-2\">\n <h2 className=\"text-9xl font-bold leading-none\">404</h2>\n <h1 className=\"text-2xl font-bold lg:text-3xl\">Oeps, deze pagina is niet gevonden.</h1>\n </span>\n\n {href && (\n <Link\n href={href}\n className={cn(buttonVariants({ variant: \"secondary\" }), \"text-foreground\")}\n >\n <HomeIcon className=\"mr-2 size-4\" />\n Terug naar home\n </Link>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,gBAAgB,EAAE,QAA0B;AAC1D,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAK,WAAU;cACd,oBAAC;IAAG,WAAU;cAAkC;KAAQ,EACxD,oBAAC;IAAG,WAAU;cAAiC;KAAwC;IAClF,EAEN,QACC,qBAAC;GACO;GACN,WAAW,GAAG,eAAe,EAAE,SAAS,aAAa,CAAC,EAAE,kBAAkB;cAE1E,oBAAC,YAAS,WAAU,gBAAgB;IAE/B;GAEL"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime126 from "react/jsx-runtime";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/providers.client.d.ts
|
|
5
5
|
declare function Providers({
|
|
6
6
|
children
|
|
7
|
-
}: PropsWithChildren):
|
|
7
|
+
}: PropsWithChildren): react_jsx_runtime126.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Providers };
|
|
10
10
|
//# sourceMappingURL=providers.client.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TDatabaseSchema } from "../../modules/config/db/types.js";
|
|
2
2
|
import { TulipConfig } from "../../modules/config/lib/config.server.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
4
4
|
import { PropsWithChildren } from "react";
|
|
5
5
|
import "server-cli-only";
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ declare const generateRootLayoutMetadata: <TSchema extends TDatabaseSchema>(conf
|
|
|
32
32
|
*/
|
|
33
33
|
declare function RootLayout({
|
|
34
34
|
children
|
|
35
|
-
}: PropsWithChildren):
|
|
35
|
+
}: PropsWithChildren): react_jsx_runtime24.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { RootLayout, generateRootLayoutMetadata };
|
|
38
38
|
//# sourceMappingURL=root-layout.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-layout.server.d.ts","names":[],"sources":["../../../src/components/layouts/root-layout.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;AAYa,cAAA,0BA0BX,EAAA,CAAA,gBA1ByD,eA0BzD,CAAA,CAAA,MAAA,EAzBQ,WAyBR,CAzBoB,OAyBpB,CAAA,EAAA,GAAA;EAAA,QAAA,EAAA;IA1ByD,KAAA,EAAA,MAAA;IACrC,WAAA,EAAA,MAAA;IAAZ,WAAA,EAAA;MAAW,OAAA,EAAA,IAAA;MA8BL,cAAU,EAAA,mBAAA;MAAA,KAAA,EAAA,MAAA;IAAG,CAAA;;UAA6B,EAAA;IAAA,KAAA,EAAA,MAAA;;;;;;;;;;;iBAA1C,UAAA;;GAAyB,oBAAiB,
|
|
1
|
+
{"version":3,"file":"root-layout.server.d.ts","names":[],"sources":["../../../src/components/layouts/root-layout.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;AAYa,cAAA,0BA0BX,EAAA,CAAA,gBA1ByD,eA0BzD,CAAA,CAAA,MAAA,EAzBQ,WAyBR,CAzBoB,OAyBpB,CAAA,EAAA,GAAA;EAAA,QAAA,EAAA;IA1ByD,KAAA,EAAA,MAAA;IACrC,WAAA,EAAA,MAAA;IAAZ,WAAA,EAAA;MAAW,OAAA,EAAA,IAAA;MA8BL,cAAU,EAAA,mBAAA;MAAA,KAAA,EAAA,MAAA;IAAG,CAAA;;UAA6B,EAAA;IAAA,KAAA,EAAA,MAAA;;;;;;;;;;;iBAA1C,UAAA;;GAAyB,oBAAiB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-loading.d.ts","names":[],"sources":["../../../src/components/layouts/root-loading.tsx"],"sourcesContent":[],"mappings":";;;iBAEgB,WAAA,CAAA,GAAW,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Spinner } from "../ui/spinner.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/layouts/root-loading.tsx
|
|
5
|
+
function RootLoading() {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: "grid h-dvh w-full place-items-center",
|
|
8
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RootLoading };
|
|
14
|
+
//# sourceMappingURL=root-loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-loading.js","names":[],"sources":["../../../src/components/layouts/root-loading.tsx"],"sourcesContent":["import { Spinner } from \"../ui/spinner\";\n\nexport function RootLoading() {\n return (\n <div className=\"grid h-dvh w-full place-items-center\">\n <Spinner />\n </div>\n );\n}\n"],"mappings":";;;;AAEA,SAAgB,cAAc;AAC5B,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC,YAAU;GACP"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Permission } from "../../modules/auth/lib/permissions.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime256 from "react/jsx-runtime";
|
|
3
3
|
import { Route } from "next";
|
|
4
4
|
|
|
5
5
|
//#region src/components/layouts/tab-layout.d.ts
|
|
@@ -17,7 +17,7 @@ type TabLayoutProps = {
|
|
|
17
17
|
declare function TabLayout({
|
|
18
18
|
tabs,
|
|
19
19
|
children
|
|
20
|
-
}: TabLayoutProps):
|
|
20
|
+
}: TabLayoutProps): react_jsx_runtime256.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Tab, TabLayout, TabLayoutProps };
|
|
23
23
|
//# sourceMappingURL=tab-layout.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime257 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/lists/data-list.d.ts
|
|
@@ -7,25 +7,25 @@ declare function DataList({
|
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: DataListProps):
|
|
10
|
+
}: DataListProps): react_jsx_runtime257.JSX.Element;
|
|
11
11
|
type DataListItemProps = React.HTMLAttributes<HTMLElement>;
|
|
12
12
|
declare function DataListItem({
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: DataListItemProps):
|
|
16
|
+
}: DataListItemProps): react_jsx_runtime257.JSX.Element;
|
|
17
17
|
type DataListTitleProps = React.HTMLAttributes<HTMLElement>;
|
|
18
18
|
declare function DataListTitle({
|
|
19
19
|
children,
|
|
20
20
|
className,
|
|
21
21
|
...props
|
|
22
|
-
}: DataListTitleProps):
|
|
22
|
+
}: DataListTitleProps): react_jsx_runtime257.JSX.Element;
|
|
23
23
|
type DataListValueProps = React.HTMLAttributes<HTMLElement>;
|
|
24
24
|
declare function DataListValue({
|
|
25
25
|
children,
|
|
26
26
|
className,
|
|
27
27
|
...props
|
|
28
|
-
}: DataListValueProps):
|
|
28
|
+
}: DataListValueProps): react_jsx_runtime257.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps };
|
|
31
31
|
//# sourceMappingURL=data-list.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime248 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/lists/data-stack.d.ts
|
|
@@ -7,43 +7,43 @@ declare function DataStackGrid({
|
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: DataStackGridProps):
|
|
10
|
+
}: DataStackGridProps): react_jsx_runtime248.JSX.Element;
|
|
11
11
|
type DataStackLayoutProps = React.HTMLAttributes<HTMLElement>;
|
|
12
12
|
declare function DataStackLayout({
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: DataStackLayoutProps):
|
|
16
|
+
}: DataStackLayoutProps): react_jsx_runtime248.JSX.Element;
|
|
17
17
|
type DataStackRowProps = React.HTMLAttributes<HTMLElement>;
|
|
18
18
|
declare function DataStackRow({
|
|
19
19
|
children,
|
|
20
20
|
className,
|
|
21
21
|
...props
|
|
22
|
-
}: DataStackRowProps):
|
|
22
|
+
}: DataStackRowProps): react_jsx_runtime248.JSX.Element;
|
|
23
23
|
type DataStackColumnProps = React.HTMLAttributes<HTMLElement>;
|
|
24
24
|
declare function DataStackColumn({
|
|
25
25
|
children,
|
|
26
26
|
className,
|
|
27
27
|
...props
|
|
28
|
-
}: DataStackRowProps):
|
|
28
|
+
}: DataStackRowProps): react_jsx_runtime248.JSX.Element;
|
|
29
29
|
type DataStackProps = React.HTMLAttributes<HTMLOListElement>;
|
|
30
30
|
declare function DataStack({
|
|
31
31
|
children,
|
|
32
32
|
className,
|
|
33
33
|
...props
|
|
34
|
-
}: DataStackProps):
|
|
34
|
+
}: DataStackProps): react_jsx_runtime248.JSX.Element;
|
|
35
35
|
type DataStackTitleProps = React.HTMLAttributes<HTMLElement>;
|
|
36
36
|
declare function DataStackTitle({
|
|
37
37
|
children,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: DataStackTitleProps):
|
|
40
|
+
}: DataStackTitleProps): react_jsx_runtime248.JSX.Element;
|
|
41
41
|
type DataStackValueProps = React.HTMLAttributes<HTMLElement>;
|
|
42
42
|
declare function DataStackValue({
|
|
43
43
|
children,
|
|
44
44
|
className,
|
|
45
45
|
...props
|
|
46
|
-
}: DataStackValueProps):
|
|
46
|
+
}: DataStackValueProps): react_jsx_runtime248.JSX.Element;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps };
|
|
49
49
|
//# sourceMappingURL=data-stack.d.ts.map
|
|
@@ -5,21 +5,20 @@ import { cn } from "../../lib/utils/cn.js";
|
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
6
6
|
import { authClient } from "../../modules/auth/handler/client.client.js";
|
|
7
7
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../ui/dropdown-menu.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useSession } from "../../modules/auth/hooks/use-session.js";
|
|
9
9
|
import { SidebarHeader, useSidebar } from "../ui/sidebar.client.js";
|
|
10
|
-
import {
|
|
10
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar.client.js";
|
|
11
11
|
import { ChevronsUpDownIcon, LaptopIcon, LogOutIcon, MoonIcon, SunIcon } from "lucide-react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useContext } from "react";
|
|
14
13
|
import { useRouter } from "next/navigation";
|
|
15
14
|
import { useTheme } from "next-themes";
|
|
16
15
|
|
|
17
|
-
//#region src/components/
|
|
16
|
+
//#region src/components/navigation/admin-sidebar-header.client.tsx
|
|
18
17
|
function AdminSidebarHeader() {
|
|
19
18
|
const router = useRouter();
|
|
20
19
|
const { theme, setTheme } = useTheme();
|
|
21
20
|
const { setOpenMobile } = useSidebar();
|
|
22
|
-
const
|
|
21
|
+
const sessionQuery = useSession();
|
|
23
22
|
return /* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
24
23
|
asChild: true,
|
|
25
24
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
@@ -30,12 +29,12 @@ function AdminSidebarHeader() {
|
|
|
30
29
|
children: [/* @__PURE__ */ jsxs(Avatar, {
|
|
31
30
|
className: "h-6 w-6 text-sm",
|
|
32
31
|
children: [/* @__PURE__ */ jsx(AvatarImage, {
|
|
33
|
-
src:
|
|
34
|
-
alt:
|
|
35
|
-
}), /* @__PURE__ */ jsx(AvatarFallback, { children:
|
|
32
|
+
src: sessionQuery.data?.user.image ?? void 0,
|
|
33
|
+
alt: sessionQuery.data?.user.name
|
|
34
|
+
}), /* @__PURE__ */ jsx(AvatarFallback, { children: sessionQuery.data?.user.name?.[0] ?? "" })]
|
|
36
35
|
}), /* @__PURE__ */ jsx("span", {
|
|
37
36
|
className: "text-md text-muted-foreground font-bold",
|
|
38
|
-
children:
|
|
37
|
+
children: sessionQuery.data?.user.name
|
|
39
38
|
})]
|
|
40
39
|
}), /* @__PURE__ */ jsx(ChevronsUpDownIcon, { className: "text-muted-foreground h-4 w-4" })]
|
|
41
40
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-sidebar-header.client.js","names":[],"sources":["../../../src/components/navigation/admin-sidebar-header.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar.client\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { authClient } from \"@/modules/auth/handler/client.client\";\nimport { useSession } from \"@/modules/auth/hooks/use-session\";\nimport { ChevronsUpDownIcon, LaptopIcon, LogOutIcon, MoonIcon, SunIcon } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\nimport { useRouter } from \"next/navigation\";\nimport { SidebarHeader, useSidebar } from \"../entry.client\";\n\nexport function AdminSidebarHeader() {\n const router = useRouter();\n const { theme, setTheme } = useTheme();\n\n const { setOpenMobile } = useSidebar();\n\n const sessionQuery = useSession();\n\n return (\n <SidebarHeader>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" className=\"items-center justify-between py-3.5\">\n <div className=\"flex items-center gap-4\">\n <Avatar className=\"h-6 w-6 text-sm\">\n <AvatarImage\n src={sessionQuery.data?.user.image ?? undefined}\n alt={sessionQuery.data?.user.name}\n />\n <AvatarFallback>{sessionQuery.data?.user.name?.[0] ?? \"\"}</AvatarFallback>\n </Avatar>\n <span className=\"text-md text-muted-foreground font-bold\">\n {sessionQuery.data?.user.name}\n </span>\n </div>\n\n <ChevronsUpDownIcon className=\"text-muted-foreground h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent className=\"w-44\">\n <DropdownMenuSub>\n <DropdownMenuSubTrigger>\n <span>Thema</span>\n </DropdownMenuSubTrigger>\n\n <DropdownMenuSubContent>\n <DropdownMenuItem\n className={cn(theme === \"light\" && \"bg-secondary font-bold\")}\n onClick={() => setTheme(\"light\")}\n >\n <SunIcon className=\"mr-2 h-4 w-4\" />\n <span>Light</span>\n </DropdownMenuItem>\n\n <DropdownMenuItem\n className={cn(theme === \"dark\" && \"bg-secondary font-bold\")}\n onClick={() => setTheme(\"dark\")}\n >\n <MoonIcon className=\"mr-2 h-4 w-4\" />\n <span>Dark</span>\n </DropdownMenuItem>\n\n <DropdownMenuItem\n className={cn(theme === \"system\" && \"bg-secondary font-bold\")}\n onClick={() => setTheme(\"system\")}\n >\n <LaptopIcon className=\"mr-2 h-4 w-4\" />\n <span>System</span>\n </DropdownMenuItem>\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuItem\n onClick={() => {\n setOpenMobile(false);\n authClient.signOut({\n fetchOptions: { onSuccess: () => router.replace(\"/auth/login\") },\n });\n }}\n >\n <LogOutIcon className=\"mr-2 h-4 w-4\" />\n <span>Log out</span>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </SidebarHeader>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,SAAgB,qBAAqB;CACnC,MAAM,SAAS,WAAW;CAC1B,MAAM,EAAE,OAAO,aAAa,UAAU;CAEtC,MAAM,EAAE,kBAAkB,YAAY;CAEtC,MAAM,eAAe,YAAY;AAEjC,QACE,oBAAC,2BACC,qBAAC,2BACC,oBAAC;EAAoB;YACnB,qBAAC;GAAO,SAAQ;GAAU,WAAU;cAClC,qBAAC;IAAI,WAAU;eACb,qBAAC;KAAO,WAAU;gBAChB,oBAAC;MACC,KAAK,aAAa,MAAM,KAAK,SAAS;MACtC,KAAK,aAAa,MAAM,KAAK;OAC7B,EACF,oBAAC,4BAAgB,aAAa,MAAM,KAAK,OAAO,MAAM,KAAoB;MACnE,EACT,oBAAC;KAAK,WAAU;eACb,aAAa,MAAM,KAAK;MACpB;KACH,EAEN,oBAAC,sBAAmB,WAAU,kCAAkC;IACzD;GACW,EAEtB,qBAAC;EAAoB,WAAU;;GAC7B,qBAAC,8BACC,oBAAC,oCACC,oBAAC,oBAAK,UAAY,GACK,EAEzB,qBAAC;IACC,qBAAC;KACC,WAAW,GAAG,UAAU,WAAW,yBAAyB;KAC5D,eAAe,SAAS,QAAQ;gBAEhC,oBAAC,WAAQ,WAAU,iBAAiB,EACpC,oBAAC,oBAAK,UAAY;MACD;IAEnB,qBAAC;KACC,WAAW,GAAG,UAAU,UAAU,yBAAyB;KAC3D,eAAe,SAAS,OAAO;gBAE/B,oBAAC,YAAS,WAAU,iBAAiB,EACrC,oBAAC,oBAAK,SAAW;MACA;IAEnB,qBAAC;KACC,WAAW,GAAG,UAAU,YAAY,yBAAyB;KAC7D,eAAe,SAAS,SAAS;gBAEjC,oBAAC,cAAW,WAAU,iBAAiB,EACvC,oBAAC,oBAAK,WAAa;MACF;OACI,IACT;GAElB,oBAAC,0BAAwB;GAEzB,qBAAC;IACC,eAAe;AACb,mBAAc,MAAM;AACpB,gBAAW,QAAQ,EACjB,cAAc,EAAE,iBAAiB,OAAO,QAAQ,cAAc,EAAE,EACjE,CAAC;;eAGJ,oBAAC,cAAW,WAAU,iBAAiB,EACvC,oBAAC,oBAAK,YAAc;KACH;;GACC,IACT,GACD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Permission } from "../../modules/auth/lib/permissions.js";
|
|
2
|
+
import { Sidebar } from "../ui/sidebar.client.js";
|
|
3
|
+
import * as react_jsx_runtime127 from "react/jsx-runtime";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { Route } from "next";
|
|
6
|
+
|
|
7
|
+
//#region src/components/navigation/admin-sidebar-paths.client.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Paths
|
|
10
|
+
*/
|
|
11
|
+
declare function Paths({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: React$1.ComponentProps<typeof Sidebar>): react_jsx_runtime127.JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Path Group
|
|
17
|
+
*/
|
|
18
|
+
declare function PathGroup(props: React$1.ComponentProps<"div">): react_jsx_runtime127.JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Path Group Title
|
|
21
|
+
*/
|
|
22
|
+
declare function PathGroupTitle(props: React$1.ComponentProps<"div">): react_jsx_runtime127.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Path Group Items
|
|
25
|
+
*/
|
|
26
|
+
declare function PathGroupItems(props: React$1.PropsWithChildren): react_jsx_runtime127.JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Path
|
|
29
|
+
*/
|
|
30
|
+
type PathProps = React$1.ComponentProps<"li"> & {
|
|
31
|
+
permission?: Permission;
|
|
32
|
+
isActive?: boolean;
|
|
33
|
+
segment?: string;
|
|
34
|
+
};
|
|
35
|
+
declare function Path({
|
|
36
|
+
permission,
|
|
37
|
+
children,
|
|
38
|
+
isActive,
|
|
39
|
+
segment,
|
|
40
|
+
...props
|
|
41
|
+
}: PathProps): react_jsx_runtime127.JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Path Button
|
|
44
|
+
*/
|
|
45
|
+
declare function PathLink({
|
|
46
|
+
href,
|
|
47
|
+
children
|
|
48
|
+
}: React$1.PropsWithChildren<{
|
|
49
|
+
href: Route;
|
|
50
|
+
}>): react_jsx_runtime127.JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* Path Items
|
|
53
|
+
*/
|
|
54
|
+
declare function PathItems(props: React$1.ComponentProps<"ul">): react_jsx_runtime127.JSX.Element | null;
|
|
55
|
+
/**
|
|
56
|
+
* Path Sub Item
|
|
57
|
+
*/
|
|
58
|
+
type PathSubItemProps = React$1.ComponentProps<"li"> & {
|
|
59
|
+
permission?: Permission;
|
|
60
|
+
isActive?: boolean;
|
|
61
|
+
segment?: string;
|
|
62
|
+
};
|
|
63
|
+
declare function PathSubItem({
|
|
64
|
+
permission,
|
|
65
|
+
isActive,
|
|
66
|
+
segment,
|
|
67
|
+
children,
|
|
68
|
+
...props
|
|
69
|
+
}: PathSubItemProps): react_jsx_runtime127.JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* Path Button
|
|
72
|
+
*/
|
|
73
|
+
declare function PathSubItemLink({
|
|
74
|
+
href,
|
|
75
|
+
children
|
|
76
|
+
}: React$1.PropsWithChildren<{
|
|
77
|
+
href: Route;
|
|
78
|
+
}>): react_jsx_runtime127.JSX.Element;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths };
|
|
81
|
+
//# sourceMappingURL=admin-sidebar-paths.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-sidebar-paths.client.d.ts","names":[],"sources":["../../../src/components/navigation/admin-sidebar-paths.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;AAiCgB,iBAAA,KAAA,CAAK;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAyB,OAAA,CAAM,cAA/B,CAAA,OAAqD,OAArD,CAAA,CAAA,EAA6D,oBAAA,CAAA,GAAA,CAAA,OAA7D;;;;AAAyB,iBAoB9B,SAAA,CApBoC,KAAA,EAoBnB,OAAA,CAAM,cApBa,CAAA,KAAA,CAAA,CAAA,EAoBQ,oBAAA,CAAA,GAAA,CAAA,OApBR;;;AAoBpD;AAAyB,iBAOT,cAAA,CAPS,KAAA,EAOa,OAAA,CAAM,cAPnB,CAAA,KAAA,CAAA,CAAA,EAOwC,oBAAA,CAAA,GAAA,CAAA,OAPxC;;;;AAOT,iBAOA,cAAA,CAPc,KAAA,EAOQ,OAAA,CAAM,iBAPd,CAAA,EAO+B,oBAAA,CAAA,GAAA,CAAA,OAP/B;;;;KAuBzB,SAAA,GAAY,OAAA,CAAM,cAvB0C,CAAA,IAAA,CAAA,GAAA;EAOjD,UAAA,CAAA,EAiBD,UAjBe;EAAA,QAAA,CAAA,EAAA,OAAA;SAAQ,CAAA,EAAA,MAAM;;AAAiB,iBAsB7C,IAAA,CAtB6C;EAAA,UAAA;EAAA,QAAA;EAAA,QAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAsBe,SAtBf,CAAA,EAsBwB,oBAAA,CAAA,GAAA,CAAA,OAtBxB;AAM5D;;;AAWc,iBA4BC,QAAA,CA5BD;EAAA,IAAA;EAAA;AAKf,CALe,EA4B8B,OAAA,CAAM,iBA5BpC,CAAA;EAAU,IAAA,EA4BoD,KA5BpD;AAKzB,CAAA,CAAA,CAAA,EAuBqF,oBAAA,CAAA,GAAA,CAAA,OAvBjE;;;;AAAyB,iBAuC7B,SAAA,CAvC6B,KAAA,EAuCZ,OAAA,CAAM,cAvCM,CAAA,IAAA,CAAA,CAAA,EAuCc,oBAAA,CAAA,GAAA,CAAA,OAAA,GAvCd,IAAA;;;;KAsDxC,gBAAA,GAAmB,OAAA,CAAM,cAtDuD,CAAA,IAAA,CAAA,GAAA;EAuBrE,UAAA,CAAQ,EAgCT,UAhCS;EAAA,QAAA,CAAA,EAAA,OAAA;SAAG,CAAA,EAAA,MAAA;;AAAkD,iBAqC7D,WAAA,CArC6D;EAAA,UAAA;EAAA,QAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA2C1E,gBA3C0E,CAAA,EA2C1D,oBAAA,CAAA,GAAA,CAAA,OA3C0D;;;;AAgB7D,iBAkDA,eAAA,CAlDS;EAAA,IAAA;EAAA;CAAA,EAkD2B,OAAA,CAAM,iBAlDjC,CAAA;EAAA,IAAA,EAkD2D,KAlD3D;KAkDmE,oBAAA,CAAA,GAAA,CAAA,OAlDrD"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { Allowed } from "../../modules/auth/components/allowed.client.js";
|
|
5
|
+
import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarRail, useSidebar } from "../ui/sidebar.client.js";
|
|
6
|
+
import { AdminSidebarHeader } from "./admin-sidebar-header.client.js";
|
|
7
|
+
import { AdminSidebarHeaderLoading, AdminSidebarMenuContentLoading } from "./admin-sidebar-skeleton.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import * as React$1 from "react";
|
|
10
|
+
import { Suspense } from "react";
|
|
11
|
+
import Link from "next/link";
|
|
12
|
+
import { useSelectedLayoutSegments } from "next/navigation";
|
|
13
|
+
|
|
14
|
+
//#region src/components/navigation/admin-sidebar-paths.client.tsx
|
|
15
|
+
/**
|
|
16
|
+
* Paths
|
|
17
|
+
*/
|
|
18
|
+
function Paths({ children,...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(Sidebar, {
|
|
20
|
+
...props,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Suspense, {
|
|
23
|
+
fallback: /* @__PURE__ */ jsx(AdminSidebarHeaderLoading, {}),
|
|
24
|
+
children: /* @__PURE__ */ jsx(AdminSidebarHeader, {})
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(Suspense, {
|
|
27
|
+
fallback: /* @__PURE__ */ jsx(AdminSidebarMenuContentLoading, {}),
|
|
28
|
+
children: /* @__PURE__ */ jsx(SidebarMenu, { children })
|
|
29
|
+
}) }),
|
|
30
|
+
/* @__PURE__ */ jsx(SidebarRail, {})
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Path Group
|
|
36
|
+
*/
|
|
37
|
+
function PathGroup(props) {
|
|
38
|
+
return /* @__PURE__ */ jsx(SidebarGroup, { ...props });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Path Group Title
|
|
42
|
+
*/
|
|
43
|
+
function PathGroupTitle(props) {
|
|
44
|
+
return /* @__PURE__ */ jsx(SidebarGroupLabel, { ...props });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Path Group Items
|
|
48
|
+
*/
|
|
49
|
+
function PathGroupItems(props) {
|
|
50
|
+
return /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: props.children }) });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Path Context
|
|
54
|
+
*/
|
|
55
|
+
const PathContext = React$1.createContext({});
|
|
56
|
+
function Path({ permission, children, isActive, segment,...props }) {
|
|
57
|
+
const currentSegments = useSelectedLayoutSegments();
|
|
58
|
+
if (!permission) return /* @__PURE__ */ jsx(PathContext, {
|
|
59
|
+
value: { isActive: isActive || segment === currentSegments?.[0] },
|
|
60
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
61
|
+
...props,
|
|
62
|
+
children
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ jsx(Allowed, {
|
|
66
|
+
permission,
|
|
67
|
+
children: /* @__PURE__ */ jsx(PathContext, {
|
|
68
|
+
value: { isActive: isActive || segment === currentSegments?.[0] },
|
|
69
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
70
|
+
...props,
|
|
71
|
+
children
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Path Button
|
|
78
|
+
*/
|
|
79
|
+
function PathLink({ href, children }) {
|
|
80
|
+
const { isMobile, toggleSidebar } = useSidebar();
|
|
81
|
+
const { isActive } = React$1.useContext(PathContext);
|
|
82
|
+
return /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
83
|
+
asChild: true,
|
|
84
|
+
isActive,
|
|
85
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
86
|
+
href,
|
|
87
|
+
onClick: isMobile ? toggleSidebar : void 0,
|
|
88
|
+
children
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Path Items
|
|
94
|
+
*/
|
|
95
|
+
function PathItems(props) {
|
|
96
|
+
const { isActive } = React$1.useContext(PathContext);
|
|
97
|
+
if (!isActive) return null;
|
|
98
|
+
return /* @__PURE__ */ jsx(SidebarMenuSub, { ...props });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Path Sub Item Context
|
|
102
|
+
*/
|
|
103
|
+
const PathSubItemContext = React$1.createContext({});
|
|
104
|
+
function PathSubItem({ permission, isActive, segment, children,...props }) {
|
|
105
|
+
const currentSegments = useSelectedLayoutSegments();
|
|
106
|
+
if (!permission) return /* @__PURE__ */ jsx(PathSubItemContext, {
|
|
107
|
+
value: { isActive: isActive || segment === currentSegments?.[1] },
|
|
108
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSubItem, {
|
|
109
|
+
...props,
|
|
110
|
+
children
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ jsx(Allowed, {
|
|
114
|
+
permission,
|
|
115
|
+
children: /* @__PURE__ */ jsx(PathSubItemContext, {
|
|
116
|
+
value: { isActive: isActive || segment === currentSegments?.[1] },
|
|
117
|
+
children: /* @__PURE__ */ jsx(SidebarMenuSubItem, {
|
|
118
|
+
...props,
|
|
119
|
+
children
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Path Button
|
|
126
|
+
*/
|
|
127
|
+
function PathSubItemLink({ href, children }) {
|
|
128
|
+
const { isMobile, toggleSidebar } = useSidebar();
|
|
129
|
+
const { isActive } = React$1.useContext(PathSubItemContext);
|
|
130
|
+
return /* @__PURE__ */ jsx(SidebarMenuSubButton, {
|
|
131
|
+
asChild: true,
|
|
132
|
+
isActive,
|
|
133
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
134
|
+
href,
|
|
135
|
+
onClick: isMobile ? toggleSidebar : void 0,
|
|
136
|
+
children
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
export { Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths };
|
|
143
|
+
//# sourceMappingURL=admin-sidebar-paths.client.js.map
|