@alextheman/components 6.25.0 → 6.25.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/README.md +2 -3
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -36
- package/dist/index.d.ts +63 -36
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/v7/index.cjs +1 -1
- package/dist/v7/index.d.cts +15 -18
- package/dist/v7/index.d.ts +15 -18
- package/package.json +20 -17
package/dist/v7/index.cjs
CHANGED
|
@@ -1,2 +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(
|
|
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("@mui/material/BottomNavigation");c=s(c,1);let l=require("@mui/material/BottomNavigationAction");l=s(l,1);let u=require("@mui/material/Box");u=s(u,1);let d=require("@mui/material/Paper");d=s(d,1);let f=require("@mui/material/Alert");f=s(f,1);let p=require("@mui/material/AlertTitle");p=s(p,1);let m=require("@mui/material/Container");m=s(m,1);let h=require("react/jsx-runtime"),g=require("@mui/material/Link");g=s(g,1);let _=require("wouter"),ee=require("wouter/memory-location"),v=require("@alextheman/utility"),te=require("wouter/use-browser-location"),y=require("@mui/material/AppBar");y=s(y,1);let b=require("@mui/material/CssBaseline");b=s(b,1);let x=require("@mui/material/Divider");x=s(x,1);let S=require("@mui/material/Drawer");S=s(S,1);let C=require("@mui/material/IconButton");C=s(C,1);let w=require("@mui/material/List");w=s(w,1);let T=require("@mui/material/ListItem");T=s(T,1);let E=require("@mui/material/ListItemButton");E=s(E,1);let D=require("@mui/material/ListItemIcon");D=s(D,1);let O=require("@mui/material/ListItemText");O=s(O,1);let k=require("@mui/material/styles"),A=require("@mui/material/Toolbar");A=s(A,1);let j=require("@mui/material/Typography");j=s(j,1);let M=require("react"),N=require("react-icons/md"),P=require("@mui/material/Button");P=s(P,1);let F=require("@tanstack/react-form"),I=require("@mui/material/TextField");I=s(I,1);let L=require("@mui/material/Menu");L=s(L,1);let ne=require("@alextheman/utility/v6"),R=require("@mui/material/MenuItem");R=s(R,1);function z({title:e,children:t}){return(0,h.jsx)(m.default,{maxWidth:`sm`,children:(0,h.jsxs)(f.default,{severity:`error`,children:[(0,h.jsx)(p.default,{children:e}),t]})})}function B({to:e,component:t=_.Link,children:n,ref:r,...i}){return(0,h.jsx)(g.default,{component:t,to:e,ref:r,...i,children:n})}function re({children:e,...t}){let{hook:n}=(0,ee.memoryLocation)({path:`/`});return(0,h.jsx)(H,{...t,hook:n,children:e})}function V(e,t){return e.replace(RegExp(`^${(0,v.escapeRegexPattern)(t.base)}`),``)}function ie(e=te.useBrowserLocation){return t=>{let[n,r]=e(t);return[n,(...[e,...n])=>r(V(e,t),...n)]}}function H({children:e,hook:t,...n}){return(0,h.jsx)(_.Router,{...n,hook:ie(t),hrefs:(e,t)=>V(e,t),children:e})}function ae({children:e,fallback:t=(0,h.jsxs)(z,{title:`Page Not Found`,children:[`This page is not available. Please click `,(0,h.jsx)(B,{to:`/`,children:`here`}),` to return to the homepage.`]}),...n}){return(0,h.jsxs)(_.Switch,{...n,children:[e,(0,h.jsx)(_.Route,{children:t})]})}function oe(e,t){return`${t.base}/${e}`.replace(/\/+/g,`/`)}function U(...e){let t=(0,_.useRouter)(),[n,r]=(0,_.useLocation)(...e);return[oe(n,t),r]}function se({children:e,navItems:t}){let[n]=U();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.default,{sx:{paddingBottom:7},children:e}),(0,h.jsx)(d.default,{sx:{position:`fixed`,bottom:0,left:0,right:0},children:(0,h.jsx)(c.default,{showLabels:!0,value:n,children:t.map(e=>(0,h.jsx)(l.default,{value:e.value??e.to,...e,component:B},e.to))})})]})}function W(e){return{width:240,transition:e.transitions.create(`width`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:`hidden`}}function G(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 K=(0,k.styled)(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`flex-end`,padding:e.spacing(0,1),...e.mixins.toolbar})),ce=(0,k.styled)(y.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})}}]})),le=(0,k.styled)(S.default,{shouldForwardProp:e=>e!==`open`})(({theme:e})=>({width:240,flexShrink:0,whiteSpace:`nowrap`,boxSizing:`border-box`,variants:[{props:({open:e})=>e,style:{...W(e),"& .MuiDrawer-paper":W(e)}},{props:({open:e})=>!e,style:{...G(e),"& .MuiDrawer-paper":G(e)}}]}));function ue({title:e,navItems:t,children:n,headerElements:r}){let i=(0,k.useTheme)(),[a,o]=(0,M.useState)(!0),[s]=(0,_.useLocation)();function c(){o(!0)}function l(){o(!1)}return(0,h.jsxs)(u.default,{sx:{display:`flex`},children:[(0,h.jsx)(b.default,{}),(0,h.jsx)(ce,{position:`fixed`,open:a,children:(0,h.jsxs)(A.default,{children:[(0,h.jsx)(C.default,{color:`inherit`,"aria-label":`open drawer`,onClick:c,edge:`start`,sx:[{marginRight:5},a&&{display:`none`}],children:(0,h.jsx)(N.MdMenu,{})}),(0,h.jsx)(j.default,{variant:`h6`,noWrap:!0,component:`div`,children:e}),(0,h.jsx)(u.default,{sx:{marginLeft:`auto`},children:r})]})}),(0,h.jsxs)(le,{variant:`permanent`,open:a,children:[(0,h.jsx)(K,{children:(0,h.jsx)(C.default,{onClick:l,children:i.direction===`rtl`?(0,h.jsx)(N.MdChevronRight,{}):(0,h.jsx)(N.MdChevronLeft,{})})}),(0,h.jsx)(x.default,{}),t.map(e=>(0,h.jsxs)(M.Fragment,{children:[(0,h.jsxs)(w.default,{children:[(0,h.jsx)(j.default,{variant:a?`h5`:`h6`,sx:{paddingLeft:a?2:1},children:a?e.category:(0,v.truncate)(e.category,4)}),e.options.map(e=>(0,h.jsx)(T.default,{disablePadding:!0,sx:{display:`block`},children:(0,h.jsxs)(E.default,{sx:[{minHeight:48,px:2.5},a?{justifyContent:`initial`}:{justifyContent:`center`}],component:B,to:e.to,selected:s===e.to,children:[(0,h.jsx)(D.default,{sx:[{minWidth:0,justifyContent:`center`},a?{mr:3}:{mr:`auto`}],children:e.icon?e.icon:a?null:(0,h.jsx)(j.default,{children:(0,v.truncate)(e.label,4)})}),(0,h.jsx)(O.default,{primary:e.label,sx:[a?{opacity:1}:{opacity:0}]})]})},e.to))]}),(0,h.jsx)(x.default,{})]},e.category))]}),(0,h.jsxs)(u.default,{component:`main`,sx:{flexGrow:1,p:3},children:[(0,h.jsx)(K,{}),n]})]})}const{fieldContext:q,formContext:J,useFieldContext:Y,useFormContext:X}=(0,F.createFormHookContexts)();function de(e){return(0,F.createFormHook)({fieldContext:q,formContext:J,fieldComponents:{TextField:Q,...e?.fieldComponents},formComponents:{SubmitButton:Z,...e?.formComponents},...(0,v.omitProperties)(e??{},[`formComponents`,`fieldComponents`])})}function Z({disableClean:e,label:t=`Submit`,...n}){let r=X();return(0,h.jsx)(P.default,{color:`primary`,disabled:n.disabled||e&&!r.state.isDirty,loading:r.state.isSubmitting,type:`submit`,variant:`contained`,...n,children:t})}function Q({label:e,...t}){let n=Y();return(0,h.jsx)(I.default,{...t,label:e,error:n.state.meta.errors.length!==0,type:`text`,value:n.state.value,onChange:e=>n.handleChange(e.target.value),onBlur:n.handleBlur,placeholder:typeof e==`string`?e:n.name,helperText:n.state.meta.errors[0]??``})}const fe=(0,M.createContext)(void 0);function $({strict:e=!0}={}){let t=(0,M.useContext)(fe);if(e&&!t)throw new ne.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 pe({strict:e=!0}={}){return $({strict:e})}function me({children:e}){let[t,n]=(0,M.useState)(null),r=(0,M.useMemo)(()=>!!t,[t]);function i(){n(null)}return(0,h.jsx)(fe.Provider,{value:{closeMenu:i,isDropdownOpen:r,anchorElement:t,setAnchorElement:n},children:e})}function he({children:e,onClose:t,...n}){let{anchorElement:r,isDropdownOpen:i,closeMenu:a}=pe();return(0,h.jsx)(L.default,{anchorEl:r,open:i,onClose:(e,n)=>{e.defaultPrevented||a(),t&&t(e,n)},...n,children:e})}function ge({component:e,children:t,ref:n,onClick:r,...i}){let{closeMenu:a}=$();return(0,h.jsx)(R.default,{component:e,ref:n,...i,onClick:e=>{r&&r(e),!e.defaultPrevented&&a()},children:t})}function _e({component:e,onClick:t,openIcon:n=N.MdArrowDropUp,closedIcon:r=N.MdArrowDropDown,variant:i=`contained`,...a}){let{isDropdownOpen:o,setAnchorElement:s}=pe();return(0,h.jsx)(P.default,{...e?{component:e}:{},"aria-controls":o?`dropdown-menu`:void 0,"aria-haspopup":`true`,"aria-expanded":o,endIcon:o?(0,h.jsx)(n,{}):(0,h.jsx)(r,{}),variant:i,...a,onClick:e=>{t&&t(e),!e.defaultPrevented&&s(e.currentTarget)}})}function ve({children:e,trigger:t,triggerProps:n}){return(0,h.jsxs)(me,{children:[(0,h.jsx)(_e,{component:t,...n,children:n?.children??`Menu`}),(0,h.jsx)(he,{children:e})]})}exports.DropdownMenu=he,exports.DropdownMenuItem=ge,exports.DropdownMenuProvider=me,exports.DropdownMenuTrigger=_e,exports.DropdownMenuWrapper=ve,exports.ErrorPage=z,exports.InternalLink=B,exports.MemoryRouter=re,exports.NavigationBottom=se,exports.NavigationDrawer=ue,exports.Router=H,exports.SubmitButton=Z,exports.Switch=ae,exports.TextField=Q,exports.createFormHook=de,exports.fieldContext=q,exports.formContext=J,exports.useAbsoluteLocation=U,exports.useDropdownMenu=$,exports.useFieldContext=Y,exports.useFormContext=X;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/v7/index.d.cts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import * as _$react from "react";
|
|
3
1
|
import { ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, ElementType, JSX, MouseEvent, ReactNode, Ref } from "react";
|
|
4
2
|
import Button, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
5
3
|
import { TextFieldProps } from "@mui/material/TextField";
|
|
@@ -8,7 +6,6 @@ import { MenuItemOwnProps } from "@mui/material/MenuItem";
|
|
|
8
6
|
import { OptionalOnCondition } from "@alextheman/utility";
|
|
9
7
|
import { LinkProps } from "@mui/material/Link";
|
|
10
8
|
import { RouterProps, SwitchProps as SwitchProps$1, useLocation } from "wouter";
|
|
11
|
-
import * as _$_tanstack_react_form0 from "@tanstack/react-form";
|
|
12
9
|
import { createFormHook as createFormHook$1 } from "@tanstack/react-form";
|
|
13
10
|
|
|
14
11
|
//#region src/v7/components/NavigationBottom.d.ts
|
|
@@ -32,7 +29,7 @@ interface NavigationBottomProps {
|
|
|
32
29
|
declare function NavigationBottom({
|
|
33
30
|
children,
|
|
34
31
|
navItems
|
|
35
|
-
}: NavigationBottomProps):
|
|
32
|
+
}: NavigationBottomProps): import("react/jsx-runtime").JSX.Element;
|
|
36
33
|
//#endregion
|
|
37
34
|
//#region src/v7/components/NavigationDrawer.d.ts
|
|
38
35
|
interface NavMenuItemOptions {
|
|
@@ -65,7 +62,7 @@ declare function NavigationDrawer({
|
|
|
65
62
|
navItems,
|
|
66
63
|
children,
|
|
67
64
|
headerElements
|
|
68
|
-
}: NavigationDrawerProps):
|
|
65
|
+
}: NavigationDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
69
66
|
//#endregion
|
|
70
67
|
//#region src/v7/components/SubmitButton.d.ts
|
|
71
68
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
@@ -103,7 +100,7 @@ declare function SubmitButton({
|
|
|
103
100
|
disableClean,
|
|
104
101
|
label,
|
|
105
102
|
...buttonProps
|
|
106
|
-
}: SubmitButtonProps):
|
|
103
|
+
}: SubmitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
107
104
|
//#endregion
|
|
108
105
|
//#region src/v7/components/TextField.d.ts
|
|
109
106
|
/**
|
|
@@ -136,7 +133,7 @@ declare function SubmitButton({
|
|
|
136
133
|
declare function TextField({
|
|
137
134
|
label,
|
|
138
135
|
...props
|
|
139
|
-
}: TextFieldProps):
|
|
136
|
+
}: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
140
137
|
//#endregion
|
|
141
138
|
//#region src/v7/components/DropdownMenu/DropdownMenu.d.ts
|
|
142
139
|
interface DropdownMenuProps extends Omit<MenuProps, "anchorEl" | "open"> {
|
|
@@ -152,7 +149,7 @@ declare function DropdownMenu({
|
|
|
152
149
|
children,
|
|
153
150
|
onClose,
|
|
154
151
|
...menuProps
|
|
155
|
-
}: DropdownMenuProps):
|
|
152
|
+
}: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
156
153
|
//#endregion
|
|
157
154
|
//#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
|
|
158
155
|
type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button> = {
|
|
@@ -176,7 +173,7 @@ declare function DropdownMenuItem<RootComponent extends ElementType = typeof But
|
|
|
176
173
|
ref,
|
|
177
174
|
onClick,
|
|
178
175
|
...menuItemProps
|
|
179
|
-
}: DropdownMenuItemProps<RootComponent>):
|
|
176
|
+
}: DropdownMenuItemProps<RootComponent>): import("react/jsx-runtime").JSX.Element;
|
|
180
177
|
//#endregion
|
|
181
178
|
//#region src/types/ContextHookOptions.d.ts
|
|
182
179
|
interface ContextHookOptions<Strict extends boolean = true> {
|
|
@@ -204,7 +201,7 @@ interface DropdownMenuProviderProps {
|
|
|
204
201
|
/** Provides shared context for the `DropdownMenu` related components. */
|
|
205
202
|
declare function DropdownMenuProvider({
|
|
206
203
|
children
|
|
207
|
-
}: DropdownMenuProviderProps):
|
|
204
|
+
}: DropdownMenuProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
208
205
|
//#endregion
|
|
209
206
|
//#region src/v7/components/DropdownMenu/DropdownMenuTrigger.d.ts
|
|
210
207
|
type DropdownMenuTriggerProps<RootComponent extends ElementType> = {
|
|
@@ -234,7 +231,7 @@ declare function DropdownMenuTrigger<RootComponent extends ElementType>({
|
|
|
234
231
|
closedIcon: ClosedIcon,
|
|
235
232
|
variant,
|
|
236
233
|
...buttonProps
|
|
237
|
-
}: DropdownMenuTriggerProps<RootComponent>):
|
|
234
|
+
}: DropdownMenuTriggerProps<RootComponent>): import("react/jsx-runtime").JSX.Element;
|
|
238
235
|
//#endregion
|
|
239
236
|
//#region src/v7/components/DropdownMenu/DropdownMenuWrapper.d.ts
|
|
240
237
|
interface DropdownMenuWrapperProps {
|
|
@@ -254,7 +251,7 @@ declare function DropdownMenuWrapper({
|
|
|
254
251
|
children,
|
|
255
252
|
trigger,
|
|
256
253
|
triggerProps
|
|
257
|
-
}: DropdownMenuWrapperProps):
|
|
254
|
+
}: DropdownMenuWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
258
255
|
//#endregion
|
|
259
256
|
//#region src/v7/components/routing/ErrorPage.d.ts
|
|
260
257
|
interface ErrorPageProps {
|
|
@@ -267,7 +264,7 @@ interface ErrorPageProps {
|
|
|
267
264
|
declare function ErrorPage({
|
|
268
265
|
title,
|
|
269
266
|
children
|
|
270
|
-
}: ErrorPageProps):
|
|
267
|
+
}: ErrorPageProps): import("react/jsx-runtime").JSX.Element;
|
|
271
268
|
//#endregion
|
|
272
269
|
//#region src/v7/components/routing/InternalLink.d.ts
|
|
273
270
|
interface InternalLinkProps extends Omit<LinkProps, "href" | "component"> {
|
|
@@ -301,7 +298,7 @@ declare function InternalLink({
|
|
|
301
298
|
children,
|
|
302
299
|
ref,
|
|
303
300
|
...linkProps
|
|
304
|
-
}: InternalLinkProps):
|
|
301
|
+
}: InternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
305
302
|
//#endregion
|
|
306
303
|
//#region src/v7/components/routing/MemoryRouter.d.ts
|
|
307
304
|
/**
|
|
@@ -312,7 +309,7 @@ declare function InternalLink({
|
|
|
312
309
|
declare function MemoryRouter({
|
|
313
310
|
children,
|
|
314
311
|
...routerProps
|
|
315
|
-
}: Omit<RouterProps, "hook" | "hrefs">):
|
|
312
|
+
}: Omit<RouterProps, "hook" | "hrefs">): import("react/jsx-runtime").JSX.Element;
|
|
316
313
|
//#endregion
|
|
317
314
|
//#region src/v7/components/routing/Router.d.ts
|
|
318
315
|
/**
|
|
@@ -336,7 +333,7 @@ declare function Router({
|
|
|
336
333
|
children,
|
|
337
334
|
hook,
|
|
338
335
|
...routerProps
|
|
339
|
-
}: Omit<RouterProps, "hrefs">):
|
|
336
|
+
}: Omit<RouterProps, "hrefs">): import("react/jsx-runtime").JSX.Element;
|
|
340
337
|
//#endregion
|
|
341
338
|
//#region src/v7/components/routing/Switch.d.ts
|
|
342
339
|
interface SwitchProps extends SwitchProps$1 {
|
|
@@ -352,7 +349,7 @@ declare function Switch({
|
|
|
352
349
|
children,
|
|
353
350
|
fallback,
|
|
354
351
|
...switchProps
|
|
355
|
-
}: SwitchProps):
|
|
352
|
+
}: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
356
353
|
//#endregion
|
|
357
354
|
//#region src/v7/components/routing/useAbsoluteLocation.d.ts
|
|
358
355
|
/**
|
|
@@ -378,7 +375,7 @@ declare function createFormHook<FieldComponents extends Record<string, Component
|
|
|
378
375
|
}>): ReturnType<typeof createFormHook$1<AlexFieldComponents & FieldComponents, AlexFormComponents & FormComponents>>;
|
|
379
376
|
//#endregion
|
|
380
377
|
//#region src/v7/hooks/formHooks.d.ts
|
|
381
|
-
declare const fieldContext:
|
|
378
|
+
declare const fieldContext: import("react").Context<import("@tanstack/react-form").AnyFieldApi>, formContext: import("react").Context<import("@tanstack/react-form").AnyFormApi>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
|
|
382
379
|
//#endregion
|
|
383
380
|
export { DropdownMenu, type DropdownMenuContextValue, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuProvider, type DropdownMenuProviderProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, DropdownMenuWrapper, type DropdownMenuWrapperProps, ErrorPage, type ErrorPageProps, InternalLink, type InternalLinkProps, MemoryRouter, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Router, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, TextField, createFormHook, fieldContext, formContext, useAbsoluteLocation, useDropdownMenu, useFieldContext, useFormContext };
|
|
384
381
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/v7/index.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { LinkProps } from "@mui/material/Link";
|
|
3
2
|
import { RouterProps, SwitchProps as SwitchProps$1, useLocation } from "wouter";
|
|
4
3
|
import { OptionalOnCondition } from "@alextheman/utility";
|
|
5
|
-
import * as _$react from "react";
|
|
6
4
|
import { ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, ElementType, JSX, MouseEvent, ReactNode, Ref } from "react";
|
|
7
5
|
import Button, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
8
|
-
import * as _$_tanstack_react_form0 from "@tanstack/react-form";
|
|
9
6
|
import { createFormHook as createFormHook$1 } from "@tanstack/react-form";
|
|
10
7
|
import { TextFieldProps } from "@mui/material/TextField";
|
|
11
8
|
import { MenuProps } from "@mui/material/Menu";
|
|
@@ -32,7 +29,7 @@ interface NavigationBottomProps {
|
|
|
32
29
|
declare function NavigationBottom({
|
|
33
30
|
children,
|
|
34
31
|
navItems
|
|
35
|
-
}: NavigationBottomProps):
|
|
32
|
+
}: NavigationBottomProps): import("react/jsx-runtime").JSX.Element;
|
|
36
33
|
//#endregion
|
|
37
34
|
//#region src/v7/components/NavigationDrawer.d.ts
|
|
38
35
|
interface NavMenuItemOptions {
|
|
@@ -65,7 +62,7 @@ declare function NavigationDrawer({
|
|
|
65
62
|
navItems,
|
|
66
63
|
children,
|
|
67
64
|
headerElements
|
|
68
|
-
}: NavigationDrawerProps):
|
|
65
|
+
}: NavigationDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
69
66
|
//#endregion
|
|
70
67
|
//#region src/v7/components/SubmitButton.d.ts
|
|
71
68
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
@@ -103,7 +100,7 @@ declare function SubmitButton({
|
|
|
103
100
|
disableClean,
|
|
104
101
|
label,
|
|
105
102
|
...buttonProps
|
|
106
|
-
}: SubmitButtonProps):
|
|
103
|
+
}: SubmitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
107
104
|
//#endregion
|
|
108
105
|
//#region src/v7/components/TextField.d.ts
|
|
109
106
|
/**
|
|
@@ -136,7 +133,7 @@ declare function SubmitButton({
|
|
|
136
133
|
declare function TextField({
|
|
137
134
|
label,
|
|
138
135
|
...props
|
|
139
|
-
}: TextFieldProps):
|
|
136
|
+
}: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
140
137
|
//#endregion
|
|
141
138
|
//#region src/v7/components/DropdownMenu/DropdownMenu.d.ts
|
|
142
139
|
interface DropdownMenuProps extends Omit<MenuProps, "anchorEl" | "open"> {
|
|
@@ -152,7 +149,7 @@ declare function DropdownMenu({
|
|
|
152
149
|
children,
|
|
153
150
|
onClose,
|
|
154
151
|
...menuProps
|
|
155
|
-
}: DropdownMenuProps):
|
|
152
|
+
}: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
156
153
|
//#endregion
|
|
157
154
|
//#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
|
|
158
155
|
type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button> = {
|
|
@@ -176,7 +173,7 @@ declare function DropdownMenuItem<RootComponent extends ElementType = typeof But
|
|
|
176
173
|
ref,
|
|
177
174
|
onClick,
|
|
178
175
|
...menuItemProps
|
|
179
|
-
}: DropdownMenuItemProps<RootComponent>):
|
|
176
|
+
}: DropdownMenuItemProps<RootComponent>): import("react/jsx-runtime").JSX.Element;
|
|
180
177
|
//#endregion
|
|
181
178
|
//#region src/types/ContextHookOptions.d.ts
|
|
182
179
|
interface ContextHookOptions<Strict extends boolean = true> {
|
|
@@ -204,7 +201,7 @@ interface DropdownMenuProviderProps {
|
|
|
204
201
|
/** Provides shared context for the `DropdownMenu` related components. */
|
|
205
202
|
declare function DropdownMenuProvider({
|
|
206
203
|
children
|
|
207
|
-
}: DropdownMenuProviderProps):
|
|
204
|
+
}: DropdownMenuProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
208
205
|
//#endregion
|
|
209
206
|
//#region src/v7/components/DropdownMenu/DropdownMenuTrigger.d.ts
|
|
210
207
|
type DropdownMenuTriggerProps<RootComponent extends ElementType> = {
|
|
@@ -234,7 +231,7 @@ declare function DropdownMenuTrigger<RootComponent extends ElementType>({
|
|
|
234
231
|
closedIcon: ClosedIcon,
|
|
235
232
|
variant,
|
|
236
233
|
...buttonProps
|
|
237
|
-
}: DropdownMenuTriggerProps<RootComponent>):
|
|
234
|
+
}: DropdownMenuTriggerProps<RootComponent>): import("react/jsx-runtime").JSX.Element;
|
|
238
235
|
//#endregion
|
|
239
236
|
//#region src/v7/components/DropdownMenu/DropdownMenuWrapper.d.ts
|
|
240
237
|
interface DropdownMenuWrapperProps {
|
|
@@ -254,7 +251,7 @@ declare function DropdownMenuWrapper({
|
|
|
254
251
|
children,
|
|
255
252
|
trigger,
|
|
256
253
|
triggerProps
|
|
257
|
-
}: DropdownMenuWrapperProps):
|
|
254
|
+
}: DropdownMenuWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
258
255
|
//#endregion
|
|
259
256
|
//#region src/v7/components/routing/ErrorPage.d.ts
|
|
260
257
|
interface ErrorPageProps {
|
|
@@ -267,7 +264,7 @@ interface ErrorPageProps {
|
|
|
267
264
|
declare function ErrorPage({
|
|
268
265
|
title,
|
|
269
266
|
children
|
|
270
|
-
}: ErrorPageProps):
|
|
267
|
+
}: ErrorPageProps): import("react/jsx-runtime").JSX.Element;
|
|
271
268
|
//#endregion
|
|
272
269
|
//#region src/v7/components/routing/InternalLink.d.ts
|
|
273
270
|
interface InternalLinkProps extends Omit<LinkProps, "href" | "component"> {
|
|
@@ -301,7 +298,7 @@ declare function InternalLink({
|
|
|
301
298
|
children,
|
|
302
299
|
ref,
|
|
303
300
|
...linkProps
|
|
304
|
-
}: InternalLinkProps):
|
|
301
|
+
}: InternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
305
302
|
//#endregion
|
|
306
303
|
//#region src/v7/components/routing/MemoryRouter.d.ts
|
|
307
304
|
/**
|
|
@@ -312,7 +309,7 @@ declare function InternalLink({
|
|
|
312
309
|
declare function MemoryRouter({
|
|
313
310
|
children,
|
|
314
311
|
...routerProps
|
|
315
|
-
}: Omit<RouterProps, "hook" | "hrefs">):
|
|
312
|
+
}: Omit<RouterProps, "hook" | "hrefs">): import("react/jsx-runtime").JSX.Element;
|
|
316
313
|
//#endregion
|
|
317
314
|
//#region src/v7/components/routing/Router.d.ts
|
|
318
315
|
/**
|
|
@@ -336,7 +333,7 @@ declare function Router({
|
|
|
336
333
|
children,
|
|
337
334
|
hook,
|
|
338
335
|
...routerProps
|
|
339
|
-
}: Omit<RouterProps, "hrefs">):
|
|
336
|
+
}: Omit<RouterProps, "hrefs">): import("react/jsx-runtime").JSX.Element;
|
|
340
337
|
//#endregion
|
|
341
338
|
//#region src/v7/components/routing/Switch.d.ts
|
|
342
339
|
interface SwitchProps extends SwitchProps$1 {
|
|
@@ -352,7 +349,7 @@ declare function Switch({
|
|
|
352
349
|
children,
|
|
353
350
|
fallback,
|
|
354
351
|
...switchProps
|
|
355
|
-
}: SwitchProps):
|
|
352
|
+
}: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
356
353
|
//#endregion
|
|
357
354
|
//#region src/v7/components/routing/useAbsoluteLocation.d.ts
|
|
358
355
|
/**
|
|
@@ -378,7 +375,7 @@ declare function createFormHook<FieldComponents extends Record<string, Component
|
|
|
378
375
|
}>): ReturnType<typeof createFormHook$1<AlexFieldComponents & FieldComponents, AlexFormComponents & FormComponents>>;
|
|
379
376
|
//#endregion
|
|
380
377
|
//#region src/v7/hooks/formHooks.d.ts
|
|
381
|
-
declare const fieldContext:
|
|
378
|
+
declare const fieldContext: import("react").Context<import("@tanstack/react-form").AnyFieldApi>, formContext: import("react").Context<import("@tanstack/react-form").AnyFormApi>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
|
|
382
379
|
//#endregion
|
|
383
380
|
export { DropdownMenu, type DropdownMenuContextValue, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuProvider, type DropdownMenuProviderProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, DropdownMenuWrapper, type DropdownMenuWrapperProps, ErrorPage, type ErrorPageProps, InternalLink, type InternalLinkProps, MemoryRouter, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Router, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, TextField, createFormHook, fieldContext, formContext, useAbsoluteLocation, useDropdownMenu, useFieldContext, useFormContext };
|
|
384
381
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/components",
|
|
3
|
-
"version": "6.25.
|
|
3
|
+
"version": "6.25.2",
|
|
4
4
|
"description": "A package containing common React components used across my projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@alextheman/utility": "5.
|
|
29
|
+
"@alextheman/utility": "5.19.0",
|
|
30
30
|
"common-tags": "1.8.2",
|
|
31
31
|
"react-icons": "5.6.0",
|
|
32
32
|
"react-live": "4.1.8",
|
|
33
33
|
"zod": "4.4.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@alextheman/eslint-plugin": "5.
|
|
36
|
+
"@alextheman/eslint-plugin": "5.15.0",
|
|
37
37
|
"@emotion/react": "11.14.0",
|
|
38
38
|
"@emotion/styled": "11.14.1",
|
|
39
39
|
"@mui/material": "9.0.1",
|
|
@@ -44,36 +44,37 @@
|
|
|
44
44
|
"@storybook/react-vite": "10.4.0",
|
|
45
45
|
"@tanstack/react-form": "1.32.0",
|
|
46
46
|
"@types/common-tags": "1.8.4",
|
|
47
|
-
"@types/node": "25.
|
|
48
|
-
"@types/react": "19.2.
|
|
47
|
+
"@types/node": "25.9.1",
|
|
48
|
+
"@types/react": "19.2.15",
|
|
49
49
|
"@types/react-dom": "19.2.3",
|
|
50
|
-
"@typescript-eslint/types": "8.59.
|
|
51
|
-
"@vitest/browser-playwright": "4.1.
|
|
52
|
-
"@vitest/coverage-v8": "4.1.
|
|
53
|
-
"alex-c-line": "2.
|
|
50
|
+
"@typescript-eslint/types": "8.59.4",
|
|
51
|
+
"@vitest/browser-playwright": "4.1.7",
|
|
52
|
+
"@vitest/coverage-v8": "4.1.7",
|
|
53
|
+
"alex-c-line": "2.8.1",
|
|
54
54
|
"dotenv-cli": "11.0.0",
|
|
55
55
|
"esbuild": "0.28.0",
|
|
56
|
-
"eslint": "10.
|
|
56
|
+
"eslint": "10.4.0",
|
|
57
57
|
"eslint-plugin-react": "7.37.5",
|
|
58
58
|
"eslint-plugin-storybook": "10.4.0",
|
|
59
59
|
"execa": "9.6.1",
|
|
60
60
|
"globals": "17.6.0",
|
|
61
61
|
"husky": "9.1.7",
|
|
62
|
+
"markdownlint-cli2": "0.22.1",
|
|
62
63
|
"playwright": "1.60.0",
|
|
63
64
|
"prettier": "3.8.3",
|
|
64
65
|
"react": "19.2.6",
|
|
65
66
|
"react-docgen-typescript": "2.4.0",
|
|
66
67
|
"react-dom": "19.2.6",
|
|
67
|
-
"react-hook-form": "7.
|
|
68
|
+
"react-hook-form": "7.76.0",
|
|
68
69
|
"react-router-dom": "7.15.1",
|
|
69
70
|
"storybook": "10.4.0",
|
|
70
|
-
"styled-components": "6.4.
|
|
71
|
+
"styled-components": "6.4.2",
|
|
71
72
|
"tempy": "3.2.0",
|
|
72
73
|
"tsdown": "0.22.0",
|
|
73
74
|
"typescript": "6.0.3",
|
|
74
|
-
"typescript-eslint": "8.59.
|
|
75
|
-
"vitest": "4.1.
|
|
76
|
-
"wouter": "3.
|
|
75
|
+
"typescript-eslint": "8.59.4",
|
|
76
|
+
"vitest": "4.1.7",
|
|
77
|
+
"wouter": "3.10.0"
|
|
77
78
|
},
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"@emotion/react": ">=11.0.0",
|
|
@@ -94,14 +95,16 @@
|
|
|
94
95
|
"create-feature-docs": "storybook build",
|
|
95
96
|
"create-local-package": "pnpm run build && rm -f alextheman-components-*.tgz && pnpm pack",
|
|
96
97
|
"create-release-note": "git pull origin main && bash -c 'alex-c-line template release-note create $@' --",
|
|
97
|
-
"format": "pnpm run format-prettier && pnpm run format-eslint",
|
|
98
|
+
"format": "pnpm run format-prettier && pnpm run format-eslint && pnpm run format-markdownlint",
|
|
98
99
|
"format-eslint": "eslint --fix --suppress-all \"{src,stories,tests}/**/*.{ts,tsx}\" \"package.json\" && rm -f eslint-suppressions.json",
|
|
100
|
+
"format-markdownlint": "markdownlint-cli2 --fix \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"",
|
|
99
101
|
"format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
|
|
100
102
|
"format-prettier-javascript": "prettier --write \"./**/*.{js,json}\"",
|
|
101
103
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.{ts,tsx}\"",
|
|
102
104
|
"format-prettier-yml": "prettier --write \"./**/*.{yml,yaml}\"",
|
|
103
|
-
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
105
|
+
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-markdownlint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
104
106
|
"lint-eslint": "eslint \"{src,stories,tests}/**/*.{ts,tsx}\" \"package.json\"",
|
|
107
|
+
"lint-markdownlint": "bash -o pipefail -c 'markdownlint-cli2 \"**/*.md\" \"!{node_modules,dist}/**\"| grep -v \"^Finding:\"'",
|
|
105
108
|
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|
|
106
109
|
"lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
|
|
107
110
|
"lint-prettier-javascript": "prettier --check \"./**/*.{js,json}\"",
|