@alextheman/components 6.2.3 → 6.3.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { CollapseProps } from "@mui/material/Collapse";
3
3
  import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
4
4
  import * as react0 from "react";
@@ -15,20 +15,44 @@ import { TypographyProps } from "@mui/material/Typography";
15
15
  import { LiveProvider } from "react-live";
16
16
  import { SwitchProps } from "@mui/material/Switch";
17
17
 
18
+ //#region src/components/Artwork.d.ts
19
+ declare function Artwork(): react_jsx_runtime3.JSX.Element;
20
+ //#endregion
18
21
  //#region src/components/CollapsableItem.d.ts
19
22
  interface CollapsableItemProps {
23
+ /** Whether the item should initially be open or not. */
20
24
  isInitiallyOpen?: boolean;
25
+ /** A callback function to execute when the item is open. */
21
26
  onOpen?: () => void;
27
+ /** A callback function to execute when the item is closed. */
22
28
  onClose?: () => void;
29
+ /** The components to render when the item is open. */
23
30
  children: ReactNode;
31
+ /** Styling for the button. */
24
32
  buttonStyles?: SxProps;
33
+ /** The children to pass to the button. */
25
34
  buttonContents: ReactNode;
35
+ /** The specific button component to use. */
26
36
  buttonComponent?: ElementType;
37
+ /** The icon to show next to the button when open. */
27
38
  openIcon?: ReactNode;
39
+ /** The icon to show next to the button when closed. */
28
40
  closedIcon?: ReactNode;
41
+ /** Props to pass to collapse. */
29
42
  collapseProps?: Omit<CollapseProps, "in">;
43
+ /**
44
+ * Whether or not to use the default button styling.
45
+ *
46
+ * Defaults to `true` if `buttonComponent` is `ButtonBase`,
47
+ * otherwise defaults to `false`.
48
+ */
30
49
  useDefaultStyling?: boolean;
31
50
  }
51
+ /**
52
+ * Shows a display area that can be opened to show the children components, or hidden away.
53
+ *
54
+ * @param props - Props to pass to CollapsableItem
55
+ */
32
56
  declare function CollapsableItem({
33
57
  isInitiallyOpen,
34
58
  onOpen,
@@ -41,10 +65,10 @@ declare function CollapsableItem({
41
65
  openIcon,
42
66
  closedIcon,
43
67
  useDefaultStyling
44
- }: CollapsableItemProps): react_jsx_runtime2.JSX.Element;
68
+ }: CollapsableItemProps): react_jsx_runtime3.JSX.Element;
45
69
  //#endregion
46
70
  //#region src/components/DarkModeToggle.d.ts
47
- declare function DarkModeToggle(): react_jsx_runtime2.JSX.Element;
71
+ declare function DarkModeToggle(): react_jsx_runtime3.JSX.Element;
48
72
  //#endregion
49
73
  //#region src/components/DropdownMenu.d.ts
50
74
  interface DropdownMenuProps {
@@ -58,15 +82,6 @@ interface DropdownMenuProps {
58
82
  onClose?: () => void;
59
83
  }
60
84
  /**
61
- * @param root0
62
- * @param root0.children
63
- * @param root0.button
64
- * @param root0.buttonChildren
65
- * @param root0.buttonProps
66
- * @param root0.isOpenIcon
67
- * @param root0.isClosedIcon
68
- * @param root0.onOpen
69
- * @param root0.onClose
70
85
  * @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
71
86
  */
72
87
  declare function DropdownMenu({
@@ -78,7 +93,7 @@ declare function DropdownMenu({
78
93
  isClosedIcon,
79
94
  onOpen,
80
95
  onClose
81
- }: DropdownMenuProps): react_jsx_runtime2.JSX.Element;
96
+ }: DropdownMenuProps): react_jsx_runtime3.JSX.Element;
82
97
  //#endregion
83
98
  //#region src/components/ExternalLink.d.ts
84
99
  interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
@@ -92,7 +107,7 @@ declare function ExternalLink({
92
107
  children,
93
108
  ref,
94
109
  ...linkProps
95
- }: ExternalLinkProps): react_jsx_runtime2.JSX.Element;
110
+ }: ExternalLinkProps): react_jsx_runtime3.JSX.Element;
96
111
  //#endregion
97
112
  //#region src/components/FileInput.d.ts
