@alextheman/components 6.9.0 → 6.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -132
- package/dist/index.d.ts +228 -133
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { TypographyProps } from "@mui/material/Typography";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { CollapseProps } from "@mui/material/Collapse";
|
|
4
|
-
import * as react from "react";
|
|
4
|
+
import * as _$react from "react";
|
|
5
5
|
import { CSSProperties, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, Dispatch, ElementType, JSX, MouseEvent, MouseEventHandler, ReactNode, Ref, SetStateAction } from "react";
|
|
6
|
-
import MUIButton, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
7
6
|
import { LinkProps } from "@mui/material/Link";
|
|
7
|
+
import MUIButton, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
8
8
|
import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
|
|
9
|
-
import { MenuItemOwnProps } from "@mui/material/MenuItem";
|
|
10
|
-
import { AlertColor } from "@mui/material/Alert";
|
|
11
9
|
import { CreateEnumType, OptionalOnCondition } from "@alextheman/utility";
|
|
10
|
+
import { AlertColor } from "@mui/material/Alert";
|
|
12
11
|
import { SwitchProps } from "@mui/material/Switch";
|
|
13
12
|
import { ListItemButtonProps } from "@mui/material/ListItemButton";
|
|
14
13
|
import { LiveProvider } from "react-live";
|
|
14
|
+
import { MenuItemOwnProps } from "@mui/material/MenuItem";
|
|
15
15
|
import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
|
|
16
16
|
import { SvgIconTypeMap } from "@mui/material/SvgIcon";
|
|
17
17
|
|
|
18
18
|
//#region src/components/Artwork.d.ts
|
|
19
19
|
/** The artwork associated with the package's theme song, _An Interface For You And I_. */
|
|
20
|
-
declare function Artwork(): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
declare function Artwork(): _$react_jsx_runtime0.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/components/CollapsableItem.d.ts
|
|
23
23
|
interface CollapsableItemProps {
|
|
@@ -64,32 +64,7 @@ declare function CollapsableItem({
|
|
|
64
64
|
openIcon,
|
|
65
65
|
closedIcon,
|
|
66
66
|
useDefaultStyling
|
|
67
|
-
}: CollapsableItemProps): react_jsx_runtime0.JSX.Element;
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/components/DropdownMenu.d.ts
|
|
70
|
-
interface DropdownMenuProps {
|
|
71
|
-
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
72
|
-
buttonChildren?: ReactNode;
|
|
73
|
-
button?: ElementType;
|
|
74
|
-
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
75
|
-
isOpenIcon?: ReactNode;
|
|
76
|
-
isClosedIcon?: ReactNode;
|
|
77
|
-
onOpen?: () => void;
|
|
78
|
-
onClose?: () => void;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
|
|
82
|
-
*/
|
|
83
|
-
declare function DropdownMenu({
|
|
84
|
-
children,
|
|
85
|
-
button: Button,
|
|
86
|
-
buttonChildren,
|
|
87
|
-
buttonProps: incomingButtonProps,
|
|
88
|
-
isOpenIcon,
|
|
89
|
-
isClosedIcon,
|
|
90
|
-
onOpen,
|
|
91
|
-
onClose
|
|
92
|
-
}: DropdownMenuProps): react_jsx_runtime0.JSX.Element;
|
|
67
|
+
}: CollapsableItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
93
68
|
//#endregion
|
|
94
69
|
//#region src/components/ExternalLink.d.ts
|
|
95
70
|
interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
|
|
@@ -111,7 +86,7 @@ declare function ExternalLink({
|
|
|
111
86
|
children,
|
|
112
87
|
ref,
|
|
113
88
|
...linkProps
|
|
114
|
-
}: ExternalLinkProps): react_jsx_runtime0.JSX.Element;
|
|
89
|
+
}: ExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
115
90
|
//#endregion
|
|
116
91
|
//#region src/components/FileInput.d.ts
|
|
117
92
|
declare const FileType: {
|
|
@@ -146,7 +121,7 @@ declare function FileInput({
|
|
|
146
121
|
accept,
|
|
147
122
|
useDropzone,
|
|
148
123
|
...buttonProps
|
|
149
|
-
}: FileInputProps): react_jsx_runtime0.JSX.Element;
|
|
124
|
+
}: FileInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
150
125
|
//#endregion
|
|
151
126
|
//#region src/components/FileInputList.d.ts
|
|
152
127
|
interface FileInputListProps extends Omit<FileInputProps, "onFileInput"> {
|
|
@@ -161,7 +136,7 @@ declare function FileInputList({
|
|
|
161
136
|
setFiles,
|
|
162
137
|
multiple,
|
|
163
138
|
...fileInputProps
|
|
164
|
-
}: FileInputListProps): react_jsx_runtime0.JSX.Element;
|
|
139
|
+
}: FileInputListProps): _$react_jsx_runtime0.JSX.Element;
|
|
165
140
|
//#endregion
|
|
166
141
|
//#region src/components/InternalLink.d.ts
|
|
167
142
|
interface InternalLinkProps extends Omit<LinkProps, "href" | "component"> {
|
|
@@ -195,82 +170,13 @@ declare function InternalLink({
|
|
|
195
170
|
children,
|
|
196
171
|
ref,
|
|
197
172
|
...linkProps
|
|
198
|
-
}: InternalLinkProps): react_jsx_runtime0.JSX.Element;
|
|
173
|
+
}: InternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
199
174
|
//#endregion
|
|
200
175
|
//#region src/types/ContextHookOptions.d.ts
|
|
201
|
-
interface ContextHookOptions<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/providers/DropdownMenu2/DropdownMenu2.d.ts
|
|
206
|
-
interface DropdownMenuContextValue {
|
|
207
|
-
closeMenu: () => void;
|
|
208
|
-
isDropdownOpen: boolean;
|
|
209
|
-
}
|
|
210
|
-
declare function useDropdownMenu<Strict extends boolean = true>({
|
|
211
|
-
strict
|
|
212
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, DropdownMenuContextValue>;
|
|
213
|
-
interface DropdownMenu2Props {
|
|
214
|
-
children: ReactNode;
|
|
215
|
-
button?: ElementType;
|
|
216
|
-
buttonProps?: Omit<ButtonOwnProps, "endIcon"> & {
|
|
217
|
-
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
218
|
-
};
|
|
219
|
-
openIcon?: ReactNode;
|
|
220
|
-
closedIcon?: ReactNode;
|
|
221
|
-
}
|
|
222
|
-
declare function DropdownMenu2({
|
|
223
|
-
children,
|
|
224
|
-
button: Button,
|
|
225
|
-
buttonProps,
|
|
226
|
-
openIcon,
|
|
227
|
-
closedIcon
|
|
228
|
-
}: DropdownMenu2Props): react_jsx_runtime0.JSX.Element;
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region src/providers/DropdownMenu2/DropdownMenuExternalLink.d.ts
|
|
231
|
-
interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
|
|
232
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
233
|
-
href: ComponentProps<typeof ExternalLink>["href"];
|
|
234
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
235
|
-
children: ReactNode;
|
|
176
|
+
interface ContextHookOptions<Strict extends boolean = true> {
|
|
177
|
+
/** Error if the context is missing if this is set to true. */
|
|
178
|
+
strict?: Strict;
|
|
236
179
|
}
|
|
237
|
-
declare function DropdownMenuExternalLink({
|
|
238
|
-
ref,
|
|
239
|
-
href,
|
|
240
|
-
children,
|
|
241
|
-
onClick,
|
|
242
|
-
...menuItemProps
|
|
243
|
-
}: DropdownMenuExternalLinkProps): react_jsx_runtime0.JSX.Element;
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/providers/DropdownMenu2/DropdownMenuInternalLink.d.ts
|
|
246
|
-
interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
|
|
247
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
248
|
-
to: ComponentProps<typeof InternalLink>["to"];
|
|
249
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
250
|
-
children: ReactNode;
|
|
251
|
-
}
|
|
252
|
-
declare function DropdownMenuInternalLink({
|
|
253
|
-
to,
|
|
254
|
-
ref,
|
|
255
|
-
children,
|
|
256
|
-
onClick,
|
|
257
|
-
...menuItemProps
|
|
258
|
-
}: DropdownMenuInternalLinkProps): react_jsx_runtime0.JSX.Element;
|
|
259
|
-
//#endregion
|
|
260
|
-
//#region src/providers/DropdownMenu2/DropdownMenuItem.d.ts
|
|
261
|
-
type DropdownMenuItemProps<RootComponent extends ElementType = typeof MUIButton> = {
|
|
262
|
-
component?: RootComponent;
|
|
263
|
-
children?: ReactNode;
|
|
264
|
-
ref?: ComponentPropsWithRef<RootComponent>["ref"];
|
|
265
|
-
onClick?: ComponentProps<RootComponent>["onClick"];
|
|
266
|
-
} & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
|
|
267
|
-
declare function DropdownMenuItem<RootComponent extends ElementType>({
|
|
268
|
-
component,
|
|
269
|
-
children,
|
|
270
|
-
ref,
|
|
271
|
-
onClick,
|
|
272
|
-
...menuItemProps
|
|
273
|
-
}: DropdownMenuItemProps<RootComponent>): react_jsx_runtime0.JSX.Element;
|
|
274
180
|
//#endregion
|
|
275
181
|
//#region src/providers/LoaderProvider/LoaderProvider.d.ts
|
|
276
182
|
interface LoaderProviderBaseProps<DataType> {
|
|
@@ -310,7 +216,7 @@ declare function LoaderProvider<DataType>({
|
|
|
310
216
|
children,
|
|
311
217
|
loadingComponent,
|
|
312
218
|
...contextProps
|
|
313
|
-
}: LoaderProviderProps<DataType>): react_jsx_runtime0.JSX.Element;
|
|
219
|
+
}: LoaderProviderProps<DataType>): _$react_jsx_runtime0.JSX.Element;
|
|
314
220
|
//#endregion
|
|
315
221
|
//#region src/providers/LoaderProvider/LoaderData.d.ts
|
|
316
222
|
interface LoaderDataProps<T> {
|
|
@@ -333,7 +239,7 @@ declare function LoaderData<DataType>({
|
|
|
333
239
|
children,
|
|
334
240
|
dataParser: loaderDataParser,
|
|
335
241
|
loadingComponent
|
|
336
|
-
}: LoaderDataProps<DataType>): react_jsx_runtime0.JSX.Element;
|
|
242
|
+
}: LoaderDataProps<DataType>): _$react_jsx_runtime0.JSX.Element;
|
|
337
243
|
//#endregion
|
|
338
244
|
//#region src/providers/LoaderProvider/LoaderError.d.ts
|
|
339
245
|
interface LoaderErrorBaseProps {
|
|
@@ -365,24 +271,28 @@ declare function LoaderError({
|
|
|
365
271
|
nullComponent,
|
|
366
272
|
nullableComponent,
|
|
367
273
|
logError: propsLogError
|
|
368
|
-
}: LoaderErrorProps): string | number | bigint | boolean | react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
274
|
+
}: LoaderErrorProps): string | number | bigint | boolean | _$react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
369
275
|
//#endregion
|
|
370
276
|
//#region src/providers/ModeProvider.d.ts
|
|
371
277
|
interface ModeContextValue {
|
|
372
278
|
toggleMode: () => void;
|
|
373
279
|
mode: PaletteMode;
|
|
374
280
|
}
|
|
281
|
+
/** Access the mode context directly. */
|
|
375
282
|
declare function useMode<Strict extends boolean = true>({
|
|
376
283
|
strict
|
|
377
284
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ModeContextValue>;
|
|
378
285
|
interface ModeProviderProps {
|
|
286
|
+
/** The children that will have access to the current mode. */
|
|
379
287
|
children: ReactNode;
|
|
288
|
+
/** The initial mode. */
|
|
380
289
|
mode?: PaletteMode;
|
|
381
290
|
}
|
|
291
|
+
/** Provides information about the current theme mode to its children components. */
|
|
382
292
|
declare function ModeProvider({
|
|
383
293
|
children,
|
|
384
294
|
mode: modeProp
|
|
385
|
-
}: ModeProviderProps): react_jsx_runtime0.JSX.Element;
|
|
295
|
+
}: ModeProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
386
296
|
//#endregion
|
|
387
297
|
//#region src/providers/ScreenSizeProvider.d.ts
|
|
388
298
|
interface ScreenSizeProps {
|
|
@@ -401,6 +311,7 @@ interface ScreenSizeContextValue {
|
|
|
401
311
|
/** The current window height. */
|
|
402
312
|
windowHeight: number;
|
|
403
313
|
}
|
|
314
|
+
/** Access the screen size context directly. */
|
|
404
315
|
declare function useScreenSize<Strict extends boolean = true>({
|
|
405
316
|
strict
|
|
406
317
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ScreenSizeContextValue>;
|
|
@@ -409,23 +320,28 @@ declare function ScreenSizeProvider({
|
|
|
409
320
|
children,
|
|
410
321
|
largeScreenWidth,
|
|
411
322
|
largeScreenHeight
|
|
412
|
-
}: ScreenSizeProps): react_jsx_runtime0.JSX.Element;
|
|
323
|
+
}: ScreenSizeProps): _$react_jsx_runtime0.JSX.Element;
|
|
413
324
|
//#endregion
|
|
414
325
|
//#region src/providers/SnackbarProvider.d.ts
|
|
415
326
|
interface SnackbarProviderProps {
|
|
327
|
+
/** The children that will have access to the snackbar context. */
|
|
416
328
|
children: ReactNode;
|
|
329
|
+
/** The amount of seconds to wait before hiding the snackbar. */
|
|
417
330
|
autoHideDuration?: number;
|
|
418
331
|
}
|
|
419
332
|
interface SnackbarContextValue {
|
|
333
|
+
/** A function that adds the snackbar to the page. */
|
|
420
334
|
addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;
|
|
421
335
|
}
|
|
336
|
+
/** Access the snackbar context directly. */
|
|
422
337
|
declare function useSnackbar<Strict extends boolean = true>({
|
|
423
338
|
strict
|
|
424
339
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, SnackbarContextValue>;
|
|
340
|
+
/** Controls the display of the snackbars on the page. */
|
|
425
341
|
declare function SnackbarProvider({
|
|
426
342
|
children,
|
|
427
343
|
autoHideDuration
|
|
428
|
-
}: SnackbarProviderProps): react_jsx_runtime0.JSX.Element;
|
|
344
|
+
}: SnackbarProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
429
345
|
//#endregion
|
|
430
346
|
//#region src/components/Loader.d.ts
|
|
431
347
|
type LoaderProps<DataType> = Omit<LoaderProviderProps<DataType>, "children" | "logError"> & Omit<LoaderErrorProps, "errorComponent" | "children"> & Omit<LoaderDataProps<DataType>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
|
|
@@ -444,49 +360,67 @@ declare function Loader<DataType>({
|
|
|
444
360
|
logError,
|
|
445
361
|
loadingComponent,
|
|
446
362
|
...loaderProviderProps
|
|
447
|
-
}: LoaderProps<DataType>): react_jsx_runtime0.JSX.Element;
|
|
363
|
+
}: LoaderProps<DataType>): _$react_jsx_runtime0.JSX.Element;
|
|
448
364
|
//#endregion
|
|
449
365
|
//#region src/components/ModeToggle.d.ts
|
|
450
366
|
/** A toggle to switch between dark mode and light mode. Must be used in a `ModeProvider`. */
|
|
451
|
-
declare function ModeToggle(): react_jsx_runtime0.JSX.Element;
|
|
367
|
+
declare function ModeToggle(): _$react_jsx_runtime0.JSX.Element;
|
|
452
368
|
//#endregion
|
|
453
369
|
//#region src/components/NavigationBottom.d.ts
|
|
454
370
|
interface NavItemBottom {
|
|
371
|
+
/** The value associated with the nav item. */
|
|
455
372
|
value: string;
|
|
373
|
+
/** The label to display on the nav item. */
|
|
456
374
|
label: string;
|
|
375
|
+
/** An icon to display alongside the nav item. */
|
|
457
376
|
icon?: JSX.Element;
|
|
377
|
+
/** Where in your app the nav item should navigate to. */
|
|
458
378
|
to: string;
|
|
459
379
|
}
|
|
460
380
|
interface NavigationBottomProps {
|
|
381
|
+
/** Children to display above the nav bar. */
|
|
461
382
|
children: ReactNode;
|
|
383
|
+
/** An array of nav items to show. */
|
|
462
384
|
navItems: Array<NavItemBottom>;
|
|
463
385
|
}
|
|
386
|
+
/** Renders a navigation bar at the bottom of the screen. Especially helpful for common navigation options in a mobile app. */
|
|
464
387
|
declare function NavigationBottom({
|
|
465
388
|
children,
|
|
466
389
|
navItems
|
|
467
|
-
}: NavigationBottomProps): react_jsx_runtime0.JSX.Element;
|
|
390
|
+
}: NavigationBottomProps): _$react_jsx_runtime0.JSX.Element;
|
|
468
391
|
//#endregion
|
|
469
392
|
//#region src/components/NavigationDrawer.d.ts
|
|
393
|
+
interface NavMenuItemOptions {
|
|
394
|
+
/** The label to display on the nav item option. */
|
|
395
|
+
label: string;
|
|
396
|
+
/** Where in your app the nav item option should navigate to. */
|
|
397
|
+
to: string;
|
|
398
|
+
/** An icon to display alongside the nav item option. */
|
|
399
|
+
icon?: ReactNode;
|
|
400
|
+
}
|
|
470
401
|
interface NavMenuItem {
|
|
402
|
+
/** The category to display all the nav item options under. */
|
|
471
403
|
category: string;
|
|
472
|
-
options
|
|
473
|
-
|
|
474
|
-
to: string;
|
|
475
|
-
icon?: ReactNode;
|
|
476
|
-
}>;
|
|
404
|
+
/** An array of nav options to display under the chosen category. */
|
|
405
|
+
options: Array<NavMenuItemOptions>;
|
|
477
406
|
}
|
|
478
407
|
interface NavigationDrawerProps {
|
|
408
|
+
/** The title to display at the top of the wrapper. */
|
|
479
409
|
title: string;
|
|
410
|
+
/** An array of nav items to show. */
|
|
480
411
|
navItems: Array<NavMenuItem>;
|
|
412
|
+
/** Any extra elements to add to the header. */
|
|
481
413
|
headerElements?: ReactNode;
|
|
414
|
+
/** Children to display within the wrapper. */
|
|
482
415
|
children: ReactNode;
|
|
483
416
|
}
|
|
417
|
+
/** Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps. */
|
|
484
418
|
declare function NavigationDrawer({
|
|
485
419
|
title,
|
|
486
420
|
navItems,
|
|
487
421
|
children,
|
|
488
422
|
headerElements
|
|
489
|
-
}: NavigationDrawerProps): react_jsx_runtime0.JSX.Element;
|
|
423
|
+
}: NavigationDrawerProps): _$react_jsx_runtime0.JSX.Element;
|
|
490
424
|
//#endregion
|
|
491
425
|
//#region src/components/Page.d.ts
|
|
492
426
|
interface PageProps {
|
|
@@ -505,60 +439,212 @@ declare function Page({
|
|
|
505
439
|
subtitle,
|
|
506
440
|
action,
|
|
507
441
|
children
|
|
508
|
-
}: PageProps): react_jsx_runtime0.JSX.Element;
|
|
442
|
+
}: PageProps): _$react_jsx_runtime0.JSX.Element;
|
|
509
443
|
//#endregion
|
|
510
444
|
//#region src/components/ReactPlayground.d.ts
|
|
511
445
|
interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
|
|
446
|
+
/** Extra styling to apply to the preview. Must be compatible with the Material UI `sx` prop. */
|
|
512
447
|
previewStyles?: SxProps<Theme>;
|
|
513
448
|
}
|
|
449
|
+
/** Renders a playground to help demonstrate your React code in an interactive setting. */
|
|
514
450
|
declare function ReactPlayground({
|
|
515
451
|
code,
|
|
516
452
|
previewStyles,
|
|
517
453
|
...liveProviderProps
|
|
518
|
-
}: ReactPlaygroundProps): react_jsx_runtime0.JSX.Element;
|
|
454
|
+
}: ReactPlaygroundProps): _$react_jsx_runtime0.JSX.Element;
|
|
519
455
|
//#endregion
|
|
520
456
|
//#region src/components/SkeletonRow.d.ts
|
|
521
457
|
interface SkeletonRowProps {
|
|
458
|
+
/** The number of columns the SkeletonRow should display. */
|
|
522
459
|
columns: number;
|
|
523
460
|
}
|
|
461
|
+
/** Renders the skeleton of a table row. Often helpful to represent the loading state of the data in your table. */
|
|
524
462
|
declare function SkeletonRow({
|
|
525
463
|
columns
|
|
526
|
-
}: SkeletonRowProps): react_jsx_runtime0.JSX.Element;
|
|
464
|
+
}: SkeletonRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
527
465
|
//#endregion
|
|
528
466
|
//#region src/components/SubmitButton.d.ts
|
|
529
467
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
468
|
+
/** An option to disable the button on submit if the form is not dirty. */
|
|
530
469
|
disableClean?: boolean;
|
|
470
|
+
/** The label for the button. */
|
|
531
471
|
label: string;
|
|
532
472
|
}
|
|
473
|
+
/**
|
|
474
|
+
* A Submit Button for use with `react-hook-form`.
|
|
475
|
+
*
|
|
476
|
+
* Note that this is planned to eventually be deprecated and replaced with a newer version of `SubmitButton` that is instead compatible with `@tanstack/react-form`.
|
|
477
|
+
*/
|
|
533
478
|
declare function SubmitButton({
|
|
534
479
|
disableClean,
|
|
535
480
|
label,
|
|
536
481
|
...buttonProps
|
|
537
|
-
}: SubmitButtonProps): react_jsx_runtime0.JSX.Element;
|
|
482
|
+
}: SubmitButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
538
483
|
//#endregion
|
|
539
484
|
//#region src/components/SwitchWithIcons.d.ts
|
|
540
485
|
interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
|
|
486
|
+
/** The icon to show when the switch is in a checked state. */
|
|
541
487
|
checkedIcon: ComponentType<{
|
|
542
488
|
style?: CSSProperties;
|
|
543
489
|
}>;
|
|
490
|
+
/** Additional styling to apply to the icon that shows when checked. */
|
|
544
491
|
checkedIconStyles?: CommonProps["style"];
|
|
492
|
+
/** The icon to show when the switch is in an unchecked state. */
|
|
545
493
|
uncheckedIcon: ComponentType<{
|
|
546
494
|
style?: CSSProperties;
|
|
547
495
|
}>;
|
|
496
|
+
/** Additional styling to apply to the icon that shows when unchecked. */
|
|
548
497
|
uncheckedIconStyles?: CommonProps["style"];
|
|
549
498
|
}
|
|
499
|
+
/** Renders a switch with your provided icons. */
|
|
550
500
|
declare function SwitchWithIcons({
|
|
551
501
|
checkedIcon: CheckedIcon,
|
|
552
502
|
checkedIconStyles,
|
|
553
503
|
uncheckedIcon: UncheckedIcon,
|
|
554
504
|
uncheckedIconStyles,
|
|
555
505
|
...switchProps
|
|
556
|
-
}: SwitchWithIconsProps): react_jsx_runtime0.JSX.Element;
|
|
506
|
+
}: SwitchWithIconsProps): _$react_jsx_runtime0.JSX.Element;
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region src/deprecated/DropdownMenu.d.ts
|
|
509
|
+
interface DropdownMenuProps {
|
|
510
|
+
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
511
|
+
buttonChildren?: ReactNode;
|
|
512
|
+
button?: ElementType;
|
|
513
|
+
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
514
|
+
isOpenIcon?: ReactNode;
|
|
515
|
+
isClosedIcon?: ReactNode;
|
|
516
|
+
onOpen?: () => void;
|
|
517
|
+
onClose?: () => void;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
|
|
521
|
+
*/
|
|
522
|
+
declare function DropdownMenu({
|
|
523
|
+
children,
|
|
524
|
+
button: Button,
|
|
525
|
+
buttonChildren,
|
|
526
|
+
buttonProps: incomingButtonProps,
|
|
527
|
+
isOpenIcon,
|
|
528
|
+
isClosedIcon,
|
|
529
|
+
onOpen,
|
|
530
|
+
onClose
|
|
531
|
+
}: DropdownMenuProps): _$react_jsx_runtime0.JSX.Element;
|
|
557
532
|
//#endregion
|
|
558
533
|
//#region src/deprecated/DarkModeToggle.d.ts
|
|
559
534
|
/** @deprecated This component has been renamed to `ModeToggle`. */
|
|
560
535
|
declare const DarkModeToggle: typeof ModeToggle;
|
|
561
536
|
//#endregion
|
|
537
|
+
//#region src/v7/components/DropdownMenu/DropdownMenu.d.ts
|
|
538
|
+
interface DropdownMenuContextValue {
|
|
539
|
+
/** A function responsible for closing the dropdown menu. */
|
|
540
|
+
closeMenu: () => void;
|
|
541
|
+
/** Represents whether or not the dropdown is open. */
|
|
542
|
+
isDropdownOpen: boolean;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
Access the DropdownMenu context directly.
|
|
546
|
+
*/
|
|
547
|
+
declare function useDropdownMenu$1<Strict extends boolean = true>({
|
|
548
|
+
strict
|
|
549
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, DropdownMenuContextValue>;
|
|
550
|
+
interface DropdownMenuProps$1 {
|
|
551
|
+
/** The children to render inside of the dropdown. */
|
|
552
|
+
children: ReactNode;
|
|
553
|
+
/** The button component to be used as the dropdown toggle (defaults to a Material UI Button) */
|
|
554
|
+
button?: ElementType;
|
|
555
|
+
/** Props to pass to the Button. */
|
|
556
|
+
buttonProps?: Omit<ButtonOwnProps, "endIcon"> & {
|
|
557
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
558
|
+
};
|
|
559
|
+
/** The icon to display on the button when it is open. */
|
|
560
|
+
openIcon?: ReactNode;
|
|
561
|
+
/** The icon to display on the button when it is closed. */
|
|
562
|
+
closedIcon?: ReactNode;
|
|
563
|
+
}
|
|
564
|
+
/** Renders a dropdown menu consisting of `DropdownMenuItem` components imported from this package. */
|
|
565
|
+
declare function DropdownMenu$1({
|
|
566
|
+
children,
|
|
567
|
+
button: Button,
|
|
568
|
+
buttonProps,
|
|
569
|
+
openIcon,
|
|
570
|
+
closedIcon
|
|
571
|
+
}: DropdownMenuProps$1): _$react_jsx_runtime0.JSX.Element;
|
|
572
|
+
//#endregion
|
|
573
|
+
//#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
|
|
574
|
+
type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof MUIButton> = {
|
|
575
|
+
/**
|
|
576
|
+
* An optional component to provide to override the current component.
|
|
577
|
+
*
|
|
578
|
+
* Note that the provided component must:
|
|
579
|
+
* - accept a `to` prop.
|
|
580
|
+
* - correctly handle the forwarded `ref`.
|
|
581
|
+
* - render a valid anchor element (or equivalent) for proper accessibility.
|
|
582
|
+
*/
|
|
583
|
+
component?: RootComponent; /** The children to be rendered within the menu item. */
|
|
584
|
+
children?: ReactNode; /** The ref to forward to allow it to be used with polymorphic components */
|
|
585
|
+
ref?: ComponentPropsWithRef<RootComponent>["ref"]; /** A function to execute after clicking the item. */
|
|
586
|
+
onClick?: ComponentProps<RootComponent>["onClick"];
|
|
587
|
+
} & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
|
|
588
|
+
/** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */
|
|
589
|
+
declare function DropdownMenuItem$1<RootComponent extends ElementType>({
|
|
590
|
+
component,
|
|
591
|
+
children,
|
|
592
|
+
ref,
|
|
593
|
+
onClick,
|
|
594
|
+
...menuItemProps
|
|
595
|
+
}: DropdownMenuItemProps$1<RootComponent>): _$react_jsx_runtime0.JSX.Element;
|
|
596
|
+
//#endregion
|
|
597
|
+
//#region src/deprecated/DropdownMenu2/DropdownMenu2.d.ts
|
|
598
|
+
declare const useDropdownMenu: typeof useDropdownMenu$1;
|
|
599
|
+
/**
|
|
600
|
+
* @deprecated Please use `DropdownMenuProps` from `@alextheman/components/v7` instead.
|
|
601
|
+
*
|
|
602
|
+
* This will be replaced in the root entrypoint in a future release.
|
|
603
|
+
*/
|
|
604
|
+
type DropdownMenu2Props = DropdownMenuProps$1;
|
|
605
|
+
/**
|
|
606
|
+
* @deprecated Please use `DropdownMenu` from `@alextheman/components/v7` instead.
|
|
607
|
+
*
|
|
608
|
+
* This will be replaced in the root entrypoint in a future release.
|
|
609
|
+
*/
|
|
610
|
+
declare const DropdownMenu2: typeof DropdownMenu$1;
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region src/deprecated/DropdownMenu2/DropdownMenuItem.d.ts
|
|
613
|
+
type DropdownMenuItemProps<RootComponent extends ElementType> = DropdownMenuItemProps$1<RootComponent>;
|
|
614
|
+
declare const DropdownMenuItem: typeof DropdownMenuItem$1;
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/deprecated/DropdownMenuExternalLink.d.ts
|
|
617
|
+
interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
|
|
618
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
619
|
+
href: ComponentProps<typeof ExternalLink>["href"];
|
|
620
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
621
|
+
children: ReactNode;
|
|
622
|
+
}
|
|
623
|
+
/** @deprecated Please use `<DropdownMenuItem component={ExternalLink} />` instead. */
|
|
624
|
+
declare function DropdownMenuExternalLink({
|
|
625
|
+
ref,
|
|
626
|
+
href,
|
|
627
|
+
children,
|
|
628
|
+
onClick,
|
|
629
|
+
...menuItemProps
|
|
630
|
+
}: DropdownMenuExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
631
|
+
//#endregion
|
|
632
|
+
//#region src/deprecated/DropdownMenuInternalLink.d.ts
|
|
633
|
+
interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
|
|
634
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
635
|
+
to: ComponentProps<typeof InternalLink>["to"];
|
|
636
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
637
|
+
children: ReactNode;
|
|
638
|
+
}
|
|
639
|
+
/** @deprecated Please use `<DropdownMenuItem component={InternalLink} />` instead. */
|
|
640
|
+
declare function DropdownMenuInternalLink({
|
|
641
|
+
to,
|
|
642
|
+
ref,
|
|
643
|
+
children,
|
|
644
|
+
onClick,
|
|
645
|
+
...menuItemProps
|
|
646
|
+
}: DropdownMenuInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
647
|
+
//#endregion
|
|
562
648
|
//#region src/deprecated/IconWithPopover.d.ts
|
|
563
649
|
interface IconWithPopoverProps {
|
|
564
650
|
icon?: (OverridableComponent<SvgIconTypeMap<unknown, "svg">> & {
|
|
@@ -585,7 +671,7 @@ declare function IconWithPopover({
|
|
|
585
671
|
onClose,
|
|
586
672
|
iconProps,
|
|
587
673
|
children
|
|
588
|
-
}: IconWithPopoverProps): react_jsx_runtime0.JSX.Element;
|
|
674
|
+
}: IconWithPopoverProps): _$react_jsx_runtime0.JSX.Element;
|
|
589
675
|
//#endregion
|
|
590
676
|
//#region src/deprecated/ListItemInternalLink.d.ts
|
|
591
677
|
interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
|
|
@@ -596,7 +682,7 @@ interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
|
|
|
596
682
|
declare function ListItemInternalLink({
|
|
597
683
|
children,
|
|
598
684
|
...listItemButtonProps
|
|
599
|
-
}: ListItemInternalLinkProps): react_jsx_runtime0.JSX.Element;
|
|
685
|
+
}: ListItemInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
600
686
|
//#endregion
|
|
601
687
|
//#region src/deprecated/PopoverText.d.ts
|
|
602
688
|
interface PopoverTextProps extends TypographyProps {
|
|
@@ -609,10 +695,19 @@ declare function PopoverText({
|
|
|
609
695
|
text,
|
|
610
696
|
sx,
|
|
611
697
|
...typographyProps
|
|
612
|
-
}: PopoverTextProps): react_jsx_runtime0.JSX.Element;
|
|
698
|
+
}: PopoverTextProps): _$react_jsx_runtime0.JSX.Element;
|
|
613
699
|
//#endregion
|
|
614
700
|
//#region src/hooks/useHash.d.ts
|
|
615
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Stores changes to the window hash as React state.
|
|
703
|
+
*
|
|
704
|
+
* @template StateType - The type of the hash state.
|
|
705
|
+
*
|
|
706
|
+
* @param initialHash - The initial value of the hash.
|
|
707
|
+
*
|
|
708
|
+
* @returns A tuple containing the hash state, and a updater function to set the hash state.
|
|
709
|
+
*/
|
|
710
|
+
declare function useHash<StateType extends string>(initialHash: StateType | undefined): [StateType, Dispatch<SetStateAction<StateType>>];
|
|
616
711
|
//#endregion
|
|
617
|
-
export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink,
|
|
712
|
+
export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, DropdownMenuInternalLink, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, Loader, LoaderData, type LoaderDataProps, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, type LoaderProps, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, ModeProvider, type ModeProviderProps, ModeToggle, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Page, PopoverText, type PopoverTextProps, ReactPlayground, type ReactPlaygroundProps, type ScreenSizeContextValue, type ScreenSizeProps, ScreenSizeProvider, SkeletonRow, type SkeletonRowProps, SnackbarProvider, type SnackbarProviderProps, SubmitButton, type SubmitButtonProps, SwitchWithIcons, type SwitchWithIconsProps, useDropdownMenu, useHash, useMode, useScreenSize, useSnackbar };
|
|
618
713
|
//# sourceMappingURL=index.d.ts.map
|