-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13dfdcf
commit a11194c
Showing
20 changed files
with
344 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
"@nextui-org/popover": "^2.1.29", | ||
"@nextui-org/skeleton": "^2.0.32", | ||
"@nextui-org/snippet": "2.0.43", | ||
"@nextui-org/switch": "2.0.34", | ||
"@nextui-org/switch": "^2.0.34", | ||
"@nextui-org/system": "2.2.6", | ||
"@nextui-org/theme": "2.2.11", | ||
"@react-aria/ssr": "3.9.4", | ||
|
@@ -36,11 +36,11 @@ | |
"framer-motion": "~11.1.1", | ||
"highcharts": "^11.4.8", | ||
"highcharts-react-official": "^3.2.1", | ||
"iconsax-react": "^0.0.8", | ||
"intl-messageformat": "^10.5.0", | ||
"leaflet": "^1.9.4", | ||
"leaflet-defaulticon-compatibility": "^0.1.2", | ||
"leaflet-geosearch": "^4.0.0", | ||
"lucide-react": "^0.454.0", | ||
"next": "14.2.10", | ||
"next-themes": "^0.2.1", | ||
"react": "18.3.1", | ||
|
@@ -89,6 +89,5 @@ | |
"never" | ||
] | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Button } from '@nextui-org/button'; | ||
import { Image } from '@nextui-org/image'; | ||
import clsx from 'clsx'; | ||
import { forwardRef } from 'react'; | ||
|
||
import { AlertButtonProps } from '@/domain/props/AlertButtonProps'; | ||
|
||
export const AlertButton = forwardRef<HTMLButtonElement, AlertButtonProps>( | ||
({ icon, label, isSelected, onClick, className, ...props }, ref) => { | ||
return ( | ||
<Button | ||
isIconOnly | ||
radius="full" | ||
className={clsx(isSelected ? 'bg-primary' : 'bg-content2', className)} | ||
onClick={onClick} | ||
ref={ref} | ||
{...props} | ||
> | ||
<div className="w-6 h-6 flex items-center justify-center"> | ||
<Image src={icon} alt={label} className="object-contain w-auto h-auto max-w-full max-h-full" /> | ||
</div> | ||
</Button> | ||
); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
'use client'; | ||
|
||
import { useSidebar } from '../Sidebar/SidebarContext'; | ||
import AlertsMenu from './AlertsMenu'; | ||
import { AlertsMenu } from '@/components/AlertsMenu/AlertsMenu'; | ||
import { useSidebar } from '@/domain/contexts/SidebarContext'; | ||
import { AlertsMenuVariant } from '@/domain/enums/AlertsMenuVariant'; | ||
|
||
export default function AlertsMenuWrapper() { | ||
export function AlertsMenuWrapper() { | ||
const { isSidebarOpen } = useSidebar(); | ||
|
||
if (isSidebarOpen) { | ||
return null; | ||
} | ||
return ( | ||
<div className="absolute bottom-0 left-0 z-50 p-4"> | ||
<AlertsMenu variant="outside" /> | ||
<AlertsMenu variant={AlertsMenuVariant.Outside} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Button } from '@nextui-org/button'; | ||
import { Card, CardBody, CardHeader } from '@nextui-org/card'; | ||
import { Image } from '@nextui-org/image'; | ||
import { Listbox, ListboxItem } from '@nextui-org/listbox'; | ||
import { SidebarRight } from 'iconsax-react'; | ||
|
||
import { CollapsedSidebarProps } from '@/domain/props/CollapsedSidebarProps'; | ||
import { SidebarOperations } from '@/operations/charts/SidebarOperations'; | ||
|
||
export function CollapsedSidebar({ selectedMapType, handleSelectionChange, toggleSidebar }: CollapsedSidebarProps) { | ||
return ( | ||
<div className="absolute top-0 left-0 z-50 p-4"> | ||
<Card className="h-full"> | ||
<CardHeader className="flex justify-center items-center"> | ||
<Button isIconOnly variant="light" onClick={toggleSidebar} aria-label="Close sidebar"> | ||
<SidebarRight size={24} /> | ||
</Button> | ||
</CardHeader> | ||
<CardBody> | ||
<Listbox | ||
variant="flat" | ||
aria-label="Listbox menu with sections" | ||
selectionMode="single" | ||
selectedKeys={new Set(selectedMapType)} | ||
onSelectionChange={handleSelectionChange} | ||
disallowEmptySelection | ||
hideSelectedIcon | ||
> | ||
{SidebarOperations.getSidebarMapTypes().map((item) => ( | ||
<ListboxItem key={item.key} textValue={item.label}> | ||
<div className="w-6 h-6 flex items-center justify-center"> | ||
<Image | ||
src={item.icon} | ||
alt={item.label} | ||
className="object-contain w-auto h-auto max-w-full max-h-full" | ||
/> | ||
</div> | ||
</ListboxItem> | ||
))} | ||
</Listbox> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.