98
113
  declare const FileType: {
@@ -121,7 +136,7 @@ declare function FileInput({
121
136
  accept,
122
137
  useDropzone,
123
138
  ...buttonProps
124
- }: FileInputProps): react_jsx_runtime2.JSX.Element;
139
+ }: FileInputProps): react_jsx_runtime3.JSX.Element;
125
140
  //#endregion
126
141
  //#region src/components/FileInputList.d.ts
127
142
  interface FileInputListProps extends Omit<FileInputProps, "onFileInput"> {
@@ -132,7 +147,7 @@ declare function FileInputList({
132
147
  files,
133
148
  setFiles,
134
149
  ...fileInputProps
135
- }: FileInputListProps): react_jsx_runtime2.JSX.Element;
150
+ }: FileInputListProps): react_jsx_runtime3.JSX.Element;
136
151
  //#endregion
137
152
  //#region src/components/IconWithPopover.d.ts
138
153
  interface IconWithPopoverProps {
@@ -150,7 +165,7 @@ declare function IconWithPopover({
150
165
  onClose,
151
166
  iconProps,
152
167
  children
153
- }: IconWithPopoverProps): react_jsx_runtime2.JSX.Element;
168
+ }: IconWithPopoverProps): react_jsx_runtime3.JSX.Element;
154
169
  //#endregion
155
170
  //#region src/components/InternalLink.d.ts
156
171
  interface InternalLinkProps extends Omit<LinkProps, "href"> {
@@ -164,7 +179,7 @@ declare function InternalLink({
164
179
  children,
165
180
  ref,
166
181
  ...linkProps
167
- }: InternalLinkProps): react_jsx_runtime2.JSX.Element;
182
+ }: InternalLinkProps): react_jsx_runtime3.JSX.Element;
168
183
  //#endregion
169
184
  //#region src/components/ListItemInternalLink.d.ts
170
185
  interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
@@ -174,7 +189,7 @@ interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
174
189
  declare function ListItemInternalLink({
175
190
  children,
176
191
  ...listItemButtonProps
177
- }: ListItemInternalLinkProps): react_jsx_runtime2.JSX.Element;
192
+ }: ListItemInternalLinkProps): react_jsx_runtime3.JSX.Element;
178
193
  //#endregion
179
194
  //#region src/types/ContextHookOptions.d.ts
180
195
  interface ContextHookOptions<S extends boolean = true> {
@@ -204,7 +219,7 @@ declare function DropdownMenu2({
204
219
  buttonProps,
205
220
  openIcon,
206
221
  closedIcon
207
- }: DropdownMenu2Props): react_jsx_runtime2.JSX.Element;
222
+ }: DropdownMenu2Props): react_jsx_runtime3.JSX.Element;
208
223
  //#endregion
209
224
  //#region src/providers/DropdownMenu2/DropdownMenuExternalLink.d.ts
210
225
  interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
@@ -219,7 +234,7 @@ declare function DropdownMenuExternalLink({
219
234
  children,
220
235
  onClick,
221
236
  ...menuItemProps
222
- }: DropdownMenuExternalLinkProps): react_jsx_runtime2.JSX.Element;
237
+ }: DropdownMenuExternalLinkProps): react_jsx_runtime3.JSX.Element;
223
238
  //#endregion
224
239
  //#region src/providers/DropdownMenu2/DropdownMenuInternalLink.d.ts
225
240
  interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
@@ -234,7 +249,7 @@ declare function DropdownMenuInternalLink({
234
249
  children,
235
250
  onClick,
236
251
  ...menuItemProps
237
- }: DropdownMenuInternalLinkProps): react_jsx_runtime2.JSX.Element;
252
+ }: DropdownMenuInternalLinkProps): react_jsx_runtime3.JSX.Element;
238
253
  //#endregion
239
254
  //#region src/providers/DropdownMenu2/DropdownMenuItem.d.ts
240
255
  type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button$1> = {
@@ -249,7 +264,7 @@ declare function DropdownMenuItem<RootComponent extends ElementType>({
249
264
  ref,
250
265
  onClick,
251
266
  ...menuItemProps
252
- }: DropdownMenuItemProps<RootComponent>): react_jsx_runtime2.JSX.Element;
267
+ }: DropdownMenuItemProps<RootComponent>): react_jsx_runtime3.JSX.Element;
253
268
  //#endregion
