@alextheman/components 6.15.0 → 6.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/v7/index.cjs +1 -1
- package/dist/v7/index.cjs.map +1 -1
- package/dist/v7/index.js +1 -1
- package/dist/v7/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Container","Card","CardContent","Typography","Stack","Chip","Box","CardHeader","Divider","ButtonBase","MdArrowDropUp","MdArrowDropDown","Box","Collapse","MUILink","Button","MdCloudUpload","Box","List","ListItem","IconButton","MdDelete","ListItemText","Switch","Box","DataError","ThemeProvider","CssBaseline","DataError","CircularProgress","Alert","DataError","DataError","Snackbar","Alert","Tooltip","MdOutlineLightMode","MdOutlineDarkMode","Box","Paper","BottomNavigation","BottomNavigationAction","Link","Card","CardHeader","Typography","Divider","CardContent","CircularProgress","QueryBoundaryProvider","Box","LiveProvider","Typography","LiveEditor","LivePreview","LiveError","TableRow","TableCell","Skeleton","MUIButton","MdArrowDropUp","MdArrowDropDown","Box","Menu","drawerWidth","openedMixin","closedMixin","DrawerHeader","AppBar","MuiAppBar","Drawer","MuiDrawer","useDropdownMenu","DataError","DropdownMenu","Menu","DropdownMenuItem","useDropdownMenu","MenuItem","useDropdownMenuV7","DropdownMenu","DropdownMenuItemV7","MenuItem","ReactDOMLink","MUILink","MenuItem","MdVisibility","Box","Popover","ListItemButton","QueryBoundaryProvider","MuiAppBar","MuiDrawer","Box","CssBaseline","Toolbar","IconButton","MdMenu","Typography","MdChevronRight","MdChevronLeft","Divider","Fragment","List","ListItem","ListItemButton","Link","ListItemIcon","ListItemText","Typography","Button"],"sources":["../src/components/Artwork.tsx","../src/components/CollapsableItem.tsx","../src/components/ExternalLink.tsx","../src/components/FileInput.tsx","../src/components/FileInputList.tsx","../src/components/SwitchWithIcons.tsx","../src/providers/ModeProvider.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryProvider.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryData.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryError.tsx","../src/providers/QueryBoundaryProvider/index.tsx","../src/providers/ScreenSizeProvider.tsx","../src/providers/SnackbarProvider.tsx","../src/components/ModeToggle.tsx","../src/components/NavigationBottom.tsx","../src/components/Page.tsx","../src/components/QueryBoundary.tsx","../src/components/ReactPlayground.tsx","../src/components/SkeletonRow.tsx","../src/deprecated/DarkModeToggle.tsx","../src/deprecated/DropdownMenu.tsx","../src/v7/components/NavigationDrawer.tsx","../src/v7/hooks/formHooks.ts","../src/v7/components/DropdownMenu/DropdownMenuProvider.tsx","../src/v7/components/DropdownMenu/DropdownMenu.tsx","../src/v7/components/DropdownMenu/DropdownMenuItem.tsx","../src/deprecated/DropdownMenu2/DropdownMenu2.tsx","../src/deprecated/DropdownMenu2/DropdownMenuItem.tsx","../src/deprecated/DropdownMenu2/index.tsx","../src/deprecated/DropdownMenuExternalLink.tsx","../src/deprecated/InternalLink.tsx","../src/deprecated/DropdownMenuInternalLink.tsx","../src/deprecated/IconWithPopover.tsx","../src/deprecated/ListItemInternalLink.tsx","../src/deprecated/LoaderData.tsx","../src/deprecated/LoaderError.tsx","../src/deprecated/LoaderProvider.tsx","../src/deprecated/NavigationDrawer.tsx","../src/deprecated/PopoverText.tsx","../src/deprecated/SubmitButton.tsx","../src/hooks/useHash.ts"],"sourcesContent":["import Box from \"@mui/material/Box\";\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport CardHeader from \"@mui/material/CardHeader\";\nimport Chip from \"@mui/material/Chip\";\nimport Divider from \"@mui/material/Divider\";\nimport Stack from \"@mui/material/Stack\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface ContainerProps {\n containerLabel: string;\n chipLabels: Array<string>;\n}\n\nfunction Container({ containerLabel, chipLabels }: ContainerProps) {\n return (\n <Card\n sx={{\n width: 320,\n height: 420,\n backgroundColor: \"rgba(255,255,255,0.07)\",\n backdropFilter: \"blur(8px)\",\n border: \"1px solid rgba(255,255,255,0.06)\",\n boxShadow: \"0 10px 40px rgba(0,0,0,0.35)\",\n }}\n >\n <CardContent>\n <Typography variant=\"h6\" gutterBottom sx={{ color: \"#f8fafc\" }}>\n {containerLabel}\n </Typography>\n\n <Stack spacing={1}>\n {chipLabels.map((label) => {\n return (\n <Chip\n key={label}\n label={label}\n sx={{\n backgroundColor: \"rgba(255,255,255,0.11)\",\n color: \"rgba(255,255,255,0.88)\",\n border: \"1px solid rgba(255,255,255,0.06)\",\n }}\n />\n );\n })}\n </Stack>\n </CardContent>\n </Card>\n );\n}\n\nfunction Connector() {\n return (\n <Box\n sx={{\n width: 120,\n height: 6,\n borderRadius: 3,\n background: \"linear-gradient(90deg, #f43f5e, #a78bfa, #22d3ee)\",\n boxShadow: \"0 0 24px rgba(167,139,250,0.55)\",\n }}\n />\n );\n}\n\n/** The artwork associated with the package's theme song, _An Interface For You And I_. */\nfunction Artwork() {\n return (\n <Card\n sx={{\n width: 1000,\n height: 1000,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n p: 4,\n background:\n \"radial-gradient(circle at 20% 10%, rgba(167,139,250,0.35) 0%, rgba(167,139,250,0.12) 35%, rgba(0,0,0,0) 55%), linear-gradient(135deg, #3a3380 0%, #1d2e5f 40%, #2d3f55 100%)\",\n color: \"white\",\n }}\n elevation={0}\n >\n <CardHeader\n title=\"An Interface For You And I\"\n sx={{\n color: \"#f8fafc\",\n textAlign: \"center\",\n \"& .MuiCardHeader-title\": {\n fontSize: 40,\n fontWeight: 600,\n letterSpacing: 2,\n },\n }}\n />\n\n <Divider sx={{ borderColor: \"rgba(255,255,255,0.2)\" }} />\n\n <CardContent sx={{ flex: 1, display: \"flex\", alignItems: \"center\" }}>\n <Stack\n direction=\"row\"\n spacing={4}\n sx={{ width: \"100%\", justifyContent: \"center\", alignItems: \"center\" }}\n >\n <Container\n containerLabel=\"You\"\n chipLabels={[\"state\", \"context\", \"input\", \"event\", \"focus\", \"value\", \"history\"]}\n />\n <Connector />\n <Container\n containerLabel=\"I\"\n chipLabels={[\"render\", \"effect\", \"response\", \"update\", \"history\", \"layout\", \"provider\"]}\n />\n </Stack>\n </CardContent>\n </Card>\n );\n}\n\nexport default Artwork;\n","import type { CollapseProps } from \"@mui/material/Collapse\";\nimport type { SxProps } from \"@mui/material/styles\";\nimport type { ElementType, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport ButtonBase from \"@mui/material/ButtonBase\";\nimport Collapse from \"@mui/material/Collapse\";\nimport { useEffect, useState } from \"react\";\nimport { MdArrowDropDown, MdArrowDropUp } from \"react-icons/md\";\n\nexport interface CollapsableItemProps {\n /** Whether the item should initially be open or not. */\n isInitiallyOpen?: boolean;\n /** A callback function to execute when the item is open. */\n onOpen?: () => void;\n /** A callback function to execute when the item is closed. */\n onClose?: () => void;\n /** The components to render when the item is open. */\n children: ReactNode;\n /** Styling for the button. */\n buttonStyles?: SxProps;\n /** The children to pass to the button. */\n buttonContents: ReactNode;\n /** The specific button component to use. */\n buttonComponent?: ElementType;\n /** The icon to show next to the button when open. */\n openIcon?: ReactNode;\n /** The icon to show next to the button when closed. */\n closedIcon?: ReactNode;\n /** Props to pass to collapse. */\n collapseProps?: Omit<CollapseProps, \"in\">;\n /**\n * Whether or not to use the default button styling.\n *\n * Defaults to `true` if `buttonComponent` is `ButtonBase`,\n * otherwise defaults to `false`.\n */\n useDefaultStyling?: boolean;\n}\n\n/**\n * Shows a display area that can be opened to show the children components, or hidden away.\n */\nfunction CollapsableItem({\n isInitiallyOpen,\n onOpen,\n onClose,\n children,\n buttonStyles,\n buttonContents,\n buttonComponent: ButtonComponent = ButtonBase,\n collapseProps,\n openIcon = <MdArrowDropUp />,\n closedIcon = <MdArrowDropDown />,\n useDefaultStyling = ButtonComponent === ButtonBase ? true : false,\n}: CollapsableItemProps) {\n const [isItemOpen, setIsItemOpen] = useState<boolean>(!!isInitiallyOpen);\n\n useEffect(() => {\n if (isItemOpen && onOpen) {\n onOpen();\n } else if (!isItemOpen && onClose) {\n onClose();\n }\n }, [isItemOpen]);\n\n return (\n <Box>\n <ButtonComponent\n onClick={() => {\n setIsItemOpen((previouslyOpen) => {\n return !previouslyOpen;\n });\n }}\n sx={\n useDefaultStyling\n ? {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n paddingY: 1.5,\n paddingX: 2,\n textAlign: \"center\",\n \"&:hover\":\n ButtonComponent === ButtonBase ? { backgroundColor: \"action.hover\" } : null,\n ...buttonStyles,\n }\n : buttonStyles\n }\n aria-expanded={isItemOpen}\n >\n {buttonContents}\n {isItemOpen ? openIcon : closedIcon}\n </ButtonComponent>\n <Collapse in={isItemOpen} {...collapseProps}>\n {children}\n </Collapse>\n </Box>\n );\n}\n\nexport default CollapsableItem;\n","import type { LinkProps } from \"@mui/material/Link\";\nimport type { ReactNode, Ref } from \"react\";\n\nimport MUILink from \"@mui/material/Link\";\n\nexport interface ExternalLinkProps extends Omit<LinkProps, \"to\" | \"target\" | \"rel\"> {\n /** The URL of the place you want to navigate to. */\n href: `https://${string}` | `http://${string}` | (string & {});\n to?: never;\n /** The readable content to display on the link. */\n children: ReactNode;\n /** An optional ref to allow it to be used with polymorphic components. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * A stylised link that is best used when you want to navigate to a different domain.\n *\n * Opens the destination in a new tab and applies recommended security defaults automatically.\n */\nfunction ExternalLink({ href, children, ref, ...linkProps }: ExternalLinkProps) {\n return (\n <MUILink\n component=\"a\"\n href={href}\n ref={ref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n {...linkProps}\n >\n {children}\n </MUILink>\n );\n}\n\nexport default ExternalLink;\n","import type { CreateEnumType } from \"@alextheman/utility\";\nimport type { ButtonOwnProps } from \"@mui/material/Button\";\n\nimport Button from \"@mui/material/Button\";\nimport { styled } from \"@mui/material/styles\";\nimport { useId, useState } from \"react\";\nimport { MdCloudUpload } from \"react-icons/md\";\n\nexport const FileType = {\n PDF: \"application/pdf\",\n PNG: \"image/png\",\n JPEG: \"image/jpeg\",\n JPG: \"image/jpg\",\n XLSX: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n DOCX: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n MP3: \"audio/mp3\",\n MP4: \"video/mp4\",\n WAV: \"audio/wav\",\n} as const;\nexport type FileType = CreateEnumType<typeof FileType>;\n\nconst VisuallyHiddenInput = styled(\"input\")({\n clip: \"rect(0 0 0 0)\",\n clipPath: \"inset(50%)\",\n height: 1,\n overflow: \"hidden\",\n position: \"absolute\",\n bottom: 0,\n left: 0,\n whiteSpace: \"nowrap\",\n width: 1,\n});\n\nconst Dropzone = styled(\"div\")<{ $dragging: boolean }>(({ theme, $dragging }) => {\n return {\n border: \"2px dashed\",\n borderColor: $dragging ? theme.palette.primary.main : \"#ccc\",\n backgroundColor: $dragging ? theme.palette.action.hover : \"transparent\",\n borderRadius: 8,\n padding: \"1.5rem\",\n textAlign: \"center\",\n transition: \"border-color 0.2s\",\n cursor: \"pointer\",\n };\n});\n\nexport interface FileInputProps extends ButtonOwnProps {\n /** A function to run when a file has been uploaded. */\n onFileInput: (allowedFiles: Array<File>) => void;\n /** The label to display on the input button (defaults to \"Upload files\") */\n label?: string;\n /** Whether to accept multiple files or not. */\n multiple?: boolean;\n /** An array of file types to accept. */\n accept?: Array<string>;\n /** Enable the dropzone, allowing users to drag and drop files. */\n useDropzone?: boolean;\n}\n\n/** Handles file inputs. */\nfunction FileInput({\n onFileInput,\n label = \"Upload files\",\n multiple,\n accept,\n useDropzone,\n ...buttonProps\n}: FileInputProps) {\n const [isDragging, setIsDragging] = useState<boolean>(false);\n const id = useId();\n\n const fileInputButton = (\n <Button\n variant=\"contained\"\n component=\"label\"\n aria-label=\"File input button\"\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n document.getElementById(id)?.click();\n }\n }}\n {...buttonProps}\n startIcon={buttonProps.startIcon ?? <MdCloudUpload />}\n >\n {label}\n <VisuallyHiddenInput\n id={id}\n type=\"file\"\n onChange={(event) => {\n const input = event.target;\n onFileInput(Array.from(input.files ?? []));\n input.value = \"\";\n }}\n multiple={multiple}\n accept={accept?.join(\",\")}\n disabled={buttonProps.disabled}\n />\n </Button>\n );\n\n return useDropzone ? (\n <Dropzone\n $dragging={isDragging}\n onDragOver={(event) => {\n event.preventDefault();\n if (buttonProps.disabled) {\n return;\n }\n setIsDragging(true);\n }}\n onDragLeave={(event) => {\n event.preventDefault();\n setIsDragging(false);\n }}\n onDrop={(event) => {\n event.preventDefault();\n setIsDragging(false);\n if (buttonProps.disabled) {\n return;\n }\n const filesArray = Array.from(event.dataTransfer.files ?? []);\n onFileInput(filesArray);\n }}\n >\n {fileInputButton}\n </Dropzone>\n ) : (\n fileInputButton\n );\n}\n\nexport default FileInput;\n","import type { Dispatch, SetStateAction } from \"react\";\n\nimport type { FileInputProps } from \"src/components/FileInput\";\n\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { MdDelete } from \"react-icons/md\";\n\nimport FileInput from \"src/components/FileInput\";\n\nexport interface FileInputListProps extends Omit<FileInputProps, \"onFileInput\"> {\n /** The array of files (must be a React state). */\n files: Array<File>;\n /** The state setter for the array of files. */\n setFiles: Dispatch<SetStateAction<Array<File>>>;\n}\n\n/** Renders the `FileInput` component with a list of uploaded files underneath it. */\nfunction FileInputList({\n files,\n setFiles,\n multiple = true,\n ...fileInputProps\n}: FileInputListProps) {\n function onFileInput(newFiles: Array<File>) {\n setFiles((oldFiles) => {\n return [...oldFiles, ...newFiles];\n });\n }\n\n return (\n <Box>\n <FileInput {...fileInputProps} multiple={multiple} onFileInput={onFileInput} />\n <List>\n {files.map((file) => {\n return (\n <ListItem\n key={`${file.name}-${file.lastModified}`}\n secondaryAction={\n <IconButton\n aria-label=\"Delete\"\n edge=\"end\"\n onClick={() => {\n setFiles((oldFiles) => {\n return oldFiles.filter((fileToDelete) => {\n return fileToDelete !== file;\n });\n });\n }}\n >\n <MdDelete />\n </IconButton>\n }\n >\n <ListItemText primary={file.name} />\n </ListItem>\n );\n })}\n </List>\n </Box>\n );\n}\n\nexport default FileInputList;\n","import type { CommonProps } from \"@mui/material/OverridableComponent\";\nimport type { SwitchProps } from \"@mui/material/Switch\";\nimport type { ComponentType, CSSProperties } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport { styled } from \"@mui/material/styles\";\nimport Switch from \"@mui/material/Switch\";\n\nexport interface SwitchWithIconsProps extends Omit<SwitchProps, \"icon\" | \"checkedIcon\"> {\n /** The icon to show when the switch is in a checked state. */\n checkedIcon: ComponentType<{ style?: CSSProperties }>;\n /** Additional styling to apply to the icon that shows when checked. */\n checkedIconStyles?: CommonProps[\"style\"];\n /** The icon to show when the switch is in an unchecked state. */\n uncheckedIcon: ComponentType<{ style?: CSSProperties }>;\n /** Additional styling to apply to the icon that shows when unchecked. */\n uncheckedIconStyles?: CommonProps[\"style\"];\n}\n\nconst StyledSwitch = styled(Switch)(() => {\n return {\n padding: 8,\n \"& .MuiSwitch-track\": {\n borderRadius: 11,\n \"&::before, &::after\": {\n content: '\"\"',\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n fontSize: 16,\n width: 28,\n height: 28,\n },\n },\n };\n});\n\n/** Renders a switch with your provided icons. */\nfunction SwitchWithIcons({\n checkedIcon: CheckedIcon,\n checkedIconStyles,\n uncheckedIcon: UncheckedIcon,\n uncheckedIconStyles,\n ...switchProps\n}: SwitchWithIconsProps) {\n const boxSx = {\n borderRadius: \"50%\",\n borderColor: \"white\",\n backgroundColor: \"white\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: 0.25,\n };\n const defaultIconStyles = { color: \"black\", maxWidth: 16.5, maxHeight: 16.5 };\n return (\n <StyledSwitch\n checkedIcon={\n <Box sx={boxSx}>\n <CheckedIcon style={{ ...defaultIconStyles, ...checkedIconStyles }} />\n </Box>\n }\n icon={\n <Box sx={boxSx}>\n <UncheckedIcon style={{ ...defaultIconStyles, ...uncheckedIconStyles }} />\n </Box>\n }\n {...switchProps}\n />\n );\n}\n\nexport default SwitchWithIcons;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { PaletteMode } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport { createTheme, ThemeProvider } from \"@mui/material/styles\";\nimport { createContext, useContext, useMemo, useState } from \"react\";\n\nexport interface ModeContextValue {\n toggleMode: () => void;\n mode: PaletteMode;\n}\n\nconst ModeContext = createContext<ModeContextValue>({\n toggleMode: () => {},\n mode: \"dark\",\n});\n\n/** Access the mode context directly. */\nexport function useMode<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, ModeContextValue> {\n const context = useContext(ModeContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"MODE_PROVIDER_NOT_FOUND\",\n \"Could not find the ModeProvider context. Please double-check that it is present.\",\n );\n }\n return context;\n}\n\nexport interface ModeProviderProps {\n /** The children that will have access to the current mode. */\n children: ReactNode;\n /** The initial mode. */\n mode?: PaletteMode;\n}\n\n/** Provides information about the current theme mode to its children components. */\nfunction ModeProvider({ children, mode: modeProp = \"dark\" }: ModeProviderProps) {\n const [mode, setMode] = useState<PaletteMode>(modeProp);\n\n const theme = useMemo(() => {\n return createTheme({\n palette: {\n mode,\n },\n });\n }, [mode]);\n\n return (\n <ModeContext.Provider\n value={{\n mode,\n toggleMode: () => {\n setMode((prev) => {\n return prev === \"light\" ? \"dark\" : \"light\";\n });\n },\n }}\n >\n <ThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n </ModeContext.Provider>\n );\n}\n\nexport default ModeProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport { createContext, useContext } from \"react\";\n\nexport interface QueryBoundaryProviderBaseProps<DataType> {\n /** The current loading status (true if loading, false if not) */\n isLoading: boolean;\n /** The data being loaded. */\n data?: DataType;\n /** A parser for the data. */\n dataParser?: (data: unknown) => NonNullable<DataType>;\n /** The component to show when the data is being fetched. */\n loadingComponent?: ReactNode;\n}\n\nexport interface QueryBoundaryProviderPropsWithNoError<\n DataType,\n> extends QueryBoundaryProviderBaseProps<DataType> {\n error?: never;\n errorComponent?: never;\n logError?: never;\n}\n\nexport interface QueryBoundaryProviderPropsWithError<\n DataType,\n> extends QueryBoundaryProviderBaseProps<DataType> {\n /** The error given if the request gave an error. */\n error: unknown;\n /** The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided. */\n errorComponent?: ReactNode | ((error: unknown) => ReactNode);\n /** Whether you want to log the error to the console or not. */\n logError?: boolean;\n}\n\nexport type QueryBoundaryContextValue<DataType> =\n | QueryBoundaryProviderPropsWithNoError<DataType>\n | QueryBoundaryProviderPropsWithError<DataType>;\nexport type QueryBoundaryProviderProps<DataType> = QueryBoundaryContextValue<DataType> & {\n children: ReactNode;\n};\n\nconst QueryBoundaryContext = createContext<QueryBoundaryContextValue<unknown> | undefined>(\n undefined,\n);\n\n/** Access the QueryBoundary context directly. */\nexport function useQueryBoundary<DataType, Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<\n Strict,\n QueryBoundaryContextValue<DataType>\n> {\n const context = useContext(QueryBoundaryContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"LOADER_PROVIDER_NOT_FOUND\",\n \"Could not find the QueryBoundaryProvider context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, QueryBoundaryContextValue<DataType>>;\n}\n\n/**\n * A provider for a context that deals with state management when fetching data from an API.\n * This may be used over QueryBoundary if you require more control over the placement of the error message and data display.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundaryProvider<DataType>({\n children,\n loadingComponent = <CircularProgress />,\n ...contextProps\n}: QueryBoundaryProviderProps<DataType>) {\n return (\n <QueryBoundaryContext.Provider value={{ loadingComponent, ...contextProps }}>\n {children}\n </QueryBoundaryContext.Provider>\n );\n}\n\nexport default QueryBoundaryProvider;\n","import type { ReactNode } from \"react\";\n\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport interface QueryBoundaryDataProps<DataType> {\n /**\n * The elements to show after data has been loaded.\n * This is best provided as a function with a data argument that guarantees the data will not be undefined by the time you receive it here.\n */\n children: ReactNode | ((data: NonNullable<DataType>) => ReactNode);\n /** A parser for the data. */\n dataParser?: (data: unknown) => NonNullable<DataType>;\n /** The component to show when the data is being fetched. */\n loadingComponent?: ReactNode;\n}\n\n/**\n * The component responsible for showing the data provided by QueryBoundaryProvider.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundaryData<DataType>({\n children,\n dataParser: loaderDataParser,\n loadingComponent,\n}: QueryBoundaryDataProps<DataType>) {\n const {\n isLoading,\n data,\n dataParser: contextDataParser,\n loadingComponent: contextLoadingComponent,\n error,\n } = useQueryBoundary<DataType>();\n const dataParser = loaderDataParser ?? contextDataParser;\n\n if (isLoading) {\n return <>{loadingComponent ?? contextLoadingComponent}</>;\n }\n\n if (error) {\n return null;\n }\n\n // No need to also check for isLoading === true here, since this was covered earlier\n if (data === null || data === undefined) {\n return null;\n }\n\n if (dataParser) {\n return typeof children === \"function\" ? <>{children(dataParser(data))}</> : <>{children}</>;\n }\n\n return typeof children === \"function\" ? <>{children(data)}</> : <>{children}</>;\n}\n\nexport default QueryBoundaryData;\n","import type { ReactNode } from \"react\";\n\nimport Alert from \"@mui/material/Alert\";\nimport { useRef } from \"react\";\n\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport interface QueryBoundaryErrorBaseProps {\n /** The component to show if an error has been thrown. */\n children?: ReactNode | ((error: unknown) => ReactNode);\n /** An option to log the error to the console. */\n logError?: boolean;\n}\n\nexport interface QueryBoundaryErrorPropsWithUndefinedOrNull extends QueryBoundaryErrorBaseProps {\n /** The component to show if no error was thrown but data is undefined */\n undefinedComponent?: ReactNode;\n /** The component to show if no error was thrown but data is null */\n nullComponent?: ReactNode;\n nullableComponent?: never;\n}\n\nexport interface QueryBoundaryErrorPropsWithNullable extends QueryBoundaryErrorBaseProps {\n undefinedComponent?: never;\n nullComponent?: never;\n /** The component to show if no error was thrown but data is undefined or null */\n nullableComponent?: ReactNode;\n}\n\nexport type QueryBoundaryErrorProps =\n | QueryBoundaryErrorPropsWithUndefinedOrNull\n | QueryBoundaryErrorPropsWithNullable;\n\n/**\n * The component responsible for showing any errors provided by QueryBoundaryProvider.\n */\nfunction QueryBoundaryError({\n children,\n undefinedComponent,\n nullComponent,\n nullableComponent,\n logError: propsLogError,\n}: QueryBoundaryErrorProps) {\n const {\n isLoading,\n data,\n error,\n errorComponent: contextErrorComponent,\n logError: contextLogError,\n } = useQueryBoundary();\n const logError = propsLogError ?? contextLogError;\n const warnedOnce = useRef(false);\n\n const errorComponent = children ?? contextErrorComponent;\n\n if (error) {\n if (logError && !warnedOnce.current) {\n console.error(error);\n warnedOnce.current = true;\n }\n if (typeof errorComponent === \"function\") {\n return errorComponent(error);\n }\n if (errorComponent) {\n return <>{errorComponent}</>;\n }\n\n return (\n <Alert severity=\"error\">\n {(error as Error)?.message ?? \"An unknown error has occured. Please try again later.\"}\n </Alert>\n );\n }\n\n if (!isLoading && (data === null || data === undefined)) {\n if (nullableComponent) {\n if (logError && !warnedOnce.current) {\n console.error(\"Data is nullable after loading.\");\n warnedOnce.current = true;\n }\n return <>{nullableComponent}</>;\n }\n\n if (data === undefined) {\n if (logError && !warnedOnce.current) {\n console.error(\n \"Data is undefined after loading. This could either be an issue with the query or you have not passed in the data to QueryBoundaryProvider. Please double-check that you have provided data.\",\n );\n warnedOnce.current = true;\n }\n\n if (undefinedComponent) {\n return <>{undefinedComponent}</>;\n }\n }\n\n if (data === null) {\n if (logError && !warnedOnce.current) {\n console.error(\"Data is null after loading.\");\n warnedOnce.current = true;\n }\n\n if (nullComponent) {\n return <>{nullComponent}</>;\n }\n }\n\n return <Alert severity=\"error\">Failed to load data. Please try again later.</Alert>;\n }\n\n return null;\n}\n\nexport default QueryBoundaryError;\n","import QueryBoundaryProvider from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport { default as QueryBoundaryData } from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\nexport { default as QueryBoundaryError } from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\n\nexport type { QueryBoundaryDataProps } from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\nexport type {\n QueryBoundaryErrorBaseProps,\n QueryBoundaryErrorPropsWithNullable,\n QueryBoundaryErrorPropsWithUndefinedOrNull,\n QueryBoundaryErrorProps,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\nexport type {\n QueryBoundaryProviderProps,\n QueryBoundaryProviderBaseProps,\n QueryBoundaryProviderPropsWithError,\n QueryBoundaryProviderPropsWithNoError,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport default QueryBoundaryProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility\";\nimport { createContext, useContext, useEffect, useMemo, useState } from \"react\";\n\nexport interface ScreenSizeProps {\n /** The children that will be receiving the ScreenSizeContext. */\n children: ReactNode;\n /** The minimum screen width in pixels required to be considered a large screen. */\n largeScreenWidth?: number;\n /** The minimum screen height in pixels required to be considered a large screen. */\n largeScreenHeight?: number;\n}\n\nexport interface ScreenSizeContextValue {\n /** Whether the screen is a large screen or not. */\n isLargeScreen: boolean;\n /** The current window width. */\n windowWidth: number;\n /** The current window height. */\n windowHeight: number;\n}\n\nconst ScreenSizeContext = createContext<ScreenSizeContextValue>({\n windowWidth: 0,\n windowHeight: 0,\n isLargeScreen: false,\n});\n\n/** Access the screen size context directly. */\nexport function useScreenSize<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, ScreenSizeContextValue> {\n const context = useContext(ScreenSizeContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"SCREEN_SIZE_PROVIDER_NOT_FOUND\",\n \"Could not find the ScreenSizeProvider context. Please double-check that it is present.\",\n );\n }\n return context;\n}\n\n/** Provides context about the current screen size. */\nfunction ScreenSizeProvider({\n children,\n largeScreenWidth = 669,\n largeScreenHeight = 660,\n}: ScreenSizeProps) {\n const [windowWidth, setWindowWidth] = useState<number>(window.innerWidth);\n const [windowHeight, setWindowHeight] = useState<number>(window.innerHeight);\n\n useEffect(() => {\n function setDimensions() {\n setWindowWidth(window.innerWidth);\n setWindowHeight(window.innerHeight);\n }\n setDimensions();\n window.addEventListener(\"resize\", setDimensions);\n return () => {\n window.removeEventListener(\"resize\", setDimensions);\n };\n }, []);\n\n const isLargeScreen = useMemo(() => {\n return windowWidth > largeScreenWidth && windowHeight > largeScreenHeight;\n }, [windowWidth, windowHeight, largeScreenWidth, largeScreenHeight]);\n\n return (\n <ScreenSizeContext.Provider\n value={{\n isLargeScreen,\n windowWidth,\n windowHeight,\n }}\n >\n {children}\n </ScreenSizeContext.Provider>\n );\n}\n\nexport default ScreenSizeProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { AlertColor } from \"@mui/material/Alert\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError, wait } from \"@alextheman/utility\";\nimport Alert from \"@mui/material/Alert\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { createContext, useContext, useState } from \"react\";\n\nexport interface SnackbarProviderProps {\n /** The children that will have access to the snackbar context. */\n children: ReactNode;\n /** The amount of seconds to wait before hiding the snackbar. */\n autoHideDuration?: number;\n}\n\nexport interface SnackbarContextValue {\n /** A function that adds the snackbar to the page. */\n addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;\n}\n\nconst SnackbarContext = createContext<SnackbarContextValue | undefined>(undefined);\n\n/** Access the snackbar context directly. */\nexport function useSnackbar<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, SnackbarContextValue> {\n const context = useContext(SnackbarContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"SNACKBAR_PROVIDER_NOT_FOUND\",\n \"Could not find the SnackbarProvider context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, SnackbarContextValue>;\n}\n\n/** Controls the display of the snackbars on the page. */\nfunction SnackbarProvider({ children, autoHideDuration = 5000 }: SnackbarProviderProps) {\n const [open, setOpen] = useState<boolean>(false);\n const [autoHideDurationState, setAutoHideDurationState] = useState<number>(autoHideDuration);\n const [message, setMessage] = useState<string>(\"\");\n const [severity, setSeverity] = useState<AlertColor>(\"info\");\n\n function addSnackbar(message: string, severity?: AlertColor, duration?: number) {\n setOpen(true);\n setAutoHideDurationState(duration ?? autoHideDuration);\n setSeverity(severity ?? \"info\");\n setMessage(message);\n }\n\n async function handleClose() {\n setOpen(false);\n // Wait for 0.2 seconds to ensure that the message is only cleared after the snackbar is fully closed.\n // This prevents potential weird flickering that may occur if they happen synchronously.\n await wait(0.2);\n setMessage(\"\");\n }\n\n return (\n <SnackbarContext.Provider value={{ addSnackbar }}>\n <Snackbar open={open} autoHideDuration={autoHideDurationState} onClose={handleClose}>\n <Alert onClose={handleClose} severity={severity}>\n {message}\n </Alert>\n </Snackbar>\n {children}\n </SnackbarContext.Provider>\n );\n}\n\nexport default SnackbarProvider;\n","import Tooltip from \"@mui/material/Tooltip\";\nimport { MdOutlineDarkMode, MdOutlineLightMode } from \"react-icons/md\";\n\nimport SwitchWithIcons from \"src/components/SwitchWithIcons\";\nimport { useMode } from \"src/providers\";\n\n/** A toggle to switch between dark mode and light mode. Must be used in a `ModeProvider`. */\nfunction ModeToggle() {\n const { mode, toggleMode } = useMode();\n const isDarkMode = mode === \"dark\";\n const modeText = `Enable ${isDarkMode ? \"light\" : \"dark\"} mode`;\n\n return (\n <Tooltip title={modeText}>\n <SwitchWithIcons\n uncheckedIcon={MdOutlineLightMode}\n checkedIcon={MdOutlineDarkMode}\n checked={isDarkMode}\n onChange={toggleMode}\n aria-label={modeText}\n />\n </Tooltip>\n );\n}\n\nexport default ModeToggle;\n","import type { JSX, ReactNode } from \"react\";\n\nimport BottomNavigation from \"@mui/material/BottomNavigation\";\nimport BottomNavigationAction from \"@mui/material/BottomNavigationAction\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\n\nexport interface NavItemBottom {\n /** The value associated with the nav item. */\n value: string;\n /** The label to display on the nav item. */\n label: string;\n /** An icon to display alongside the nav item. */\n icon?: JSX.Element;\n /** Where in your app the nav item should navigate to. */\n to: string;\n}\n\nexport interface NavigationBottomProps {\n /** Children to display above the nav bar. */\n children: ReactNode;\n /** An array of nav items to show. */\n navItems: Array<NavItemBottom>;\n}\n\n/** Renders a navigation bar at the bottom of the screen. Especially helpful for common navigation options in a mobile app. */\nfunction NavigationBottom({ children, navItems }: NavigationBottomProps) {\n const [value, setValue] = useState<string>(\"\");\n return (\n <>\n <Box sx={{ paddingBottom: 7 }}>{children}</Box>\n <Paper sx={{ position: \"fixed\", bottom: 0, left: 0, right: 0 }}>\n <BottomNavigation\n showLabels\n value={value}\n onChange={(_, value) => {\n setValue(value);\n }}\n >\n {navItems.map((item) => {\n return <BottomNavigationAction key={item.value} {...item} component={Link} />;\n })}\n </BottomNavigation>\n </Paper>\n </>\n );\n}\n\nexport default NavigationBottom;\n","import type { ReactNode } from \"react\";\n\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport CardHeader from \"@mui/material/CardHeader\";\nimport Divider from \"@mui/material/Divider\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface PageProps {\n /** The Page title to show */\n title: string;\n /** The subtitle to show under the Page title */\n subtitle?: string;\n /** The actions to show in the page header */\n action?: ReactNode;\n /** The actual page contents */\n children: ReactNode;\n}\n\n/** Renders a pre-styled Page that can be used to structure pages throughout your React apps. */\nfunction Page({ title, subtitle, action, children }: PageProps) {\n return (\n <Card>\n <CardHeader\n title={\n <>\n <Typography variant=\"h6\">{title}</Typography>\n {subtitle ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {subtitle}\n </Typography>\n ) : null}\n </>\n }\n action={action}\n />\n <Divider />\n <CardContent>{children}</CardContent>\n </Card>\n );\n}\n\nexport default Page;\n","import type { QueryBoundaryDataProps, QueryBoundaryProviderProps } from \"src/providers\";\nimport type { QueryBoundaryErrorProps } from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\n\nimport CircularProgress from \"@mui/material/CircularProgress\";\n\nimport { QueryBoundaryError } from \"src/providers\";\nimport QueryBoundaryProvider from \"src/providers/QueryBoundaryProvider\";\nimport QueryBoundaryData from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\n\nexport type QueryBoundaryProps<DataType> = Omit<\n QueryBoundaryProviderProps<DataType>,\n \"children\" | \"logError\"\n> &\n Omit<QueryBoundaryErrorProps, \"children\"> &\n Omit<QueryBoundaryDataProps<DataType>, \"showOnError\" | \"onUndefined\" | \"onNull\" | \"onNullable\">;\n\n/**\n * An in-line component that deals with state management when fetching data from an API.\n * This may be used over QueryBoundaryProvider if you don't require as much control over the placement of the error message and data display.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundary<DataType>({\n children,\n errorComponent,\n undefinedComponent,\n nullComponent,\n nullableComponent,\n logError,\n loadingComponent = <CircularProgress />,\n ...loaderProviderProps\n}: QueryBoundaryProps<DataType>) {\n return (\n <QueryBoundaryProvider<DataType> loadingComponent={loadingComponent} {...loaderProviderProps}>\n {/* @ts-expect-error: We need to pass all four to QueryBoundaryError for the wrapper to work. It is ok as QueryBoundary will then do its own checks to enforce mutual exclusivity, and QueryBoundaryError knows how to deal with it anyway. */}\n <QueryBoundaryError\n undefinedComponent={undefinedComponent}\n nullComponent={nullComponent}\n nullableComponent={nullableComponent}\n logError={logError}\n >\n {errorComponent}\n </QueryBoundaryError>\n <QueryBoundaryData<DataType>>{children}</QueryBoundaryData>\n </QueryBoundaryProvider>\n );\n}\n\nexport default QueryBoundary;\n","import type { SxProps, Theme } from \"@mui/material/styles\";\nimport type { ComponentProps } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { stripIndent } from \"common-tags\";\nimport { LiveEditor, LiveError, LivePreview, LiveProvider } from \"react-live\";\n\nimport { useMode } from \"src/providers\";\n\nexport interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {\n /** Extra styling to apply to the preview. Must be compatible with the Material UI `sx` prop. */\n previewStyles?: SxProps<Theme>;\n}\n\n/** Renders a playground to help demonstrate your React code in an interactive setting. */\nfunction ReactPlayground({ code, previewStyles, ...liveProviderProps }: ReactPlaygroundProps) {\n const { mode } = useMode();\n const defaultPreviewStyles: SxProps<Theme> = {\n backgroundColor: mode === \"dark\" ? \"black\" : \"white\",\n border: 0.3,\n borderRadius: 1,\n padding: 2,\n borderColor: \"darkgray\",\n };\n const allPreviewStyles = previewStyles\n ? { ...defaultPreviewStyles, ...previewStyles }\n : { ...defaultPreviewStyles };\n return (\n <Box sx={{ borderRadius: 1, border: 0.5, padding: 2 }}>\n <LiveProvider {...liveProviderProps} code={stripIndent(code ?? \"\")}>\n <Typography variant=\"h5\">Code</Typography>\n <Box\n sx={{\n border: 0.3,\n borderRadius: 0.3,\n borderColor: \"darkgray\",\n }}\n >\n <LiveEditor />\n </Box>\n <br />\n <Typography variant=\"h5\">Result</Typography>\n <Box sx={allPreviewStyles}>\n <LivePreview />\n <LiveError />\n </Box>\n </LiveProvider>\n </Box>\n );\n}\n\nexport default ReactPlayground;\n","import { fillArray } from \"@alextheman/utility\";\nimport Skeleton from \"@mui/material/Skeleton\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\n\nexport interface SkeletonRowProps {\n /** The number of columns the SkeletonRow should display. */\n columns: number;\n}\n\n/** Renders the skeleton of a table row. Often helpful to represent the loading state of the data in your table. */\nfunction SkeletonRow({ columns }: SkeletonRowProps) {\n return (\n <TableRow>\n {fillArray((index) => {\n return (\n <TableCell key={index}>\n <Skeleton />\n </TableCell>\n );\n }, columns)}\n </TableRow>\n );\n}\n\nexport default SkeletonRow;\n","import { ModeToggle } from \"src/components\";\n\n/** @deprecated This component has been renamed to `ModeToggle`. */\nconst DarkModeToggle = ModeToggle;\n\nexport default DarkModeToggle;\n","import type { ButtonOwnProps } from \"@mui/material/Button\";\nimport type { ElementType, MouseEvent as ReactMouseEvent, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport MUIButton from \"@mui/material/Button\";\nimport Menu from \"@mui/material/Menu\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { MdArrowDropDown, MdArrowDropUp } from \"react-icons/md\";\n\nexport interface DropdownMenuProps {\n children: ReactNode | ((closeMenu: () => void) => ReactNode);\n buttonChildren?: ReactNode;\n button?: ElementType;\n // Omit endIcon because the built-in isOpenIcon and isClosedIcon gives more control.\n // onClick is also omitted because that controls anchorElement, and the onOpen/onClose functions can be used instead.\n buttonProps?: Omit<ButtonOwnProps, \"onClick\" | \"endIcon\">;\n isOpenIcon?: ReactNode;\n isClosedIcon?: ReactNode;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\n/**\n * @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.\n */\nfunction DropdownMenu({\n children,\n button: Button = MUIButton,\n buttonChildren = \"Menu\",\n buttonProps: incomingButtonProps,\n isOpenIcon = <MdArrowDropUp />,\n isClosedIcon = <MdArrowDropDown />,\n onOpen,\n onClose,\n}: DropdownMenuProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null);\n const isDropdownOpen = useMemo(() => {\n return !!anchorElement;\n }, [anchorElement]);\n\n const buttonProps: Record<string, unknown> = {\n ...incomingButtonProps,\n onClick: (event: ReactMouseEvent<HTMLElement>) => {\n setAnchorElement(event.currentTarget);\n },\n \"aria-controls\": isDropdownOpen ? \"dropdown-menu\" : undefined,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": isDropdownOpen,\n };\n\n if (Button === MUIButton) {\n buttonProps.endIcon = isDropdownOpen ? isOpenIcon : isClosedIcon;\n }\n\n useEffect(() => {\n if (isDropdownOpen && onOpen) {\n onOpen();\n } else if (!isDropdownOpen && onClose) {\n onClose();\n }\n }, [isDropdownOpen, onOpen, onClose]);\n\n return (\n <Box>\n <Button {...buttonProps}>{buttonChildren}</Button>\n <Menu\n id=\"dropdown-menu\"\n anchorEl={anchorElement}\n open={isDropdownOpen}\n onClose={() => {\n setAnchorElement(null);\n }}\n >\n {typeof children === \"function\" ? (\n <Box>\n {children(() => {\n setAnchorElement(null);\n })}\n </Box>\n ) : (\n children\n )}\n </Menu>\n </Box>\n );\n}\n\nexport default DropdownMenu;\n","import type { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport type { CSSObject, Theme } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport { truncate } from \"@alextheman/utility\";\nimport MuiAppBar from \"@mui/material/AppBar\";\nimport Box from \"@mui/material/Box\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport Divider from \"@mui/material/Divider\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { styled, useTheme } from \"@mui/material/styles\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport Typography from \"@mui/material/Typography\";\nimport { Fragment, useState } from \"react\";\nimport { MdChevronLeft, MdChevronRight, MdMenu } from \"react-icons/md\";\nimport { useLocation } from \"wouter\";\n\nimport { InternalLink } from \"src/v7/components/routing\";\n\nconst drawerWidth = 240;\n\nfunction openedMixin(theme: Theme): CSSObject {\n return {\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n };\n}\n\nfunction closedMixin(theme: Theme): CSSObject {\n return {\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n };\n}\n\nconst DrawerHeader = styled(\"div\")(({ theme }) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n };\n});\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})<AppBarProps>(({ theme }) => {\n return {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n },\n ],\n };\n});\n\nconst Drawer = styled(MuiDrawer, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})(({ theme }) => {\n return {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n },\n },\n {\n props: ({ open }) => {\n return !open;\n },\n style: {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n },\n },\n ],\n };\n});\n\nexport interface NavMenuItemOptions {\n /** The label to display on the nav item option. */\n label: string;\n /** Where in your app the nav item option should navigate to. */\n to: string;\n /** An icon to display alongside the nav item option. */\n icon?: ReactNode;\n}\n\nexport interface NavMenuItem {\n /** The category to display all the nav item options under. */\n category: string;\n /** An array of nav options to display under the chosen category. */\n options: Array<NavMenuItemOptions>;\n}\n\nexport interface NavigationDrawerProps {\n /** The title to display at the top of the wrapper. */\n title: string;\n /** An array of nav items to show. */\n navItems: Array<NavMenuItem>;\n /** Any extra elements to add to the header. */\n headerElements?: ReactNode;\n /** Children to display within the wrapper. */\n children: ReactNode;\n}\n\n/** Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps. */\nfunction NavigationDrawer({ title, navItems, children, headerElements }: NavigationDrawerProps) {\n const theme = useTheme();\n const [open, setOpen] = useState(true);\n const [location] = useLocation();\n\n function handleDrawerOpen() {\n setOpen(true);\n }\n\n function handleDrawerClose() {\n setOpen(false);\n }\n\n return (\n <Box sx={{ display: \"flex\" }}>\n <CssBaseline />\n <AppBar position=\"fixed\" open={open}>\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={handleDrawerOpen}\n edge=\"start\"\n sx={[\n {\n marginRight: 5,\n },\n open && { display: \"none\" },\n ]}\n >\n <MdMenu />\n </IconButton>\n <Typography variant=\"h6\" noWrap component=\"div\">\n {title}\n </Typography>\n {headerElements}\n </Toolbar>\n </AppBar>\n <Drawer variant=\"permanent\" open={open}>\n <DrawerHeader>\n <IconButton onClick={handleDrawerClose}>\n {theme.direction === \"rtl\" ? <MdChevronRight /> : <MdChevronLeft />}\n </IconButton>\n </DrawerHeader>\n <Divider />\n {navItems.map((item) => {\n return (\n <Fragment key={item.category}>\n <List>\n <Typography variant={open ? \"h5\" : \"h6\"} sx={{ paddingLeft: open ? 2 : 1 }}>\n {open ? item.category : truncate(item.category, 4)}\n </Typography>\n {item.options.map((option) => {\n return (\n <ListItem key={option.to} disablePadding sx={{ display: \"block\" }}>\n <ListItemButton\n sx={[\n {\n minHeight: 48,\n px: 2.5,\n },\n open\n ? {\n justifyContent: \"initial\",\n }\n : {\n justifyContent: \"center\",\n },\n ]}\n component={InternalLink}\n to={option.to}\n selected={location === option.to}\n >\n <ListItemIcon\n sx={[\n {\n minWidth: 0,\n justifyContent: \"center\",\n },\n open\n ? {\n mr: 3,\n }\n : {\n mr: \"auto\",\n },\n ]}\n >\n {option.icon ? (\n option.icon\n ) : !open ? (\n <Typography>{truncate(option.label, 4)}</Typography>\n ) : null}\n </ListItemIcon>\n <ListItemText\n primary={option.label}\n sx={[\n open\n ? {\n opacity: 1,\n }\n : {\n opacity: 0,\n },\n ]}\n />\n </ListItemButton>\n </ListItem>\n );\n })}\n </List>\n <Divider />\n </Fragment>\n );\n })}\n </Drawer>\n <Box component=\"main\" sx={{ flexGrow: 1, p: 3 }}>\n <DrawerHeader />\n {children}\n </Box>\n </Box>\n );\n}\n\nexport default NavigationDrawer;\n","import { createFormHookContexts } from \"@tanstack/react-form\";\n\nexport const { fieldContext, formContext, useFieldContext, useFormContext } =\n createFormHookContexts();\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { Dispatch, ReactNode, SetStateAction } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility\";\nimport { createContext, useContext, useMemo, useState } from \"react\";\n\nexport interface DropdownMenuContextValue {\n /** A function responsible for closing the dropdown menu. */\n closeMenu: () => void;\n /** Represents whether or not the dropdown is open. */\n isDropdownOpen: boolean;\n}\n\nexport type DropdownMenuInternalContextValue = DropdownMenuContextValue & {\n anchorElement: HTMLElement | null;\n setAnchorElement: Dispatch<SetStateAction<HTMLElement | null>>;\n};\nconst DropdownMenuContext = createContext<DropdownMenuInternalContextValue | undefined>(undefined);\n\n/**\n Access the DropdownMenu context directly.\n */\nexport function useDropdownMenu<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, DropdownMenuContextValue> {\n const context = useContext(DropdownMenuContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"DROPDOWN_MENU_NOT_FOUND\",\n \"Could not find the DropdownMenu context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, DropdownMenuContextValue>;\n}\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function useDropdownMenuInternal<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, DropdownMenuInternalContextValue> {\n return useDropdownMenu({ strict }) as OptionalOnCondition<\n Strict,\n DropdownMenuInternalContextValue\n >;\n}\n\nexport interface DropdownMenuProviderProps {\n /** The children to render inside of the dropdown. */\n children: ReactNode;\n}\n\n/** Provides shared context for the `DropdownMenu` related components. */\nfunction DropdownMenuProvider({ children }: DropdownMenuProviderProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null);\n\n const isDropdownOpen = useMemo(() => {\n return !!anchorElement;\n }, [anchorElement]);\n\n function closeMenu() {\n setAnchorElement(null);\n }\n\n return (\n <DropdownMenuContext.Provider\n value={{ closeMenu, isDropdownOpen, anchorElement, setAnchorElement }}\n >\n {children}\n </DropdownMenuContext.Provider>\n );\n}\n\nexport default DropdownMenuProvider;\n","import type { MenuProps } from \"@mui/material/Menu\";\nimport type { MouseEvent, ReactNode } from \"react\";\n\nimport Menu from \"@mui/material/Menu\";\n\nimport { useDropdownMenuInternal } from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\n\nexport interface DropdownMenuProps extends Omit<MenuProps, \"anchorEl\" | \"open\"> {\n /** The children to render inside of the dropdown. */\n children: ReactNode;\n}\n\n/**\n * Renders a menu component that can be used alongside the `DropdownMenuProvider`.\n *\n * This component's open state would be controlled by the `DropdownMenuTrigger`.\n */\nfunction DropdownMenu({ children, onClose, ...menuProps }: DropdownMenuProps) {\n const { anchorElement, isDropdownOpen, closeMenu } = useDropdownMenuInternal();\n\n return (\n <Menu\n anchorEl={anchorElement}\n open={isDropdownOpen}\n onClose={(event: MouseEvent, reason) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClose) {\n onClose(event, reason);\n }\n }}\n {...menuProps}\n >\n {children}\n </Menu>\n );\n}\n\nexport default DropdownMenu;\n","import type Button from \"@mui/material/Button\";\nimport type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type {\n ComponentProps,\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ElementType,\n ReactNode,\n} from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { useDropdownMenu } from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\n\nexport type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button> = {\n /**\n * An optional component to provide to override the current component.\n *\n * Note that the provided component must:\n * - accept a `to` prop.\n * - correctly handle the forwarded `ref`.\n * - render a valid anchor element (or equivalent) for proper accessibility.\n */\n component?: RootComponent;\n /** The children to be rendered within the menu item. */\n children?: ReactNode;\n /** The ref to forward to allow it to be used with polymorphic components */\n ref?: ComponentPropsWithRef<RootComponent>[\"ref\"];\n /** A function to execute after clicking the item. */\n onClick?: ComponentProps<RootComponent>[\"onClick\"];\n} & Omit<ComponentPropsWithoutRef<RootComponent>, \"children\" | \"ref\"> &\n MenuItemOwnProps;\n\n/** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */\nfunction DropdownMenuItem<RootComponent extends ElementType = typeof Button>({\n component,\n children,\n ref,\n onClick,\n ...menuItemProps\n}: DropdownMenuItemProps<RootComponent>) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={component}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (onClick) {\n onClick(event);\n }\n if (event.defaultPrevented) {\n return;\n }\n closeMenu();\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuItem;\n","import type {\n DropdownMenuContextValue as DropdownMenuContextValueV7,\n DropdownMenuProps,\n} from \"src/v7\";\n\nimport { DropdownMenu, useDropdownMenu as useDropdownMenuV7 } from \"src/v7\";\n\nexport type DropdownMenuContextValue = DropdownMenuContextValueV7;\n\nexport const useDropdownMenu = useDropdownMenuV7;\n\n/**\n * @deprecated Please use `DropdownMenuProps` from `@alextheman/components/v7` instead.\n *\n * This will be replaced in the root entrypoint in a future release.\n */\nexport type DropdownMenu2Props = DropdownMenuProps;\n\n/**\n * @deprecated Please use `DropdownMenu` from `@alextheman/components/v7` instead.\n *\n * This will be replaced in the root entrypoint in a future release.\n */\nconst DropdownMenu2 = DropdownMenu;\n\nexport default DropdownMenu2;\n","import type { ElementType } from \"react\";\n\nimport type { DropdownMenuItemProps as DropdownMenuItemPropsV7 } from \"src/v7\";\n\nimport { DropdownMenuItem as DropdownMenuItemV7 } from \"src/v7\";\n\nexport type DropdownMenuItemProps<RootComponent extends ElementType> =\n DropdownMenuItemPropsV7<RootComponent>;\n\nconst DropdownMenuItem = DropdownMenuItemV7;\n\nexport default DropdownMenuItem;\n","import DropdownMenu2 from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\n\nexport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nexport { default as DropdownMenuItem } from \"src/deprecated/DropdownMenu2/DropdownMenuItem\";\n\nexport type { DropdownMenu2Props } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nexport type { DropdownMenuItemProps } from \"src/deprecated/DropdownMenu2/DropdownMenuItem\";\n\nexport default DropdownMenu2;\n","import type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type { ComponentProps, MouseEventHandler, ReactNode, Ref } from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { ExternalLink } from \"src/components\";\nimport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\n\nexport interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {\n ref?: Ref<HTMLAnchorElement>;\n href: ComponentProps<typeof ExternalLink>[\"href\"];\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n children: ReactNode;\n}\n\n/** @deprecated Please use `<DropdownMenuItem component={ExternalLink} />` instead. */\nfunction DropdownMenuExternalLink({\n ref,\n href,\n children,\n onClick,\n ...menuItemProps\n}: DropdownMenuExternalLinkProps) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={ExternalLink}\n href={href}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClick) {\n onClick(event);\n }\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuExternalLink;\n","import type { LinkProps } from \"@mui/material/Link\";\nimport type { ElementType, ReactNode, Ref } from \"react\";\n\nimport MUILink from \"@mui/material/Link\";\nimport { Link as ReactDOMLink } from \"react-router-dom\";\n\nexport interface InternalLinkProps extends Omit<LinkProps, \"href\" | \"component\"> {\n /** The path to navigate to */\n to: `/${string}` | `~/${string}` | (string & {});\n /**\n * An optional component to provide to override the current component.\n *\n * Note that the provided component must:\n * - accept a `to` prop\n * - correctly handle the forwarded `ref`\n * - render a valid anchor element (or equivalent) for proper accessibility\n */\n component?: ElementType;\n href?: never;\n /** The readable content to display on the link. */\n children: ReactNode;\n /** An optional ref to allow it to be used with polymorphic components. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * A stylised link for navigating within your application.\n *\n * Uses the app router for client-side navigation and opens the destination in the same tab.\n *\n * Defaults to a React Router implementation but can be overridden via the `component` prop.\n *\n * @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `InternalLink` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.\n */\nfunction InternalLink({\n to,\n component = ReactDOMLink,\n children,\n ref,\n ...linkProps\n}: InternalLinkProps) {\n return (\n <MUILink component={component} to={to} ref={ref} {...linkProps}>\n {children}\n </MUILink>\n );\n}\n\nexport default InternalLink;\n","import type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type { ComponentProps, MouseEventHandler, ReactNode, Ref } from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nimport InternalLink from \"src/deprecated/InternalLink\";\n\nexport interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {\n ref?: Ref<HTMLAnchorElement>;\n to: ComponentProps<typeof InternalLink>[\"to\"];\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n children: ReactNode;\n}\n\n/** @deprecated Please use `<DropdownMenuItem component={InternalLink} />` instead. */\nfunction DropdownMenuInternalLink({\n to,\n ref,\n children,\n onClick,\n ...menuItemProps\n}: DropdownMenuInternalLinkProps) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={InternalLink}\n to={to}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClick) {\n onClick(event);\n }\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuInternalLink;\n","import type { OverridableComponent } from \"@mui/material/OverridableComponent\";\nimport type { SvgIconTypeMap } from \"@mui/material/SvgIcon\";\nimport type { ElementType, MouseEvent as ReactMouseEvent, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport Popover from \"@mui/material/Popover\";\nimport { useId, useState } from \"react\";\nimport { MdVisibility } from \"react-icons/md\";\n\nexport interface IconWithPopoverProps {\n icon?:\n | (OverridableComponent<SvgIconTypeMap<unknown, \"svg\">> & {\n muiName: string;\n })\n | ElementType;\n onOpen?: () => void;\n onClose?: () => void;\n iconProps?: SvgIconTypeMap<unknown, \"svg\">[\"props\"];\n children: ReactNode;\n}\n\n/**\n * @deprecated This component is not well-designed for accessibility purposes. Please use the `Tooltip` component from `@mui/material` instead.\n *\n * @example\n * ```tsx\n * <Tooltip title=\"Text to display on hover\">\n * <MdVisibility />\n * </Tooltip>\n * ```\n */\nfunction IconWithPopover({\n icon: Icon = MdVisibility,\n onOpen,\n onClose,\n iconProps,\n children,\n}: IconWithPopoverProps) {\n const [anchorElement, setAnchorElement] = useState<Element | null>(null);\n const isPopoverOpen = !!anchorElement;\n const popoverId = useId();\n\n function handleOpen(event: ReactMouseEvent<SVGSVGElement, MouseEvent>) {\n setAnchorElement(event.currentTarget);\n if (onOpen) {\n onOpen();\n }\n }\n\n function handleClose() {\n setAnchorElement(null);\n if (onClose) {\n onClose();\n }\n }\n\n return (\n <Box>\n <Icon\n aria-owns={isPopoverOpen ? popoverId : undefined}\n aria-haspopup=\"true\"\n onMouseEnter={handleOpen}\n onMouseLeave={handleClose}\n {...iconProps}\n />\n <Popover\n id={popoverId}\n disablePortal\n disableScrollLock\n slotProps={{\n root: {\n disableEnforceFocus: true,\n disableAutoFocus: true,\n disableRestoreFocus: true,\n },\n }}\n sx={{ pointerEvents: \"none\" }}\n open={isPopoverOpen}\n anchorEl={anchorElement}\n anchorOrigin={{\n vertical: \"bottom\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n onClose={handleClose}\n disableRestoreFocus\n >\n {children}\n </Popover>\n </Box>\n );\n}\n\nexport default IconWithPopover;\n","import type { ListItemButtonProps } from \"@mui/material/ListItemButton\";\nimport type { ReactNode } from \"react\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\n\nimport InternalLink from \"src/deprecated/InternalLink\";\n\nexport interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, \"href\"> {\n children: ReactNode;\n to: string;\n}\n\n/** @deprecated Probably not that worth centralising here - can be easily recreated per use case. */\nfunction ListItemInternalLink({ children, ...listItemButtonProps }: ListItemInternalLinkProps) {\n return (\n <ListItemButton component={InternalLink} {...listItemButtonProps}>\n {children}\n </ListItemButton>\n );\n}\n\nexport default ListItemInternalLink;\n","import type { QueryBoundaryDataProps } from \"src/providers\";\n\nimport { QueryBoundaryData } from \"src/providers\";\n\n/** @deprecated This type has been renamed to QueryBoundaryDataProps. */\nexport type LoaderDataProps<DataType> = QueryBoundaryDataProps<DataType>;\n\n/** @deprecated This component has been renamed to QueryBoundaryData. */\nconst LoaderData = QueryBoundaryData;\n\nexport default LoaderData;\n","import type {\n QueryBoundaryErrorBaseProps,\n QueryBoundaryErrorProps,\n QueryBoundaryErrorPropsWithNullable,\n QueryBoundaryErrorPropsWithUndefinedOrNull,\n} from \"src/providers\";\n\nimport { QueryBoundaryError } from \"src/providers\";\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorBaseProps. */\nexport type LoaderErrorBaseProps = QueryBoundaryErrorBaseProps;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorPropsWithUndefinedOrNull. */\nexport type LoaderErrorPropsWithUndefinedOrNull = QueryBoundaryErrorPropsWithUndefinedOrNull;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorPropsWithNullable. */\nexport type LoaderErrorPropsWithNullable = QueryBoundaryErrorPropsWithNullable;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorProps. */\nexport type LoaderErrorProps = QueryBoundaryErrorProps;\n\n/** @deprecated This component has been renamed to LoaderError. */\nconst LoaderError = QueryBoundaryError;\n\nexport default LoaderError;\n","import type {\n QueryBoundaryContextValue,\n QueryBoundaryProviderBaseProps,\n QueryBoundaryProviderProps,\n QueryBoundaryProviderPropsWithError,\n QueryBoundaryProviderPropsWithNoError,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nimport { QueryBoundaryProvider } from \"src/providers\";\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderBaseProps. */\nexport type LoaderProviderBaseProps<DataType> = QueryBoundaryProviderBaseProps<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithNoError. */\nexport type LoaderProviderPropsWithNoError<DataType> =\n QueryBoundaryProviderPropsWithNoError<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithError. */\nexport type LoaderProviderPropsWithError<DataType> = QueryBoundaryProviderPropsWithError<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryContextValue. */\nexport type LoaderContextValue<DataType> = QueryBoundaryContextValue<DataType>;\n/** @deprecated This type has been renamed to QueryBoundaryProviderProps. */\nexport type LoaderProviderProps<DataType> = QueryBoundaryProviderProps<DataType>;\n\n/** @deprecated This hook has been renamed to useQueryBoundary */\nexport const useLoader = useQueryBoundary;\n\n/** @deprecated This component has been renamed to QueryBoundaryProvider */\nconst LoaderProvider = QueryBoundaryProvider;\n\nexport default LoaderProvider;\n","import type { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport type { CSSObject, Theme } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport { truncate } from \"@alextheman/utility\";\nimport MuiAppBar from \"@mui/material/AppBar\";\nimport Box from \"@mui/material/Box\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport Divider from \"@mui/material/Divider\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { styled, useTheme } from \"@mui/material/styles\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport Typography from \"@mui/material/Typography\";\nimport { Fragment, useState } from \"react\";\nimport { MdChevronLeft, MdChevronRight, MdMenu } from \"react-icons/md\";\nimport { Link, useLocation } from \"react-router-dom\";\n\nconst drawerWidth = 240;\n\nfunction openedMixin(theme: Theme): CSSObject {\n return {\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n };\n}\n\nfunction closedMixin(theme: Theme): CSSObject {\n return {\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n };\n}\n\nconst DrawerHeader = styled(\"div\")(({ theme }) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n };\n});\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})<AppBarProps>(({ theme }) => {\n return {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n },\n ],\n };\n});\n\nconst Drawer = styled(MuiDrawer, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})(({ theme }) => {\n return {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n },\n },\n {\n props: ({ open }) => {\n return !open;\n },\n style: {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n },\n },\n ],\n };\n});\n\nexport interface NavMenuItemOptions {\n /** The label to display on the nav item option. */\n label: string;\n /** Where in your app the nav item option should navigate to. */\n to: string;\n /** An icon to display alongside the nav item option. */\n icon?: ReactNode;\n}\n\nexport interface NavMenuItem {\n /** The category to display all the nav item options under. */\n category: string;\n /** An array of nav options to display under the chosen category. */\n options: Array<NavMenuItemOptions>;\n}\n\nexport interface NavigationDrawerProps {\n /** The title to display at the top of the wrapper. */\n title: string;\n /** An array of nav items to show. */\n navItems: Array<NavMenuItem>;\n /** Any extra elements to add to the header. */\n headerElements?: ReactNode;\n /** Children to display within the wrapper. */\n children: ReactNode;\n}\n\n/**\n * Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps.\n *\n * @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `NavigationDrawer` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.\n */\nfunction NavigationDrawer({ title, navItems, children, headerElements }: NavigationDrawerProps) {\n const theme = useTheme();\n const [open, setOpen] = useState(true);\n const location = useLocation();\n\n function handleDrawerOpen() {\n setOpen(true);\n }\n\n function handleDrawerClose() {\n setOpen(false);\n }\n\n return (\n <Box sx={{ display: \"flex\" }}>\n <CssBaseline />\n <AppBar position=\"fixed\" open={open}>\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={handleDrawerOpen}\n edge=\"start\"\n sx={[\n {\n marginRight: 5,\n },\n open && { display: \"none\" },\n ]}\n >\n <MdMenu />\n </IconButton>\n <Typography variant=\"h6\" noWrap component=\"div\">\n {title}\n </Typography>\n {headerElements}\n </Toolbar>\n </AppBar>\n <Drawer variant=\"permanent\" open={open}>\n <DrawerHeader>\n <IconButton onClick={handleDrawerClose}>\n {theme.direction === \"rtl\" ? <MdChevronRight /> : <MdChevronLeft />}\n </IconButton>\n </DrawerHeader>\n <Divider />\n {navItems.map((item) => {\n return (\n <Fragment key={item.category}>\n <List>\n <Typography variant={open ? \"h5\" : \"h6\"} sx={{ paddingLeft: open ? 2 : 1 }}>\n {open ? item.category : truncate(item.category, 4)}\n </Typography>\n {item.options.map((option) => {\n return (\n <ListItem key={option.to} disablePadding sx={{ display: \"block\" }}>\n <ListItemButton\n sx={[\n {\n minHeight: 48,\n px: 2.5,\n },\n open\n ? {\n justifyContent: \"initial\",\n }\n : {\n justifyContent: \"center\",\n },\n ]}\n component={Link}\n to={option.to}\n selected={location.pathname === option.to}\n >\n <ListItemIcon\n sx={[\n {\n minWidth: 0,\n justifyContent: \"center\",\n },\n open\n ? {\n mr: 3,\n }\n : {\n mr: \"auto\",\n },\n ]}\n >\n {option.icon ? (\n option.icon\n ) : !open ? (\n <Typography>{truncate(option.label, 4)}</Typography>\n ) : null}\n </ListItemIcon>\n <ListItemText\n primary={option.label}\n sx={[\n open\n ? {\n opacity: 1,\n }\n : {\n opacity: 0,\n },\n ]}\n />\n </ListItemButton>\n </ListItem>\n );\n })}\n </List>\n <Divider />\n </Fragment>\n );\n })}\n </Drawer>\n <Box component=\"main\" sx={{ flexGrow: 1, p: 3 }}>\n <DrawerHeader />\n {children}\n </Box>\n </Box>\n );\n}\n\nexport default NavigationDrawer;\n","import type { TypographyProps } from \"@mui/material/Typography\";\n\nimport Typography from \"@mui/material/Typography\";\n\nexport interface PopoverTextProps extends TypographyProps {\n text: string;\n}\n\n/**\n * @deprecated This component has been deprecated alongside `IconWithPopover`.\n */\nfunction PopoverText({ text, sx, ...typographyProps }: PopoverTextProps) {\n return (\n <>\n {text.split(\"\\n\").map((line, index) => {\n return (\n <Typography key={index} sx={{ margin: 1, ...sx }} {...typographyProps}>\n {line}\n </Typography>\n );\n })}\n </>\n );\n}\n\nexport default PopoverText;\n","import type { ButtonProps } from \"@mui/material/Button\";\n\nimport Button from \"@mui/material/Button\";\nimport { useFormContext } from \"react-hook-form\";\n\nexport interface SubmitButtonProps extends Omit<ButtonProps, \"type\"> {\n /** An option to disable the button on submit if the form is not dirty. */\n disableClean?: boolean;\n /** The label for the button. */\n label: string;\n}\n\n/**\n * A Submit Button for use with `react-hook-form`.\n *\n * @deprecated This component is not compatible with `@tanstack/react-form`. Please use `SubmitButton` from the `@alextheman/components/v7` entrypoint instead. This component will be replaced when v7 officially comes out.\n */\nfunction SubmitButton({ disableClean, label, ...buttonProps }: SubmitButtonProps) {\n const {\n formState: { disabled: formDisabled, isDirty, isSubmitting },\n } = useFormContext();\n\n return (\n <Button\n color=\"primary\"\n disabled={buttonProps.disabled || (disableClean && !isDirty) || formDisabled}\n loading={isSubmitting}\n type=\"submit\"\n variant=\"contained\"\n {...buttonProps}\n >\n {label}\n </Button>\n );\n}\n\nexport default SubmitButton;\n","import type { Dispatch, SetStateAction } from \"react\";\n\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * Stores changes to the window hash as React state.\n *\n * @template StateType - The type of the hash state.\n *\n * @param initialHash - The initial value of the hash.\n *\n * @returns A tuple containing the hash state, and a updater function to set the hash state.\n */\nfunction useHash<StateType extends string>(\n initialHash: StateType | undefined,\n): [StateType, Dispatch<SetStateAction<StateType>>] {\n const [hash, setHash] = useState<StateType>(() => {\n const hash: StateType = window.location.hash.replace(\"#\", \"\") as StateType;\n return !initialHash ? hash : hash === \"\" ? initialHash : hash;\n });\n const hashChangeHandler = useCallback(() => {\n const hash: StateType = window.location.hash.replace(\"#\", \"\") as StateType;\n setHash(!initialHash ? hash : hash === \"\" ? initialHash : hash);\n }, [setHash, initialHash]);\n\n useEffect(() => {\n window.addEventListener(\"hashchange\", hashChangeHandler);\n return () => {\n window.removeEventListener(\"hashchange\", hashChangeHandler);\n };\n }, [hashChangeHandler]);\n\n const updateHash = useCallback(\n (newHash: StateType | ((previousState: StateType) => StateType)) => {\n const resolvedHash = typeof newHash === \"function\" ? newHash(hash) : newHash;\n if (resolvedHash !== hash) {\n window.location.hash = resolvedHash;\n }\n },\n [hash],\n );\n\n return [hash, updateHash];\n}\n\nexport default useHash;\n"],"mappings":"owFAcA,SAASA,GAAU,CAAE,iBAAgB,cAA8B,CACjE,OACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CACE,GAAI,CACF,MAAO,IACP,OAAQ,IACR,gBAAiB,yBACjB,eAAgB,YAChB,OAAQ,mCACR,UAAW,+BACZ,WAED,EAAA,EAAA,MAACC,EAAAA,QAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CAAY,QAAQ,KAAK,aAAA,GAAa,GAAI,CAAE,MAAO,UAAW,UAC3D,EACU,CAAA,EAEb,EAAA,EAAA,KAACC,EAAAA,QAAD,CAAO,QAAS,WACb,EAAW,IAAK,IAEb,EAAA,EAAA,KAACC,EAAAA,QAAD,CAES,QACP,GAAI,CACF,gBAAiB,yBACjB,MAAO,yBACP,OAAQ,mCACT,CACD,CAPK,EAOL,CAEJ,CACI,CAAA,CACI,CAAA,CAAA,CACT,CAAA,CAIX,SAAS,IAAY,CACnB,OACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CACE,GAAI,CACF,MAAO,IACP,OAAQ,EACR,aAAc,EACd,WAAY,oDACZ,UAAW,kCACZ,CACD,CAAA,CAKN,SAAS,IAAU,CACjB,OACE,EAAA,EAAA,MAACL,EAAAA,QAAD,CACE,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AM,IAAA,EAAA,EAAA,cAAqC,CAChD,IAAM,EAAkB,OAAO,SAAS,KAAK,QAAQ,IAAK,GAAG,CAC7D,OAAQ,GAAqB,IAAS,GAAK,EAAc,GACzD,CACI,GAAA,EAAA,EAAA,iBAAsC,CAC1C,IAAM,EAAkB,OAAO,SAAS,KAAK,QAAQ,IAAK,GAAG,CAC7D,EAAS,GAAqB,IAAS,GAAK,EAAc,EAAK,EAC9D,CAAC,EAAS,EAAY,CAAC,CAmB1B,OAjBA,EAAA,EAAA,gBACE,OAAO,iBAAiB,aAAc,EAAkB,KAC3C,CACX,OAAO,oBAAoB,aAAc,EAAkB,GAE5D,CAAC,EAAkB,CAAC,CAYhB,CAAC,GAAA,EAAA,EAAA,aATL,GAAmE,CAClE,IAAM,EAAe,OAAO,GAAY,WAAa,EAAQ,EAAK,CAAG,EACjE,IAAiB,IACnB,OAAO,SAAS,KAAO,IAG3B,CAAC,EAAK,CACP,CAEwB"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Container","Card","CardContent","Typography","Stack","Chip","Box","CardHeader","Divider","ButtonBase","MdArrowDropUp","MdArrowDropDown","Box","Collapse","MUILink","Button","MdCloudUpload","Box","List","ListItem","IconButton","MdDelete","ListItemText","Switch","Box","DataError","ThemeProvider","CssBaseline","DataError","CircularProgress","Alert","DataError","DataError","Snackbar","Alert","Tooltip","MdOutlineLightMode","MdOutlineDarkMode","Box","Paper","BottomNavigation","BottomNavigationAction","Link","Card","CardHeader","Typography","Divider","CardContent","CircularProgress","QueryBoundaryProvider","Box","LiveProvider","Typography","LiveEditor","LivePreview","LiveError","TableRow","TableCell","Skeleton","MUIButton","MdArrowDropUp","MdArrowDropDown","Box","Menu","drawerWidth","openedMixin","closedMixin","DrawerHeader","AppBar","MuiAppBar","Drawer","MuiDrawer","useDropdownMenu","DataError","DropdownMenu","Menu","DropdownMenuItem","useDropdownMenu","MenuItem","useDropdownMenuV7","DropdownMenu","DropdownMenuItemV7","MenuItem","ReactDOMLink","MUILink","MenuItem","MdVisibility","Box","Popover","ListItemButton","QueryBoundaryProvider","MuiAppBar","MuiDrawer","Box","CssBaseline","Toolbar","IconButton","MdMenu","Typography","MdChevronRight","MdChevronLeft","Divider","Fragment","List","ListItem","ListItemButton","Link","ListItemIcon","ListItemText","Typography","Button"],"sources":["../src/components/Artwork.tsx","../src/components/CollapsableItem.tsx","../src/components/ExternalLink.tsx","../src/components/FileInput.tsx","../src/components/FileInputList.tsx","../src/components/SwitchWithIcons.tsx","../src/providers/ModeProvider.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryProvider.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryData.tsx","../src/providers/QueryBoundaryProvider/QueryBoundaryError.tsx","../src/providers/QueryBoundaryProvider/index.tsx","../src/providers/ScreenSizeProvider.tsx","../src/providers/SnackbarProvider.tsx","../src/components/ModeToggle.tsx","../src/components/NavigationBottom.tsx","../src/components/Page.tsx","../src/components/QueryBoundary.tsx","../src/components/ReactPlayground.tsx","../src/components/SkeletonRow.tsx","../src/deprecated/DarkModeToggle.tsx","../src/deprecated/DropdownMenu.tsx","../src/v7/components/NavigationDrawer.tsx","../src/v7/hooks/formHooks.ts","../src/v7/components/DropdownMenu/DropdownMenuProvider.tsx","../src/v7/components/DropdownMenu/DropdownMenu.tsx","../src/v7/components/DropdownMenu/DropdownMenuItem.tsx","../src/deprecated/DropdownMenu2/DropdownMenu2.tsx","../src/deprecated/DropdownMenu2/DropdownMenuItem.tsx","../src/deprecated/DropdownMenu2/index.tsx","../src/deprecated/DropdownMenuExternalLink.tsx","../src/deprecated/InternalLink.tsx","../src/deprecated/DropdownMenuInternalLink.tsx","../src/deprecated/IconWithPopover.tsx","../src/deprecated/ListItemInternalLink.tsx","../src/deprecated/Loader.tsx","../src/deprecated/LoaderData.tsx","../src/deprecated/LoaderError.tsx","../src/deprecated/LoaderProvider.tsx","../src/deprecated/NavigationDrawer.tsx","../src/deprecated/PopoverText.tsx","../src/deprecated/SubmitButton.tsx","../src/hooks/useHash.ts"],"sourcesContent":["import Box from \"@mui/material/Box\";\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport CardHeader from \"@mui/material/CardHeader\";\nimport Chip from \"@mui/material/Chip\";\nimport Divider from \"@mui/material/Divider\";\nimport Stack from \"@mui/material/Stack\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface ContainerProps {\n containerLabel: string;\n chipLabels: Array<string>;\n}\n\nfunction Container({ containerLabel, chipLabels }: ContainerProps) {\n return (\n <Card\n sx={{\n width: 320,\n height: 420,\n backgroundColor: \"rgba(255,255,255,0.07)\",\n backdropFilter: \"blur(8px)\",\n border: \"1px solid rgba(255,255,255,0.06)\",\n boxShadow: \"0 10px 40px rgba(0,0,0,0.35)\",\n }}\n >\n <CardContent>\n <Typography variant=\"h6\" gutterBottom sx={{ color: \"#f8fafc\" }}>\n {containerLabel}\n </Typography>\n\n <Stack spacing={1}>\n {chipLabels.map((label) => {\n return (\n <Chip\n key={label}\n label={label}\n sx={{\n backgroundColor: \"rgba(255,255,255,0.11)\",\n color: \"rgba(255,255,255,0.88)\",\n border: \"1px solid rgba(255,255,255,0.06)\",\n }}\n />\n );\n })}\n </Stack>\n </CardContent>\n </Card>\n );\n}\n\nfunction Connector() {\n return (\n <Box\n sx={{\n width: 120,\n height: 6,\n borderRadius: 3,\n background: \"linear-gradient(90deg, #f43f5e, #a78bfa, #22d3ee)\",\n boxShadow: \"0 0 24px rgba(167,139,250,0.55)\",\n }}\n />\n );\n}\n\n/** The artwork associated with the package's theme song, _An Interface For You And I_. */\nfunction Artwork() {\n return (\n <Card\n sx={{\n width: 1000,\n height: 1000,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n p: 4,\n background:\n \"radial-gradient(circle at 20% 10%, rgba(167,139,250,0.35) 0%, rgba(167,139,250,0.12) 35%, rgba(0,0,0,0) 55%), linear-gradient(135deg, #3a3380 0%, #1d2e5f 40%, #2d3f55 100%)\",\n color: \"white\",\n }}\n elevation={0}\n >\n <CardHeader\n title=\"An Interface For You And I\"\n sx={{\n color: \"#f8fafc\",\n textAlign: \"center\",\n \"& .MuiCardHeader-title\": {\n fontSize: 40,\n fontWeight: 600,\n letterSpacing: 2,\n },\n }}\n />\n\n <Divider sx={{ borderColor: \"rgba(255,255,255,0.2)\" }} />\n\n <CardContent sx={{ flex: 1, display: \"flex\", alignItems: \"center\" }}>\n <Stack\n direction=\"row\"\n spacing={4}\n sx={{ width: \"100%\", justifyContent: \"center\", alignItems: \"center\" }}\n >\n <Container\n containerLabel=\"You\"\n chipLabels={[\"state\", \"context\", \"input\", \"event\", \"focus\", \"value\", \"history\"]}\n />\n <Connector />\n <Container\n containerLabel=\"I\"\n chipLabels={[\"render\", \"effect\", \"response\", \"update\", \"history\", \"layout\", \"provider\"]}\n />\n </Stack>\n </CardContent>\n </Card>\n );\n}\n\nexport default Artwork;\n","import type { CollapseProps } from \"@mui/material/Collapse\";\nimport type { SxProps } from \"@mui/material/styles\";\nimport type { ElementType, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport ButtonBase from \"@mui/material/ButtonBase\";\nimport Collapse from \"@mui/material/Collapse\";\nimport { useEffect, useState } from \"react\";\nimport { MdArrowDropDown, MdArrowDropUp } from \"react-icons/md\";\n\nexport interface CollapsableItemProps {\n /** Whether the item should initially be open or not. */\n isInitiallyOpen?: boolean;\n /** A callback function to execute when the item is open. */\n onOpen?: () => void;\n /** A callback function to execute when the item is closed. */\n onClose?: () => void;\n /** The components to render when the item is open. */\n children: ReactNode;\n /** Styling for the button. */\n buttonStyles?: SxProps;\n /** The children to pass to the button. */\n buttonContents: ReactNode;\n /** The specific button component to use. */\n buttonComponent?: ElementType;\n /** The icon to show next to the button when open. */\n openIcon?: ReactNode;\n /** The icon to show next to the button when closed. */\n closedIcon?: ReactNode;\n /** Props to pass to collapse. */\n collapseProps?: Omit<CollapseProps, \"in\">;\n /**\n * Whether or not to use the default button styling.\n *\n * Defaults to `true` if `buttonComponent` is `ButtonBase`,\n * otherwise defaults to `false`.\n */\n useDefaultStyling?: boolean;\n}\n\n/**\n * Shows a display area that can be opened to show the children components, or hidden away.\n */\nfunction CollapsableItem({\n isInitiallyOpen,\n onOpen,\n onClose,\n children,\n buttonStyles,\n buttonContents,\n buttonComponent: ButtonComponent = ButtonBase,\n collapseProps,\n openIcon = <MdArrowDropUp />,\n closedIcon = <MdArrowDropDown />,\n useDefaultStyling = ButtonComponent === ButtonBase ? true : false,\n}: CollapsableItemProps) {\n const [isItemOpen, setIsItemOpen] = useState<boolean>(!!isInitiallyOpen);\n\n useEffect(() => {\n if (isItemOpen && onOpen) {\n onOpen();\n } else if (!isItemOpen && onClose) {\n onClose();\n }\n }, [isItemOpen]);\n\n return (\n <Box>\n <ButtonComponent\n onClick={() => {\n setIsItemOpen((previouslyOpen) => {\n return !previouslyOpen;\n });\n }}\n sx={\n useDefaultStyling\n ? {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n paddingY: 1.5,\n paddingX: 2,\n textAlign: \"center\",\n \"&:hover\":\n ButtonComponent === ButtonBase ? { backgroundColor: \"action.hover\" } : null,\n ...buttonStyles,\n }\n : buttonStyles\n }\n aria-expanded={isItemOpen}\n >\n {buttonContents}\n {isItemOpen ? openIcon : closedIcon}\n </ButtonComponent>\n <Collapse in={isItemOpen} {...collapseProps}>\n {children}\n </Collapse>\n </Box>\n );\n}\n\nexport default CollapsableItem;\n","import type { LinkProps } from \"@mui/material/Link\";\nimport type { ReactNode, Ref } from \"react\";\n\nimport MUILink from \"@mui/material/Link\";\n\nexport interface ExternalLinkProps extends Omit<LinkProps, \"to\" | \"target\" | \"rel\"> {\n /** The URL of the place you want to navigate to. */\n href: `https://${string}` | `http://${string}` | (string & {});\n to?: never;\n /** The readable content to display on the link. */\n children: ReactNode;\n /** An optional ref to allow it to be used with polymorphic components. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * A stylised link that is best used when you want to navigate to a different domain.\n *\n * Opens the destination in a new tab and applies recommended security defaults automatically.\n */\nfunction ExternalLink({ href, children, ref, ...linkProps }: ExternalLinkProps) {\n return (\n <MUILink\n component=\"a\"\n href={href}\n ref={ref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n {...linkProps}\n >\n {children}\n </MUILink>\n );\n}\n\nexport default ExternalLink;\n","import type { CreateEnumType } from \"@alextheman/utility\";\nimport type { ButtonOwnProps } from \"@mui/material/Button\";\n\nimport Button from \"@mui/material/Button\";\nimport { styled } from \"@mui/material/styles\";\nimport { useId, useState } from \"react\";\nimport { MdCloudUpload } from \"react-icons/md\";\n\nexport const FileType = {\n PDF: \"application/pdf\",\n PNG: \"image/png\",\n JPEG: \"image/jpeg\",\n JPG: \"image/jpg\",\n XLSX: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n DOCX: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n MP3: \"audio/mp3\",\n MP4: \"video/mp4\",\n WAV: \"audio/wav\",\n} as const;\nexport type FileType = CreateEnumType<typeof FileType>;\n\nconst VisuallyHiddenInput = styled(\"input\")({\n clip: \"rect(0 0 0 0)\",\n clipPath: \"inset(50%)\",\n height: 1,\n overflow: \"hidden\",\n position: \"absolute\",\n bottom: 0,\n left: 0,\n whiteSpace: \"nowrap\",\n width: 1,\n});\n\nconst Dropzone = styled(\"div\")<{ $dragging: boolean }>(({ theme, $dragging }) => {\n return {\n border: \"2px dashed\",\n borderColor: $dragging ? theme.palette.primary.main : \"#ccc\",\n backgroundColor: $dragging ? theme.palette.action.hover : \"transparent\",\n borderRadius: 8,\n padding: \"1.5rem\",\n textAlign: \"center\",\n transition: \"border-color 0.2s\",\n cursor: \"pointer\",\n };\n});\n\nexport interface FileInputProps extends ButtonOwnProps {\n /** A function to run when a file has been uploaded. */\n onFileInput: (allowedFiles: Array<File>) => void;\n /** The label to display on the input button (defaults to \"Upload files\") */\n label?: string;\n /** Whether to accept multiple files or not. */\n multiple?: boolean;\n /** An array of file types to accept. */\n accept?: Array<string>;\n /** Enable the dropzone, allowing users to drag and drop files. */\n useDropzone?: boolean;\n}\n\n/** Handles file inputs. */\nfunction FileInput({\n onFileInput,\n label = \"Upload files\",\n multiple,\n accept,\n useDropzone,\n ...buttonProps\n}: FileInputProps) {\n const [isDragging, setIsDragging] = useState<boolean>(false);\n const id = useId();\n\n const fileInputButton = (\n <Button\n variant=\"contained\"\n component=\"label\"\n aria-label=\"File input button\"\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n document.getElementById(id)?.click();\n }\n }}\n {...buttonProps}\n startIcon={buttonProps.startIcon ?? <MdCloudUpload />}\n >\n {label}\n <VisuallyHiddenInput\n id={id}\n type=\"file\"\n onChange={(event) => {\n const input = event.target;\n onFileInput(Array.from(input.files ?? []));\n input.value = \"\";\n }}\n multiple={multiple}\n accept={accept?.join(\",\")}\n disabled={buttonProps.disabled}\n />\n </Button>\n );\n\n return useDropzone ? (\n <Dropzone\n $dragging={isDragging}\n onDragOver={(event) => {\n event.preventDefault();\n if (buttonProps.disabled) {\n return;\n }\n setIsDragging(true);\n }}\n onDragLeave={(event) => {\n event.preventDefault();\n setIsDragging(false);\n }}\n onDrop={(event) => {\n event.preventDefault();\n setIsDragging(false);\n if (buttonProps.disabled) {\n return;\n }\n const filesArray = Array.from(event.dataTransfer.files ?? []);\n onFileInput(filesArray);\n }}\n >\n {fileInputButton}\n </Dropzone>\n ) : (\n fileInputButton\n );\n}\n\nexport default FileInput;\n","import type { Dispatch, SetStateAction } from \"react\";\n\nimport type { FileInputProps } from \"src/components/FileInput\";\n\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { MdDelete } from \"react-icons/md\";\n\nimport FileInput from \"src/components/FileInput\";\n\nexport interface FileInputListProps extends Omit<FileInputProps, \"onFileInput\"> {\n /** The array of files (must be a React state). */\n files: Array<File>;\n /** The state setter for the array of files. */\n setFiles: Dispatch<SetStateAction<Array<File>>>;\n}\n\n/** Renders the `FileInput` component with a list of uploaded files underneath it. */\nfunction FileInputList({\n files,\n setFiles,\n multiple = true,\n ...fileInputProps\n}: FileInputListProps) {\n function onFileInput(newFiles: Array<File>) {\n setFiles((oldFiles) => {\n return [...oldFiles, ...newFiles];\n });\n }\n\n return (\n <Box>\n <FileInput {...fileInputProps} multiple={multiple} onFileInput={onFileInput} />\n <List>\n {files.map((file) => {\n return (\n <ListItem\n key={`${file.name}-${file.lastModified}`}\n secondaryAction={\n <IconButton\n aria-label=\"Delete\"\n edge=\"end\"\n onClick={() => {\n setFiles((oldFiles) => {\n return oldFiles.filter((fileToDelete) => {\n return fileToDelete !== file;\n });\n });\n }}\n >\n <MdDelete />\n </IconButton>\n }\n >\n <ListItemText primary={file.name} />\n </ListItem>\n );\n })}\n </List>\n </Box>\n );\n}\n\nexport default FileInputList;\n","import type { CommonProps } from \"@mui/material/OverridableComponent\";\nimport type { SwitchProps } from \"@mui/material/Switch\";\nimport type { ComponentType, CSSProperties } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport { styled } from \"@mui/material/styles\";\nimport Switch from \"@mui/material/Switch\";\n\nexport interface SwitchWithIconsProps extends Omit<SwitchProps, \"icon\" | \"checkedIcon\"> {\n /** The icon to show when the switch is in a checked state. */\n checkedIcon: ComponentType<{ style?: CSSProperties }>;\n /** Additional styling to apply to the icon that shows when checked. */\n checkedIconStyles?: CommonProps[\"style\"];\n /** The icon to show when the switch is in an unchecked state. */\n uncheckedIcon: ComponentType<{ style?: CSSProperties }>;\n /** Additional styling to apply to the icon that shows when unchecked. */\n uncheckedIconStyles?: CommonProps[\"style\"];\n}\n\nconst StyledSwitch = styled(Switch)(() => {\n return {\n padding: 8,\n \"& .MuiSwitch-track\": {\n borderRadius: 11,\n \"&::before, &::after\": {\n content: '\"\"',\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n fontSize: 16,\n width: 28,\n height: 28,\n },\n },\n };\n});\n\n/** Renders a switch with your provided icons. */\nfunction SwitchWithIcons({\n checkedIcon: CheckedIcon,\n checkedIconStyles,\n uncheckedIcon: UncheckedIcon,\n uncheckedIconStyles,\n ...switchProps\n}: SwitchWithIconsProps) {\n const boxSx = {\n borderRadius: \"50%\",\n borderColor: \"white\",\n backgroundColor: \"white\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: 0.25,\n };\n const defaultIconStyles = { color: \"black\", maxWidth: 16.5, maxHeight: 16.5 };\n return (\n <StyledSwitch\n checkedIcon={\n <Box sx={boxSx}>\n <CheckedIcon style={{ ...defaultIconStyles, ...checkedIconStyles }} />\n </Box>\n }\n icon={\n <Box sx={boxSx}>\n <UncheckedIcon style={{ ...defaultIconStyles, ...uncheckedIconStyles }} />\n </Box>\n }\n {...switchProps}\n />\n );\n}\n\nexport default SwitchWithIcons;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { PaletteMode } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility/v6\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport { createTheme, ThemeProvider } from \"@mui/material/styles\";\nimport { createContext, useContext, useMemo, useState } from \"react\";\n\nexport interface ModeContextValue {\n toggleMode: () => void;\n mode: PaletteMode;\n}\n\nconst ModeContext = createContext<ModeContextValue>({\n toggleMode: () => {},\n mode: \"dark\",\n});\n\n/** Access the mode context directly. */\nexport function useMode<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, ModeContextValue> {\n const context = useContext(ModeContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"MODE_PROVIDER_NOT_FOUND\",\n \"Could not find the ModeProvider context. Please double-check that it is present.\",\n );\n }\n return context;\n}\n\nexport interface ModeProviderProps {\n /** The children that will have access to the current mode. */\n children: ReactNode;\n /** The initial mode. */\n mode?: PaletteMode;\n}\n\n/** Provides information about the current theme mode to its children components. */\nfunction ModeProvider({ children, mode: modeProp = \"dark\" }: ModeProviderProps) {\n const [mode, setMode] = useState<PaletteMode>(modeProp);\n\n const theme = useMemo(() => {\n return createTheme({\n palette: {\n mode,\n },\n });\n }, [mode]);\n\n return (\n <ModeContext.Provider\n value={{\n mode,\n toggleMode: () => {\n setMode((prev) => {\n return prev === \"light\" ? \"dark\" : \"light\";\n });\n },\n }}\n >\n <ThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n </ModeContext.Provider>\n );\n}\n\nexport default ModeProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility/v6\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport { createContext, useContext } from \"react\";\n\nexport interface QueryBoundaryProviderBaseProps<DataType> {\n /** The current loading status (true if loading, false if not) */\n isLoading: boolean;\n /** The data being loaded. */\n data?: DataType;\n /** A parser for the data. */\n dataParser?: (data: unknown) => NonNullable<DataType>;\n /** The component to show when the data is being fetched. */\n loadingComponent?: ReactNode;\n}\n\nexport interface QueryBoundaryProviderPropsWithNoError<\n DataType,\n> extends QueryBoundaryProviderBaseProps<DataType> {\n error?: never;\n errorComponent?: never;\n logError?: never;\n}\n\nexport interface QueryBoundaryProviderPropsWithError<\n DataType,\n> extends QueryBoundaryProviderBaseProps<DataType> {\n /** The error given if the request gave an error. */\n error: unknown;\n /** The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided. */\n errorComponent?: ReactNode | ((error: unknown) => ReactNode);\n /** Whether you want to log the error to the console or not. */\n logError?: boolean;\n}\n\nexport type QueryBoundaryContextValue<DataType> =\n | QueryBoundaryProviderPropsWithNoError<DataType>\n | QueryBoundaryProviderPropsWithError<DataType>;\nexport type QueryBoundaryProviderProps<DataType> = QueryBoundaryContextValue<DataType> & {\n children: ReactNode;\n};\n\nconst QueryBoundaryContext = createContext<QueryBoundaryContextValue<unknown> | undefined>(\n undefined,\n);\n\n/** Access the QueryBoundary context directly. */\nexport function useQueryBoundary<DataType, Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<\n Strict,\n QueryBoundaryContextValue<DataType>\n> {\n const context = useContext(QueryBoundaryContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"LOADER_PROVIDER_NOT_FOUND\",\n \"Could not find the QueryBoundaryProvider context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, QueryBoundaryContextValue<DataType>>;\n}\n\n/**\n * A provider for a context that deals with state management when fetching data from an API.\n * This may be used over QueryBoundary if you require more control over the placement of the error message and data display.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundaryProvider<DataType>({\n children,\n loadingComponent = <CircularProgress />,\n ...contextProps\n}: QueryBoundaryProviderProps<DataType>) {\n return (\n <QueryBoundaryContext.Provider value={{ loadingComponent, ...contextProps }}>\n {children}\n </QueryBoundaryContext.Provider>\n );\n}\n\nexport default QueryBoundaryProvider;\n","import type { ReactNode } from \"react\";\n\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport interface QueryBoundaryDataProps<DataType> {\n /**\n * The elements to show after data has been loaded.\n * This is best provided as a function with a data argument that guarantees the data will not be undefined by the time you receive it here.\n */\n children: ReactNode | ((data: NonNullable<DataType>) => ReactNode);\n /** A parser for the data. */\n dataParser?: (data: unknown) => NonNullable<DataType>;\n /** The component to show when the data is being fetched. */\n loadingComponent?: ReactNode;\n}\n\n/**\n * The component responsible for showing the data provided by QueryBoundaryProvider.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundaryData<DataType>({\n children,\n dataParser: propDataParser,\n loadingComponent,\n}: QueryBoundaryDataProps<DataType>) {\n const {\n isLoading,\n data,\n dataParser: contextDataParser,\n loadingComponent: contextLoadingComponent,\n error,\n } = useQueryBoundary<DataType>();\n const dataParser = propDataParser ?? contextDataParser;\n\n if (isLoading) {\n return <>{loadingComponent ?? contextLoadingComponent}</>;\n }\n\n if (error) {\n return null;\n }\n\n // No need to also check for isLoading === true here, since this was covered earlier\n if (data === null || data === undefined) {\n return null;\n }\n\n return (\n <>\n {typeof children === \"function\" ? children(dataParser ? dataParser(data) : data) : children}\n </>\n );\n}\n\nexport default QueryBoundaryData;\n","import type { ReactNode } from \"react\";\n\nimport Alert from \"@mui/material/Alert\";\nimport { useRef } from \"react\";\n\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport interface QueryBoundaryErrorBaseProps {\n /** The component to show if an error has been thrown. */\n children?: ReactNode | ((error: unknown) => ReactNode);\n /** An option to log the error to the console. */\n logError?: boolean;\n}\n\nexport interface QueryBoundaryErrorPropsWithUndefinedOrNull extends QueryBoundaryErrorBaseProps {\n /** The component to show if no error was thrown but data is undefined */\n undefinedComponent?: ReactNode;\n /** The component to show if no error was thrown but data is null */\n nullComponent?: ReactNode;\n nullableComponent?: never;\n}\n\nexport interface QueryBoundaryErrorPropsWithNullable extends QueryBoundaryErrorBaseProps {\n undefinedComponent?: never;\n nullComponent?: never;\n /** The component to show if no error was thrown but data is undefined or null */\n nullableComponent?: ReactNode;\n}\n\nexport type QueryBoundaryErrorProps =\n | QueryBoundaryErrorPropsWithUndefinedOrNull\n | QueryBoundaryErrorPropsWithNullable;\n\n/**\n * The component responsible for showing any errors provided by QueryBoundaryProvider.\n */\nfunction QueryBoundaryError({\n children,\n undefinedComponent,\n nullComponent,\n nullableComponent,\n logError: propsLogError,\n}: QueryBoundaryErrorProps) {\n const {\n isLoading,\n data,\n error,\n errorComponent: contextErrorComponent,\n logError: contextLogError,\n } = useQueryBoundary();\n const logError = propsLogError ?? contextLogError;\n const warnedOnce = useRef(false);\n\n const errorComponent = children ?? contextErrorComponent;\n\n if (data !== null && data !== undefined) {\n return null;\n }\n\n if (error) {\n if (logError && !warnedOnce.current) {\n console.error(error);\n warnedOnce.current = true;\n }\n if (typeof errorComponent === \"function\") {\n return errorComponent(error);\n }\n if (errorComponent) {\n return <>{errorComponent}</>;\n }\n\n return (\n <Alert severity=\"error\">\n {typeof error === \"object\" && \"message\" in error && typeof error.message === \"string\"\n ? error.message\n : \"An unknown error has occured. Please try again later.\"}\n </Alert>\n );\n }\n\n if (!isLoading && (data === null || data === undefined)) {\n if (nullableComponent) {\n if (logError && !warnedOnce.current) {\n console.error(\"Data is nullable after loading.\");\n warnedOnce.current = true;\n }\n return <>{nullableComponent}</>;\n }\n\n if (data === undefined) {\n if (logError && !warnedOnce.current) {\n console.error(\n \"Data is undefined after loading. This could either be an issue with the query or you have not passed in the data to QueryBoundaryProvider. Please double-check that you have provided data.\",\n );\n warnedOnce.current = true;\n }\n\n if (undefinedComponent) {\n return <>{undefinedComponent}</>;\n }\n }\n\n if (data === null) {\n if (logError && !warnedOnce.current) {\n console.error(\"Data is null after loading.\");\n warnedOnce.current = true;\n }\n\n if (nullComponent) {\n return <>{nullComponent}</>;\n }\n }\n\n return <Alert severity=\"error\">Failed to load data. Please try again later.</Alert>;\n }\n\n return null;\n}\n\nexport default QueryBoundaryError;\n","import QueryBoundaryProvider from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport { default as QueryBoundaryData } from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\nexport { default as QueryBoundaryError } from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\n\nexport type { QueryBoundaryDataProps } from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\nexport type {\n QueryBoundaryErrorBaseProps,\n QueryBoundaryErrorPropsWithNullable,\n QueryBoundaryErrorPropsWithUndefinedOrNull,\n QueryBoundaryErrorProps,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\nexport type {\n QueryBoundaryProviderProps,\n QueryBoundaryProviderBaseProps,\n QueryBoundaryProviderPropsWithError,\n QueryBoundaryProviderPropsWithNoError,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nexport default QueryBoundaryProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility/v6\";\nimport { createContext, useContext, useEffect, useMemo, useState } from \"react\";\n\nexport interface ScreenSizeProps {\n /** The children that will be receiving the ScreenSizeContext. */\n children: ReactNode;\n /** The minimum screen width in pixels required to be considered a large screen. */\n largeScreenWidth?: number;\n /** The minimum screen height in pixels required to be considered a large screen. */\n largeScreenHeight?: number;\n}\n\nexport interface ScreenSizeContextValue {\n /** Whether the screen is a large screen or not. */\n isLargeScreen: boolean;\n /** The current window width. */\n windowWidth: number;\n /** The current window height. */\n windowHeight: number;\n}\n\nconst ScreenSizeContext = createContext<ScreenSizeContextValue>({\n windowWidth: 0,\n windowHeight: 0,\n isLargeScreen: false,\n});\n\n/** Access the screen size context directly. */\nexport function useScreenSize<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, ScreenSizeContextValue> {\n const context = useContext(ScreenSizeContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"SCREEN_SIZE_PROVIDER_NOT_FOUND\",\n \"Could not find the ScreenSizeProvider context. Please double-check that it is present.\",\n );\n }\n return context;\n}\n\n/** Provides context about the current screen size. */\nfunction ScreenSizeProvider({\n children,\n largeScreenWidth = 669,\n largeScreenHeight = 660,\n}: ScreenSizeProps) {\n const [windowWidth, setWindowWidth] = useState<number>(window.innerWidth);\n const [windowHeight, setWindowHeight] = useState<number>(window.innerHeight);\n\n useEffect(() => {\n function setDimensions() {\n setWindowWidth(window.innerWidth);\n setWindowHeight(window.innerHeight);\n }\n setDimensions();\n window.addEventListener(\"resize\", setDimensions);\n return () => {\n window.removeEventListener(\"resize\", setDimensions);\n };\n }, []);\n\n const isLargeScreen = useMemo(() => {\n return windowWidth > largeScreenWidth && windowHeight > largeScreenHeight;\n }, [windowWidth, windowHeight, largeScreenWidth, largeScreenHeight]);\n\n return (\n <ScreenSizeContext.Provider\n value={{\n isLargeScreen,\n windowWidth,\n windowHeight,\n }}\n >\n {children}\n </ScreenSizeContext.Provider>\n );\n}\n\nexport default ScreenSizeProvider;\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { AlertColor } from \"@mui/material/Alert\";\nimport type { ReactNode } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { wait } from \"@alextheman/utility\";\nimport { DataError } from \"@alextheman/utility/v6\";\nimport Alert from \"@mui/material/Alert\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { createContext, useContext, useState } from \"react\";\n\nexport interface SnackbarProviderProps {\n /** The children that will have access to the snackbar context. */\n children: ReactNode;\n /** The amount of seconds to wait before hiding the snackbar. */\n autoHideDuration?: number;\n}\n\nexport interface SnackbarContextValue {\n /** A function that adds the snackbar to the page. */\n addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;\n}\n\nconst SnackbarContext = createContext<SnackbarContextValue | undefined>(undefined);\n\n/** Access the snackbar context directly. */\nexport function useSnackbar<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, SnackbarContextValue> {\n const context = useContext(SnackbarContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"SNACKBAR_PROVIDER_NOT_FOUND\",\n \"Could not find the SnackbarProvider context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, SnackbarContextValue>;\n}\n\n/** Controls the display of the snackbars on the page. */\nfunction SnackbarProvider({ children, autoHideDuration = 5000 }: SnackbarProviderProps) {\n const [open, setOpen] = useState<boolean>(false);\n const [autoHideDurationState, setAutoHideDurationState] = useState<number>(autoHideDuration);\n const [message, setMessage] = useState<string>(\"\");\n const [severity, setSeverity] = useState<AlertColor>(\"info\");\n\n function addSnackbar(message: string, severity?: AlertColor, duration?: number) {\n setOpen(true);\n setAutoHideDurationState(duration ?? autoHideDuration);\n setSeverity(severity ?? \"info\");\n setMessage(message);\n }\n\n async function handleClose() {\n setOpen(false);\n // Wait for 0.2 seconds to ensure that the message is only cleared after the snackbar is fully closed.\n // This prevents potential weird flickering that may occur if they happen synchronously.\n await wait(0.2);\n setMessage(\"\");\n }\n\n return (\n <SnackbarContext.Provider value={{ addSnackbar }}>\n <Snackbar open={open} autoHideDuration={autoHideDurationState} onClose={handleClose}>\n <Alert onClose={handleClose} severity={severity}>\n {message}\n </Alert>\n </Snackbar>\n {children}\n </SnackbarContext.Provider>\n );\n}\n\nexport default SnackbarProvider;\n","import Tooltip from \"@mui/material/Tooltip\";\nimport { MdOutlineDarkMode, MdOutlineLightMode } from \"react-icons/md\";\n\nimport SwitchWithIcons from \"src/components/SwitchWithIcons\";\nimport { useMode } from \"src/providers\";\n\n/** A toggle to switch between dark mode and light mode. Must be used in a `ModeProvider`. */\nfunction ModeToggle() {\n const { mode, toggleMode } = useMode();\n const isDarkMode = mode === \"dark\";\n const modeText = `Enable ${isDarkMode ? \"light\" : \"dark\"} mode`;\n\n return (\n <Tooltip title={modeText}>\n <SwitchWithIcons\n uncheckedIcon={MdOutlineLightMode}\n checkedIcon={MdOutlineDarkMode}\n checked={isDarkMode}\n onChange={toggleMode}\n aria-label={modeText}\n />\n </Tooltip>\n );\n}\n\nexport default ModeToggle;\n","import type { JSX, ReactNode } from \"react\";\n\nimport BottomNavigation from \"@mui/material/BottomNavigation\";\nimport BottomNavigationAction from \"@mui/material/BottomNavigationAction\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\n\nexport interface NavItemBottom {\n /** The value associated with the nav item. */\n value: string;\n /** The label to display on the nav item. */\n label: string;\n /** An icon to display alongside the nav item. */\n icon?: JSX.Element;\n /** Where in your app the nav item should navigate to. */\n to: string;\n}\n\nexport interface NavigationBottomProps {\n /** Children to display above the nav bar. */\n children: ReactNode;\n /** An array of nav items to show. */\n navItems: Array<NavItemBottom>;\n}\n\n/** Renders a navigation bar at the bottom of the screen. Especially helpful for common navigation options in a mobile app. */\nfunction NavigationBottom({ children, navItems }: NavigationBottomProps) {\n const [value, setValue] = useState<string>(\"\");\n return (\n <>\n <Box sx={{ paddingBottom: 7 }}>{children}</Box>\n <Paper sx={{ position: \"fixed\", bottom: 0, left: 0, right: 0 }}>\n <BottomNavigation\n showLabels\n value={value}\n onChange={(_, value) => {\n setValue(value);\n }}\n >\n {navItems.map((item) => {\n return <BottomNavigationAction key={item.value} {...item} component={Link} />;\n })}\n </BottomNavigation>\n </Paper>\n </>\n );\n}\n\nexport default NavigationBottom;\n","import type { ReactNode } from \"react\";\n\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport CardHeader from \"@mui/material/CardHeader\";\nimport Divider from \"@mui/material/Divider\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface PageProps {\n /** The Page title to show */\n title: string;\n /** The subtitle to show under the Page title */\n subtitle?: string;\n /** The actions to show in the page header */\n action?: ReactNode;\n /** The actual page contents */\n children: ReactNode;\n}\n\n/** Renders a pre-styled Page that can be used to structure pages throughout your React apps. */\nfunction Page({ title, subtitle, action, children }: PageProps) {\n return (\n <Card>\n <CardHeader\n title={\n <>\n <Typography variant=\"h6\">{title}</Typography>\n {subtitle ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {subtitle}\n </Typography>\n ) : null}\n </>\n }\n action={action}\n />\n <Divider />\n <CardContent>{children}</CardContent>\n </Card>\n );\n}\n\nexport default Page;\n","import type { QueryBoundaryDataProps, QueryBoundaryProviderProps } from \"src/providers\";\nimport type { QueryBoundaryErrorProps } from \"src/providers/QueryBoundaryProvider/QueryBoundaryError\";\n\nimport CircularProgress from \"@mui/material/CircularProgress\";\n\nimport { QueryBoundaryError } from \"src/providers\";\nimport QueryBoundaryProvider from \"src/providers/QueryBoundaryProvider\";\nimport QueryBoundaryData from \"src/providers/QueryBoundaryProvider/QueryBoundaryData\";\n\nexport type QueryBoundaryProps<DataType> = Omit<\n QueryBoundaryProviderProps<DataType>,\n \"children\" | \"logError\"\n> &\n Omit<QueryBoundaryErrorProps, \"children\"> &\n Omit<QueryBoundaryDataProps<DataType>, \"showOnError\" | \"onUndefined\" | \"onNull\" | \"onNullable\">;\n\n/**\n * An in-line component that deals with state management when fetching data from an API.\n * This may be used over QueryBoundaryProvider if you don't require as much control over the placement of the error message and data display.\n *\n * @template DataType - The type of data being loaded.\n */\nfunction QueryBoundary<DataType>({\n children,\n errorComponent,\n undefinedComponent,\n nullComponent,\n nullableComponent,\n logError,\n loadingComponent = <CircularProgress />,\n ...loaderProviderProps\n}: QueryBoundaryProps<DataType>) {\n return (\n <QueryBoundaryProvider<DataType> loadingComponent={loadingComponent} {...loaderProviderProps}>\n {/* @ts-expect-error: We need to pass all four to QueryBoundaryError for the wrapper to work. It is ok as QueryBoundary will then do its own checks to enforce mutual exclusivity, and QueryBoundaryError knows how to deal with it anyway. */}\n <QueryBoundaryError\n undefinedComponent={undefinedComponent}\n nullComponent={nullComponent}\n nullableComponent={nullableComponent}\n logError={logError}\n >\n {errorComponent}\n </QueryBoundaryError>\n <QueryBoundaryData<DataType>>{children}</QueryBoundaryData>\n </QueryBoundaryProvider>\n );\n}\n\nexport default QueryBoundary;\n","import type { SxProps, Theme } from \"@mui/material/styles\";\nimport type { ComponentProps } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { stripIndent } from \"common-tags\";\nimport { LiveEditor, LiveError, LivePreview, LiveProvider } from \"react-live\";\n\nimport { useMode } from \"src/providers\";\n\nexport interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {\n /** Extra styling to apply to the preview. Must be compatible with the Material UI `sx` prop. */\n previewStyles?: SxProps<Theme>;\n}\n\n/** Renders a playground to help demonstrate your React code in an interactive setting. */\nfunction ReactPlayground({ code, previewStyles, ...liveProviderProps }: ReactPlaygroundProps) {\n const { mode } = useMode();\n const defaultPreviewStyles: SxProps<Theme> = {\n backgroundColor: mode === \"dark\" ? \"black\" : \"white\",\n border: 0.3,\n borderRadius: 1,\n padding: 2,\n borderColor: \"darkgray\",\n };\n const allPreviewStyles = previewStyles\n ? { ...defaultPreviewStyles, ...previewStyles }\n : { ...defaultPreviewStyles };\n return (\n <Box sx={{ borderRadius: 1, border: 0.5, padding: 2 }}>\n <LiveProvider {...liveProviderProps} code={stripIndent(code ?? \"\")}>\n <Typography variant=\"h5\">Code</Typography>\n <Box\n sx={{\n border: 0.3,\n borderRadius: 0.3,\n borderColor: \"darkgray\",\n }}\n >\n <LiveEditor />\n </Box>\n <br />\n <Typography variant=\"h5\">Result</Typography>\n <Box sx={allPreviewStyles}>\n <LivePreview />\n <LiveError />\n </Box>\n </LiveProvider>\n </Box>\n );\n}\n\nexport default ReactPlayground;\n","import { fillArray } from \"@alextheman/utility\";\nimport Skeleton from \"@mui/material/Skeleton\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\n\nexport interface SkeletonRowProps {\n /** The number of columns the SkeletonRow should display. */\n columns: number;\n}\n\n/** Renders the skeleton of a table row. Often helpful to represent the loading state of the data in your table. */\nfunction SkeletonRow({ columns }: SkeletonRowProps) {\n return (\n <TableRow>\n {fillArray((index) => {\n return (\n <TableCell key={index}>\n <Skeleton />\n </TableCell>\n );\n }, columns)}\n </TableRow>\n );\n}\n\nexport default SkeletonRow;\n","import { ModeToggle } from \"src/components\";\n\n/** @deprecated This component has been renamed to `ModeToggle`. */\nconst DarkModeToggle = ModeToggle;\n\nexport default DarkModeToggle;\n","import type { ButtonOwnProps } from \"@mui/material/Button\";\nimport type { ElementType, MouseEvent as ReactMouseEvent, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport MUIButton from \"@mui/material/Button\";\nimport Menu from \"@mui/material/Menu\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { MdArrowDropDown, MdArrowDropUp } from \"react-icons/md\";\n\nexport interface DropdownMenuProps {\n children: ReactNode | ((closeMenu: () => void) => ReactNode);\n buttonChildren?: ReactNode;\n button?: ElementType;\n // Omit endIcon because the built-in isOpenIcon and isClosedIcon gives more control.\n // onClick is also omitted because that controls anchorElement, and the onOpen/onClose functions can be used instead.\n buttonProps?: Omit<ButtonOwnProps, \"onClick\" | \"endIcon\">;\n isOpenIcon?: ReactNode;\n isClosedIcon?: ReactNode;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\n/**\n * @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.\n */\nfunction DropdownMenu({\n children,\n button: Button = MUIButton,\n buttonChildren = \"Menu\",\n buttonProps: incomingButtonProps,\n isOpenIcon = <MdArrowDropUp />,\n isClosedIcon = <MdArrowDropDown />,\n onOpen,\n onClose,\n}: DropdownMenuProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null);\n const isDropdownOpen = useMemo(() => {\n return !!anchorElement;\n }, [anchorElement]);\n\n const buttonProps: Record<string, unknown> = {\n ...incomingButtonProps,\n onClick: (event: ReactMouseEvent<HTMLElement>) => {\n setAnchorElement(event.currentTarget);\n },\n \"aria-controls\": isDropdownOpen ? \"dropdown-menu\" : undefined,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": isDropdownOpen,\n };\n\n if (Button === MUIButton) {\n buttonProps.endIcon = isDropdownOpen ? isOpenIcon : isClosedIcon;\n }\n\n useEffect(() => {\n if (isDropdownOpen && onOpen) {\n onOpen();\n } else if (!isDropdownOpen && onClose) {\n onClose();\n }\n }, [isDropdownOpen, onOpen, onClose]);\n\n return (\n <Box>\n <Button {...buttonProps}>{buttonChildren}</Button>\n <Menu\n id=\"dropdown-menu\"\n anchorEl={anchorElement}\n open={isDropdownOpen}\n onClose={() => {\n setAnchorElement(null);\n }}\n >\n {typeof children === \"function\" ? (\n <Box>\n {children(() => {\n setAnchorElement(null);\n })}\n </Box>\n ) : (\n children\n )}\n </Menu>\n </Box>\n );\n}\n\nexport default DropdownMenu;\n","import type { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport type { CSSObject, Theme } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport { truncate } from \"@alextheman/utility\";\nimport MuiAppBar from \"@mui/material/AppBar\";\nimport Box from \"@mui/material/Box\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport Divider from \"@mui/material/Divider\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { styled, useTheme } from \"@mui/material/styles\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport Typography from \"@mui/material/Typography\";\nimport { Fragment, useState } from \"react\";\nimport { MdChevronLeft, MdChevronRight, MdMenu } from \"react-icons/md\";\nimport { useLocation } from \"wouter\";\n\nimport { InternalLink } from \"src/v7/components/routing\";\n\nconst drawerWidth = 240;\n\nfunction openedMixin(theme: Theme): CSSObject {\n return {\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n };\n}\n\nfunction closedMixin(theme: Theme): CSSObject {\n return {\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n };\n}\n\nconst DrawerHeader = styled(\"div\")(({ theme }) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n };\n});\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})<AppBarProps>(({ theme }) => {\n return {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n },\n ],\n };\n});\n\nconst Drawer = styled(MuiDrawer, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})(({ theme }) => {\n return {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n },\n },\n {\n props: ({ open }) => {\n return !open;\n },\n style: {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n },\n },\n ],\n };\n});\n\nexport interface NavMenuItemOptions {\n /** The label to display on the nav item option. */\n label: string;\n /** Where in your app the nav item option should navigate to. */\n to: string;\n /** An icon to display alongside the nav item option. */\n icon?: ReactNode;\n}\n\nexport interface NavMenuItem {\n /** The category to display all the nav item options under. */\n category: string;\n /** An array of nav options to display under the chosen category. */\n options: Array<NavMenuItemOptions>;\n}\n\nexport interface NavigationDrawerProps {\n /** The title to display at the top of the wrapper. */\n title: string;\n /** An array of nav items to show. */\n navItems: Array<NavMenuItem>;\n /** Any extra elements to add to the header. */\n headerElements?: ReactNode;\n /** Children to display within the wrapper. */\n children: ReactNode;\n}\n\n/** Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps. */\nfunction NavigationDrawer({ title, navItems, children, headerElements }: NavigationDrawerProps) {\n const theme = useTheme();\n const [open, setOpen] = useState(true);\n const [location] = useLocation();\n\n function handleDrawerOpen() {\n setOpen(true);\n }\n\n function handleDrawerClose() {\n setOpen(false);\n }\n\n return (\n <Box sx={{ display: \"flex\" }}>\n <CssBaseline />\n <AppBar position=\"fixed\" open={open}>\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={handleDrawerOpen}\n edge=\"start\"\n sx={[\n {\n marginRight: 5,\n },\n open && { display: \"none\" },\n ]}\n >\n <MdMenu />\n </IconButton>\n <Typography variant=\"h6\" noWrap component=\"div\">\n {title}\n </Typography>\n {headerElements}\n </Toolbar>\n </AppBar>\n <Drawer variant=\"permanent\" open={open}>\n <DrawerHeader>\n <IconButton onClick={handleDrawerClose}>\n {theme.direction === \"rtl\" ? <MdChevronRight /> : <MdChevronLeft />}\n </IconButton>\n </DrawerHeader>\n <Divider />\n {navItems.map((item) => {\n return (\n <Fragment key={item.category}>\n <List>\n <Typography variant={open ? \"h5\" : \"h6\"} sx={{ paddingLeft: open ? 2 : 1 }}>\n {open ? item.category : truncate(item.category, 4)}\n </Typography>\n {item.options.map((option) => {\n return (\n <ListItem key={option.to} disablePadding sx={{ display: \"block\" }}>\n <ListItemButton\n sx={[\n {\n minHeight: 48,\n px: 2.5,\n },\n open\n ? {\n justifyContent: \"initial\",\n }\n : {\n justifyContent: \"center\",\n },\n ]}\n component={InternalLink}\n to={option.to}\n selected={location === option.to}\n >\n <ListItemIcon\n sx={[\n {\n minWidth: 0,\n justifyContent: \"center\",\n },\n open\n ? {\n mr: 3,\n }\n : {\n mr: \"auto\",\n },\n ]}\n >\n {option.icon ? (\n option.icon\n ) : !open ? (\n <Typography>{truncate(option.label, 4)}</Typography>\n ) : null}\n </ListItemIcon>\n <ListItemText\n primary={option.label}\n sx={[\n open\n ? {\n opacity: 1,\n }\n : {\n opacity: 0,\n },\n ]}\n />\n </ListItemButton>\n </ListItem>\n );\n })}\n </List>\n <Divider />\n </Fragment>\n );\n })}\n </Drawer>\n <Box component=\"main\" sx={{ flexGrow: 1, p: 3 }}>\n <DrawerHeader />\n {children}\n </Box>\n </Box>\n );\n}\n\nexport default NavigationDrawer;\n","import { createFormHookContexts } from \"@tanstack/react-form\";\n\nexport const { fieldContext, formContext, useFieldContext, useFormContext } =\n createFormHookContexts();\n","import type { OptionalOnCondition } from \"@alextheman/utility\";\nimport type { Dispatch, ReactNode, SetStateAction } from \"react\";\n\nimport type { ContextHookOptions } from \"src/types\";\n\nimport { DataError } from \"@alextheman/utility/v6\";\nimport { createContext, useContext, useMemo, useState } from \"react\";\n\nexport interface DropdownMenuContextValue {\n /** A function responsible for closing the dropdown menu. */\n closeMenu: () => void;\n /** Represents whether or not the dropdown is open. */\n isDropdownOpen: boolean;\n}\n\nexport type DropdownMenuInternalContextValue = DropdownMenuContextValue & {\n anchorElement: HTMLElement | null;\n setAnchorElement: Dispatch<SetStateAction<HTMLElement | null>>;\n};\nconst DropdownMenuContext = createContext<DropdownMenuInternalContextValue | undefined>(undefined);\n\n/**\n Access the DropdownMenu context directly.\n */\nexport function useDropdownMenu<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, DropdownMenuContextValue> {\n const context = useContext(DropdownMenuContext);\n if (strict && !context) {\n throw new DataError(\n { strict, context },\n \"DROPDOWN_MENU_NOT_FOUND\",\n \"Could not find the DropdownMenu context. Please double-check that it is present.\",\n );\n }\n return context as OptionalOnCondition<Strict, DropdownMenuContextValue>;\n}\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function useDropdownMenuInternal<Strict extends boolean = true>({\n strict = true as Strict,\n}: ContextHookOptions<Strict> = {}): OptionalOnCondition<Strict, DropdownMenuInternalContextValue> {\n return useDropdownMenu({ strict }) as OptionalOnCondition<\n Strict,\n DropdownMenuInternalContextValue\n >;\n}\n\nexport interface DropdownMenuProviderProps {\n /** The children to render inside of the dropdown. */\n children: ReactNode;\n}\n\n/** Provides shared context for the `DropdownMenu` related components. */\nfunction DropdownMenuProvider({ children }: DropdownMenuProviderProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null);\n\n const isDropdownOpen = useMemo(() => {\n return !!anchorElement;\n }, [anchorElement]);\n\n function closeMenu() {\n setAnchorElement(null);\n }\n\n return (\n <DropdownMenuContext.Provider\n value={{ closeMenu, isDropdownOpen, anchorElement, setAnchorElement }}\n >\n {children}\n </DropdownMenuContext.Provider>\n );\n}\n\nexport default DropdownMenuProvider;\n","import type { MenuProps } from \"@mui/material/Menu\";\nimport type { MouseEvent, ReactNode } from \"react\";\n\nimport Menu from \"@mui/material/Menu\";\n\nimport { useDropdownMenuInternal } from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\n\nexport interface DropdownMenuProps extends Omit<MenuProps, \"anchorEl\" | \"open\"> {\n /** The children to render inside of the dropdown. */\n children: ReactNode;\n}\n\n/**\n * Renders a menu component that can be used alongside the `DropdownMenuProvider`.\n *\n * This component's open state would be controlled by the `DropdownMenuTrigger`.\n */\nfunction DropdownMenu({ children, onClose, ...menuProps }: DropdownMenuProps) {\n const { anchorElement, isDropdownOpen, closeMenu } = useDropdownMenuInternal();\n\n return (\n <Menu\n anchorEl={anchorElement}\n open={isDropdownOpen}\n onClose={(event: MouseEvent, reason) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClose) {\n onClose(event, reason);\n }\n }}\n {...menuProps}\n >\n {children}\n </Menu>\n );\n}\n\nexport default DropdownMenu;\n","import type Button from \"@mui/material/Button\";\nimport type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type {\n ComponentProps,\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ElementType,\n ReactNode,\n} from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { useDropdownMenu } from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\n\nexport type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button> = {\n /**\n * An optional component to provide to override the current component.\n *\n * Note that the provided component must:\n * - accept a `to` prop.\n * - correctly handle the forwarded `ref`.\n * - render a valid anchor element (or equivalent) for proper accessibility.\n */\n component?: RootComponent;\n /** The children to be rendered within the menu item. */\n children?: ReactNode;\n /** The ref to forward to allow it to be used with polymorphic components */\n ref?: ComponentPropsWithRef<RootComponent>[\"ref\"];\n /** A function to execute after clicking the item. */\n onClick?: ComponentProps<RootComponent>[\"onClick\"];\n} & Omit<ComponentPropsWithoutRef<RootComponent>, \"children\" | \"ref\"> &\n MenuItemOwnProps;\n\n/** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */\nfunction DropdownMenuItem<RootComponent extends ElementType = typeof Button>({\n component,\n children,\n ref,\n onClick,\n ...menuItemProps\n}: DropdownMenuItemProps<RootComponent>) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={component}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (onClick) {\n onClick(event);\n }\n if (event.defaultPrevented) {\n return;\n }\n closeMenu();\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuItem;\n","import type {\n DropdownMenuContextValue as DropdownMenuContextValueV7,\n DropdownMenuProps,\n} from \"src/v7\";\n\nimport { DropdownMenu, useDropdownMenu as useDropdownMenuV7 } from \"src/v7\";\n\nexport type DropdownMenuContextValue = DropdownMenuContextValueV7;\n\nexport const useDropdownMenu = useDropdownMenuV7;\n\n/**\n * @deprecated Please use `DropdownMenuProps` from `@alextheman/components/v7` instead.\n *\n * This will be replaced in the root entrypoint in a future release.\n */\nexport type DropdownMenu2Props = DropdownMenuProps;\n\n/**\n * @deprecated Please use `DropdownMenu` from `@alextheman/components/v7` instead.\n *\n * This will be replaced in the root entrypoint in a future release.\n */\nconst DropdownMenu2 = DropdownMenu;\n\nexport default DropdownMenu2;\n","import type { ElementType } from \"react\";\n\nimport type { DropdownMenuItemProps as DropdownMenuItemPropsV7 } from \"src/v7\";\n\nimport { DropdownMenuItem as DropdownMenuItemV7 } from \"src/v7\";\n\nexport type DropdownMenuItemProps<RootComponent extends ElementType> =\n DropdownMenuItemPropsV7<RootComponent>;\n\nconst DropdownMenuItem = DropdownMenuItemV7;\n\nexport default DropdownMenuItem;\n","import DropdownMenu2 from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\n\nexport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nexport { default as DropdownMenuItem } from \"src/deprecated/DropdownMenu2/DropdownMenuItem\";\n\nexport type { DropdownMenu2Props } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nexport type { DropdownMenuItemProps } from \"src/deprecated/DropdownMenu2/DropdownMenuItem\";\n\nexport default DropdownMenu2;\n","import type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type { ComponentProps, MouseEventHandler, ReactNode, Ref } from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { ExternalLink } from \"src/components\";\nimport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\n\nexport interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {\n ref?: Ref<HTMLAnchorElement>;\n href: ComponentProps<typeof ExternalLink>[\"href\"];\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n children: ReactNode;\n}\n\n/** @deprecated Please use `<DropdownMenuItem component={ExternalLink} />` instead. */\nfunction DropdownMenuExternalLink({\n ref,\n href,\n children,\n onClick,\n ...menuItemProps\n}: DropdownMenuExternalLinkProps) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={ExternalLink}\n href={href}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClick) {\n onClick(event);\n }\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuExternalLink;\n","import type { LinkProps } from \"@mui/material/Link\";\nimport type { ElementType, ReactNode, Ref } from \"react\";\n\nimport MUILink from \"@mui/material/Link\";\nimport { Link as ReactDOMLink } from \"react-router-dom\";\n\nexport interface InternalLinkProps extends Omit<LinkProps, \"href\" | \"component\"> {\n /** The path to navigate to */\n to: `/${string}` | `~/${string}` | (string & {});\n /**\n * An optional component to provide to override the current component.\n *\n * Note that the provided component must:\n * - accept a `to` prop\n * - correctly handle the forwarded `ref`\n * - render a valid anchor element (or equivalent) for proper accessibility\n */\n component?: ElementType;\n href?: never;\n /** The readable content to display on the link. */\n children: ReactNode;\n /** An optional ref to allow it to be used with polymorphic components. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * A stylised link for navigating within your application.\n *\n * Uses the app router for client-side navigation and opens the destination in the same tab.\n *\n * Defaults to a React Router implementation but can be overridden via the `component` prop.\n *\n * @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `InternalLink` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.\n */\nfunction InternalLink({\n to,\n component = ReactDOMLink,\n children,\n ref,\n ...linkProps\n}: InternalLinkProps) {\n return (\n <MUILink component={component} to={to} ref={ref} {...linkProps}>\n {children}\n </MUILink>\n );\n}\n\nexport default InternalLink;\n","import type { MenuItemOwnProps } from \"@mui/material/MenuItem\";\nimport type { ComponentProps, MouseEventHandler, ReactNode, Ref } from \"react\";\n\nimport MenuItem from \"@mui/material/MenuItem\";\n\nimport { useDropdownMenu } from \"src/deprecated/DropdownMenu2/DropdownMenu2\";\nimport InternalLink from \"src/deprecated/InternalLink\";\n\nexport interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {\n ref?: Ref<HTMLAnchorElement>;\n to: ComponentProps<typeof InternalLink>[\"to\"];\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n children: ReactNode;\n}\n\n/** @deprecated Please use `<DropdownMenuItem component={InternalLink} />` instead. */\nfunction DropdownMenuInternalLink({\n to,\n ref,\n children,\n onClick,\n ...menuItemProps\n}: DropdownMenuInternalLinkProps) {\n const { closeMenu } = useDropdownMenu();\n\n return (\n <MenuItem\n component={InternalLink}\n to={to}\n ref={ref}\n {...menuItemProps}\n onClick={(event) => {\n if (!event.defaultPrevented) {\n closeMenu();\n }\n if (onClick) {\n onClick(event);\n }\n }}\n >\n {children}\n </MenuItem>\n );\n}\n\nexport default DropdownMenuInternalLink;\n","import type { OverridableComponent } from \"@mui/material/OverridableComponent\";\nimport type { SvgIconTypeMap } from \"@mui/material/SvgIcon\";\nimport type { ElementType, MouseEvent as ReactMouseEvent, ReactNode } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport Popover from \"@mui/material/Popover\";\nimport { useId, useState } from \"react\";\nimport { MdVisibility } from \"react-icons/md\";\n\nexport interface IconWithPopoverProps {\n icon?:\n | (OverridableComponent<SvgIconTypeMap<unknown, \"svg\">> & {\n muiName: string;\n })\n | ElementType;\n onOpen?: () => void;\n onClose?: () => void;\n iconProps?: SvgIconTypeMap<unknown, \"svg\">[\"props\"];\n children: ReactNode;\n}\n\n/**\n * @deprecated This component is not well-designed for accessibility purposes. Please use the `Tooltip` component from `@mui/material` instead.\n *\n * @example\n * ```tsx\n * <Tooltip title=\"Text to display on hover\">\n * <MdVisibility />\n * </Tooltip>\n * ```\n */\nfunction IconWithPopover({\n icon: Icon = MdVisibility,\n onOpen,\n onClose,\n iconProps,\n children,\n}: IconWithPopoverProps) {\n const [anchorElement, setAnchorElement] = useState<Element | null>(null);\n const isPopoverOpen = !!anchorElement;\n const popoverId = useId();\n\n function handleOpen(event: ReactMouseEvent<SVGSVGElement, MouseEvent>) {\n setAnchorElement(event.currentTarget);\n if (onOpen) {\n onOpen();\n }\n }\n\n function handleClose() {\n setAnchorElement(null);\n if (onClose) {\n onClose();\n }\n }\n\n return (\n <Box>\n <Icon\n aria-owns={isPopoverOpen ? popoverId : undefined}\n aria-haspopup=\"true\"\n onMouseEnter={handleOpen}\n onMouseLeave={handleClose}\n {...iconProps}\n />\n <Popover\n id={popoverId}\n disablePortal\n disableScrollLock\n slotProps={{\n root: {\n disableEnforceFocus: true,\n disableAutoFocus: true,\n disableRestoreFocus: true,\n },\n }}\n sx={{ pointerEvents: \"none\" }}\n open={isPopoverOpen}\n anchorEl={anchorElement}\n anchorOrigin={{\n vertical: \"bottom\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n onClose={handleClose}\n disableRestoreFocus\n >\n {children}\n </Popover>\n </Box>\n );\n}\n\nexport default IconWithPopover;\n","import type { ListItemButtonProps } from \"@mui/material/ListItemButton\";\nimport type { ReactNode } from \"react\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\n\nimport InternalLink from \"src/deprecated/InternalLink\";\n\nexport interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, \"href\"> {\n children: ReactNode;\n to: string;\n}\n\n/** @deprecated Probably not that worth centralising here - can be easily recreated per use case. */\nfunction ListItemInternalLink({ children, ...listItemButtonProps }: ListItemInternalLinkProps) {\n return (\n <ListItemButton component={InternalLink} {...listItemButtonProps}>\n {children}\n </ListItemButton>\n );\n}\n\nexport default ListItemInternalLink;\n","import type { QueryBoundaryProps } from \"src/components/QueryBoundary\";\n\nimport { QueryBoundary } from \"src/components\";\n/** @deprecated This type has been renamed to QueryBoundaryProps. */\nexport type LoaderProps<DataType> = QueryBoundaryProps<DataType>;\n/** @deprecated This component has been renamed to QueryBoundary */\nconst Loader = QueryBoundary;\n\nexport default Loader;\n","import type { QueryBoundaryDataProps } from \"src/providers\";\n\nimport { QueryBoundaryData } from \"src/providers\";\n\n/** @deprecated This type has been renamed to QueryBoundaryDataProps. */\nexport type LoaderDataProps<DataType> = QueryBoundaryDataProps<DataType>;\n\n/** @deprecated This component has been renamed to QueryBoundaryData. */\nconst LoaderData = QueryBoundaryData;\n\nexport default LoaderData;\n","import type {\n QueryBoundaryErrorBaseProps,\n QueryBoundaryErrorProps,\n QueryBoundaryErrorPropsWithNullable,\n QueryBoundaryErrorPropsWithUndefinedOrNull,\n} from \"src/providers\";\n\nimport { QueryBoundaryError } from \"src/providers\";\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorBaseProps. */\nexport type LoaderErrorBaseProps = QueryBoundaryErrorBaseProps;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorPropsWithUndefinedOrNull. */\nexport type LoaderErrorPropsWithUndefinedOrNull = QueryBoundaryErrorPropsWithUndefinedOrNull;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorPropsWithNullable. */\nexport type LoaderErrorPropsWithNullable = QueryBoundaryErrorPropsWithNullable;\n\n/** @deprecated This type has been renamed to QueryBoundaryErrorProps. */\nexport type LoaderErrorProps = QueryBoundaryErrorProps;\n\n/** @deprecated This component has been renamed to LoaderError. */\nconst LoaderError = QueryBoundaryError;\n\nexport default LoaderError;\n","import type {\n QueryBoundaryContextValue,\n QueryBoundaryProviderBaseProps,\n QueryBoundaryProviderProps,\n QueryBoundaryProviderPropsWithError,\n QueryBoundaryProviderPropsWithNoError,\n} from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\nimport { QueryBoundaryProvider } from \"src/providers\";\nimport { useQueryBoundary } from \"src/providers/QueryBoundaryProvider/QueryBoundaryProvider\";\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderBaseProps. */\nexport type LoaderProviderBaseProps<DataType> = QueryBoundaryProviderBaseProps<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithNoError. */\nexport type LoaderProviderPropsWithNoError<DataType> =\n QueryBoundaryProviderPropsWithNoError<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithError. */\nexport type LoaderProviderPropsWithError<DataType> = QueryBoundaryProviderPropsWithError<DataType>;\n\n/** @deprecated This type has been renamed to QueryBoundaryContextValue. */\nexport type LoaderContextValue<DataType> = QueryBoundaryContextValue<DataType>;\n/** @deprecated This type has been renamed to QueryBoundaryProviderProps. */\nexport type LoaderProviderProps<DataType> = QueryBoundaryProviderProps<DataType>;\n\n/** @deprecated This hook has been renamed to useQueryBoundary */\nexport const useLoader = useQueryBoundary;\n\n/** @deprecated This component has been renamed to QueryBoundaryProvider */\nconst LoaderProvider = QueryBoundaryProvider;\n\nexport default LoaderProvider;\n","import type { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport type { CSSObject, Theme } from \"@mui/material/styles\";\nimport type { ReactNode } from \"react\";\n\nimport { truncate } from \"@alextheman/utility\";\nimport MuiAppBar from \"@mui/material/AppBar\";\nimport Box from \"@mui/material/Box\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport Divider from \"@mui/material/Divider\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport IconButton from \"@mui/material/IconButton\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { styled, useTheme } from \"@mui/material/styles\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport Typography from \"@mui/material/Typography\";\nimport { Fragment, useState } from \"react\";\nimport { MdChevronLeft, MdChevronRight, MdMenu } from \"react-icons/md\";\nimport { Link, useLocation } from \"react-router-dom\";\n\nconst drawerWidth = 240;\n\nfunction openedMixin(theme: Theme): CSSObject {\n return {\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n };\n}\n\nfunction closedMixin(theme: Theme): CSSObject {\n return {\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n };\n}\n\nconst DrawerHeader = styled(\"div\")(({ theme }) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n };\n});\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})<AppBarProps>(({ theme }) => {\n return {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n },\n ],\n };\n});\n\nconst Drawer = styled(MuiDrawer, {\n shouldForwardProp: (prop) => {\n return prop !== \"open\";\n },\n})(({ theme }) => {\n return {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n variants: [\n {\n props: ({ open }) => {\n return open;\n },\n style: {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n },\n },\n {\n props: ({ open }) => {\n return !open;\n },\n style: {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n },\n },\n ],\n };\n});\n\nexport interface NavMenuItemOptions {\n /** The label to display on the nav item option. */\n label: string;\n /** Where in your app the nav item option should navigate to. */\n to: string;\n /** An icon to display alongside the nav item option. */\n icon?: ReactNode;\n}\n\nexport interface NavMenuItem {\n /** The category to display all the nav item options under. */\n category: string;\n /** An array of nav options to display under the chosen category. */\n options: Array<NavMenuItemOptions>;\n}\n\nexport interface NavigationDrawerProps {\n /** The title to display at the top of the wrapper. */\n title: string;\n /** An array of nav items to show. */\n navItems: Array<NavMenuItem>;\n /** Any extra elements to add to the header. */\n headerElements?: ReactNode;\n /** Children to display within the wrapper. */\n children: ReactNode;\n}\n\n/**\n * Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps.\n *\n * @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `NavigationDrawer` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.\n */\nfunction NavigationDrawer({ title, navItems, children, headerElements }: NavigationDrawerProps) {\n const theme = useTheme();\n const [open, setOpen] = useState(true);\n const location = useLocation();\n\n function handleDrawerOpen() {\n setOpen(true);\n }\n\n function handleDrawerClose() {\n setOpen(false);\n }\n\n return (\n <Box sx={{ display: \"flex\" }}>\n <CssBaseline />\n <AppBar position=\"fixed\" open={open}>\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={handleDrawerOpen}\n edge=\"start\"\n sx={[\n {\n marginRight: 5,\n },\n open && { display: \"none\" },\n ]}\n >\n <MdMenu />\n </IconButton>\n <Typography variant=\"h6\" noWrap component=\"div\">\n {title}\n </Typography>\n {headerElements}\n </Toolbar>\n </AppBar>\n <Drawer variant=\"permanent\" open={open}>\n <DrawerHeader>\n <IconButton onClick={handleDrawerClose}>\n {theme.direction === \"rtl\" ? <MdChevronRight /> : <MdChevronLeft />}\n </IconButton>\n </DrawerHeader>\n <Divider />\n {navItems.map((item) => {\n return (\n <Fragment key={item.category}>\n <List>\n <Typography variant={open ? \"h5\" : \"h6\"} sx={{ paddingLeft: open ? 2 : 1 }}>\n {open ? item.category : truncate(item.category, 4)}\n </Typography>\n {item.options.map((option) => {\n return (\n <ListItem key={option.to} disablePadding sx={{ display: \"block\" }}>\n <ListItemButton\n sx={[\n {\n minHeight: 48,\n px: 2.5,\n },\n open\n ? {\n justifyContent: \"initial\",\n }\n : {\n justifyContent: \"center\",\n },\n ]}\n component={Link}\n to={option.to}\n selected={location.pathname === option.to}\n >\n <ListItemIcon\n sx={[\n {\n minWidth: 0,\n justifyContent: \"center\",\n },\n open\n ? {\n mr: 3,\n }\n : {\n mr: \"auto\",\n },\n ]}\n >\n {option.icon ? (\n option.icon\n ) : !open ? (\n <Typography>{truncate(option.label, 4)}</Typography>\n ) : null}\n </ListItemIcon>\n <ListItemText\n primary={option.label}\n sx={[\n open\n ? {\n opacity: 1,\n }\n : {\n opacity: 0,\n },\n ]}\n />\n </ListItemButton>\n </ListItem>\n );\n })}\n </List>\n <Divider />\n </Fragment>\n );\n })}\n </Drawer>\n <Box component=\"main\" sx={{ flexGrow: 1, p: 3 }}>\n <DrawerHeader />\n {children}\n </Box>\n </Box>\n );\n}\n\nexport default NavigationDrawer;\n","import type { TypographyProps } from \"@mui/material/Typography\";\n\nimport Typography from \"@mui/material/Typography\";\n\nexport interface PopoverTextProps extends TypographyProps {\n text: string;\n}\n\n/**\n * @deprecated This component has been deprecated alongside `IconWithPopover`.\n */\nfunction PopoverText({ text, sx, ...typographyProps }: PopoverTextProps) {\n return (\n <>\n {text.split(\"\\n\").map((line, index) => {\n return (\n <Typography key={index} sx={{ margin: 1, ...sx }} {...typographyProps}>\n {line}\n </Typography>\n );\n })}\n </>\n );\n}\n\nexport default PopoverText;\n","import type { ButtonProps } from \"@mui/material/Button\";\n\nimport Button from \"@mui/material/Button\";\nimport { useFormContext } from \"react-hook-form\";\n\nexport interface SubmitButtonProps extends Omit<ButtonProps, \"type\"> {\n /** An option to disable the button on submit if the form is not dirty. */\n disableClean?: boolean;\n /** The label for the button. */\n label: string;\n}\n\n/**\n * A Submit Button for use with `react-hook-form`.\n *\n * @deprecated This component is not compatible with `@tanstack/react-form`. Please use `SubmitButton` from the `@alextheman/components/v7` entrypoint instead. This component will be replaced when v7 officially comes out.\n */\nfunction SubmitButton({ disableClean, label, ...buttonProps }: SubmitButtonProps) {\n const {\n formState: { disabled: formDisabled, isDirty, isSubmitting },\n } = useFormContext();\n\n return (\n <Button\n color=\"primary\"\n disabled={buttonProps.disabled || (disableClean && !isDirty) || formDisabled}\n loading={isSubmitting}\n type=\"submit\"\n variant=\"contained\"\n {...buttonProps}\n >\n {label}\n </Button>\n );\n}\n\nexport default SubmitButton;\n","import type { Dispatch, SetStateAction } from \"react\";\n\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * Stores changes to the window hash as React state.\n *\n * @template StateType - The type of the hash state.\n *\n * @param initialHash - The initial value of the hash.\n *\n * @returns A tuple containing the hash state, and a updater function to set the hash state.\n */\nfunction useHash<StateType extends string>(\n initialHash: StateType | undefined,\n): [StateType, Dispatch<SetStateAction<StateType>>] {\n const [hash, setHash] = useState<StateType>(() => {\n const hash: StateType = window.location.hash.replace(\"#\", \"\") as StateType;\n return !initialHash ? hash : hash === \"\" ? initialHash : hash;\n });\n const hashChangeHandler = useCallback(() => {\n const hash: StateType = window.location.hash.replace(\"#\", \"\") as StateType;\n setHash(!initialHash ? hash : hash === \"\" ? initialHash : hash);\n }, [setHash, initialHash]);\n\n useEffect(() => {\n window.addEventListener(\"hashchange\", hashChangeHandler);\n return () => {\n window.removeEventListener(\"hashchange\", hashChangeHandler);\n };\n }, [hashChangeHandler]);\n\n const updateHash = useCallback(\n (newHash: StateType | ((previousState: StateType) => StateType)) => {\n const resolvedHash = typeof newHash === \"function\" ? newHash(hash) : newHash;\n if (resolvedHash !== hash) {\n window.location.hash = resolvedHash;\n }\n },\n [hash],\n );\n\n return [hash, updateHash];\n}\n\nexport default useHash;\n"],"mappings":"wyFAcA,SAASA,GAAU,CAAE,iBAAgB,cAA8B,CACjE,OACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CACE,GAAI,CACF,MAAO,IACP,OAAQ,IACR,gBAAiB,yBACjB,eAAgB,YAChB,OAAQ,mCACR,UAAW,+BACZ,WAED,EAAA,EAAA,MAACC,EAAAA,QAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CAAY,QAAQ,KAAK,aAAA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