@trackany-device/components 1.0.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/package.json +185 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/map/arrows/map-arrow-blue.png +0 -0
- package/src/assets/map/arrows/map-arrow-green.png +0 -0
- package/src/assets/map/arrows/map-arrow-purple.png +0 -0
- package/src/assets/map/arrows/map-arrow-red.png +0 -0
- package/src/assets/map/flags/flag-blue.png +0 -0
- package/src/assets/map/flags/flag-green.png +0 -0
- package/src/assets/map/flags/flag-red.png +0 -0
- package/src/assets/map/flags/flag-yellow.png +0 -0
- package/src/assets/map/pins/map-pin-blue.png +0 -0
- package/src/assets/map/pins/map-pin-green.png +0 -0
- package/src/assets/map/pins/map-pin-purple.png +0 -0
- package/src/assets/map/pins/map-pin-red.png +0 -0
- package/src/components/Card.tsx +9 -0
- package/src/components/alert-error.tsx +24 -0
- package/src/components/app-content.tsx +22 -0
- package/src/components/app-header.tsx +153 -0
- package/src/components/app-logo-icon.tsx +13 -0
- package/src/components/app-logo.tsx +21 -0
- package/src/components/app-shell.tsx +19 -0
- package/src/components/app-sidebar-header.tsx +68 -0
- package/src/components/app-sidebar.tsx +106 -0
- package/src/components/appearance-tabs.tsx +46 -0
- package/src/components/breadcrumbs.tsx +50 -0
- package/src/components/cms/blurred-image.tsx +111 -0
- package/src/components/cms/section-bg.tsx +473 -0
- package/src/components/cms/section-button.tsx +127 -0
- package/src/components/cms/sections/banner-5050-section.tsx +135 -0
- package/src/components/cms/sections/blogs-listing-section.tsx +270 -0
- package/src/components/cms/sections/cards-grid-section.tsx +185 -0
- package/src/components/cms/sections/contact-form-section.tsx +157 -0
- package/src/components/cms/sections/cta-section.tsx +101 -0
- package/src/components/cms/sections/featured-blog-slider-section.tsx +256 -0
- package/src/components/cms/sections/featured-products-grid-section.tsx +173 -0
- package/src/components/cms/sections/featured-solutions-grid-section.tsx +183 -0
- package/src/components/cms/sections/hero-section.tsx +180 -0
- package/src/components/cms/sections/solutions-with-filter-section.tsx +234 -0
- package/src/components/cms/sections/text-section.tsx +77 -0
- package/src/components/cutout-image.tsx +228 -0
- package/src/components/devices/devices-mini-map.tsx +275 -0
- package/src/components/docs/docs-shell.tsx +280 -0
- package/src/components/fleet-hero-animated.tsx +383 -0
- package/src/components/input-error.tsx +17 -0
- package/src/components/keenicons/assets/duotone/Read Me.txt +7 -0
- package/src/components/keenicons/assets/duotone/demo-files/demo.css +160 -0
- package/src/components/keenicons/assets/duotone/demo-files/demo.js +32 -0
- package/src/components/keenicons/assets/duotone/demo.html +12424 -0
- package/src/components/keenicons/assets/duotone/fonts/keenicons-duotone.svg +1109 -0
- package/src/components/keenicons/assets/duotone/fonts/keenicons-duotone.ttf +0 -0
- package/src/components/keenicons/assets/duotone/fonts/keenicons-duotone.woff +0 -0
- package/src/components/keenicons/assets/duotone/selection.json +17313 -0
- package/src/components/keenicons/assets/duotone/style.css +4931 -0
- package/src/components/keenicons/assets/filled/Read Me.txt +7 -0
- package/src/components/keenicons/assets/filled/demo-files/demo.css +160 -0
- package/src/components/keenicons/assets/filled/demo-files/demo.js +32 -0
- package/src/components/keenicons/assets/filled/demo.html +12370 -0
- package/src/components/keenicons/assets/filled/fonts/keenicons-filled.svg +1082 -0
- package/src/components/keenicons/assets/filled/fonts/keenicons-filled.ttf +0 -0
- package/src/components/keenicons/assets/filled/fonts/keenicons-filled.woff +0 -0
- package/src/components/keenicons/assets/filled/selection.json +17096 -0
- package/src/components/keenicons/assets/filled/style.css +4769 -0
- package/src/components/keenicons/assets/outline/Read Me.txt +7 -0
- package/src/components/keenicons/assets/outline/demo-files/demo.css +160 -0
- package/src/components/keenicons/assets/outline/demo-files/demo.js +32 -0
- package/src/components/keenicons/assets/outline/demo.html +11356 -0
- package/src/components/keenicons/assets/outline/fonts/keenicons-outline.svg +575 -0
- package/src/components/keenicons/assets/outline/fonts/keenicons-outline.ttf +0 -0
- package/src/components/keenicons/assets/outline/fonts/keenicons-outline.woff +0 -0
- package/src/components/keenicons/assets/outline/selection.json +13054 -0
- package/src/components/keenicons/assets/outline/style.css +1721 -0
- package/src/components/keenicons/assets/solid/Read Me.txt +7 -0
- package/src/components/keenicons/assets/solid/demo-files/demo.css +160 -0
- package/src/components/keenicons/assets/solid/demo-files/demo.js +32 -0
- package/src/components/keenicons/assets/solid/demo.html +11356 -0
- package/src/components/keenicons/assets/solid/fonts/keenicons-solid.svg +575 -0
- package/src/components/keenicons/assets/solid/fonts/keenicons-solid.ttf +0 -0
- package/src/components/keenicons/assets/solid/fonts/keenicons-solid.woff +0 -0
- package/src/components/keenicons/assets/solid/selection.json +13048 -0
- package/src/components/keenicons/assets/solid/style.css +1721 -0
- package/src/components/keenicons/assets/styles.css +4 -0
- package/src/components/keenicons/index.ts +2 -0
- package/src/components/keenicons/keenicons.tsx +16 -0
- package/src/components/keenicons/types.ts +7 -0
- package/src/components/nav-footer.tsx +49 -0
- package/src/components/nav-main.tsx +53 -0
- package/src/components/nav-user.tsx +59 -0
- package/src/components/notification-bell.tsx +190 -0
- package/src/components/products/product-card.tsx +159 -0
- package/src/components/text-link.tsx +23 -0
- package/src/components/ui/accordion-menu.tsx +322 -0
- package/src/components/ui/accordion.tsx +133 -0
- package/src/components/ui/alert-dialog.tsx +82 -0
- package/src/components/ui/alert.tsx +63 -0
- package/src/components/ui/avatar-group.tsx +129 -0
- package/src/components/ui/avatar.tsx +67 -0
- package/src/components/ui/badge.tsx +230 -0
- package/src/components/ui/breadcrumb.tsx +88 -0
- package/src/components/ui/button.tsx +412 -0
- package/src/components/ui/calendar.tsx +56 -0
- package/src/components/ui/card.tsx +147 -0
- package/src/components/ui/chart.tsx +290 -0
- package/src/components/ui/checkbox.tsx +47 -0
- package/src/components/ui/code.tsx +45 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/command-palette.tsx +189 -0
- package/src/components/ui/command.tsx +138 -0
- package/src/components/ui/cookie-banner.tsx +220 -0
- package/src/components/ui/copy-button.tsx +60 -0
- package/src/components/ui/data-grid-column-filter.tsx +124 -0
- package/src/components/ui/data-grid-column-header.tsx +284 -0
- package/src/components/ui/data-grid-column-visibility.tsx +38 -0
- package/src/components/ui/data-grid-pagination.tsx +206 -0
- package/src/components/ui/data-grid-table-dnd-rows.tsx +147 -0
- package/src/components/ui/data-grid-table-dnd.tsx +175 -0
- package/src/components/ui/data-grid-table.tsx +500 -0
- package/src/components/ui/data-grid.tsx +193 -0
- package/src/components/ui/data-list.tsx +76 -0
- package/src/components/ui/datefield.tsx +91 -0
- package/src/components/ui/dialog.tsx +139 -0
- package/src/components/ui/divider.tsx +41 -0
- package/src/components/ui/drawer.tsx +59 -0
- package/src/components/ui/dropdown-menu.tsx +224 -0
- package/src/components/ui/empty-state.tsx +54 -0
- package/src/components/ui/file-upload.tsx +152 -0
- package/src/components/ui/form.tsx +88 -0
- package/src/components/ui/icon.tsx +14 -0
- package/src/components/ui/input-otp.tsx +71 -0
- package/src/components/ui/input.tsx +155 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +31 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +37 -0
- package/src/components/ui/placeholder-pattern.tsx +21 -0
- package/src/components/ui/popover.tsx +50 -0
- package/src/components/ui/progress.tsx +65 -0
- package/src/components/ui/radio-group.tsx +73 -0
- package/src/components/ui/resizable.tsx +39 -0
- package/src/components/ui/scroll-area.tsx +50 -0
- package/src/components/ui/select.tsx +234 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +147 -0
- package/src/components/ui/sidebar.tsx +721 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +35 -0
- package/src/components/ui/sonner.tsx +28 -0
- package/src/components/ui/sortable.tsx +724 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/stat-card.tsx +82 -0
- package/src/components/ui/stepper.tsx +410 -0
- package/src/components/ui/switch.tsx +68 -0
- package/src/components/ui/table.tsx +42 -0
- package/src/components/ui/tabs.tsx +196 -0
- package/src/components/ui/timeline.tsx +90 -0
- package/src/components/ui/toggle-group.tsx +73 -0
- package/src/components/ui/toggle.tsx +45 -0
- package/src/components/ui/tooltip.tsx +55 -0
- package/src/components/user-info.tsx +33 -0
- package/src/components/user-menu-content.tsx +53 -0
- package/src/components/web/SiteFooter.tsx +154 -0
- package/src/components/web/SiteHeader.tsx +159 -0
- package/src/components/workflows/workflow-canvas.tsx +321 -0
- package/src/controls/Blockquote.tsx +25 -0
- package/src/controls/Button.tsx +101 -0
- package/src/controls/Checkbox.tsx +29 -0
- package/src/controls/DateField.tsx +37 -0
- package/src/controls/FormField.tsx +20 -0
- package/src/controls/Heading.tsx +28 -0
- package/src/controls/Input.tsx +21 -0
- package/src/controls/Label.tsx +18 -0
- package/src/controls/Paragraph.tsx +39 -0
- package/src/controls/PasswordInput.tsx +40 -0
- package/src/controls/RadioGroup.tsx +70 -0
- package/src/controls/Select.tsx +24 -0
- package/src/controls/Slider.tsx +33 -0
- package/src/controls/Switch.tsx +31 -0
- package/src/controls/Textarea.tsx +22 -0
- package/src/elements/ConfirmPasswordForm.tsx +43 -0
- package/src/elements/DeviceStatusBadge.tsx +38 -0
- package/src/elements/DriverCard.tsx +67 -0
- package/src/elements/ForgotPasswordForm.tsx +64 -0
- package/src/elements/IncidentCard.tsx +67 -0
- package/src/elements/LoginForm.tsx +100 -0
- package/src/elements/OtpForm.tsx +71 -0
- package/src/elements/RegisterForm.tsx +150 -0
- package/src/elements/ResetPasswordForm.tsx +72 -0
- package/src/elements/SmsChallengeForm.tsx +104 -0
- package/src/elements/VehicleCard.tsx +73 -0
- package/src/elements/VerifyEmailForm.tsx +39 -0
- package/src/hooks/use-appearance.tsx +117 -0
- package/src/hooks/use-applied-theme.ts +98 -0
- package/src/hooks/use-clipboard.ts +34 -0
- package/src/hooks/use-current-url.ts +83 -0
- package/src/hooks/use-dark-mode.ts +48 -0
- package/src/hooks/use-flash-toast.ts +29 -0
- package/src/hooks/use-initials.tsx +24 -0
- package/src/hooks/use-mobile-navigation.ts +12 -0
- package/src/hooks/use-mobile.tsx +38 -0
- package/src/index.ts +408 -0
- package/src/layouts/AppLayout.tsx +60 -0
- package/src/layouts/AuthLayout.tsx +32 -0
- package/src/layouts/SettingsLayout.tsx +21 -0
- package/src/layouts/app/AIChatLayout.tsx +73 -0
- package/src/layouts/app/AsideSidebarLayout.tsx +3 -0
- package/src/layouts/app/CalendarSidebarLayout.tsx +69 -0
- package/src/layouts/app/CommunitiesNavbarLayout.tsx +3 -0
- package/src/layouts/app/DualNavbarSidebarLayout.tsx +3 -0
- package/src/layouts/app/FocusSidebarLayout.tsx +75 -0
- package/src/layouts/app/MailLayout.tsx +69 -0
- package/src/layouts/app/MegaMenuHeaderLayout.tsx +3 -0
- package/src/layouts/app/MegaMenuLayout.tsx +81 -0
- package/src/layouts/app/MegaMenuNavbarLayout.tsx +88 -0
- package/src/layouts/app/MegaMenuSearchNavbarLayout.tsx +3 -0
- package/src/layouts/app/NavbarCollapsibleLayout.tsx +88 -0
- package/src/layouts/app/NavbarCollapsibleLinksLayout.tsx +3 -0
- package/src/layouts/app/NavbarMinimalLayout.tsx +3 -0
- package/src/layouts/app/NavbarMinimalSidebarLayout.tsx +3 -0
- package/src/layouts/app/NavbarSidebarDashboardLayout.tsx +3 -0
- package/src/layouts/app/NavbarSidebarLayout.tsx +92 -0
- package/src/layouts/app/NavbarSimpleSidebarLayout.tsx +3 -0
- package/src/layouts/app/NavbarTitledSidebarLayout.tsx +3 -0
- package/src/layouts/app/PanelSidebarLayout.tsx +3 -0
- package/src/layouts/app/SearchNavbarSidebarLayout.tsx +3 -0
- package/src/layouts/app/SidebarBreadcrumbLayout.tsx +3 -0
- package/src/layouts/app/SidebarCleanLayout.tsx +3 -0
- package/src/layouts/app/SidebarCommunitiesLayout.tsx +3 -0
- package/src/layouts/app/SidebarContentLayout.tsx +3 -0
- package/src/layouts/app/SidebarDualMenuLayout.tsx +104 -0
- package/src/layouts/app/SidebarFixedLayout.tsx +166 -0
- package/src/layouts/app/SidebarFooterNavbarLayout.tsx +3 -0
- package/src/layouts/app/SidebarHeaderMenuLayout.tsx +3 -0
- package/src/layouts/app/SidebarMegaMenuLayout.tsx +4 -0
- package/src/layouts/app/SidebarMinimalLayout.tsx +70 -0
- package/src/layouts/app/SidebarMobileSearchLayout.tsx +3 -0
- package/src/layouts/app/SidebarMultiPanelLayout.tsx +3 -0
- package/src/layouts/app/SidebarPrimarySecondaryLayout.tsx +3 -0
- package/src/layouts/app/SidebarSearchHeaderLayout.tsx +103 -0
- package/src/layouts/app/SidebarSearchToolbarLayout.tsx +3 -0
- package/src/layouts/app/SidebarTabsDualLayout.tsx +3 -0
- package/src/layouts/app/SidebarTabsLayout.tsx +98 -0
- package/src/layouts/app/SidebarTreeLayout.tsx +3 -0
- package/src/layouts/app/SplitNavbarLayout.tsx +3 -0
- package/src/layouts/app/SplitSidebarDashboardLayout.tsx +3 -0
- package/src/layouts/app/SplitSidebarLayout.tsx +99 -0
- package/src/layouts/app/TopNavLayout.tsx +105 -0
- package/src/layouts/app/TopNavLinksLayout.tsx +3 -0
- package/src/layouts/app/WorkspaceBreadcrumbLayout.tsx +3 -0
- package/src/layouts/app/WorkspaceCommunitiesLayout.tsx +3 -0
- package/src/layouts/app/WorkspaceNavbarLayout.tsx +3 -0
- package/src/layouts/app/WorkspaceSidebarLayout.tsx +98 -0
- package/src/layouts/app/WorkspaceSidebarTitleLayout.tsx +3 -0
- package/src/layouts/app/app-header-layout.tsx +45 -0
- package/src/layouts/app/app-sidebar-layout.tsx +56 -0
- package/src/layouts/app/layout-context.tsx +44 -0
- package/src/layouts/app/layout-types.ts +47 -0
- package/src/layouts/app/partials/Footer.tsx +35 -0
- package/src/layouts/app/partials/HeaderTopbar.tsx +96 -0
- package/src/layouts/app/partials/Navbar.tsx +85 -0
- package/src/layouts/app/partials/Toolbar.tsx +47 -0
- package/src/layouts/app-layout.tsx +29 -0
- package/src/layouts/auth/AuthBrandedLayout.tsx +58 -0
- package/src/layouts/auth/AuthCardLayout.tsx +31 -0
- package/src/layouts/auth/AuthCenteredLayout.tsx +41 -0
- package/src/layouts/auth/AuthClassicLayout.tsx +41 -0
- package/src/layouts/auth/AuthSimpleLayout.tsx +33 -0
- package/src/layouts/auth/AuthSplitLayout.tsx +89 -0
- package/src/layouts/web-app-layout.tsx +162 -0
- package/src/layouts/web-layout.tsx +23 -0
- package/src/lib/datetime.ts +188 -0
- package/src/lib/google-maps-loader.ts +99 -0
- package/src/lib/location.ts +127 -0
- package/src/lib/lucide-icon-map.ts +132 -0
- package/src/lib/map-markers.ts +124 -0
- package/src/lib/map-styles.ts +351 -0
- package/src/lib/utils.ts +11 -0
- package/src/platform/adapters/default.tsx +156 -0
- package/src/platform/adapters/inertia.tsx +88 -0
- package/src/platform/adapters/nextjs.ts +86 -0
- package/src/platform/context.tsx +106 -0
- package/src/platform/index.ts +27 -0
- package/src/platform/types.ts +105 -0
- package/src/styles/layouts/sidebar-fixed.css +161 -0
- package/src/styles/themes.css +583 -0
- package/src/types/assets.d.ts +5 -0
- package/src/types/auth.ts +25 -0
- package/src/types/global.d.ts +13 -0
- package/src/types/index.ts +9 -0
- package/src/types/navigation.ts +15 -0
- package/src/types/ui.ts +32 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useSyncExternalStore } from 'react';
|
|
4
|
+
|
|
5
|
+
const MOBILE_BREAKPOINT = 768;
|
|
6
|
+
|
|
7
|
+
const mql =
|
|
8
|
+
typeof window === 'undefined'
|
|
9
|
+
? undefined
|
|
10
|
+
: window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
11
|
+
|
|
12
|
+
function mediaQueryListener(callback: (event: MediaQueryListEvent) => void) {
|
|
13
|
+
if (!mql) {
|
|
14
|
+
return () => {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
mql.addEventListener('change', callback);
|
|
18
|
+
|
|
19
|
+
return () => {
|
|
20
|
+
mql.removeEventListener('change', callback);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isSmallerThanBreakpoint(): boolean {
|
|
25
|
+
return mql?.matches ?? false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getServerSnapshot(): boolean {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function useIsMobile(): boolean {
|
|
33
|
+
return useSyncExternalStore(
|
|
34
|
+
mediaQueryListener,
|
|
35
|
+
isSmallerThanBreakpoint,
|
|
36
|
+
getServerSnapshot,
|
|
37
|
+
);
|
|
38
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
// ─── Platform Adapter ────────────────────────────────────────────────────────
|
|
2
|
+
// Framework-agnostic Link / useForm / usePage / navigate abstraction.
|
|
3
|
+
// Each app creates and provides its own adapter at the root.
|
|
4
|
+
export {
|
|
5
|
+
PlatformProvider,
|
|
6
|
+
PlatformLink,
|
|
7
|
+
usePlatform,
|
|
8
|
+
usePlatformLink,
|
|
9
|
+
usePlatformNavigate,
|
|
10
|
+
usePlatformUrl,
|
|
11
|
+
usePlatformPageProps,
|
|
12
|
+
usePlatformForm,
|
|
13
|
+
usePlatformHead,
|
|
14
|
+
defaultAdapter,
|
|
15
|
+
createInertiaAdapter,
|
|
16
|
+
createNextjsAdapter,
|
|
17
|
+
} from './platform';
|
|
18
|
+
export type {
|
|
19
|
+
PlatformAdapter,
|
|
20
|
+
PlatformLinkProps,
|
|
21
|
+
PlatformForm,
|
|
22
|
+
PlatformHeadProps,
|
|
23
|
+
NavigateOptions,
|
|
24
|
+
FormSubmitOptions,
|
|
25
|
+
} from './platform';
|
|
26
|
+
|
|
27
|
+
// ─── Utilities ───────────────────────────────────────────────────────────────
|
|
28
|
+
export { cn, toUrl } from './lib/utils';
|
|
29
|
+
|
|
30
|
+
// Icons — KeenIcons (font-based, ~1 200 icons in duotone/filled/solid/outline styles)
|
|
31
|
+
// Consumers must also import the font CSS:
|
|
32
|
+
// import '@trackany-device/components/styles/keenicons.css'
|
|
33
|
+
export { KeenIcon } from './components/keenicons/keenicons';
|
|
34
|
+
export type { KeeniconsProps, KeeniconsStyle } from './components/keenicons/types';
|
|
35
|
+
|
|
36
|
+
// Components — generic, reusable primitives (ShadCN-style)
|
|
37
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/ui/card';
|
|
38
|
+
|
|
39
|
+
// App chrome components
|
|
40
|
+
export { default as AppLogo } from './components/app-logo';
|
|
41
|
+
export { default as AppLogoIcon } from './components/app-logo-icon';
|
|
42
|
+
export { AppShell } from './components/app-shell';
|
|
43
|
+
export { AppContent } from './components/app-content';
|
|
44
|
+
export { AppHeader } from './components/app-header';
|
|
45
|
+
export { AppSidebar, DEFAULT_TENANT_NAV } from './components/app-sidebar';
|
|
46
|
+
export { AppSidebarHeader } from './components/app-sidebar-header';
|
|
47
|
+
export { NavMain } from './components/nav-main';
|
|
48
|
+
export { NavUser } from './components/nav-user';
|
|
49
|
+
export { NavFooter } from './components/nav-footer';
|
|
50
|
+
export { NotificationBell } from './components/notification-bell';
|
|
51
|
+
export type { NotificationBellProps } from './components/notification-bell';
|
|
52
|
+
export { UserInfo } from './components/user-info';
|
|
53
|
+
export { UserMenuContent } from './components/user-menu-content';
|
|
54
|
+
export { Breadcrumbs } from './components/breadcrumbs';
|
|
55
|
+
|
|
56
|
+
// Utility components
|
|
57
|
+
export { default as AlertError } from './components/alert-error';
|
|
58
|
+
export { default as InputError } from './components/input-error';
|
|
59
|
+
export { default as AppearanceTabs } from './components/appearance-tabs';
|
|
60
|
+
export { default as TextLink } from './components/text-link';
|
|
61
|
+
export { default as CutoutImage } from './components/cutout-image';
|
|
62
|
+
export { default as FleetHeroAnimated } from './components/fleet-hero-animated';
|
|
63
|
+
|
|
64
|
+
// UI primitives (ShadCN-compatible, moved from core/resources/js/components/ui/)
|
|
65
|
+
|
|
66
|
+
// New Metronic UI components
|
|
67
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './components/ui/accordion';
|
|
68
|
+
export {
|
|
69
|
+
AccordionMenu, AccordionMenuGroup, AccordionMenuIndicator, AccordionMenuItem,
|
|
70
|
+
AccordionMenuLabel, AccordionMenuSeparator, AccordionMenuSub,
|
|
71
|
+
AccordionMenuSubContent, AccordionMenuSubTrigger,
|
|
72
|
+
} from './components/ui/accordion-menu';
|
|
73
|
+
export type { AccordionMenuClassNames } from './components/ui/accordion-menu';
|
|
74
|
+
export {
|
|
75
|
+
AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
|
|
76
|
+
AlertDialogDescription, AlertDialogFooter, AlertDialogHeader,
|
|
77
|
+
AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger,
|
|
78
|
+
} from './components/ui/alert-dialog';
|
|
79
|
+
export { AvatarGroup, AvatarGroupItem, AvatarGroupTooltip } from './components/ui/avatar-group';
|
|
80
|
+
export { Calendar } from './components/ui/calendar';
|
|
81
|
+
export {
|
|
82
|
+
ChartContainer, ChartTooltip, ChartTooltipContent,
|
|
83
|
+
ChartLegend, ChartLegendContent, ChartStyle,
|
|
84
|
+
} from './components/ui/chart';
|
|
85
|
+
export type { ChartConfig } from './components/ui/chart';
|
|
86
|
+
export {
|
|
87
|
+
DataGrid, DataGridContext, useDataGrid,
|
|
88
|
+
} from './components/ui/data-grid';
|
|
89
|
+
export type { DataGridProps, DataGridContextProps, DataGridApiFetchParams, DataGridApiResponse } from './components/ui/data-grid';
|
|
90
|
+
export { DataGridTable } from './components/ui/data-grid-table';
|
|
91
|
+
export { DataGridPagination } from './components/ui/data-grid-pagination';
|
|
92
|
+
export { DataGridColumnFilter } from './components/ui/data-grid-column-filter';
|
|
93
|
+
export { DataGridColumnHeader } from './components/ui/data-grid-column-header';
|
|
94
|
+
export { DataGridColumnVisibility } from './components/ui/data-grid-column-visibility';
|
|
95
|
+
// DateField primitives (named with "Primitive" prefix to avoid conflict with controls/DateField)
|
|
96
|
+
export { DateField as DateFieldPrimitive, TimeField, DateInput, DateSegment } from './components/ui/datefield';
|
|
97
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './components/ui/drawer';
|
|
98
|
+
// RHF form primitives (FormField aliased to avoid conflict with controls/FormField)
|
|
99
|
+
export { Form, FormControl, FormDescription, FormField as RHFFormField, FormItem, FormLabel, FormMessage, useFormField } from './components/ui/form';
|
|
100
|
+
export { Progress, ProgressCircle } from './components/ui/progress';
|
|
101
|
+
// RadioGroup primitive (RadioGroupItem exported; RadioGroup itself conflicts with controls/RadioGroup)
|
|
102
|
+
export { RadioGroup as RadioGroupPrimitive, RadioGroupItem } from './components/ui/radio-group';
|
|
103
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './components/ui/resizable';
|
|
104
|
+
export { ScrollArea, ScrollBar } from './components/ui/scroll-area';
|
|
105
|
+
// Slider/Switch primitives (conflicts with controls/Slider and controls/Switch)
|
|
106
|
+
export { Slider as SliderPrimitive, SliderThumb } from './components/ui/slider';
|
|
107
|
+
export { Switch as SwitchPrimitive, SwitchWrapper } from './components/ui/switch';
|
|
108
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './components/ui/table';
|
|
109
|
+
export { Stepper } from './components/ui/stepper';
|
|
110
|
+
|
|
111
|
+
export { Alert, AlertTitle, AlertDescription } from './components/ui/alert';
|
|
112
|
+
export { Avatar, AvatarImage, AvatarFallback } from './components/ui/avatar';
|
|
113
|
+
export { Badge, badgeVariants } from './components/ui/badge';
|
|
114
|
+
export {
|
|
115
|
+
Breadcrumb,
|
|
116
|
+
BreadcrumbList,
|
|
117
|
+
BreadcrumbItem,
|
|
118
|
+
BreadcrumbLink,
|
|
119
|
+
BreadcrumbPage,
|
|
120
|
+
BreadcrumbSeparator,
|
|
121
|
+
BreadcrumbEllipsis,
|
|
122
|
+
} from './components/ui/breadcrumb';
|
|
123
|
+
export { Checkbox as RadixCheckbox } from './components/ui/checkbox';
|
|
124
|
+
export { Code, CodeBlock } from './components/ui/code';
|
|
125
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './components/ui/collapsible';
|
|
126
|
+
export {
|
|
127
|
+
CommandPaletteRoot,
|
|
128
|
+
CommandPaletteTrigger,
|
|
129
|
+
CommandPaletteLink,
|
|
130
|
+
} from './components/ui/command-palette';
|
|
131
|
+
export type { CommandItem } from './components/ui/command-palette';
|
|
132
|
+
export { CookieBanner } from './components/ui/cookie-banner';
|
|
133
|
+
export { CopyButton } from './components/ui/copy-button';
|
|
134
|
+
export { DataList, DataListItem } from './components/ui/data-list';
|
|
135
|
+
export {
|
|
136
|
+
Dialog,
|
|
137
|
+
DialogClose,
|
|
138
|
+
DialogContent,
|
|
139
|
+
DialogDescription,
|
|
140
|
+
DialogFooter,
|
|
141
|
+
DialogHeader,
|
|
142
|
+
DialogOverlay,
|
|
143
|
+
DialogPortal,
|
|
144
|
+
DialogTitle,
|
|
145
|
+
DialogTrigger,
|
|
146
|
+
} from './components/ui/dialog';
|
|
147
|
+
export { Divider } from './components/ui/divider';
|
|
148
|
+
export {
|
|
149
|
+
DropdownMenu,
|
|
150
|
+
DropdownMenuPortal,
|
|
151
|
+
DropdownMenuTrigger,
|
|
152
|
+
DropdownMenuContent,
|
|
153
|
+
DropdownMenuGroup,
|
|
154
|
+
DropdownMenuLabel,
|
|
155
|
+
DropdownMenuItem,
|
|
156
|
+
DropdownMenuCheckboxItem,
|
|
157
|
+
DropdownMenuRadioGroup,
|
|
158
|
+
DropdownMenuRadioItem,
|
|
159
|
+
DropdownMenuSeparator,
|
|
160
|
+
DropdownMenuShortcut,
|
|
161
|
+
DropdownMenuSub,
|
|
162
|
+
DropdownMenuSubTrigger,
|
|
163
|
+
DropdownMenuSubContent,
|
|
164
|
+
} from './components/ui/dropdown-menu';
|
|
165
|
+
export { EmptyState } from './components/ui/empty-state';
|
|
166
|
+
export { FileUpload } from './components/ui/file-upload';
|
|
167
|
+
export { Icon } from './components/ui/icon';
|
|
168
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from './components/ui/input-otp';
|
|
169
|
+
export { Kbd } from './components/ui/kbd';
|
|
170
|
+
export {
|
|
171
|
+
NavigationMenu,
|
|
172
|
+
NavigationMenuList,
|
|
173
|
+
NavigationMenuItem,
|
|
174
|
+
NavigationMenuContent,
|
|
175
|
+
NavigationMenuTrigger,
|
|
176
|
+
NavigationMenuLink,
|
|
177
|
+
NavigationMenuIndicator,
|
|
178
|
+
NavigationMenuViewport,
|
|
179
|
+
navigationMenuTriggerStyle,
|
|
180
|
+
} from './components/ui/navigation-menu';
|
|
181
|
+
export { Pagination } from './components/ui/pagination';
|
|
182
|
+
export { PlaceholderPattern } from './components/ui/placeholder-pattern';
|
|
183
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/ui/popover';
|
|
184
|
+
export {
|
|
185
|
+
Select as RadixSelect,
|
|
186
|
+
SelectContent,
|
|
187
|
+
SelectGroup,
|
|
188
|
+
SelectItem,
|
|
189
|
+
SelectLabel,
|
|
190
|
+
SelectScrollDownButton,
|
|
191
|
+
SelectScrollUpButton,
|
|
192
|
+
SelectSeparator,
|
|
193
|
+
SelectTrigger,
|
|
194
|
+
SelectValue,
|
|
195
|
+
} from './components/ui/select';
|
|
196
|
+
export { Separator } from './components/ui/separator';
|
|
197
|
+
export {
|
|
198
|
+
Sheet,
|
|
199
|
+
SheetTrigger,
|
|
200
|
+
SheetClose,
|
|
201
|
+
SheetContent,
|
|
202
|
+
SheetHeader,
|
|
203
|
+
SheetFooter,
|
|
204
|
+
SheetTitle,
|
|
205
|
+
SheetDescription,
|
|
206
|
+
} from './components/ui/sheet';
|
|
207
|
+
export {
|
|
208
|
+
Sidebar,
|
|
209
|
+
SidebarContent,
|
|
210
|
+
SidebarFooter,
|
|
211
|
+
SidebarGroup,
|
|
212
|
+
SidebarGroupAction,
|
|
213
|
+
SidebarGroupContent,
|
|
214
|
+
SidebarGroupLabel,
|
|
215
|
+
SidebarHeader,
|
|
216
|
+
SidebarInput,
|
|
217
|
+
SidebarInset,
|
|
218
|
+
SidebarMenu,
|
|
219
|
+
SidebarMenuAction,
|
|
220
|
+
SidebarMenuBadge,
|
|
221
|
+
SidebarMenuButton,
|
|
222
|
+
SidebarMenuItem,
|
|
223
|
+
SidebarMenuSkeleton,
|
|
224
|
+
SidebarMenuSub,
|
|
225
|
+
SidebarMenuSubButton,
|
|
226
|
+
SidebarMenuSubItem,
|
|
227
|
+
SidebarProvider,
|
|
228
|
+
SidebarRail,
|
|
229
|
+
SidebarSeparator,
|
|
230
|
+
SidebarTrigger,
|
|
231
|
+
useSidebar,
|
|
232
|
+
} from './components/ui/sidebar';
|
|
233
|
+
export { Skeleton } from './components/ui/skeleton';
|
|
234
|
+
export { Toaster } from './components/ui/sonner';
|
|
235
|
+
export { Spinner } from './components/ui/spinner';
|
|
236
|
+
export { StatCard } from './components/ui/stat-card';
|
|
237
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/ui/tabs';
|
|
238
|
+
export { Timeline, TimelineItem } from './components/ui/timeline';
|
|
239
|
+
export { Toggle, toggleVariants } from './components/ui/toggle';
|
|
240
|
+
export { ToggleGroup, ToggleGroupItem } from './components/ui/toggle-group';
|
|
241
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/ui/tooltip';
|
|
242
|
+
|
|
243
|
+
// Controls — atomic UI controls (inputs, buttons, typography)
|
|
244
|
+
// Button is the single canonical button — superset of both the legacy API and ShadCN API
|
|
245
|
+
export { Button, buttonVariants } from './controls/Button';
|
|
246
|
+
export { Label } from './controls/Label';
|
|
247
|
+
export { Input } from './controls/Input';
|
|
248
|
+
export { PasswordInput } from './controls/PasswordInput';
|
|
249
|
+
export { Select } from './controls/Select';
|
|
250
|
+
export { Checkbox } from './controls/Checkbox';
|
|
251
|
+
export { Textarea } from './controls/Textarea';
|
|
252
|
+
export { FormField } from './controls/FormField';
|
|
253
|
+
export { Heading } from './controls/Heading';
|
|
254
|
+
export { Paragraph } from './controls/Paragraph';
|
|
255
|
+
export { Blockquote } from './controls/Blockquote';
|
|
256
|
+
export { RadioGroup } from './controls/RadioGroup';
|
|
257
|
+
export { Switch } from './controls/Switch';
|
|
258
|
+
export { Slider } from './controls/Slider';
|
|
259
|
+
export { DateField } from './controls/DateField';
|
|
260
|
+
|
|
261
|
+
// Elements — domain-specific composites
|
|
262
|
+
|
|
263
|
+
// Fleet domain elements
|
|
264
|
+
export { VehicleCard } from './elements/VehicleCard';
|
|
265
|
+
export type { VehicleCardData, VehicleStatus } from './elements/VehicleCard';
|
|
266
|
+
export { DriverCard } from './elements/DriverCard';
|
|
267
|
+
export type { DriverCardData } from './elements/DriverCard';
|
|
268
|
+
export { DeviceStatusBadge } from './elements/DeviceStatusBadge';
|
|
269
|
+
export type { DeviceStatus } from './elements/DeviceStatusBadge';
|
|
270
|
+
export { IncidentCard } from './elements/IncidentCard';
|
|
271
|
+
export type { IncidentCardData, IncidentSeverity } from './elements/IncidentCard';
|
|
272
|
+
|
|
273
|
+
// Auth form elements
|
|
274
|
+
export { LoginForm } from './elements/LoginForm';
|
|
275
|
+
export { RegisterForm } from './elements/RegisterForm';
|
|
276
|
+
export { ForgotPasswordForm } from './elements/ForgotPasswordForm';
|
|
277
|
+
export { OtpForm } from './elements/OtpForm';
|
|
278
|
+
export { ResetPasswordForm } from './elements/ResetPasswordForm';
|
|
279
|
+
export { ConfirmPasswordForm } from './elements/ConfirmPasswordForm';
|
|
280
|
+
export { VerifyEmailForm } from './elements/VerifyEmailForm';
|
|
281
|
+
export { SmsChallengeForm } from './elements/SmsChallengeForm';
|
|
282
|
+
export type { LoginFormData, LoginFormErrors } from './elements/LoginForm';
|
|
283
|
+
export type { RegisterFormData, RegisterFormErrors, PhoneCountry } from './elements/RegisterForm';
|
|
284
|
+
export type { ForgotPasswordFormData, ForgotPasswordFormErrors } from './elements/ForgotPasswordForm';
|
|
285
|
+
export type { OtpFormErrors } from './elements/OtpForm';
|
|
286
|
+
export type { ResetPasswordFormData, ResetPasswordFormErrors } from './elements/ResetPasswordForm';
|
|
287
|
+
export type { ConfirmPasswordFormErrors } from './elements/ConfirmPasswordForm';
|
|
288
|
+
export type { SmsChallengeFormErrors } from './elements/SmsChallengeForm';
|
|
289
|
+
|
|
290
|
+
// Web components
|
|
291
|
+
export { default as SiteHeader } from './components/web/SiteHeader';
|
|
292
|
+
export { default as SiteFooter } from './components/web/SiteFooter';
|
|
293
|
+
|
|
294
|
+
// CMS components
|
|
295
|
+
export { BlurredImage } from './components/cms/blurred-image';
|
|
296
|
+
export { SectionButton } from './components/cms/section-button';
|
|
297
|
+
export type { CmsButton } from './components/cms/section-button';
|
|
298
|
+
export { HeroSection } from './components/cms/sections/hero-section';
|
|
299
|
+
export { Banner5050Section } from './components/cms/sections/banner-5050-section';
|
|
300
|
+
export { CardsGridSection } from './components/cms/sections/cards-grid-section';
|
|
301
|
+
export { CtaSection } from './components/cms/sections/cta-section';
|
|
302
|
+
export { TextSection } from './components/cms/sections/text-section';
|
|
303
|
+
export { FeaturedSolutionsGridSection } from './components/cms/sections/featured-solutions-grid-section';
|
|
304
|
+
export type { SolutionCard } from './components/cms/sections/featured-solutions-grid-section';
|
|
305
|
+
export { FeaturedProductsGridSection } from './components/cms/sections/featured-products-grid-section';
|
|
306
|
+
export { FeaturedBlogSliderSection } from './components/cms/sections/featured-blog-slider-section';
|
|
307
|
+
export type { BlogPostCard } from './components/cms/sections/featured-blog-slider-section';
|
|
308
|
+
export { BlogsListingSection } from './components/cms/sections/blogs-listing-section';
|
|
309
|
+
export { ContactFormSection } from './components/cms/sections/contact-form-section';
|
|
310
|
+
export { SolutionsWithFilterSection } from './components/cms/sections/solutions-with-filter-section';
|
|
311
|
+
|
|
312
|
+
// Device components
|
|
313
|
+
export { DevicesMiniMap } from './components/devices/devices-mini-map';
|
|
314
|
+
export type { MiniMapDevice, MiniMapIncident } from './components/devices/devices-mini-map';
|
|
315
|
+
|
|
316
|
+
// Docs components
|
|
317
|
+
export { default as DocsShell, CodeBlock as DocsCodeBlock, Callout } from './components/docs/docs-shell';
|
|
318
|
+
export type { DocsSection } from './components/docs/docs-shell';
|
|
319
|
+
|
|
320
|
+
// Product components
|
|
321
|
+
export { ProductCard } from './components/products/product-card';
|
|
322
|
+
export type { ProductCardData, Currency } from './components/products/product-card';
|
|
323
|
+
|
|
324
|
+
// Workflow components
|
|
325
|
+
export { WorkflowCanvas } from './components/workflows/workflow-canvas';
|
|
326
|
+
|
|
327
|
+
// Layouts — page structure
|
|
328
|
+
export { AuthLayout } from './layouts/AuthLayout';
|
|
329
|
+
export { AppLayout } from './layouts/AppLayout';
|
|
330
|
+
export type { AppVariant } from './layouts/AppLayout';
|
|
331
|
+
export { LayoutProvider, useLayout } from './layouts/app/layout-context';
|
|
332
|
+
export type { BaseAppLayoutProps, AppLayoutUser, AppLayoutFooterLink } from './layouts/app/layout-types';
|
|
333
|
+
|
|
334
|
+
// App layouts — Demo series (10 variants)
|
|
335
|
+
export { TopNavLayout } from './layouts/app/TopNavLayout';
|
|
336
|
+
export { SidebarFixedLayout } from './layouts/app/SidebarFixedLayout';
|
|
337
|
+
export { NavbarCollapsibleLayout } from './layouts/app/NavbarCollapsibleLayout';
|
|
338
|
+
export { SplitSidebarLayout } from './layouts/app/SplitSidebarLayout';
|
|
339
|
+
export { NavbarSidebarLayout } from './layouts/app/NavbarSidebarLayout';
|
|
340
|
+
export { SidebarTabsLayout } from './layouts/app/SidebarTabsLayout';
|
|
341
|
+
export { MegaMenuLayout } from './layouts/app/MegaMenuLayout';
|
|
342
|
+
export { SidebarMinimalLayout } from './layouts/app/SidebarMinimalLayout';
|
|
343
|
+
export { MegaMenuNavbarLayout } from './layouts/app/MegaMenuNavbarLayout';
|
|
344
|
+
export { SidebarDualMenuLayout } from './layouts/app/SidebarDualMenuLayout';
|
|
345
|
+
|
|
346
|
+
// App layouts — Starter kit named aliases (layouts 1-39)
|
|
347
|
+
export { SidebarMegaMenuLayout } from './layouts/app/SidebarMegaMenuLayout';
|
|
348
|
+
export { TopNavLinksLayout } from './layouts/app/TopNavLinksLayout';
|
|
349
|
+
export { NavbarCollapsibleLinksLayout } from './layouts/app/NavbarCollapsibleLinksLayout';
|
|
350
|
+
export { SplitSidebarDashboardLayout } from './layouts/app/SplitSidebarDashboardLayout';
|
|
351
|
+
export { NavbarSidebarDashboardLayout } from './layouts/app/NavbarSidebarDashboardLayout';
|
|
352
|
+
export { SidebarTabsDualLayout } from './layouts/app/SidebarTabsDualLayout';
|
|
353
|
+
export { MegaMenuHeaderLayout } from './layouts/app/MegaMenuHeaderLayout';
|
|
354
|
+
export { SidebarCleanLayout } from './layouts/app/SidebarCleanLayout';
|
|
355
|
+
export { MegaMenuSearchNavbarLayout } from './layouts/app/MegaMenuSearchNavbarLayout';
|
|
356
|
+
export { SidebarPrimarySecondaryLayout } from './layouts/app/SidebarPrimarySecondaryLayout';
|
|
357
|
+
export { SidebarSearchHeaderLayout } from './layouts/app/SidebarSearchHeaderLayout';
|
|
358
|
+
export { WorkspaceSidebarLayout } from './layouts/app/WorkspaceSidebarLayout';
|
|
359
|
+
export { MailLayout } from './layouts/app/MailLayout';
|
|
360
|
+
export { AIChatLayout } from './layouts/app/AIChatLayout';
|
|
361
|
+
export { CalendarSidebarLayout } from './layouts/app/CalendarSidebarLayout';
|
|
362
|
+
export { FocusSidebarLayout } from './layouts/app/FocusSidebarLayout';
|
|
363
|
+
export { SettingsLayout } from './layouts/SettingsLayout';
|
|
364
|
+
export { default as AuthSplitLayout } from './layouts/auth/AuthSplitLayout';
|
|
365
|
+
export { default as AuthCenteredLayout } from './layouts/auth/AuthCenteredLayout';
|
|
366
|
+
export { default as AuthSimpleLayout } from './layouts/auth/AuthSimpleLayout';
|
|
367
|
+
export { default as AuthCardLayout } from './layouts/auth/AuthCardLayout';
|
|
368
|
+
export { default as AuthBrandedLayout } from './layouts/auth/AuthBrandedLayout';
|
|
369
|
+
export { default as AuthClassicLayout } from './layouts/auth/AuthClassicLayout';
|
|
370
|
+
export { default as WebLayout } from './layouts/web-layout';
|
|
371
|
+
export { default as WebAppLayout } from './layouts/web-app-layout';
|
|
372
|
+
export { default as AppSidebarLayout } from './layouts/app/app-sidebar-layout';
|
|
373
|
+
export { default as AppHeaderLayout } from './layouts/app/app-header-layout';
|
|
374
|
+
|
|
375
|
+
// Hooks
|
|
376
|
+
export { useDarkMode } from './hooks/use-dark-mode';
|
|
377
|
+
export { useIsMobile } from './hooks/use-mobile';
|
|
378
|
+
export { useInitials } from './hooks/use-initials';
|
|
379
|
+
export { useClipboard } from './hooks/use-clipboard';
|
|
380
|
+
export { useFlashToast } from './hooks/use-flash-toast';
|
|
381
|
+
export { useAppearance, initializeTheme } from './hooks/use-appearance';
|
|
382
|
+
export { useAppliedTheme, initializeAppliedTheme } from './hooks/use-applied-theme';
|
|
383
|
+
export { useCurrentUrl } from './hooks/use-current-url';
|
|
384
|
+
export { useMobileNavigation } from './hooks/use-mobile-navigation';
|
|
385
|
+
|
|
386
|
+
// Lib exports
|
|
387
|
+
export { formatLocalDateTime, formatLocalDate, formatLocalTime, formatRelative, browserTimezone, resolveTimezone, setSharedTimezone, useUserTimezone, reportBrowserTimezone } from './lib/datetime';
|
|
388
|
+
export { hasGoogleMapsKey, loadGoogleMaps } from './lib/google-maps-loader';
|
|
389
|
+
export { cachedCoords, setCachedCoords, useLocationConsent, attachLocationToInertiaVisits, useEagerLocationConsent } from './lib/location';
|
|
390
|
+
export type { Coords, ConsentStatus } from './lib/location';
|
|
391
|
+
export { LUCIDE_ICON_MAP, lucideIcon } from './lib/lucide-icon-map';
|
|
392
|
+
export { MAP_STYLES, mapStyleByName, mapStyleForAppearance, watchDarkMode, isDarkMode } from './lib/map-styles';
|
|
393
|
+
export type { MapStyleName } from './lib/map-styles';
|
|
394
|
+
export {
|
|
395
|
+
networkTier, markerColor,
|
|
396
|
+
arrowRotation, useArrow, deviceArrowUrl,
|
|
397
|
+
devicePinColor,
|
|
398
|
+
incidentFlagUrl,
|
|
399
|
+
arrows, flags,
|
|
400
|
+
ARROW_URLS, FLAG_URLS, PIN_COLORS,
|
|
401
|
+
} from './lib/map-markers';
|
|
402
|
+
export type { NetworkTier, MarkerColor, IncidentSeverity as MapIncidentSeverity } from './lib/map-markers';
|
|
403
|
+
|
|
404
|
+
// Types
|
|
405
|
+
export type { AuthLayoutProps, AuthLayoutVariant } from './types';
|
|
406
|
+
export type { User, Auth, TwoFactorSetupData, TwoFactorSecretKey } from './types/auth';
|
|
407
|
+
export type { BreadcrumbItem as BreadcrumbItemData, NavItem } from './types/navigation';
|
|
408
|
+
export type { AppLayoutProps, FlashToast } from './types/ui';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { BaseAppLayoutProps } from './app/layout-types';
|
|
2
|
+
import { TopNavLayout } from './app/TopNavLayout';
|
|
3
|
+
import { SidebarFixedLayout } from './app/SidebarFixedLayout';
|
|
4
|
+
import { NavbarCollapsibleLayout } from './app/NavbarCollapsibleLayout';
|
|
5
|
+
import { SplitSidebarLayout } from './app/SplitSidebarLayout';
|
|
6
|
+
import { NavbarSidebarLayout } from './app/NavbarSidebarLayout';
|
|
7
|
+
import { SidebarTabsLayout } from './app/SidebarTabsLayout';
|
|
8
|
+
import { MegaMenuLayout } from './app/MegaMenuLayout';
|
|
9
|
+
import { SidebarMinimalLayout } from './app/SidebarMinimalLayout';
|
|
10
|
+
import { MegaMenuNavbarLayout } from './app/MegaMenuNavbarLayout';
|
|
11
|
+
import { SidebarDualMenuLayout } from './app/SidebarDualMenuLayout';
|
|
12
|
+
|
|
13
|
+
export type AppVariant =
|
|
14
|
+
// Demo layouts
|
|
15
|
+
| 'top-nav' // demo2 — horizontal navbar, no sidebar (default)
|
|
16
|
+
| 'sidebar-fixed' // demo1 — fixed collapsible sidebar + fixed header
|
|
17
|
+
| 'navbar-collapsible' // demo3 — navbar + optional collapsible sidebar
|
|
18
|
+
| 'split-sidebar' // demo4 — primary + secondary sidebar panels
|
|
19
|
+
| 'navbar-sidebar' // demo5 — navbar + collapsible sidebar
|
|
20
|
+
| 'sidebar-tabs' // demo6 — sidebar with primary tabs + secondary menu
|
|
21
|
+
| 'mega-menu' // demo7 — inline mega-menu header, no sidebar
|
|
22
|
+
| 'sidebar-minimal' // demo8 — clean single sidebar
|
|
23
|
+
| 'mega-menu-navbar' // demo9 — mega-menu header + horizontal navbar
|
|
24
|
+
| 'sidebar-dual-menu' // demo10 — icon strip + secondary menu sidebar
|
|
25
|
+
// Backwards compat aliases
|
|
26
|
+
| 'sidebar' // → sidebar-fixed
|
|
27
|
+
| 'header'; // → top-nav
|
|
28
|
+
|
|
29
|
+
interface AppLayoutProps extends BaseAppLayoutProps {
|
|
30
|
+
variant?: AppVariant;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function AppLayout({ variant = 'top-nav', ...props }: AppLayoutProps) {
|
|
35
|
+
switch (variant) {
|
|
36
|
+
case 'sidebar-fixed':
|
|
37
|
+
case 'sidebar':
|
|
38
|
+
return <SidebarFixedLayout {...(props as Parameters<typeof SidebarFixedLayout>[0])} />;
|
|
39
|
+
case 'navbar-collapsible':
|
|
40
|
+
return <NavbarCollapsibleLayout {...(props as Parameters<typeof NavbarCollapsibleLayout>[0])} />;
|
|
41
|
+
case 'split-sidebar':
|
|
42
|
+
return <SplitSidebarLayout {...(props as Parameters<typeof SplitSidebarLayout>[0])} />;
|
|
43
|
+
case 'navbar-sidebar':
|
|
44
|
+
return <NavbarSidebarLayout {...(props as Parameters<typeof NavbarSidebarLayout>[0])} />;
|
|
45
|
+
case 'sidebar-tabs':
|
|
46
|
+
return <SidebarTabsLayout {...(props as Parameters<typeof SidebarTabsLayout>[0])} />;
|
|
47
|
+
case 'mega-menu':
|
|
48
|
+
return <MegaMenuLayout {...(props as Parameters<typeof MegaMenuLayout>[0])} />;
|
|
49
|
+
case 'sidebar-minimal':
|
|
50
|
+
return <SidebarMinimalLayout {...(props as Parameters<typeof SidebarMinimalLayout>[0])} />;
|
|
51
|
+
case 'mega-menu-navbar':
|
|
52
|
+
return <MegaMenuNavbarLayout {...(props as Parameters<typeof MegaMenuNavbarLayout>[0])} />;
|
|
53
|
+
case 'sidebar-dual-menu':
|
|
54
|
+
return <SidebarDualMenuLayout {...(props as Parameters<typeof SidebarDualMenuLayout>[0])} />;
|
|
55
|
+
case 'top-nav':
|
|
56
|
+
case 'header':
|
|
57
|
+
default:
|
|
58
|
+
return <TopNavLayout {...(props as Parameters<typeof TopNavLayout>[0])} />;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AuthLayoutProps, AuthLayoutVariant } from '../types';
|
|
3
|
+
import AuthCenteredLayout from './auth/AuthCenteredLayout';
|
|
4
|
+
import AuthSplitLayout from './auth/AuthSplitLayout';
|
|
5
|
+
import AuthSimpleLayout from './auth/AuthSimpleLayout';
|
|
6
|
+
import AuthCardLayout from './auth/AuthCardLayout';
|
|
7
|
+
import AuthBrandedLayout from './auth/AuthBrandedLayout';
|
|
8
|
+
import AuthClassicLayout from './auth/AuthClassicLayout';
|
|
9
|
+
|
|
10
|
+
interface Props extends AuthLayoutProps {
|
|
11
|
+
variant?: AuthLayoutVariant;
|
|
12
|
+
logo?: ReactNode;
|
|
13
|
+
appName?: string;
|
|
14
|
+
homeUrl?: string;
|
|
15
|
+
brandTitle?: string;
|
|
16
|
+
brandSubtitle?: string;
|
|
17
|
+
brandImage?: string;
|
|
18
|
+
brandImageDark?: string;
|
|
19
|
+
backgroundImage?: string;
|
|
20
|
+
backgroundImageDark?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function AuthLayout({ variant = 'split', ...props }: Props) {
|
|
24
|
+
switch (variant) {
|
|
25
|
+
case 'branded': return <AuthBrandedLayout {...props} />;
|
|
26
|
+
case 'classic': return <AuthClassicLayout {...props} />;
|
|
27
|
+
case 'centered': return <AuthCenteredLayout {...props} />;
|
|
28
|
+
case 'simple': return <AuthSimpleLayout {...props} />;
|
|
29
|
+
case 'card': return <AuthCardLayout {...props} />;
|
|
30
|
+
default: return <AuthSplitLayout {...props} />;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SettingsLayoutProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function SettingsLayout({ children, title }: SettingsLayoutProps) {
|
|
9
|
+
return (
|
|
10
|
+
<div className="min-h-screen bg-gray-50">
|
|
11
|
+
<div className="max-w-2xl mx-auto px-4 py-10 space-y-6">
|
|
12
|
+
{title && (
|
|
13
|
+
<h1 className="text-xl font-semibold text-gray-900">{title}</h1>
|
|
14
|
+
)}
|
|
15
|
+
<div className="bg-white shadow-sm rounded-xl border border-gray-200 p-8">
|
|
16
|
+
{children}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import type { BaseAppLayoutProps } from './layout-types';
|
|
6
|
+
import { HeaderTopbar } from './partials/HeaderTopbar';
|
|
7
|
+
import { ScrollArea } from '../../components/ui/scroll-area';
|
|
8
|
+
import { Button } from '../../controls/Button';
|
|
9
|
+
import { Plus } from 'lucide-react';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* AIChatLayout (layout-38)
|
|
13
|
+
* AI chat interface: thin sidebar with chat history + main chat area.
|
|
14
|
+
*/
|
|
15
|
+
interface AIChatLayoutProps extends BaseAppLayoutProps {
|
|
16
|
+
chatHistory?: Array<{ id: string; title: string; href: string; date?: string }>;
|
|
17
|
+
onNewChat?: () => void;
|
|
18
|
+
sidebarFooter?: ReactNode;
|
|
19
|
+
headerActions?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function AIChatLayout({
|
|
23
|
+
children, currentUrl = '',
|
|
24
|
+
logo, logoHref = '/', user,
|
|
25
|
+
settingsUrl, logoutUrl, onLogout, unreadCount = 0,
|
|
26
|
+
chatHistory = [], onNewChat, sidebarFooter, headerActions,
|
|
27
|
+
}: AIChatLayoutProps) {
|
|
28
|
+
return (
|
|
29
|
+
<div className="flex min-h-screen">
|
|
30
|
+
{/* Chat sidebar */}
|
|
31
|
+
<aside className="w-64 shrink-0 flex flex-col border-e border-sidebar-border bg-sidebar">
|
|
32
|
+
<div className="flex items-center justify-between px-4 h-[70px] border-b border-sidebar-border shrink-0">
|
|
33
|
+
{logo && <a href={logoHref}>{logo}</a>}
|
|
34
|
+
{onNewChat && (
|
|
35
|
+
<Button size="sm" variant="ghost" className="size-8 p-0" onClick={onNewChat}>
|
|
36
|
+
<Plus className="size-4" />
|
|
37
|
+
</Button>
|
|
38
|
+
)}
|
|
39
|
+
</div>
|
|
40
|
+
<ScrollArea className="flex-1 py-2 px-2">
|
|
41
|
+
<div className="space-y-0.5">
|
|
42
|
+
{chatHistory.map((chat) => (
|
|
43
|
+
<a
|
|
44
|
+
key={chat.id}
|
|
45
|
+
href={chat.href}
|
|
46
|
+
className={cn(
|
|
47
|
+
'flex flex-col gap-0.5 px-2 py-2 rounded-lg text-sm transition-colors hover:bg-sidebar-accent',
|
|
48
|
+
currentUrl.includes(chat.id) && 'bg-sidebar-accent',
|
|
49
|
+
)}
|
|
50
|
+
>
|
|
51
|
+
<span className="text-sidebar-foreground truncate">{chat.title}</span>
|
|
52
|
+
{chat.date && <span className="text-xs text-muted-foreground">{chat.date}</span>}
|
|
53
|
+
</a>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
</ScrollArea>
|
|
57
|
+
{sidebarFooter && <div className="p-3 border-t border-sidebar-border">{sidebarFooter}</div>}
|
|
58
|
+
</aside>
|
|
59
|
+
|
|
60
|
+
{/* Chat area */}
|
|
61
|
+
<div className="flex flex-col flex-1 min-w-0">
|
|
62
|
+
<header className="flex items-center h-[70px] border-b border-border bg-background px-4 shrink-0">
|
|
63
|
+
{headerActions && <div className="flex items-center gap-2">{headerActions}</div>}
|
|
64
|
+
<div className="flex-1" />
|
|
65
|
+
<HeaderTopbar user={user} unreadCount={unreadCount} settingsUrl={settingsUrl} logoutUrl={logoutUrl} onLogout={onLogout} />
|
|
66
|
+
</header>
|
|
67
|
+
<main className="flex-1 flex flex-col overflow-hidden" role="content">
|
|
68
|
+
{children}
|
|
69
|
+
</main>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|