254
269
  //#region src/providers/LoaderProvider/LoaderProvider.d.ts
255
270
  interface LoaderProviderBaseProps<DataType> {
@@ -282,20 +297,22 @@ type LoaderProviderProps<T> = LoaderContextValue<T> & {
282
297
  /**
283
298
  * A provider for a context that deals with state management when fetching data from an API.
284
299
  * This may be used over Loader if you require more control over the placement of the error message and data display.
300
+ *
285
301
  * @template DataType - The type of data being loaded.
286
- * @param root0 - Props to pass to LoaderProvider.
287
- * @param root0.children - The components that may receive access to the LoaderContext value.
288
- * @param root0.loadingComponent - The component to show when the data is being fetched.
289
- * @param root0.isLoading - The current loading status (true if loading, false if not)
290
- * @param root0.error - The error given if the request gave an error.
291
- * @param root0.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
292
- * @param root0.logError - An option to log the error to the console. Note that this may not be provided unless the error prop has also been provided.
302
+ *
303
+ * @param props - Props to pass to LoaderProvider.
304
+ * @param props.children - The components that may receive access to the LoaderContext value.
305
+ * @param props.loadingComponent - The component to show when the data is being fetched.
306
+ * @param props.isLoading - The current loading status (true if loading, false if not)
307
+ * @param props.error - The error given if the request gave an error.
308
+ * @param props.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
309
+ * @param props.logError - An option to log the error to the console. Note that this may not be provided unless the error prop has also been provided.
293
310
  */
294
311
  declare function LoaderProvider<DataType>({
295
312
  children,
296
313
  loadingComponent,
297
314
  ...contextProps
298
- }: LoaderProviderProps<DataType>): react_jsx_runtime2.JSX.Element;
315
+ }: LoaderProviderProps<DataType>): react_jsx_runtime3.JSX.Element;
299
316
  //#endregion
300
317
  //#region src/providers/LoaderProvider/LoaderData.d.ts
301
318
  interface LoaderDataProps<T> {
@@ -311,18 +328,20 @@ interface LoaderDataProps<T> {
311
328
  }
312
329
  /**
313
330
  * The component responsible for showing the data provided by LoaderProvider.
331
+ *
314
332
  * @template DataType - The type of data being loaded.
315
- * @param root0 - Props to pass to LoaderData.
316
- * @param root0.children - The elements to show after data has been loaded.
333
+ *
334
+ * @param props - Props to pass to LoaderData.
335
+ * @param props.children - The elements to show after data has been loaded.
317
336
  * This is best provided as a function with a data argument that guarantees the data will not be undefined by the time you receive it here.
318
- * @param root0.dataParser - A parser for the data.
319
- * @param root0.loadingComponent - The component to show when the data is being fetched.
337
+ * @param props.dataParser - A parser for the data.
338
+ * @param props.loadingComponent - The component to show when the data is being fetched.
320
339
  */
321
340
  declare function LoaderData<DataType>({
322
341
  children,
323
342
  dataParser: loaderDataParser,
324
343
  loadingComponent
325
- }: LoaderDataProps<DataType>): react_jsx_runtime2.JSX.Element;
344
+ }: LoaderDataProps<DataType>): react_jsx_runtime3.JSX.Element;
326
345
  //#endregion
327
346
  //#region src/providers/LoaderProvider/LoaderError.d.ts
