@alextheman/components 6.13.0 → 6.13.1

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.
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@alextheman/utility`),l=require(`@mui/material/AppBar`);l=s(l,1);let u=require(`@mui/material/Box`);u=s(u,1);let d=require(`@mui/material/CssBaseline`);d=s(d,1);let f=require(`@mui/material/Divider`);f=s(f,1);let p=require(`@mui/material/Drawer`);p=s(p,1);let m=require(`@mui/material/IconButton`);m=s(m,1);let h=require(`@mui/material/List`);h=s(h,1);let g=require(`@mui/material/ListItem`);g=s(g,1);let _=require(`@mui/material/ListItemButton`);_=s(_,1);let v=require(`@mui/material/ListItemIcon`);v=s(v,1);let y=require(`@mui/material/ListItemText`);y=s(y,1);let b=require(`@mui/material/styles`),x=require(`@mui/material/Toolbar`);x=s(x,1);let S=require(`@mui/material/Typography`);S=s(S,1);let C=require(`react`),w=require(`react-icons/md`),T=require(`wouter`),E=require(`@mui/material/Alert`);E=s(E,1);let D=require(`@mui/material/AlertTitle`);D=s(D,1);let O=require(`@mui/material/Container`);O=s(O,1);let k=require(`react/jsx-runtime`),A=require(`@mui/material/Link`);A=s(A,1);let ee=require(`wouter/memory-location`),te=require(`wouter/use-browser-location`),j=require(`@mui/material/Button`);j=s(j,1);let M=require(`@tanstack/react-form`),N=require(`@mui/material/TextField`);N=s(N,1);let P=require(`@mui/material/Menu`);P=s(P,1);let F=require(`@mui/material/MenuItem`);F=s(F,1);function I({title:e,children:t}){return(0,k.jsx)(O.default,{maxWidth:`sm`,children:(0,k.jsxs)(E.default,{severity:`error`,children:[(0,k.jsx)(D.default,{children:e}),t]})})}function L({to:e,component:t=T.Link,children:n,ref:r,...i}){return(0,k.jsx)(A.default,{component:t,to:e,ref:r,...i,children:n})}function ne({children:e,...t}){let{hook:n}=(0,ee.memoryLocation)({path:`/`});return(0,k.jsx)(z,{...t,hook:n,children:e})}function R(e,t){return e.replace(RegExp(`^${(0,c.escapeRegexPattern)(t.base)}`),``)}function re(e=te.useBrowserLocation){return t=>{let[n,r]=e(t);return[n,(...[e,...n])=>r(R(e,t),...n)]}}function z({children:e,hook:t,...n}){return(0,k.jsx)(T.Router,{...n,hook:re(t),hrefs:(e,t)=>R(e,t),children:e})}function ie({children:e,fallback:t=(0,k.jsxs)(I,{title:`Page Not Found`,children:[`This page is not available. Please click `,(0,k.jsx)(L,{to:`/`,children:`here`}),` to return to the homepage.`]}),...n}){return(0,k.jsxs)(T.Switch,{...n,children:[e,(0,k.jsx)(T.Route,{children:t})]})}function B(e){return{width:240,transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:`hidden`}}function V(e){return{transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:`hidden`,width:`calc(${e.spacing(7)} + 1px)`,[e.breakpoints.up(`sm`)]:{width:`calc(${e.spacing(8)} + 1px)`}}}const H=(0,b.styled)(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`flex-end`,padding:e.spacing(0,1),...e.mixins.toolbar})),ae=(0,b.styled)(l.default,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({zIndex:e.zIndex.drawer+1,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{marginLeft:240,width:`calc(100% - 240px)`,transition:e.transitions.create([`width`,`margin`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}]})),oe=(0,b.styled)(p.default,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({width:240,flexShrink:0,whiteSpace:`nowrap`,boxSizing:`border-box`,variants:[{props:({open:e})=>e,style:{...B(e),"& .MuiDrawer-paper":B(e)}},{props:({open:e})=>!e,style:{...V(e),"& .MuiDrawer-paper":V(e)}}]}));function se({title:e,navItems:t,children:n,headerElements:r}){let i=(0,b.useTheme)(),[a,o]=(0,C.useState)(!0),[s]=(0,T.useLocation)();function l(){o(!0)}function p(){o(!1)}return(0,k.jsxs)(u.default,{sx:{display:`flex`},children:[(0,k.jsx)(d.default,{}),(0,k.jsx)(ae,{position:`fixed`,open:a,children:(0,k.jsxs)(x.default,{children:[(0,k.jsx)(m.default,{color:`inherit`,"aria-label":`open drawer`,onClick:l,edge:`start`,sx:[{marginRight:5},a&&{display:`none`}],children:(0,k.jsx)(w.MdMenu,{})}),(0,k.jsx)(S.default,{variant:`h6`,noWrap:!0,component:`div`,children:e}),r]})}),(0,k.jsxs)(oe,{variant:`permanent`,open:a,children:[(0,k.jsx)(H,{children:(0,k.jsx)(m.default,{onClick:p,children:i.direction===`rtl`?(0,k.jsx)(w.MdChevronRight,{}):(0,k.jsx)(w.MdChevronLeft,{})})}),(0,k.jsx)(f.default,{}),t.map(e=>(0,k.jsxs)(C.Fragment,{children:[(0,k.jsxs)(h.default,{children:[(0,k.jsx)(S.default,{variant:a?`h5`:`h6`,sx:{paddingLeft:a?2:1},children:a?e.category:(0,c.truncate)(e.category,4)}),e.options.map(e=>(0,k.jsx)(g.default,{disablePadding:!0,sx:{display:`block`},children:(0,k.jsxs)(_.default,{sx:[{minHeight:48,px:2.5},a?{justifyContent:`initial`}:{justifyContent:`center`}],component:L,to:e.to,selected:s===e.to,children:[(0,k.jsx)(v.default,{sx:[{minWidth:0,justifyContent:`center`},a?{mr:3}:{mr:`auto`}],children:e.icon?e.icon:a?null:(0,k.jsx)(S.default,{children:(0,c.truncate)(e.label,4)})}),(0,k.jsx)(y.default,{primary:e.label,sx:[a?{opacity:1}:{opacity:0}]})]})},e.to))]}),(0,k.jsx)(f.default,{})]},e.category))]}),(0,k.jsxs)(u.default,{component:`main`,sx:{flexGrow:1,p:3},children:[(0,k.jsx)(H,{}),n]})]})}const{fieldContext:U,formContext:W,useFieldContext:G,useFormContext:K}=(0,M.createFormHookContexts)();function ce(e){return(0,M.createFormHook)({fieldContext:U,formContext:W,fieldComponents:{TextField:J,...e?.fieldComponents},formComponents:{SubmitButton:q,...e?.formComponents},...(0,c.omitProperties)(e??{},[`formComponents`,`fieldComponents`])})}function q({disableClean:e,label:t=`Submit`,...n}){let r=K();return(0,k.jsx)(j.default,{color:`primary`,disabled:n.disabled||e&&!r.state.isDirty,loading:r.state.isSubmitting,type:`submit`,variant:`contained`,...n,children:t})}function J(e){let t=G();return(0,k.jsx)(N.default,{...e,error:t.state.meta.errors.length!==0,type:`text`,value:t.state.value,onChange:e=>t.handleChange(e.target.value),onBlur:t.handleBlur,placeholder:t.name,helperText:t.state.meta.errors[0]??``})}const Y=(0,C.createContext)(void 0);function X({strict:e=!0}={}){let t=(0,C.useContext)(Y);if(e&&!t)throw new c.DataError({strict:e,context:t},`DROPDOWN_MENU_NOT_FOUND`,`Could not find the DropdownMenu context. Please double-check that it is present.`);return t}function Z({strict:e=!0}={}){return X({strict:e})}function Q({children:e}){let[t,n]=(0,C.useState)(null),r=(0,C.useMemo)(()=>!!t,[t]);function i(){n(null)}return(0,k.jsx)(Y.Provider,{value:{closeMenu:i,isDropdownOpen:r,anchorElement:t,setAnchorElement:n},children:e})}function $({children:e,onClose:t,...n}){let{anchorElement:r,isDropdownOpen:i,closeMenu:a}=Z();return(0,k.jsx)(P.default,{anchorEl:r,open:i,onClose:(e,n)=>{e.defaultPrevented||a(),t&&t(e,n)},...n,children:e})}function le({component:e,children:t,ref:n,onClick:r,...i}){let{closeMenu:a}=X();return(0,k.jsx)(F.default,{component:e,ref:n,...i,onClick:e=>{r&&r(e),!e.defaultPrevented&&a()},children:t})}function ue({component:e,onClick:t,openIcon:n=w.MdArrowDropUp,closedIcon:r=w.MdArrowDropDown,variant:i=`contained`,...a}){let{isDropdownOpen:o,setAnchorElement:s}=Z();return(0,k.jsx)(j.default,{...e?{component:e}:{},"aria-controls":o?`dropdown-menu`:void 0,"aria-haspopup":`true`,"aria-expanded":o,endIcon:o?(0,k.jsx)(n,{}):(0,k.jsx)(r,{}),variant:i,...a,onClick:e=>{t&&t(e),!e.defaultPrevented&&s(e.currentTarget)}})}function de({children:e,trigger:t,triggerProps:n}){return(0,k.jsxs)(Q,{children:[(0,k.jsx)(ue,{component:t,...n,children:n?.children??`Menu`}),(0,k.jsx)($,{children:e})]})}exports.DropdownMenu=$,exports.DropdownMenuItem=le,exports.DropdownMenuProvider=Q,exports.DropdownMenuTrigger=ue,exports.DropdownMenuWrapper=de,exports.ErrorPage=I,exports.InternalLink=L,exports.MemoryRouter=ne,exports.NavigationDrawer=se,exports.Router=z,exports.SubmitButton=q,exports.Switch=ie,exports.TextField=J,exports.fieldContext=U,exports.formContext=W,exports.useAppForm=ce,exports.useDropdownMenu=X,exports.useFieldContext=G,exports.useFormContext=K;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["Container","Alert","AlertTitle","WouterLink","MUILink","useBrowserLocation","Wouter","WouterSwitch","Route","MuiAppBar","MuiDrawer","Box","CssBaseline","Toolbar","IconButton","MdMenu","Typography","MdChevronRight","MdChevronLeft","Divider","Fragment","List","ListItem","ListItemButton","ListItemIcon","ListItemText","Button","MUITextField","DataError","Menu","MenuItem","MdArrowDropUp","MdArrowDropDown","Button"],"sources":["../../src/v7/components/routing/ErrorPage.tsx","../../src/v7/components/routing/InternalLink.tsx","../../src/v7/components/routing/MemoryRouter.tsx","../../src/v7/components/routing/Router.tsx","../../src/v7/components/routing/Switch.tsx","../../src/v7/components/NavigationDrawer.tsx","../../src/v7/hooks/formHooks.ts","../../src/v7/hooks/createFormHook.ts","../../src/v7/components/SubmitButton.tsx","../../src/v7/components/TextField.tsx","../../src/v7/components/DropdownMenu/DropdownMenuProvider.tsx","../../src/v7/components/DropdownMenu/DropdownMenu.tsx","../../src/v7/components/DropdownMenu/DropdownMenuItem.tsx","../../src/v7/components/DropdownMenu/DropdownMenuTrigger.tsx","../../src/v7/components/DropdownMenu/DropdownMenuWrapper.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport Alert from \"@mui/material/Alert\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport Container from \"@mui/material/Container\";\n\nexport interface ErrorPageProps {\n /** The page title. */\n title: string;\n /** The page content. */\n children: ReactNode;\n}\n\n/** Renders a simple page layout for displaying errors. */\nfunction ErrorPage({ title, children }: ErrorPageProps) {\n return (\n <Container maxWidth=\"sm\">\n <Alert severity=\"error\">\n <AlertTitle>{title}</AlertTitle>\n {children}\n </Alert>\n </Container>\n );\n}\n\nexport default ErrorPage;\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 WouterLink } from \"wouter\";\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 Wouter implementation but can be overridden via the `component` prop.\n */\nfunction InternalLink({\n to,\n component = WouterLink,\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 { RouterProps } from \"wouter\";\n\nimport { memoryLocation } from \"wouter/memory-location\";\n\nimport { Router } from \"src/v7\";\n\n/**\n * A router that can be used with Wouter that stores all entries in memory. Works similarly to the `MemoryRouter` from `react-router-dom`.\n *\n * Note that it also contains the same absolute routing behaviour found in the base `Router` component from `@alextheman/components/v7`.\n */\nfunction MemoryRouter({ children, ...routerProps }: Omit<RouterProps, \"hook\" | \"hrefs\">) {\n const { hook } = memoryLocation({ path: \"/\" });\n\n return (\n <Router {...routerProps} hook={hook}>\n {children}\n </Router>\n );\n}\n\nexport default MemoryRouter;\n","import type { NonUndefined } from \"@alextheman/utility\";\nimport type { BaseLocationHook, RouterObject, RouterProps, useLocation } from \"wouter\";\n\nimport { escapeRegexPattern } from \"@alextheman/utility\";\nimport { Router as Wouter } from \"wouter\";\nimport { useBrowserLocation } from \"wouter/use-browser-location\";\n\ntype SetLocation = ReturnType<typeof useLocation>[1];\n\nfunction normaliseNestedRouterPath(path: string, router: RouterObject) {\n return path.replace(new RegExp(`^${escapeRegexPattern(router.base)}`), \"\");\n}\n\nfunction createCustomLocation(\n hook: BaseLocationHook = useBrowserLocation,\n): NonUndefined<RouterProps[\"hook\"]> {\n return (router: RouterObject): ReturnType<typeof useLocation> => {\n const [location, setLocation] = hook(router);\n\n return [\n location,\n (...[path, ...args]: Parameters<SetLocation>): ReturnType<SetLocation> => {\n const newPath = normaliseNestedRouterPath(path, router);\n return setLocation(newPath, ...args);\n },\n ];\n };\n}\n\n/**\n * An app Router that integrates with Wouter and handles nested routing behaviour.\n *\n * If you use a Wouter Link within a nested Route with Wouter, navigation can behave unexpectedly as it ends up resolving relative to the nested router's base URL. For example:\n *\n * ```tsx\n * <Route path=\"/users\" nest>\n * <Link to=\"/users/sign-in\"> // Navigates to `/users/users/sign-in` (it appends the `to` prop to the `path` prop in the Route)\n * View user details\n * </Link>\n * </Route>\n * ```\n *\n * This can be surprising, especially when re-using page logic across routes, where you don't want links to rely on implicit nested routing behaviour. This router deals with the above so that, for as long as you define your nested routes in this Router component, the Link example above would navigate to `/users/sign-in` instead. That is, it uses the `to` prop as an absolute path rather than appending it to the parent Route path.\n *\n * This effectively makes all navigation behave as if paths are absolute (relative to the application's base URL), regardless of nested routing structure.\n */\nfunction Router({ children, hook, ...routerProps }: Omit<RouterProps, \"hrefs\">) {\n return (\n <Wouter\n {...routerProps}\n hook={createCustomLocation(hook)}\n hrefs={(path, router) => {\n return normaliseNestedRouterPath(path, router);\n }}\n >\n {children}\n </Wouter>\n );\n}\n\nexport default Router;\n","import type { ReactNode } from \"react\";\nimport type { SwitchProps as WouterSwitchProps } from \"wouter\";\n\nimport { Route, Switch as WouterSwitch } from \"wouter\";\n\nimport ErrorPage from \"src/v7/components/routing/ErrorPage\";\nimport InternalLink from \"src/v7/components/routing/InternalLink\";\n\nexport interface SwitchProps extends WouterSwitchProps {\n /** The content to render if no routes match. */\n fallback?: ReactNode;\n}\n\n/**\n * A wrapper around Wouter's Switch that adds a fallback route.\n *\n * This ensures that any unmatched routes in the Switch always shows something rather than just showing an empty page.\n */\nfunction Switch({\n children,\n fallback = (\n <ErrorPage title=\"Page Not Found\">\n This page is not available. Please click <InternalLink to=\"/\">here</InternalLink> to return to\n the homepage.\n </ErrorPage>\n ),\n ...switchProps\n}: SwitchProps) {\n return (\n <WouterSwitch {...switchProps}>\n {children}\n <Route>{fallback}</Route>\n </WouterSwitch>\n );\n}\n\nexport default Switch;\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 { omitProperties } from \"@alextheman/utility\";\nimport { createFormHook as createTanstackFormHook } from \"@tanstack/react-form\";\n\nimport { SubmitButton, TextField } from \"src/v7/components\";\nimport { fieldContext, formContext } from \"src/v7/hooks/formHooks\";\n\n/** Create the hooks for your app form with `@tanstack/react-form` using our default configuration. */\nfunction createFormHook(options?: Partial<Parameters<typeof createTanstackFormHook>[0]>) {\n return createTanstackFormHook({\n fieldContext,\n formContext,\n fieldComponents: {\n TextField,\n ...options?.fieldComponents,\n },\n formComponents: {\n SubmitButton,\n ...options?.formComponents,\n },\n ...omitProperties(options ?? {}, [\"formComponents\", \"fieldComponents\"]),\n });\n}\n\nexport default createFormHook;\n","import type { ButtonProps } from \"@mui/material/Button\";\n\nimport Button from \"@mui/material/Button\";\n\nimport { useFormContext } from \"src/v7/hooks\";\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 TanStack Form's app form pattern. Must be used in a `<form.AppForm />` context.\n *\n * This should be initialised in your app form in the following way:\n *\n * ```typescript\n * const { useAppForm } = createFormHook({\n * fieldContext,\n * formContext,\n * formComponents: {\n * SubmitButton,\n * },\n * });\n * ```\n * And then used as such:\n *\n * ```tsx\n * <form.AppField>\n * ...\n * </form.AppField>\n * <form.AppForm>\n * <form.SubmitButton />\n * </form.AppForm>\n * ```\n */\nfunction SubmitButton({ disableClean, label = \"Submit\", ...buttonProps }: SubmitButtonProps) {\n const form = useFormContext();\n\n return (\n <Button\n color=\"primary\"\n disabled={buttonProps.disabled || (disableClean && !form.state.isDirty)}\n loading={form.state.isSubmitting}\n type=\"submit\"\n variant=\"contained\"\n {...buttonProps}\n >\n {label}\n </Button>\n );\n}\n\nexport default SubmitButton;\n","import type { TextFieldProps as MUITextFieldProps } from \"@mui/material/TextField\";\n\nimport MUITextField from \"@mui/material/TextField\";\n\nimport { useFieldContext } from \"src/v7/hooks\";\n\n/**\n * A text field component for use with TanStack Form's app form pattern. Must be used in a `<form.AppField />` context.\n *\n * This should be initialised in your app form in the following way:\n *\n * ```typescript\n * const { useAppForm } = createFormHook({\n * fieldContext,\n * formContext,\n * fieldComponents: {\n * TextField,\n * },\n * });\n * ```\n * And then used as such:\n *\n * ```tsx\n * <form.AppField name=\"firstName\">\n * {(field) => {\n * return <field.TextField />\n * }}\n * </form.AppField>\n * <form.AppForm>\n * <form.SubmitButton />\n * </form.AppForm>\n * ```\n */\nfunction TextField(props: MUITextFieldProps) {\n const field = useFieldContext();\n\n return (\n <MUITextField\n {...props}\n error={field.state.meta.errors.length !== 0}\n type=\"text\"\n value={field.state.value}\n onChange={(event) => {\n return field.handleChange(event.target.value);\n }}\n onBlur={field.handleBlur}\n placeholder={field.name}\n helperText={field.state.meta.errors[0] ?? \"\"}\n />\n );\n}\n\nexport default TextField;\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 { ButtonOwnProps } from \"@mui/material/Button\";\nimport type {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ElementType,\n MouseEvent,\n} from \"react\";\n\nimport Button from \"@mui/material/Button\";\nimport { MdArrowDropDown, MdArrowDropUp } from \"react-icons/md\";\n\nimport { useDropdownMenuInternal } from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\n\nexport type DropdownMenuTriggerProps<RootComponent extends ElementType> = {\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 /** A function to call whenever the trigger is clicked. */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /** The ref to forward to allow it to be used with polymorphic components */\n ref?: ComponentPropsWithRef<RootComponent>[\"ref\"];\n /** The icon to display on the button when it is open. */\n openIcon?: ElementType;\n /** The icon to display on the button when it is closed. */\n closedIcon?: ElementType;\n} & ComponentPropsWithoutRef<RootComponent> &\n Omit<ButtonOwnProps, \"endIcon\">;\n\n/**\n * Renders a component which, when clicked, opens the `DropdownMenu` in the current `DropdownMenuProvider`.\n *\n * Note that this component must be used in a `DropdownMenuProvider`. It will error in any other context.\n */\nfunction DropdownMenuTrigger<RootComponent extends ElementType>({\n component,\n onClick,\n openIcon: OpenIcon = MdArrowDropUp,\n closedIcon: ClosedIcon = MdArrowDropDown,\n variant = \"contained\",\n ...buttonProps\n}: DropdownMenuTriggerProps<RootComponent>) {\n const { isDropdownOpen, setAnchorElement } = useDropdownMenuInternal();\n\n return (\n <Button\n {...(component ? { component } : {})}\n aria-controls={isDropdownOpen ? \"dropdown-menu\" : undefined}\n aria-haspopup=\"true\"\n aria-expanded={isDropdownOpen}\n endIcon={isDropdownOpen ? <OpenIcon /> : <ClosedIcon />}\n variant={variant}\n {...buttonProps}\n onClick={(event: MouseEvent<HTMLElement>) => {\n if (onClick) {\n onClick(event);\n }\n if (event.defaultPrevented) {\n return;\n }\n setAnchorElement(event.currentTarget);\n }}\n />\n );\n}\n\nexport default DropdownMenuTrigger;\n","import type { ElementType, ReactNode } from \"react\";\n\nimport type { DropdownMenuTriggerProps } from \"src/v7/components/DropdownMenu/DropdownMenuTrigger\";\n\nimport DropdownMenu from \"src/v7/components/DropdownMenu/DropdownMenu\";\nimport DropdownMenuProvider from \"src/v7/components/DropdownMenu/DropdownMenuProvider\";\nimport DropdownMenuTrigger from \"src/v7/components/DropdownMenu/DropdownMenuTrigger\";\n\nexport interface DropdownMenuWrapperProps {\n /** The children to render inside of the dropdown. */\n children: ReactNode;\n /** The button component to be used as the dropdown toggle (defaults to a Material UI Button) */\n trigger?: ElementType;\n /** Props to pass to the Button. */\n triggerProps?: Omit<DropdownMenuTriggerProps<ElementType>, \"component\">;\n}\n\n/**\n * An in-line component that manages the `DropdownMenuProvider` internally. You can just pass in the `DropdownMenuItem` components and it will work as is.\n *\n * This may be used over LoaderProvider if you don't require as much control over the placement of each individual part of the dropdown.\n */\nfunction DropdownMenuWrapper({ children, trigger, triggerProps }: DropdownMenuWrapperProps) {\n return (\n <DropdownMenuProvider>\n <DropdownMenuTrigger component={trigger} {...triggerProps}>\n {triggerProps?.children ?? \"Menu\"}\n </DropdownMenuTrigger>\n <DropdownMenu>{children}</DropdownMenu>\n </DropdownMenuProvider>\n );\n}\n\nexport default DropdownMenuWrapper;\n"],"mappings":"yzDAcA,SAAS,EAAU,CAAE,QAAO,YAA4B,CACtD,OACE,EAAA,EAAA,KAACA,EAAAA,QAAD,CAAW,SAAS,eAClB,EAAA,EAAA,MAACC,EAAAA,QAAD,CAAO,SAAS,iBAAhB,EACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CAAA,SAAa,EAAmB,CAAA,CAC/B,EACK,GACE,CAAA,CCWhB,SAAS,EAAa,CACpB,KACA,YAAYC,EAAAA,KACZ,WACA,MACA,GAAG,GACiB,CACpB,OACE,EAAA,EAAA,KAACC,EAAAA,QAAD,CAAoB,YAAe,KAAS,MAAK,GAAI,EAClD,WACO,CAAA,CC/Bd,SAAS,GAAa,CAAE,WAAU,GAAG,GAAoD,CACvF,GAAM,CAAE,SAAA,EAAA,GAAA,gBAAwB,C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