328
347
  interface LoaderErrorBaseProps {
@@ -347,12 +366,13 @@ interface LoaderErrorPropsWithNullable extends LoaderErrorBaseProps {
347
366
  type LoaderErrorProps = LoaderErrorPropsWithUndefinedOrNull | LoaderErrorPropsWithNullable;
348
367
  /**
349
368
  * The component responsible for showing any errors provided by LoaderProvider.
350
- * @param root0 - The props to be passed to LoaderError.
351
- * @param root0.children - The component to show if an error has been thrown.
352
- * @param root0.undefinedComponent - The component to show if no error was thrown but the data is undefined.
353
- * @param root0.nullComponent - The component to show if no error was thrown but the data is null.
354
- * @param root0.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
355
- * @param root0.logError - An option to log the error to the console.
369
+ *
370
+ * @param props - The props to be passed to LoaderError.
371
+ * @param props.children - The component to show if an error has been thrown.
372
+ * @param props.undefinedComponent - The component to show if no error was thrown but the data is undefined.
373
+ * @param props.nullComponent - The component to show if no error was thrown but the data is null.
374
+ * @param props.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
375
+ * @param props.logError - An option to log the error to the console.
356
376
  */
357
377
  declare function LoaderError({
358
378
  children,
@@ -360,7 +380,7 @@ declare function LoaderError({
360
380
  nullComponent,
361
381
  nullableComponent,
362
382
  logError: propsLogError
363
- }: LoaderErrorProps): string | number | bigint | boolean | react_jsx_runtime2.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
383
+ }: LoaderErrorProps): string | number | bigint | boolean | react_jsx_runtime3.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
364
384
  //#endregion
365
385
  //#region src/providers/ModeProvider.d.ts
366
386
  interface ModeContextValue {
@@ -377,7 +397,7 @@ interface ModeProviderProps {
377
397
  declare function ModeProvider({
378
398
  children,
379
399
  mode: modeProp
380
- }: ModeProviderProps): react_jsx_runtime2.JSX.Element;
400
+ }: ModeProviderProps): react_jsx_runtime3.JSX.Element;
381
401
  //#endregion
382
402
  //#region src/providers/ScreenSizeProvider.d.ts
383
403
  interface ScreenSizeProps {
@@ -397,7 +417,7 @@ declare function ScreenSizeProvider({
397
417
  children,
398
418
  largeScreenWidth,
399
419
  largeScreenHeight
400
- }: ScreenSizeProps): react_jsx_runtime2.JSX.Element;
420
+ }: ScreenSizeProps): react_jsx_runtime3.JSX.Element;
401
421
  //#endregion
402
422
  //#region src/providers/SnackbarProvider.d.ts
403
423
  interface SnackbarProviderProps {
@@ -413,22 +433,24 @@ declare function useSnackbar<Strict extends boolean = true>({
413
433
  declare function SnackbarProvider({
414
434
  children,
415
435
  autoHideDuration
416
- }: SnackbarProviderProps): react_jsx_runtime2.JSX.Element;
436
+ }: SnackbarProviderProps): react_jsx_runtime3.JSX.Element;
417
437
  //#endregion
418
438
  //#region src/components/Loader.d.ts
419
439
  type LoaderProps<DataType> = Omit<LoaderProviderProps<DataType>, "children" | "logError"> & Omit<LoaderErrorProps, "errorComponent" | "children"> & Omit<LoaderDataProps<DataType>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
420
440
  /**
421
441
  * An in-line component that deals with state management when fetching data from an API.
422
442
  * This may be used over LoaderProvider if you don't require as much control over the placement of the error message and data display.
443
+ *
423
444
  * @template DataType - The type of data being loaded.
424
- * @param root0 - Props to pass to Loader.
425
- * @param root0.children - The elements to show after data has been loaded.
426
- * @param root0.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
427
- * @param root0.undefinedComponent - The component to show if no error was thrown but the data is undefined.
428
- * @param root0.nullComponent - The component to show if no error was thrown but the data is null.
429
- * @param root0.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
430
- * @param root0.loadingComponent - The component to show when the data is being fetched.
431
- * @param root0.logError - An option to log the error to the console.
445
+ *
446
+ * @param props - Props to pass to Loader.
447
+ * @param props.children - The elements to show after data has been loaded.
448
+ * @param props.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
449
+ * @param props.undefinedComponent - The component to show if no error was thrown but the data is undefined.
450
+ * @param props.nullComponent - The component to show if no error was thrown but the data is null.
451
+ * @param props.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
452
+ * @param props.loadingComponent - The component to show when the data is being fetched.
453
+ * @param props.logError - An option to log the error to the console.
432
454
  */
433
455
  declare function Loader<DataType>({
434
456
  children,
@@ -439,7 +461,7 @@ declare function Loader<DataType>({
439
461
  logError,
440
462
  loadingComponent,
441
463
  ...loaderProviderProps
442
- }: LoaderProps<DataType>): react_jsx_runtime2.JSX.Element;
464
+ }: LoaderProps<DataType>): react_jsx_runtime3.JSX.Element;
443
465
  //#endregion
444
466
  //#region src/components/NavigationBottom.d.ts
445
467
  interface NavItemBottom {
@@ -455,7 +477,7 @@ interface NavigationBottomProps {
455
477
  declare function NavigationBottom({
456
478
  children,
457
479
  navItems
458
- }: NavigationBottomProps): react_jsx_runtime2.JSX.Element;
480
+ }: NavigationBottomProps): react_jsx_runtime3.JSX.Element;
459
481
  //#endregion
460
482
  //#region src/components/NavigationDrawer.d.ts
461
483
  interface NavMenuItem {
@@ -477,7 +499,7 @@ declare function NavigationDrawer({
477
499
  navItems,
478
500
  children,
479
501
  headerElements
480
- }: NavigationDrawerProps): react_jsx_runtime2.JSX.Element;
502
+ }: NavigationDrawerProps): react_jsx_runtime3.JSX.Element;
481
503
  //#endregion
482
504
  //#region src/components/PopoverText.d.ts
483
505
  interface PopoverTextProps extends TypographyProps {
@@ -487,7 +509,7 @@ declare function PopoverText({
487
509
  text,
488
510
  sx,
489
511
  ...typographyProps
490
- }: PopoverTextProps): react_jsx_runtime2.JSX.Element;
512
+ }: PopoverTextProps): react_jsx_runtime3.JSX.Element;
491
513
  //#endregion
492
514
  //#region src/components/ReactPlayground.d.ts
493
515
  interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
@@ -497,7 +519,7 @@ declare function ReactPlayground({
497
519
  code,
498
520
  previewStyles,
499
521
  ...liveProviderProps
500
- }: ReactPlaygroundProps): react_jsx_runtime2.JSX.Element;
522
+ }: ReactPlaygroundProps): react_jsx_runtime3.JSX.Element;
501
523
  //#endregion
502
524
  //#region src/components/SkeletonRow.d.ts
503
525
  interface SkeletonRowProps {
@@ -505,7 +527,7 @@ interface SkeletonRowProps {
505
527
  }
506
528
  declare function SkeletonRow({
507
529
  columns
508
- }: SkeletonRowProps): react_jsx_runtime2.JSX.Element;
530
+ }: SkeletonRowProps): react_jsx_runtime3.JSX.Element;
509
531
  //#endregion
510
532
  //#region src/components/SubmitButton.d.ts
511
533
  interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
@@ -516,7 +538,7 @@ declare function SubmitButton({
516
538
  disableClean,
517
539
  label,
518
540
  ...buttonProps
519
- }: SubmitButtonProps): react_jsx_runtime2.JSX.Element;
541
+ }: SubmitButtonProps): react_jsx_runtime3.JSX.Element;
520
542
  //#endregion
521
543
  //#region src/components/SwitchWithIcons.d.ts
522
544
  interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
@@ -535,10 +557,10 @@ declare function SwitchWithIcons({
535
557
  uncheckedIcon: UncheckedIcon,
536
558
  uncheckedIconStyles,
537
559
  ...switchProps
538
- }: SwitchWithIconsProps): react_jsx_runtime2.JSX.Element;
560
+ }: SwitchWithIconsProps): react_jsx_runtime3.JSX.Element;
539
561
  //#endregion
540
562
  //#region src/hooks/useHash.d.ts
541
563
  declare function useHash<S extends string>(initialHash: S | undefined): [S, Dispatch<SetStateAction<S>>];
542
564
  //#endregion
543
- export { CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, type DropdownMenuExternalLinkProps, DropdownMenuInternalLink, type DropdownMenuInternalLinkProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, type ListItemInternalLinkProps, 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, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, 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 };
565
+ export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, type DropdownMenuExternalLinkProps, DropdownMenuInternalLink, type DropdownMenuInternalLinkProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, type ListItemInternalLinkProps, 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, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, 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 };
544
566
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import { TypographyProps } from "@mui/material/Typography";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
1
3
  import { CollapseProps } from "@mui/material/Collapse";
2
4
  import * as react0 from "react";
3
5
  import { CSSProperties, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, Dispatch, ElementType, JSX, MouseEvent, MouseEventHandler, ReactNode, Ref, SetStateAction } from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
5
6
  import MUIButton, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
6
7
  import { MenuItemOwnProps } from "@mui/material/MenuItem";
7
8
  import { AlertColor } from "@mui/material/Alert";
@@ -9,26 +10,49 @@ import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
9
10
  import { OptionalOnCondition } from "@alextheman/utility";
10
11
  import { LinkProps } from "@mui/material/Link";
11
12
  import { ListItemButtonProps } from "@mui/material/ListItemButton";
12
- import { TypographyProps } from "@mui/material/Typography";
13
13
  import { LiveProvider } from "react-live";
14
14
  import { SwitchProps } from "@mui/material/Switch";
15
15
  import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
16
16
  import { SvgIconTypeMap } from "@mui/material/SvgIcon";
17
17
 
18
+ //#region src/components/Artwork.d.ts
19
+ declare function Artwork(): react_jsx_runtime0.JSX.Element;
20
+ //#endregion
18
21
  //#region src/components/CollapsableItem.d.ts
19
22
  interface CollapsableItemProps {
23
+ /** Whether the item should initially be open or not. */
20
24
  isInitiallyOpen?: boolean;
25
+ /** A callback function to execute when the item is open. */
21
26
  onOpen?: () => void;
27
+ /** A callback function to execute when the item is closed. */
22
28
  onClose?: () => void;
29
+ /** The components to render when the item is open. */
23
30
  children: ReactNode;
31
+ /** Styling for the button. */
24
32
  buttonStyles?: SxProps;
33
+ /** The children to pass to the button. */
25
34
  buttonContents: ReactNode;
35
+ /** The specific button component to use. */
26
36
  buttonComponent?: ElementType;
37
+ /** The icon to show next to the button when open. */
27
38
  openIcon?: ReactNode;
39
+ /** The icon to show next to the button when closed. */
28
40
  closedIcon?: ReactNode;
41
+ /** Props to pass to collapse. */
29
42
  collapseProps?: Omit<CollapseProps, "in">;
43
+ /**
44
+ * Whether or not to use the default button styling.
45
+ *
46
+ * Defaults to `true` if `buttonComponent` is `ButtonBase`,
47
+ * otherwise defaults to `false`.
48
+ */
30
49
  useDefaultStyling?: boolean;
31
50
  }
51
+ /**
52
+ * Shows a display area that can be opened to show the children components, or hidden away.
53
+ *
54
+ * @param props - Props to pass to CollapsableItem
55
+ */
32
56
  declare function CollapsableItem({
33
57
  isInitiallyOpen,
34
58
  onOpen,
@@ -58,15 +82,6 @@ interface DropdownMenuProps {
58
82
  onClose?: () => void;
59
83
  }
60
84
  /**
61
- * @param root0
62
- * @param root0.children
63
- * @param root0.button
64
- * @param root0.buttonChildren
65
- * @param root0.buttonProps
66
- * @param root0.isOpenIcon
67
- * @param root0.isClosedIcon
68
- * @param root0.onOpen
69
- * @param root0.onClose
70
85
  * @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
71
86
  */
72
87
  declare function DropdownMenu({
@@ -282,14 +297,16 @@ type LoaderProviderProps<T> = LoaderContextValue<T> & {
282
297
  /**
283
298
  * A provider for a context that deals with state management when fetching data from an API.
284
299
  * This may be used over Loader if you require more control over the placement of the error message and data display.
300
+ *
285
301
  * @template DataType - The type of data being loaded.
286
- * @param root0 - Props to pass to LoaderProvider.
287
- * @param root0.children - The components that may receive access to the LoaderContext value.
288
- * @param root0.loadingComponent - The component to show when the data is being fetched.
289
- * @param root0.isLoading - The current loading status (true if loading, false if not)
290
- * @param root0.error - The error given if the request gave an error.
291
- * @param root0.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
292
- * @param root0.logError - An option to log the error to the console. Note that this may not be provided unless the error prop has also been provided.
302
+ *
303
+ * @param props - Props to pass to LoaderProvider.
304
+ * @param props.children - The components that may receive access to the LoaderContext value.
305
+ * @param props.loadingComponent - The component to show when the data is being fetched.
306
+ * @param props.isLoading - The current loading status (true if loading, false if not)
307
+ * @param props.error - The error given if the request gave an error.
308
+ * @param props.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
309
+ * @param props.logError - An option to log the error to the console. Note that this may not be provided unless the error prop has also been provided.
293
310
  */
294
311
  declare function LoaderProvider<DataType>({
295
312
  children,
@@ -311,12 +328,14 @@ interface LoaderDataProps<T> {
311
328
  }
312
329
  /**
313
330
  * The component responsible for showing the data provided by LoaderProvider.
331
+ *
314
332
  * @template DataType - The type of data being loaded.
315
- * @param root0 - Props to pass to LoaderData.
316
- * @param root0.children - The elements to show after data has been loaded.
333
+ *
334
+ * @param props - Props to pass to LoaderData.
335
+ * @param props.children - The elements to show after data has been loaded.
317
336
  * This is best provided as a function with a data argument that guarantees the data will not be undefined by the time you receive it here.
318
- * @param root0.dataParser - A parser for the data.
319
- * @param root0.loadingComponent - The component to show when the data is being fetched.
337
+ * @param props.dataParser - A parser for the data.
338
+ * @param props.loadingComponent - The component to show when the data is being fetched.
320
339
  */
321
340
  declare function LoaderData<DataType>({
322
341
  children,
@@ -347,12 +366,13 @@ interface LoaderErrorPropsWithNullable extends LoaderErrorBaseProps {
347
366
  type LoaderErrorProps = LoaderErrorPropsWithUndefinedOrNull | LoaderErrorPropsWithNullable;
348
367
  /**
349
368
  * The component responsible for showing any errors provided by LoaderProvider.
350
- * @param root0 - The props to be passed to LoaderError.
351
- * @param root0.children - The component to show if an error has been thrown.
352
- * @param root0.undefinedComponent - The component to show if no error was thrown but the data is undefined.
353
- * @param root0.nullComponent - The component to show if no error was thrown but the data is null.
354
- * @param root0.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
355
- * @param root0.logError - An option to log the error to the console.
369
+ *
370
+ * @param props - The props to be passed to LoaderError.
371
+ * @param props.children - The component to show if an error has been thrown.
372
+ * @param props.undefinedComponent - The component to show if no error was thrown but the data is undefined.
373
+ * @param props.nullComponent - The component to show if no error was thrown but the data is null.
374
+ * @param props.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
375
+ * @param props.logError - An option to log the error to the console.
356
376
  */
357
377
  declare function LoaderError({
358
378
  children,
@@ -420,15 +440,17 @@ type LoaderProps<DataType> = Omit<LoaderProviderProps<DataType>, "children" | "l
420
440
  /**
421
441
  * An in-line component that deals with state management when fetching data from an API.
422
442
  * This may be used over LoaderProvider if you don't require as much control over the placement of the error message and data display.
443
+ *
423
444
  * @template DataType - The type of data being loaded.
424
- * @param root0 - Props to pass to Loader.
425
- * @param root0.children - The elements to show after data has been loaded.
426
- * @param root0.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
427
- * @param root0.undefinedComponent - The component to show if no error was thrown but the data is undefined.
428
- * @param root0.nullComponent - The component to show if no error was thrown but the data is null.
429
- * @param root0.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
430
- * @param root0.loadingComponent - The component to show when the data is being fetched.
431
- * @param root0.logError - An option to log the error to the console.
445
+ *
446
+ * @param props - Props to pass to Loader.
447
+ * @param props.children - The elements to show after data has been loaded.
448
+ * @param props.errorComponent - The component to show if an error has been thrown. Note that this may not be provided unless the error prop has also been provided.
449
+ * @param props.undefinedComponent - The component to show if no error was thrown but the data is undefined.
450
+ * @param props.nullComponent - The component to show if no error was thrown but the data is null.
451
+ * @param props.nullableComponent - The component to show if no error was thrown but the data is nullable (undefined or null).
452
+ * @param props.loadingComponent - The component to show when the data is being fetched.
453
+ * @param props.logError - An option to log the error to the console.
432
454
  */
433
455
  declare function Loader<DataType>({
434
456
  children,
@@ -540,5 +562,5 @@ declare function SwitchWithIcons({
540
562
  //#region src/hooks/useHash.d.ts
541
563
  declare function useHash<S extends string>(initialHash: S | undefined): [S, Dispatch<SetStateAction<S>>];
542
564
  //#endregion
543
- export { CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, type DropdownMenuExternalLinkProps, DropdownMenuInternalLink, type DropdownMenuInternalLinkProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, type ListItemInternalLinkProps, 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, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, 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 };
565
+ export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, type DropdownMenuExternalLinkProps, DropdownMenuInternalLink, type DropdownMenuInternalLinkProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, type ListItemInternalLinkProps, 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, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, 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 };
544
566
  //# sourceMappingURL=index.d.ts.map